Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kazoo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
kazoo
Commits
ca620c5b
Commit
ca620c5b
authored
Aug 26, 2019
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and improve templates
parent
2167e8a4
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
23 deletions
+39
-23
templates/concurrency_view/pohic_wrappers_body/ri.tmplt
templates/concurrency_view/pohic_wrappers_body/ri.tmplt
+5
-1
templates/skeletons/blackbox-c-header/interface.tmplt
templates/skeletons/blackbox-c-header/interface.tmplt
+8
-0
templates/skeletons/context_parameters.tmplt
templates/skeletons/context_parameters.tmplt
+6
-6
templates/skeletons/gui-body/function.tmplt
templates/skeletons/gui-body/function.tmplt
+6
-6
templates/skeletons/gui-enum-defs/function-filename.tmplt
templates/skeletons/gui-enum-defs/function-filename.tmplt
+2
-1
templates/skeletons/gui-enum-defs/function.tmplt
templates/skeletons/gui-enum-defs/function.tmplt
+2
-2
templates/skeletons/gui-runtime-header/function.tmplt
templates/skeletons/gui-runtime-header/function.tmplt
+5
-5
templates/skeletons/makefile.tmplt
templates/skeletons/makefile.tmplt
+5
-2
No files found.
templates/concurrency_view/pohic_wrappers_body/ri.tmplt
View file @
ca620c5b
...
...
@@ -56,7 +56,11 @@ size_IN_buf_@_LOWER:Param_Names_@;
@@END_TABLE@@
// calling threads: @_Calling_Threads_@ partition: @_Partition_Name_@
@@ELSIF@@ @_Kind_@ = UNPROTECTED_OPERATION
// Unprotected call
@@TABLE@@
@@IF@@ not @_EXIST:Param_Names_@
@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@();
@@ELSE@@
@_LOWER:Remote_Function_Names_@_@_LOWER:Remote_Interface_Names_@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
...
...
@@ -67,7 +71,7 @@ size_IN_buf_@_LOWER:Param_Names_@;
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@END_IF@@
@@END_TABLE@@
@@ELSE@@ @@-- Protected call
// puts("[TASTE] Protected call of @_Name_@");
...
...
templates/skeletons/blackbox-c-header/interface.tmplt
View file @
ca620c5b
...
...
@@ -10,10 +10,18 @@
@@-- @_Param_Directions_@ : |_ Corresponding direction
@@-- @_Param_Encodings_@ : |_ Corresponding encoding (Default, Native, UPER, ACN)
@@IF@@ @_Direction_@ = "PI"
@@IF@@ @_Param_Names'Length_@ = 0
void @_LOWER:Parent_Function_@_@_LOWER:Name_@(void);
@@ELSE@@
void @_LOWER:Parent_Function_@_@_LOWER:Name_@
@@END_IF@@
@@ELSE@@
@@IF@@ @_Param_Names'Length_@ = 0
extern void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@(void);
@@ELSE@@
extern void vm_@_LOWER:Parent_Function_@_@_LOWER:Name_@
@@END_IF@@
@@END_IF@@
@@INLINE( \()(,\n )(\);\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
...
...
templates/skeletons/context_parameters.tmplt
View file @
ca620c5b
...
...
@@ -8,29 +8,29 @@
@@-- @_CP_Sort_@ : ... corresponding ASN.1 type
@@-- @_CP_ASN1_Module_@ : ... in ASN.1 module
@@-- @_CP_Value_@ : ... with default value
Context-@_REPLACE
((_)
/-):LOWER:Name_@ DEFINITIONS ::=
Context-@_REPLACE
_ALL(_
/-):LOWER:Name_@ DEFINITIONS ::=
BEGIN
IMPORTS
@@INLINE( )(\n )(;\n)@@
@@TABLE@@
@_
Sort_Set_@ FROM @_
Module_Set_@
@_
REPLACE_ALL(_/-):Sort_Set_@ FROM @_REPLACE_ALL(_/-):
Module_Set_@
@@END_TABLE@@
@@END_INLINE@@
-- Group all context parameters of this function in a record
Context-@_REPLACE
((_)
/-):LOWER:Name_@ ::= SEQUENCE {
Context-@_REPLACE
_ALL(_
/-):LOWER:Name_@ ::= SEQUENCE {
@@INLINE( )(,\n )(\n)@@
@@TABLE@@
@_REPLACE
((_)/-):LOWER:CP_Name_@ @_
CP_Sort_@
@_REPLACE
_ALL((_)/-):LOWER:CP_Name_@ @_REPLACE_ALL(_/-):
CP_Sort_@
@@END_TABLE@@
@@END_INLINE@@
}
-- Declare a constant with the values set by the user in the interface view
@_REPLACE
((_)/-):LOWER:Name_@-ctxt Context-@_REPLACE((_)
/-):LOWER:Name_@ ::= {
@_REPLACE
_ALL(_/-):LOWER:Name_@-ctxt Context-@_REPLACE_ALL(_
/-):LOWER:Name_@ ::= {
@@INLINE( )(,\n )(\n)@@
@@TABLE@@
@_REPLACE
((_)
/-):LOWER:CP_Name_@ @_CP_Value_@
@_REPLACE
_ALL(_
/-):LOWER:CP_Name_@ @_CP_Value_@
@@END_TABLE@@
@@END_INLINE@@
}
...
...
templates/skeletons/gui-body/function.tmplt
View file @
ca620c5b
...
...
@@ -36,10 +36,10 @@
#include "queue_manager.h"
#include "@_LOWER:Name_@.h"
#include "@_
LOWER:
Name_@_enums_def.h"
#include "@_Name_@_enums_def.h"
typedef struct _PI_Messages {
T_@_
LOWER:
Name_@_PI_list msg_id;
T_@_Name_@_PI_list msg_id;
union {
@@TABLE@@
@@IF@@ @_ASync_PI_Param_Type_@ /= ""
...
...
@@ -50,7 +50,7 @@ typedef struct _PI_Messages {
} PI_Messages;
typedef struct _RI_Messages {
T_@_
LOWER:
Name_@_RI_list msg_id;
T_@_Name_@_RI_list msg_id;
union {
@@TABLE@@
@@IF@@ @_ASync_RI_Param_Type_@ /= ""
...
...
@@ -132,7 +132,7 @@ void @_LOWER:Name_@_PI_poll(void)
struct mq_attr msgq_attr;
char* msgcontent = NULL;
T_@_
LOWER:Name_@_RI_list message_recie
ved_type;
T_@_
Name_@_RI_list message_recei
ved_type;
if ((msgcontent = (char*)malloc(sizeof(RI_Messages))) == NULL) {
perror("Error when allocating memory in GUI polling function");
...
...
@@ -144,8 +144,8 @@ void @_LOWER:Name_@_PI_poll(void)
while (!retrieve_message_from_queue(@_LOWER:Name_@_RI_queue_id,
sizeof(RI_Messages),
msgcontent,
(int *)&message_rec
ie
ved_type)) {
switch(message_rec
ie
ved_type) {
(int *)&message_rec
ei
ved_type)) {
switch(message_rec
ei
ved_type) {
@@TABLE@@
case i_@_List_Of_ASync_RIs_@:
@_LOWER:Name_@_RI_@_LOWER:List_Of_ASync_RIs_@((asn1Scc@_REPLACE_ALL(-/_):ASync_RI_Param_Type_@ *)msgcontent);
...
...
templates/skeletons/gui-enum-defs/function-filename.tmplt
View file @
ca620c5b
...
...
@@ -3,4 +3,5 @@
@@-- @_Name_@ : The name of the function
@@-- @_Is_Type_@ : True if function type
@@-- @_Instance_Of_@ : Name of instance or empty string
@_LOWER:Name_@_enums_def.h
@@-- Don't use LOWER because the enums_def.h is also included by DMT's gui_api.c
@_Name_@_enums_def.h
templates/skeletons/gui-enum-defs/function.tmplt
View file @
ca620c5b
...
...
@@ -40,7 +40,7 @@ typedef enum {
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
} T_@_
LOWER:
Name_@_PI_list;
} T_@_Name_@_PI_list;
typedef enum {
@@INLINE( )(,\n )()@@
...
...
@@ -48,4 +48,4 @@ typedef enum {
i_@_List_Of_ASync_RIs_@
@@END_TABLE@@
@@END_INLINE@@
} T_@_
LOWER:
Name_@_RI_list;
} T_@_Name_@_RI_list;
templates/skeletons/gui-runtime-header/function.tmplt
View file @
ca620c5b
...
...
@@ -85,18 +85,18 @@ int create_exchange_queue(char* queue_name,
// queue_id : [in] Handle to the queue adressed as returned by
// max_message_length : [in] Maximum size of an element to be stored in the queue
// (functional data plus discriminant) in bytes
// message_data_rec
ie
ved: [out] Pointer on the functional data retrieved in the queue
// message_data_rec
ei
ved: [out] Pointer on the functional data retrieved in the queue
// Note that this buffer only contains the functional part
// of the message and not the first field allowing to identify
// the message type.
// message_rec
ieved_type: [out] Identifier of the type of message recie
ved.
// message_rec
eived_type: [out] Identifier of the type of message recei
ved.
//
// Returns : 0 on success, -1 otherwise
//
int retrieve_message_from_queue(mqd_t queue_id,
long max_message_length,
void* message_data_rec
ie
ved,
int* message_rec
ie
ved_type);
void* message_data_rec
ei
ved,
int* message_rec
ei
ved_type);
//
//This function writes a single message from a queue create_exchange_queue
...
...
@@ -107,7 +107,7 @@ int retrieve_message_from_queue(mqd_t queue_id,
// Note that this buffer only contains the functional part
// of the message and not the first field allowing to identify
// the message type.
// message_rec
ie
ved_type: [in] Identifier of the type of message to be sent
// message_rec
ei
ved_type: [in] Identifier of the type of message to be sent
//
// Returns : 0 on success, -1 otherwise
//
...
...
templates/skeletons/makefile.tmplt
View file @
ca620c5b
...
...
@@ -125,8 +125,11 @@ dataview/Python/built: dataview/C/built
cp
dataview/C/timeInMS.[ch] dataview/C/debug_messages.c @_LOWER:Function_Names_@/GUI/wrappers/python
cd
@_LOWER:Function_Names_@/GUI/wrappers/python
&&
\
gcc
-g
-fPIC
-c
`
python-config
--cflags
`
gui_api.c ../../src/queue_manager.c timeInMS.c debug_messages.c
-I
.
-I
../../src
&&
\
gcc
-g
-shared
-o
PythonAccess.so gui_api.o queue_manager.o timeInMS.o debug_messages.o
`
python-config
--ldflags
`
-lrt
&&
mv
*
..
&&
cd
..
&&
rmdir
python
mkdir
-p
binaries/@_LOWER:Function_Names_@_GUI
&&
cp
-f
@_LOWER:Function_Names_@/GUI/wrappers/
*
binaries/@_LOWER:Function_Names_@_GUI
gcc
-g
-shared
-o
PythonAccess.so gui_api.o queue_manager.o timeInMS.o debug_messages.o
`
python-config
--ldflags
`
-lrt
mkdir
-p
binaries/@_LOWER:Function_Names_@_GUI
cp
-f
@_LOWER:Function_Names_@/GUI/wrappers/python/
*
binaries/@_LOWER:Function_Names_@_GUI
cp
-f
@_LOWER:Function_Names_@/GUI/wrappers/
*
.py binaries/@_LOWER:Function_Names_@_GUI
cp
-f
@_LOWER:Function_Names_@/GUI/wrappers/
*
.ui binaries/@_LOWER:Function_Names_@_GUI
@@END_IF@@
@@END_TABLE@@
touch
$@
...
...
Write
Preview
Markdown
is supported
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