Commit d2da7b33 authored by jhugues's avatar jhugues

* Add example for C++

git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@6261 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 49831f1d
C_FILES= $(srcdir)/ping.ads $(srcdir)/ping.adb $(srcdir)/import.c $(srcdir)/devicesconf.c
C_FILES= $(srcdir)/ping.ads \
$(srcdir)/ping.adb $(srcdir)/import.c \
$(srcdir)/devicesconf.c \
$(srcdir)/import_cpp.cpp
AADL_FILES = $(srcdir)/ping.aadl $(srcdir)/software.aadl
SCENARIO_FILE=
SCENARIO_FILE=$(srcdir)/scenario.aadl
include $(srcdir)/../../Makefile.common
......
#include <iostream>
using namespace std;
void hello (void)
{
cout << "Hello World!";
}
......@@ -31,6 +31,13 @@ properties
source_text => ("ping.adb");
end Do_Ping_Spg;
subprogram Hello
properties
source_language => CPP;
source_name => "hello";
source_text => ("import_cpp.cpp");
end Hello;
subprogram Ping_Spg
features
Data_Sink : in parameter Simple_Type;
......@@ -40,6 +47,21 @@ properties
source_text => ("import.c");
end Ping_Spg;
subprogram Ping_Wrapper
features
Data_Sink : in parameter Simple_Type;
end Ping_Wrapper;
subprogram implementation Ping_Wrapper.Impl
calls
Mycalls: {
CPP_Spg : subprogram Hello;
P_Spg : subprogram Ping_Spg;
};
connections
parameter Data_Sink -> P_Spg.Data_Sink;
end Ping_Wrapper.Impl;
-------------
-- Threads --
-------------
......@@ -50,7 +72,7 @@ features
end P;
thread implementation P.Impl
calls
calls
Mycall : {
P_Spg : subprogram Do_Ping_Spg;
};
......@@ -70,9 +92,9 @@ features
end Q;
thread implementation Q.Impl
calls
calls
Mycall : {
Q_Spg : subprogram Ping_Spg;
Q_Spg : subprogram Ping_Wrapper;
};
connections
parameter Data_Sink -> Q_Spg.Data_Sink;
......
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