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
241f85f2
Commit
241f85f2
authored
Jun 03, 2018
by
Maxime Perrotin
Browse files
Add list of RI's parent function to template
parent
3953a1b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/taste-backend-code_generators.adb
View file @
241f85f2
...
...
@@ -436,13 +436,15 @@ package body TASTE.Backend.Code_Generators is
List_Of_RIs
:
Tag
;
List_Of_Sync_PIs
:
Tag
;
List_Of_ASync_PIs
:
Tag
;
List_Of_Sync_RIs
:
Tag
;
List_Of_ASync_RIs
:
Tag
;
List_Of_Sync_RIs
:
Vector_Tag
;
Sync_RIs_Parent
:
Vector_Tag
;
-- Parent function of the sync RI
List_Of_ASync_RIs
:
Vector_Tag
;
Async_RIs_Parent
:
Vector_Tag
;
-- Parent function of the async RI
Timers
:
Tag
;
Property_Names
:
Vector_Tag
;
Property_Values
:
Vector_Tag
;
CP_Names
:
Vector_Tag
;
-- For Context Parameters
CP_Types
:
Vector_Tag
;
-- For Context Parameters
CP_Names
:
Vector_Tag
;
--
For Context Parameters
CP_Types
:
Vector_Tag
;
--
For Context Parameters
Interface_Tmplt
:
Interface_As_Template
;
begin
Result
.
Header
:=
+
Assoc
(
"Name"
,
F
.
Name
)
...
...
@@ -480,8 +482,13 @@ package body TASTE.Backend.Code_Generators is
case
Each
.
RCM
is
when
Cyclic_Operation
|
Sporadic_Operation
=>
List_Of_ASync_RIs
:=
List_Of_ASync_RIs
&
Each
.
Name
;
-- Find remote function name (only one remote per RI)
Async_RIs_Parent
:=
Async_RIs_Parent
&
Each
.
Remote_Interfaces
.
First_Element
.
Function_Name
;
when
others
=>
List_Of_Sync_RIs
:=
List_Of_Sync_RIs
&
Each
.
Name
;
List_Of_Sync_RIs
:=
List_Of_Sync_RIs
&
Each
.
Name
;
Sync_RIs_Parent
:=
Sync_RIs_Parent
&
Each
.
Remote_Interfaces
.
First_Element
.
Function_Name
;
end
case
;
end
loop
;
...
...
@@ -502,8 +509,10 @@ package body TASTE.Backend.Code_Generators is
&
Assoc
(
"List_Of_RIs"
,
List_Of_RIs
)
&
Assoc
(
"List_Of_Sync_PIs"
,
List_Of_Sync_PIs
)
&
Assoc
(
"List_Of_Sync_RIs"
,
List_Of_Sync_RIs
)
&
Assoc
(
"Sync_RIs_Parent"
,
Sync_RIs_Parent
)
&
Assoc
(
"List_Of_ASync_PIs"
,
List_Of_ASync_PIs
)
&
Assoc
(
"List_Of_ASync_RIs"
,
List_Of_ASync_RIs
)
&
Assoc
(
"Async_RIs_Parent"
,
Async_RIs_Parent
)
&
Assoc
(
"Property_Names"
,
Property_Names
)
&
Assoc
(
"Property_Values"
,
Property_Values
)
&
Assoc
(
"CP_Names"
,
CP_Names
)
...
...
src/taste-backend.ads
View file @
241f85f2
...
...
@@ -30,6 +30,7 @@ package TASTE.Backend is
when
Language_System_C
=>
"System_C"
,
-- Not supported
when
Language_VDM
=>
"VDM"
,
-- Partial support
when
Language_VHDL
=>
"VHDL"
,
when
Language_VHDL_BRAVE
=>
"VHDL_BRAVE"
,
when
Language_MicroPython
=>
"MicroPython"
,
when
Language_None
=>
"None"
);
end
TASTE
.
Backend
;
templates/glue/language_wrappers/vm_if-body/function.tmplt
View file @
241f85f2
...
...
@@ -6,8 +6,10 @@
@@-- @_List_Of_RIs_@ : List of all Required Interfaces (just names)
@@-- @_List_Of_Sync_PIs@ : List of synchronous Provided Interfaces
@@-- @_List_Of_Sync_RIs@ : List of synchronous Required Interfaces
@@-- @_Sync_RIs_Parent@ : ... and corresponding Parent function name
@@-- @_List_Of_ASync_PIs@ : List of asynchronous Provided Interfaces
@@-- @_List_Of_ASync_RIs@ : List of asynchronous Required Interfaces
@@-- @_Async_RIs_Parent@ : ... and corresponding Parent function name
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_ASN1_Files_@ : List of ASN.1 Files with path
@@-- @_Timers_@ : List of timers (just names)
...
...
@@ -46,9 +48,11 @@ void init_@_LOWER:Name_@()
@_LOWER:Name_@_startup();
@@END_IF@@
// Now we must iterate over all synchronous RIs, and call their parent's
// init function. Multiple calls are prevented by the "init" guard
// TODO, we miss a tag giving the parent function of Sync RI
// Iterate over all synchronous RIs, and call their parent's
// init function. Multiple calls are prevented by the "init" guard.
@@TABLE@@
init_@_LOWER:Sync_RIs_Parent_@();
@@END_TABLE@@
}
}
...
...
templates/glue/language_wrappers/vm_if-header/function.tmplt
View file @
241f85f2
...
...
@@ -6,8 +6,10 @@
@@-- @_List_Of_RIs_@ : List of all Required Interfaces (just names)
@@-- @_List_Of_Sync_PIs@ : List of synchronous Provided Interfaces
@@-- @_List_Of_Sync_RIs@ : List of synchronous Required Interfaces
@@-- @_Sync_RIs_Parent@ : ... and corresponding Parent function name
@@-- @_List_Of_ASync_PIs@ : List of asynchronous Provided Interfaces
@@-- @_List_Of_ASync_RIs@ : List of asynchronous Required Interfaces
@@-- @_Async_RIs_Parent@ : ... and corresponding Parent function name
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_ASN1_Files_@ : List of ASN.1 Files with path
@@-- @_Timers_@ : List of timers (just names)
...
...
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