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
13ef2d81
Commit
13ef2d81
authored
Jul 15, 2019
by
Maxime Perrotin
Browse files
Add call of unprotected interfaces
parent
7cd30d7d
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/taste-interface_view.adb
View file @
13ef2d81
...
...
@@ -992,7 +992,9 @@ package body TASTE.Interface_View is
Param_Directions
,
Param_Encodings
,
Property_Names
,
Property_Values
:
Vector_Tag
;
Property_Values
,
Remote_Function_Names
,
Remote_Interface_Names
:
Vector_Tag
;
begin
for
Each
of
TI
.
Params
loop
Param_Names
:=
Param_Names
&
Each
.
Name
;
...
...
@@ -1006,20 +1008,28 @@ package body TASTE.Interface_View is
Property_Names
:=
Property_Names
&
Each
.
Name
;
Property_Values
:=
Property_Values
&
Each
.
Value
;
end
loop
;
-- Add list of callers or callees
for
Each
of
TI
.
Remote_Interfaces
loop
Remote_Function_Names
:=
Remote_Function_Names
&
Each
.
Function_Name
;
Remote_Interface_Names
:=
Remote_Interface_Names
&
Each
.
Interface_Name
;
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_ASN1_Modules"
,
Param_ASN1_Modules
)
&
Assoc
(
"Param_Encodings"
,
Param_Encodings
)
&
Assoc
(
"Param_Directions"
,
Param_Directions
)
&
Assoc
(
"IF_Property_Names"
,
Property_Names
)
&
Assoc
(
"IF_Property_Values"
,
Property_Values
);
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_ASN1_Modules"
,
Param_ASN1_Modules
)
&
Assoc
(
"Param_Encodings"
,
Param_Encodings
)
&
Assoc
(
"Param_Directions"
,
Param_Directions
)
&
Assoc
(
"IF_Property_Names"
,
Property_Names
)
&
Assoc
(
"IF_Property_Values"
,
Property_Values
)
&
Assoc
(
"Remote_Function_Names"
,
Remote_Function_Names
)
&
Assoc
(
"Remote_Interface_Names"
,
Remote_Interface_Names
);
end
To_Template
;
end
TASTE
.
Interface_View
;
templates/concurrency_view/pohic_wrappers_body/block.tmplt
View file @
13ef2d81
...
...
@@ -7,19 +7,5 @@
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
#
if
0
@@
IF
@@
@
_Language_
@
=
sdl
or
@
_Language_
@
=
ada
with
@
_CAPITALIZE
:
Name_
@;
@@
END_IF
@@
package
body
@
_CAPITALIZE
:
Name_
@
_Block
is
@@
IF
@@
@
_Protected_PIs_
@
/=
""
protected
body
@
_CAPITALIZE
:
Name_
@
_Protected
is
@
_Protected_PIs
'Indent_@
end @_CAPITALIZE:Name_@_Protected;
@@END_IF@@
@_Unprotected_PIs_'
Indent_
@
end
@
_CAPITALIZE
:
Name_
@
_Block
;
#
endif
// Required interfaces of function @_Name_@
@_Required_@
templates/concurrency_view/pohic_wrappers_body/fileblock.tmplt
View file @
13ef2d81
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Block_Name_@_block.c
templates/concurrency_view/pohic_wrappers_body/partition.tmplt
View file @
13ef2d81
...
...
@@ -18,4 +18,6 @@
/* File generated by kazoo for TASTE - do not edit */
#include "@_LOWER:Name_@_polyorb_interface.h"
@_Blocks_@
@_Threads_@
templates/concurrency_view/pohic_wrappers_body/ri.tmplt
View file @
13ef2d81
@@-- 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
@@-- @_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
@@-- @_Remote_Function_Names_@ : List of callees
@@-- @_Remote_Interface_Names_@ : |_ callee's interface name
// Required interface @_Name_@ in function @_Parent_Function_@
void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\)\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
void *IN_buf_@_LOWER:Param_Names_@, size_t size_IN_buf_@_LOWER:Param_Names_@
@@ELSE@@
void *OUT_buf_@_LOWER:Param_Names_@, size_t *size_OUT_buf_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
{
@@IF@@ @_Kind_@ = SPORADIC_OPERATION
puts("Sporadic call of @_Name_@");
@@ELSIF@@ @_Kind_@ = UNPROTECTED_OPERATION
@@TABLE@@
@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
IN_buf_@_LOWER:Param_Names_@, size_IN_buf_@_LOWER:Param_Names_@
@@ELSE@@
OUT_buf_@_LOWER:Param_Names_@, size_OUT_buf_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_TABLE@@
@@ELSE@@ @@-- Protected call
puts("Protected call of @_Name_@");
@@END_IF@@
}
templates/concurrency_view/pohic_wrappers_header/fileblock.tmplt
View file @
13ef2d81
@@-- Specify the file name for a protected block
@@-- @_Block_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Block_Name_@_block.h
templates/concurrency_view/pohic_wrappers_header/ri.tmplt
View file @
13ef2d81
...
...
@@ -7,4 +7,14 @@
@@-- @_Param_Names_@ : List of parameter names
@@-- @_Param_Types_@ : |_ Corresponding parameter types
@@-- @_Param_Directions_@ : |_ Corresponding direction
void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@();
// Required interface @_Name_@ in function @_Parent_Function_@
void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
void *IN_buf_@_LOWER:Param_Names_@, size_t size_IN_buf_@_LOWER:Param_Names_@
@@ELSE@@
void *OUT_buf_@_LOWER:Param_Names_@, size_t *size_OUT_buf_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
templates/concurrency_view/pohic_wrappers_header/thread.tmplt
View file @
13ef2d81
...
...
@@ -18,7 +18,7 @@
@@-- @_IF_Property_Names_@, _Values_@ : user properties (vector tag)
@@--
@@-- Matrix of output ports: Remote thread/corresponding remote PI @_Name_@
#include "@_LOWER:Pro_Block_Name_@_block.h"
//
#include "@_LOWER:Pro_Block_Name_@_block.h"
@@INLINE()(\n)(\n)@@
@@IF@@ @_Param_Names'Length_@ > 0
...
...
templates/glue/language_wrappers/invoke_ri-body/function.tmplt
View file @
13ef2d81
...
...
@@ -37,8 +37,8 @@
#include <stdlib.h>
#ifdef __unix__
#include <stdio.h>
//
#include "PrintTypesAsASN1.h"
//
#include "timeInMS.h"
#include "PrintTypesAsASN1.h"
#include "timeInMS.h"
#endif
//#include "C_ASN1_Types.h"
...
...
templates/glue/language_wrappers/invoke_ri-body/interface.tmplt
View file @
13ef2d81
...
...
@@ -64,16 +64,41 @@ void @_LOWER:Parent_Function_@_RI_@_LOWER:Name_@(void)
}
@@END_IF@@
@@END_TABLE@@
// Call Middleware interface (TODO)
// extern void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@ ( ... )
// vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@ ( ... )
@@TABLE'TERSE@@
@@IF@@ @_Param_Directions_@ = PARAM_OUT
//
D
ecod
e
parameter @_Param_Names_@
//
Buffer for d
ecod
ing
parameter @_Param_Names_@
static char OUT_buf_@_LOWER:Param_Names_@[sizeof(asn1Scc@_REPLACE_ALL(-/_):Param_Types_@)];
size_t size_OUT_buf_@_LOWER:Param_Names_@ = 0;
@@END_IF@@
@@END_TABLE@@
// Call Middleware interface
extern void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
void *, size_t
@@ELSE@@
void *, size_t *
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
IN_buf_@_LOWER:Param_Names_@, (size_t)size_IN_buf_@_LOWER:Param_Names_@
@@ELSE@@
OUT_buf_@_LOWER:Param_Names_@, &size_OUT_buf_@_LOWER:Param_Names_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@TABLE'TERSE@@
@@IF@@ @_Param_Directions_@ = PARAM_OUT
// Decode parameter @_Param_Names_@
if (0 != Decode_@_Param_Encodings_@_@_REPLACE_ALL(-/_):Param_Types_@
(OUT_@_LOWER:Param_Names_@, OUT_buf_@_LOWER:Param_Names_@, size_OUT_buf_@_LOWER:Param_Names_@)) {
#ifdef __unix__
...
...
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