Commit 17c083f8 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update SDL templates to support sync PIs

parent 35c5b6ee
...@@ -42,35 +42,31 @@ system @_CAPITALIZE:Name_@; ...@@ -42,35 +42,31 @@ system @_CAPITALIZE:Name_@;
@_Required_Interfaces'Indent_@ @_Required_Interfaces'Indent_@
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ or @_EXIST:List_Of_ASync_RIs_@
channel c channel c
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ @@IF@@ @_EXIST:List_Of_ASync_PIs_@
@@IF@@ @_EXIST:List_Of_Sync_PIs_@
@@-- dont use @_List_Of_PIs_@ because it includes timers @@-- dont use @_List_Of_PIs_@ because it includes timers
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@, @_List_Of_Sync_PIs_@;
@@ELSE@@
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@; from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@;
@@END_IF@@
@@END_IF@@ @@END_IF@@
@@IF@@ @_EXIST:List_Of_ASync_RIs_@ @@IF@@ @_EXIST:List_Of_ASync_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@; from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@;
@@END_IF@@ @@END_IF@@
endchannel; endchannel;
@@END_IF@@
block @_CAPITALIZE:Name_@; block @_CAPITALIZE:Name_@;
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ or @_EXIST:List_Of_ASync_RIs_@
signalroute r signalroute r
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ @@IF@@ @_EXIST:List_Of_ASync_PIs_@
@@IF@@ @_EXIST:List_Of_Sync_PIs_@
@@-- dont use @_List_Of_PIs_@ because it includes timers @@-- dont use @_List_Of_PIs_@ because it includes timers
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@, @_List_Of_Sync_PIs_@;
@@ELSE@@
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@; from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@;
@@END_IF@@
@@END_IF@@ @@END_IF@@
@@IF@@ @_EXIST:List_Of_ASync_RIs_@ @@IF@@ @_EXIST:List_Of_ASync_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@; from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@;
@@END_IF@@ @@END_IF@@
connect c and r; connect c and r;
@@END_IF@@
@@IF@@ not @_Is_Type_@ @@IF@@ not @_Is_Type_@
@@IF@@ @_Instance_Of_@ = "" @@IF@@ @_Instance_Of_@ = ""
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
@@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag) @@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag)
@@IF@@ not @_Is_Timer_@ @@IF@@ not @_Is_Timer_@
@@-- Declare a signal for all PIs, including (un)protected interfaces @@-- Declare a signal for all PIs, including (un)protected interfaces
@@IF@@ @_Direction_@ = PI or @_Kind_@ = SPORADIC_OPERATION @@IF@@ @_Kind_@ = SPORADIC_OPERATION or @_Kind_@ = CYCLIC_OPERATION
@@IF@@ @_Param_Names'Length_@ > 0 @@IF@@ @_Param_Names'Length_@ > 0
/* CIF Keep Specific Geode PARAMNAMES @_Param_Names_@ */ /* CIF Keep Specific Geode PARAMNAMES @_Param_Names_@ */
signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@); signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@);
...@@ -24,10 +24,17 @@ signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@); ...@@ -24,10 +24,17 @@ signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@);
signal @_Name_@; signal @_Name_@;
@@END_IF@@ @@END_IF@@
@@ELSE@@ @@ELSE@@
@@IF@@ @_Direction_@ = RI
procedure @_Name_@; procedure @_Name_@;
@@ELSE@@
-- Synchronous PI @_Name_@
-- You must create a procedure with this name
-- and copy the signature (the FPAR section) in a text box
exported procedure @_Name_@;
@@END_IF@@
@@IF@@ @_EXIST:Param_Names_@ @@IF@@ @_EXIST:Param_Names_@
fpar fpar
@@INLINE( )(,\n )(;\n external;)@@ @@INLINE( )(,\n )(;\n)@@
@@TABLE@@ @@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN" @@IF@@ @_Param_Directions_@ = "PARAM_IN"
in @_CAPITALIZE:Param_Names_@ @_REPLACE_ALL((-)/_):Param_Types_@ in @_CAPITALIZE:Param_Names_@ @_REPLACE_ALL((-)/_):Param_Types_@
...@@ -36,8 +43,11 @@ procedure @_Name_@; ...@@ -36,8 +43,11 @@ procedure @_Name_@;
@@END_IF@@ @@END_IF@@
@@END_TABLE@@ @@END_TABLE@@
@@END_INLINE@@ @@END_INLINE@@
@@ELSE@@
external;
@@END_IF@@ @@END_IF@@
@@IF@@ @_Direction_@ = RI
external;
@@ELSE@@
referenced;
@@END_IF@@
@@END_IF@@ @@END_IF@@
@@END_IF@@ @@END_IF@@
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