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