Commit 05eff342 authored by Maxime Perrotin's avatar Maxime Perrotin

More vdm support

parent 2590d82c
Pipeline #1175 skipped
......@@ -93,12 +93,18 @@ void add_pi_to_vdm_gw(Interface * i)
char *sep = " * ";
bool comma = false;
char *params = " (";
char *sep2 = ", ";
FOREACH (p, Parameter, i->in, {
char *sort = make_string("%s%s`%s",
comma? sep: "",
p->asn1_module,
p->type);
params = make_string("%s%s%s",
params,
comma? sep2: "",
p->name);
fprintf(interface, "%s", sort);
if(NULL != user_code) {
fprintf(user_code, "%s",sort);
......@@ -107,6 +113,8 @@ void add_pi_to_vdm_gw(Interface * i)
comma = true;
});
params = make_string("%s)", params);
if (NULL != i->out) {
char *out = make_string(" ==> %s`%s",
i->out->value->asn1_module,
......@@ -125,12 +133,16 @@ void add_pi_to_vdm_gw(Interface * i)
NULL != i->in? " (-)" : "");
if (NULL != user_code)
fprintf(user_code,
"\n"
"%s == -- Write your code here\n\n",
"%s%s == -- Write your code here\n\n",
NULL != i->in? params: "",
i->name);
free(signature);
free(sep2);
free(params);
free(sep);
}
......
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