Commit fea6bfaf authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add template for bus properties

parent 2a08df09
......@@ -223,6 +223,26 @@ package body TASTE.Concurrency_View is
declare
Path : constant String := Full_Name (Current);
-- Optional template for Busses, useful to render the bus
-- properties.
function Generate_Bus (Bus : Taste_Bus) return String
is
File_Id : constant String := Path & "/bus.tmplt";
Trigger : constant Boolean := Exists (File_Id);
Bus_Assoc : constant Translate_Set :=
Properties_To_Template (Bus.Properties)
& Assoc ("Bus_Name", Bus.Name)
& Assoc ("AADL_Package", Bus.AADL_Package)
& Assoc ("Classifier", Bus.Classifier);
Result : constant String :=
(if Trigger then Strip_String (Parse (File_Id, Bus_Assoc))
else "");
begin
Document_Template
(Templates_Concurrency_View_Sub_Bus, Bus_Assoc);
return Result;
end Generate_Bus;
function Generate_Partition (Node_Name : String;
Partition_Name : String)
return String
......@@ -676,6 +696,7 @@ package body TASTE.Concurrency_View is
Part_Dest_Name : Vector_Tag; -- Inter-partition connections (TSP)
Bus_Names,
Bus_AADL_Pkg,
Bus_Properties,
Bus_Classifier : Vector_Tag; -- System busses
Device_Node_Name,
Device_Partition_Name : Vector_Tag;
......@@ -699,6 +720,7 @@ package body TASTE.Concurrency_View is
Bus_Names := Bus_Names & Bus.Name;
Bus_AADL_Pkg := Bus_AADL_Pkg & Bus.AADL_Package;
Bus_Classifier := Bus_Classifier & Bus.Classifier;
Bus_Properties := Bus_Properties & Generate_Bus (Bus);
end loop;
-- Bus connections: we need the output port name, partition and
......@@ -910,6 +932,7 @@ package body TASTE.Concurrency_View is
& Assoc ("Bus_Names", Bus_Names)
& Assoc ("Bus_AADL_Package", Bus_AADL_Pkg)
& Assoc ("Bus_Classifier", Bus_Classifier)
& Assoc ("Bus_Properties", Bus_Properties)
& Assoc ("Device_Node_Name", Device_Node_Name)
& Assoc ("Device_Partition", Device_Partition_Name)
& Assoc ("Unique_Dev_ASN1_Files", Unique_ASN1_Files)
......
......@@ -116,6 +116,7 @@ package TASTE.Parser_Utils is
Templates_Concurrency_View_Sub_Partition,
Templates_Concurrency_View_Sub_Node,
Templates_Concurrency_View_Sub_System,
Templates_Concurrency_View_Sub_Bus,
Templates_Dump_Interfaceview,
Templates_Dump_Deploymentview);
......
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