Commit ca21d4e7 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Update queue_manager

parent 4710ca45
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Is_Type_@ : True if function type
@@-- @_Instance_Of_@ : Name of instance or empty string
queue_manager.c queue_manager.c
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Language_@ : The implementation language
@@-- @_List_Of_PIs_@ : List of all Provided Interfaces (just names)
@@-- @_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
@@-- @_List_Of_ASync_PIs@ : List of asynchronous Provided Interfaces
@@-- @_List_Of_ASync_RIs@ : List of asynchronous Required Interfaces
@@-- @_ASN1_Modules_@ : List of ASN.1 Modules names
@@-- @_ASN1_Files_@ : List of ASN.1 Files with path
@@-- @_Timers_@ : List of timers (just names)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
@@-- @_CP_Names_@ : List of Context Parameter names
@@-- @_CP_Types_@ : List of Context Parameter types
@@-- @_Provided_Interfaces_@ : From template: Provided interfaces with params
@@-- @_Required_Interfaces_@ : From template: Required interfaces with params
@@-- @_Property_Names_@ : List of User-defined properties (names)
@@-- @_Property_Values_@ : List of User-defined properties (values)
@@-- @_Is_Type_@ : Flag, True if function is a component type
@@-- @_Instance_Of_@ : Optional name of component type
/* Written by Cyril Colombo, 2006, updated later by other TASTE contributors */ /* Written by Cyril Colombo, 2006, updated later by other TASTE contributors */
#include <stdio.h> #include <stdio.h>
...@@ -59,6 +37,8 @@ typedef struct tagQinfo { ...@@ -59,6 +37,8 @@ typedef struct tagQinfo {
Qinfo qinfo[MAX_POSSIBLE_QUEUES]; Qinfo qinfo[MAX_POSSIBLE_QUEUES];
int qinfoIdx = 0; int qinfoIdx = 0;
int isApythonQ(mqd_t q);
int isApythonQ(mqd_t q) int isApythonQ(mqd_t q)
{ {
int i=0; int i=0;
...@@ -69,6 +49,8 @@ int isApythonQ(mqd_t q) ...@@ -69,6 +49,8 @@ int isApythonQ(mqd_t q)
return 0; return 0;
} }
char *nameOfQ(mqd_t q);
char *nameOfQ(mqd_t q) char *nameOfQ(mqd_t q)
{ {
int i; int i;
...@@ -93,6 +75,7 @@ typedef struct ...@@ -93,6 +75,7 @@ typedef struct
// Internal functions definition // Internal functions definition
// //
void build_full_queue_name(char* queue_name, char* full_queue_name);
void build_full_queue_name(char* queue_name, void build_full_queue_name(char* queue_name,
char* full_queue_name) char* full_queue_name)
{ {
...@@ -109,6 +92,8 @@ void build_full_queue_name(char* queue_name, ...@@ -109,6 +92,8 @@ void build_full_queue_name(char* queue_name,
// External functions definition // External functions definition
// //
void checkMQsize(void);
void checkMQsize(void) void checkMQsize(void)
{ {
static char tmp[1024]; static char tmp[1024];
...@@ -354,6 +339,8 @@ int write_message_to_queue(mqd_t queue_id, long message_data_length, void* messa ...@@ -354,6 +339,8 @@ int write_message_to_queue(mqd_t queue_id, long message_data_length, void* messa
return(0); return(0);
} }
int common(char* queue_name, mqd_t* queue_id, int forWrite);
int common(char* queue_name, mqd_t* queue_id, int forWrite) int common(char* queue_name, mqd_t* queue_id, int forWrite)
{ {
checkMQsize(); checkMQsize();
......
@@-- 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
@@-- This template must return either TRUE or something else (meaning FALSE) @@IF@@ @_Language_@ = GUI
@@-- It is used to determine if the other templates in this folder will be
@@-- processed or ignored.
@@-- One folder can contain two templates: one for a function, and one for
@@-- a corresponding makefile (or build script)
@@-- The name of the function is read from template "function-filename.tmplt"
@@-- The name of the makefile is read from template "makefile-filename.tmplt"
@@-- These files are optional, if absent no error is raised
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : The name of the function
@@-- @_Is_Type_@ : True if function type
@@-- @_Instance_Of_@ : Name of instance or empty string
@@-- @_Language_@ : Implementation language for the function
@@-- @_Filename_Is_Present_@ : True if target function output already exists
@@-- @_Makefile_Is_Present_@ : True if target build script already exists
@@-- @_C_Middleware_@ : True if middleware is in C (e.g. PO-HI-C)
@@IF@@ @_Language_@ = "GUI"
TRUE TRUE
@@END_IF@@ @@END_IF@@
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment