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

Improve templates

parent a6af024b
......@@ -40,10 +40,8 @@ void @_LOWER:Name_@_startup()
}
@@TABLE@@
void @_LOWER:Name_@_PI_@_Provided_Interfaces_@
{
// Write your code here
}
@_Provided_Interfaces_@
@@END_TABLE@@
@@TABLE@@
......
......@@ -37,12 +37,14 @@ extern "C" {
void @_LOWER:Name_@_startup();
/* Provided interfaces */
@@TABLE@@
void @_LOWER:Name_@_PI_@_Provided_Interfaces_@;
@_Provided_Interfaces_@
@@END_TABLE@@
/* Required interfaces */
@@TABLE@@
extern void @_LOWER:Name_@_RI_@_Required_Interfaces_@;
@_Required_Interfaces_@
@@END_TABLE@@
@@TABLE@@
......
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
@_LOWER:Name_@(
@@INLINE@@
@@IF@@ @_EXIST:Param_Names_@
void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@
@@INLINE( \()(,\n )(\)\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *IN_@_LOWER:Param_Names_@
......@@ -16,4 +18,9 @@ asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *OUT_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
)
@@ELSE@@
void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@()
@@END_IF@@
{
// Write your code here
}
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the interface
@@-- @_Direction_@ : "PI" or "RI"
@@-- @_Kind_@ : The RCM Kind
@@-- @_Parent_Function_@ : The name of the function
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
@_LOWER:Name_@(
@@INLINE@@
@@IF@@ @_Direction_@ = "PI"
void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@(
@@ELSE@@
extern void @_LOWER:Parent_Function_@_RI_@_LOWER:Name_@(
@@END_IF@@
@@INLINE(, )@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
const asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
)
);
@@END_INLINE@@
......@@ -2,7 +2,7 @@ AADL_PARSER=../../aadl_parser
all: test-parse
test-parse:
test-parse: clean
$(AADL_PARSER) --gw \
-o output \
--glue \
......@@ -15,6 +15,6 @@ test-parse:
../common/TASTE_DV_Properties.aadl
clean:
rm -rf obj $(exec) *~
rm -rf output
.PHONY: clean test-parse
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