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

Complete support of continuous signals in buildsupport

parent e402b5aa
Pipeline #353 skipped
......@@ -57,7 +57,7 @@ int ada_gw_preamble(FV * fv)
/* 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"
"use taste_basictypes;\n\n");
}
......@@ -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,
i->parent_fv->name, i->name);
}
/* Add timer declarations to the Ada code skeletons */
......@@ -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
Ada_Add_timers(fv);
......
......@@ -869,19 +869,20 @@ void Create_Context(Context ** context)
assert (NULL != *context);
(*context)->output = NULL;
(*context)->ifview = NULL;
(*context)->dataview = NULL;
(*context)->gw = 0;
(*context)->smp2 = false;
(*context)->glue = 0;
(*context)->keep_case = 0;
(*context)->onlycv = 0;
(*context)->aadlv2 = 0;
(*context)->test = 0;
(*context)->debug = 0;
(*context)->polyorb_hi_c = 0;
(*context)->stacksize = NULL;
(*context)->output = NULL;
(*context)->ifview = NULL;
(*context)->dataview = NULL;
(*context)->gw = 0;
(*context)->smp2 = false;
(*context)->glue = 0;
(*context)->keep_case = 0;
(*context)->onlycv = 0;
(*context)->aadlv2 = 0;
(*context)->test = 0;
(*context)->debug = 0;
(*context)->polyorb_hi_c = 0;
(*context)->stacksize = NULL;
(*context)->needs_basictypes = false;
}
// Free the memory of a Context data structure
......
......@@ -218,6 +218,7 @@ typedef struct t_context {
bool future;
char *stacksize;
int polyorb_hi_c;
bool needs_basictypes;
} 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