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
731c3dfa
Commit
731c3dfa
authored
Apr 24, 2019
by
Maxime Perrotin
Browse files
Add tags to template documentation
parent
06506640
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/taste-interface_view.adb
View file @
731c3dfa
...
...
@@ -964,30 +964,37 @@ package body TASTE.Interface_View is
-- Create a Templates_Parser translate set for an interface (PI or RI)
function
To_Template
(
TI
:
Taste_Interface
)
return
Translate_Set
is
Result
:
Translate_Set
;
Param_Names
:
Vector_Tag
;
Param_Types
:
Vector_Tag
;
Param_Directions
:
Vector_Tag
;
Param_Encodings
:
Vector_Tag
;
Property_Names
:
Vector_Tag
;
Property_Values
:
Vector_Tag
;
begin
-- Result misses User_Properties TODO (important)
Result
:=
+
Assoc
(
"Name"
,
TI
.
Name
)
&
Assoc
(
"Kind"
,
TI
.
RCM
'
Img
)
&
Assoc
(
"Parent_Function"
,
TI
.
Parent_Function
)
&
Assoc
(
"Period"
,
TI
.
Period_Or_MIAT
'
Img
)
&
Assoc
(
"WCET"
,
TI
.
WCET_ms
.
Value_Or
(
0
)'
Img
)
&
Assoc
(
"Queue_Size"
,
TI
.
Queue_Size
.
Value_Or
(
1
)'
Img
);
for
Each
of
TI
.
Params
loop
Param_Names
:=
Param_Names
&
Each
.
Name
;
Param_Types
:=
Param_Types
&
Each
.
Sort
;
Param_Directions
:=
Param_Directions
&
Each
.
Direction
'
Img
;
Param_Encodings
:=
Param_Encodings
&
Each
.
Encoding
'
Img
;
end
loop
;
Result
:=
Result
&
Assoc
(
"Param_Names"
,
Param_Names
)
&
Assoc
(
"Param_Types"
,
Param_Types
)
&
Assoc
(
"Param_Encodings"
,
Param_Encodings
)
&
Assoc
(
"Param_Directions"
,
Param_Directions
);
return
Result
;
-- Add all function user-defined properties
for
Each
of
TI
.
User_Properties
loop
Property_Names
:=
Property_Names
&
Each
.
Name
;
Property_Values
:=
Property_Values
&
Each
.
Value
;
end
loop
;
return
+
Assoc
(
"Name"
,
TI
.
Name
)
&
Assoc
(
"Kind"
,
TI
.
RCM
'
Img
)
&
Assoc
(
"Parent_Function"
,
TI
.
Parent_Function
)
&
Assoc
(
"Period"
,
TI
.
Period_Or_MIAT
'
Img
)
&
Assoc
(
"WCET"
,
TI
.
WCET_ms
.
Value_Or
(
0
)'
Img
)
&
Assoc
(
"Queue_Size"
,
TI
.
Queue_Size
.
Value_Or
(
1
)'
Img
)
&
Assoc
(
"Param_Names"
,
Param_Names
)
&
Assoc
(
"Param_Types"
,
Param_Types
)
&
Assoc
(
"Param_Encodings"
,
Param_Encodings
)
&
Assoc
(
"Param_Directions"
,
Param_Directions
)
&
Assoc
(
"IF_Property_Names"
,
Property_Names
)
&
Assoc
(
"IF_Property_Values"
,
Property_Values
);
end
To_Template
;
end
TASTE
.
Interface_View
;
templates/concurrency_view/aadl_1_nodes/thread.tmplt
View file @
731c3dfa
...
...
@@ -7,6 +7,11 @@
@@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- Tags related to the PI that is at the origin of the thread creation:
@@-- @_Name_@, @_Kind_@, @_Parent_Function_@ : shoud be useless here
@@-- @_Param_Names_@, _Types_@, _Encodings_@, _Directions_@ : param vector tag
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : relevant here
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI
@_Thread_Name_@
templates/concurrency_view/aadl_2_threads/thread.tmplt
View file @
731c3dfa
...
...
@@ -11,6 +11,7 @@
@@--
@
_Name_
@,
@
_Kind_
@,
@
_Parent_Function_
@
:
shoud
be
useless
here
@@--
@
_Param_Names_
@,
_Types_
@,
_Encodings_
@,
_Directions_
@
:
param
vector
tag
@@--
@
_Period_
@,
@
_WCET_
@,
@
_Queue_Size_
@
:
relevant
here
@@--
@
_IF_Property_Names_
@,
_Values_
@
:
user
properties
(
vector
tag
)
@@--
@@--
Matrix
of
output
ports
:
Remote
thread
/
corresponding
remote
PI
@
_Name_
@
package
@
_Thread_Name_
@
_Thread
...
...
templates/concurrency_view/ada_basic_body/thread.tmplt
View file @
731c3dfa
...
...
@@ -7,6 +7,11 @@
@@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- Tags related to the PI that is at the origin of the thread creation:
@@-- @_Name_@, @_Kind_@, @_Parent_Function_@ : shoud be useless here
@@-- @_Param_Names_@, _Types_@, _Encodings_@, _Directions_@ : param vector tag
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : relevant here
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI
task @_CAPITALIZE:Thread_Name_@ is
...
...
templates/concurrency_view/ada_basic_source/thread.tmplt
View file @
731c3dfa
...
...
@@ -7,6 +7,11 @@
@@-- @_Node_Name_@ : Name of the deployment node
@@-- @_Remote_Threads_@ : Vector tag: output remote thread list
@@-- @_Remote_PIs_@ : |_ Associated PI Name
@@-- Tags related to the PI that is at the origin of the thread creation:
@@-- @_Name_@, @_Kind_@, @_Parent_Function_@ : shoud be useless here
@@-- @_Param_Names_@, _Types_@, _Encodings_@, _Directions_@ : param vector tag
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : relevant here
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI
@@IF@@ @_RCM_@ = "CYCLIC_OPERATION"
...
...
templates/skeletons/c-body/interface.tmplt
View file @
731c3dfa
...
...
@@ -7,6 +7,9 @@
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
@@-- @_Param_Encodings_@ : |_ Corresponding ASN.1 encoding
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : Properties of the interface
@@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag)
@@IF@@ @_EXIST:Param_Names_@
void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@
@@INLINE( \()(,\n )(\)\n)@@
...
...
templates/skeletons/c-header/interface.tmplt
View file @
731c3dfa
...
...
@@ -7,6 +7,9 @@
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
@@-- @_Param_Encodings_@ : |_ Corresponding ASN.1 encoding
@@-- @_Period_@, @_WCET_@, @_Queue_Size_@ : Properties of the interface
@@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag)
@@INLINE@@
@@IF@@ @_Direction_@ = "PI"
void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@(
...
...
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