Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
b26b4708
Commit
b26b4708
authored
Jan 31, 2013
by
yoogx
Browse files
* Import a first example of C++ integration
parent
cc7121d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
b26b4708
...
...
@@ -182,6 +182,7 @@ AC_OUTPUT([
examples/aadlv1/rma/Makefile
examples/aadlv1/sunseeker/Makefile
examples/aadlv2/Makefile
examples/aadlv2/cpp/Makefile
examples/aadlv2/d3.1.3-1/Makefile
examples/aadlv2/import/Makefile
examples/aadlv2/ping/Makefile
...
...
examples/aadlv2/Makefile.am
View file @
b26b4708
SUBDIRS
=
d3.1.3-1 ping rma sunseeker producer-consumer some-types
\
some-types-stdint flight-mgmt import monitor packet-store file-store lua
some-types-stdint flight-mgmt import monitor packet-store
\
file-store lua cpp
SAMPLE_DIR
=
${
shell
$(CYGPATH_U)
'
$(OCARINA_PREFIX)
/examples/ocarina/polyorb-hi-c/aadlv2'
}
...
...
examples/aadlv2/cpp/Makefile.am
0 → 100644
View file @
b26b4708
C_FILES
=
$(srcdir)
/hello.cc
AADL_FILES
=
$(srcdir)
/cpp_test.aadl
SCENARIO_FILES
=
$(srcdir)
/scenario.aadl
include
$(srcdir)/../../Makefile.common
EXTRA_DIST
=
$(AADL_FILES)
$(SCENARIO_FILES)
$(C_FILES)
CLEANDIRS
=
cpp_test_impl
examples/aadlv2/cpp/cpp_test.aadl
0 → 100644
View file @
b26b4708
package
CPP_Test
public
with
Deployment
;
-----------------
--
Subprograms
--
-----------------
subprogram
Hello_Spg_1
properties
source_language
=>
(
CPP
);
source_name
=>
"hello_world"
;
source_text
=>
(
"hello.cc"
);
end
Hello_Spg_1
;
-------------
--
Threads
--
-------------
thread
Task
end
Task
;
thread
implementation
Task
.
impl_1
calls
Mycalls
:
{
P_Spg
:
subprogram
Hello_Spg_1
;
};
properties
Dispatch_Protocol
=>
periodic
;
Period
=>
1000
ms
;
end
Task
.
impl_1
;
---------------
--
Processor
--
---------------
processor
cpurm
properties
Deployment
::
Execution_Platform
=>
Native
;
end
cpurm
;
processor
implementation
cpurm
.
impl
properties
Scheduling_Protocol
=>
(
Posix_1003_Highest_Priority_First_Protocol
);
end
cpurm
.
impl
;
---------------
--
Processes
--
---------------
process
node_a
end
node_a
;
process
implementation
node_a
.
impl
subcomponents
Task1
:
thread
Task
.
impl_1
;
end
node_a
.
impl
;
------------
--
System
--
------------
system
cpp_test
end
cpp_test
;
system
implementation
cpp_test
.
impl
subcomponents
node_a
:
process
node_a
.
impl
;
cpu_rm
:
processor
cpurm
.
impl
;
properties
Actual_Processor_Binding
=>
(
reference
(
cpu_rm
))
applies
to
node_a
;
end
cpp_test
.
impl
;
end
CPP_Test
;
examples/aadlv2/cpp/hello.cc
0 → 100644
View file @
b26b4708
#ifdef __cplusplus
extern
"C"
{
void
hello_world
(
void
);
}
#endif
#include
<iostream>
void
hello_world
(
void
)
{
std
::
cout
<<
"Hello, new world!
\n
"
;
}
examples/aadlv2/cpp/scenario.aadl
0 → 100644
View file @
b26b4708
system cpp
properties
Ocarina_Config::AADL_Files =>
("cpp_test.aadl");
Ocarina_Config::Generator => polyorb_hi_c;
Ocarina_Config::Needed_Property_Sets =>
(value (Ocarina_Config::Data_Model),
value (Ocarina_Config::Deployment),
value (Ocarina_Config::Cheddar_Properties));
Ocarina_Config::AADL_Version => AADLv2;
end cpp;
system implementation cpp.Impl
end cpp.Impl;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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