Commit 9752eae4 authored by Maxime Perrotin's avatar Maxime Perrotin

Improve gui templates

parent c4cdd89b
......@@ -122,7 +122,6 @@ project @_CAPITALIZE:Name_@ is
"spwrouter_custom_config.c",
"star_dundee_api.c",
"trace_manager.c",
"trace_manager.cc",
"um_threads.c");
......
......@@ -91,35 +91,35 @@ void @_LOWER:Name_@_startup(void)
}
char *gui_queue_name = NULL;
int len = snprintf (gui_queue_name, 0, "%d_ground_RI_queue", geteuid());
int len = snprintf (gui_queue_name, 0, "%d_@_LOWER:Name_@_RI_queue", geteuid());
gui_queue_name = (char *) malloc ((size_t) len + 1);
if (NULL != gui_queue_name) {
snprintf (gui_queue_name, len + 1, "%d_ground_RI_queue", geteuid());
snprintf (gui_queue_name, len + 1, "%d_@_LOWER:Name_@_RI_queue", geteuid());
create_exchange_queue(gui_queue_name, 5, sizeof(RI_Messages), &ground_RI_queue_id);
create_exchange_queue(gui_queue_name, 5, sizeof(RI_Messages), &@_LOWER:Name_@_RI_queue_id);
free (gui_queue_name);
gui_queue_name = NULL;
}
len = snprintf (gui_queue_name, 0, "%d_ground_PI_queue", geteuid());
len = snprintf (gui_queue_name, 0, "%d_@_LOWER:Name_@_PI_queue", geteuid());
gui_queue_name = (char *) malloc ((size_t) len + 1);
if (NULL != gui_queue_name) {
snprintf (gui_queue_name, len + 1, "%d_ground_PI_queue", geteuid());
snprintf (gui_queue_name, len + 1, "%d_@_LOWER:Name_@_PI_queue", geteuid());
create_exchange_queue(gui_queue_name, 10, sizeof(PI_Messages), &ground_PI_queue_id);
create_exchange_queue(gui_queue_name, 10, sizeof(PI_Messages), &@_LOWER:Name_@_PI_queue_id);
free (gui_queue_name);
gui_queue_name = NULL;
}
len = snprintf (gui_queue_name, 0, "%d_ground_PI_Python_queue", geteuid());
len = snprintf (gui_queue_name, 0, "%d_@_LOWER:Name_@_PI_Python_queue", geteuid());
gui_queue_name = (char *) malloc ((size_t) len + 1);
if (NULL != gui_queue_name) {
snprintf (gui_queue_name, len + 1, "%d_ground_PI_Python_queue", geteuid());
snprintf (gui_queue_name, len + 1, "%d_@_LOWER:Name_@_PI_Python_queue", geteuid());
/* Extra queue for the TM sent to the Python mappers */
create_exchange_queue(gui_queue_name, 10, sizeof (PI_Messages), &ground_PI_Python_queue_id);
create_exchange_queue(gui_queue_name, 10, sizeof (PI_Messages), &@_LOWER:Name_@_PI_Python_queue_id);
free (gui_queue_name);
gui_queue_name = NULL;
......@@ -147,7 +147,7 @@ void @_LOWER:Name_@_PI_poll(void)
(int *)&message_recieved_type)) {
switch(message_recieved_type) {
@@TABLE@@
case i_@_LOWER:List_Of_ASync_RIs_@:
case i_@_List_Of_ASync_RIs_@:
@_LOWER:Name_@_RI_@_LOWER:List_Of_ASync_RIs_@((asn1Scc@_REPLACE_ALL(-/_):ASync_RI_Param_Type_@ *)msgcontent);
break;
@@END_TABLE@@
......
......@@ -24,13 +24,13 @@ asn1Scc@_REPLACE_ALL((-)/_):Param_Types_@ *OUT_@_LOWER:Param_Names_@
(@_LOWER:Parent_Function_@_PI_queue_id,
sizeof(asn1Scc@_REPLACE_ALL(-/_):Param_Types_@),
(void*)IN_@_LOWER:Param_Names_@,
i_@_LOWER:Name_@);
i_@_Name_@);
write_message_to_queue
(@_LOWER:Parent_Function_@_PI_Python_queue_id,
sizeof(asn1Scc@_REPLACE_ALL(-/_):Param_Types_@),
(void*)IN_@_LOWER:Param_Names_@,
i_@_LOWER:Name_@);
i_@_Name_@);
@@END_TABLE@@
}
@@ELSE@@
......@@ -41,13 +41,13 @@ void @_LOWER:Parent_Function_@_PI_@_LOWER:Name_@(void)
(@_LOWER:Parent_Function_@_PI_queue_id,
0, // Message parameter size is 0 since there is no parameter
NULL, // Pointer to message content is null for the same reason
i_@_LOWER:Name_@);
i_@_Name_@);
write_message_to_queue
(@_LOWER:Parent_Function_@_PI_Python_queue_id,
0,
NULL,
i_@_LOWER:Name_@);
i_@_Name_@);
}
@@END_IF@@
@@END_IF@@
......@@ -36,7 +36,7 @@ typedef enum {
@@INLINE( )(,\n )()@@
@@TABLE@@
@@IF@@ @_LOWER:List_Of_ASync_PIs_@ /= poll
i_@_LOWER:List_Of_ASync_PIs_@
i_@_List_Of_ASync_PIs_@
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
......@@ -45,7 +45,7 @@ typedef enum {
typedef enum {
@@INLINE( )(,\n )()@@
@@TABLE@@
i_@_LOWER:List_Of_ASync_RIs_@
i_@_List_Of_ASync_RIs_@
@@END_TABLE@@
@@END_INLINE@@
} T_@_LOWER:Name_@_RI_list;
Markdown is supported
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