Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
kazoo
Commits
c8875f2d
Commit
c8875f2d
authored
Feb 23, 2018
by
Maxime Perrotin
Browse files
Add templates for SDL (incomplete)
parent
033f49ae
Changes
7
Hide whitespace changes
Inline
Side-by-side
templates/skeletons/sdl/body-filename.tmplt
0 → 100644
View file @
c8875f2d
@_LOWER:Name_@.pr
templates/skeletons/sdl/body.tmplt
0 → 100644
View file @
c8875f2d
@@-- 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@@
templates/skeletons/sdl/header-filename.tmplt
0 → 100644
View file @
c8875f2d
system_structure.pr
templates/skeletons/sdl/header.tmplt
0 → 100644
View file @
c8875f2d
@@-- 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;
templates/skeletons/sdl/interface-body-parameter.tmplt
0 → 100644
View file @
c8875f2d
@@IF@@ @_Direction_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Type_@ *IN_@_LOWER:Name_@
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Type_@ *OUT_@_LOWER:Name_@
@@END_IF@@
templates/skeletons/sdl/interface-header-parameter.tmplt
0 → 100644
View file @
c8875f2d
@@IF@@ @_Direction_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@END_IF@@
templates/skeletons/sdl/interface-signature.tmplt
0 → 100644
View file @
c8875f2d
@_LOWER:Name_@(@_REPLACE_ALL((\n)/):Parameters_@)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment