Commit 39271cfb authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix port names

parent d05d1599
...@@ -332,8 +332,8 @@ package body TASTE.AADL_Parser is ...@@ -332,8 +332,8 @@ package body TASTE.AADL_Parser is
RI.Remote_Interfaces.First_Element; RI.Remote_Interfaces.First_Element;
Remote_Thread_Name : constant Unbounded_String := Remote_Thread_Name : constant Unbounded_String :=
Dist.Function_Name & "_" & Dist.Interface_Name; Dist.Function_Name & "_" & Dist.Interface_Name;
Port_Name : constant Unbounded_String := Port_Name : constant Unbounded_String := RI.Name;
Remote_Thread_Name & "_" & Dist.Interface_Name; -- Remote_Thread_Name & "_" & Dist.Interface_Name;
New_P : constant Port := New_P : constant Port :=
(Name => Port_Name, (Name => Port_Name,
Remote_Thread => Remote_Thread_Name, Remote_Thread => Remote_Thread_Name,
......
...@@ -109,11 +109,13 @@ package body TASTE.Concurrency_View is ...@@ -109,11 +109,13 @@ package body TASTE.Concurrency_View is
-- This function translates a thread definition into a template -- This function translates a thread definition into a template
function To_Template (T : AADL_Thread) return Translate_Set is function To_Template (T : AADL_Thread) return Translate_Set is
Remote_Thread : Vector_Tag; Remote_Thread : Vector_Tag;
RI_Port_Name : Vector_Tag; -- Name of the local RI (= port name)
Remote_PI : Vector_Tag; -- Name of the remote PI Remote_PI : Vector_Tag; -- Name of the remote PI
Remote_PI_Sort : Vector_Tag; -- ASN.1 type of the parameter Remote_PI_Sort : Vector_Tag; -- ASN.1 type of the parameter
Remote_PI_Module : Vector_Tag; -- ASN.1 module containing the type Remote_PI_Module : Vector_Tag; -- ASN.1 module containing the type
begin begin
for Out_Port of T.Output_Ports loop for Out_Port of T.Output_Ports loop
RI_Port_Name := RI_Port_Name & Out_Port.Name;
Remote_Thread := Remote_Thread & To_String (Out_Port.Remote_Thread); Remote_Thread := Remote_Thread & To_String (Out_Port.Remote_Thread);
Remote_PI := Remote_PI & To_String (Out_Port.Remote_PI); Remote_PI := Remote_PI & To_String (Out_Port.Remote_PI);
-- Set the Asn.1 module and type of the optional RI parameter -- Set the Asn.1 module and type of the optional RI parameter
...@@ -137,6 +139,7 @@ package body TASTE.Concurrency_View is ...@@ -137,6 +139,7 @@ package body TASTE.Concurrency_View is
& Assoc ("Node_Name", To_String (T.Node.Value_Or & Assoc ("Node_Name", To_String (T.Node.Value_Or
(Taste_Node'(Name => US (""), others => <>)).Name)) (Taste_Node'(Name => US (""), others => <>)).Name))
& Assoc ("Remote_Threads", Remote_Thread) & Assoc ("Remote_Threads", Remote_Thread)
& Assoc ("RI_Port_Names", RI_Port_Name)
& Assoc ("Remote_PIs", Remote_PI) & Assoc ("Remote_PIs", Remote_PI)
& Assoc ("Remote_PI_Sorts", Remote_PI_Sort) & Assoc ("Remote_PI_Sorts", Remote_PI_Sort)
& Assoc ("Remote_PI_Modules", Remote_PI_Module); & Assoc ("Remote_PI_Modules", Remote_PI_Module);
......
...@@ -30,6 +30,6 @@ subcomponents ...@@ -30,6 +30,6 @@ subcomponents
@@END_TABLE@@ @@END_TABLE@@
connections connections
@@TABLE@@ @@TABLE@@
port @_LOWER:Thread_Src_Name_@.OUTPORT_@_LOWER:Thread_Src_Port_@ -> @_LOWER:Thread_Dst_Name_@.INPORT_@_LOWER:Thread_Dst_Port_@; port @_CAPITALIZE:Thread_Src_Name_@.OUTPORT_@_CAPITALIZE:Thread_Src_Port_@ -> @_CAPITALIZE:Thread_Dst_Name_@.INPORT_@_CAPITALIZE:Thread_Dst_Port_@;
@@END_TABLE@@ @@END_TABLE@@
end @_Name_@.final; end @_Name_@.final;
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
@@-- @_Pro_Block_Name_@ : Name of the protected function @@-- @_Pro_Block_Name_@ : Name of the protected function
@@-- @_Node_Name_@ : Name of the deployment node @@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list @@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_RI_Port_Name_@ : |_ Corresponding local RI name
@@-- @_Remote_PIs_@ : |_ Associated PI Name @@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- @_Remote_PI_Sorts_@ : |_ Optional param type of the remote thread @@-- @_Remote_PI_Sorts_@ : |_ Optional param type of the remote thread
@@-- @_Remote_PI_Modules_@ : |_ Asn1 module of the optional param type @@-- @_Remote_PI_Modules_@ : |_ Asn1 module of the optional param type
...@@ -29,9 +30,9 @@ features ...@@ -29,9 +30,9 @@ features
@@IF@@ @_RCM_@ /= "CYCLIC_OPERATION" @@IF@@ @_RCM_@ /= "CYCLIC_OPERATION"
@@INLINE( )()()@@ @@INLINE( )()()@@
@@IF@@ @_Param_Names'Length_@ > 0 @@IF@@ @_Param_Names'Length_@ > 0
INPORT_@_Entry_Port_Name_@ : in event data port DataView::@_REPLACE_ALL((-)/_):Param_Types_@_Buffer.impl INPORT_@_CAPITALIZE:Entry_Port_Name_@ : in event data port DataView::@_REPLACE_ALL((-)/_):Param_Types_@_Buffer.impl
@@ELSE@@ @@ELSE@@
INPORT_@_Entry_Port_Name_@ : in event port INPORT_@_CAPITALIZE:Entry_Port_Name_@ : in event port
@@END_IF@@ @@END_IF@@
@@END_INLINE@@ @@END_INLINE@@
{ Compute_Execution_Time => @_WCET_@ ms .. @_WCET_@ ms; { Compute_Execution_Time => @_WCET_@ ms .. @_WCET_@ ms;
...@@ -41,9 +42,9 @@ features ...@@ -41,9 +42,9 @@ features
@@TABLE@@ @@TABLE@@
@@INLINE( )()()@@ @@INLINE( )()()@@
@@IF@@ @_Remote_PI_Sorts_@ /= "" @@IF@@ @_Remote_PI_Sorts_@ /= ""
OUTPORT_@_Remote_PIs_@ : out event data port DataView::@_REPLACE_ALL((-)/_):Remote_PI_Sorts_@_Buffer.impl; OUTPORT_@_CAPITALIZE:RI_Port_Names_@ : out event data port DataView::@_REPLACE_ALL((-)/_):Remote_PI_Sorts_@_Buffer.impl;
@@ELSE@@ @@ELSE@@
OUTPORT_@_Remote_PIs_@ : out event port; OUTPORT_@_CAPITALIZE:RI_Port_Names_@ : out event port;
@@END_IF@@ @@END_IF@@
@@END_INLINE@@ @@END_INLINE@@
@@END_TABLE@@ @@END_TABLE@@
......
Markdown is supported
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