Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
buildsupport
Commits
3685658d
Commit
3685658d
authored
Aug 31, 2016
by
Maxime Perrotin
Browse files
Add VDM to mini-CV
parent
f0053de7
Changes
1
Show whitespace changes
Inline
Side-by-side
c/concurrency_view.c
View file @
3685658d
/* Buildsupport is (c) 2008-201
5
European Space Agency
/* Buildsupport is (c) 2008-201
6
European Space Agency
* contact: maxime.perrotin@esa.int
* License is LGPL, check LICENSE file */
/*
...
...
@@ -20,7 +20,7 @@ Copyright 2014-2015 IB Krates <info@krates.ee>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
// Works with GCC under Windows (not tested with cl.exe)
#include <sys/stat.h>
#include "my_types.h"
#include "practical_functions.h"
...
...
@@ -29,6 +29,7 @@ Copyright 2014-2015 IB Krates <info@krates.ee>
(simulink==i->parent_fv->language)?"Simulink":\
(qgenc==i->parent_fv->language)?"QGenC":\
(ada==i->parent_fv->language)?"Ada":\
(vdm==i->parent_fv->language)?"Vdm":\
(qgenada==i->parent_fv->language)?"QGenAda":\
(rtds==i->parent_fv->language)?"RTDS":\
(scade==i->parent_fv->language)?"SCADE6":\
...
...
@@ -61,8 +62,6 @@ void Init_MiniCV_Backend(FV * fv)
/* Add a new AADL SUBPROGRAM to the Concurrency view*/
void
Add_Subprogram
(
Interface
*
i
)
{
Parameter_list
*
tmp
;
if
(
NULL
==
cv
)
return
;
...
...
@@ -72,50 +71,35 @@ void Add_Subprogram(Interface * i)
if
(
NULL
!=
i
->
in
||
NULL
!=
i
->
out
)
{
fprintf
(
cv
,
"FEATURES
\n
"
);
tmp
=
i
->
in
;
while
(
NULL
!=
tmp
)
{
FOREACH
(
param
,
Parameter
,
i
->
in
,
{
fprintf
(
cv
,
"
\t
%s:%s PARAMETER DataView::%s {encoding=>%s;};
\n
"
,
tmp
->
value
->
name
,
(
PI
==
i
->
direction
)
?
"IN"
:
"OUT"
,
(
tmp
->
value
->
type
),
BINARY_ENCODING
(
tmp
->
value
));
/* (native == tmp->value->encoding) ? "Native" : (uper ==
tmp->
value->
encoding)
? "UPER" : (NULL != i->out) ? "Native" : "UPER"); */
tmp
=
tmp
->
next
;
}
param
->
name
,
(
PI
==
i
->
direction
)
?
"IN"
:
"OUT"
,
param
->
type
,
BINARY_ENCODING
(
param
));
});
tmp
=
i
->
out
;
while
(
NULL
!=
tmp
)
{
FOREACH
(
param
,
Parameter
,
i
->
out
,
{
fprintf
(
cv
,
"
\t
%s:%s PARAMETER DataView::%s {encoding=>%s;};
\n
"
,
tmp
->
value
->
name
,
(
PI
==
i
->
direction
)
?
"OUT"
:
"IN"
,
(
tmp
->
value
->
type
),
BINARY_ENCODING
(
tmp
->
value
));
/* (native == tmp->value->encoding) ? "Native" : (uper ==
tmp->
value->
encoding)
? "UPER" : "Native");*/
tmp
=
tmp
->
next
;
}
param
->
name
,
(
PI
==
i
->
direction
)
?
"OUT"
:
"IN"
,
param
->
type
,
BINARY_ENCODING
(
param
));
});
}
fprintf
(
cv
,
"END %s;
\n\n
"
,
i
->
name
);
fprintf
(
cv
,
"SUBPROGRAM IMPLEMENTATION %s.%s
\n
PROPERTIES
\n
"
,
i
->
name
,
ENCODING
(
i
)
);
i
->
name
,
ENCODING
(
i
));
fprintf
(
cv
,
"
\t
FV_Name =>
\"
%s
\"
;
\n
"
,
i
->
parent_fv
->
name
);
fprintf
(
cv
,
"
\t
Source_Language => %s;
\n
END %s.%s;
\n\n
"
,
ENCODING
(
i
),
i
->
name
,
ENCODING
(
i
)
);
ENCODING
(
i
),
i
->
name
,
ENCODING
(
i
));
}
/* Close the Concurrency view */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment