Commit 56ae6959 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Amplify beauty of interface view dump

parent 2878580a
......@@ -800,37 +800,40 @@ package body TASTE.Interface_View is
end Rename_Required_Interface;
procedure Debug_Dump (IV : Complete_Interface_View; Output : File_Type) is
procedure Dump_Interface (Ind : String := " ";
I : Taste_Interface) is
procedure Dump_Interface (I : Taste_Interface; Last : Boolean := False)
is
Ind : constant String := (if not Last then "│" else " ");
begin
Put_Line (Output, " |_Name: " & To_String (I.Name) & " - in FV: "
Put_Line (Output, Ind & " └─ Name: "
& To_String (I.Name) & " - in FV: "
& To_String (I.Parent_Function));
Put_Line (Output, Ind & " |_RCM Kind : " & I.RCM'Img);
Put_Line (Output, Ind & " |_Period/MIAT : " & I.Period_Or_MIAT'Img);
Put_Line (Output, Ind & " |_WCET (ms) : "
Put_Line (Output, Ind & " ├─ RCM Kind : " & I.RCM'Img);
Put_Line (Output, Ind & " ├─ Period/MIAT : "
& I.Period_Or_MIAT'Img);
Put_Line (Output, Ind & " ├─ WCET (ms) : "
& Value_Or (I.WCET_ms, 0)'Img);
Put_Line (Output, Ind & " |_Queue Size : "
Put_Line (Output, Ind & " ├─ Queue Size : "
& Value_Or (I.Queue_Size, 1)'Img);
Put_Line (Output, Ind & " |_Parameters :");
Put_Line (Output, Ind & " ├─ Parameters :");
for Each of I.Params loop
Put_Line (Output, Ind & " |_Name : "
Put_Line (Output, Ind & " │ ├─ Name : "
& To_String (Each.Name));
Put_Line (Output, Ind & " |_Type : "
Put_Line (Output, Ind & " │ ├─ Type : "
& To_String (Each.Sort));
Put_Line (Output, Ind & " |_ASN.1 Module : "
Put_Line (Output, Ind & " │ ├─ ASN.1 Module : "
& To_String (Each.ASN1_Module));
Put_Line (Output, Ind & " |_ASN.1 File : "
Put_Line (Output, Ind & " │ ├─ ASN.1 File : "
& To_String (Each.ASN1_File_Name));
Put_Line (Output, Ind & " |_Basic type : "
Put_Line (Output, Ind & " │ ├─ Basic type : "
& Each.ASN1_Basic_Type'Img);
Put_Line (Output, Ind & " |_Encoding : "
Put_Line (Output, Ind & " │ ├─ Encoding : "
& Each.Encoding'Img);
Put_Line (Output, Ind & " |_Direction : "
Put_Line (Output, Ind & " │ └─ Direction : "
& Each.Direction'Img);
end loop;
Put_Line (Output, Ind & " |_Connections :");
Put_Line (Output, Ind & " └─ Connections :");
for Each of I.Remote_Interfaces loop
Put_Line (Output, Ind & " |_Function "
Put_Line (Output, Ind & " └─ Function "
& To_String (Each.Function_Name)
& ", interface " & To_String (Each.Interface_Name));
end loop;
......@@ -840,51 +843,50 @@ package body TASTE.Interface_View is
Put_Line (Output, "Function " & To_String (Each.Name)
& " in context " & To_String (Each.Context));
Put_Line (Output, " |_Full Prefix: "
Put_Line (Output, "├─ Full Prefix : "
& To_String (Value_Or (Each.Full_Prefix, US ("(none)"))));
Put_Line (Output, " |_Language : " & Each.Language'Img);
Put_Line (Output, " |_Zip file : "
Put_Line (Output, "├─ Language : " & Each.Language'Img);
Put_Line (Output, "├─ Zip file : "
& To_String (Value_Or (Each.Zip_File, US ("(none)"))));
Put_Line (Output, " |_Is type : " & Each.Is_Type'Img);
Put_Line (Output, " |_Instance of : "
Put_Line (Output, "├─ Is type : " & Each.Is_Type'Img);
Put_Line (Output, "├─ Instance of : "
& To_String (Value_Or (Each.Instance_Of, US ("(n/a)"))));
Put_Line (Output, " |_Cxtx Params:");
Put_Line (Output, "├─ Cxtx Params:");
for CP of Each.Context_Params loop
Put_Line (Output, " |_" & To_String (CP.Name) & ": "
Put_Line (Output, " ├─ " & To_String (CP.Name) & ": "
& To_String (CP.Sort) & "- default: "
& To_String (CP.Default_Value) & " - asn1 module: "
& To_String (CP.ASN1_Module) & " - file:"
& To_String (Value_Or (CP.ASN1_File_Name,
US ("(none)"))));
end loop;
Put_Line (Output, " |_Directives:");
Put_Line (Output, "├─ Directives:");
for CP of Each.Directives loop
Put_Line (Output, " |_" & To_String (CP.Name) & " = "
Put_Line (Output, " ├─ " & To_String (CP.Name) & " = "
& To_String (CP.Default_Value));
end loop;
Put_Line (Output, " |_Simulink Tuneable Parameters:");
Put_Line (Output, "├─ Simulink Tuneable Parameters:");
for CP of Each.Simulink loop
Put_Line (Output, " |_" & To_String (CP.Name) & " = "
Put_Line (Output, " ├─ " & To_String (CP.Name) & " = "
& To_String (CP.Default_Value));
end loop;
Put_Line (Output, " |_User properties:");
Put_Line (Output, "├─ User properties:");
for Ppty of Each.User_Properties loop
Put_Line (Output, " " & To_String (Ppty.Name) & " = "
Put_Line (Output, "│ ├─ " & To_String (Ppty.Name) & " = "
& To_String (Ppty.Value));
end loop;
Put_Line (Output, " |_Timers:");
Put_Line (Output, "├─ Timers:");
for Timer of Each.Timers loop
Put_Line (Output, " |_" & Timer);
Put_Line (Output, " ├─ " & Timer);
end loop;
Put_Line (Output, " |_Provided interfaces:");
Put_Line (Output, "├─ Provided interfaces:");
for PI of Each.Provided loop
Dump_Interface (I => PI);
end loop;
New_Line (Output);
Put_Line (Output, " |_Required interfaces:");
Put_Line (Output, "└─ Required interfaces:");
for RI of Each.Required loop
Dump_Interface (I => RI);
Dump_Interface (I => RI, Last => True);
end loop;
New_Line (Output);
end loop;
......
package TASTE.Parser_Version is
Parser_Release : constant String :=
"2706158 ; Commit Date: Sun Mar 18 10:57:03 2018 ";
"2878580 ; Commit Date: Sun Mar 18 16:34:36 2018 ";
Ocarina_Version : constant String :=
"Ocarina 2017.x (Working Copy from r2a52334)";
end TASTE.Parser_Version;
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment