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
70fe7b6c
Commit
70fe7b6c
authored
Jul 11, 2019
by
Maxime Perrotin
Browse files
Add skeleton wrappers for pohic
parent
4d1f0266
Changes
28
Hide whitespace changes
Inline
Side-by-side
templates/concurrency_view/pohic_wrappers_body/README.md
0 → 100644
View file @
70fe7b6c
These templates generate the wrappers that connect Polyorb-HI-Ada with the threads generated by TASTE
templates/concurrency_view/pohic_wrappers_body/block.tmplt
0 → 100644
View file @
70fe7b6c
@@--
The
following
tags
are
available
in
this
template
:
@@--
@@--
@
_Name_
@
:
Protected
block
name
@@--
@
_Language_
@
:
Implementation
language
@@--
@
_Calling_Threads_
@
:
List
of
calling
threads
@@--
@
_Node
name_
@
:
Node
name
@@--
@
_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
templates/concurrency_view/pohic_wrappers_body/fileblock.tmplt
0 → 100644
View file @
70fe7b6c
@@-- 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/filenode.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node as defined in the Deployment View
@@-- The content of this file is generated from node.tmplt
@@-- If there is no string defined here, no file will be generated per node,
@@-- (that's an option if the intent is to generate only one file per system)
templates/concurrency_view/pohic_wrappers_body/filepart.tmplt
0 → 100644
View file @
70fe7b6c
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/pohic_wrappers_body/filesys.tmplt
0 → 100644
View file @
70fe7b6c
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
templates/concurrency_view/pohic_wrappers_body/filethread.tmplt
0 → 100644
View file @
70fe7b6c
@@-- Specify the file name for a thread
@@-- @_Thread_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
@_LOWER:Thread_Name_@_polyorb_interface.c
templates/concurrency_view/pohic_wrappers_body/node.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node from deployment view
@@-- @_Partition_Names_@ : Tag listing the partitions in this node
@@-- @_Partitions_@ : List of rendered code for partitions
@@-- @_CPU_Name_@, _Platform_@, _Classifier_@, _Ada_Runtime_@ : Info about CPU
@@-- In standard TASTE systems there is only one partition per node
templates/concurrency_view/pohic_wrappers_body/partition.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Partition name (usually the name of the binary)
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Thread_Names_@ : Tag: list of thread names
@@-- @_Node_Name_@ : Name of the node containing this partition
@@-- @_Blocks_@ : Code generated for protected functions
@@-- @_Coverage_@ : True if user requested code coverage enable
@@-- @_Package_Name_@ : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@ : CPU Name (e.g. x86_linux)
@@-- @_CPU_Platform_@ : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@ : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_Bound_Functions_@ : List of user functions from Interface view
@@-- @_Thread_Src_Name_@ : Vector tag : connection thread name (source)
@@-- @_Thread_Dst_Name_@ : Vector tag : connection thread name (dest)
@@-- @_Thread_Src_Port_@ : Vector tag : connection port name (source)
@@-- @_Thread_Dst_Port_@ : Vector tag : connection port name (dest)
templates/concurrency_view/pohic_wrappers_body/pi.tmplt
0 → 100644
View file @
70fe7b6c
@@-- 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
@@IF@@ @_Param_Names'Length_@ > 0
procedure @_CAPITALIZE:Name_@
@@INLINE( \()(;\n )(\) is\n)@@
@@TABLE'ALIGN_ON(":")@@
@_CAPITALIZE:Param_Names_@ : Interfaces.C.char_array; @_CAPITALIZE:Param_Names_@_Size : Integer
@@END_TABLE@@
@@END_INLINE@@
procedure C_@_CAPITALIZE:Name_@
@@INLINE( \()(;\n )(\)\n)@@
@@TABLE'ALIGN_ON(":")@@
@_CAPITALIZE:Param_Names_@ : Interfaces.C.char_array; @_CAPITALIZE:Param_Names_@_Size : Integer
@@END_TABLE@@
@@END_INLINE@@
with Import, Convention => C, Link_Name => "@_LOWER:Parent_Function_@_@_LOWER:Name_@";
begin
@@-- Works only for one param: for more than one param, use a table section
C_@_CAPITALIZE:Name_@ (@_CAPITALIZE:Param_Names_@, @_CAPITALIZE:Param_Names_@_Size);
end @_CAPITALIZE:Name_@;
@@ELSE@@
procedure @_CAPITALIZE:Name_@ is
procedure C_@_CAPITALIZE:Name_@
with Import, Convention => C, Link_Name => "@_LOWER:Parent_Function_@_@_LOWER:Name_@";
begin
-- PI has no parameter - could directly call user code (add _PI_ above)
C_@_CAPITALIZE:Name_@;
end @_CAPITALIZE:Name_@;
@@END_IF@@
templates/concurrency_view/pohic_wrappers_body/ri.tmplt
0 → 100644
View file @
70fe7b6c
@@-- 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
templates/concurrency_view/pohic_wrappers_body/system.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Nodes_@ : Code generated for the nodes
@@-- @_Node_Names_@ : Vector Tag of node names
@@-- @_Node_CPU_@ : |_ Corresponding CPU name (eg x86_linux)
@@-- @_Node_CPU_Classifier_@ : |_ CPU Classifier (ocarina...::x86_linux)
@@-- @_Partition_Names_@ : Vector Tag of partition names
@@-- @_Partition_Node_@ : |_ Corresponding node name
@@-- @_Partition_CPU_@ : |_ Corresponding CPU name
@@-- @_Threads_@ : Code generated for the threads
@@-- @_Thread_Names_@ : List of all threads in the complete system
@@-- @_Target_Packages_@ : List of all target package names in the complete system
@@-- And all the system configuration obtained from the command line:
@@-- Interface_View, Deployment_View, Data_View, Binary_Path, Check_Data_View,
@@-- Output_Dir, Skeletons, Glue, Use_POHIC, Timer_Resolution, Debug_Flag,
@@-- No_Stdlib_Flag, Timer_Resolution, Other_Files (list of aadl files)
templates/concurrency_view/pohic_wrappers_body/thread.tmplt
0 → 100644
View file @
70fe7b6c
@@--
The
following
tags
are
available
in
this
template
:
@@--
@@--
@
_Thread_Name_
@
:
Thread
name
@@--
@
_Entry_Port_Name_
@
:
Name
of
the
PI
@@--
@
_RCM_
@
:
One
of
"CYCLIC_OPERATION"
,
"SPORADIC_OPERATION"
@@--
@
_Need_Mutex_
@
:
True
if
the
PI
is
shared
with
others
in
the
protected
block
@@--
@
_Pro_Block_Name_
@
:
Name
of
the
protected
function
@@--
@
_Node_Name_
@
:
Name
of
the
deployment
node
@@--
@
_Remote_Threads_
@
:
Vector
tag
:
output
remote
thread
list
@@--
@
_RI_Port_Name_
@
:
|
_
Corresponding
local
RI
name
@@--
@
_Remote_PIs_
@
:
|
_
Associated
PI
Name
@@--
@
_Remote_PI_Sorts_
@
:
|
_
Optional
param
type
of
the
remote
thread
@@--
@
_Remote_PI_Modules_
@
:
|
_
Asn1
module
of
the
optional
param
type
@@--
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_
@,
_ASN1_Modules
,
_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_
@
#
if
0
@@
IF
@@
@
_Param_Names
'Length_@ > 0
with Interfaces.C;
@@END_IF@@
package body @_CAPITALIZE:Thread_Name_@_Wrappers is
@@INLINE( )()(\n)@@
@@IF@@ @_Param_Names'
Length_
@
>
0
@@
TABLE
@@
procedure
@
_CAPITALIZE
:
Entry_Port_Name_
@
(
dummy_Entity
:
Entity_Type
;
Param_Buffer
:
@
_REPLACE_ALL
((-)/
_
):
Param_Types_
@
_Buffer_Impl
)
is
@@
END_TABLE
@@
@@
ELSE
@@
procedure
@
_CAPITALIZE
:
Entry_Port_Name_
@
(
dummy_Entity
:
Entity_Type
)
is
@@
END_IF
@@
@@
END_INLINE
@@
@@
IF
@@
@
_Param_Names
'Length_@ > 0
@@TABLE@@
@_CAPITALIZE:Param_Names_@_AdaBuffer : Interfaces.C.char_array (1 .. Interfaces.C.size_t (Param_Buffer.Length)) with Import;
for @_CAPITALIZE:Param_Names_@_AdaBuffer'
Address
use
Param_Buffer
'Address;
@@END_TABLE@@
begin
@@IF@@ @_Need_Mutex_@
@_CAPITALIZE:Pro_Block_Name_@_Block.@_CAPITALIZE:Pro_Block_Name_@_Protected.@_CAPITALIZE:Entry_Port_Name_@
@@ELSE@@
@_CAPITALIZE:Pro_Block_Name_@_Block.@_CAPITALIZE:Entry_Port_Name_@
@@END_IF@@
(@_CAPITALIZE:Param_Names_@_AdaBuffer, @_CAPITALIZE:Param_Names_@_AdaBuffer'
Length
);
@@
ELSE
@@
begin
@@
IF
@@
@
_Need_Mutex_
@
@
_CAPITALIZE
:
Pro_Block_Name_
@
_Block
.@
_CAPITALIZE
:
Pro_Block_Name_
@
_Protected
.@
_CAPITALIZE
:
Entry_Port_Name_
@;
@@
ELSE
@@
@
_CAPITALIZE
:
Pro_Block_Name_
@
_Block
.@
_CAPITALIZE
:
Entry_Port_Name_
@;
@@
END_IF
@@
@@
END_IF
@@
end
@
_CAPITALIZE
:
Entry_Port_Name_
@;
--
This
is
the
list
of
remote
threads
/
RIs
:
@@
TABLE
@@
--
@
_Remote_Threads_
@.@
_Remote_PIs_
@
@@
END_TABLE
@@
end
@
_CAPITALIZE
:
Thread_Name_
@
_Wrappers
;
#
endif
templates/concurrency_view/pohic_wrappers_body/trigger.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following boolean tags are available to decide if the file
@@-- shall be generated or not:
@@-- Filename_Is_Present
@@-- Skeletons
@@-- Glue
@@-- Use_POHIC
@@-- Debug
@@-- No_Stdlib
@_Use_POHIC_@
templates/concurrency_view/pohic_wrappers_header/README.md
0 → 100644
View file @
70fe7b6c
These templates generate the wrappers that connect Polyorb-HI-C with the threads generated by TASTE
templates/concurrency_view/pohic_wrappers_header/block.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Protected block name
@@-- @_Language_@ : Implementation language
@@-- @_Calling_Threads_@ : List of calling threads
@@-- @_Node name_@ : Node name
@@-- @_Protected_PIs_@ : Protected Provided interfaces (from pi.tmplt)
@@-- @_Unprotected_PIs_@ : Unprotected Provided interfaces (from pi.tmplt)
@@-- @_Required_@ : Required interfaces (from ri.tmplt)
/* File generated by kazoo for TASTE - do not edit */
#pragma once
#include <stddef.h>
// Include PolyORB-HI-C header files:
#include "types.h"
#include "deployment.h"
#include "po_hi_transport.h"
#include "po_hi_gqueue.h"
#include "activity.h"
#include "po_hi_task.h"
#include "po_hi_protected.h"
// prototypes for the provided interfaces
@_Protected_PIs_@
@_Unprotected_PIs_@
// prototypes for the required interfaces
@_Required_@
templates/concurrency_view/pohic_wrappers_header/fileblock.tmplt
0 → 100644
View file @
70fe7b6c
@@-- 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
@_Block_Name_@_polyorb_interface.h
templates/concurrency_view/pohic_wrappers_header/filenode.tmplt
0 → 100644
View file @
70fe7b6c
@@-- The following tags are available in this template:
@@--
@@-- @_Node_Name_@ : Name of the node as defined in the Deployment View
@@-- The content of this file is generated from node.tmplt
@@-- If there is no string defined here, no file will be generated per node,
@@-- (that's an option if the intent is to generate only one file per system)
templates/concurrency_view/pohic_wrappers_header/filepart.tmplt
0 → 100644
View file @
70fe7b6c
@@-- Specify the file name for a partition
@@-- @_Partition_Name_@ is available.
@@-- Don't specify anything if you don't want the file to be created
templates/concurrency_view/pohic_wrappers_header/filesys.tmplt
0 → 100644
View file @
70fe7b6c
@@-- Specify the file name for the complete system (including nodes)
@@-- (no template tag)
Prev
1
2
Next
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