Commit 30e54f28 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete support of continuous signals in buildsupport

parent e402b5aa
Pipeline #353 skipped
...@@ -57,7 +57,7 @@ int ada_gw_preamble(FV * fv) ...@@ -57,7 +57,7 @@ int ada_gw_preamble(FV * fv)
/* Check if any interface needs Asn.1 types and if so, include asn1 modules */ /* Check if any interface needs Asn.1 types and if so, include asn1 modules */
if (NULL != fv->timer_list) { if (NULL != fv->timer_list || get_context()->polyorb_hi_c) {
fprintf(ads, "with taste_basictypes;\n" fprintf(ads, "with taste_basictypes;\n"
"use taste_basictypes;\n\n"); "use taste_basictypes;\n\n");
} }
...@@ -330,6 +330,7 @@ void add_RI_to_Ada_gw(Interface * i) ...@@ -330,6 +330,7 @@ void add_RI_to_Ada_gw(Interface * i)
fprintf(ads, "\tpragma import(C, %s, \"%s_RI_%s\");\n\n", i->name, fprintf(ads, "\tpragma import(C, %s, \"%s_RI_%s\");\n\n", i->name,
i->parent_fv->name, i->name); i->parent_fv->name, i->name);
} }
/* Add timer declarations to the Ada code skeletons */ /* Add timer declarations to the Ada code skeletons */
...@@ -400,6 +401,16 @@ void GW_Ada_Backend(FV * fv) ...@@ -400,6 +401,16 @@ void GW_Ada_Backend(FV * fv)
} }
}); });
/* SDL semantics requires that the state machine checks the
* input queue of the process before executing continuous signals */
if(get_context()->polyorb_hi_c) {
fprintf(ads,
"\t-- TASTE API to check if the input queue is empty\n"
"\tprocedure check_queue(res: access asn1SccT_Boolean);\n"
"\tpragma import(C, check_queue, \"%s_RI_check_queue\");\n",
fv->name);
}
// If any timers, add declarations in code skeleton // If any timers, add declarations in code skeleton
Ada_Add_timers(fv); Ada_Add_timers(fv);
......
...@@ -869,19 +869,20 @@ void Create_Context(Context ** context) ...@@ -869,19 +869,20 @@ void Create_Context(Context ** context)
assert (NULL != *context); assert (NULL != *context);
(*context)->output = NULL; (*context)->output = NULL;
(*context)->ifview = NULL; (*context)->ifview = NULL;
(*context)->dataview = NULL; (*context)->dataview = NULL;
(*context)->gw = 0; (*context)->gw = 0;
(*context)->smp2 = false; (*context)->smp2 = false;
(*context)->glue = 0; (*context)->glue = 0;
(*context)->keep_case = 0; (*context)->keep_case = 0;
(*context)->onlycv = 0; (*context)->onlycv = 0;
(*context)->aadlv2 = 0; (*context)->aadlv2 = 0;
(*context)->test = 0; (*context)->test = 0;
(*context)->debug = 0; (*context)->debug = 0;
(*context)->polyorb_hi_c = 0; (*context)->polyorb_hi_c = 0;
(*context)->stacksize = NULL; (*context)->stacksize = NULL;
(*context)->needs_basictypes = false;
} }
// Free the memory of a Context data structure // Free the memory of a Context data structure
......
...@@ -218,6 +218,7 @@ typedef struct t_context { ...@@ -218,6 +218,7 @@ typedef struct t_context {
bool future; bool future;
char *stacksize; char *stacksize;
int polyorb_hi_c; int polyorb_hi_c;
bool needs_basictypes;
} Context; } Context;
/* /*
......
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