Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2017-08-31 06:02:25 -0400
committerJuergen Haug2017-08-31 06:44:54 -0400
commit0b73aabf556d52108cc50facb810359ac6c019a1 (patch)
treee0558fad4f3b31027d08ba016ab493218da86597
parent461bdb1cc551a154fd97ef68367edddb8b0d5379 (diff)
downloadorg.eclipse.etrice-0b73aabf556d52108cc50facb810359ac6c019a1.tar.gz
org.eclipse.etrice-0b73aabf556d52108cc50facb810359ac6c019a1.tar.xz
org.eclipse.etrice-0b73aabf556d52108cc50facb810359ac6c019a1.zip
update of launch configs
-rw-r--r--examples/org.eclipse.etrice.examples.c/model/Features/gen_features.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.c/model/TrafficLight_step1/gen_TrafficLight_step1.launch2
-rw-r--r--examples/org.eclipse.etrice.examples.c/model/TrafficLight_step2/gen_TrafficLight_step2.launch2
-rw-r--r--examples/org.eclipse.etrice.examples.c/model/TrafficLight_step3/gen_TrafficLight_step3.launch2
-rw-r--r--examples/org.eclipse.etrice.examples.c/model/TrafficLight_step4/gen_TrafficLight_step4.launch2
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors1/gen_DynAct1.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors2/gen_DynAct2.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors3/gen_DynAct3.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors4/gen_DynAct4.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors5/gen_DynAct5.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors6/gen_DynAct6.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors7/gen_DynAct7.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors8/gen_DynAct8.launch1
-rw-r--r--examples/org.eclipse.etrice.examples.java/model/dynamicactors9/gen_DynAct9.launch1
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch1
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/gen_MSCgen.launch1
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/gen_MassiveMultiThreading.launch1
-rw-r--r--examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch1
-rw-r--r--examples/org.eclipse.etrice.generator.cpp.reference/generate_Reference.launch4
-rw-r--r--examples/org.eclipse.etrice.template.c/generate_Template.launch1
-rw-r--r--examples/org.eclipse.etrice.template.cpp/generate_Template.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/generate_HelloWorldC.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/PingPong/generate_PingPongC.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/generate_HelloWorldCpp.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.cpp/model/PingPong/generate_PingPongCpp.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.java.aspecttrace/gen_PingPongJava_aspecttrace.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.java/model/HelloWorld/generate_HelloWorldJava.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.java/model/PingPong/generate_PingPongJava.launch1
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/gen_trafficlight.example.launch1
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java2
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend5
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java10
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zipbin104131 -> 104212 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zipbin210088 -> 210217 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zipbin194420 -> 99520 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zipbin15875 -> 33905 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zipbin47905 -> 69198 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zipbin200344 -> 200515 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zipbin87358 -> 84023 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zipbin70307 -> 70329 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zipbin12275 -> 12289 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zipbin14006 -> 14017 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zipbin20906 -> 20931 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zipbin22173 -> 22199 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zipbin17881 -> 17906 bytes
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/.cproject12
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/.gitignore5
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_behavior.jpgbin22267 -> 0 bytes
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_structure.jpgbin15075 -> 0 bytes
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/images/dot2jpg.bat0
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/readme.txt4
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp.tex91
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpClient.tex76
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpServer.tex76
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpControl.tex13
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpPayload.tex35
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpControl.tex24
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpPayload.tex18
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.pdfbin116055 -> 0 bytes
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.tex85
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/ATimingService.tex97
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/PTimer.tex22
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.pdfbin45320 -> 0 bytes
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.tex80
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/gen_modellib_c.launch12
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.c82
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.h62
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt_Utils.h30
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.c355
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.h77
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient_Utils.h45
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.c352
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.h77
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer_Utils.h45
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.c21
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.h30
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl_Utils.h24
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.c41
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.h36
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload_Utils.h29
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.c173
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.h67
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl_Utils.h19
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.c92
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.h55
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload_Utils.h19
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.c406
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.h89
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService_Utils.h47
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.c141
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.h76
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer_Utils.h25
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.c119
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.h58
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl_Utils.h19
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.c220
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.h65
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor_Utils.h42
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/.cproject9
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/.gitignore4
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/gen_modellib.launch2
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.cpp399
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.h176
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.cpp226
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.h145
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/.gitignore2
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/gen_modellib.launch1
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/model/diagrams/room.basic.etunit.TestCaseActor.behavior284
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/ALogService.java307
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/InternalLogData.java71
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/Log.java217
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpClient.java383
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpServer.java421
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpControl.java61
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpPayload.java78
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpControl.java202
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpPayload.java183
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/ATimingService.java289
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/PTimer.java361
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/TimerData.java60
121 files changed, 6689 insertions, 941 deletions
diff --git a/examples/org.eclipse.etrice.examples.c/model/Features/gen_features.launch b/examples/org.eclipse.etrice.examples.c/model/Features/gen_features.launch
index 36c8f4bd0..9cd81a8b7 100644
--- a/examples/org.eclipse.etrice.examples.c/model/Features/gen_features.launch
+++ b/examples/org.eclipse.etrice.examples.c/model/Features/gen_features.launch
@@ -5,6 +5,7 @@
<booleanAttribute key="UseTranslation" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/Features/Features.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/Features/Multiplicity.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step1/gen_TrafficLight_step1.launch b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step1/gen_TrafficLight_step1.launch
index 1b2ca1c71..4ca4ef19d 100644
--- a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step1/gen_TrafficLight_step1.launch
+++ b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step1/gen_TrafficLight_step1.launch
@@ -5,6 +5,8 @@
<booleanAttribute key="UseTranslation" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step1/TrafficLight_step1.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step1/TrafficLight_step1.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight/TrafficLight.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step2/gen_TrafficLight_step2.launch b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step2/gen_TrafficLight_step2.launch
index 05c407b63..006e9d955 100644
--- a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step2/gen_TrafficLight_step2.launch
+++ b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step2/gen_TrafficLight_step2.launch
@@ -5,6 +5,8 @@
<booleanAttribute key="UseTranslation" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step2/TrafficLight_step2.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step2/TrafficLight_step2.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight/TrafficLight.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step3/gen_TrafficLight_step3.launch b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step3/gen_TrafficLight_step3.launch
index 5d124d6d9..101900702 100644
--- a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step3/gen_TrafficLight_step3.launch
+++ b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step3/gen_TrafficLight_step3.launch
@@ -5,6 +5,8 @@
<booleanAttribute key="UseTranslation" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step3/TrafficLight_step3.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step3/TrafficLight_step3.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight/TrafficLight.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step4/gen_TrafficLight_step4.launch b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step4/gen_TrafficLight_step4.launch
index bee104e09..9af8355ea 100644
--- a/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step4/gen_TrafficLight_step4.launch
+++ b/examples/org.eclipse.etrice.examples.c/model/TrafficLight_step4/gen_TrafficLight_step4.launch
@@ -5,6 +5,8 @@
<booleanAttribute key="UseTranslation" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step4/TrafficLight_step4.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight_step4/TrafficLight_step4.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.c/model/TrafficLight/TrafficLight.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors1/gen_DynAct1.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors1/gen_DynAct1.launch
index 1d81912cd..d927b8481 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors1/gen_DynAct1.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors1/gen_DynAct1.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="false"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors1/DynAct1.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors1/DynAct1.etmap}"/>
</listAttribute>
<booleanAttribute key="Persist" value="false"/>
<booleanAttribute key="SaveGenModel" value="true"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors2/gen_DynAct2.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors2/gen_DynAct2.launch
index 34afbb795..913571009 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors2/gen_DynAct2.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors2/gen_DynAct2.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="false"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors2/DynAct2.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors2/DynAct2.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors3/gen_DynAct3.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors3/gen_DynAct3.launch
index 6874f24ff..5ae340ad2 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors3/gen_DynAct3.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors3/gen_DynAct3.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors3/DynAct3.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors3/DynAct3.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors4/gen_DynAct4.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors4/gen_DynAct4.launch
index 2304f3a8e..a2485b748 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors4/gen_DynAct4.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors4/gen_DynAct4.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors4/DynAct4.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors4/DynAct4.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors5/gen_DynAct5.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors5/gen_DynAct5.launch
index f8da46431..827396475 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors5/gen_DynAct5.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors5/gen_DynAct5.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors5/DynAct5.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors5/DynAct5.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors6/gen_DynAct6.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors6/gen_DynAct6.launch
index 3ed6d29b0..afb596e14 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors6/gen_DynAct6.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors6/gen_DynAct6.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors6/DynAct6.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors6/DynAct6.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors7/gen_DynAct7.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors7/gen_DynAct7.launch
index fbdd8cb17..ea45899e9 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors7/gen_DynAct7.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors7/gen_DynAct7.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors7/DynAct7.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors7/DynAct7.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors8/gen_DynAct8.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors8/gen_DynAct8.launch
index 517e19057..51e91ccd8 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors8/gen_DynAct8.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors8/gen_DynAct8.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors8/DynAct8.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors8/DynAct8.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.examples.java/model/dynamicactors9/gen_DynAct9.launch b/examples/org.eclipse.etrice.examples.java/model/dynamicactors9/gen_DynAct9.launch
index 9e00f6932..10729e976 100644
--- a/examples/org.eclipse.etrice.examples.java/model/dynamicactors9/gen_DynAct9.launch
+++ b/examples/org.eclipse.etrice.examples.java/model/dynamicactors9/gen_DynAct9.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors9/DynAct9.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.examples.java/model/dynamicactors9/DynAct9.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="Persist" value="false"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch b/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch
index 65974de59..3018c9137 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch
+++ b/examples/org.eclipse.etrice.generator.c.reference/Henrik-Test.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="false"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/gen_MSCgen.launch b/examples/org.eclipse.etrice.generator.c.reference/gen_MSCgen.launch
index e703e2791..e4d8bf4b8 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/gen_MSCgen.launch
+++ b/examples/org.eclipse.etrice.generator.c.reference/gen_MSCgen.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="false"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/MSCgen/MSCgen.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/MSCgen/MSCgen.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/gen_MassiveMultiThreading.launch b/examples/org.eclipse.etrice.generator.c.reference/gen_MassiveMultiThreading.launch
index b63f63cf4..eb99b2595 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/gen_MassiveMultiThreading.launch
+++ b/examples/org.eclipse.etrice.generator.c.reference/gen_MassiveMultiThreading.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/MassiveMultiThreading.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/MassiveMultiThreading.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
index fcd4535e1..5576bd023 100644
--- a/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
+++ b/examples/org.eclipse.etrice.generator.c.reference/gen_cGenRef.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.c.reference/model/cGenRef.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.generator.cpp.reference/generate_Reference.launch b/examples/org.eclipse.etrice.generator.cpp.reference/generate_Reference.launch
index cb341528c..19f3d8ac3 100644
--- a/examples/org.eclipse.etrice.generator.cpp.reference/generate_Reference.launch
+++ b/examples/org.eclipse.etrice.generator.cpp.reference/generate_Reference.launch
@@ -9,6 +9,10 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.cpp.reference/model/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.cpp.reference/model/ReferenceCPP_Main.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.cpp.reference/model/ReferenceCPP_ActorClasses.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.cpp.reference/model/ReferenceCPP_DataClasses.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.generator.cpp.reference/model/ReferenceCPP_ProtocolClasses.etmap}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/examples/org.eclipse.etrice.template.c/generate_Template.launch b/examples/org.eclipse.etrice.template.c/generate_Template.launch
index 8530db744..5cdd89122 100644
--- a/examples/org.eclipse.etrice.template.c/generate_Template.launch
+++ b/examples/org.eclipse.etrice.template.c/generate_Template.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.template.c/model/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.template.c/model/TemplateModel.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/examples/org.eclipse.etrice.template.cpp/generate_Template.launch b/examples/org.eclipse.etrice.template.cpp/generate_Template.launch
index 970394f6a..37298c3e5 100644
--- a/examples/org.eclipse.etrice.template.cpp/generate_Template.launch
+++ b/examples/org.eclipse.etrice.template.cpp/generate_Template.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.template.cpp/model/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.template.cpp/model/TemplateModel.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/generate_HelloWorldC.launch b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/generate_HelloWorldC.launch
index ebdecdb97..4b58f1402 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/generate_HelloWorldC.launch
+++ b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/generate_HelloWorldC.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/HelloWorld/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.c/model/PingPong/generate_PingPongC.launch b/examples/org.eclipse.etrice.tutorials.c/model/PingPong/generate_PingPongC.launch
index 0a1337a4a..d8d44b4e8 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/PingPong/generate_PingPongC.launch
+++ b/examples/org.eclipse.etrice.tutorials.c/model/PingPong/generate_PingPongC.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/PingPong/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/PingPong/PingPong.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/generate_HelloWorldCpp.launch b/examples/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/generate_HelloWorldCpp.launch
index fbb1ccdb4..6680599b9 100644
--- a/examples/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/generate_HelloWorldCpp.launch
+++ b/examples/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/generate_HelloWorldCpp.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.cpp/model/HelloWorld/HelloWorld.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.cpp/model/PingPong/generate_PingPongCpp.launch b/examples/org.eclipse.etrice.tutorials.cpp/model/PingPong/generate_PingPongCpp.launch
index 702765a93..a6ad5f145 100644
--- a/examples/org.eclipse.etrice.tutorials.cpp/model/PingPong/generate_PingPongCpp.launch
+++ b/examples/org.eclipse.etrice.tutorials.cpp/model/PingPong/generate_PingPongCpp.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.cpp/model/PingPong/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.cpp/model/PingPong/PingPong.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.java.aspecttrace/gen_PingPongJava_aspecttrace.launch b/examples/org.eclipse.etrice.tutorials.java.aspecttrace/gen_PingPongJava_aspecttrace.launch
index 0e3efd8b2..6c8f70932 100644
--- a/examples/org.eclipse.etrice.tutorials.java.aspecttrace/gen_PingPongJava_aspecttrace.launch
+++ b/examples/org.eclipse.etrice.tutorials.java.aspecttrace/gen_PingPongJava_aspecttrace.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java.aspecttrace/model/PingPong/PingPong.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java.aspecttrace/model/PingPong/PingPong.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.java/model/HelloWorld/generate_HelloWorldJava.launch b/examples/org.eclipse.etrice.tutorials.java/model/HelloWorld/generate_HelloWorldJava.launch
index eaffe38f3..66e66dd58 100644
--- a/examples/org.eclipse.etrice.tutorials.java/model/HelloWorld/generate_HelloWorldJava.launch
+++ b/examples/org.eclipse.etrice.tutorials.java/model/HelloWorld/generate_HelloWorldJava.launch
@@ -10,6 +10,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java/model/HelloWorld/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java/model/HelloWorld/HelloWorld.room}"/>
</listAttribute>
<booleanAttribute key="Persist" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.java/model/PingPong/generate_PingPongJava.launch b/examples/org.eclipse.etrice.tutorials.java/model/PingPong/generate_PingPongJava.launch
index 64f3ae681..c30de87a6 100644
--- a/examples/org.eclipse.etrice.tutorials.java/model/PingPong/generate_PingPongJava.launch
+++ b/examples/org.eclipse.etrice.tutorials.java/model/PingPong/generate_PingPongJava.launch
@@ -9,6 +9,7 @@
<booleanAttribute key="DataLogging" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java/model/PingPong/Mapping.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.java/model/PingPong/PingPong.room}"/>
</listAttribute>
<booleanAttribute key="SaveGenModel" value="false"/>
<booleanAttribute key="Verbose" value="false"/>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/gen_trafficlight.example.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/gen_trafficlight.example.launch
index 76b6b7c38..833bda462 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/gen_trafficlight.example.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/gen_trafficlight.example.launch
@@ -8,6 +8,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.etmap}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.room}"/>
<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.simulators.trafficlight.example/model/trafficlight.example.config}"/>
</listAttribute>
<booleanAttribute key="Persist" value="false"/>
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
index 526d1eaa1..c44c949e6 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/EmptyProjectWizard.java
@@ -164,7 +164,7 @@ public class EmptyProjectWizard extends Wizard implements INewWizard {
ProjectCreator.createBuildProperties(projectURI.appendSegment("build.properties"), modelName);
ProjectCreator.createLaunchGeneratorConfig(projectURI.appendSegment("generate_Template.launch"),
- "java", "/" + projectName + "/model", "Mapping", AbstractGenerator.DEFAULT_MAIN_NAME, additionalLaunchConfigLines);
+ "java", "/" + projectName + "/model", AbstractGenerator.DEFAULT_MAIN_NAME, additionalLaunchConfigLines);
ProjectCreator.createLaunchJavaApplicationConfig(projectURI.appendSegment("run_Template.launch"),
projectName, MODEL_NAME, "Node_node_subSystemRefRunner");
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
index 401975de3..8ce45091c 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectCreator.java
@@ -364,8 +364,8 @@ public class ProjectCreator {
}
public static void createLaunchGeneratorConfig(URI uri,
- String targetLanguage, String modelPath, String baseName, String mainMethodName, String[] addLines) {
- writeFile(uri, ProjectFileFragments.getGeneratorLaunchConfig(targetLanguage, modelPath, baseName, mainMethodName, addLines));
+ String targetLanguage, String modelPath, String mainMethodName, String[] addLines) {
+ writeFile(uri, ProjectFileFragments.getGeneratorLaunchConfig(targetLanguage, modelPath, mainMethodName, addLines));
}
public static void createLaunchJavaApplicationConfig(URI uri,
@@ -385,7 +385,7 @@ public class ProjectCreator {
ProjectCreator.createLaunchGeneratorConfig(
URI.createPlatformResourceURI("/" + project.getName()
+ "/gen_" + baseName + ".launch", true), "java",
- mdlPath, baseName, mainMethodName, additionalLaunchConfigLines);
+ mdlPath, mainMethodName, additionalLaunchConfigLines);
ProjectCreator.createLaunchJavaApplicationConfig(
URI.createPlatformResourceURI("/" + project.getName()
+ "/run_" + baseName + ".launch", true),
@@ -401,7 +401,7 @@ public class ProjectCreator {
ProjectCreator.createLaunchGeneratorConfig(
URI.createPlatformResourceURI("/" + project.getName()
+ "/gen_" + baseName + ".launch", true), language,
- mdlPath, baseName, mainMethodName, additionalLaunchConfigLines);
+ mdlPath, mainMethodName, additionalLaunchConfigLines);
ProjectCreator.createLaunchCApplicationConfig(
URI.createPlatformResourceURI("/" + project.getName()
+ "/run_" + baseName + ".launch", true),
diff --git a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
index e698f80b6..2320db262 100644
--- a/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
+++ b/plugins/org.eclipse.etrice.generator.ui/src/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.xtend
@@ -85,7 +85,7 @@ class ProjectFileFragments {
'''
}
- def static String getGeneratorLaunchConfig(String targetLanguage, String modelPath, String baseName, String mainMethodName, String[] addLines) {
+ def static String getGeneratorLaunchConfig(String targetLanguage, String modelPath, String mainMethodName, String[] addLines) {
val prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.generator.ui");
val useTranslation = prefStore.getBoolean(PreferenceConstants::GEN_USE_TRANSLATION)
'''
@@ -96,7 +96,8 @@ class ProjectFileFragments {
<booleanAttribute key="UseTranslation" value="«useTranslation»"/>
<stringAttribute key="MainMethodName" value="«mainMethodName»"/>
<listAttribute key="ModelFiles">
- <listEntry value="${workspace_loc:«modelPath»/«baseName».etmap}"/>
+ <listEntry value="${workspace_loc:«modelPath»/Mapping.etmap}"/>
+ <listEntry value="${workspace_loc:«modelPath»/TemplateModel.room}"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
diff --git a/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java b/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
index f1fe99688..3dabced7b 100644
--- a/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
+++ b/plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java
@@ -180,7 +180,7 @@ public class ProjectFileFragments {
return _builder.toString();
}
- public static String getGeneratorLaunchConfig(final String targetLanguage, final String modelPath, final String baseName, final String mainMethodName, final String[] addLines) {
+ public static String getGeneratorLaunchConfig(final String targetLanguage, final String modelPath, final String mainMethodName, final String[] addLines) {
String _xblockexpression = null;
{
final ScopedPreferenceStore prefStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.etrice.generator.ui");
@@ -208,9 +208,11 @@ public class ProjectFileFragments {
_builder.newLine();
_builder.append("<listEntry value=\"${workspace_loc:");
_builder.append(modelPath, "");
- _builder.append("/");
- _builder.append(baseName, "");
- _builder.append(".etmap}\"/>");
+ _builder.append("/Mapping.etmap}\"/>");
+ _builder.newLineIfNotEmpty();
+ _builder.append("<listEntry value=\"${workspace_loc:");
+ _builder.append(modelPath, "");
+ _builder.append("/TemplateModel.room}\"/>");
_builder.newLineIfNotEmpty();
_builder.append("</listAttribute>");
_builder.newLine();
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
index 3ecace8a9..8ff624aa9 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zip
index acc143640..4ff8baf37 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
index 01b556e8a..14f2417cf 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zip
index cd2962219..f54c3fe49 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
index 5df63c0f7..609bff7a1 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
index 1914fe307..35c8763c9 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zip
index 32cf6d8f7..374f8defd 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
index db59e9965..135792e1e 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
index 24536ada3..b2c3bd678 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zip
index 79db259db..eafc5f815 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
index 56e9239e0..1c423fe04 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zip
index bad2140fb..008390a21 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zip
Binary files differ
diff --git a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
index a86dfd48d..75b568abf 100644
--- a/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
+++ b/plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zip
Binary files differ
diff --git a/runtime/org.eclipse.etrice.modellib.c/.cproject b/runtime/org.eclipse.etrice.modellib.c/.cproject
index 45eb63297..7392f8315 100644
--- a/runtime/org.eclipse.etrice.modellib.c/.cproject
+++ b/runtime/org.eclipse.etrice.modellib.c/.cproject
@@ -12,9 +12,9 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -86,11 +86,11 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -162,11 +162,11 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -238,9 +238,9 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -302,9 +302,6 @@
<configuration configurationName="ExternalMakefile">
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.modellib.c"/>
</configuration>
- <configuration configurationName="MinGWDebug">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.modellib.c"/>
- </configuration>
<configuration configurationName="PosixDebug">
<resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.modellib.c"/>
</configuration>
@@ -336,4 +333,5 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
diff --git a/runtime/org.eclipse.etrice.modellib.c/.gitignore b/runtime/org.eclipse.etrice.modellib.c/.gitignore
index c572611b1..b8cb068ff 100644
--- a/runtime/org.eclipse.etrice.modellib.c/.gitignore
+++ b/runtime/org.eclipse.etrice.modellib.c/.gitignore
@@ -2,8 +2,6 @@ WindowsMinGW
LinuxPosix
WindowsMinGW_ST
-src-gen/*
-!src-gen/readme.txt
src-gen-info/*
!src-gen-info/readme.txt
@@ -11,5 +9,4 @@ src-gen-info/*
*.lof
*.gz
*.toc
-*.log
-/MinGWDebug/
+*.log \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_behavior.jpg b/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_behavior.jpg
deleted file mode 100644
index 5599e352e..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_behavior.jpg
+++ /dev/null
Binary files differ
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_structure.jpg b/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_structure.jpg
deleted file mode 100644
index d2ea00fa1..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/ATimingService_structure.jpg
+++ /dev/null
Binary files differ
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/dot2jpg.bat b/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/dot2jpg.bat
deleted file mode 100644
index e69de29bb..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/images/dot2jpg.bat
+++ /dev/null
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/readme.txt b/runtime/org.eclipse.etrice.modellib.c/doc-gen/readme.txt
deleted file mode 100644
index 1dc2b35ab..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/readme.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This directory is an eTrice code generation target.
-It will be erased every time the generator is executed.
-
-DO NOT PLACE OTHER FILES HERE!
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp.tex
deleted file mode 100644
index ad3903f17..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp.tex
+++ /dev/null
@@ -1,91 +0,0 @@
-\documentclass[titlepage]{article}
-\usepackage{import}
-\usepackage{graphicx}
-\usepackage{xr}
-\usepackage{hyperref}
-\IfFileExists{../doc/userinputs.tex}{\subimport{../doc/}{userinputs.tex}}{} %hook for conditional user-specific inputs, includes, macros, ...
-\usepackage[a4paper,text={160mm,255mm},centering,headsep=5mm,footskip=10mm]{geometry}
-\usepackage{nonfloat}
-\parindent 0pt
-\makeatletter
-\newcommand\level[1]{%
- \ifcase#1\relax\expandafter\chapter\or
- \expandafter\section\or
- \expandafter\subsection\or
- \expandafter\subsubsection\else
- \def\next{\@level{#1}}\expandafter\next
- \fi}
-
-\newcommand{\@level}[1]{%
-\@startsection{level#1}
- {#1}
- {\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}
-
-\newdimen\@leveldim
- \newdimen\@dotsdim
- {\normalfont\normalsize
- \sbox\z@{0}\global\@leveldim=\wd\z@
- \sbox\z@{.}\global\@dotsdim=\wd\z@
- }
-\newcounter{level4}[subsubsection]
- \@namedef{thelevel4}{\thesubsubsection.\arabic{level4}}
- \@namedef{level4mark}#1{}
- \def\l@section{\@dottedtocline{1}{0pt}{\dimexpr\@leveldim*4+\@dotsdim*1+6pt\relax}}
- \def\l@subsection{\@dottedtocline{2}{0pt}{\dimexpr\@leveldim*5+\@dotsdim*2+6pt\relax}}
- \def\l@subsubsection{\@dottedtocline{3}{0pt}{\dimexpr\@leveldim*6+\@dotsdim*3+6pt\relax}}
- \@namedef{l@level4}{\@dottedtocline{4}{0pt}{\dimexpr\@leveldim*7+\@dotsdim*4+6pt\relax}}
-
-\count@=4
- \def\@ncp#1{\number\numexpr\count@+#1\relax}
- \loop\ifnum\count@<100
- \begingroup\edef\x{\endgroup
- \noexpand\newcounter{level\@ncp{1}}[level\number\count@]
- \noexpand\@namedef{thelevel\@ncp{1}}{%
- \noexpand\@nameuse{thelevel\@ncp{0}}.\noexpand\arabic{level\@ncp{0}}}
- \noexpand\@namedef{level\@ncp{1}mark}####1{}%
- \noexpand\@namedef{l@level\@ncp{1}}%
- {\noexpand\@dottedtocline{\@ncp{1}}{0pt}{\the\dimexpr\@leveldim*\@ncp{5}+\@dotsdim*\@ncp{0}\relax}}}%
- \x
- \advance\count@\@ne
- \repeat
- \makeatother
- \setcounter{secnumdepth}{100}
- \setcounter{tocdepth}{100}
-
-
-\title{room.basic.service.tcp Model Documentation}
-\date{\today}
-\author{generated by eTrice}
-
-\begin{document}
-
-\pagestyle{plain}
-\maketitle
-\tableofcontents
-
-\newpage
-\listoffigures
-\newpage
-\section{Model Description}
-
-
-
-
-\section{Protocol Classes}
-\subimport*{room.basic.service.tcp/}{PTcpControl.tex}
-\subimport*{room.basic.service.tcp/}{PTcpPayload.tex}
-\newpage
-
-
-\section{Data Classes}
-\subimport*{room.basic.service.tcp/}{DTcpControl.tex}
-\subimport*{room.basic.service.tcp/}{DTcpPayload.tex}
-\newpage
-
-\section{Actor Classes}
-\subimport*{room.basic.service.tcp/}{ATcpServer.tex}
-\subimport*{room.basic.service.tcp/}{ATcpClient.tex}
-\end{document}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpClient.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpClient.tex
deleted file mode 100644
index cabf2e955..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpClient.tex
+++ /dev/null
@@ -1,76 +0,0 @@
-\level{2}{ATcpClient}
-
-
-\level{3}{Ports}
-\begin{tabular}[ht]{|l|l|l|l|l|p{5cm}|}
-\hline
-\textbf{Name} & \textbf{Protocol} & \textbf{Type} & \textbf{Kind} & \textbf{Multiplicity} & \textbf{Description}\\
-\hline
-controlPort & PTcpControl & reg. & external & 1 & \\
-\hline
-payloadPort & PTcpPayload & reg. & external & 1 & \\
-\hline
-\end{tabular}
-
-\level{3}{Behavior}
-\level{4}{Top Level}
-
-\begin{par}
-
-\end{par}
-
-
-\level{3}{Attributes}
-\begin{tabular}[ht]{|l|l|p{8cm}|}
-\hline
-\textbf{Name} & \textbf{Type} & \textbf{Description}\\
-\hline
-lastError & int32 & \\
-\hline
-payload & DTcpPayload & \\
-\hline
-client & etSocketConnectionData & \\
-\hline
-\end{tabular}
-
-\level{3}{Operations}
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & ATcpClient\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & ATcpClient\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & hasError\\
- \hline
- ReturnType: & boolean\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & setErrorCode\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & value:int32\\
- \hline
-\end{tabular}
-\newline\newline\newline
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpServer.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpServer.tex
deleted file mode 100644
index 076c42260..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/ATcpServer.tex
+++ /dev/null
@@ -1,76 +0,0 @@
-\level{2}{ATcpServer}
-
-
-\level{3}{Ports}
-\begin{tabular}[ht]{|l|l|l|l|l|p{5cm}|}
-\hline
-\textbf{Name} & \textbf{Protocol} & \textbf{Type} & \textbf{Kind} & \textbf{Multiplicity} & \textbf{Description}\\
-\hline
-controlPort & PTcpControl & reg. & external & 1 & \\
-\hline
-payloadPort & PTcpPayload & reg. & external & 1 & \\
-\hline
-\end{tabular}
-
-\level{3}{Behavior}
-\level{4}{Top Level}
-
-\begin{par}
-
-\end{par}
-
-
-\level{3}{Attributes}
-\begin{tabular}[ht]{|l|l|p{8cm}|}
-\hline
-\textbf{Name} & \textbf{Type} & \textbf{Description}\\
-\hline
-lastError & int32 & \\
-\hline
-payloadPortReplocation & int32 & \\
-\hline
-server & etSocketServerData & \\
-\hline
-\end{tabular}
-
-\level{3}{Operations}
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & ATcpServer\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & ATcpServer\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & hasError\\
- \hline
- ReturnType: & boolean\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & setErrorCode\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & value:int32\\
- \hline
-\end{tabular}
-\newline\newline\newline
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpControl.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpControl.tex
deleted file mode 100644
index f15d98420..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpControl.tex
+++ /dev/null
@@ -1,13 +0,0 @@
-\level{2} {DTcpControl}
-\level{3}{Attributes}
-\begin{tabular}[ht]{|l|l|p{8cm}|}
-\hline
-\textbf{Name} & \textbf{Type} & \textbf{Description}\\
-\hline
-IPAddr & string & \\
-\hline
-TcpPort & int32 & \\
-\hline
-\end{tabular}
-
-\level{3}{Operations}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpPayload.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpPayload.tex
deleted file mode 100644
index fd80f9c2c..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/DTcpPayload.tex
+++ /dev/null
@@ -1,35 +0,0 @@
-\level{2} {DTcpPayload}
-\level{3}{Attributes}
-\begin{tabular}[ht]{|l|l|p{8cm}|}
-\hline
-\textbf{Name} & \textbf{Type} & \textbf{Description}\\
-\hline
-connectionId & int32 & \\
-\hline
-length & int32 & \\
-\hline
-data & int8 & \\
-\hline
-\end{tabular}
-
-\level{3}{Operations}
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & setAsString\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & value:charPtr\\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & getAsString\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & value:charPtr\\
- \hline
-\end{tabular}
-\newline\newline\newline
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpControl.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpControl.tex
deleted file mode 100644
index d6f4ed000..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpControl.tex
+++ /dev/null
@@ -1,24 +0,0 @@
-\level{2} {PTcpControl}
-\level{3}{Incoming Messages}
-
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-connect & data & DTcpControl & \\
-\hline
-disconnect & & & \\
-\hline
-\end{tabular}
-\level{3}{Outgoing Messages}
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-connected & & & \\
-\hline
-disconnected & & & \\
-\hline
-error & & & \\
-\hline
-\end{tabular}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpPayload.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpPayload.tex
deleted file mode 100644
index 4c4931872..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.tcp/PTcpPayload.tex
+++ /dev/null
@@ -1,18 +0,0 @@
-\level{2} {PTcpPayload}
-\level{3}{Incoming Messages}
-
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-dataPackage & data & DTcpPayload & \\
-\hline
-\end{tabular}
-\level{3}{Outgoing Messages}
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-dataPackage & data & DTcpPayload & \\
-\hline
-\end{tabular}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.pdf b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.pdf
deleted file mode 100644
index fb9df2de3..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.pdf
+++ /dev/null
Binary files differ
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.tex
deleted file mode 100644
index fcda0bc46..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing.tex
+++ /dev/null
@@ -1,85 +0,0 @@
-\documentclass[titlepage]{article}
-\usepackage{import}
-\usepackage{graphicx}
-\usepackage{xr}
-\usepackage{hyperref}
-\IfFileExists{../doc/userinputs.tex}{\subimport{../doc/}{userinputs.tex}}{} %hook for conditional user-specific inputs, includes, macros, ...
-\usepackage[a4paper,text={160mm,255mm},centering,headsep=5mm,footskip=10mm]{geometry}
-\usepackage{nonfloat}
-\parindent 0pt
-\makeatletter
-\newcommand\level[1]{%
- \ifcase#1\relax\expandafter\chapter\or
- \expandafter\section\or
- \expandafter\subsection\or
- \expandafter\subsubsection\else
- \def\next{\@level{#1}}\expandafter\next
- \fi}
-
-\newcommand{\@level}[1]{%
-\@startsection{level#1}
- {#1}
- {\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}
-
-\newdimen\@leveldim
- \newdimen\@dotsdim
- {\normalfont\normalsize
- \sbox\z@{0}\global\@leveldim=\wd\z@
- \sbox\z@{.}\global\@dotsdim=\wd\z@
- }
-\newcounter{level4}[subsubsection]
- \@namedef{thelevel4}{\thesubsubsection.\arabic{level4}}
- \@namedef{level4mark}#1{}
- \def\l@section{\@dottedtocline{1}{0pt}{\dimexpr\@leveldim*4+\@dotsdim*1+6pt\relax}}
- \def\l@subsection{\@dottedtocline{2}{0pt}{\dimexpr\@leveldim*5+\@dotsdim*2+6pt\relax}}
- \def\l@subsubsection{\@dottedtocline{3}{0pt}{\dimexpr\@leveldim*6+\@dotsdim*3+6pt\relax}}
- \@namedef{l@level4}{\@dottedtocline{4}{0pt}{\dimexpr\@leveldim*7+\@dotsdim*4+6pt\relax}}
-
-\count@=4
- \def\@ncp#1{\number\numexpr\count@+#1\relax}
- \loop\ifnum\count@<100
- \begingroup\edef\x{\endgroup
- \noexpand\newcounter{level\@ncp{1}}[level\number\count@]
- \noexpand\@namedef{thelevel\@ncp{1}}{%
- \noexpand\@nameuse{thelevel\@ncp{0}}.\noexpand\arabic{level\@ncp{0}}}
- \noexpand\@namedef{level\@ncp{1}mark}####1{}%
- \noexpand\@namedef{l@level\@ncp{1}}%
- {\noexpand\@dottedtocline{\@ncp{1}}{0pt}{\the\dimexpr\@leveldim*\@ncp{5}+\@dotsdim*\@ncp{0}\relax}}}%
- \x
- \advance\count@\@ne
- \repeat
- \makeatother
- \setcounter{secnumdepth}{100}
- \setcounter{tocdepth}{100}
-
-
-\title{room.basic.service.timing Model Documentation}
-\date{\today}
-\author{generated by eTrice}
-
-\begin{document}
-
-\pagestyle{plain}
-\maketitle
-\tableofcontents
-
-\newpage
-\listoffigures
-\newpage
-\section{Model Description}
-
-
-
-
-\section{Protocol Classes}
-\subimport*{room.basic.service.timing/}{PTimer.tex}
-\newpage
-
-
-
-\section{Actor Classes}
-\subimport*{room.basic.service.timing/}{ATimingService.tex}
-\end{document}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/ATimingService.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/ATimingService.tex
deleted file mode 100644
index 861041016..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/ATimingService.tex
+++ /dev/null
@@ -1,97 +0,0 @@
-\level{2}{ATimingService}
-
-\level{3}{Structure}
-{
-\centering{}
-\includegraphics[width=1.0\textwidth]{./images/ATimingService_structure.jpg}
-\figcaption{ATimingService Structure}
-}
-
-
-\level{3}{Behavior}
-\level{4}{Top Level}
-{
-\centering{}
-\includegraphics[width=1.0\textwidth]{./images/ATimingService_behavior.jpg}
-\figcaption{ATimingService Top State}
-}
-
-\begin{par}
-
-\end{par}
-
-
-\level{3}{Attributes}
-\begin{tabular}[ht]{|l|l|p{8cm}|}
-\hline
-\textbf{Name} & \textbf{Type} & \textbf{Description}\\
-\hline
-tcbs & tcb & \\
-\hline
-usedTcbsRoot & tcb & \\
-\hline
-freeTcbsRoot & tcb & \\
-\hline
-\end{tabular}
-
-\level{3}{Operations}
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & getTcb\\
- \hline
- ReturnType: & tcb\\
- \hline
- Arguments: & \\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & returnTcb\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & block:tcb\\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & removeTcbFromUsedList\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & idx:int32\\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & putTcbToUsedList\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & block:tcb\\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & isTimeGreater\\
- \hline
- ReturnType: & boolean\\
- \hline
- Arguments: & t1:targetTime, t2:targetTime\\
- \hline
-\end{tabular}
-\newline\newline\newline
-\begin{tabular}[ht]{|l|l|}
-\hline
- Name: & addTime\\
- \hline
- ReturnType: & void\\
- \hline
- Arguments: & t1:targetTime, t2:targetTime\\
- \hline
-\end{tabular}
-\newline\newline\newline
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/PTimer.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/PTimer.tex
deleted file mode 100644
index 9319ec255..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.service.timing/PTimer.tex
+++ /dev/null
@@ -1,22 +0,0 @@
-\level{2} {PTimer}
-\level{3}{Incoming Messages}
-
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-startTimer & time & uint32 & \\
-\hline
-startTimeout & time & uint32 & \\
-\hline
-kill & & & \\
-\hline
-\end{tabular}
-\level{3}{Outgoing Messages}
-\begin{tabular}[ht]{|l|l|l|p{8cm}|}
-\hline
-Message & Data & Type & Description\\
-\hline
-timeout & & & \\
-\hline
-\end{tabular}
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.pdf b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.pdf
deleted file mode 100644
index 4b999f165..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.pdf
+++ /dev/null
Binary files differ
diff --git a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.tex b/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.tex
deleted file mode 100644
index 5cb44f958..000000000
--- a/runtime/org.eclipse.etrice.modellib.c/doc-gen/room.basic.types.tex
+++ /dev/null
@@ -1,80 +0,0 @@
-\documentclass[titlepage]{article}
-\usepackage{import}
-\usepackage{graphicx}
-\usepackage{xr}
-\usepackage{hyperref}
-\IfFileExists{../doc/userinputs.tex}{\subimport{../doc/}{userinputs.tex}}{} %hook for conditional user-specific inputs, includes, macros, ...
-\usepackage[a4paper,text={160mm,255mm},centering,headsep=5mm,footskip=10mm]{geometry}
-\usepackage{nonfloat}
-\parindent 0pt
-\makeatletter
-\newcommand\level[1]{%
- \ifcase#1\relax\expandafter\chapter\or
- \expandafter\section\or
- \expandafter\subsection\or
- \expandafter\subsubsection\else
- \def\next{\@level{#1}}\expandafter\next
- \fi}
-
-\newcommand{\@level}[1]{%
-\@startsection{level#1}
- {#1}
- {\z@}%
- {-3.25ex\@plus -1ex \@minus -.2ex}%
- {1.5ex \@plus .2ex}%
- {\normalfont\normalsize\bfseries}}
-
-\newdimen\@leveldim
- \newdimen\@dotsdim
- {\normalfont\normalsize
- \sbox\z@{0}\global\@leveldim=\wd\z@
- \sbox\z@{.}\global\@dotsdim=\wd\z@
- }
-\newcounter{level4}[subsubsection]
- \@namedef{thelevel4}{\thesubsubsection.\arabic{level4}}
- \@namedef{level4mark}#1{}
- \def\l@section{\@dottedtocline{1}{0pt}{\dimexpr\@leveldim*4+\@dotsdim*1+6pt\relax}}
- \def\l@subsection{\@dottedtocline{2}{0pt}{\dimexpr\@leveldim*5+\@dotsdim*2+6pt\relax}}
- \def\l@subsubsection{\@dottedtocline{3}{0pt}{\dimexpr\@leveldim*6+\@dotsdim*3+6pt\relax}}
- \@namedef{l@level4}{\@dottedtocline{4}{0pt}{\dimexpr\@leveldim*7+\@dotsdim*4+6pt\relax}}
-
-\count@=4
- \def\@ncp#1{\number\numexpr\count@+#1\relax}
- \loop\ifnum\count@<100
- \begingroup\edef\x{\endgroup
- \noexpand\newcounter{level\@ncp{1}}[level\number\count@]
- \noexpand\@namedef{thelevel\@ncp{1}}{%
- \noexpand\@nameuse{thelevel\@ncp{0}}.\noexpand\arabic{level\@ncp{0}}}
- \noexpand\@namedef{level\@ncp{1}mark}####1{}%
- \noexpand\@namedef{l@level\@ncp{1}}%
- {\noexpand\@dottedtocline{\@ncp{1}}{0pt}{\the\dimexpr\@leveldim*\@ncp{5}+\@dotsdim*\@ncp{0}\relax}}}%
- \x
- \advance\count@\@ne
- \repeat
- \makeatother
- \setcounter{secnumdepth}{100}
- \setcounter{tocdepth}{100}
-
-
-\title{room.basic.types Model Documentation}
-\date{\today}
-\author{generated by eTrice}
-
-\begin{document}
-
-\pagestyle{plain}
-\maketitle
-\tableofcontents
-
-\newpage
-\listoffigures
-\newpage
-\section{Model Description}
-
-
-
-
-
-
-
-\end{document}
diff --git a/runtime/org.eclipse.etrice.modellib.c/gen_modellib_c.launch b/runtime/org.eclipse.etrice.modellib.c/gen_modellib_c.launch
index da0481584..cb2bf6824 100644
--- a/runtime/org.eclipse.etrice.modellib.c/gen_modellib_c.launch
+++ b/runtime/org.eclipse.etrice.modellib.c/gen_modellib_c.launch
@@ -1,16 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
+<booleanAttribute key="DataLogging" value="false"/>
<booleanAttribute key="Debug" value="false"/>
-<booleanAttribute key="GenDocumentation" value="true"/>
-<booleanAttribute key="GenInstanceDiagram" value="true"/>
+<booleanAttribute key="GenDocumentation" value="false"/>
+<booleanAttribute key="GenInstanceDiagram" value="false"/>
<stringAttribute key="GenModelPath" value=""/>
<booleanAttribute key="Lib" value="true"/>
<booleanAttribute key="MSC" value="true"/>
+<stringAttribute key="MainMethodName" value="main"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.c/model/TimingService.room}"/>
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.c/model/TcpService.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.c/model/Tests.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.c/model/PInterrupt.room}"/>
</listAttribute>
+<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
+<booleanAttribute key="UseTranslation" value="true"/>
<booleanAttribute key="Verbose" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
</launchConfiguration>
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.c
new file mode 100644
index 000000000..4109a1a28
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.c
@@ -0,0 +1,82 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PInterrupt
+ *
+ */
+
+#include "PInterrupt.h"
+#include "debugging/etMSCLogger.h"
+#include "PInterrupt_Utils.h"
+
+
+/*--------------------- port methods */
+etInt32 PInterruptReplPort_getReplication(const PInterruptReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void PInterruptConjPort_event(const PInterruptConjPort* self) {
+ // the message should be sent via the fire operation !!
+}
+
+void PInterruptConjReplPort_event_broadcast(const PInterruptConjReplPort* self) {
+ int i;
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ PInterruptConjPort_event(&((etReplPort*)self)->ports[i].port);
+ }
+}
+
+void PInterruptConjReplPort_event(const PInterruptConjReplPort* self, int idx__et) {
+ PInterruptConjPort_event(&((etReplPort*)self)->ports[idx__et].port);
+}
+
+/* begin PInterruptConjPort specific (including base classes) */
+/*--------------------- begin user code ---------------------*/
+#include "messaging/etMessageService.h"
+/*--------------------- end user code ---------------------*/
+
+/*--------------------- operations ---------------------*/
+ PInterruptConjPort* PInterruptConjPort_export(PInterruptConjPort* self) {
+ msg.address = self->peerAddress;
+ msg.evtID = PInterrupt_IN_event;
+ callback.func=(void (*)(void*))PInterruptConjPort_dispatch;
+ callback.param=(void *)self;
+ etMessageService_registerHighPrioFunc(self->msgService,&callback);
+ return self;
+}
+ void PInterruptConjPort_dispatch(PInterruptConjPort* self) {
+ // this operation will be executed from the message service
+ if (enable){
+ enable=0;
+ self->msgService->msgDispatcher(&msg);
+ }
+}
+ void PInterruptConjPort_fire(PInterruptConjPort* self) {
+ // this method runs on interrupt level
+ enable=1;
+ etSema_wakeupFromISR(&self->msgService->executionSemaphore);
+}
+/* end PInterruptConjPort specific (including base classes) */
+
+etInt32 PInterruptConjReplPort_getReplication(const PInterruptConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const PInterrupt_messageStrings[] = {"MIN", "event", "MAX"};
+
+const char* PInterrupt_getMessageString(int msg_id) {
+ if (msg_id<PInterrupt_MSG_MIN || msg_id>PInterrupt_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return PInterrupt_messageStrings[msg_id];
+ }
+}
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.h
new file mode 100644
index 000000000..602d5601a
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt.h
@@ -0,0 +1,62 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PInterrupt
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_H_
+#define _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+
+
+
+/* message IDs */
+enum PInterrupt_msg_ids {
+ PInterrupt_MSG_MIN = 0,
+ PInterrupt_IN_event = 1,
+ PInterrupt_MSG_MAX = 2
+};
+
+/*--------------------- port structs and methods */
+typedef etPort PInterruptPort;
+typedef etReplPort PInterruptReplPort;
+
+
+
+
+etInt32 PInterruptReplPort_getReplication(const PInterruptReplPort* self);
+typedef etPort PInterruptConjPort;
+typedef etReplPort PInterruptConjReplPort;
+
+/* variable part of PortClass (RAM) */
+typedef struct PInterruptConjPort_var PInterruptConjPort_var;
+struct PInterruptConjPort_var {
+ /*--------------------- attributes ---------------------*/
+ etMessage msg;
+ etHighPrioFunc callback;
+ uint8 enable;
+};
+
+void PInterruptConjPort_event(const PInterruptConjPort* self);
+void PInterruptConjReplPort_event_broadcast(const PInterruptConjReplPort* self);
+void PInterruptConjReplPort_event(const PInterruptConjReplPort* self, int idx);
+
+/*--------------------- operations ---------------------*/
+ PInterruptConjPort* PInterruptConjPort_export(PInterruptConjPort* self);
+ void PInterruptConjPort_dispatch(PInterruptConjPort* self);
+ void PInterruptConjPort_fire(PInterruptConjPort* self);
+
+etInt32 PInterruptConjReplPort_getReplication(const PInterruptConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* PInterrupt_getMessageString(int msg_id);
+
+
+#endif /* _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt_Utils.h
new file mode 100644
index 000000000..edca92e35
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/pinterrupt/PInterrupt_Utils.h
@@ -0,0 +1,30 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ProtocolClass PInterrupt
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_UTILS_H_
+#define _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_UTILS_H_
+
+#include "room/basic/service/pinterrupt/PInterrupt.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+/* conjugate port class */
+
+/* operations */
+#define export() PInterruptConjPort_export(self)
+#define dispatch() PInterruptConjPort_dispatch(self)
+#define fire() PInterruptConjPort_fire(self)
+
+/* attributes */
+#define msg (((PInterruptConjPort_var*)(self->varData))->msg)
+#define callback (((PInterruptConjPort_var*)(self->varData))->callback)
+#define enable (((PInterruptConjPort_var*)(self->varData))->enable)
+
+#endif /* _ROOM_BASIC_SERVICE_PINTERRUPT_PINTERRUPT_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.c
new file mode 100644
index 000000000..b72cf1235
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.c
@@ -0,0 +1,355 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ATcpClient
+ *
+ */
+
+#include "ATcpClient.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "base/etMemory.h"
+
+#include "room/basic/service/tcp/PTcpControl.h"
+#include "room/basic/service/tcp/PTcpPayload.h"
+
+#include "ATcpClient_Utils.h"
+
+/*--------------------- begin user code ---------------------*/
+static int8* bufferProvider(void* slf, int* size) {
+ ATcpClient* self = (ATcpClient*) slf;
+ *size = DTcpPayload_getMaxLength(&payloadRecvBuffer);
+ return payloadRecvBuffer.data;
+}
+
+static int socketReceiver(void* slf, int channel, int size, const int8* data) {
+ ATcpClient* self = (ATcpClient*) slf;
+ DTcpPayload_setData(&payloadRecvBuffer, /* cast away constness to avoid warning*/(int8*)data, size);
+ payloadPort_dataPackage(&payloadRecvBuffer);
+ return ETSOCKET_OK;
+}
+/*--------------------- end user code ---------------------*/
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_controlPort = 1,
+ IFITEM_payloadPort = 2
+};
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_unconnected = 2,
+ STATE_connected = 3,
+ STATE_initError = 4,
+ STATE_MAX = 5
+};
+
+/* transition chains */
+enum ChainIDs {
+ CHAIN_TRANS_INITIAL_TO__cp1 = 1,
+ CHAIN_TRANS_tr0_FROM_unconnected_TO_cp0_BY_connectcontrolPort = 2,
+ CHAIN_TRANS_tr1_FROM_connected_TO_unconnected_BY_disconnectcontrolPort = 3,
+ CHAIN_TRANS_tr3_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr3 = 4,
+ CHAIN_TRANS_tr6_FROM_initError_TO_initError_BY_connectcontrolPort_tr6 = 5
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_controlPort__connect = IFITEM_controlPort + EVT_SHIFT*PTcpControl_IN_connect,
+ TRIG_controlPort__disconnect = IFITEM_controlPort + EVT_SHIFT*PTcpControl_IN_disconnect,
+ TRIG_payloadPort__dataPackage = IFITEM_payloadPort + EVT_SHIFT*PTcpPayload_IN_dataPackage
+};
+
+/* state names */
+static char* stateStrings[] = {"<no state>","<top>","unconnected",
+"connected",
+"initError"
+};
+
+static void setState(ATcpClient* self, etInt16 new_state) {
+ self->state = new_state;
+ ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])
+}
+
+static etInt16 getState(ATcpClient* self) {
+ return self->state;
+}
+
+/* Entry and Exit Codes */
+static void entry_initError(ATcpClient* self) {
+ controlPort_error();
+}
+
+/* Action Codes */
+static void action_TRANS_INITIAL_TO__cp1(ATcpClient* self) {
+ printf("Client Init!\n");
+}
+static void action_TRANS_tr0_FROM_unconnected_TO_cp0_BY_connectcontrolPort(ATcpClient* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ /* connect to server */
+ setErrorCode(etConnectServer(client, data->IPAddr, data->TcpPort));
+}
+static void action_TRANS_tr1_FROM_connected_TO_unconnected_BY_disconnectcontrolPort(ATcpClient* self, const InterfaceItemBase* ifitem) {
+ /* close read thread */
+ etCloseSocket(client);
+
+ controlPort_disconnected();
+}
+static void action_TRANS_tr2_FROM_cp0_TO_connected(ATcpClient* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ controlPort_connected();
+}
+static void action_TRANS_tr7_FROM_cp0_TO_unconnected_COND_tr7(ATcpClient* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ controlPort_error();
+}
+static void action_TRANS_tr3_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr3(ATcpClient* self, const InterfaceItemBase* ifitem, DTcpPayload* data) {
+ setErrorCode(etWriteSocket(client, data->length, data->data));
+ if(hasError())
+ controlPort_error();
+}
+
+/* State Switch Methods */
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+static void exitTo(ATcpClient* self, etInt16 current__et, etInt16 to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_unconnected:
+ self->history[STATE_TOP] = STATE_unconnected;
+ current__et = STATE_TOP;
+ break;
+ case STATE_connected:
+ self->history[STATE_TOP] = STATE_connected;
+ current__et = STATE_TOP;
+ break;
+ case STATE_initError:
+ self->history[STATE_TOP] = STATE_initError;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+}
+
+/**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+static etInt16 executeTransitionChain(ATcpClient* self, int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et) {
+ switch (chain__et) {
+ case CHAIN_TRANS_INITIAL_TO__cp1:
+ {
+ action_TRANS_INITIAL_TO__cp1(self);
+ if (hasError()) {
+ return STATE_initError;}
+ else {
+ return STATE_unconnected;}
+ }
+ case CHAIN_TRANS_tr0_FROM_unconnected_TO_cp0_BY_connectcontrolPort:
+ {
+ DTcpControl* data = ((DTcpControl*) generic_data__et);
+ action_TRANS_tr0_FROM_unconnected_TO_cp0_BY_connectcontrolPort(self, ifitem, data);
+ if (hasError()) {
+ action_TRANS_tr7_FROM_cp0_TO_unconnected_COND_tr7(self, ifitem, data);
+ return STATE_unconnected;}
+ else {
+ action_TRANS_tr2_FROM_cp0_TO_connected(self, ifitem, data);
+ return STATE_connected;}
+ }
+ case CHAIN_TRANS_tr1_FROM_connected_TO_unconnected_BY_disconnectcontrolPort:
+ {
+ action_TRANS_tr1_FROM_connected_TO_unconnected_BY_disconnectcontrolPort(self, ifitem);
+ return STATE_unconnected;
+ }
+ case CHAIN_TRANS_tr3_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr3:
+ {
+ DTcpPayload* data = ((DTcpPayload*) generic_data__et);
+ action_TRANS_tr3_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr3(self, ifitem, data);
+ return STATE_connected;
+ }
+ case CHAIN_TRANS_tr6_FROM_initError_TO_initError_BY_connectcontrolPort_tr6:
+ {
+ DTcpControl* data = ((DTcpControl*) generic_data__et);
+ return STATE_initError;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+static etInt16 enterHistory(ATcpClient* self, etInt16 state__et) {
+ etBool skip_entry__et = ET_FALSE;
+ if (state__et >= STATE_MAX) {
+ state__et = (etInt16) (state__et - STATE_MAX);
+ skip_entry__et = ET_TRUE;
+ }
+ while (ET_TRUE) {
+ switch (state__et) {
+ case STATE_unconnected:
+ /* in leaf state: return state id */
+ return STATE_unconnected;
+ case STATE_connected:
+ /* in leaf state: return state id */
+ return STATE_connected;
+ case STATE_initError:
+ if (!(skip_entry__et)) entry_initError(self);
+ /* in leaf state: return state id */
+ return STATE_initError;
+ case STATE_TOP:
+ state__et = self->history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = ET_FALSE;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+}
+
+static void ATcpClient_executeInitTransition(ATcpClient* self) {
+ int chain__et = CHAIN_TRANS_INITIAL_TO__cp1;
+ etInt16 next__et = executeTransitionChain(self, chain__et, NULL, NULL);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void ATcpClient_receiveEventInternal(ATcpClient* self, InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ etInt16 catching_state__et = NO_STATE;
+ ((void)trigger__et); /* avoids unused warning */
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState(self)) {
+ case STATE_unconnected:
+ switch(trigger__et) {
+ case TRIG_controlPort__connect:
+ {
+ chain__et = CHAIN_TRANS_tr0_FROM_unconnected_TO_cp0_BY_connectcontrolPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_connected:
+ switch(trigger__et) {
+ case TRIG_controlPort__disconnect:
+ {
+ chain__et = CHAIN_TRANS_tr1_FROM_connected_TO_unconnected_BY_disconnectcontrolPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_payloadPort__dataPackage:
+ {
+ chain__et = CHAIN_TRANS_tr3_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_initError:
+ switch(trigger__et) {
+ case TRIG_controlPort__connect:
+ {
+ chain__et = CHAIN_TRANS_tr6_FROM_initError_TO_initError_BY_connectcontrolPort_tr6;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(self, getState(self), catching_state__et);
+ {
+ etInt16 next__et = executeTransitionChain(self, chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+ }
+ }
+}
+static void ATcpClient_receiveEvent(ATcpClient* self, InterfaceItemBase* ifitem, int evt, void* generic_data__et) {
+ int localId = (ifitem==NULL)? 0 : ifitem->localId;
+ ATcpClient_receiveEventInternal(self, ifitem, localId, evt, generic_data__et);
+}
+
+void ATcpClient_init(ATcpClient* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATcpClient", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<ATCPCLIENT_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ ATcpClient_executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ATcpClient_receiveMessage(void* self, const void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATcpClient", "_receiveMessage")
+ ATcpClient_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+ void ATcpClient_ctor(ATcpClient* self){
+ /* user defined constructor body */
+ setErrorCode(etInitSockets());
+ client = etCreateSocketConnectionData();
+ client->receiver = socketReceiver;
+ client->bufferProvider = bufferProvider;
+ client->userData = self;
+}
+
+ void ATcpClient_dtor(ATcpClient* self){
+ /* user defined destructor body */
+ etCloseSocket(client);
+ etCleanupSockets();
+ etFreeSocketConnectionData(client);
+}
+
+/*--------------------- operations ---------------------*/
+ bool ATcpClient_hasError(ATcpClient* self) {
+ return lastError != ETSOCKET_OK;
+}
+ void ATcpClient_setErrorCode(ATcpClient* self, int32 value) {
+ lastError = value;
+}
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.h
new file mode 100644
index 000000000..3f6962c52
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient.h
@@ -0,0 +1,77 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ATcpClient
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_H_
+#define _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "room/basic/service/tcp/DTcpPayload.h"
+#include "room/basic/service/tcp/PTcpControl.h"
+#include "room/basic/service/tcp/PTcpPayload.h"
+
+/*--------------------- begin user code ---------------------*/
+#include "osal/etTcpSockets.h"
+/*--------------------- end user code ---------------------*/
+
+typedef struct ATcpClient ATcpClient;
+
+/* const part of ActorClass (ROM) */
+typedef struct ATcpClient_const {
+ const char* instName;
+
+ /* simple ports */
+ const PTcpControlPort controlPort;
+ const PTcpPayloadPort payloadPort;
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+
+ /* services */
+} ATcpClient_const;
+
+
+/* constant for state machine data */
+#define ATCPCLIENT_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct ATcpClient {
+ const ATcpClient_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+ int32 lastError;
+ DTcpPayload payloadRecvBuffer;
+ etSocketConnectionData* client;
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[ATCPCLIENT_HISTORY_SIZE];
+};
+
+void ATcpClient_init(ATcpClient* self);
+
+void ATcpClient_receiveMessage(void* self, const void* ifitem, const etMessage* msg);
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+ void ATcpClient_ctor(ATcpClient* self);
+ void ATcpClient_dtor(ATcpClient* self);
+
+/*--------------------- operations ---------------------*/
+ bool ATcpClient_hasError(ATcpClient* self);
+ void ATcpClient_setErrorCode(ATcpClient* self, int32 value);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient_Utils.h
new file mode 100644
index 000000000..c83489382
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpClient_Utils.h
@@ -0,0 +1,45 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ActorClass ATcpClient
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_UTILS_H_
+
+#include "room/basic/service/tcp/ATcpClient.h"
+
+/*
+ * access macros for ports, operations and attributes
+*/
+
+/* simple event ports */
+#define controlPort_connected() PTcpControlPort_connected(&self->constData->controlPort)
+#define controlPort_disconnected() PTcpControlPort_disconnected(&self->constData->controlPort)
+#define controlPort_error() PTcpControlPort_error(&self->constData->controlPort)
+#define payloadPort_dataPackage(data) PTcpPayloadPort_dataPackage(&self->constData->payloadPort, data)
+
+/* data receive ports */
+
+/* data send ports */
+
+/* saps */
+
+/* replicated event ports */
+
+/* services */
+
+/* operations */
+#define hasError() ATcpClient_hasError(self)
+#define setErrorCode(value) ATcpClient_setErrorCode(self, value)
+
+/* attributes */
+#define lastError (self->lastError)
+#define payloadRecvBuffer (self->payloadRecvBuffer)
+#define client (self->client)
+
+/* port operations */
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_ATCPCLIENT_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.c
new file mode 100644
index 000000000..17d9dc398
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.c
@@ -0,0 +1,352 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ATcpServer
+ *
+ */
+
+#include "ATcpServer.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "base/etMemory.h"
+
+#include "room/basic/service/tcp/PTcpControl.h"
+#include "room/basic/service/tcp/PTcpPayload.h"
+
+#include "ATcpServer_Utils.h"
+
+/*--------------------- begin user code ---------------------*/
+static int8* bufferProvider(void* slf, int* size) {
+ ATcpServer* self = (ATcpServer*) slf;
+ *size = DTcpPayload_getMaxLength(&payloadRecvBuffer);
+ return payloadRecvBuffer.data;
+}
+
+static int socketReceiver(void* slf, int channel, int size, const int8* data) {
+ ATcpServer* self = (ATcpServer*) slf;
+ DTcpPayload_setData(&payloadRecvBuffer, data, size);
+ payloadPort_dataPackage(&payloadRecvBuffer);
+ return ETSOCKET_OK;
+}
+/*--------------------- end user code ---------------------*/
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_controlPort = 1,
+ IFITEM_payloadPort = 2
+};
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_connected = 2,
+ STATE_unconnected = 3,
+ STATE_initError = 4,
+ STATE_MAX = 5
+};
+
+/* transition chains */
+enum ChainIDs {
+ CHAIN_TRANS_INITIAL_TO__cp0 = 1,
+ CHAIN_TRANS_tr5_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr5 = 2,
+ CHAIN_TRANS_tr6_FROM_connected_TO_unconnected_BY_disconnectcontrolPort = 3,
+ CHAIN_TRANS_tr7_FROM_unconnected_TO_cp1_BY_connectcontrolPort = 4,
+ CHAIN_TRANS_tr2_FROM_initError_TO_initError_BY_connectcontrolPort_tr2 = 5
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_controlPort__connect = IFITEM_controlPort + EVT_SHIFT*PTcpControl_IN_connect,
+ TRIG_controlPort__disconnect = IFITEM_controlPort + EVT_SHIFT*PTcpControl_IN_disconnect,
+ TRIG_payloadPort__dataPackage = IFITEM_payloadPort + EVT_SHIFT*PTcpPayload_IN_dataPackage
+};
+
+/* state names */
+static char* stateStrings[] = {"<no state>","<top>","connected",
+"unconnected",
+"initError"
+};
+
+static void setState(ATcpServer* self, etInt16 new_state) {
+ self->state = new_state;
+ ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])
+}
+
+static etInt16 getState(ATcpServer* self) {
+ return self->state;
+}
+
+/* Entry and Exit Codes */
+static void entry_initError(ATcpServer* self) {
+ controlPort_error();
+}
+
+/* Action Codes */
+static void action_TRANS_tr5_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr5(ATcpServer* self, const InterfaceItemBase* ifitem, DTcpPayload* data) {
+ /* send payload to connection */
+ setErrorCode(etWriteServerSocket(server, data->connectionId, data->length, data->data));
+ if(hasError())
+ controlPort_error();
+}
+static void action_TRANS_tr6_FROM_connected_TO_unconnected_BY_disconnectcontrolPort(ATcpServer* self, const InterfaceItemBase* ifitem) {
+ /* close accept thread */
+ etCloseAllServerSockets(server);
+ etStopSocketServer(server);
+
+ controlPort_disconnected();
+}
+static void action_TRANS_tr7_FROM_unconnected_TO_cp1_BY_connectcontrolPort(ATcpServer* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ /* start accept thread */
+ setErrorCode(etStartListening(server, data->TcpPort));
+}
+static void action_TRANS_tr4_FROM_cp1_TO_connected(ATcpServer* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ controlPort_connected();
+}
+static void action_TRANS_tr8_FROM_cp1_TO_unconnected_COND_tr8(ATcpServer* self, const InterfaceItemBase* ifitem, DTcpControl* data) {
+ controlPort_error();
+}
+
+/* State Switch Methods */
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+static void exitTo(ATcpServer* self, etInt16 current__et, etInt16 to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_connected:
+ self->history[STATE_TOP] = STATE_connected;
+ current__et = STATE_TOP;
+ break;
+ case STATE_unconnected:
+ self->history[STATE_TOP] = STATE_unconnected;
+ current__et = STATE_TOP;
+ break;
+ case STATE_initError:
+ self->history[STATE_TOP] = STATE_initError;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+}
+
+/**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+static etInt16 executeTransitionChain(ATcpServer* self, int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et) {
+ switch (chain__et) {
+ case CHAIN_TRANS_INITIAL_TO__cp0:
+ {
+ if (hasError()) {
+ return STATE_initError;}
+ else {
+ return STATE_unconnected;}
+ }
+ case CHAIN_TRANS_tr5_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr5:
+ {
+ DTcpPayload* data = ((DTcpPayload*) generic_data__et);
+ action_TRANS_tr5_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr5(self, ifitem, data);
+ return STATE_connected;
+ }
+ case CHAIN_TRANS_tr6_FROM_connected_TO_unconnected_BY_disconnectcontrolPort:
+ {
+ action_TRANS_tr6_FROM_connected_TO_unconnected_BY_disconnectcontrolPort(self, ifitem);
+ return STATE_unconnected;
+ }
+ case CHAIN_TRANS_tr7_FROM_unconnected_TO_cp1_BY_connectcontrolPort:
+ {
+ DTcpControl* data = ((DTcpControl*) generic_data__et);
+ action_TRANS_tr7_FROM_unconnected_TO_cp1_BY_connectcontrolPort(self, ifitem, data);
+ if (hasError()) {
+ action_TRANS_tr8_FROM_cp1_TO_unconnected_COND_tr8(self, ifitem, data);
+ return STATE_unconnected;}
+ else {
+ action_TRANS_tr4_FROM_cp1_TO_connected(self, ifitem, data);
+ return STATE_connected;}
+ }
+ case CHAIN_TRANS_tr2_FROM_initError_TO_initError_BY_connectcontrolPort_tr2:
+ {
+ DTcpControl* data = ((DTcpControl*) generic_data__et);
+ return STATE_initError;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+static etInt16 enterHistory(ATcpServer* self, etInt16 state__et) {
+ etBool skip_entry__et = ET_FALSE;
+ if (state__et >= STATE_MAX) {
+ state__et = (etInt16) (state__et - STATE_MAX);
+ skip_entry__et = ET_TRUE;
+ }
+ while (ET_TRUE) {
+ switch (state__et) {
+ case STATE_connected:
+ /* in leaf state: return state id */
+ return STATE_connected;
+ case STATE_unconnected:
+ /* in leaf state: return state id */
+ return STATE_unconnected;
+ case STATE_initError:
+ if (!(skip_entry__et)) entry_initError(self);
+ /* in leaf state: return state id */
+ return STATE_initError;
+ case STATE_TOP:
+ state__et = self->history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = ET_FALSE;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+}
+
+static void ATcpServer_executeInitTransition(ATcpServer* self) {
+ int chain__et = CHAIN_TRANS_INITIAL_TO__cp0;
+ etInt16 next__et = executeTransitionChain(self, chain__et, NULL, NULL);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void ATcpServer_receiveEventInternal(ATcpServer* self, InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ etInt16 catching_state__et = NO_STATE;
+ ((void)trigger__et); /* avoids unused warning */
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState(self)) {
+ case STATE_connected:
+ switch(trigger__et) {
+ case TRIG_payloadPort__dataPackage:
+ {
+ chain__et = CHAIN_TRANS_tr5_FROM_connected_TO_connected_BY_dataPackagepayloadPort_tr5;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_controlPort__disconnect:
+ {
+ chain__et = CHAIN_TRANS_tr6_FROM_connected_TO_unconnected_BY_disconnectcontrolPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_unconnected:
+ switch(trigger__et) {
+ case TRIG_controlPort__connect:
+ {
+ chain__et = CHAIN_TRANS_tr7_FROM_unconnected_TO_cp1_BY_connectcontrolPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_initError:
+ switch(trigger__et) {
+ case TRIG_controlPort__connect:
+ {
+ chain__et = CHAIN_TRANS_tr2_FROM_initError_TO_initError_BY_connectcontrolPort_tr2;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(self, getState(self), catching_state__et);
+ {
+ etInt16 next__et = executeTransitionChain(self, chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+ }
+ }
+}
+static void ATcpServer_receiveEvent(ATcpServer* self, InterfaceItemBase* ifitem, int evt, void* generic_data__et) {
+ int localId = (ifitem==NULL)? 0 : ifitem->localId;
+ ATcpServer_receiveEventInternal(self, ifitem, localId, evt, generic_data__et);
+}
+
+void ATcpServer_init(ATcpServer* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATcpServer", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<ATCPSERVER_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ ATcpServer_executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ATcpServer_receiveMessage(void* self, const void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATcpServer", "_receiveMessage")
+ ATcpServer_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+ void ATcpServer_ctor(ATcpServer* self){
+ /* user defined constructor body */
+ setErrorCode(etInitSockets());
+ server = etCreateSocketServerData();
+ server->receiver = socketReceiver;
+ server->bufferProvider = bufferProvider;
+ server->userData = self;
+}
+
+ void ATcpServer_dtor(ATcpServer* self){
+ /* user defined destructor body */
+ etCleanupSockets();
+ etFreeSocketServerData(server);
+}
+
+/*--------------------- operations ---------------------*/
+ bool ATcpServer_hasError(ATcpServer* self) {
+ return lastError != ETSOCKET_OK;
+}
+ void ATcpServer_setErrorCode(ATcpServer* self, int32 value) {
+ lastError = value;
+}
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.h
new file mode 100644
index 000000000..2bff8d75e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer.h
@@ -0,0 +1,77 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ATcpServer
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_H_
+#define _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "room/basic/service/tcp/DTcpPayload.h"
+#include "room/basic/service/tcp/PTcpControl.h"
+#include "room/basic/service/tcp/PTcpPayload.h"
+
+/*--------------------- begin user code ---------------------*/
+#include "osal/etTcpSockets.h"
+/*--------------------- end user code ---------------------*/
+
+typedef struct ATcpServer ATcpServer;
+
+/* const part of ActorClass (ROM) */
+typedef struct ATcpServer_const {
+ const char* instName;
+
+ /* simple ports */
+ const PTcpControlPort controlPort;
+ const PTcpPayloadPort payloadPort;
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+
+ /* services */
+} ATcpServer_const;
+
+
+/* constant for state machine data */
+#define ATCPSERVER_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct ATcpServer {
+ const ATcpServer_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+ int32 lastError;
+ DTcpPayload payloadRecvBuffer;
+ etSocketServerData* server;
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[ATCPSERVER_HISTORY_SIZE];
+};
+
+void ATcpServer_init(ATcpServer* self);
+
+void ATcpServer_receiveMessage(void* self, const void* ifitem, const etMessage* msg);
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+ void ATcpServer_ctor(ATcpServer* self);
+ void ATcpServer_dtor(ATcpServer* self);
+
+/*--------------------- operations ---------------------*/
+ bool ATcpServer_hasError(ATcpServer* self);
+ void ATcpServer_setErrorCode(ATcpServer* self, int32 value);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer_Utils.h
new file mode 100644
index 000000000..64063760e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/ATcpServer_Utils.h
@@ -0,0 +1,45 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ActorClass ATcpServer
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_UTILS_H_
+
+#include "room/basic/service/tcp/ATcpServer.h"
+
+/*
+ * access macros for ports, operations and attributes
+*/
+
+/* simple event ports */
+#define controlPort_connected() PTcpControlPort_connected(&self->constData->controlPort)
+#define controlPort_disconnected() PTcpControlPort_disconnected(&self->constData->controlPort)
+#define controlPort_error() PTcpControlPort_error(&self->constData->controlPort)
+#define payloadPort_dataPackage(data) PTcpPayloadPort_dataPackage(&self->constData->payloadPort, data)
+
+/* data receive ports */
+
+/* data send ports */
+
+/* saps */
+
+/* replicated event ports */
+
+/* services */
+
+/* operations */
+#define hasError() ATcpServer_hasError(self)
+#define setErrorCode(value) ATcpServer_setErrorCode(self, value)
+
+/* attributes */
+#define lastError (self->lastError)
+#define payloadRecvBuffer (self->payloadRecvBuffer)
+#define server (self->server)
+
+/* port operations */
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_ATCPSERVER_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.c
new file mode 100644
index 000000000..10dc9c9e7
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.c
@@ -0,0 +1,21 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DTcpControl
+ *
+ */
+
+#include <string.h>
+
+#include "DTcpControl.h"
+#include "DTcpControl_Utils.h"
+
+
+
+/*--------------------- operations ---------------------*/
+
+void DTcpControl_deepCopy(DTcpControl* source, DTcpControl* target) {
+ memcpy(target, source, sizeof(DTcpControl));
+}
+
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.h
new file mode 100644
index 000000000..0d1c71664
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl.h
@@ -0,0 +1,30 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DTcpControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_H_
+#define _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_H_
+
+#include "etDatatypes.h"
+
+
+
+typedef struct {
+ /*--------------------- attributes ---------------------*/
+ charPtr IPAddr;
+ int32 TcpPort;
+} DTcpControl;
+
+
+
+/*--------------------- operations ---------------------*/
+
+/* deep copy */
+void DTcpControl_deepCopy(DTcpControl* source, DTcpControl* target);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl_Utils.h
new file mode 100644
index 000000000..72ec2d877
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpControl_Utils.h
@@ -0,0 +1,24 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of DataClass DTcpControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_UTILS_H_
+
+#include "room/basic/service/tcp/DTcpControl.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+/* operations */
+
+/* attributes */
+#define IPAddr (self->IPAddr)
+#define TcpPort (self->TcpPort)
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_DTCPCONTROL_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.c
new file mode 100644
index 000000000..3b10701ad
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.c
@@ -0,0 +1,41 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass DTcpPayload
+ *
+ */
+
+#include <string.h>
+
+#include "DTcpPayload.h"
+#include "DTcpPayload_Utils.h"
+
+
+
+/*--------------------- operations ---------------------*/
+ int32 DTcpPayload_getMaxLength(DTcpPayload* self) {
+ return 32;
+}
+ void DTcpPayload_setAsString(DTcpPayload* self, charPtr value) {
+ /* used macros: data, length */
+ int valLength = (strlen(value)+1 > 32)? 32 : strlen(value) + 1;
+ memcpy(data, value, valLength);
+ data[31] = '\0';
+ length = valLength;
+}
+ void DTcpPayload_setData(DTcpPayload* self, int8* value, int32 size) {
+ /* used macros: data, length */
+ strncpy(data, value, ((size>32)?32:size));
+ length = size;
+}
+ charPtr DTcpPayload_getAsString(DTcpPayload* self) {
+ /* used macros: data */
+ data[31] = '\0';
+ return data;
+}
+
+void DTcpPayload_deepCopy(DTcpPayload* source, DTcpPayload* target) {
+ memcpy(target, source, sizeof(DTcpPayload));
+}
+
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.h
new file mode 100644
index 000000000..23aa03dd3
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload.h
@@ -0,0 +1,36 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass DTcpPayload
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_H_
+#define _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_H_
+
+#include "etDatatypes.h"
+
+
+
+typedef struct {
+ /*--------------------- attributes ---------------------*/
+ int32 connectionId;
+ int32 length;
+ int8 data[32]
+ ;
+} DTcpPayload;
+
+
+
+/*--------------------- operations ---------------------*/
+ int32 DTcpPayload_getMaxLength(DTcpPayload* self);
+ void DTcpPayload_setAsString(DTcpPayload* self, charPtr value);
+ void DTcpPayload_setData(DTcpPayload* self, int8* value, int32 size);
+ charPtr DTcpPayload_getAsString(DTcpPayload* self);
+
+/* deep copy */
+void DTcpPayload_deepCopy(DTcpPayload* source, DTcpPayload* target);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload_Utils.h
new file mode 100644
index 000000000..d25b6bfca
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/DTcpPayload_Utils.h
@@ -0,0 +1,29 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of DataClass DTcpPayload
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_UTILS_H_
+
+#include "room/basic/service/tcp/DTcpPayload.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+/* operations */
+#define getMaxLength() DTcpPayload_getMaxLength(self)
+#define setAsString(value) DTcpPayload_setAsString(self, value)
+#define setData(value, size) DTcpPayload_setData(self, value, size)
+#define getAsString() DTcpPayload_getAsString(self)
+
+/* attributes */
+#define connectionId (self->connectionId)
+#define length (self->length)
+#define data (self->data)
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_DTCPPAYLOAD_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.c
new file mode 100644
index 000000000..3c5c87a6d
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.c
@@ -0,0 +1,173 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PTcpControl
+ *
+ */
+
+#include "PTcpControl.h"
+#include "debugging/etMSCLogger.h"
+#include "PTcpControl_Utils.h"
+
+
+/*--------------------- port methods */
+
+void PTcpControlPort_connected(const PTcpControlPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlPort", "connected")
+ etPort_sendMessage(self, PTcpControl_OUT_connected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "connected", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_connected_broadcast(const PTcpControlReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "connected")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpControl_OUT_connected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "connected", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_connected(const PTcpControlReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "connected")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpControl_OUT_connected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "connected", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void PTcpControlPort_disconnected(const PTcpControlPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlPort", "disconnected")
+ etPort_sendMessage(self, PTcpControl_OUT_disconnected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "disconnected", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_disconnected_broadcast(const PTcpControlReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "disconnected")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpControl_OUT_disconnected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "disconnected", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_disconnected(const PTcpControlReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "disconnected")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpControl_OUT_disconnected, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "disconnected", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void PTcpControlPort_error(const PTcpControlPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlPort", "error")
+ etPort_sendMessage(self, PTcpControl_OUT_error, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "error", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_error_broadcast(const PTcpControlReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "error")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpControl_OUT_error, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "error", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlReplPort_error(const PTcpControlReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlReplPort", "error")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpControl_OUT_error, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "error", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTcpControlReplPort_getReplication(const PTcpControlReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void PTcpControlConjPort_connect(const PTcpControlConjPort* self, DTcpControl* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjPort", "connect")
+ etPort_sendMessage(self, PTcpControl_IN_connect, sizeof(DTcpControl), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "connect", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlConjReplPort_connect_broadcast(const PTcpControlConjReplPort* self, DTcpControl* data__et) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjReplPort", "connect")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpControl_IN_connect, sizeof(DTcpControl), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "connect", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlConjReplPort_connect(const PTcpControlConjReplPort* self, int idx__et, DTcpControl* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjReplPort", "connect")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpControl_IN_connect, sizeof(DTcpControl), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "connect", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void PTcpControlConjPort_disconnect(const PTcpControlConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjPort", "disconnect")
+ etPort_sendMessage(self, PTcpControl_IN_disconnect, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "disconnect", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlConjReplPort_disconnect_broadcast(const PTcpControlConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjReplPort", "disconnect")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpControl_IN_disconnect, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "disconnect", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpControlConjReplPort_disconnect(const PTcpControlConjReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpControlConjReplPort", "disconnect")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpControl_IN_disconnect, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "disconnect", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTcpControlConjReplPort_getReplication(const PTcpControlConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const PTcpControl_messageStrings[] = {"MIN", "connected","disconnected","error","connect", "disconnect", "MAX"};
+
+const char* PTcpControl_getMessageString(int msg_id) {
+ if (msg_id<PTcpControl_MSG_MIN || msg_id>PTcpControl_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return PTcpControl_messageStrings[msg_id];
+ }
+}
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.h
new file mode 100644
index 000000000..2809a5f03
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl.h
@@ -0,0 +1,67 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PTcpControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_H_
+#define _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+
+#include "room/basic/service/tcp/DTcpControl.h"
+
+
+/* message IDs */
+enum PTcpControl_msg_ids {
+ PTcpControl_MSG_MIN = 0,
+ PTcpControl_OUT_connected = 1,
+ PTcpControl_OUT_disconnected = 2,
+ PTcpControl_OUT_error = 3,
+ PTcpControl_IN_connect = 4,
+ PTcpControl_IN_disconnect = 5,
+ PTcpControl_MSG_MAX = 6
+};
+
+/*--------------------- port structs and methods */
+typedef etPort PTcpControlPort;
+typedef etReplPort PTcpControlReplPort;
+
+
+void PTcpControlPort_connected(const PTcpControlPort* self);
+void PTcpControlReplPort_connected_broadcast(const PTcpControlReplPort* self);
+void PTcpControlReplPort_connected(const PTcpControlReplPort* self, int idx);
+void PTcpControlPort_disconnected(const PTcpControlPort* self);
+void PTcpControlReplPort_disconnected_broadcast(const PTcpControlReplPort* self);
+void PTcpControlReplPort_disconnected(const PTcpControlReplPort* self, int idx);
+void PTcpControlPort_error(const PTcpControlPort* self);
+void PTcpControlReplPort_error_broadcast(const PTcpControlReplPort* self);
+void PTcpControlReplPort_error(const PTcpControlReplPort* self, int idx);
+
+
+etInt32 PTcpControlReplPort_getReplication(const PTcpControlReplPort* self);
+typedef etPort PTcpControlConjPort;
+typedef etReplPort PTcpControlConjReplPort;
+
+
+void PTcpControlConjPort_connect(const PTcpControlConjPort* self, DTcpControl* data);
+void PTcpControlConjReplPort_connect_broadcast(const PTcpControlConjReplPort* self, DTcpControl* data);
+void PTcpControlConjReplPort_connect(const PTcpControlConjReplPort* self, int idx, DTcpControl* data);
+void PTcpControlConjPort_disconnect(const PTcpControlConjPort* self);
+void PTcpControlConjReplPort_disconnect_broadcast(const PTcpControlConjReplPort* self);
+void PTcpControlConjReplPort_disconnect(const PTcpControlConjReplPort* self, int idx);
+
+
+etInt32 PTcpControlConjReplPort_getReplication(const PTcpControlConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* PTcpControl_getMessageString(int msg_id);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl_Utils.h
new file mode 100644
index 000000000..06b3b7792
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpControl_Utils.h
@@ -0,0 +1,19 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ProtocolClass PTcpControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_UTILS_H_
+
+#include "room/basic/service/tcp/PTcpControl.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_PTCPCONTROL_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.c
new file mode 100644
index 000000000..1d89e5600
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.c
@@ -0,0 +1,92 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PTcpPayload
+ *
+ */
+
+#include "PTcpPayload.h"
+#include "debugging/etMSCLogger.h"
+#include "PTcpPayload_Utils.h"
+
+
+/*--------------------- port methods */
+
+void PTcpPayloadPort_dataPackage(const PTcpPayloadPort* self, DTcpPayload* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadPort", "dataPackage")
+ etPort_sendMessage(self, PTcpPayload_OUT_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "dataPackage", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpPayloadReplPort_dataPackage_broadcast(const PTcpPayloadReplPort* self, DTcpPayload* data__et) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadReplPort", "dataPackage")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpPayload_OUT_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "dataPackage", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpPayloadReplPort_dataPackage(const PTcpPayloadReplPort* self, int idx__et, DTcpPayload* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadReplPort", "dataPackage")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpPayload_OUT_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "dataPackage", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTcpPayloadReplPort_getReplication(const PTcpPayloadReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void PTcpPayloadConjPort_dataPackage(const PTcpPayloadConjPort* self, DTcpPayload* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadConjPort", "dataPackage")
+ etPort_sendMessage(self, PTcpPayload_IN_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "dataPackage", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpPayloadConjReplPort_dataPackage_broadcast(const PTcpPayloadConjReplPort* self, DTcpPayload* data__et) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadConjReplPort", "dataPackage")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTcpPayload_IN_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "dataPackage", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTcpPayloadConjReplPort_dataPackage(const PTcpPayloadConjReplPort* self, int idx__et, DTcpPayload* data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTcpPayloadConjReplPort", "dataPackage")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTcpPayload_IN_dataPackage, sizeof(DTcpPayload), data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "dataPackage", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTcpPayloadConjReplPort_getReplication(const PTcpPayloadConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const PTcpPayload_messageStrings[] = {"MIN", "dataPackage","dataPackage", "MAX"};
+
+const char* PTcpPayload_getMessageString(int msg_id) {
+ if (msg_id<PTcpPayload_MSG_MIN || msg_id>PTcpPayload_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return PTcpPayload_messageStrings[msg_id];
+ }
+}
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.h
new file mode 100644
index 000000000..b27deac85
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload.h
@@ -0,0 +1,55 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PTcpPayload
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_H_
+#define _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+
+#include "room/basic/service/tcp/DTcpPayload.h"
+
+
+/* message IDs */
+enum PTcpPayload_msg_ids {
+ PTcpPayload_MSG_MIN = 0,
+ PTcpPayload_OUT_dataPackage = 1,
+ PTcpPayload_IN_dataPackage = 2,
+ PTcpPayload_MSG_MAX = 3
+};
+
+/*--------------------- port structs and methods */
+typedef etPort PTcpPayloadPort;
+typedef etReplPort PTcpPayloadReplPort;
+
+
+void PTcpPayloadPort_dataPackage(const PTcpPayloadPort* self, DTcpPayload* data);
+void PTcpPayloadReplPort_dataPackage_broadcast(const PTcpPayloadReplPort* self, DTcpPayload* data);
+void PTcpPayloadReplPort_dataPackage(const PTcpPayloadReplPort* self, int idx, DTcpPayload* data);
+
+
+etInt32 PTcpPayloadReplPort_getReplication(const PTcpPayloadReplPort* self);
+typedef etPort PTcpPayloadConjPort;
+typedef etReplPort PTcpPayloadConjReplPort;
+
+
+void PTcpPayloadConjPort_dataPackage(const PTcpPayloadConjPort* self, DTcpPayload* data);
+void PTcpPayloadConjReplPort_dataPackage_broadcast(const PTcpPayloadConjReplPort* self, DTcpPayload* data);
+void PTcpPayloadConjReplPort_dataPackage(const PTcpPayloadConjReplPort* self, int idx, DTcpPayload* data);
+
+
+etInt32 PTcpPayloadConjReplPort_getReplication(const PTcpPayloadConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* PTcpPayload_getMessageString(int msg_id);
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload_Utils.h
new file mode 100644
index 000000000..260b9e6ee
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/tcp/PTcpPayload_Utils.h
@@ -0,0 +1,19 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ProtocolClass PTcpPayload
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_UTILS_H_
+
+#include "room/basic/service/tcp/PTcpPayload.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+
+#endif /* _ROOM_BASIC_SERVICE_TCP_PTCPPAYLOAD_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.c
new file mode 100644
index 000000000..c2f7f4acd
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.c
@@ -0,0 +1,406 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ATimingService
+ *
+ */
+
+#include "ATimingService.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "base/etMemory.h"
+
+#include "room/basic/service/timing/PTimer.h"
+
+#include "ATimingService_Utils.h"
+
+/*--------------------- begin user code ---------------------*/
+/*uc3*/
+/*--------------------- end user code ---------------------*/
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_timer = 1
+};
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_Operational = 2,
+ STATE_MAX = 3
+};
+
+/* transition chains */
+enum ChainIDs {
+ CHAIN_TRANS_INITIAL_TO__Operational = 1,
+ CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1 = 2,
+ CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3 = 3,
+ CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4 = 4
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_timer__startTimer = IFITEM_timer + EVT_SHIFT*PTimer_IN_startTimer,
+ TRIG_timer__startTimeout = IFITEM_timer + EVT_SHIFT*PTimer_IN_startTimeout,
+ TRIG_timer__kill = IFITEM_timer + EVT_SHIFT*PTimer_IN_kill
+};
+
+/* state names */
+static char* stateStrings[] = {"<no state>","<top>","Operational"
+};
+
+static void setState(ATimingService* self, etInt16 new_state) {
+ self->state = new_state;
+ ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])
+}
+
+static etInt16 getState(ATimingService* self) {
+ return self->state;
+}
+
+/* Entry and Exit Codes */
+static void entry_Operational(ATimingService* self) {
+ /* prepare */
+}
+static void do_Operational(ATimingService* self) {
+ /* maintain timers */
+ etTimerControlBlock* temp;
+ etTime t;
+
+ getTimeFromTarget(&t);
+ while (usedTcbsRoot !=0 ){
+ if (isTimeGreater(&t,&(usedTcbsRoot->expTime))){
+ timer_timeout(usedTcbsRoot->portIdx);
+ temp=usedTcbsRoot;
+ usedTcbsRoot=usedTcbsRoot->next;
+ if((temp->pTime.sec==0)&&(temp->pTime.nSec==0)){
+ /* single shot timer */
+ returnTcb(temp);
+ }else{
+ /* periodic timer */
+ addTime(&temp->expTime,&temp->pTime);
+ putTcbToUsedList(temp);
+ }
+ }else{
+ break;
+ }
+ }
+}
+
+/* Action Codes */
+static void action_TRANS_INITIAL_TO__Operational(ATimingService* self) {
+ int i;
+ usedTcbsRoot=0;
+ freeTcbsRoot=&tcbs[0];
+ tcbs[ET_NB_OF_TCBS-1].next=0;
+ for (i=0;i<ET_NB_OF_TCBS-1;i++){
+ tcbs[i].next=&tcbs[i+1];
+ }
+}
+static void action_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1(ATimingService* self, const InterfaceItemBase* ifitem, uint32 time) {
+ etTimerControlBlock* timer = getTcb();
+ etTime t;
+ if (timer!= 0){
+ t.sec=time/1000;
+ t.nSec=(time%1000)*1000000L;
+ timer->pTime.sec = 0;
+ timer->pTime.nSec = 0;
+ timer->portIdx=((etReplSubPort*)ifitem)->index;
+ getTimeFromTarget(&(timer->expTime));
+ addTime(&(timer->expTime),&t);
+ putTcbToUsedList(timer);
+ }
+}
+static void action_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3(ATimingService* self, const InterfaceItemBase* ifitem, uint32 time) {
+ etTimerControlBlock* timer = getTcb();
+ etTime t;
+ if (timer!= 0){
+ t.sec=time/1000;
+ t.nSec=(time%1000)*1000000L;
+ timer->pTime = t;
+ timer->portIdx=((etReplSubPort*)ifitem)->index;
+ getTimeFromTarget(&(timer->expTime));
+ addTime(&(timer->expTime),&t);
+ putTcbToUsedList(timer);
+ }
+}
+static void action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(ATimingService* self, const InterfaceItemBase* ifitem) {
+ removeTcbFromUsedList(((etReplSubPort*)ifitem)->index);
+}
+
+/* State Switch Methods */
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+static void exitTo(ATimingService* self, etInt16 current__et, etInt16 to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_Operational:
+ self->history[STATE_TOP] = STATE_Operational;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+}
+
+/**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+static etInt16 executeTransitionChain(ATimingService* self, int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et) {
+ switch (chain__et) {
+ case CHAIN_TRANS_INITIAL_TO__Operational:
+ {
+ action_TRANS_INITIAL_TO__Operational(self);
+ return STATE_Operational;
+ }
+ case CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1:
+ {
+ uint32 time = *((uint32*) generic_data__et);
+ action_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1(self, ifitem, time);
+ return STATE_Operational;
+ }
+ case CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3:
+ {
+ uint32 time = *((uint32*) generic_data__et);
+ action_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3(self, ifitem, time);
+ return STATE_Operational;
+ }
+ case CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4:
+ {
+ action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(self, ifitem);
+ return STATE_Operational;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+static etInt16 enterHistory(ATimingService* self, etInt16 state__et) {
+ etBool skip_entry__et = ET_FALSE;
+ if (state__et >= STATE_MAX) {
+ state__et = (etInt16) (state__et - STATE_MAX);
+ skip_entry__et = ET_TRUE;
+ }
+ while (ET_TRUE) {
+ switch (state__et) {
+ case STATE_Operational:
+ if (!(skip_entry__et)) entry_Operational(self);
+ /* in leaf state: return state id */
+ return STATE_Operational;
+ case STATE_TOP:
+ state__et = self->history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = ET_FALSE;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+}
+
+static void ATimingService_executeInitTransition(ATimingService* self) {
+ int chain__et = CHAIN_TRANS_INITIAL_TO__Operational;
+ etInt16 next__et = executeTransitionChain(self, chain__et, NULL, NULL);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void ATimingService_receiveEventInternal(ATimingService* self, InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et) {
+ int trigger__et = (ifitem==NULL)? POLLING : localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ etInt16 catching_state__et = NO_STATE;
+ ((void)trigger__et); /* avoids unused warning */
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState(self)) {
+ case STATE_Operational:
+ switch(trigger__et) {
+ case POLLING:
+ do_Operational(self);
+ break;
+ case TRIG_timer__startTimeout:
+ {
+ chain__et = CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__startTimer:
+ {
+ chain__et = CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__kill:
+ {
+ chain__et = CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(self, getState(self), catching_state__et);
+ {
+ etInt16 next__et = executeTransitionChain(self, chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+ }
+ }
+}
+static void ATimingService_receiveEvent(ATimingService* self, InterfaceItemBase* ifitem, int evt, void* generic_data__et) {
+ int localId = (ifitem==NULL)? 0 : ifitem->localId;
+ ATimingService_receiveEventInternal(self, ifitem, localId, evt, generic_data__et);
+}
+
+void ATimingService_init(ATimingService* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATimingService", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<ATIMINGSERVICE_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ ATimingService_executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ATimingService_receiveMessage(void* self, const void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATimingService", "_receiveMessage")
+ ATimingService_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void ATimingService_execute(ATimingService* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("ATimingService", "_execute")
+
+ ATimingService_receiveEvent(self, NULL, 0, NULL);
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+/*--------------------- user constructor/destructor ---------------------*/
+
+/*--------------------- operations ---------------------*/
+ void ATimingService_returnTcb(ATimingService* self, etTimerControlBlock* block) {
+ block->next=freeTcbsRoot;
+ freeTcbsRoot=block;
+}
+ void ATimingService_putTcbToUsedList(ATimingService* self, etTimerControlBlock* block) {
+ etTimerControlBlock* temp=usedTcbsRoot;
+ etTimerControlBlock* temp2=usedTcbsRoot;
+
+ if (temp==0){
+ /* list empty put new block to root */
+ block->next=0;
+ usedTcbsRoot=block;
+ return;
+ }
+
+ while(1){
+ if (temp != 0){
+ if (isTimeGreater(&block->expTime,&temp->expTime)){
+ /* try next position */
+ temp2=temp;
+ temp=temp->next;
+ }else{
+ /* right position found */
+ block->next=temp;
+ if(temp==usedTcbsRoot){
+ usedTcbsRoot=block;
+ }else{
+ temp2->next=block;
+ }
+ return;
+ }
+ }else{
+ /* end of list reached */
+ block->next=0;
+ temp2->next=block;
+ return;
+ }
+ }
+}
+ void ATimingService_addTime(ATimingService* self, etTime* t1, etTime* t2) {
+ t1->sec += t2->sec;
+ t1->nSec += t2->nSec;
+ while(t1->nSec >= 1000000000L){
+ t1->sec++;
+ t1->nSec-=1000000000L;
+ }
+}
+ etTimerControlBlock* ATimingService_getTcb(ATimingService* self) {
+ etTimerControlBlock* temp = freeTcbsRoot;
+
+ if(freeTcbsRoot!=0) {
+ freeTcbsRoot=freeTcbsRoot->next;
+ temp->next=0;
+ }
+ return temp;
+}
+ void ATimingService_removeTcbFromUsedList(ATimingService* self, int32 idx) {
+ etTimerControlBlock* temp=usedTcbsRoot;
+ etTimerControlBlock* temp2=usedTcbsRoot;
+
+ if (temp==0) return;
+
+ if (usedTcbsRoot->portIdx == idx){
+ /* element found, the first one */
+ usedTcbsRoot = usedTcbsRoot->next;
+ returnTcb(temp);
+ return;
+ }
+
+ temp=temp->next;
+ while(temp!=0){
+ if(temp->portIdx==idx){
+ temp2->next=temp->next;
+ returnTcb(temp);
+ return;
+ }else{
+ /* try next */
+ temp2=temp;
+ temp=temp->next;
+ }
+ }
+}
+ bool ATimingService_isTimeGreater(ATimingService* self, etTime* t1, etTime* t2) {
+ if (t1->sec > t2->sec) return ET_TRUE;
+ if (t1->sec < t2->sec) return ET_FALSE;
+ if (t1->nSec > t2->nSec) return ET_TRUE;
+ return ET_FALSE;
+}
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.h
new file mode 100644
index 000000000..36e86ddc9
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService.h
@@ -0,0 +1,89 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ATimingService
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_
+#define _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "room/basic/service/timing/PTimer.h"
+
+/*--------------------- begin user code ---------------------*/
+#include "osal/etTime.h"
+#define ET_NB_OF_TCBS 30
+typedef struct etTCB etTimerControlBlock;
+struct etTCB {
+ etTime expTime;
+ etTime pTime;
+ int32 portIdx;
+ etTimerControlBlock* next;
+ };
+/*--------------------- end user code ---------------------*/
+
+typedef struct ATimingService ATimingService;
+
+/* const part of ActorClass (ROM) */
+typedef struct ATimingService_const {
+ const char* instName;
+
+ /* simple ports */
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+
+ /* services */
+ const etReplPort timer;
+} ATimingService_const;
+
+
+/* constant for state machine data */
+#define ATIMINGSERVICE_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct ATimingService {
+ const ATimingService_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+ etTimerControlBlock tcbs[30]
+ ;
+ etTimerControlBlock* usedTcbsRoot;
+ etTimerControlBlock* freeTcbsRoot;
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[ATIMINGSERVICE_HISTORY_SIZE];
+};
+
+void ATimingService_init(ATimingService* self);
+
+void ATimingService_receiveMessage(void* self, const void* ifitem, const etMessage* msg);
+
+void ATimingService_execute(ATimingService* self);
+
+/*--------------------- user constructor/destructor ---------------------*/
+
+/*--------------------- operations ---------------------*/
+ void ATimingService_returnTcb(ATimingService* self, etTimerControlBlock* block);
+ void ATimingService_putTcbToUsedList(ATimingService* self, etTimerControlBlock* block);
+ void ATimingService_addTime(ATimingService* self, etTime* t1, etTime* t2);
+ etTimerControlBlock* ATimingService_getTcb(ATimingService* self);
+ void ATimingService_removeTcbFromUsedList(ATimingService* self, int32 idx);
+ bool ATimingService_isTimeGreater(ATimingService* self, etTime* t1, etTime* t2);
+
+/*--------------------- begin user code ---------------------*/
+/*uc2*/
+/*--------------------- end user code ---------------------*/
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService_Utils.h
new file mode 100644
index 000000000..572eac37c
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/ATimingService_Utils.h
@@ -0,0 +1,47 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ActorClass ATimingService
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_UTILS_H_
+
+#include "room/basic/service/timing/ATimingService.h"
+
+/*
+ * access macros for ports, operations and attributes
+*/
+
+/* simple event ports */
+
+/* data receive ports */
+
+/* data send ports */
+
+/* saps */
+
+/* replicated event ports */
+
+/* services */
+#define timer_timeout_broadcast() PTimerReplPort_timeout_broadcast(&self->constData->timer)
+#define timer_timeout(idx) PTimerReplPort_timeout(&self->constData->timer, idx)
+
+/* operations */
+#define returnTcb(block) ATimingService_returnTcb(self, block)
+#define putTcbToUsedList(block) ATimingService_putTcbToUsedList(self, block)
+#define addTime(t1, t2) ATimingService_addTime(self, t1, t2)
+#define getTcb() ATimingService_getTcb(self)
+#define removeTcbFromUsedList(idx) ATimingService_removeTcbFromUsedList(self, idx)
+#define isTimeGreater(t1, t2) ATimingService_isTimeGreater(self, t1, t2)
+
+/* attributes */
+#define tcbs (self->tcbs)
+#define usedTcbsRoot (self->usedTcbsRoot)
+#define freeTcbsRoot (self->freeTcbsRoot)
+
+/* port operations */
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.c
new file mode 100644
index 000000000..1f6395e05
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.c
@@ -0,0 +1,141 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PTimer
+ *
+ */
+
+#include "PTimer.h"
+#include "debugging/etMSCLogger.h"
+#include "PTimer_Utils.h"
+
+
+/*--------------------- port methods */
+
+void PTimerPort_timeout(const PTimerPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTimerPort", "timeout")
+ etPort_sendMessage(self, PTimer_OUT_timeout, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "timeout", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTimerReplPort_timeout_broadcast(const PTimerReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTimerReplPort", "timeout")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTimer_OUT_timeout, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "timeout", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTimerReplPort_timeout(const PTimerReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTimerReplPort", "timeout")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTimer_OUT_timeout, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "timeout", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTimerReplPort_getReplication(const PTimerReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void PTimerConjPort_startTimer(const PTimerConjPort* self, uint32 data__et) {
+ if (status==0){
+ status=ET_TIMER_RUNNING | ET_TIMER_PERIODIC;
+ etPort_sendMessage(self, PTimer_IN_startTimer, sizeof(int32), &data__et);
+ }
+}
+
+void PTimerConjReplPort_startTimer_broadcast(const PTimerConjReplPort* self, uint32 data__et) {
+ int i;
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ PTimerConjPort_startTimer(&((etReplPort*)self)->ports[i].port, data__et);
+ }
+}
+
+void PTimerConjReplPort_startTimer(const PTimerConjReplPort* self, int idx__et, uint32 data__et) {
+ PTimerConjPort_startTimer(&((etReplPort*)self)->ports[idx__et].port, data__et);
+}
+
+
+void PTimerConjPort_startTimeout(const PTimerConjPort* self, uint32 data__et) {
+ if (status==0){
+ status = ET_TIMER_RUNNING;
+ etPort_sendMessage(self, PTimer_IN_startTimeout, sizeof(int32), &data__et);
+ }
+}
+
+void PTimerConjReplPort_startTimeout_broadcast(const PTimerConjReplPort* self, uint32 data__et) {
+ int i;
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ PTimerConjPort_startTimeout(&((etReplPort*)self)->ports[i].port, data__et);
+ }
+}
+
+void PTimerConjReplPort_startTimeout(const PTimerConjReplPort* self, int idx__et, uint32 data__et) {
+ PTimerConjPort_startTimeout(&((etReplPort*)self)->ports[idx__et].port, data__et);
+}
+
+
+void PTimerConjPort_kill(const PTimerConjPort* self) {
+ if (status!=0){
+ status=0;
+ etPort_sendMessage(self, PTimer_IN_kill, 0,NULL);
+ }
+}
+
+void PTimerConjReplPort_kill_broadcast(const PTimerConjReplPort* self) {
+ int i;
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ PTimerConjPort_kill(&((etReplPort*)self)->ports[i].port);
+ }
+}
+
+void PTimerConjReplPort_kill(const PTimerConjReplPort* self, int idx__et) {
+ PTimerConjPort_kill(&((etReplPort*)self)->ports[idx__et].port);
+}
+
+/* begin PTimerConjPort specific (including base classes) */
+
+/*--------------------- operations ---------------------*/
+/* end PTimerConjPort specific (including base classes) */
+
+etInt32 PTimerConjReplPort_getReplication(const PTimerConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+/* receiver handlers */
+void PTimerConjPort_timeout_receiveHandler(PTimerConjPort* self, const etMessage* msg, void * actor, etActorReceiveMessage receiveMessageFunc){
+ /* TODO: clear active bit in case of single shot timer */
+ if (status!=0){
+ if (status==ET_TIMER_RUNNING){
+ /* single shot timer */
+ status=0;
+ }
+ /* msg to fsm */
+ (*receiveMessageFunc)(actor, self, msg);
+ }
+ /* hand over the message to the actor: */
+ /* (*receiveMessageFunc)(actor, self, msg); */
+}
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const PTimer_messageStrings[] = {"MIN", "timeout","startTimer", "startTimeout", "kill", "MAX"};
+
+const char* PTimer_getMessageString(int msg_id) {
+ if (msg_id<PTimer_MSG_MIN || msg_id>PTimer_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return PTimer_messageStrings[msg_id];
+ }
+}
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.h
new file mode 100644
index 000000000..585239128
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer.h
@@ -0,0 +1,76 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PTimer
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_
+#define _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+/*--------------------- begin user code ---------------------*/
+#define ET_TIMER_RUNNING 0x01
+#define ET_TIMER_PERIODIC 0x02
+/*--------------------- end user code ---------------------*/
+
+
+
+/* message IDs */
+enum PTimer_msg_ids {
+ PTimer_MSG_MIN = 0,
+ PTimer_OUT_timeout = 1,
+ PTimer_IN_startTimer = 2,
+ PTimer_IN_startTimeout = 3,
+ PTimer_IN_kill = 4,
+ PTimer_MSG_MAX = 5
+};
+
+/*--------------------- port structs and methods */
+typedef etPort PTimerPort;
+typedef etReplPort PTimerReplPort;
+
+
+void PTimerPort_timeout(const PTimerPort* self);
+void PTimerReplPort_timeout_broadcast(const PTimerReplPort* self);
+void PTimerReplPort_timeout(const PTimerReplPort* self, int idx);
+
+
+etInt32 PTimerReplPort_getReplication(const PTimerReplPort* self);
+typedef etPort PTimerConjPort;
+typedef etReplPort PTimerConjReplPort;
+
+/* variable part of PortClass (RAM) */
+typedef struct PTimerConjPort_var PTimerConjPort_var;
+struct PTimerConjPort_var {
+ /*--------------------- attributes ---------------------*/
+ int8 status;
+};
+
+void PTimerConjPort_startTimer(const PTimerConjPort* self, uint32 data);
+void PTimerConjReplPort_startTimer_broadcast(const PTimerConjReplPort* self, uint32 data);
+void PTimerConjReplPort_startTimer(const PTimerConjReplPort* self, int idx, uint32 data);
+void PTimerConjPort_startTimeout(const PTimerConjPort* self, uint32 data);
+void PTimerConjReplPort_startTimeout_broadcast(const PTimerConjReplPort* self, uint32 data);
+void PTimerConjReplPort_startTimeout(const PTimerConjReplPort* self, int idx, uint32 data);
+void PTimerConjPort_kill(const PTimerConjPort* self);
+void PTimerConjReplPort_kill_broadcast(const PTimerConjReplPort* self);
+void PTimerConjReplPort_kill(const PTimerConjReplPort* self, int idx);
+
+
+void PTimerConjPort_timeout_receiveHandler(PTimerConjPort* self, const etMessage* msg, void * actor, etActorReceiveMessage receiveMessageFunc);
+etInt32 PTimerConjReplPort_getReplication(const PTimerConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* PTimer_getMessageString(int msg_id);
+
+/*--------------------- begin user code ---------------------*/
+/*uc2*/
+/*--------------------- end user code ---------------------*/
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer_Utils.h
new file mode 100644
index 000000000..fe7e4ff1e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/service/timing/PTimer_Utils.h
@@ -0,0 +1,25 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ProtocolClass PTimer
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_PTIMER_UTILS_H_
+#define _ROOM_BASIC_SERVICE_TIMING_PTIMER_UTILS_H_
+
+#include "room/basic/service/timing/PTimer.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+/* conjugate port class */
+
+/* operations */
+
+/* attributes */
+#define status (((PTimerConjPort_var*)(self->varData))->status)
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_PTIMER_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.c
new file mode 100644
index 000000000..7d5c5db58
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.c
@@ -0,0 +1,119 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PTestControl
+ *
+ */
+
+#include "PTestControl.h"
+#include "debugging/etMSCLogger.h"
+#include "PTestControl_Utils.h"
+
+
+/*--------------------- port methods */
+
+void PTestControlPort_done(const PTestControlPort* self, bool data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlPort", "done")
+ etPort_sendMessage(self, PTestControl_OUT_done, sizeof(bool), &data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "done", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlReplPort_done_broadcast(const PTestControlReplPort* self, bool data__et) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlReplPort", "done")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTestControl_OUT_done, sizeof(bool), &data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "done", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlReplPort_done(const PTestControlReplPort* self, int idx__et, bool data__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlReplPort", "done")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTestControl_OUT_done, sizeof(bool), &data__et);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "done", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTestControlReplPort_getReplication(const PTestControlReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void PTestControlConjPort_start(const PTestControlConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjPort", "start")
+ etPort_sendMessage(self, PTestControl_IN_start, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "start", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlConjReplPort_start_broadcast(const PTestControlConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjReplPort", "start")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTestControl_IN_start, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "start", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlConjReplPort_start(const PTestControlConjReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjReplPort", "start")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTestControl_IN_start, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "start", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void PTestControlConjPort_abort(const PTestControlConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjPort", "abort")
+ etPort_sendMessage(self, PTestControl_IN_abort, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, "abort", self->peerInstName)
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlConjReplPort_abort_broadcast(const PTestControlConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjReplPort", "abort")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[i].port), PTestControl_IN_abort, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, "abort", ((etReplPort*)self)->ports[i].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void PTestControlConjReplPort_abort(const PTestControlConjReplPort* self, int idx__et) {
+ ET_MSC_LOGGER_SYNC_ENTRY("PTestControlConjReplPort", "abort")
+ if (0<=idx__et && idx__et<((etReplPort*)self)->size) {
+ etPort_sendMessage((&((etReplPort*)self)->ports[idx__et].port), PTestControl_IN_abort, 0, NULL);
+ ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, "abort", ((etReplPort*)self)->ports[idx__et].port.peerInstName)
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+etInt32 PTestControlConjReplPort_getReplication(const PTestControlConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const PTestControl_messageStrings[] = {"MIN", "done","start", "abort", "MAX"};
+
+const char* PTestControl_getMessageString(int msg_id) {
+ if (msg_id<PTestControl_MSG_MIN || msg_id>PTestControl_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return PTestControl_messageStrings[msg_id];
+ }
+}
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.h
new file mode 100644
index 000000000..380b03803
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl.h
@@ -0,0 +1,58 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PTestControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_TEST_PTESTCONTROL_H_
+#define _ROOM_BASIC_TEST_PTESTCONTROL_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+
+
+
+/* message IDs */
+enum PTestControl_msg_ids {
+ PTestControl_MSG_MIN = 0,
+ PTestControl_OUT_done = 1,
+ PTestControl_IN_start = 2,
+ PTestControl_IN_abort = 3,
+ PTestControl_MSG_MAX = 4
+};
+
+/*--------------------- port structs and methods */
+typedef etPort PTestControlPort;
+typedef etReplPort PTestControlReplPort;
+
+
+void PTestControlPort_done(const PTestControlPort* self, bool data);
+void PTestControlReplPort_done_broadcast(const PTestControlReplPort* self, bool data);
+void PTestControlReplPort_done(const PTestControlReplPort* self, int idx, bool data);
+
+
+etInt32 PTestControlReplPort_getReplication(const PTestControlReplPort* self);
+typedef etPort PTestControlConjPort;
+typedef etReplPort PTestControlConjReplPort;
+
+
+void PTestControlConjPort_start(const PTestControlConjPort* self);
+void PTestControlConjReplPort_start_broadcast(const PTestControlConjReplPort* self);
+void PTestControlConjReplPort_start(const PTestControlConjReplPort* self, int idx);
+void PTestControlConjPort_abort(const PTestControlConjPort* self);
+void PTestControlConjReplPort_abort_broadcast(const PTestControlConjReplPort* self);
+void PTestControlConjReplPort_abort(const PTestControlConjReplPort* self, int idx);
+
+
+etInt32 PTestControlConjReplPort_getReplication(const PTestControlConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* PTestControl_getMessageString(int msg_id);
+
+
+#endif /* _ROOM_BASIC_TEST_PTESTCONTROL_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl_Utils.h
new file mode 100644
index 000000000..1528e06f5
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/PTestControl_Utils.h
@@ -0,0 +1,19 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ProtocolClass PTestControl
+ *
+ */
+
+#ifndef _ROOM_BASIC_TEST_PTESTCONTROL_UTILS_H_
+#define _ROOM_BASIC_TEST_PTESTCONTROL_UTILS_H_
+
+#include "room/basic/test/PTestControl.h"
+
+/*
+ * access macros for operations and attributes
+*/
+
+
+#endif /* _ROOM_BASIC_TEST_PTESTCONTROL_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.c b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.c
new file mode 100644
index 000000000..4f5bf3747
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.c
@@ -0,0 +1,220 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass SequentialTestExecutor
+ *
+ */
+
+#include "SequentialTestExecutor.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "base/etMemory.h"
+
+#include "room/basic/test/PTestControl.h"
+
+#include "SequentialTestExecutor_Utils.h"
+
+/*--------------------- begin user code ---------------------*/
+#include "etUnit/etUnit.h"
+/*--------------------- end user code ---------------------*/
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_control = 1
+};
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_execute = 2,
+ STATE_MAX = 3
+};
+
+/* transition chains */
+enum ChainIDs {
+ CHAIN_TRANS_INITIAL_TO__execute = 1,
+ CHAIN_TRANS_tr0_FROM_execute_TO_execute_BY_donecontrol_tr0 = 2
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_control__done = IFITEM_control + EVT_SHIFT*PTestControl_OUT_done
+};
+
+/* state names */
+static char* stateStrings[] = {"<no state>","<top>","execute"
+};
+
+static void setState(SequentialTestExecutor* self, etInt16 new_state) {
+ self->state = new_state;
+ ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])
+}
+
+static etInt16 getState(SequentialTestExecutor* self) {
+ return self->state;
+}
+
+/* Entry and Exit Codes */
+static void entry_execute(SequentialTestExecutor* self) {
+ if(next < self->constData->control.size){
+ control_start(next++);
+ } else {
+ etUnit_testFinished(0);
+ }
+}
+
+/* Action Codes */
+
+/* State Switch Methods */
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+static void exitTo(SequentialTestExecutor* self, etInt16 current__et, etInt16 to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_execute:
+ self->history[STATE_TOP] = STATE_execute;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+}
+
+/**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+static etInt16 executeTransitionChain(SequentialTestExecutor* self, int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et) {
+ switch (chain__et) {
+ case CHAIN_TRANS_INITIAL_TO__execute:
+ {
+ return STATE_execute;
+ }
+ case CHAIN_TRANS_tr0_FROM_execute_TO_execute_BY_donecontrol_tr0:
+ {
+ bool success = *((bool*) generic_data__et);
+ return STATE_execute;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+static etInt16 enterHistory(SequentialTestExecutor* self, etInt16 state__et) {
+ etBool skip_entry__et = ET_FALSE;
+ if (state__et >= STATE_MAX) {
+ state__et = (etInt16) (state__et - STATE_MAX);
+ skip_entry__et = ET_TRUE;
+ }
+ while (ET_TRUE) {
+ switch (state__et) {
+ case STATE_execute:
+ if (!(skip_entry__et)) entry_execute(self);
+ /* in leaf state: return state id */
+ return STATE_execute;
+ case STATE_TOP:
+ state__et = self->history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = ET_FALSE;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+}
+
+static void SequentialTestExecutor_executeInitTransition(SequentialTestExecutor* self) {
+ int chain__et = CHAIN_TRANS_INITIAL_TO__execute;
+ etInt16 next__et = executeTransitionChain(self, chain__et, NULL, NULL);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void SequentialTestExecutor_receiveEventInternal(SequentialTestExecutor* self, InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ etInt16 catching_state__et = NO_STATE;
+ ((void)trigger__et); /* avoids unused warning */
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState(self)) {
+ case STATE_execute:
+ switch(trigger__et) {
+ case TRIG_control__done:
+ {
+ chain__et = CHAIN_TRANS_tr0_FROM_execute_TO_execute_BY_donecontrol_tr0;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(self, getState(self), catching_state__et);
+ {
+ etInt16 next__et = executeTransitionChain(self, chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(self, next__et);
+ setState(self, next__et);
+ }
+ }
+}
+static void SequentialTestExecutor_receiveEvent(SequentialTestExecutor* self, InterfaceItemBase* ifitem, int evt, void* generic_data__et) {
+ int localId = (ifitem==NULL)? 0 : ifitem->localId;
+ SequentialTestExecutor_receiveEventInternal(self, ifitem, localId, evt, generic_data__et);
+}
+
+void SequentialTestExecutor_init(SequentialTestExecutor* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("SequentialTestExecutor", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<SEQUENTIALTESTEXECUTOR_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ SequentialTestExecutor_executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void SequentialTestExecutor_receiveMessage(void* self, const void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("SequentialTestExecutor", "_receiveMessage")
+ SequentialTestExecutor_receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+
+/*--------------------- operations ---------------------*/
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.h
new file mode 100644
index 000000000..597d0a43e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor.h
@@ -0,0 +1,65 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass SequentialTestExecutor
+ *
+ */
+
+#ifndef _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_H_
+#define _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "room/basic/test/PTestControl.h"
+
+
+typedef struct SequentialTestExecutor SequentialTestExecutor;
+
+/* const part of ActorClass (ROM) */
+typedef struct SequentialTestExecutor_const {
+ const char* instName;
+
+ /* simple ports */
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+ const etReplPort control;
+
+ /* services */
+} SequentialTestExecutor_const;
+
+
+/* constant for state machine data */
+#define SEQUENTIALTESTEXECUTOR_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct SequentialTestExecutor {
+ const SequentialTestExecutor_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+ int16 next;
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[SEQUENTIALTESTEXECUTOR_HISTORY_SIZE];
+};
+
+void SequentialTestExecutor_init(SequentialTestExecutor* self);
+
+void SequentialTestExecutor_receiveMessage(void* self, const void* ifitem, const etMessage* msg);
+
+
+/*--------------------- user constructor/destructor ---------------------*/
+
+/*--------------------- operations ---------------------*/
+
+
+#endif /* _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor_Utils.h b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor_Utils.h
new file mode 100644
index 000000000..65c142abb
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/src-gen/room/basic/test/SequentialTestExecutor_Utils.h
@@ -0,0 +1,42 @@
+/**
+ * @author generated by eTrice
+ *
+ * Utils File of ActorClass SequentialTestExecutor
+ *
+ */
+
+#ifndef _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_UTILS_H_
+#define _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_UTILS_H_
+
+#include "room/basic/test/SequentialTestExecutor.h"
+
+/*
+ * access macros for ports, operations and attributes
+*/
+
+/* simple event ports */
+
+/* data receive ports */
+
+/* data send ports */
+
+/* saps */
+
+/* replicated event ports */
+#define ifitem_index (((etReplSubPort*)ifitem)->index)
+#define control_start_broadcast() PTestControlConjReplPort_start_broadcast(&self->constData->control)
+#define control_start(idx) PTestControlConjReplPort_start(&self->constData->control, idx)
+#define control_abort_broadcast() PTestControlConjReplPort_abort_broadcast(&self->constData->control)
+#define control_abort(idx) PTestControlConjReplPort_abort(&self->constData->control, idx)
+
+/* services */
+
+/* operations */
+
+/* attributes */
+#define next (self->next)
+
+/* port operations */
+
+#endif /* _ROOM_BASIC_TEST_SEQUENTIALTESTEXECUTOR_UTILS_H_ */
+
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/.cproject b/runtime/org.eclipse.etrice.modellib.cpp/.cproject
index 17353cf60..e68f8efe2 100644
--- a/runtime/org.eclipse.etrice.modellib.cpp/.cproject
+++ b/runtime/org.eclipse.etrice.modellib.cpp/.cproject
@@ -12,9 +12,9 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -99,11 +99,11 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -182,11 +182,11 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -259,9 +259,9 @@
</externalSetting>
</externalSettings>
<extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
@@ -382,4 +382,5 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
</cproject>
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/.gitignore b/runtime/org.eclipse.etrice.modellib.cpp/.gitignore
index 0c47e95b1..15c665a36 100644
--- a/runtime/org.eclipse.etrice.modellib.cpp/.gitignore
+++ b/runtime/org.eclipse.etrice.modellib.cpp/.gitignore
@@ -2,8 +2,6 @@ WindowsMinGW
LinuxPosix
WindowsMinGW_ST
-src-gen/*
-!src-gen/readme.txt
src-gen-info/*
!src-gen-info/readme.txt
@@ -12,5 +10,3 @@ src-gen-info/*
*.gz
*.toc
*.log
-/MinGWDebug/
-/Debug/
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/gen_modellib.launch b/runtime/org.eclipse.etrice.modellib.cpp/gen_modellib.launch
index 20bfb754c..2b4e6e99d 100644
--- a/runtime/org.eclipse.etrice.modellib.cpp/gen_modellib.launch
+++ b/runtime/org.eclipse.etrice.modellib.cpp/gen_modellib.launch
@@ -9,7 +9,7 @@
<booleanAttribute key="MSC" value="true"/>
<listAttribute key="ModelFiles">
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.cpp/model/TimingService.room}"/>
-<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.cpp/model/Types.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.cpp/model/Tests.room}"/>
</listAttribute>
<booleanAttribute key="OverrideDirectories" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.cpp b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.cpp
new file mode 100644
index 000000000..8639764df
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.cpp
@@ -0,0 +1,399 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ATimingService
+ *
+ */
+
+#include "ATimingService.h"
+
+#include "common/messaging/RTObject.h"
+#include "common/messaging/RTServices.h"
+#include "common/debugging/DebuggingService.h"
+#include "common/debugging/MSCFunctionObject.h"
+
+using namespace etRuntime;
+
+
+/*--------------------- begin user code ---------------------*/
+// uc3
+/*--------------------- end user code ---------------------*/
+
+ATimingService::ATimingService(etRuntime::IRTObject* parent, const String& name)
+ : ActorClassBase(parent, name)
+ , timer(this, "timer", IFITEM_timer)
+ , tcbs()
+ , usedTcbsRoot(0)
+ , freeTcbsRoot(0)
+{
+ MSCFunctionObject mscFunctionObject(getInstancePathName(), "Constructor");
+
+ for (int i = 0; i < s_numberOfStates; i++) {
+ history[i] = NO_STATE;
+ }
+ setClassName("ATimingService");
+
+ // sub actors
+
+ /* user defined constructor body */
+ memset(tcbs.getData(), sizeof(tcbs), 0);
+}
+
+void ATimingService::initialize() {
+ MSCFunctionObject mscFunctionObject(getInstancePathName(), "initialize()");
+
+ ActorClassBase::initialize();
+
+
+ // wiring
+
+ // activate polling for data-driven communication
+ RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(getThread())->addPollingMessageReceiver(*this);
+}
+
+void ATimingService::setProbesActive(bool recursive, bool active) {
+ DebuggingService::getInstance().addPortInstance(m_RTSystemPort);
+ for(int i = 0; i < timer.getNInterfaceItems(); i++)
+ DebuggingService::getInstance().addPortInstance(*(timer.getInterfaceItem(i)));
+}
+
+void ATimingService::destroy(){
+ MSCFunctionObject mscFunctionObject(getInstancePathName(), "destroy()");
+
+ /* user defined destructor body */
+ DebuggingService::getInstance().addMessageActorDestroy(*this);
+ RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(getThread())->removePollingMessageReceiver(*this);
+ ActorClassBase::destroy();
+}
+
+/*--------------------- operations ---------------------*/
+ etTimerControlBlock* ATimingService::getTcb() {
+ etTimerControlBlock* temp = freeTcbsRoot;
+
+ if (freeTcbsRoot != 0) {
+ freeTcbsRoot = freeTcbsRoot->next;
+ temp->next = 0;
+ }
+ return temp;
+}
+ void ATimingService::returnTcb(etTimerControlBlock* block) {
+ block->next = freeTcbsRoot;
+ freeTcbsRoot = block;
+}
+ void ATimingService::removeTcbFromUsedList(int32 idx) {
+ etTimerControlBlock* temp = usedTcbsRoot;
+ etTimerControlBlock* temp2 = usedTcbsRoot;
+
+ if (temp == 0)
+ return;
+
+ if (usedTcbsRoot->portIdx == idx) {
+ /* element found, the first one */
+ usedTcbsRoot = usedTcbsRoot->next;
+ returnTcb(temp);
+ return;
+ }
+
+ temp = temp->next;
+ while (temp != 0) {
+ if (temp->portIdx == idx) {
+ temp2->next = temp->next;
+ returnTcb(temp);
+ return;
+ } else {
+ /* try next */
+ temp2 = temp;
+ temp = temp->next;
+ }
+ }
+}
+ void ATimingService::putTcbToUsedList(etTimerControlBlock* block) {
+ etTimerControlBlock* temp = usedTcbsRoot;
+ etTimerControlBlock* temp2 = usedTcbsRoot;
+
+ if (temp == 0) {
+ /* list empty put new block to root */
+ block->next = 0;
+ usedTcbsRoot = block;
+ return;
+ }
+
+ while (1) {
+ if (temp != 0) {
+ if (isTimeGreater(&block->expTime, &temp->expTime)) {
+ /* try next position */
+ temp2 = temp;
+ temp = temp->next;
+ } else {
+ /* right position found */
+ block->next = temp;
+ if (temp == usedTcbsRoot) {
+ usedTcbsRoot = block;
+ } else {
+ temp2->next = block;
+ }
+ return;
+ }
+ } else {
+ /* end of list reached */
+ block->next = 0;
+ temp2->next = block;
+ return;
+ }
+ }
+}
+ bool ATimingService::isTimeGreater(etTime* t1, etTime* t2) {
+ if (t1->sec > t2->sec)
+ return ET_TRUE;
+ if (t1->sec < t2->sec)
+ return ET_FALSE;
+ if (t1->nSec > t2->nSec)
+ return ET_TRUE;
+ return ET_FALSE;
+}
+ void ATimingService::addTime(etTime* t1, etTime* t2) {
+ t1->sec += t2->sec;
+ t1->nSec += t2->nSec;
+ while (t1->nSec >= 1000000000L) {
+ t1->sec++;
+ t1->nSec -= 1000000000L;
+ }
+}
+
+// state names
+const String ATimingService::s_stateStrings[] = {
+ "<no state>",
+ "<top>",
+ "Operational"
+};
+const int ATimingService::s_numberOfStates = 3;
+
+void ATimingService::setState(int new_state) {
+ DebuggingService::getInstance().addActorState(*this, s_stateStrings[new_state].c_str());
+ m_state = new_state;
+}
+
+/* Entry and Exit Codes */
+void ATimingService::entry_Operational() {
+ // prepare
+}
+ void ATimingService::do_Operational() {
+ // maintain timers
+ etTimerControlBlock* temp;
+ etTime t;
+
+ getTimeFromTarget(&t);
+ while (usedTcbsRoot != 0) {
+ if (isTimeGreater(&t, &(usedTcbsRoot->expTime))) {
+ timer.get(usedTcbsRoot->portIdx).timeout();
+ temp = usedTcbsRoot;
+ usedTcbsRoot = usedTcbsRoot->next;
+ if ((temp->pTime.sec == 0) && (temp->pTime.nSec == 0)) {
+ // single shot timer
+ returnTcb(temp);
+ } else {
+ // periodic timer
+ addTime(&temp->expTime, &temp->pTime);
+ putTcbToUsedList(temp);
+ }
+ } else {
+ break;
+ }
+ }
+}
+
+/* Action Codes */
+void ATimingService::action_TRANS_INITIAL_TO__Operational() {
+ int i;
+ usedTcbsRoot = 0;
+ freeTcbsRoot = &tcbs[0];
+ tcbs[ET_NB_OF_TCBS - 1].next = 0;
+ for (i = 0; i < ET_NB_OF_TCBS - 1; i++) {
+ tcbs[i].next = &tcbs[i + 1];
+ }
+}
+void ATimingService::action_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1(const InterfaceItemBase* ifitem, uint32 time) {
+ etTimerControlBlock* timer = getTcb();
+ etTime t;
+ if (timer != 0) {
+ t.sec = time / 1000;
+ t.nSec = (time % 1000) * 1000000L;
+ timer->pTime.sec = 0;
+ timer->pTime.nSec = 0;
+ timer->portIdx = ifitem->getIdx();
+ getTimeFromTarget(&(timer->expTime));
+ addTime(&(timer->expTime), &t);
+ putTcbToUsedList(timer);
+ }
+}
+void ATimingService::action_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3(const InterfaceItemBase* ifitem, uint32 time) {
+ etTimerControlBlock* timer = getTcb();
+ etTime t;
+ if (timer != 0) {
+ t.sec = time / 1000;
+ t.nSec = (time % 1000) * 1000000L;
+ timer->pTime = t;
+ timer->portIdx = ifitem->getIdx();
+ getTimeFromTarget(&(timer->expTime));
+ addTime(&(timer->expTime), &t);
+ putTcbToUsedList(timer);
+ }
+}
+void ATimingService::action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(const InterfaceItemBase* ifitem) {
+ removeTcbFromUsedList(ifitem->getIdx());
+}
+
+/* State Switch Methods */
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+void ATimingService::exitTo(etInt16 current__et, etInt16 to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_Operational:
+ this->history[STATE_TOP] = STATE_Operational;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+}
+
+/**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+etInt16 ATimingService::executeTransitionChain(int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et) {
+ switch (chain__et) {
+ case ATimingService::CHAIN_TRANS_INITIAL_TO__Operational:
+ {
+ action_TRANS_INITIAL_TO__Operational();
+ return STATE_Operational;
+ }
+ case ATimingService::CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1:
+ {
+ uint32 time = *(static_cast<uint32*>(generic_data__et));
+ action_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1(ifitem, time);
+ return STATE_Operational;
+ }
+ case ATimingService::CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3:
+ {
+ uint32 time = *(static_cast<uint32*>(generic_data__et));
+ action_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3(ifitem, time);
+ return STATE_Operational;
+ }
+ case ATimingService::CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4:
+ {
+ action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(ifitem);
+ return STATE_Operational;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+etInt16 ATimingService::enterHistory(etInt16 state__et) {
+ etBool skip_entry__et = false;
+ if (state__et >= STATE_MAX) {
+ state__et = (state__et - STATE_MAX);
+ skip_entry__et = true;
+ }
+ while (true) {
+ switch (state__et) {
+ case STATE_Operational:
+ if (!(skip_entry__et)) entry_Operational();
+ /* in leaf state: return state id */
+ return STATE_Operational;
+ case STATE_TOP:
+ state__et = this->history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = false;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+}
+
+void ATimingService::executeInitTransition() {
+ int chain__et = ATimingService::CHAIN_TRANS_INITIAL_TO__Operational;
+ etInt16 next__et = ATimingService::executeTransitionChain(chain__et, 0, 0);
+ next__et = ATimingService::enterHistory(next__et);
+ setState(next__et);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+void ATimingService::receiveEventInternal(InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et) {
+ int trigger__et = (ifitem==0)? POLLING : localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ etInt16 catching_state__et = NO_STATE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState()) {
+ case STATE_Operational:
+ switch(trigger__et) {
+ case POLLING:
+ do_Operational();
+ break;
+ case TRIG_timer__startTimeout:
+ {
+ chain__et = ATimingService::CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__startTimer:
+ {
+ chain__et = ATimingService::CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__kill:
+ {
+ chain__et = ATimingService::CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ ATimingService::exitTo(getState(), catching_state__et);
+ {
+ etInt16 next__et = ATimingService::executeTransitionChain(chain__et, ifitem, generic_data__et);
+ next__et = ATimingService::enterHistory(next__et);
+ setState(next__et);
+ }
+ }
+}
+void ATimingService::receiveEvent(InterfaceItemBase* ifitem, int evt, void* generic_data__et) {
+ int localId = (ifitem==0)? 0 : ifitem->getLocalId();
+ ATimingService::receiveEventInternal(ifitem, localId, evt, generic_data__et);
+}
+void ATimingService::receive(const Message* msg) {
+ receiveEvent(0, -1, 0);
+}
+
+
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.h b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.h
new file mode 100644
index 000000000..d351dd0aa
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/ATimingService.h
@@ -0,0 +1,176 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ATimingService
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_
+#define _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_
+
+#include "common/etDatatypesCpp.hpp"
+#include "common/messaging/IRTObject.h"
+#include "common/modelbase/PortBase.h"
+#include "common/modelbase/ReplicatedActorClassBase.h"
+#include "common/modelbase/InterfaceItemBase.h"
+#include "common/modelbase/SubSystemClassBase.h"
+#include "common/messaging/Address.h"
+#include "common/messaging/IMessageReceiver.h"
+#include "common/debugging/DebuggingService.h"
+
+#include "room/basic/service/timing/PTimer.h"
+
+#include "common/modelbase/ActorClassBase.h"
+
+/*--------------------- begin user code ---------------------*/
+#include "osal/etTime.h"
+#define ET_NB_OF_TCBS 30
+typedef struct etTCB etTimerControlBlock;
+struct etTCB {
+ etTime expTime;
+ etTime pTime;
+ int32 portIdx;
+ etTimerControlBlock* next;
+};
+/*--------------------- end user code ---------------------*/
+
+using namespace etRuntime;
+
+
+class ATimingService : public etRuntime::ActorClassBase {
+
+
+ protected:
+ //--------------------- ports
+
+ //--------------------- sub actors
+
+ //--------------------- saps
+
+ //--------------------- services
+ PTimerReplPort timer;
+
+ //--------------------- interface item IDs
+ typedef enum {
+ IFITEM_timer = 1
+ } interface_items;
+
+ /*--------------------- attributes ---------------------*/
+ StaticArray<etTimerControlBlock, 30> tcbs;
+ etTimerControlBlock* usedTcbsRoot;
+ etTimerControlBlock* freeTcbsRoot;
+
+ /*--------------------- operations ---------------------*/
+ etTimerControlBlock* getTcb();
+ void returnTcb(etTimerControlBlock* block);
+ void removeTcbFromUsedList(int32 idx);
+ void putTcbToUsedList(etTimerControlBlock* block);
+ bool isTimeGreater(etTime* t1, etTime* t2);
+ void addTime(etTime* t1, etTime* t2);
+
+ public:
+ //--------------------- construction
+ ATimingService(etRuntime::IRTObject* parent, const String& name);
+ void initialize(void);
+ void setProbesActive(bool recursive, bool active);
+
+ //--------------------- port getters
+
+
+ PTimerReplPort& getTimer (){
+ return this->timer;
+ }
+
+ //--------------------- lifecycle functions
+ virtual void destroy();
+
+ /* state IDs */
+ typedef enum {
+ STATE_Operational = 2,
+ STATE_MAX = 3
+ } state_ids;
+
+ /* transition chains */
+ typedef enum {
+ CHAIN_TRANS_INITIAL_TO__Operational = 1,
+ CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1 = 2,
+ CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3 = 3,
+ CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4 = 4
+ } ChainIDs;
+
+ /* triggers */
+ typedef enum {
+ POLLING = 0,
+ TRIG_timer__startTimer = IFITEM_timer + EVT_SHIFT*PTimer::IN_startTimer,
+ TRIG_timer__startTimeout = IFITEM_timer + EVT_SHIFT*PTimer::IN_startTimeout,
+ TRIG_timer__kill = IFITEM_timer + EVT_SHIFT*PTimer::IN_kill
+ } triggers;
+
+ static const String s_stateStrings[];
+ static const int s_numberOfStates;
+
+ int history[3];
+
+ void setState(int new_state);
+
+ /* Entry and Exit Codes */
+ virtual void entry_Operational();
+ virtual void do_Operational();
+
+ /* Action Codes */
+ virtual void action_TRANS_INITIAL_TO__Operational();
+ virtual void action_TRANS_tr1_FROM_Operational_TO_Operational_BY_startTimeouttimer_tr1(const InterfaceItemBase* ifitem, uint32 time);
+ virtual void action_TRANS_tr3_FROM_Operational_TO_Operational_BY_startTimertimer_tr3(const InterfaceItemBase* ifitem, uint32 time);
+ virtual void action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(const InterfaceItemBase* ifitem);
+
+ /* State Switch Methods */
+ /**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+ void exitTo(etInt16 current__et, etInt16 to);
+
+ /**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+ etInt16 executeTransitionChain(int chain__et, const InterfaceItemBase* ifitem, void* generic_data__et);
+
+ /**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+ etInt16 enterHistory(etInt16 state__et);
+
+ void executeInitTransition();
+
+ /* receiveEvent contains the main implementation of the FSM */
+ void receiveEventInternal(InterfaceItemBase* ifitem, int localId, int evt, void* generic_data__et);
+ void receiveEvent(InterfaceItemBase* ifitem, int evt, void* generic_data__et);
+ virtual void receive(const etRuntime::Message* msg);
+
+ /*--------------------- begin user code ---------------------*/
+ // uc2
+ /*--------------------- end user code ---------------------*/
+
+};
+
+class ReplicatedATimingService : public ReplicatedActorClassBase {
+public:
+ ReplicatedATimingService(IRTObject* parent, const String& name) :
+ ReplicatedActorClassBase(parent, name) {}
+
+protected:
+ ActorClassBase* createActor(IRTObject* parent, const String& name) {
+ return new ATimingService(parent, name);
+ }
+};
+
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_ATIMINGSERVICE_H_ */
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.cpp b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.cpp
new file mode 100644
index 000000000..dce6afef7
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.cpp
@@ -0,0 +1,226 @@
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass PTimer
+ *
+ */
+
+#include "PTimer.h"
+
+#include "common/debugging/DebuggingService.h"
+#include "common/debugging/MSCFunctionObject.h"
+#include "common/messaging/AbstractMessageReceiver.h"
+#include "common/messaging/Address.h"
+#include "common/messaging/Message.h"
+#include "common/modelbase/IEventReceiver.h"
+
+using namespace etRuntime;
+
+
+
+/* message names as strings for debugging (generate MSC) */
+const String PTimer::s_messageStrings[] = {"MIN", "timeout", "startTimer","startTimeout","kill","MAX"};
+
+const String& PTimer::getMessageString(int msg_id) {
+ if ((MSG_MIN < msg_id ) && ( msg_id < MSG_MAX )) {
+ return s_messageStrings[msg_id];
+ } else {
+ // id out of range
+ static const String errorMsg = "Message ID out of range";
+ return errorMsg;
+ }
+}
+
+//------------------------------------------------------------------------------------------------------------
+// port class
+//------------------------------------------------------------------------------------------------------------
+
+PTimerPort::PTimerPort(IInterfaceItemOwner* actor, const String& name, int localId)
+ : PortBase(actor, name, localId, 0)
+{
+}
+
+PTimerPort::PTimerPort(IInterfaceItemOwner* actor, const String& name, int localId, int idx)
+ : PortBase(actor, name, localId, idx)
+{
+}
+
+void PTimerPort::destroy() {
+ DebuggingService::getInstance().removePortInstance(*this);
+ PortBase::destroy();
+}
+
+void PTimerPort::receive(const Message* msg) {
+ // TODO JH further
+ if (! PTimer::isValidIncomingEvtID(msg->getEvtId())) {
+ //std::cout << "unknown" << std::endl;
+ }
+
+ DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), PTimer::getMessageString(msg->getEvtId()).c_str());
+
+ getActor()->receiveEvent(this, msg->getEvtId(), msg->getData());
+}
+
+
+// sent messages
+void PTimerPort::timeout() {
+ timeout_impl();
+}
+
+void PTimerPort::timeout_impl() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ PTimer::getMessageString(PTimer::OUT_timeout).c_str());
+ if (getPeerAddress().isValid()) {
+ Message* buffer = dynamic_cast<IMessageService*>(getPeerMsgReceiver())->getMessageBuffer(sizeof(Message));
+ if (buffer) {
+ getPeerMsgReceiver()->receive(new (buffer) Message(getPeerAddress(), PTimer::OUT_timeout));
+ }
+ }
+}
+
+//------------------------------------------------------------------------------------------------------------
+// replicated port class
+//------------------------------------------------------------------------------------------------------------
+PTimerReplPort::PTimerReplPort(IInterfaceItemOwner* actor, const String& name, int localId) :
+ ReplicatedPortBase(actor, name, localId)
+{
+}
+
+// outgoing messages
+void PTimerReplPort::timeout(){
+ for (Vector<etRuntime::InterfaceItemBase*>::iterator it = getItems().begin(); it != getItems().end(); ++it) {
+ (dynamic_cast<PTimerPort*>(*it))->timeout();
+ }
+}
+//------------------------------------------------------------------------------------------------------------
+// conjugated port class
+//------------------------------------------------------------------------------------------------------------
+
+PTimerConjPort::PTimerConjPort(IInterfaceItemOwner* actor, const String& name, int localId)
+ : PortBase(actor, name, localId, 0)
+ , status(0)
+{
+}
+
+PTimerConjPort::PTimerConjPort(IInterfaceItemOwner* actor, const String& name, int localId, int idx)
+ : PortBase(actor, name, localId, idx)
+ , status(0)
+{
+}
+
+void PTimerConjPort::destroy() {
+ DebuggingService::getInstance().removePortInstance(*this);
+ PortBase::destroy();
+}
+
+void PTimerConjPort::receive(const Message* msg) {
+ // TODO JH further
+ if (! PTimer::isValidOutgoingEvtID(msg->getEvtId())) {
+ //std::cout << "unknown" << std::endl;
+ }
+
+ DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), PTimer::getMessageString(msg->getEvtId()).c_str());
+
+ switch (msg->getEvtId()) {
+ case PTimer::OUT_timeout:
+ {
+
+ //TODO: clear active bit in case of single shot timer
+ if (status!=0){
+ if (status==ET_TIMER_RUNNING){
+ // single shot timer
+ status=0;
+ }
+ // msg to fsm
+ getActor()->receiveEvent(this, msg->getEvtId(), msg->getData());
+ }
+ }
+ break;
+ default:
+ getActor()->receiveEvent(this, msg->getEvtId(), msg->getData());
+ break;
+ }
+}
+
+/*--------------------- operations ---------------------*/
+
+// sent messages
+void PTimerConjPort::startTimer(uint32 time) {
+ if (status==0){
+ status=ET_TIMER_RUNNING | ET_TIMER_PERIODIC;
+ startTimer_impl(time);
+ }
+}
+
+void PTimerConjPort::startTimer_impl(uint32 time) {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ PTimer::getMessageString(PTimer::IN_startTimer).c_str());
+ if (getPeerAddress().isValid()) {
+ Message* buffer = dynamic_cast<IMessageService*>(getPeerMsgReceiver())->getMessageBuffer(sizeof(DataMessage<uint32>));
+ if (buffer) {
+ getPeerMsgReceiver()->receive(new (buffer) DataMessage<uint32>(getPeerAddress(), PTimer::IN_startTimer, time));
+ }
+ }
+}
+void PTimerConjPort::startTimeout(uint32 time) {
+ if (status==0){
+ status = ET_TIMER_RUNNING;
+ startTimeout_impl(time);
+ }
+}
+
+void PTimerConjPort::startTimeout_impl(uint32 time) {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ PTimer::getMessageString(PTimer::IN_startTimeout).c_str());
+ if (getPeerAddress().isValid()) {
+ Message* buffer = dynamic_cast<IMessageService*>(getPeerMsgReceiver())->getMessageBuffer(sizeof(DataMessage<uint32>));
+ if (buffer) {
+ getPeerMsgReceiver()->receive(new (buffer) DataMessage<uint32>(getPeerAddress(), PTimer::IN_startTimeout, time));
+ }
+ }
+}
+void PTimerConjPort::kill() {
+
+ if (status!=0){
+ status=0;
+ kill_impl();
+ }
+}
+
+void PTimerConjPort::kill_impl() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ PTimer::getMessageString(PTimer::IN_kill).c_str());
+ if (getPeerAddress().isValid()) {
+ Message* buffer = dynamic_cast<IMessageService*>(getPeerMsgReceiver())->getMessageBuffer(sizeof(Message));
+ if (buffer) {
+ getPeerMsgReceiver()->receive(new (buffer) Message(getPeerAddress(), PTimer::IN_kill));
+ }
+ }
+}
+
+//------------------------------------------------------------------------------------------------------------
+// conjugated replicated port class
+//------------------------------------------------------------------------------------------------------------
+PTimerConjReplPort::PTimerConjReplPort(IInterfaceItemOwner* actor, const String& name, int localId) :
+ ReplicatedPortBase(actor, name, localId)
+{
+}
+
+// incoming messages
+void PTimerConjReplPort::startTimer(uint32 time){
+ for (Vector<etRuntime::InterfaceItemBase*>::iterator it = getItems().begin(); it != getItems().end(); ++it) {
+ (dynamic_cast<PTimerConjPort*>(*it))->startTimer( time);
+ }
+}
+void PTimerConjReplPort::startTimeout(uint32 time){
+ for (Vector<etRuntime::InterfaceItemBase*>::iterator it = getItems().begin(); it != getItems().end(); ++it) {
+ (dynamic_cast<PTimerConjPort*>(*it))->startTimeout( time);
+ }
+}
+void PTimerConjReplPort::kill(){
+ for (Vector<etRuntime::InterfaceItemBase*>::iterator it = getItems().begin(); it != getItems().end(); ++it) {
+ (dynamic_cast<PTimerConjPort*>(*it))->kill();
+ }
+}
+
+
diff --git a/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.h b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.h
new file mode 100644
index 000000000..be5e64f10
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.cpp/src-gen/room/basic/service/timing/PTimer.h
@@ -0,0 +1,145 @@
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass PTimer
+ *
+ */
+
+#ifndef _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_
+#define _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_
+
+#include "common/modelbase/InterfaceItemBase.h"
+#include "common/modelbase/PortBase.h"
+#include "common/modelbase/ReplicatedInterfaceItemBase.h"
+#include "common/modelbase/ReplicatedPortBase.h"
+#include "common/etDatatypesCpp.hpp"
+
+
+/*--------------------- begin user code ---------------------*/
+#define ET_TIMER_RUNNING 0x01
+#define ET_TIMER_PERIODIC 0x02
+/*--------------------- end user code ---------------------*/
+
+
+class PTimer {
+ public:
+ /* message IDs */
+ typedef enum {
+ MSG_MIN = 0,
+ OUT_timeout = 1,
+ IN_startTimer = 2,
+ IN_startTimeout = 3,
+ IN_kill = 4,
+ MSG_MAX = 5
+ } msg_ids;
+
+ /*--------------------- begin user code ---------------------*/
+ //uc2
+ /*--------------------- end user code ---------------------*/
+
+ static bool isValidEvtID(int evtId) {
+ return ((MSG_MIN < evtId) && (evtId < MSG_MAX));
+ }
+ static bool isValidOutgoingEvtID(int evtId) {
+ return ((MSG_MIN < evtId) && (evtId < IN_startTimer));
+ }
+ static bool isValidIncomingEvtID(int evtId) {
+ return ((IN_startTimer <= evtId) && (evtId < MSG_MAX));
+ }
+ static const etRuntime::String& getMessageString(int msg_id);
+
+ private:
+ static const etRuntime::String s_messageStrings[];
+
+};
+
+//------------------------------------------------------------------------------------------------------------
+// port class
+//------------------------------------------------------------------------------------------------------------
+class PTimerPort : public etRuntime::PortBase {
+ public:
+ PTimerPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId);
+ PTimerPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId, int idx);
+
+ virtual void destroy();
+
+ virtual void receive(const etRuntime::Message* m);
+
+
+ // sent messages
+ public: void timeout();
+ private: void timeout_impl();
+};
+
+//------------------------------------------------------------------------------------------------------------
+// replicated port class
+//------------------------------------------------------------------------------------------------------------
+class PTimerReplPort : public etRuntime::ReplicatedPortBase {
+
+ public:
+ PTimerReplPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId);
+
+ int getReplication() const { return getNInterfaceItems(); }
+ int getIndexOf(const etRuntime::InterfaceItemBase& ifitem) const { return ifitem.getIdx(); }
+ PTimerPort& get(int idx) const { return *dynamic_cast<PTimerPort*>(getInterfaceItem(idx)); }
+
+ // outgoing messages
+ public: void timeout();
+
+ protected:
+ virtual etRuntime::InterfaceItemBase* createInterfaceItem(etRuntime::IInterfaceItemOwner* rcv, const etRuntime::String& name, int lid, int idx) {
+ return new PTimerPort(rcv, name, lid, idx);
+ }
+
+};
+//------------------------------------------------------------------------------------------------------------
+// conjugated port class
+//------------------------------------------------------------------------------------------------------------
+class PTimerConjPort : public etRuntime::PortBase {
+ public:
+ PTimerConjPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId);
+ PTimerConjPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId, int idx);
+
+ virtual void destroy();
+
+ virtual void receive(const etRuntime::Message* m);
+
+ /*--------------------- attributes ---------------------*/
+ int8 status;
+ /*--------------------- operations ---------------------*/
+
+ // sent messages
+ public: void startTimer(uint32 time);
+ private: void startTimer_impl(uint32 time);
+ public: void startTimeout(uint32 time);
+ private: void startTimeout_impl(uint32 time);
+ public: void kill();
+ private: void kill_impl();
+};
+
+//------------------------------------------------------------------------------------------------------------
+// conjugated replicated port class
+//------------------------------------------------------------------------------------------------------------
+class PTimerConjReplPort : public etRuntime::ReplicatedPortBase {
+
+ public:
+ PTimerConjReplPort(etRuntime::IInterfaceItemOwner* actor, const etRuntime::String& name, int localId);
+
+ int getReplication() const { return getNInterfaceItems(); }
+ int getIndexOf(const etRuntime::InterfaceItemBase& ifitem) const { return ifitem.getIdx(); }
+ PTimerConjPort& get(int idx) const { return *dynamic_cast<PTimerConjPort*>(getInterfaceItem(idx)); }
+
+ // incoming messages
+ public: void startTimer(uint32 time);
+ public: void startTimeout(uint32 time);
+ public: void kill();
+
+ protected:
+ virtual etRuntime::InterfaceItemBase* createInterfaceItem(etRuntime::IInterfaceItemOwner* rcv, const etRuntime::String& name, int lid, int idx) {
+ return new PTimerConjPort(rcv, name, lid, idx);
+ }
+
+};
+
+
+#endif /* _ROOM_BASIC_SERVICE_TIMING_PTIMER_H_ */
diff --git a/runtime/org.eclipse.etrice.modellib.java/.gitignore b/runtime/org.eclipse.etrice.modellib.java/.gitignore
index db5801d65..53efcc01b 100644
--- a/runtime/org.eclipse.etrice.modellib.java/.gitignore
+++ b/runtime/org.eclipse.etrice.modellib.java/.gitignore
@@ -1,6 +1,4 @@
bin
-src-gen/*
-!src-gen/readme.txt
src-gen-info/*
!src-gen-info/readme.txt
doc-gen/*
diff --git a/runtime/org.eclipse.etrice.modellib.java/gen_modellib.launch b/runtime/org.eclipse.etrice.modellib.java/gen_modellib.launch
index 3ee35bcf0..cf281c2f4 100644
--- a/runtime/org.eclipse.etrice.modellib.java/gen_modellib.launch
+++ b/runtime/org.eclipse.etrice.modellib.java/gen_modellib.launch
@@ -10,6 +10,7 @@
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.java/model/TimingService.room}"/>
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.java/model/ALogService.room}"/>
<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.java/model/TcpService.room}"/>
+<listEntry value="${workspace_loc:/org.eclipse.etrice.modellib.java/model/Tests.room}"/>
</listAttribute>
<booleanAttribute key="Persist" value="false"/>
<booleanAttribute key="SaveGenModel" value="false"/>
diff --git a/runtime/org.eclipse.etrice.modellib.java/model/diagrams/room.basic.etunit.TestCaseActor.behavior b/runtime/org.eclipse.etrice.modellib.java/model/diagrams/room.basic.etunit.TestCaseActor.behavior
deleted file mode 100644
index f74c98dbf..000000000
--- a/runtime/org.eclipse.etrice.modellib.java/model/diagrams/room.basic.etunit.TestCaseActor.behavior
+++ /dev/null
@@ -1,284 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of TestCaseActor" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.0/@children.5/@link //@children.1/@link //@children.1/@children.1/@link //@children.0/@children.2/@children.1/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link" verticalGridUnit="10" version="0.11.0">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../Tests.room#ActorClass:TestCaseActor"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$sg"/>
- </link>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$sg"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="255" height="138" x="219" y="206">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="195" height="78" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" width="15" height="8" x="170" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="97" y="72">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="97" y="72">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="97" y="72">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$testing"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="195" height="78" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="testing"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <properties key="item-kind" value="extp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="111" y="78">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="11" height="11" x="25" y="25"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0" x="25" y="25">
- <points x="5"/>
- <points x="11" y="5"/>
- <points x="5" y="11"/>
- <points y="5"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#ExitPoint:TestCaseActor$testing$tpFinish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="22" y="37" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_TOP" value="tpFinish"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="621" y="230">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$timeout"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timeout"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="302" y="418">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$finish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="finish"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="243" y="75">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="30" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#SimpleState:TestCaseActor$wait4Start"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.5/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="wait4Start"/>
- </children>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#StateGraph:TestCaseActor$testing$sg"/>
- </link>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/testing"/>
- </children>
- <children xsi:type="pi:ContainerShape" active="true">
- <properties key="obj-type" value="trp"/>
- <properties key="item-kind" value="extp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="375" y="500">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="2" filled="true" transparency="0.0" x="30" y="30">
- <points x="10"/>
- <points x="20" y="10"/>
- <points x="10" y="20"/>
- <points y="10"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Tests.room#ExitPoint:TestCaseActor$testing$tpFinish"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor"/>
- <children>
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="30" y="50" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" verticalAlignment="ALIGNMENT_TOP" value="tpFinish"/>
- </children>
- </children>
- </children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.5/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#InitialTransition:TestCaseActor$initial"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.1/@anchors.0" end="//@children.0/@children.4/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#ContinuationTransition:TestCaseActor$trFinish"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="trFinish: "/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestCaseActor$trTimeout"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="trTimeout: &lt;timeout:..."/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.5/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../Tests.room#TriggeredTransition:TestCaseActor$tr0"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;startTestCase:..."/>
- </connectionDecorators>
- </connections>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <colors red="200" green="200" blue="200"/>
- <fonts name="Arial" size="8"/>
- <fonts name="Arial" size="9" bold="true"/>
-</pi:Diagram>
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/ALogService.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/ALogService.java
new file mode 100644
index 000000000..427ed97bb
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/ALogService.java
@@ -0,0 +1,307 @@
+package room.basic.service.logging;
+
+import org.eclipse.etrice.runtime.java.messaging.*;
+import org.eclipse.etrice.runtime.java.modelbase.*;
+import org.eclipse.etrice.runtime.java.debugging.*;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+import room.basic.service.logging.Log.*;
+
+/*--------------------- begin user code ---------------------*/
+import java.io.*;
+import java.util.*;
+/*--------------------- end user code ---------------------*/
+
+
+public class ALogService extends ActorClassBase {
+
+ /*--------------------- begin user code ---------------------*/
+ FileOutputStream file = null;
+ PrintStream p = null;
+ static long tStart = System.currentTimeMillis();
+ /*--------------------- end user code ---------------------*/
+
+ //--------------------- ports
+
+ //--------------------- saps
+
+ //--------------------- services
+ protected LogReplPort log = null;
+
+ //--------------------- optional actors
+
+ //--------------------- interface item IDs
+ public static final int IFITEM_log = 1;
+
+ /*--------------------- attributes ---------------------*/
+
+ /*--------------------- operations ---------------------*/
+ public void destroyUser() {
+ if (p!= null) {
+ p.flush();
+ p.close();
+ p=null;
+ }
+ }
+
+
+ //--------------------- construction
+ public ALogService(IRTObject parent, String name) {
+ super(parent, name);
+ setClassName("ALogService");
+
+ // initialize attributes
+
+ // own ports
+
+ // own saps
+
+ // own service implementations
+ log = new LogReplPort(this, "log", IFITEM_log);
+
+ // sub actors
+
+ // wiring
+
+
+ /* user defined constructor body */
+
+ }
+
+ /* --------------------- attribute setters and getters */
+
+
+ //--------------------- port getters
+ public LogReplPort getLog (){
+ return this.log;
+ }
+
+ //--------------------- lifecycle functions
+ public void stop(){
+ super.stop();
+ }
+
+ public void destroy(){
+ /* user defined destructor body */
+ DebuggingService.getInstance().addMessageActorDestroy(this);
+ super.destroy();
+ }
+
+ /* state IDs */
+ public static final int STATE_closed = 2;
+ public static final int STATE_opened = 3;
+ public static final int STATE_MAX = 4;
+
+ /* transition chains */
+ public static final int CHAIN_TRANS_INITIAL_TO__closed = 1;
+ public static final int CHAIN_TRANS_open_FROM_closed_TO_opened_BY_openlog = 2;
+ public static final int CHAIN_TRANS_tr0_FROM_opened_TO_closed_BY_closelog = 3;
+ public static final int CHAIN_TRANS_tr1_FROM_opened_TO_opened_BY_internalLoglog_tr1 = 4;
+
+ /* triggers */
+ public static final int POLLING = 0;
+ public static final int TRIG_log__open = IFITEM_log + EVT_SHIFT*Log.IN_open;
+ public static final int TRIG_log__close = IFITEM_log + EVT_SHIFT*Log.IN_close;
+ public static final int TRIG_log__internalLog = IFITEM_log + EVT_SHIFT*Log.IN_internalLog;
+
+ // state names
+ protected static final String stateStrings[] = {
+ "<no state>",
+ "<top>",
+ "closed",
+ "opened"
+ };
+
+ // history
+ protected int history[] = {NO_STATE, NO_STATE, NO_STATE, NO_STATE};
+
+ private void setState(int new_state) {
+ DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ this.state = new_state;
+ }
+
+ /* Entry and Exit Codes */
+
+ /* Action Codes */
+ protected void action_TRANS_open_FROM_closed_TO_opened_BY_openlog(InterfaceItemBase ifitem, String fileName) {
+ Date d=new Date(tStart);
+ try{
+ file=new FileOutputStream(fileName);
+ p=new PrintStream(file);
+ p.println("Log opened at "+ d.toString());
+ p.println("--------------------------------------------------");
+ } catch (Exception e){
+ System.out.println("Log file not opened !");
+ }
+ }
+ protected void action_TRANS_tr0_FROM_opened_TO_closed_BY_closelog(InterfaceItemBase ifitem) {
+ p.flush();
+ p.close();
+ p=null;
+ }
+ protected void action_TRANS_tr1_FROM_opened_TO_opened_BY_internalLoglog_tr1(InterfaceItemBase ifitem, InternalLogData data) {
+ p.println("Timestamp: " + Long.toString(data.timeStamp-tStart) + "ms");
+ p.println("SenderInstance: "+ data.sender);
+ p.println("UserString: " + data.userString);
+ p.println("--------------------------------------------------");
+ System.out.printf(data.userString);
+ }
+
+ /* State Switch Methods */
+ /**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+ private void exitTo(int current__et, int to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_closed:
+ this.history[STATE_TOP] = STATE_closed;
+ current__et = STATE_TOP;
+ break;
+ case STATE_opened:
+ this.history[STATE_TOP] = STATE_opened;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ }
+
+ /**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+ private int executeTransitionChain(int chain__et, InterfaceItemBase ifitem, Object generic_data__et) {
+ switch (chain__et) {
+ case ALogService.CHAIN_TRANS_INITIAL_TO__closed:
+ {
+ return STATE_closed;
+ }
+ case ALogService.CHAIN_TRANS_open_FROM_closed_TO_opened_BY_openlog:
+ {
+ String fileName = (String) generic_data__et;
+ action_TRANS_open_FROM_closed_TO_opened_BY_openlog(ifitem, fileName);
+ return STATE_opened;
+ }
+ case ALogService.CHAIN_TRANS_tr0_FROM_opened_TO_closed_BY_closelog:
+ {
+ action_TRANS_tr0_FROM_opened_TO_closed_BY_closelog(ifitem);
+ return STATE_closed;
+ }
+ case ALogService.CHAIN_TRANS_tr1_FROM_opened_TO_opened_BY_internalLoglog_tr1:
+ {
+ InternalLogData data = (InternalLogData) generic_data__et;
+ action_TRANS_tr1_FROM_opened_TO_opened_BY_internalLoglog_tr1(ifitem, data);
+ return STATE_opened;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+ }
+
+ /**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+ private int enterHistory(int state__et) {
+ if (state__et >= STATE_MAX) {
+ state__et = (state__et - STATE_MAX);
+ }
+ while (true) {
+ switch (state__et) {
+ case STATE_closed:
+ /* in leaf state: return state id */
+ return STATE_closed;
+ case STATE_opened:
+ /* in leaf state: return state id */
+ return STATE_opened;
+ case STATE_TOP:
+ state__et = this.history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+ }
+
+ public void executeInitTransition() {
+ int chain__et = ALogService.CHAIN_TRANS_INITIAL_TO__closed;
+ int next__et = executeTransitionChain(chain__et, null, null);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+
+ /* receiveEvent contains the main implementation of the FSM */
+ public void receiveEventInternal(InterfaceItemBase ifitem, int localId, int evt, Object generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ int catching_state__et = NO_STATE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState()) {
+ case STATE_closed:
+ switch(trigger__et) {
+ case TRIG_log__open:
+ {
+ chain__et = ALogService.CHAIN_TRANS_open_FROM_closed_TO_opened_BY_openlog;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_opened:
+ switch(trigger__et) {
+ case TRIG_log__close:
+ {
+ chain__et = ALogService.CHAIN_TRANS_tr0_FROM_opened_TO_closed_BY_closelog;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_log__internalLog:
+ {
+ chain__et = ALogService.CHAIN_TRANS_tr1_FROM_opened_TO_opened_BY_internalLoglog_tr1;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(getState(), catching_state__et);
+ {
+ int next__et = executeTransitionChain(chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+ }
+ }
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data__et) {
+ int localId = (ifitem==null)? 0 : ifitem.getLocalId();
+ receiveEventInternal(ifitem, localId, evt, generic_data__et);
+ }
+
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/InternalLogData.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/InternalLogData.java
new file mode 100644
index 000000000..d14c2e35e
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/InternalLogData.java
@@ -0,0 +1,71 @@
+package room.basic.service.logging;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+import java.io.Serializable;
+
+
+
+
+public class InternalLogData implements Serializable {
+
+ private static final long serialVersionUID = 463634558L;
+
+
+ /*--------------------- attributes ---------------------*/
+ public String userString;
+ public String sender;
+ public long timeStamp;
+
+ /* --------------------- attribute setters and getters */
+ public void setUserString(String userString) {
+ this.userString = userString;
+ }
+ public String getUserString() {
+ return this.userString;
+ }
+ public void setSender(String sender) {
+ this.sender = sender;
+ }
+ public String getSender() {
+ return this.sender;
+ }
+ public void setTimeStamp(long timeStamp) {
+ this.timeStamp = timeStamp;
+ }
+ public long getTimeStamp() {
+ return this.timeStamp;
+ }
+
+ /*--------------------- operations ---------------------*/
+
+ // default constructor
+ public InternalLogData() {
+ super();
+
+ // initialize attributes
+ this.setUserString("");
+ this.setSender("");
+
+ /* user defined constructor body */
+ }
+
+ // constructor using fields
+ public InternalLogData(String userString, String sender, long timeStamp) {
+ super();
+
+ this.userString = userString;
+ this.sender = sender;
+ this.timeStamp = timeStamp;
+
+ /* user defined constructor body */
+ }
+
+ // deep copy
+ public InternalLogData deepCopy() {
+ InternalLogData copy = new InternalLogData();
+ copy.userString = userString;
+ copy.sender = sender;
+ copy.timeStamp = timeStamp;
+ return copy;
+ }
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/Log.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/Log.java
new file mode 100644
index 000000000..6939ebcad
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/logging/Log.java
@@ -0,0 +1,217 @@
+package room.basic.service.logging;
+
+import org.eclipse.etrice.runtime.java.messaging.Message;
+import org.eclipse.etrice.runtime.java.modelbase.EventMessage;
+import org.eclipse.etrice.runtime.java.modelbase.EventWithDataMessage;
+import org.eclipse.etrice.runtime.java.modelbase.IInterfaceItemOwner;
+import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
+import org.eclipse.etrice.runtime.java.modelbase.PortBase;
+import org.eclipse.etrice.runtime.java.modelbase.ReplicatedPortBase;
+import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+
+
+public class Log {
+ // message IDs
+ public static final int MSG_MIN = 0;
+ public static final int IN_open = 1;
+ public static final int IN_close = 2;
+ public static final int IN_internalLog = 3;
+ public static final int MSG_MAX = 4;
+
+ /*--------------------- begin user code ---------------------*/
+ public static final int LOG_LEVEL_LOW = 1;
+ public static final int LOG_LEVEL_MEDIUM = 2;
+ public static final int LOG_LEVEL_HIGH = 3;
+ /*--------------------- end user code ---------------------*/
+
+ private static String messageStrings[] = {"MIN", "open","close","internalLog","MAX"};
+
+ public String getMessageString(int msg_id) {
+ if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){
+ // id out of range
+ return "Message ID out of range";
+ }
+ else{
+ return messageStrings[msg_id];
+ }
+ }
+
+
+ // port class
+ static public class LogPort extends PortBase {
+ // constructors
+ public LogPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public LogPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+
+ // sent messages
+ }
+
+ // replicated port class
+ static public class LogReplPort extends ReplicatedPortBase {
+
+ public LogReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public LogPort get(int idx) {
+ return (LogPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new LogPort(rcv, name, lid, idx);
+ }
+
+ // outgoing messages
+ }
+
+
+ // port class
+ static public class LogConjPort extends PortBase {
+ /*--------------------- begin user code ---------------------*/
+ static int logLevel=0;
+ InternalLogData d = new InternalLogData();
+ /*--------------------- end user code ---------------------*/
+ // constructors
+ public LogConjPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public LogConjPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ // initialize attributes
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+ /*--------------------- attributes ---------------------*/
+ /* --------------------- attribute setters and getters */
+ /*--------------------- operations ---------------------*/
+ public void setLogLevel(int l) {
+ logLevel=l;
+ if (logLevel > LOG_LEVEL_HIGH) logLevel=LOG_LEVEL_HIGH;
+ }
+ public void log(int logLevel, String userString) {
+ if (logLevel>LogConjPort.logLevel){
+ d.userString=userString;
+ d.timeStamp=System.currentTimeMillis();
+ d.sender=getInstancePath();
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalLog, d.deepCopy()));
+ }
+ }
+
+ // sent messages
+ public void open(String fileName) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_open]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_open, fileName));
+ }
+ public void close() {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_close]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_close));
+ }
+ private void internalLog(InternalLogData data) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalLog]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalLog, data.deepCopy()));
+ }
+ public void internalLog(String userString, String sender, long timeStamp) {
+ internalLog(new InternalLogData(userString, sender, timeStamp));
+ }
+ }
+
+ // replicated port class
+ static public class LogConjReplPort extends ReplicatedPortBase {
+
+ public LogConjReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public LogConjPort get(int idx) {
+ return (LogConjPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new LogConjPort(rcv, name, lid, idx);
+ }
+
+ // incoming messages
+ public void open(String fileName){
+ for (InterfaceItemBase item : getItems()) {
+ ((LogConjPort)item).open( fileName);
+ }
+ }
+ public void close(){
+ for (InterfaceItemBase item : getItems()) {
+ ((LogConjPort)item).close();
+ }
+ }
+ private void internalLog(InternalLogData data){
+ for (InterfaceItemBase item : getItems()) {
+ ((LogConjPort)item).internalLog( data);
+ }
+ }
+ }
+
+}
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpClient.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpClient.java
new file mode 100644
index 000000000..212e2e702
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpClient.java
@@ -0,0 +1,383 @@
+package room.basic.service.tcp;
+
+import org.eclipse.etrice.runtime.java.messaging.*;
+import org.eclipse.etrice.runtime.java.modelbase.*;
+import org.eclipse.etrice.runtime.java.debugging.*;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+import room.basic.service.tcp.PTcpControl.*;
+import room.basic.service.tcp.PTcpPayload.*;
+
+/*--------------------- begin user code ---------------------*/
+import java.net.Socket;
+import java.io.*;
+
+class ClientRxThread extends Thread{
+ private Socket sock;
+ PTcpPayloadPort port;
+ public ClientRxThread (PTcpPayloadPort port, Socket sock){
+ this.sock = sock;
+ this.port = port;
+ }
+ public void run(){
+ try{
+ InputStream in = sock.getInputStream();
+ DTcpPayload d = new DTcpPayload();
+ d.setConnectionId(0);
+ int c;
+ while ((c=in.read(d.getData()))!=-1){
+ d.setLength(c);
+ port.receive(d);
+ }
+ }catch (IOException e){
+ System.err.println("ClientRx: " + e.toString());
+ }
+
+ }
+}
+
+/*--------------------- end user code ---------------------*/
+
+
+public class ATcpClient extends ActorClassBase {
+
+ /*--------------------- begin user code ---------------------*/
+ Socket socket;
+ InputStream in;
+ OutputStream out;
+ /*--------------------- end user code ---------------------*/
+
+ //--------------------- ports
+ protected PTcpControlPort ControlPort = null;
+ protected PTcpPayloadPort PayloadPort = null;
+
+ //--------------------- saps
+
+ //--------------------- services
+
+ //--------------------- optional actors
+
+ //--------------------- interface item IDs
+ public static final int IFITEM_ControlPort = 1;
+ public static final int IFITEM_PayloadPort = 2;
+
+ /*--------------------- attributes ---------------------*/
+ public int lastError;
+
+ /*--------------------- operations ---------------------*/
+ public void stopUser() {
+ try{
+ if(socket != null){
+ socket.close();
+ }
+ }catch(IOException e){
+ System.err.println(e.toString());}
+ }
+
+
+ //--------------------- construction
+ public ATcpClient(IRTObject parent, String name) {
+ super(parent, name);
+ setClassName("ATcpClient");
+
+ // initialize attributes
+ this.setLastError(0);
+
+ // own ports
+ ControlPort = new PTcpControlPort(this, "ControlPort", IFITEM_ControlPort);
+ PayloadPort = new PTcpPayloadPort(this, "PayloadPort", IFITEM_PayloadPort);
+
+ // own saps
+
+ // own service implementations
+
+ // sub actors
+
+ // wiring
+
+
+ /* user defined constructor body */
+
+ }
+
+ /* --------------------- attribute setters and getters */
+ public void setLastError(int lastError) {
+ this.lastError = lastError;
+ }
+ public int getLastError() {
+ return this.lastError;
+ }
+
+
+ //--------------------- port getters
+ public PTcpControlPort getControlPort (){
+ return this.ControlPort;
+ }
+ public PTcpPayloadPort getPayloadPort (){
+ return this.PayloadPort;
+ }
+
+ //--------------------- lifecycle functions
+ public void stop(){
+ super.stop();
+ }
+
+ public void destroy(){
+ /* user defined destructor body */
+ DebuggingService.getInstance().addMessageActorDestroy(this);
+ super.destroy();
+ }
+
+ /* state IDs */
+ public static final int STATE_closed = 2;
+ public static final int STATE_opened = 3;
+ public static final int STATE_error = 4;
+ public static final int STATE_MAX = 5;
+
+ /* transition chains */
+ public static final int CHAIN_TRANS_INITIAL_TO__closed = 1;
+ public static final int CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort = 2;
+ public static final int CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort = 3;
+ public static final int CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3 = 4;
+
+ /* triggers */
+ public static final int POLLING = 0;
+ public static final int TRIG_ControlPort__open = IFITEM_ControlPort + EVT_SHIFT*PTcpControl.IN_open;
+ public static final int TRIG_ControlPort__close = IFITEM_ControlPort + EVT_SHIFT*PTcpControl.IN_close;
+ public static final int TRIG_PayloadPort__send = IFITEM_PayloadPort + EVT_SHIFT*PTcpPayload.IN_send;
+
+ // state names
+ protected static final String stateStrings[] = {
+ "<no state>",
+ "<top>",
+ "closed",
+ "opened",
+ "error"
+ };
+
+ // history
+ protected int history[] = {NO_STATE, NO_STATE, NO_STATE, NO_STATE, NO_STATE};
+
+ private void setState(int new_state) {
+ DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ this.state = new_state;
+ }
+
+ /* Entry and Exit Codes */
+
+ /* Action Codes */
+ protected void action_TRANS_INITIAL_TO__closed() {
+ System.out.println("Client Init !");
+ }
+ protected void action_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort(InterfaceItemBase ifitem, DTcpControl data) {
+ lastError=0;
+ try{
+ socket = new Socket(data.IPAddr,data.TcpPort);
+ (new ClientRxThread(PayloadPort, socket)).start();
+ out = socket.getOutputStream();
+ }catch(IOException e){
+ System.err.println(e.toString());
+ lastError=1;
+ }
+ }
+ protected void action_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort(InterfaceItemBase ifitem) {
+ try{
+ if (socket!=null){
+ socket.close();
+ }
+ } catch (IOException e){
+ System.err.println(e.toString());
+ }
+ }
+ protected void action_TRANS_tr2_FROM_cp0_TO_opened(InterfaceItemBase ifitem, DTcpControl data) {
+ ControlPort.established();
+ }
+ protected void action_TRANS_socketError_FROM_cp0_TO_error_COND_socketError(InterfaceItemBase ifitem, DTcpControl data) {
+ ControlPort.error();
+ try{
+ socket.close();
+ } catch(IOException e){
+ System.err.println(e.toString());
+ }
+ }
+ protected void action_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3(InterfaceItemBase ifitem, DTcpPayload data) {
+ try{
+ out.write(data.getData(),0,data.length);
+ }catch(IOException e){
+ System.err.println(e.toString());
+ }
+ }
+
+ /* State Switch Methods */
+ /**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+ private void exitTo(int current__et, int to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_closed:
+ this.history[STATE_TOP] = STATE_closed;
+ current__et = STATE_TOP;
+ break;
+ case STATE_opened:
+ this.history[STATE_TOP] = STATE_opened;
+ current__et = STATE_TOP;
+ break;
+ case STATE_error:
+ this.history[STATE_TOP] = STATE_error;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ }
+
+ /**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+ private int executeTransitionChain(int chain__et, InterfaceItemBase ifitem, Object generic_data__et) {
+ switch (chain__et) {
+ case ATcpClient.CHAIN_TRANS_INITIAL_TO__closed:
+ {
+ action_TRANS_INITIAL_TO__closed();
+ return STATE_closed;
+ }
+ case ATcpClient.CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort:
+ {
+ DTcpControl data = (DTcpControl) generic_data__et;
+ action_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort(ifitem, data);
+ if (lastError!=0) {
+ action_TRANS_socketError_FROM_cp0_TO_error_COND_socketError(ifitem, data);
+ return STATE_error;}
+ else {
+ action_TRANS_tr2_FROM_cp0_TO_opened(ifitem, data);
+ return STATE_opened;}
+ }
+ case ATcpClient.CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort:
+ {
+ action_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort(ifitem);
+ return STATE_closed;
+ }
+ case ATcpClient.CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3:
+ {
+ DTcpPayload data = (DTcpPayload) generic_data__et;
+ action_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3(ifitem, data);
+ return STATE_opened;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+ }
+
+ /**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+ private int enterHistory(int state__et) {
+ if (state__et >= STATE_MAX) {
+ state__et = (state__et - STATE_MAX);
+ }
+ while (true) {
+ switch (state__et) {
+ case STATE_closed:
+ /* in leaf state: return state id */
+ return STATE_closed;
+ case STATE_opened:
+ /* in leaf state: return state id */
+ return STATE_opened;
+ case STATE_error:
+ /* in leaf state: return state id */
+ return STATE_error;
+ case STATE_TOP:
+ state__et = this.history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+ }
+
+ public void executeInitTransition() {
+ int chain__et = ATcpClient.CHAIN_TRANS_INITIAL_TO__closed;
+ int next__et = executeTransitionChain(chain__et, null, null);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+
+ /* receiveEvent contains the main implementation of the FSM */
+ public void receiveEventInternal(InterfaceItemBase ifitem, int localId, int evt, Object generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ int catching_state__et = NO_STATE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState()) {
+ case STATE_closed:
+ switch(trigger__et) {
+ case TRIG_ControlPort__open:
+ {
+ chain__et = ATcpClient.CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_opened:
+ switch(trigger__et) {
+ case TRIG_ControlPort__close:
+ {
+ chain__et = ATcpClient.CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_PayloadPort__send:
+ {
+ chain__et = ATcpClient.CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_error:
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(getState(), catching_state__et);
+ {
+ int next__et = executeTransitionChain(chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+ }
+ }
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data__et) {
+ int localId = (ifitem==null)? 0 : ifitem.getLocalId();
+ receiveEventInternal(ifitem, localId, evt, generic_data__et);
+ }
+
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpServer.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpServer.java
new file mode 100644
index 000000000..a5f807a7b
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/ATcpServer.java
@@ -0,0 +1,421 @@
+package room.basic.service.tcp;
+
+import org.eclipse.etrice.runtime.java.messaging.*;
+import org.eclipse.etrice.runtime.java.modelbase.*;
+import org.eclipse.etrice.runtime.java.debugging.*;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+import room.basic.service.tcp.PTcpControl.*;
+import room.basic.service.tcp.PTcpPayload.*;
+
+/*--------------------- begin user code ---------------------*/
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.io.*;
+import java.util.*;
+
+class ServerRxThread extends Thread{
+ private int connectionId;
+ private Socket sock;
+ PTcpPayloadPort port;
+
+ public ServerRxThread (int connectionId, PTcpPayloadPort port, Socket sock){
+ this.sock = sock;
+ this.connectionId = connectionId;
+ this.port = port;
+ }
+
+ public void run(){
+ try{
+ InputStream in = sock.getInputStream();
+ DTcpPayload d = new DTcpPayload();
+ d.setConnectionId(connectionId);
+ int c;
+ while ((c=in.read(d.getData()))!=-1){
+ d.setLength(c);
+ port.receive(d);
+ }
+ }catch (IOException e){
+ System.err.println("ServerRx: " + e.toString());
+ }
+ }
+}
+
+class ServerAcceptThread extends Thread{
+ private ServerSocket sock;
+ private PTcpPayloadPort port;
+ private ATcpServer parent;
+ public ServerAcceptThread (PTcpPayloadPort port, ServerSocket sock, ATcpServer parent){
+ this.sock = sock;
+ this.port = port;
+ this.parent = parent;
+ }
+ public void run(){
+ int cnt=0;
+ try{
+ while (true){
+ Socket s = sock.accept();
+ parent.addOutStreamToHashmap(cnt, s.getOutputStream());
+ (new ServerRxThread(cnt, port, s)).start();
+ cnt++;
+ }
+ }catch (IOException e){
+ System.err.println("Server Accept: " + e.toString());
+ }
+ }
+}
+
+/*--------------------- end user code ---------------------*/
+
+
+public class ATcpServer extends ActorClassBase {
+
+ /*--------------------- begin user code ---------------------*/
+ ServerSocket socket = null;
+ InputStream in = null;
+ OutputStream out = null;
+ Hashtable<Integer,OutputStream> outStreams = new Hashtable<Integer,OutputStream>();
+
+ synchronized protected void addOutStreamToHashmap(int cnt, OutputStream out){
+ outStreams.put(cnt,out);
+ }
+
+ /*--------------------- end user code ---------------------*/
+
+ //--------------------- ports
+ protected PTcpControlPort ControlPort = null;
+ protected PTcpPayloadPort PayloadPort = null;
+
+ //--------------------- saps
+
+ //--------------------- services
+
+ //--------------------- optional actors
+
+ //--------------------- interface item IDs
+ public static final int IFITEM_ControlPort = 1;
+ public static final int IFITEM_PayloadPort = 2;
+
+ /*--------------------- attributes ---------------------*/
+ public int lastError;
+ public int payloadPortReplocation;
+
+ /*--------------------- operations ---------------------*/
+ public void stopUser() {
+ try{
+ if(socket != null){
+ socket.close();
+ }
+ }catch(IOException e){
+ System.err.println(e.toString());}
+ }
+
+
+ //--------------------- construction
+ public ATcpServer(IRTObject parent, String name) {
+ super(parent, name);
+ setClassName("ATcpServer");
+
+ // initialize attributes
+ this.setLastError(0);
+ this.setPayloadPortReplocation(0);
+
+ // own ports
+ ControlPort = new PTcpControlPort(this, "ControlPort", IFITEM_ControlPort);
+ PayloadPort = new PTcpPayloadPort(this, "PayloadPort", IFITEM_PayloadPort);
+
+ // own saps
+
+ // own service implementations
+
+ // sub actors
+
+ // wiring
+
+
+ /* user defined constructor body */
+
+ }
+
+ /* --------------------- attribute setters and getters */
+ public void setLastError(int lastError) {
+ this.lastError = lastError;
+ }
+ public int getLastError() {
+ return this.lastError;
+ }
+ public void setPayloadPortReplocation(int payloadPortReplocation) {
+ this.payloadPortReplocation = payloadPortReplocation;
+ }
+ public int getPayloadPortReplocation() {
+ return this.payloadPortReplocation;
+ }
+
+
+ //--------------------- port getters
+ public PTcpControlPort getControlPort (){
+ return this.ControlPort;
+ }
+ public PTcpPayloadPort getPayloadPort (){
+ return this.PayloadPort;
+ }
+
+ //--------------------- lifecycle functions
+ public void stop(){
+ super.stop();
+ }
+
+ public void destroy(){
+ /* user defined destructor body */
+ DebuggingService.getInstance().addMessageActorDestroy(this);
+ super.destroy();
+ }
+
+ /* state IDs */
+ public static final int STATE_closed = 2;
+ public static final int STATE_opened = 3;
+ public static final int STATE_error = 4;
+ public static final int STATE_MAX = 5;
+
+ /* transition chains */
+ public static final int CHAIN_TRANS_INITIAL_TO__closed = 1;
+ public static final int CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort = 2;
+ public static final int CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort = 3;
+ public static final int CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3 = 4;
+
+ /* triggers */
+ public static final int POLLING = 0;
+ public static final int TRIG_ControlPort__open = IFITEM_ControlPort + EVT_SHIFT*PTcpControl.IN_open;
+ public static final int TRIG_ControlPort__close = IFITEM_ControlPort + EVT_SHIFT*PTcpControl.IN_close;
+ public static final int TRIG_PayloadPort__send = IFITEM_PayloadPort + EVT_SHIFT*PTcpPayload.IN_send;
+
+ // state names
+ protected static final String stateStrings[] = {
+ "<no state>",
+ "<top>",
+ "closed",
+ "opened",
+ "error"
+ };
+
+ // history
+ protected int history[] = {NO_STATE, NO_STATE, NO_STATE, NO_STATE, NO_STATE};
+
+ private void setState(int new_state) {
+ DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ this.state = new_state;
+ }
+
+ /* Entry and Exit Codes */
+
+ /* Action Codes */
+ protected void action_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort(InterfaceItemBase ifitem, DTcpControl data) {
+ lastError=0;
+ try{
+ socket = new ServerSocket(data.TcpPort);
+ (new ServerAcceptThread(PayloadPort, socket, this)).start();
+ }catch(IOException e){
+ System.err.println(e.toString());
+ lastError=1;
+ }
+ }
+ protected void action_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort(InterfaceItemBase ifitem) {
+ try{
+ if(socket!=null){
+ socket.close();
+ }
+ }catch(IOException e){
+ System.err.println(e.toString());
+ }
+ }
+ protected void action_TRANS_tr2_FROM_cp0_TO_opened(InterfaceItemBase ifitem, DTcpControl data) {
+ ControlPort.established();
+ }
+ protected void action_TRANS_socketError_FROM_cp0_TO_error_COND_socketError(InterfaceItemBase ifitem, DTcpControl data) {
+ ControlPort.error();
+ try{
+ socket.close();
+ } catch(IOException e){
+ System.err.println(e.toString());
+ }
+ }
+ protected void action_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3(InterfaceItemBase ifitem, DTcpPayload data) {
+ try{
+ outStreams.get(data.getConnectionId()).write(data.getData(),0,data.length);
+ }catch(IOException e){
+ System.err.println(e.toString());
+ }
+ }
+
+ /* State Switch Methods */
+ /**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+ private void exitTo(int current__et, int to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_closed:
+ this.history[STATE_TOP] = STATE_closed;
+ current__et = STATE_TOP;
+ break;
+ case STATE_opened:
+ this.history[STATE_TOP] = STATE_opened;
+ current__et = STATE_TOP;
+ break;
+ case STATE_error:
+ this.history[STATE_TOP] = STATE_error;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ }
+
+ /**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+ private int executeTransitionChain(int chain__et, InterfaceItemBase ifitem, Object generic_data__et) {
+ switch (chain__et) {
+ case ATcpServer.CHAIN_TRANS_INITIAL_TO__closed:
+ {
+ return STATE_closed;
+ }
+ case ATcpServer.CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort:
+ {
+ DTcpControl data = (DTcpControl) generic_data__et;
+ action_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort(ifitem, data);
+ if (lastError!=0) {
+ action_TRANS_socketError_FROM_cp0_TO_error_COND_socketError(ifitem, data);
+ return STATE_error;}
+ else {
+ action_TRANS_tr2_FROM_cp0_TO_opened(ifitem, data);
+ return STATE_opened;}
+ }
+ case ATcpServer.CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort:
+ {
+ action_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort(ifitem);
+ return STATE_closed;
+ }
+ case ATcpServer.CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3:
+ {
+ DTcpPayload data = (DTcpPayload) generic_data__et;
+ action_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3(ifitem, data);
+ return STATE_opened;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+ }
+
+ /**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+ private int enterHistory(int state__et) {
+ if (state__et >= STATE_MAX) {
+ state__et = (state__et - STATE_MAX);
+ }
+ while (true) {
+ switch (state__et) {
+ case STATE_closed:
+ /* in leaf state: return state id */
+ return STATE_closed;
+ case STATE_opened:
+ /* in leaf state: return state id */
+ return STATE_opened;
+ case STATE_error:
+ /* in leaf state: return state id */
+ return STATE_error;
+ case STATE_TOP:
+ state__et = this.history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+ }
+
+ public void executeInitTransition() {
+ int chain__et = ATcpServer.CHAIN_TRANS_INITIAL_TO__closed;
+ int next__et = executeTransitionChain(chain__et, null, null);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+
+ /* receiveEvent contains the main implementation of the FSM */
+ public void receiveEventInternal(InterfaceItemBase ifitem, int localId, int evt, Object generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ int catching_state__et = NO_STATE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState()) {
+ case STATE_closed:
+ switch(trigger__et) {
+ case TRIG_ControlPort__open:
+ {
+ chain__et = ATcpServer.CHAIN_TRANS_tr0_FROM_closed_TO_cp0_BY_openControlPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_opened:
+ switch(trigger__et) {
+ case TRIG_ControlPort__close:
+ {
+ chain__et = ATcpServer.CHAIN_TRANS_tr1_FROM_opened_TO_closed_BY_closeControlPort;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_PayloadPort__send:
+ {
+ chain__et = ATcpServer.CHAIN_TRANS_tr3_FROM_opened_TO_opened_BY_sendPayloadPort_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ case STATE_error:
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(getState(), catching_state__et);
+ {
+ int next__et = executeTransitionChain(chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+ }
+ }
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data__et) {
+ int localId = (ifitem==null)? 0 : ifitem.getLocalId();
+ receiveEventInternal(ifitem, localId, evt, generic_data__et);
+ }
+
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpControl.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpControl.java
new file mode 100644
index 000000000..c8fbef7ed
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpControl.java
@@ -0,0 +1,61 @@
+package room.basic.service.tcp;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+import java.io.Serializable;
+
+
+
+
+public class DTcpControl implements Serializable {
+
+ private static final long serialVersionUID = -156692117L;
+
+
+ /*--------------------- attributes ---------------------*/
+ public String IPAddr;
+ public int TcpPort;
+
+ /* --------------------- attribute setters and getters */
+ public void setIPAddr(String IPAddr) {
+ this.IPAddr = IPAddr;
+ }
+ public String getIPAddr() {
+ return this.IPAddr;
+ }
+ public void setTcpPort(int TcpPort) {
+ this.TcpPort = TcpPort;
+ }
+ public int getTcpPort() {
+ return this.TcpPort;
+ }
+
+ /*--------------------- operations ---------------------*/
+
+ // default constructor
+ public DTcpControl() {
+ super();
+
+ // initialize attributes
+ this.setIPAddr("");
+
+ /* user defined constructor body */
+ }
+
+ // constructor using fields
+ public DTcpControl(String IPAddr, int TcpPort) {
+ super();
+
+ this.IPAddr = IPAddr;
+ this.TcpPort = TcpPort;
+
+ /* user defined constructor body */
+ }
+
+ // deep copy
+ public DTcpControl deepCopy() {
+ DTcpControl copy = new DTcpControl();
+ copy.IPAddr = IPAddr;
+ copy.TcpPort = TcpPort;
+ return copy;
+ }
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpPayload.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpPayload.java
new file mode 100644
index 000000000..c08b6630f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/DTcpPayload.java
@@ -0,0 +1,78 @@
+package room.basic.service.tcp;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+import java.io.Serializable;
+
+
+
+
+public class DTcpPayload implements Serializable {
+
+ private static final long serialVersionUID = -1894937188L;
+
+
+ /*--------------------- attributes ---------------------*/
+ public int connectionId;
+ public int length;
+ public byte data[];
+
+ /* --------------------- attribute setters and getters */
+ public void setConnectionId(int connectionId) {
+ this.connectionId = connectionId;
+ }
+ public int getConnectionId() {
+ return this.connectionId;
+ }
+ public void setLength(int length) {
+ this.length = length;
+ }
+ public int getLength() {
+ return this.length;
+ }
+ public void setData(byte[] data) {
+ this.data = data;
+ }
+ public byte[] getData() {
+ return this.data;
+ }
+
+ /*--------------------- operations ---------------------*/
+
+ // default constructor
+ public DTcpPayload() {
+ super();
+
+ // initialize attributes
+ {
+ byte[] array = new byte[1000];
+ for (int i=0;i<1000;i++){
+ array[i] = (byte)0;
+ }
+ this.setData(array);
+ }
+
+ /* user defined constructor body */
+ }
+
+ // constructor using fields
+ public DTcpPayload(int connectionId, int length, byte[] data) {
+ super();
+
+ this.connectionId = connectionId;
+ this.length = length;
+ this.data = data;
+
+ /* user defined constructor body */
+ }
+
+ // deep copy
+ public DTcpPayload deepCopy() {
+ DTcpPayload copy = new DTcpPayload();
+ copy.connectionId = connectionId;
+ copy.length = length;
+ for (int i=0;i<data.length;i++){
+ copy.data[i] = data[i];
+ }
+ return copy;
+ }
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpControl.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpControl.java
new file mode 100644
index 000000000..26ceadc86
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpControl.java
@@ -0,0 +1,202 @@
+package room.basic.service.tcp;
+
+import org.eclipse.etrice.runtime.java.messaging.Message;
+import org.eclipse.etrice.runtime.java.modelbase.EventMessage;
+import org.eclipse.etrice.runtime.java.modelbase.EventWithDataMessage;
+import org.eclipse.etrice.runtime.java.modelbase.IInterfaceItemOwner;
+import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
+import org.eclipse.etrice.runtime.java.modelbase.PortBase;
+import org.eclipse.etrice.runtime.java.modelbase.ReplicatedPortBase;
+import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+
+
+public class PTcpControl {
+ // message IDs
+ public static final int MSG_MIN = 0;
+ public static final int OUT_established = 1;
+ public static final int OUT_error = 2;
+ public static final int IN_open = 3;
+ public static final int IN_close = 4;
+ public static final int MSG_MAX = 5;
+
+
+ private static String messageStrings[] = {"MIN", "established","error", "open","close","MAX"};
+
+ public String getMessageString(int msg_id) {
+ if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){
+ // id out of range
+ return "Message ID out of range";
+ }
+ else{
+ return messageStrings[msg_id];
+ }
+ }
+
+
+ // port class
+ static public class PTcpControlPort extends PortBase {
+ // constructors
+ public PTcpControlPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTcpControlPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+
+ // sent messages
+ public void established() {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_established]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_established));
+ }
+ public void error() {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_error]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_error));
+ }
+ }
+
+ // replicated port class
+ static public class PTcpControlReplPort extends ReplicatedPortBase {
+
+ public PTcpControlReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTcpControlPort get(int idx) {
+ return (PTcpControlPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTcpControlPort(rcv, name, lid, idx);
+ }
+
+ // outgoing messages
+ public void established(){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpControlPort)item).established();
+ }
+ }
+ public void error(){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpControlPort)item).error();
+ }
+ }
+ }
+
+
+ // port class
+ static public class PTcpControlConjPort extends PortBase {
+ // constructors
+ public PTcpControlConjPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTcpControlConjPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+
+ // sent messages
+ public void open(DTcpControl data) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_open]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_open, data.deepCopy()));
+ }
+ public void open(String IPAddr, int TcpPort) {
+ open(new DTcpControl(IPAddr, TcpPort));
+ }
+ public void close() {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_close]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_close));
+ }
+ }
+
+ // replicated port class
+ static public class PTcpControlConjReplPort extends ReplicatedPortBase {
+
+ public PTcpControlConjReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTcpControlConjPort get(int idx) {
+ return (PTcpControlConjPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTcpControlConjPort(rcv, name, lid, idx);
+ }
+
+ // incoming messages
+ public void open(DTcpControl data){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpControlConjPort)item).open( data);
+ }
+ }
+ public void close(){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpControlConjPort)item).close();
+ }
+ }
+ }
+
+}
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpPayload.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpPayload.java
new file mode 100644
index 000000000..824f95db1
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/tcp/PTcpPayload.java
@@ -0,0 +1,183 @@
+package room.basic.service.tcp;
+
+import org.eclipse.etrice.runtime.java.messaging.Message;
+import org.eclipse.etrice.runtime.java.modelbase.EventMessage;
+import org.eclipse.etrice.runtime.java.modelbase.EventWithDataMessage;
+import org.eclipse.etrice.runtime.java.modelbase.IInterfaceItemOwner;
+import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
+import org.eclipse.etrice.runtime.java.modelbase.PortBase;
+import org.eclipse.etrice.runtime.java.modelbase.ReplicatedPortBase;
+import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+
+
+public class PTcpPayload {
+ // message IDs
+ public static final int MSG_MIN = 0;
+ public static final int OUT_receive = 1;
+ public static final int IN_send = 2;
+ public static final int MSG_MAX = 3;
+
+
+ private static String messageStrings[] = {"MIN", "receive", "send","MAX"};
+
+ public String getMessageString(int msg_id) {
+ if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){
+ // id out of range
+ return "Message ID out of range";
+ }
+ else{
+ return messageStrings[msg_id];
+ }
+ }
+
+
+ // port class
+ static public class PTcpPayloadPort extends PortBase {
+ // constructors
+ public PTcpPayloadPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTcpPayloadPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+
+ // sent messages
+ public void receive(DTcpPayload data) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_receive]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_receive, data.deepCopy()));
+ }
+ public void receive(int connectionId, int length, byte[] data) {
+ receive(new DTcpPayload(connectionId, length, data));
+ }
+ }
+
+ // replicated port class
+ static public class PTcpPayloadReplPort extends ReplicatedPortBase {
+
+ public PTcpPayloadReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTcpPayloadPort get(int idx) {
+ return (PTcpPayloadPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTcpPayloadPort(rcv, name, lid, idx);
+ }
+
+ // outgoing messages
+ public void receive(DTcpPayload data){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpPayloadPort)item).receive( data);
+ }
+ }
+ }
+
+
+ // port class
+ static public class PTcpPayloadConjPort extends PortBase {
+ // constructors
+ public PTcpPayloadConjPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTcpPayloadConjPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+
+
+ // sent messages
+ public void send(DTcpPayload data) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_send]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_send, data.deepCopy()));
+ }
+ public void send(int connectionId, int length, byte[] data) {
+ send(new DTcpPayload(connectionId, length, data));
+ }
+ }
+
+ // replicated port class
+ static public class PTcpPayloadConjReplPort extends ReplicatedPortBase {
+
+ public PTcpPayloadConjReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTcpPayloadConjPort get(int idx) {
+ return (PTcpPayloadConjPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTcpPayloadConjPort(rcv, name, lid, idx);
+ }
+
+ // incoming messages
+ public void send(DTcpPayload data){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTcpPayloadConjPort)item).send( data);
+ }
+ }
+ }
+
+}
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/ATimingService.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/ATimingService.java
new file mode 100644
index 000000000..89ca94411
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/ATimingService.java
@@ -0,0 +1,289 @@
+package room.basic.service.timing;
+
+import org.eclipse.etrice.runtime.java.messaging.*;
+import org.eclipse.etrice.runtime.java.modelbase.*;
+import org.eclipse.etrice.runtime.java.debugging.*;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+import room.basic.service.timing.PTimer.*;
+
+/*--------------------- begin user code ---------------------*/
+import java.util.Timer;
+/*--------------------- end user code ---------------------*/
+
+
+public class ATimingService extends ActorClassBase {
+
+ /*--------------------- begin user code ---------------------*/
+ private Timer timerService = null;
+ private int taskCount = 0;
+ private static final int PURGE_LIMIT = 1000;
+ /*--------------------- end user code ---------------------*/
+
+ //--------------------- ports
+
+ //--------------------- saps
+
+ //--------------------- services
+ protected PTimerReplPort timer = null;
+
+ //--------------------- optional actors
+
+ //--------------------- interface item IDs
+ public static final int IFITEM_timer = 1;
+
+ /*--------------------- attributes ---------------------*/
+
+ /*--------------------- operations ---------------------*/
+ public void stop() {
+ System.out.println(toString() + "::stop()");
+ timerService.cancel();
+ timerService = null;
+ }
+
+
+ //--------------------- construction
+ public ATimingService(IRTObject parent, String name) {
+ super(parent, name);
+ setClassName("ATimingService");
+
+ // initialize attributes
+
+ // own ports
+
+ // own saps
+
+ // own service implementations
+ timer = new PTimerReplPort(this, "timer", IFITEM_timer);
+
+ // sub actors
+
+ // wiring
+
+
+ /* user defined constructor body */
+
+ }
+
+ /* --------------------- attribute setters and getters */
+
+
+ //--------------------- port getters
+ public PTimerReplPort getTimer (){
+ return this.timer;
+ }
+
+ //--------------------- lifecycle functions
+
+ public void destroy(){
+ /* user defined destructor body */
+ DebuggingService.getInstance().addMessageActorDestroy(this);
+ super.destroy();
+ }
+
+ /* state IDs */
+ public static final int STATE_Operational = 2;
+ public static final int STATE_MAX = 3;
+
+ /* transition chains */
+ public static final int CHAIN_TRANS_INITIAL_TO__Operational = 1;
+ public static final int CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_internalStartTimertimer_tr1 = 2;
+ public static final int CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_internalStartTimeouttimer_tr3 = 3;
+ public static final int CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4 = 4;
+
+ /* triggers */
+ public static final int POLLING = 0;
+ public static final int TRIG_timer__kill = IFITEM_timer + EVT_SHIFT*PTimer.IN_kill;
+ public static final int TRIG_timer__internalStartTimer = IFITEM_timer + EVT_SHIFT*PTimer.IN_internalStartTimer;
+ public static final int TRIG_timer__internalStartTimeout = IFITEM_timer + EVT_SHIFT*PTimer.IN_internalStartTimeout;
+
+ // state names
+ protected static final String stateStrings[] = {
+ "<no state>",
+ "<top>",
+ "Operational"
+ };
+
+ // history
+ protected int history[] = {NO_STATE, NO_STATE, NO_STATE};
+
+ private void setState(int new_state) {
+ DebuggingService.getInstance().addActorState(this,stateStrings[new_state]);
+ this.state = new_state;
+ }
+
+ /* Entry and Exit Codes */
+ protected void entry_Operational() {
+ // prepare
+ }
+
+ /* Action Codes */
+ protected void action_TRANS_INITIAL_TO__Operational() {
+ timerService = new Timer();
+ }
+ protected void action_TRANS_tr1_FROM_Operational_TO_Operational_BY_internalStartTimertimer_tr1(InterfaceItemBase ifitem, TimerData td) {
+ // start timer
+ taskCount++;
+ if (taskCount>PURGE_LIMIT) timerService.purge();
+ int t = td.getTime();
+ timerService.scheduleAtFixedRate(((PTimerPort)ifitem).getTask(),t,t);
+ }
+ protected void action_TRANS_tr3_FROM_Operational_TO_Operational_BY_internalStartTimeouttimer_tr3(InterfaceItemBase ifitem, TimerData td) {
+ // start timeout
+ taskCount++;
+ if (taskCount>PURGE_LIMIT) timerService.purge();
+ timerService.schedule(((PTimerPort)ifitem).getTask(), ((TimerData)td).getTime());
+ }
+ protected void action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(InterfaceItemBase ifitem) {
+ // nothing to do to kill timer (handled by timer)
+ }
+
+ /* State Switch Methods */
+ /**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current__et - the current state
+ * @param to - the final parent state
+ */
+ private void exitTo(int current__et, int to) {
+ while (current__et!=to) {
+ switch (current__et) {
+ case STATE_Operational:
+ this.history[STATE_TOP] = STATE_Operational;
+ current__et = STATE_TOP;
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ }
+
+ /**
+ * calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
+ * matching the trigger of this chain. The ID of the final state is returned
+ * @param chain__et - the chain ID
+ * @param generic_data__et - the generic data pointer
+ * @return the +/- ID of the final state either with a positive sign, that indicates to execute the state's entry code, or a negative sign vice versa
+ */
+ private int executeTransitionChain(int chain__et, InterfaceItemBase ifitem, Object generic_data__et) {
+ switch (chain__et) {
+ case ATimingService.CHAIN_TRANS_INITIAL_TO__Operational:
+ {
+ action_TRANS_INITIAL_TO__Operational();
+ return STATE_Operational;
+ }
+ case ATimingService.CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_internalStartTimertimer_tr1:
+ {
+ TimerData td = (TimerData) generic_data__et;
+ action_TRANS_tr1_FROM_Operational_TO_Operational_BY_internalStartTimertimer_tr1(ifitem, td);
+ return STATE_Operational;
+ }
+ case ATimingService.CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_internalStartTimeouttimer_tr3:
+ {
+ TimerData td = (TimerData) generic_data__et;
+ action_TRANS_tr3_FROM_Operational_TO_Operational_BY_internalStartTimeouttimer_tr3(ifitem, td);
+ return STATE_Operational;
+ }
+ case ATimingService.CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4:
+ {
+ action_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4(ifitem);
+ return STATE_Operational;
+ }
+ default:
+ /* should not occur */
+ break;
+ }
+ return NO_STATE;
+ }
+
+ /**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state__et - the state which is entered
+ * @return - the ID of the final leaf state
+ */
+ private int enterHistory(int state__et) {
+ boolean skip_entry__et = false;
+ if (state__et >= STATE_MAX) {
+ state__et = (state__et - STATE_MAX);
+ skip_entry__et = true;
+ }
+ while (true) {
+ switch (state__et) {
+ case STATE_Operational:
+ if (!(skip_entry__et)) entry_Operational();
+ /* in leaf state: return state id */
+ return STATE_Operational;
+ case STATE_TOP:
+ state__et = this.history[STATE_TOP];
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ skip_entry__et = false;
+ }
+ /* return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true) */
+ }
+
+ public void executeInitTransition() {
+ int chain__et = ATimingService.CHAIN_TRANS_INITIAL_TO__Operational;
+ int next__et = executeTransitionChain(chain__et, null, null);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+
+ /* receiveEvent contains the main implementation of the FSM */
+ public void receiveEventInternal(InterfaceItemBase ifitem, int localId, int evt, Object generic_data__et) {
+ int trigger__et = localId + EVT_SHIFT*evt;
+ int chain__et = NOT_CAUGHT;
+ int catching_state__et = NO_STATE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data__et)) {
+ switch (getState()) {
+ case STATE_Operational:
+ switch(trigger__et) {
+ case TRIG_timer__internalStartTimer:
+ {
+ chain__et = ATimingService.CHAIN_TRANS_tr1_FROM_Operational_TO_Operational_BY_internalStartTimertimer_tr1;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__internalStartTimeout:
+ {
+ chain__et = ATimingService.CHAIN_TRANS_tr3_FROM_Operational_TO_Operational_BY_internalStartTimeouttimer_tr3;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ case TRIG_timer__kill:
+ {
+ chain__et = ATimingService.CHAIN_TRANS_tr4_FROM_Operational_TO_Operational_BY_killtimer_tr4;
+ catching_state__et = STATE_TOP;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ break;
+ default:
+ /* should not occur */
+ break;
+ }
+ }
+ if (chain__et != NOT_CAUGHT) {
+ exitTo(getState(), catching_state__et);
+ {
+ int next__et = executeTransitionChain(chain__et, ifitem, generic_data__et);
+ next__et = enterHistory(next__et);
+ setState(next__et);
+ }
+ }
+ }
+ public void receiveEvent(InterfaceItemBase ifitem, int evt, Object generic_data__et) {
+ int localId = (ifitem==null)? 0 : ifitem.getLocalId();
+ receiveEventInternal(ifitem, localId, evt, generic_data__et);
+ }
+
+};
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/PTimer.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/PTimer.java
new file mode 100644
index 000000000..7204d9562
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/PTimer.java
@@ -0,0 +1,361 @@
+package room.basic.service.timing;
+
+import org.eclipse.etrice.runtime.java.messaging.Message;
+import org.eclipse.etrice.runtime.java.modelbase.EventMessage;
+import org.eclipse.etrice.runtime.java.modelbase.EventWithDataMessage;
+import org.eclipse.etrice.runtime.java.modelbase.IInterfaceItemOwner;
+import org.eclipse.etrice.runtime.java.modelbase.InterfaceItemBase;
+import org.eclipse.etrice.runtime.java.modelbase.PortBase;
+import org.eclipse.etrice.runtime.java.modelbase.ReplicatedPortBase;
+import org.eclipse.etrice.runtime.java.debugging.DebuggingService;
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+
+/*--------------------- begin user code ---------------------*/
+import java.util.TimerTask;
+import org.eclipse.etrice.runtime.java.messaging.RTServices;
+/*--------------------- end user code ---------------------*/
+
+
+public class PTimer {
+ // message IDs
+ public static final int MSG_MIN = 0;
+ public static final int OUT_timeout = 1;
+ public static final int OUT_internalTimer = 2;
+ public static final int OUT_internalTimeout = 3;
+ public static final int IN_kill = 4;
+ public static final int IN_internalStartTimer = 5;
+ public static final int IN_internalStartTimeout = 6;
+ public static final int MSG_MAX = 7;
+
+ /*--------------------- begin user code ---------------------*/
+ static protected class FireTimeoutTask extends TimerTask {
+
+ private int time;
+ private int id;
+ private boolean periodic;
+ private PTimerPort port;
+
+ public FireTimeoutTask(int time, int id, boolean periodic, PTimerPort port) {
+ this.time = time;
+ this.id = id;
+ this.periodic = periodic;
+ this.port = port;
+ }
+
+ @Override
+ public void run() {
+ TimerData td = new TimerData(0,id);
+ if (periodic)
+ port.internalTimer(td);
+ else
+ port.internalTimeout(td);
+ }
+
+ public int getTime() {
+ return time;
+ }
+
+ public int getId() {
+ return id;
+ }
+ }
+
+ /*--------------------- end user code ---------------------*/
+
+ private static String messageStrings[] = {"MIN", "timeout","internalTimer","internalTimeout", "kill","internalStartTimer","internalStartTimeout","MAX"};
+
+ public String getMessageString(int msg_id) {
+ if (msg_id<MSG_MIN || msg_id>MSG_MAX+1){
+ // id out of range
+ return "Message ID out of range";
+ }
+ else{
+ return messageStrings[msg_id];
+ }
+ }
+
+
+ // port class
+ static public class PTimerPort extends PortBase {
+ /*--------------------- begin user code ---------------------*/
+ private FireTimeoutTask task = null;
+ public TimerTask getTask() { return task; }
+ /*--------------------- end user code ---------------------*/
+ // constructors
+ public PTimerPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTimerPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ // initialize attributes
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ switch (msg.getEvtId()) {
+ case IN_internalStartTimer:
+ {
+ EventWithDataMessage dataMsg = (EventWithDataMessage) msg;
+ TimerData td = (TimerData)dataMsg.getData();
+ task = new FireTimeoutTask(td.time, td.id, true, this);
+ getActor().receiveEvent(this, IN_internalStartTimer, td);
+ }
+ break;
+ case IN_internalStartTimeout:
+ {
+ EventWithDataMessage dataMsg = (EventWithDataMessage) msg;
+ TimerData td = (TimerData)dataMsg.getData();
+ task = new FireTimeoutTask(td.time, td.id, false, this);
+ getActor().receiveEvent(this, IN_internalStartTimeout, td);
+ }
+ break;
+ case IN_kill:
+ {
+ //regular PortClass handle kill
+ EventWithDataMessage dataMsg = (EventWithDataMessage) msg;
+ TimerData td = (TimerData)dataMsg.getData();
+ if (task!=null && task.getId()==td.getId()) {
+ task.cancel();
+ }
+ }
+ break;
+ default:
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+ }
+
+ /*--------------------- attributes ---------------------*/
+ /* --------------------- attribute setters and getters */
+ /*--------------------- operations ---------------------*/
+
+ // sent messages
+ public void timeout() {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_timeout]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), OUT_timeout));
+ }
+ private void internalTimer(TimerData td) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_internalTimer]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_internalTimer, td.deepCopy()));
+ }
+ public void internalTimer(int time, int id) {
+ internalTimer(new TimerData(time, id));
+ }
+ private void internalTimeout(TimerData td) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[OUT_internalTimeout]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), OUT_internalTimeout, td.deepCopy()));
+ }
+ public void internalTimeout(int time, int id) {
+ internalTimeout(new TimerData(time, id));
+ }
+ }
+
+ // replicated port class
+ static public class PTimerReplPort extends ReplicatedPortBase {
+
+ public PTimerReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTimerPort get(int idx) {
+ return (PTimerPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTimerPort(rcv, name, lid, idx);
+ }
+
+ // outgoing messages
+ public void timeout(){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerPort)item).timeout();
+ }
+ }
+ private void internalTimer(TimerData td){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerPort)item).internalTimer( td);
+ }
+ }
+ private void internalTimeout(TimerData td){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerPort)item).internalTimeout( td);
+ }
+ }
+ }
+
+
+ // port class
+ static public class PTimerConjPort extends PortBase {
+ /*--------------------- begin user code ---------------------*/
+ private int currentId = 0;
+ private boolean active = false;
+ /*--------------------- end user code ---------------------*/
+ // constructors
+ public PTimerConjPort(IInterfaceItemOwner actor, String name, int localId) {
+ this(actor, name, localId, 0);
+ }
+ public PTimerConjPort(IInterfaceItemOwner actor, String name, int localId, int idx) {
+ super(actor, name, localId, idx);
+ // initialize attributes
+ DebuggingService.getInstance().addPortInstance(this);
+ }
+
+ public void destroy() {
+ DebuggingService.getInstance().removePortInstance(this);
+ super.destroy();
+ }
+
+ @Override
+ public void receive(Message m) {
+ if (!(m instanceof EventMessage))
+ return;
+ EventMessage msg = (EventMessage) m;
+ if (0 < msg.getEvtId() && msg.getEvtId() < MSG_MAX) {
+ DebuggingService.getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]);
+ switch (msg.getEvtId()) {
+ case OUT_internalTimer:
+ {
+ //conjugated PortClass handle timer
+ EventWithDataMessage dataMsg = (EventWithDataMessage) msg;
+ TimerData td = (TimerData) dataMsg.getData();
+ if (active && td.getId()==currentId) {
+ getActor().receiveEvent(this, OUT_timeout, null);
+ }
+ }
+ break;
+ case OUT_internalTimeout:
+ {
+ //conjugated PortClass handle timeout
+ EventWithDataMessage dataMsg = (EventWithDataMessage) msg;
+ TimerData td = (TimerData) dataMsg.getData();
+ if (active && td.getId()==currentId) {
+ active = false;
+ getActor().receiveEvent(this, OUT_timeout, null);
+ }
+ }
+ break;
+ default:
+ if (msg instanceof EventWithDataMessage)
+ getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage)msg).getData());
+ else
+ getActor().receiveEvent(this, msg.getEvtId(), null);
+ }
+ }
+ }
+
+ /*--------------------- attributes ---------------------*/
+ /* --------------------- attribute setters and getters */
+ /*--------------------- operations ---------------------*/
+ public void startTimer(int time_ms) {
+ if (active) return;
+ active = true;
+
+ if (RTServices.getInstance().getSubSystem().hasGeneratedMSCInstrumentation())
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalStartTimer]);
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalStartTimer, new TimerData(time_ms,++currentId)));
+ }
+ public void startTimeout(int time_ms) {
+ if (active) return;
+ active = true;
+
+ if (RTServices.getInstance().getSubSystem().hasGeneratedMSCInstrumentation())
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalStartTimeout]);
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalStartTimeout, new TimerData(time_ms,++currentId)));
+ }
+
+ // sent messages
+ public void kill() {
+ //conjugated PortClass kill
+ if (active) {
+ active = false;
+ TimerData td = new TimerData();
+ td.setId(currentId);
+ getPeerMsgReceiver().receive(
+ new EventWithDataMessage(getPeerAddress(), IN_kill, td));
+ }
+ }
+ private void internalStartTimer(TimerData td) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalStartTimer]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalStartTimer, td.deepCopy()));
+ }
+ public void internalStartTimer(int time, int id) {
+ internalStartTimer(new TimerData(time, id));
+ }
+ private void internalStartTimeout(TimerData td) {
+ DebuggingService.getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_internalStartTimeout]);
+ if (getPeerAddress()!=null)
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), IN_internalStartTimeout, td.deepCopy()));
+ }
+ public void internalStartTimeout(int time, int id) {
+ internalStartTimeout(new TimerData(time, id));
+ }
+ }
+
+ // replicated port class
+ static public class PTimerConjReplPort extends ReplicatedPortBase {
+
+ public PTimerConjReplPort(IInterfaceItemOwner actor, String name, int localId) {
+ super(actor, name, localId);
+ }
+
+ public int getReplication() {
+ return getNInterfaceItems();
+ }
+
+ public int getIndexOf(InterfaceItemBase ifitem){
+ return ifitem.getIdx();
+ }
+
+ public PTimerConjPort get(int idx) {
+ return (PTimerConjPort) getInterfaceItem(idx);
+ }
+
+ protected InterfaceItemBase createInterfaceItem(IInterfaceItemOwner rcv, String name, int lid, int idx) {
+ return new PTimerConjPort(rcv, name, lid, idx);
+ }
+
+ // incoming messages
+ public void kill(){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerConjPort)item).kill();
+ }
+ }
+ private void internalStartTimer(TimerData td){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerConjPort)item).internalStartTimer( td);
+ }
+ }
+ private void internalStartTimeout(TimerData td){
+ for (InterfaceItemBase item : getItems()) {
+ ((PTimerConjPort)item).internalStartTimeout( td);
+ }
+ }
+ }
+
+}
diff --git a/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/TimerData.java b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/TimerData.java
new file mode 100644
index 000000000..a6a4dc250
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/src-gen/room/basic/service/timing/TimerData.java
@@ -0,0 +1,60 @@
+package room.basic.service.timing;
+
+import static org.eclipse.etrice.runtime.java.etunit.EtUnit.*;
+import java.io.Serializable;
+
+
+
+
+public class TimerData implements Serializable {
+
+ private static final long serialVersionUID = 633780889L;
+
+
+ /*--------------------- attributes ---------------------*/
+ public int time;
+ public int id;
+
+ /* --------------------- attribute setters and getters */
+ public void setTime(int time) {
+ this.time = time;
+ }
+ public int getTime() {
+ return this.time;
+ }
+ public void setId(int id) {
+ this.id = id;
+ }
+ public int getId() {
+ return this.id;
+ }
+
+ /*--------------------- operations ---------------------*/
+
+ // default constructor
+ public TimerData() {
+ super();
+
+ // initialize attributes
+
+ /* user defined constructor body */
+ }
+
+ // constructor using fields
+ public TimerData(int time, int id) {
+ super();
+
+ this.time = time;
+ this.id = id;
+
+ /* user defined constructor body */
+ }
+
+ // deep copy
+ public TimerData deepCopy() {
+ TimerData copy = new TimerData();
+ copy.time = time;
+ copy.id = id;
+ return copy;
+ }
+};

Back to the top