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
kazoo
Commits
34f48eb8
Commit
34f48eb8
authored
Jan 21, 2018
by
Maxime Perrotin
Browse files
Test header function signatures
parent
6e0db808
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/taste-backend-skeletons.adb
View file @
34f48eb8
with
Text_IO
;
use
Text_IO
;
with
Ada
.
Strings
.
Unbounded
,
Ada
.
Characters
.
Handling
;
Ada
.
Characters
.
Handling
,
Ada
.
Exceptions
;
use
Ada
.
Characters
.
Handling
;
use
Ada
.
Characters
.
Handling
,
Ada
.
Exceptions
;
-- with TASTE.Backend.Skeletons.C;
...
...
@@ -33,7 +35,8 @@ package body TASTE.Backend.Skeletons is
for
Param
of
PI
.
Params
loop
declare
P
:
constant
String
:=
Parse
(
Path
&
"header-parameter.tmplt"
,
Param
);
Parse
(
Path
&
"interface-header-parameter.tmplt"
,
Param
);
begin
Params
:=
Params
&
P
;
end
;
...
...
@@ -46,8 +49,9 @@ package body TASTE.Backend.Skeletons is
Put
(
"*** Generating "
);
Put_Line
(
Parse
(
Path
&
"body-filename.tmplt"
,
Hdr_Tmpl
));
exception
when
others
=>
when
E
:
others
=>
Put_Line
(
"no skeletons for language "
&
Language
&
" !"
);
Put_Line
(
Exception_Message
(
E
));
end
;
end
loop
;
end
Generate
;
...
...
templates/skeletons/c/interface-header-parameter.tmplt
View file @
34f48eb8
@@IF@@ @_Direction_@ = "PARAM_IN"
const
const asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@ELSE@@
asn1Scc@_REPLACE_ALL((-)/_):Type_@ *
@@END_IF@@
asn1Scc@_Type_@ *
templates/skeletons/c/interface-signature.tmplt
View file @
34f48eb8
@_LOWER:Name_@(@_Parameters_@)
@_LOWER:Name_@(@_
REPLACE_ALL((\n)/):
Parameters_@)
test/test2/InterfaceView.aadl
View file @
34f48eb8
...
...
@@ -125,6 +125,16 @@ SUBPROGRAM IMPLEMENTATION RI_RI1.others
END RI_RI1.others;
SUBPROGRAM RI_coucou
FEATURES
param1 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
param2 : IN PARAMETER DataView::MyEnum {
Taste::encoding => UPER;
};
result : OUT PARAMETER DataView::T_Int32 {
Taste::encoding => ACN;
};
END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
...
...
@@ -220,6 +230,16 @@ SUBPROGRAM IMPLEMENTATION RI_ola.others
END RI_ola.others;
SUBPROGRAM RI_coucou
FEATURES
param1 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
param2 : IN PARAMETER DataView::MyEnum {
Taste::encoding => UPER;
};
result : OUT PARAMETER DataView::T_Int32 {
Taste::encoding => ACN;
};
END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
...
...
@@ -362,6 +382,16 @@ SUBPROGRAM IMPLEMENTATION RI_ola_bis.others
END RI_ola_bis.others;
SUBPROGRAM RI_coucou
FEATURES
param1 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
param2 : IN PARAMETER DataView::MyEnum {
Taste::encoding => UPER;
};
result : OUT PARAMETER DataView::T_Int32 {
Taste::encoding => ACN;
};
END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
...
...
@@ -514,6 +544,16 @@ PROPERTIES
END PI_bonjour.others;
SUBPROGRAM PI_coucou
FEATURES
param1 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
param2 : IN PARAMETER DataView::MyEnum {
Taste::encoding => UPER;
};
result : OUT PARAMETER DataView::T_Int32 {
Taste::encoding => ACN;
};
END PI_coucou;
SUBPROGRAM IMPLEMENTATION PI_coucou.others
...
...
@@ -533,6 +573,7 @@ FEATURES
PI_coucou : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Y_Hidden::Z_Shown::PI_coucou.others {
Taste::coordinates => "102645 112510";
Taste::RCMoperationKind => unprotected;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "coucou";
};
PROPERTIES
...
...
@@ -563,6 +604,16 @@ PROPERTIES
END PI_bonjour.others;
SUBPROGRAM PI_coucou
FEATURES
param1 : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
param2 : IN PARAMETER DataView::MyEnum {
Taste::encoding => UPER;
};
result : OUT PARAMETER DataView::T_Int32 {
Taste::encoding => ACN;
};
END PI_coucou;
SUBPROGRAM IMPLEMENTATION PI_coucou.others
...
...
@@ -582,6 +633,7 @@ FEATURES
PI_coucou : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Y_Hidden::Z_Shown::PI_coucou.others {
Taste::coordinates => "109817 111577";
Taste::RCMoperationKind => unprotected;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "coucou";
};
PROPERTIES
...
...
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