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

Add templates for SDL (incomplete)

parent 033f49ae
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Language_@ : The implementation language
@@-- @_List_Of_PIs_@ : List of all Provided Interfaces (just names)
@@-- @_List_Of_RIs_@ : List of all Required Interfaces (just names)
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_Timers_@ : List of timers (just names)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
@@-- @_Provided_Interfaces_@ : List of Provided interfaces with parameters
@@-- @_Required_Interfaces_@ : List of Required interfaces with parameters
@@-- @_Property_Names_@ : List of User-defined properties (names)
@@-- @_Property_Values_@ : List of User-defined properties (values)
@@-- @_Is_Type_@ : Flag, True if function is a component type
@@-- @_Instance_Of_@ : Optional name of component type
/* Body file for function @_Name_@
* Generated by TASTE on @_NOW_@
* You can edit this file, it will not be overwritten
* Provided interfaces : @_List_Of_PIs_@
* Required interfaces : @_List_Of_RIs_@
* User-defined properties for this function:
@@TABLE@@
* |_ @_Property_Names_@ = @_Property_Values_@
@@END_TABLE@@
* Timers : @_Timers_@
*/
#include "@_LOWER:Name_@.h"
@@IF@@ @_Has_Context_@
/* Include Context Parameters (constants defined in the Interface View) */
#include "Context-@_REPLACE((_)/-):LOWER:Name_@.h"
@@END_IF@@
void @_LOWER:Name_@_startup()
{
// Write your initialisation code, but DO NOT CALL REQUIRED INTERFACES
// puts ("[@_Name_@] Startup");
}
@@TABLE@@
void @_LOWER:Name_@_PI_@_Provided_Interfaces_@
{
// Write your code here
}
@@END_TABLE@@
@@TABLE@@
void @_LOWER:Name_@_PI_@_Timers_@()
{
// This function is called when the timer expires
}
@@END_TABLE@@
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Language_@ : The implementation language
@@-- @_List_Of_PIs_@ : List of all Provided Interfaces (just names)
@@-- @_List_Of_RIs_@ : List of all Required Interfaces (just names)
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_Timers_@ : List of timers (just names)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
@@-- @_Provided_Interfaces_@ : From template: Provided interfaces with params
@@-- @_Required_Interfaces_@ : From template: Required interfaces with params
@@-- @_Property_Names_@ : List of User-defined properties (names)
@@-- @_Property_Values_@ : List of User-defined properties (values)
@@-- @_Is_Type_@ : Flag, True if function is a component type
@@-- @_Instance_Of_@ : Optional name of component type
-- Header file for function @_Name_@ in @_Language_@ language
-- Component type : @_Is_Type_@
-- Instance of : @_Instance_Of_@
-- Generated by TASTE on @_NOW_@
-- Context Parameters present : @_YES_NO:Has_Context_@
-- Provided interfaces : @_List_Of_PIs_@
-- Required interfaces : @_List_Of_RIs_@
-- User-defined properties for this function:
@@TABLE@@
-- * @_Property_Names_@ = @_Property_Values_@
@@END_TABLE@@
-- DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
/* CIF Keep Specific Geode ASNFilname 'dataview-uniq.asn' */
use Datamodel;
system @_CAPITALIZE:Name_@;
-- Add the sporadic and then synchronous interfaces.
channel c
@@IF@@ @_List_Of_PIs_@
from env to @_CAPITALIZE:Name_@ with @_List_Of_PIs_@;
@@END_IF@@
@@IF@@ @_List_Of_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_RIs_@;
@@END_IF@@
endchannel;
block @_CAPITALIZE:Name_@;
signalroute r
@@IF@@ @_List_Of_PIs_@
from env to @_CAPITALIZE:Name_@ with @_List_Of_PIs_@;
@@END_IF@@
@@IF@@ @_List_Of_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_RIs_@;
@@END_IF@@
connect c and r;
@@IF@@ not @_Is_Type_@
@@IF@@ @_Instance_Of_@ = ""
process @_CAPITALIZE:Name_@ referenced;
@@ELSE@@
process @_CAPITALIZE:Name_@ : @_CAPITALIZE:Instance_Of_@;
@@END_IF@@
@@ELSE@@
process @_CAPITALIZE:Name_@ : @_CAPITALIZE:Name_@;
@@END_IF@@
endblock;
endsystem;
@@IF@@ @_Direction_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Type_@ *IN_@_LOWER:Name_@
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Type_@ *OUT_@_LOWER:Name_@
@@END_IF@@
@@IF@@ @_Direction_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@END_IF@@
@_LOWER:Name_@(@_REPLACE_ALL((\n)/):Parameters_@)
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