Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2012-10-29 16:14:02 +0000
committerThomas Schuetz2012-10-29 16:14:02 +0000
commita3fc9f7ab62dffb1a1df18145745018924323029 (patch)
treed504bf56f52a8e58365cc8d94591fd38f490248a /examples
parent3695212f9ea0b7f7d90932e2c57b2705c8852643 (diff)
downloadorg.eclipse.etrice-a3fc9f7ab62dffb1a1df18145745018924323029.tar.gz
org.eclipse.etrice-a3fc9f7ab62dffb1a1df18145745018924323029.tar.xz
org.eclipse.etrice-a3fc9f7ab62dffb1a1df18145745018924323029.zip
[generator.c] changed initialization of external types / checked in
other line endings to get rid of diffs
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/.cproject246
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/.gitignore2
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/.project64
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/.settings/org.eclipse.cdt.managedbuilder.core.prefs22
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/gen_org.eclipse.etrice.tutorials.c.launch22
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room360
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.c650
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.h120
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.c404
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.h122
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.c72
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.h78
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c178
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.h108
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.c222
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.h60
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Disp.h62
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Inst.h152
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Runner.c98
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/src-gen/readme.txt8
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/test.txt650
-rw-r--r--examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.BlinkyTop.behavior50
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Async.seq15
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Sync.seq1
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath12
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project34
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc32
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java364
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java172
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java182
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java106
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch24
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch24
34 files changed, 2378 insertions, 2362 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.c/.cproject b/examples/org.eclipse.etrice.tutorials.c/.cproject
index f81c6738f..8db258309 100644
--- a/examples/org.eclipse.etrice.tutorials.c/.cproject
+++ b/examples/org.eclipse.etrice.tutorials.c/.cproject
@@ -1,123 +1,123 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?fileVersion 4.0.0?>
-
-<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
- <storageModule moduleId="org.eclipse.cdt.core.settings">
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.398564850" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1829109580" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.tutorials.c/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.856247028" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.1509057272" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1460359562" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.48213125" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1958071026" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1447113587" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.559425075" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.137613907" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
- <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1729303001" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.145157070" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.327861845" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/common}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/config}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.533629505" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.319733671" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
- <option id="gnu.c.link.option.paths.819761090" superClass="gnu.c.link.option.paths" valueType="libPaths">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
- </option>
- <option id="gnu.c.link.option.libs.1013803342" superClass="gnu.c.link.option.libs" valueType="libs">
- <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.506258125" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1214027870" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
- </toolChain>
- </folderInfo>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196" moduleId="org.eclipse.cdt.core.settings" name="Release">
- <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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1134127031" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.922928036" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.tutorials.c/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.462260253" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.372228887" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2135748071" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1157198261" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.2109801791" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
- <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.223357319" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1181424034" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.48613690" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
- <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.510402959" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1826357245" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1173535425" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.121611690" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
- <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.484005163" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
- <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
- <additionalInput kind="additionalinput" paths="$(LIBS)"/>
- </inputType>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.489779988" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
- </toolChain>
- </folderInfo>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="org.eclipse.etrice.tutorials.c.cdt.managedbuild.target.gnu.mingw.exe.395320964" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
- </storageModule>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196;cdt.managedbuild.config.gnu.mingw.exe.release.1584531196.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.48613690;cdt.managedbuild.tool.gnu.c.compiler.input.1173535425">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761;cdt.managedbuild.config.gnu.mingw.exe.debug.332073761.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.137613907;cdt.managedbuild.tool.gnu.c.compiler.input.533629505">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Release">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.tutorials.c"/>
- </configuration>
- <configuration configurationName="Debug">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.tutorials.c"/>
- </configuration>
- </storageModule>
-</cproject>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.398564850" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.1829109580" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.tutorials.c/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.856247028" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.1509057272" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1460359562" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.48213125" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1958071026" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug">
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.1447113587" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.559425075" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.137613907" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
+ <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1729303001" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.145157070" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.327861845" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/common}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/config}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.533629505" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.319733671" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug">
+ <option id="gnu.c.link.option.paths.819761090" superClass="gnu.c.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.c/Debug}&quot;"/>
+ </option>
+ <option id="gnu.c.link.option.libs.1013803342" superClass="gnu.c.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="org.eclipse.etrice.runtime.c"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.506258125" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1214027870" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <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.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196" name="Release" parent="cdt.managedbuild.config.gnu.mingw.exe.release">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.release.1134127031" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.release">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.release.922928036" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.release"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.tutorials.c/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.462260253" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release.372228887" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.release">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2135748071" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1157198261" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.2109801791" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release">
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.optimization.level.223357319" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.exe.release.option.debugging.level.1181424034" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.48613690" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.exe.release.option.optimization.level.510402959" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.release.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.exe.release.option.debugging.level.1826357245" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1173535425" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release.121611690" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.release">
+ <inputType id="cdt.managedbuild.tool.gnu.c.linker.input.484005163" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release.489779988" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.release"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="org.eclipse.etrice.tutorials.c.cdt.managedbuild.target.gnu.mingw.exe.395320964" name="Executable" projectType="cdt.managedbuild.target.gnu.mingw.exe"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1584531196;cdt.managedbuild.config.gnu.mingw.exe.release.1584531196.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.48613690;cdt.managedbuild.tool.gnu.c.compiler.input.1173535425">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.332073761;cdt.managedbuild.config.gnu.mingw.exe.debug.332073761.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.137613907;cdt.managedbuild.tool.gnu.c.compiler.input.533629505">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Release">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.tutorials.c"/>
+ </configuration>
+ <configuration configurationName="Debug">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.tutorials.c"/>
+ </configuration>
+ </storageModule>
+</cproject>
diff --git a/examples/org.eclipse.etrice.tutorials.c/.gitignore b/examples/org.eclipse.etrice.tutorials.c/.gitignore
index 329d484df..f63ef278e 100644
--- a/examples/org.eclipse.etrice.tutorials.c/.gitignore
+++ b/examples/org.eclipse.etrice.tutorials.c/.gitignore
@@ -1 +1 @@
-Debug
+Debug
diff --git a/examples/org.eclipse.etrice.tutorials.c/.project b/examples/org.eclipse.etrice.tutorials.c/.project
index 61322faec..d25319e54 100644
--- a/examples/org.eclipse.etrice.tutorials.c/.project
+++ b/examples/org.eclipse.etrice.tutorials.c/.project
@@ -1,32 +1,32 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.tutorials.c</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.tutorials.c</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.etrice.tutorials.c/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/examples/org.eclipse.etrice.tutorials.c/.settings/org.eclipse.cdt.managedbuilder.core.prefs
index 0d1a951fd..fb57c2949 100644
--- a/examples/org.eclipse.etrice.tutorials.c/.settings/org.eclipse.cdt.managedbuilder.core.prefs
+++ b/examples/org.eclipse.etrice.tutorials.c/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -1,11 +1,11 @@
-eclipse.preferences.version=1
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/CPATH/delimiter=;
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/CPATH/operation=remove
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/C_INCLUDE_PATH/delimiter=;
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/C_INCLUDE_PATH/operation=remove
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/append=true
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/appendContributed=true
-environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/LIBRARY_PATH/delimiter=;
-environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/LIBRARY_PATH/operation=remove
-environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/append=true
-environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/appendContributed=true
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/CPATH/delimiter=;
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/CPATH/operation=remove
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/C_INCLUDE_PATH/delimiter=;
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/C_INCLUDE_PATH/operation=remove
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/append=true
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/appendContributed=true
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/LIBRARY_PATH/delimiter=;
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/LIBRARY_PATH/operation=remove
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/append=true
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.332073761/appendContributed=true
diff --git a/examples/org.eclipse.etrice.tutorials.c/gen_org.eclipse.etrice.tutorials.c.launch b/examples/org.eclipse.etrice.tutorials.c/gen_org.eclipse.etrice.tutorials.c.launch
index e95f078cf..b43afc976 100644
--- a/examples/org.eclipse.etrice.tutorials.c/gen_org.eclipse.etrice.tutorials.c.launch
+++ b/examples/org.eclipse.etrice.tutorials.c/gen_org.eclipse.etrice.tutorials.c.launch
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
-<booleanAttribute key="GenInstanceDiagram" value="false"/>
-<stringAttribute key="GenModelPath" value=""/>
-<booleanAttribute key="Lib" value="false"/>
-<listAttribute key="ModelFiles">
-<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room}"/>
-</listAttribute>
-<booleanAttribute key="SaveGenModel" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.etrice.generator.launch.c.launchConfigurationType">
+<booleanAttribute key="GenInstanceDiagram" value="false"/>
+<stringAttribute key="GenModelPath" value=""/>
+<booleanAttribute key="Lib" value="false"/>
+<listAttribute key="ModelFiles">
+<listEntry value="${workspace_loc:/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room}"/>
+</listAttribute>
+<booleanAttribute key="SaveGenModel" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room b/examples/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room
index f9e6b4552..23d9c1b8e 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room
+++ b/examples/org.eclipse.etrice.tutorials.c/model/RemoveComment/RemoveComment.room
@@ -1,181 +1,181 @@
-RoomModel RemoveComment {
- import room.basic.types.* from "../../../org.eclipse.etrice.modellib.c/model/Types.room"
-
- PrimitiveType file:ptInteger -> FILE default "0"
-
- SubSystemClass RemoveCommentSubSys {
- ActorRef Topref:ATop
- }
- ActorClass ATop {
- Structure {
- ActorRef reader: AFileReader
- ActorRef cParser: ACParser
- Binding reader.outPort and cParser.readerPort
- }
- Behavior { }
- }
- ActorClass AFileReader{
- Interface {
- Port outPort: FileReaderProtocol
- }
- Structure {
- usercode3{"#include <stdio.h>"
- }
- external Port outPort
- Attribute f:file ref
- }
- Behavior {
- StateMachine {
- Transition init: initial -> reading {
- action {
- "if ((f = fopen(\"test.txt\",\"r\")) != 0) {"
- "\tprintf(\"file open ok !\\r\\n\");"
- "\t}"
- "\telse {"
- "\tprintf(\"file not found !\\r\\n\");"
- "\tSubSysClass_shutdown();"
- "\t}"
- }
- }
- Transition tr0: reading -> reading {
- triggers {
- <getNextChar: outPort>
- }
- action {
- "int8 c;"
- "if ((c=fgetc(f)) != EOF) {"
- "\toutPort.nextChar(c);"
- "\t}"
- "\telse {"
- "\tfclose(f);"
- "\tprintf(\"file closed !\\r\\n\");"
- "\tSubSysClass_shutdown();"
- "\t}"
- }
- }
- State reading
- }
- }
- }
- ActorClass ACParser{
- Interface {
- conjugated Port readerPort: FileReaderProtocol
- }
- Structure {
- external Port readerPort
- }
- Behavior {
- StateMachine {
- Transition init: initial -> code {
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr0: code -> cp cp0 {
- triggers {
- <nextChar: readerPort>
- }
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr1: cp cp0 -> code {
- action {
- "printf(\"%c\",c);"
- }
- }
- Transition tr2: cp cp0 -> firstSlash {
- cond {
- "c==\'/\'"
- }
- }
- Transition tr3: firstSlash -> cp cp1 {
- triggers {
- <nextChar: readerPort>
- }
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr4: cp cp1 -> cp cp4
- Transition tr5: cp cp1 -> blockComment {
- cond {
- "c==\'*\'"
- }
- }
- Transition tr6: blockComment -> cp cp2 {
- triggers {
- <nextChar: readerPort>
- }
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr7: cp cp2 -> blockComment
- Transition tr8: cp cp2 -> firstStar {
- cond {
- "c==\'*\'"
- }
- }
- Transition tr9: firstStar -> cp cp3 {
- triggers {
- <nextChar: readerPort>
- }
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr10: cp cp3 -> blockComment
- Transition tr11: cp cp3 -> code {
- cond {
- "c==\'/\'"
- }
- }
- Transition tr12: cp cp4 -> code {
- action {
- "printf(\"%c%c\",\'/\',c);"
- }
- }
- Transition tr13: cp cp4 -> lineComment {
- cond {
- "c==\'/\'"
- }
- }
- Transition tr14: cp cp5 -> lineComment
- Transition tr15: lineComment -> cp cp5 {
- triggers {
- <nextChar: readerPort>
- }
- action {
- "readerPort.getNextChar();"
- }
- }
- Transition tr16: cp cp5 -> code {
- cond {
- "c==\'\\n\'"
- }
- }
- ChoicePoint cp0
- ChoicePoint cp1
- ChoicePoint cp2
- ChoicePoint cp3
- ChoicePoint cp4
- ChoicePoint cp5
- State code
- State firstSlash
- State blockComment
- State firstStar
- State lineComment
- }
- }
- }
-
- ProtocolClass FileReaderProtocol {
- incoming {
- Message getNextChar()
- }
- outgoing {
- Message nextChar(c:char)
- }
- }
+RoomModel RemoveComment {
+ import room.basic.types.* from "../../../org.eclipse.etrice.modellib.c/model/Types.room"
+
+ PrimitiveType file:ptInteger -> FILE default "0"
+
+ SubSystemClass RemoveCommentSubSys {
+ ActorRef Topref:ATop
+ }
+ ActorClass ATop {
+ Structure {
+ ActorRef reader: AFileReader
+ ActorRef cParser: ACParser
+ Binding reader.outPort and cParser.readerPort
+ }
+ Behavior { }
+ }
+ ActorClass AFileReader{
+ Interface {
+ Port outPort: FileReaderProtocol
+ }
+ Structure {
+ usercode3{"#include <stdio.h>"
+ }
+ external Port outPort
+ Attribute f:file ref
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> reading {
+ action {
+ "if ((f = fopen(\"test.txt\",\"r\")) != 0) {"
+ "\tprintf(\"file open ok !\\r\\n\");"
+ "\t}"
+ "\telse {"
+ "\tprintf(\"file not found !\\r\\n\");"
+ "\tSubSysClass_shutdown();"
+ "\t}"
+ }
+ }
+ Transition tr0: reading -> reading {
+ triggers {
+ <getNextChar: outPort>
+ }
+ action {
+ "int8 c;"
+ "if ((c=fgetc(f)) != EOF) {"
+ "\toutPort.nextChar(c);"
+ "\t}"
+ "\telse {"
+ "\tfclose(f);"
+ "\tprintf(\"file closed !\\r\\n\");"
+ "\tSubSysClass_shutdown();"
+ "\t}"
+ }
+ }
+ State reading
+ }
+ }
+ }
+ ActorClass ACParser{
+ Interface {
+ conjugated Port readerPort: FileReaderProtocol
+ }
+ Structure {
+ external Port readerPort
+ }
+ Behavior {
+ StateMachine {
+ Transition init: initial -> code {
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr0: code -> cp cp0 {
+ triggers {
+ <nextChar: readerPort>
+ }
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr1: cp cp0 -> code {
+ action {
+ "printf(\"%c\",c);"
+ }
+ }
+ Transition tr2: cp cp0 -> firstSlash {
+ cond {
+ "c==\'/\'"
+ }
+ }
+ Transition tr3: firstSlash -> cp cp1 {
+ triggers {
+ <nextChar: readerPort>
+ }
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr4: cp cp1 -> cp cp4
+ Transition tr5: cp cp1 -> blockComment {
+ cond {
+ "c==\'*\'"
+ }
+ }
+ Transition tr6: blockComment -> cp cp2 {
+ triggers {
+ <nextChar: readerPort>
+ }
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr7: cp cp2 -> blockComment
+ Transition tr8: cp cp2 -> firstStar {
+ cond {
+ "c==\'*\'"
+ }
+ }
+ Transition tr9: firstStar -> cp cp3 {
+ triggers {
+ <nextChar: readerPort>
+ }
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr10: cp cp3 -> blockComment
+ Transition tr11: cp cp3 -> code {
+ cond {
+ "c==\'/\'"
+ }
+ }
+ Transition tr12: cp cp4 -> code {
+ action {
+ "printf(\"%c%c\",\'/\',c);"
+ }
+ }
+ Transition tr13: cp cp4 -> lineComment {
+ cond {
+ "c==\'/\'"
+ }
+ }
+ Transition tr14: cp cp5 -> lineComment
+ Transition tr15: lineComment -> cp cp5 {
+ triggers {
+ <nextChar: readerPort>
+ }
+ action {
+ "readerPort.getNextChar();"
+ }
+ }
+ Transition tr16: cp cp5 -> code {
+ cond {
+ "c==\'\\n\'"
+ }
+ }
+ ChoicePoint cp0
+ ChoicePoint cp1
+ ChoicePoint cp2
+ ChoicePoint cp3
+ ChoicePoint cp4
+ ChoicePoint cp5
+ State code
+ State firstSlash
+ State blockComment
+ State firstStar
+ State lineComment
+ }
+ }
+ }
+
+ ProtocolClass FileReaderProtocol {
+ incoming {
+ Message getNextChar()
+ }
+ outgoing {
+ Message nextChar(c:char)
+ }
+ }
} \ No newline at end of file
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.c
index 61e44a287..dfdd262e9 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.c
@@ -1,325 +1,325 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass ACParser
- *
- */
-
-#include "ACParser.h"
-
-#include "modelbase/etActor.h"
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-#include "etUnit/etUnit.h"
-#include "platform/etMemory.h"
-
-#include "FileReaderProtocol.h"
-
-
-/* interface item IDs */
-enum interface_items {
- IFITEM_readerPort = 1
-};
-
-
-/* state IDs */
-enum state_ids {
- NO_STATE = 0,
- STATE_TOP = 1,
- STATE_code = 2,
- STATE_firstSlash = 3,
- STATE_blockComment = 4,
- STATE_firstStar = 5,
- STATE_lineComment = 6
-};
-
-/* transition chains */
-enum chain_ids {
- CHAIN_TRANS_INITIAL_TO__code = 1,
- CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort = 2,
- CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort = 3,
- CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort = 4,
- CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort = 5,
- CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort = 6
-};
-
-/* triggers */
-enum triggers {
- POLLING = 0,
- TRIG_readerPort__nextChar = IFITEM_readerPort + EVT_SHIFT*FileReaderProtocol_OUT_nextChar
-};
-
-
-static void setState(ACParser* self, int new_state) {
- self->state = new_state;
-}
-
-/* Entry and Exit Codes */
-
-/* Action Codes */
-static void action_TRANS_INITIAL_TO__code(ACParser* self) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr1_FROM_cp0_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
- printf("%c",c);
-}
-static void action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr12_FROM_cp4_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
- printf("%c%c",'/',c);
-}
-static void action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-
-/**
- * calls exit codes while exiting from the current state to one of its
- * parent states while remembering the history
- * @param current - the current state
- * @param to - the final parent state
- * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
- */
-static void exitTo(ACParser* self, int current, int to, boolean handler) {
- while (current!=to) {
- switch (current) {
- case STATE_code:
- self->history[STATE_TOP] = STATE_code;
- current = STATE_TOP;
- break;
- case STATE_firstSlash:
- self->history[STATE_TOP] = STATE_firstSlash;
- current = STATE_TOP;
- break;
- case STATE_blockComment:
- self->history[STATE_TOP] = STATE_blockComment;
- current = STATE_TOP;
- break;
- case STATE_firstStar:
- self->history[STATE_TOP] = STATE_firstStar;
- current = STATE_TOP;
- break;
- case STATE_lineComment:
- self->history[STATE_TOP] = STATE_lineComment;
- current = STATE_TOP;
- 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 - the chain ID
- * @param generic_data - the generic data pointer
- * @return the ID of the final state
- */
-static int executeTransitionChain(ACParser* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
- switch (chain) {
- case CHAIN_TRANS_INITIAL_TO__code:
- {
- action_TRANS_INITIAL_TO__code(self);
- return STATE_code;
- }
- case CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='/') {
- return STATE_firstSlash;}
- else {
- action_TRANS_tr1_FROM_cp0_TO_code(self, ifitem, c);
- return STATE_code;}
- }
- case CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='*') {
- return STATE_blockComment;}
- else {
- if (c=='/') {
- return STATE_lineComment;}
- else {
- action_TRANS_tr12_FROM_cp4_TO_code(self, ifitem, c);
- return STATE_code;}
- }
- }
- case CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='*') {
- return STATE_firstStar;}
- else {
- return STATE_blockComment;}
- }
- case CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='/') {
- return STATE_code;}
- else {
- return STATE_blockComment;}
- }
- case CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='\n') {
- return STATE_code;}
- else {
- return STATE_lineComment;}
- }
- }
- return NO_STATE;
-}
-
-/**
- * calls entry codes while entering a state's history. The ID of the final leaf state is returned
- * @param state - the state which is entered
- * @param handler - entry code is executed if not handler
- * @return - the ID of the final leaf state
- */
-static int enterHistory(ACParser* self, int state, boolean handler, boolean skip_entry) {
- while (TRUE) {
- switch (state) {
- case STATE_code:
- // in leaf state: return state id
- return STATE_code;
- case STATE_firstSlash:
- // in leaf state: return state id
- return STATE_firstSlash;
- case STATE_blockComment:
- // in leaf state: return state id
- return STATE_blockComment;
- case STATE_firstStar:
- // in leaf state: return state id
- return STATE_firstStar;
- case STATE_lineComment:
- // in leaf state: return state id
- return STATE_lineComment;
- case STATE_TOP:
- state = self->history[STATE_TOP];
- break;
- }
- skip_entry = FALSE;
- }
- //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
-}
-
-static void executeInitTransition(ACParser* self) {
- int chain = CHAIN_TRANS_INITIAL_TO__code;
- int next = executeTransitionChain(self, chain, NULL, NULL);
- next = enterHistory(self, next, FALSE, FALSE);
- setState(self, next);
-}
-
-/* receiveEvent contains the main implementation of the FSM */
-static void receiveEvent(ACParser* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
- int trigger = ifitem->localId + EVT_SHIFT*evt;
- int chain = NOT_CAUGHT;
- int catching_state = NO_STATE;
- boolean is_handler = FALSE;
- boolean skip_entry = FALSE;
-
- if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (self->state) {
- case STATE_code:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_firstSlash:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_blockComment:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_firstStar:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_lineComment:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- }
- }
- if (chain != NOT_CAUGHT) {
- exitTo(self, self->state, catching_state, is_handler);
- int next = executeTransitionChain(self, chain, ifitem, generic_data);
- next = enterHistory(self, next, is_handler, skip_entry);
- setState(self, next);
- }
-}
-
-//******************************************
-// END of generated code for FSM
-//******************************************
-
-void ACParser_init(ACParser* self){
- ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "init")
- self->state = STATE_TOP;
- {
- int i;
- for (i=0; i<ACPARSER_HISTORY_SIZE; ++i)
- self->history[i] = NO_STATE;
- }
- executeInitTransition(self);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "_receiveMessage")
-
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-/*--------------------- operations ---------------------*/
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ACParser
+ *
+ */
+
+#include "ACParser.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "platform/etMemory.h"
+
+#include "FileReaderProtocol.h"
+
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_readerPort = 1
+};
+
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_code = 2,
+ STATE_firstSlash = 3,
+ STATE_blockComment = 4,
+ STATE_firstStar = 5,
+ STATE_lineComment = 6
+};
+
+/* transition chains */
+enum chain_ids {
+ CHAIN_TRANS_INITIAL_TO__code = 1,
+ CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort = 2,
+ CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort = 3,
+ CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort = 4,
+ CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort = 5,
+ CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort = 6
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_readerPort__nextChar = IFITEM_readerPort + EVT_SHIFT*FileReaderProtocol_OUT_nextChar
+};
+
+
+static void setState(ACParser* self, int new_state) {
+ self->state = new_state;
+}
+
+/* Entry and Exit Codes */
+
+/* Action Codes */
+static void action_TRANS_INITIAL_TO__code(ACParser* self) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr1_FROM_cp0_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
+ printf("%c",c);
+}
+static void action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr12_FROM_cp4_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
+ printf("%c%c",'/',c);
+}
+static void action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current - the current state
+ * @param to - the final parent state
+ * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
+ */
+static void exitTo(ACParser* self, int current, int to, boolean handler) {
+ while (current!=to) {
+ switch (current) {
+ case STATE_code:
+ self->history[STATE_TOP] = STATE_code;
+ current = STATE_TOP;
+ break;
+ case STATE_firstSlash:
+ self->history[STATE_TOP] = STATE_firstSlash;
+ current = STATE_TOP;
+ break;
+ case STATE_blockComment:
+ self->history[STATE_TOP] = STATE_blockComment;
+ current = STATE_TOP;
+ break;
+ case STATE_firstStar:
+ self->history[STATE_TOP] = STATE_firstStar;
+ current = STATE_TOP;
+ break;
+ case STATE_lineComment:
+ self->history[STATE_TOP] = STATE_lineComment;
+ current = STATE_TOP;
+ 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 - the chain ID
+ * @param generic_data - the generic data pointer
+ * @return the ID of the final state
+ */
+static int executeTransitionChain(ACParser* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
+ switch (chain) {
+ case CHAIN_TRANS_INITIAL_TO__code:
+ {
+ action_TRANS_INITIAL_TO__code(self);
+ return STATE_code;
+ }
+ case CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='/') {
+ return STATE_firstSlash;}
+ else {
+ action_TRANS_tr1_FROM_cp0_TO_code(self, ifitem, c);
+ return STATE_code;}
+ }
+ case CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='*') {
+ return STATE_blockComment;}
+ else {
+ if (c=='/') {
+ return STATE_lineComment;}
+ else {
+ action_TRANS_tr12_FROM_cp4_TO_code(self, ifitem, c);
+ return STATE_code;}
+ }
+ }
+ case CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='*') {
+ return STATE_firstStar;}
+ else {
+ return STATE_blockComment;}
+ }
+ case CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='/') {
+ return STATE_code;}
+ else {
+ return STATE_blockComment;}
+ }
+ case CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='\n') {
+ return STATE_code;}
+ else {
+ return STATE_lineComment;}
+ }
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state - the state which is entered
+ * @param handler - entry code is executed if not handler
+ * @return - the ID of the final leaf state
+ */
+static int enterHistory(ACParser* self, int state, boolean handler, boolean skip_entry) {
+ while (TRUE) {
+ switch (state) {
+ case STATE_code:
+ // in leaf state: return state id
+ return STATE_code;
+ case STATE_firstSlash:
+ // in leaf state: return state id
+ return STATE_firstSlash;
+ case STATE_blockComment:
+ // in leaf state: return state id
+ return STATE_blockComment;
+ case STATE_firstStar:
+ // in leaf state: return state id
+ return STATE_firstStar;
+ case STATE_lineComment:
+ // in leaf state: return state id
+ return STATE_lineComment;
+ case STATE_TOP:
+ state = self->history[STATE_TOP];
+ break;
+ }
+ skip_entry = FALSE;
+ }
+ //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
+}
+
+static void executeInitTransition(ACParser* self) {
+ int chain = CHAIN_TRANS_INITIAL_TO__code;
+ int next = executeTransitionChain(self, chain, NULL, NULL);
+ next = enterHistory(self, next, FALSE, FALSE);
+ setState(self, next);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void receiveEvent(ACParser* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
+ int trigger = ifitem->localId + EVT_SHIFT*evt;
+ int chain = NOT_CAUGHT;
+ int catching_state = NO_STATE;
+ boolean is_handler = FALSE;
+ boolean skip_entry = FALSE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data)) {
+ switch (self->state) {
+ case STATE_code:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_firstSlash:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_blockComment:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_firstStar:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_lineComment:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ }
+ }
+ if (chain != NOT_CAUGHT) {
+ exitTo(self, self->state, catching_state, is_handler);
+ int next = executeTransitionChain(self, chain, ifitem, generic_data);
+ next = enterHistory(self, next, is_handler, skip_entry);
+ setState(self, next);
+ }
+}
+
+//******************************************
+// END of generated code for FSM
+//******************************************
+
+void ACParser_init(ACParser* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<ACPARSER_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "_receiveMessage")
+
+ receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- operations ---------------------*/
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.h
index a578244b3..f53886e9a 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ACParser.h
@@ -1,60 +1,60 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ActorClass ACParser
- *
- */
-
-#ifndef _ACPARSER_H_
-#define _ACPARSER_H_
-
-#include "etDatatypes.h"
-#include "messaging/etMessage.h"
-
-#include "FileReaderProtocol.h"
-
-
-typedef struct ACParser ACParser;
-
-/* const part of ActorClass (ROM) */
-typedef struct ACParser_const {
- /* simple ports */
- const FileReaderProtocolConjPort readerPort;
-
- /* data receive ports */
-
- /* saps */
-
- /* replicated ports */
-
- /* services */
-} ACParser_const;
-
-
-/* constant for state machine data */
-#define ACPARSER_HISTORY_SIZE 2
-
-/* variable part of ActorClass (RAM) */
-struct ACParser {
- const ACParser_const* const constData;
-
- /* data send ports */
-
- /*--------------------- attributes ---------------------*/
-
-
- /* state machine variables */
- etInt16 state;
- etInt16 history[ACPARSER_HISTORY_SIZE];
-};
-
-void ACParser_init(ACParser* self);
-
-void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg);
-
-
-/*--------------------- operations ---------------------*/
-
-
-#endif /* _ACPARSER_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ACParser
+ *
+ */
+
+#ifndef _ACPARSER_H_
+#define _ACPARSER_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "FileReaderProtocol.h"
+
+
+typedef struct ACParser ACParser;
+
+/* const part of ActorClass (ROM) */
+typedef struct ACParser_const {
+ /* simple ports */
+ const FileReaderProtocolConjPort readerPort;
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+
+ /* services */
+} ACParser_const;
+
+
+/* constant for state machine data */
+#define ACPARSER_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct ACParser {
+ const ACParser_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[ACPARSER_HISTORY_SIZE];
+};
+
+void ACParser_init(ACParser* self);
+
+void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg);
+
+
+/*--------------------- operations ---------------------*/
+
+
+#endif /* _ACPARSER_H_ */
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.c
index 027ddf644..d156f7548 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.c
@@ -1,202 +1,202 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass AFileReader
- *
- */
-
-#include "AFileReader.h"
-
-#include "modelbase/etActor.h"
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-#include "etUnit/etUnit.h"
-#include "platform/etMemory.h"
-
-#include "FileReaderProtocol.h"
-
-/*--------------------- begin user code ---------------------*/
-#include <stdio.h>
-/*--------------------- end user code ---------------------*/
-
-/* interface item IDs */
-enum interface_items {
- IFITEM_outPort = 1
-};
-
-
-/* state IDs */
-enum state_ids {
- NO_STATE = 0,
- STATE_TOP = 1,
- STATE_reading = 2
-};
-
-/* transition chains */
-enum chain_ids {
- CHAIN_TRANS_INITIAL_TO__reading = 1,
- CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0 = 2
-};
-
-/* triggers */
-enum triggers {
- POLLING = 0,
- TRIG_outPort__getNextChar = IFITEM_outPort + EVT_SHIFT*FileReaderProtocol_IN_getNextChar
-};
-
-
-static void setState(AFileReader* self, int new_state) {
- self->state = new_state;
-}
-
-/* Entry and Exit Codes */
-
-/* Action Codes */
-static void action_TRANS_INITIAL_TO__reading(AFileReader* self) {
- if ((self->f /* ORIG: f */ = fopen("test.txt","r")) != 0) {
- printf("file open ok !\r\n");
- }
- else {
- printf("file not found !\r\n");
- SubSysClass_shutdown();
- }
-}
-static void action_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0(AFileReader* self, InterfaceItemBase ifitem) {
- int8 c;
- if ((c=fgetc(self->f /* ORIG: f */)) != EOF) {
- FileReaderProtocolPort_nextChar(&self->constData->outPort, c) /* ORIG: outPort.nextChar(c) */;
- }
- else {
- fclose(self->f /* ORIG: f */);
- printf("file closed !\r\n");
- SubSysClass_shutdown();
- }
-}
-
-/**
- * calls exit codes while exiting from the current state to one of its
- * parent states while remembering the history
- * @param current - the current state
- * @param to - the final parent state
- * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
- */
-static void exitTo(AFileReader* self, int current, int to, boolean handler) {
- while (current!=to) {
- switch (current) {
- case STATE_reading:
- self->history[STATE_TOP] = STATE_reading;
- current = STATE_TOP;
- 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 - the chain ID
- * @param generic_data - the generic data pointer
- * @return the ID of the final state
- */
-static int executeTransitionChain(AFileReader* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
- switch (chain) {
- case CHAIN_TRANS_INITIAL_TO__reading:
- {
- action_TRANS_INITIAL_TO__reading(self);
- return STATE_reading;
- }
- case CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0:
- {
- action_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0(self, ifitem);
- return STATE_reading;
- }
- }
- return NO_STATE;
-}
-
-/**
- * calls entry codes while entering a state's history. The ID of the final leaf state is returned
- * @param state - the state which is entered
- * @param handler - entry code is executed if not handler
- * @return - the ID of the final leaf state
- */
-static int enterHistory(AFileReader* self, int state, boolean handler, boolean skip_entry) {
- while (TRUE) {
- switch (state) {
- case STATE_reading:
- // in leaf state: return state id
- return STATE_reading;
- case STATE_TOP:
- state = self->history[STATE_TOP];
- break;
- }
- skip_entry = FALSE;
- }
- //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
-}
-
-static void executeInitTransition(AFileReader* self) {
- int chain = CHAIN_TRANS_INITIAL_TO__reading;
- int next = executeTransitionChain(self, chain, NULL, NULL);
- next = enterHistory(self, next, FALSE, FALSE);
- setState(self, next);
-}
-
-/* receiveEvent contains the main implementation of the FSM */
-static void receiveEvent(AFileReader* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
- int trigger = ifitem->localId + EVT_SHIFT*evt;
- int chain = NOT_CAUGHT;
- int catching_state = NO_STATE;
- boolean is_handler = FALSE;
- boolean skip_entry = FALSE;
-
- if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (self->state) {
- case STATE_reading:
- switch(trigger) {
- case TRIG_outPort__getNextChar:
- {
- chain = CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- }
- }
- if (chain != NOT_CAUGHT) {
- exitTo(self, self->state, catching_state, is_handler);
- int next = executeTransitionChain(self, chain, ifitem, generic_data);
- next = enterHistory(self, next, is_handler, skip_entry);
- setState(self, next);
- }
-}
-
-//******************************************
-// END of generated code for FSM
-//******************************************
-
-void AFileReader_init(AFileReader* self){
- ET_MSC_LOGGER_SYNC_ENTRY("AFileReader", "init")
- self->state = STATE_TOP;
- {
- int i;
- for (i=0; i<AFILEREADER_HISTORY_SIZE; ++i)
- self->history[i] = NO_STATE;
- }
- executeInitTransition(self);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void AFileReader_receiveMessage(void* self, void* ifitem, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("AFileReader", "_receiveMessage")
-
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-/*--------------------- operations ---------------------*/
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass AFileReader
+ *
+ */
+
+#include "AFileReader.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "platform/etMemory.h"
+
+#include "FileReaderProtocol.h"
+
+/*--------------------- begin user code ---------------------*/
+#include <stdio.h>
+/*--------------------- end user code ---------------------*/
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_outPort = 1
+};
+
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_reading = 2
+};
+
+/* transition chains */
+enum chain_ids {
+ CHAIN_TRANS_INITIAL_TO__reading = 1,
+ CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0 = 2
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_outPort__getNextChar = IFITEM_outPort + EVT_SHIFT*FileReaderProtocol_IN_getNextChar
+};
+
+
+static void setState(AFileReader* self, int new_state) {
+ self->state = new_state;
+}
+
+/* Entry and Exit Codes */
+
+/* Action Codes */
+static void action_TRANS_INITIAL_TO__reading(AFileReader* self) {
+ if ((self->f /* ORIG: f */ = fopen("test.txt","r")) != 0) {
+ printf("file open ok !\r\n");
+ }
+ else {
+ printf("file not found !\r\n");
+ SubSysClass_shutdown();
+ }
+}
+static void action_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0(AFileReader* self, InterfaceItemBase ifitem) {
+ int8 c;
+ if ((c=fgetc(self->f /* ORIG: f */)) != EOF) {
+ FileReaderProtocolPort_nextChar(&self->constData->outPort, c) /* ORIG: outPort.nextChar(c) */;
+ }
+ else {
+ fclose(self->f /* ORIG: f */);
+ printf("file closed !\r\n");
+ SubSysClass_shutdown();
+ }
+}
+
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current - the current state
+ * @param to - the final parent state
+ * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
+ */
+static void exitTo(AFileReader* self, int current, int to, boolean handler) {
+ while (current!=to) {
+ switch (current) {
+ case STATE_reading:
+ self->history[STATE_TOP] = STATE_reading;
+ current = STATE_TOP;
+ 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 - the chain ID
+ * @param generic_data - the generic data pointer
+ * @return the ID of the final state
+ */
+static int executeTransitionChain(AFileReader* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
+ switch (chain) {
+ case CHAIN_TRANS_INITIAL_TO__reading:
+ {
+ action_TRANS_INITIAL_TO__reading(self);
+ return STATE_reading;
+ }
+ case CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0:
+ {
+ action_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0(self, ifitem);
+ return STATE_reading;
+ }
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state - the state which is entered
+ * @param handler - entry code is executed if not handler
+ * @return - the ID of the final leaf state
+ */
+static int enterHistory(AFileReader* self, int state, boolean handler, boolean skip_entry) {
+ while (TRUE) {
+ switch (state) {
+ case STATE_reading:
+ // in leaf state: return state id
+ return STATE_reading;
+ case STATE_TOP:
+ state = self->history[STATE_TOP];
+ break;
+ }
+ skip_entry = FALSE;
+ }
+ //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
+}
+
+static void executeInitTransition(AFileReader* self) {
+ int chain = CHAIN_TRANS_INITIAL_TO__reading;
+ int next = executeTransitionChain(self, chain, NULL, NULL);
+ next = enterHistory(self, next, FALSE, FALSE);
+ setState(self, next);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void receiveEvent(AFileReader* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
+ int trigger = ifitem->localId + EVT_SHIFT*evt;
+ int chain = NOT_CAUGHT;
+ int catching_state = NO_STATE;
+ boolean is_handler = FALSE;
+ boolean skip_entry = FALSE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data)) {
+ switch (self->state) {
+ case STATE_reading:
+ switch(trigger) {
+ case TRIG_outPort__getNextChar:
+ {
+ chain = CHAIN_TRANS_tr0_FROM_reading_TO_reading_BY_getNextCharoutPort_tr0;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ }
+ }
+ if (chain != NOT_CAUGHT) {
+ exitTo(self, self->state, catching_state, is_handler);
+ int next = executeTransitionChain(self, chain, ifitem, generic_data);
+ next = enterHistory(self, next, is_handler, skip_entry);
+ setState(self, next);
+ }
+}
+
+//******************************************
+// END of generated code for FSM
+//******************************************
+
+void AFileReader_init(AFileReader* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("AFileReader", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<AFILEREADER_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void AFileReader_receiveMessage(void* self, void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("AFileReader", "_receiveMessage")
+
+ receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- operations ---------------------*/
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.h
index 933ec228c..8cb2323e1 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/AFileReader.h
@@ -1,61 +1,61 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ActorClass AFileReader
- *
- */
-
-#ifndef _AFILEREADER_H_
-#define _AFILEREADER_H_
-
-#include "etDatatypes.h"
-#include "messaging/etMessage.h"
-
-#include "FileReaderProtocol.h"
-
-
-typedef struct AFileReader AFileReader;
-
-/* const part of ActorClass (ROM) */
-typedef struct AFileReader_const {
- /* simple ports */
- const FileReaderProtocolPort outPort;
-
- /* data receive ports */
-
- /* saps */
-
- /* replicated ports */
-
- /* services */
-} AFileReader_const;
-
-
-/* constant for state machine data */
-#define AFILEREADER_HISTORY_SIZE 2
-
-/* variable part of ActorClass (RAM) */
-struct AFileReader {
- const AFileReader_const* const constData;
-
- /* data send ports */
-
- /*--------------------- attributes ---------------------*/
- FILE* f;
-
-
- /* state machine variables */
- etInt16 state;
- etInt16 history[AFILEREADER_HISTORY_SIZE];
-};
-
-void AFileReader_init(AFileReader* self);
-
-void AFileReader_receiveMessage(void* self, void* ifitem, const etMessage* msg);
-
-
-/*--------------------- operations ---------------------*/
-
-
-#endif /* _AFILEREADER_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass AFileReader
+ *
+ */
+
+#ifndef _AFILEREADER_H_
+#define _AFILEREADER_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+#include "FileReaderProtocol.h"
+
+
+typedef struct AFileReader AFileReader;
+
+/* const part of ActorClass (ROM) */
+typedef struct AFileReader_const {
+ /* simple ports */
+ const FileReaderProtocolPort outPort;
+
+ /* data receive ports */
+
+ /* saps */
+
+ /* replicated ports */
+
+ /* services */
+} AFileReader_const;
+
+
+/* constant for state machine data */
+#define AFILEREADER_HISTORY_SIZE 2
+
+/* variable part of ActorClass (RAM) */
+struct AFileReader {
+ const AFileReader_const* const constData;
+
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+ FILE* f;
+
+
+ /* state machine variables */
+ etInt16 state;
+ etInt16 history[AFILEREADER_HISTORY_SIZE];
+};
+
+void AFileReader_init(AFileReader* self);
+
+void AFileReader_receiveMessage(void* self, void* ifitem, const etMessage* msg);
+
+
+/*--------------------- operations ---------------------*/
+
+
+#endif /* _AFILEREADER_H_ */
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.c
index 7dcc75d39..12813013d 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.c
@@ -1,36 +1,36 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass ATop
- *
- */
-
-#include "ATop.h"
-
-#include "modelbase/etActor.h"
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-#include "etUnit/etUnit.h"
-#include "platform/etMemory.h"
-
-
-
-/* interface item IDs */
-/* empty enum not generated */
-
-
-void ATop_init(ATop* self){
- ET_MSC_LOGGER_SYNC_ENTRY("ATop", "init")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void ATop_receiveMessage(void* self, void* ifitem, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("ATop", "_receiveMessage")
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-/*--------------------- operations ---------------------*/
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ATop
+ *
+ */
+
+#include "ATop.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "platform/etMemory.h"
+
+
+
+/* interface item IDs */
+/* empty enum not generated */
+
+
+void ATop_init(ATop* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATop", "init")
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ATop_receiveMessage(void* self, void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ATop", "_receiveMessage")
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- operations ---------------------*/
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.h
index b73f9f72b..b77f9a9c4 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/ATop.h
@@ -1,39 +1,39 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ActorClass ATop
- *
- */
-
-#ifndef _ATOP_H_
-#define _ATOP_H_
-
-#include "etDatatypes.h"
-#include "messaging/etMessage.h"
-
-
-
-typedef struct ATop ATop;
-
-/* const part of ActorClass (ROM) */
-/* this actor class has no ports and thus no constant data */
-
-
-/* variable part of ActorClass (RAM) */
-struct ATop {
- /* data send ports */
-
- /*--------------------- attributes ---------------------*/
-
-};
-
-void ATop_init(ATop* self);
-
-void ATop_receiveMessage(void* self, void* ifitem, const etMessage* msg);
-
-
-/*--------------------- operations ---------------------*/
-
-
-#endif /* _ATOP_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ActorClass ATop
+ *
+ */
+
+#ifndef _ATOP_H_
+#define _ATOP_H_
+
+#include "etDatatypes.h"
+#include "messaging/etMessage.h"
+
+
+
+typedef struct ATop ATop;
+
+/* const part of ActorClass (ROM) */
+/* this actor class has no ports and thus no constant data */
+
+
+/* variable part of ActorClass (RAM) */
+struct ATop {
+ /* data send ports */
+
+ /*--------------------- attributes ---------------------*/
+
+};
+
+void ATop_init(ATop* self);
+
+void ATop_receiveMessage(void* self, void* ifitem, const etMessage* msg);
+
+
+/*--------------------- operations ---------------------*/
+
+
+#endif /* _ATOP_H_ */
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c
index 63acb3720..c2a0ec25a 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.c
@@ -1,89 +1,89 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ProtocolClass FileReaderProtocol
- *
- */
-
-#include "FileReaderProtocol.h"
-#include "debugging/etMSCLogger.h"
-
-
-/*--------------------- port methods */
-
-void FileReaderProtocolPort_nextChar(const FileReaderProtocolPort* self, char data) {
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolPort", "nextChar")
- etPort_sendMessage(self, FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void FileReaderProtocolReplPort_nextChar_broadcast(const FileReaderProtocolReplPort* self, char data) {
- int i;
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
- for (i=0; i<((etReplPort*)self)->size; ++i) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void FileReaderProtocolReplPort_nextChar(const FileReaderProtocolReplPort* self, int idx, char data) {
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
- if (0<=idx && idx<((etReplPort*)self)->size) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-// getReplication
-etInt32 FileReaderProtocolReplPort_getReplication(const FileReaderProtocolReplPort* self) {
- return ((etReplPort*)self)->size;
-}
-
-
-
-void FileReaderProtocolConjPort_getNextChar(const FileReaderProtocolConjPort* self) {
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjPort", "getNextChar")
- etPort_sendMessage(self, FileReaderProtocol_IN_getNextChar, 0, NULL);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void FileReaderProtocolConjReplPort_getNextChar_broadcast(const FileReaderProtocolConjReplPort* self) {
- int i;
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
- for (i=0; i<((etReplPort*)self)->size; ++i) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_IN_getNextChar, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void FileReaderProtocolConjReplPort_getNextChar(const FileReaderProtocolConjReplPort* self, int idx) {
- ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
- if (0<=idx && idx<((etReplPort*)self)->size) {
- etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_IN_getNextChar, 0, NULL);
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-// getReplication
-etInt32 FileReaderProtocolConjReplPort_getReplication(const FileReaderProtocolConjReplPort* self) {
- return ((etReplPort*)self)->size;
-}
-
-
-
-/*--------------------- debug helpers */
-
-/* message names as strings for debugging (generate MSC) */
-static const char* const FileReaderProtocol_messageStrings[] = {"MIN", "nextChar","getNextChar", "MAX"};
-
-const char* FileReaderProtocol_getMessageString(int msg_id) {
- if (msg_id<FileReaderProtocol_MSG_MIN || msg_id>FileReaderProtocol_MSG_MAX+1){
- /* id out of range */
- return "Message ID out of range";
- }
- else{
- return FileReaderProtocol_messageStrings[msg_id];
- }
-}
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ProtocolClass FileReaderProtocol
+ *
+ */
+
+#include "FileReaderProtocol.h"
+#include "debugging/etMSCLogger.h"
+
+
+/*--------------------- port methods */
+
+void FileReaderProtocolPort_nextChar(const FileReaderProtocolPort* self, char data) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolPort", "nextChar")
+ etPort_sendMessage(self, FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolReplPort_nextChar_broadcast(const FileReaderProtocolReplPort* self, char data) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolReplPort_nextChar(const FileReaderProtocolReplPort* self, int idx, char data) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolReplPort", "nextChar")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_OUT_nextChar, sizeof(char), &data);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 FileReaderProtocolReplPort_getReplication(const FileReaderProtocolReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+void FileReaderProtocolConjPort_getNextChar(const FileReaderProtocolConjPort* self) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjPort", "getNextChar")
+ etPort_sendMessage(self, FileReaderProtocol_IN_getNextChar, 0, NULL);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolConjReplPort_getNextChar_broadcast(const FileReaderProtocolConjReplPort* self) {
+ int i;
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
+ for (i=0; i<((etReplPort*)self)->size; ++i) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[i]), FileReaderProtocol_IN_getNextChar, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void FileReaderProtocolConjReplPort_getNextChar(const FileReaderProtocolConjReplPort* self, int idx) {
+ ET_MSC_LOGGER_SYNC_ENTRY("FileReaderProtocolConjReplPort", "getNextChar")
+ if (0<=idx && idx<((etReplPort*)self)->size) {
+ etPort_sendMessage(((etPort*)&((etReplPort*)self)->ports[idx]), FileReaderProtocol_IN_getNextChar, 0, NULL);
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+// getReplication
+etInt32 FileReaderProtocolConjReplPort_getReplication(const FileReaderProtocolConjReplPort* self) {
+ return ((etReplPort*)self)->size;
+}
+
+
+
+/*--------------------- debug helpers */
+
+/* message names as strings for debugging (generate MSC) */
+static const char* const FileReaderProtocol_messageStrings[] = {"MIN", "nextChar","getNextChar", "MAX"};
+
+const char* FileReaderProtocol_getMessageString(int msg_id) {
+ if (msg_id<FileReaderProtocol_MSG_MIN || msg_id>FileReaderProtocol_MSG_MAX+1){
+ /* id out of range */
+ return "Message ID out of range";
+ }
+ else{
+ return FileReaderProtocol_messageStrings[msg_id];
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.h
index 588fa2fff..884a313f6 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/FileReaderProtocol.h
@@ -1,54 +1,54 @@
-/**
- * @author generated by eTrice
- *
- * Header File of ProtocolClass FileReaderProtocol
- *
- */
-
-#ifndef _FILEREADERPROTOCOL_H_
-#define _FILEREADERPROTOCOL_H_
-
-#include "etDatatypes.h"
-#include "modelbase/etPort.h"
-
-
-
-
-/* message IDs */
-enum FileReaderProtocol_msg_ids {
- FileReaderProtocol_MSG_MIN = 0,
- FileReaderProtocol_OUT_nextChar = 1,
- FileReaderProtocol_IN_getNextChar = 2,
- FileReaderProtocol_MSG_MAX = 3
-};
-
-/*--------------------- port structs and methods */
-typedef etPort FileReaderProtocolPort;
-typedef etReplPort FileReaderProtocolReplPort;
-
-
-void FileReaderProtocolPort_nextChar(const FileReaderProtocolPort* self, char data);
-void FileReaderProtocolReplPort_nextChar_broadcast(const FileReaderProtocolReplPort* self, char data);
-void FileReaderProtocolReplPort_nextChar(const FileReaderProtocolReplPort* self, int idx, char data);
-
-
-etInt32 FileReaderProtocolReplPort_getReplication(const FileReaderProtocolReplPort* self);
-typedef etPort FileReaderProtocolConjPort;
-typedef etReplPort FileReaderProtocolConjReplPort;
-
-
-void FileReaderProtocolConjPort_getNextChar(const FileReaderProtocolConjPort* self);
-void FileReaderProtocolConjReplPort_getNextChar_broadcast(const FileReaderProtocolConjReplPort* self);
-void FileReaderProtocolConjReplPort_getNextChar(const FileReaderProtocolConjReplPort* self, int idx);
-
-
-etInt32 FileReaderProtocolConjReplPort_getReplication(const FileReaderProtocolConjReplPort* self);
-
-/*--------------------- debug helpers */
-
-/* get message string for message id */
-const char* FileReaderProtocol_getMessageString(int msg_id);
-
-
-#endif /* _FILEREADERPROTOCOL_H_ */
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of ProtocolClass FileReaderProtocol
+ *
+ */
+
+#ifndef _FILEREADERPROTOCOL_H_
+#define _FILEREADERPROTOCOL_H_
+
+#include "etDatatypes.h"
+#include "modelbase/etPort.h"
+
+
+
+
+/* message IDs */
+enum FileReaderProtocol_msg_ids {
+ FileReaderProtocol_MSG_MIN = 0,
+ FileReaderProtocol_OUT_nextChar = 1,
+ FileReaderProtocol_IN_getNextChar = 2,
+ FileReaderProtocol_MSG_MAX = 3
+};
+
+/*--------------------- port structs and methods */
+typedef etPort FileReaderProtocolPort;
+typedef etReplPort FileReaderProtocolReplPort;
+
+
+void FileReaderProtocolPort_nextChar(const FileReaderProtocolPort* self, char data);
+void FileReaderProtocolReplPort_nextChar_broadcast(const FileReaderProtocolReplPort* self, char data);
+void FileReaderProtocolReplPort_nextChar(const FileReaderProtocolReplPort* self, int idx, char data);
+
+
+etInt32 FileReaderProtocolReplPort_getReplication(const FileReaderProtocolReplPort* self);
+typedef etPort FileReaderProtocolConjPort;
+typedef etReplPort FileReaderProtocolConjReplPort;
+
+
+void FileReaderProtocolConjPort_getNextChar(const FileReaderProtocolConjPort* self);
+void FileReaderProtocolConjReplPort_getNextChar_broadcast(const FileReaderProtocolConjReplPort* self);
+void FileReaderProtocolConjReplPort_getNextChar(const FileReaderProtocolConjReplPort* self, int idx);
+
+
+etInt32 FileReaderProtocolConjReplPort_getReplication(const FileReaderProtocolConjReplPort* self);
+
+/*--------------------- debug helpers */
+
+/* get message string for message id */
+const char* FileReaderProtocol_getMessageString(int msg_id);
+
+
+#endif /* _FILEREADERPROTOCOL_H_ */
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.c
index 24deffd85..a6faad5dc 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.c
@@ -1,111 +1,111 @@
-/**
- * @author generated by eTrice
- *
- * Source File of SubSystemClass RemoveCommentSubSys
- *
- */
-
-#include "RemoveCommentSubSys.h"
-
-/* include instances for all classes */
-#include "RemoveCommentSubSys_Inst.h"
-#include "RemoveCommentSubSys_Disp.h"
-
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-
-#include "platform/etTimer.h"
-#include "etRuntimeConfig.h"
-
-
-/* data for SubSysten RemoveCommentSubSys */
-typedef struct RemoveCommentSubSys {
- char *name;
- volatile int shutdownRequest;
-} RemoveCommentSubSys;
-
-static RemoveCommentSubSys RemoveCommentSubSysInst = {"RemoveCommentSubSys",0};
-
-void RemoveCommentSubSys_initActorInstances(void);
-void RemoveCommentSubSys_constructActorInstances(void);
-
-void RemoveCommentSubSys_init(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "init")
- etLogger_logInfoF("%s_init", RemoveCommentSubSysInst.name);
-
- /* construct all actors */
- RemoveCommentSubSys_constructActorInstances();
-
- /* initialization of all message services */
- etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_Thread1_receiveMessage);
-
- /* init all actors */
- RemoveCommentSubSys_initActorInstances();
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void RemoveCommentSubSys_start(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "start")
- etLogger_logInfoF("%s_start", RemoveCommentSubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void RemoveCommentSubSys_run(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "run")
-
- #ifdef ET_RUNTIME_ENDLESS
- while(!(RemoveCommentSubSysInst.shutdownRequest)){
- if (etTimer_executeNeeded()){
- etMessageService_execute(&msgService_Thread1);
- }
- }
- #else
- uint32 loopCounter = 0;
- while(!(RemoveCommentSubSysInst.shutdownRequest)){
- if (etTimer_executeNeeded()){
- etMessageService_execute(&msgService_Thread1);
- etLogger_logInfo("Execute");
- if (loopCounter++ > ET_RUNTIME_MAXLOOP){
- break;
- }
- }
- }
- #endif
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void RemoveCommentSubSys_stop(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "stop")
- etLogger_logInfoF("%s_stop", RemoveCommentSubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void RemoveCommentSubSys_destroy(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "destroy")
- etLogger_logInfoF("%s_destroy", RemoveCommentSubSysInst.name);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void SubSysClass_shutdown(void){
- ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "shutdown")
- etLogger_logInfoF("%s_shutdown", RemoveCommentSubSysInst.name);
- RemoveCommentSubSysInst.shutdownRequest = 1;
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void RemoveCommentSubSys_constructActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("RemoveCommentSubSys", "constructActorInstances")
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-void RemoveCommentSubSys_initActorInstances(void){
- ET_MSC_LOGGER_SYNC_ENTRY("RemoveCommentSubSys", "initActorInstances")
- ATop_init(&_RemoveCommentSubSys_Topref);
- AFileReader_init(&_RemoveCommentSubSys_Topref_reader);
- ACParser_init(&_RemoveCommentSubSys_Topref_cParser);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of SubSystemClass RemoveCommentSubSys
+ *
+ */
+
+#include "RemoveCommentSubSys.h"
+
+/* include instances for all classes */
+#include "RemoveCommentSubSys_Inst.h"
+#include "RemoveCommentSubSys_Disp.h"
+
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+
+#include "platform/etTimer.h"
+#include "etRuntimeConfig.h"
+
+
+/* data for SubSysten RemoveCommentSubSys */
+typedef struct RemoveCommentSubSys {
+ char *name;
+ volatile int shutdownRequest;
+} RemoveCommentSubSys;
+
+static RemoveCommentSubSys RemoveCommentSubSysInst = {"RemoveCommentSubSys",0};
+
+void RemoveCommentSubSys_initActorInstances(void);
+void RemoveCommentSubSys_constructActorInstances(void);
+
+void RemoveCommentSubSys_init(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "init")
+ etLogger_logInfoF("%s_init", RemoveCommentSubSysInst.name);
+
+ /* construct all actors */
+ RemoveCommentSubSys_constructActorInstances();
+
+ /* initialization of all message services */
+ etMessageService_init(&msgService_Thread1, msgBuffer_Thread1, MESSAGE_POOL_MAX, MESSAGE_BLOCK_SIZE, MsgDispatcher_Thread1_receiveMessage);
+
+ /* init all actors */
+ RemoveCommentSubSys_initActorInstances();
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void RemoveCommentSubSys_start(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "start")
+ etLogger_logInfoF("%s_start", RemoveCommentSubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void RemoveCommentSubSys_run(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "run")
+
+ #ifdef ET_RUNTIME_ENDLESS
+ while(!(RemoveCommentSubSysInst.shutdownRequest)){
+ if (etTimer_executeNeeded()){
+ etMessageService_execute(&msgService_Thread1);
+ }
+ }
+ #else
+ uint32 loopCounter = 0;
+ while(!(RemoveCommentSubSysInst.shutdownRequest)){
+ if (etTimer_executeNeeded()){
+ etMessageService_execute(&msgService_Thread1);
+ etLogger_logInfo("Execute");
+ if (loopCounter++ > ET_RUNTIME_MAXLOOP){
+ break;
+ }
+ }
+ }
+ #endif
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void RemoveCommentSubSys_stop(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "stop")
+ etLogger_logInfoF("%s_stop", RemoveCommentSubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void RemoveCommentSubSys_destroy(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "destroy")
+ etLogger_logInfoF("%s_destroy", RemoveCommentSubSysInst.name);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void SubSysClass_shutdown(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("SubSys", "shutdown")
+ etLogger_logInfoF("%s_shutdown", RemoveCommentSubSysInst.name);
+ RemoveCommentSubSysInst.shutdownRequest = 1;
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void RemoveCommentSubSys_constructActorInstances(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("RemoveCommentSubSys", "constructActorInstances")
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+void RemoveCommentSubSys_initActorInstances(void){
+ ET_MSC_LOGGER_SYNC_ENTRY("RemoveCommentSubSys", "initActorInstances")
+ ATop_init(&_RemoveCommentSubSys_Topref);
+ AFileReader_init(&_RemoveCommentSubSys_Topref_reader);
+ ACParser_init(&_RemoveCommentSubSys_Topref_cParser);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.h
index c910fc0a1..6138f770e 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys.h
@@ -1,30 +1,30 @@
-/**
- * @author generated by eTrice
- *
- * Header File of SubSystemClass RemoveCommentSubSys
- *
- */
-
-#ifndef _REMOVECOMMENTSUBSYS_H_
-#define _REMOVECOMMENTSUBSYS_H_
-
-
-
-/* lifecycle functions
- * init -> start -> run (loop) -> stop -> destroy
- */
-
-void RemoveCommentSubSys_init(void); /* lifecycle init */
-void RemoveCommentSubSys_start(void); /* lifecycle start */
-
-void RemoveCommentSubSys_run(void); /* lifecycle run */
-
-void RemoveCommentSubSys_stop(void); /* lifecycle stop */
-void RemoveCommentSubSys_destroy(void); /* lifecycle destroy */
-
-void SubSysClass_shutdown(void); /* shutdown the dispatcher loop */
-
-
-#endif /* _REMOVECOMMENTSUBSYS_H_ */
-
-
+/**
+ * @author generated by eTrice
+ *
+ * Header File of SubSystemClass RemoveCommentSubSys
+ *
+ */
+
+#ifndef _REMOVECOMMENTSUBSYS_H_
+#define _REMOVECOMMENTSUBSYS_H_
+
+
+
+/* lifecycle functions
+ * init -> start -> run (loop) -> stop -> destroy
+ */
+
+void RemoveCommentSubSys_init(void); /* lifecycle init */
+void RemoveCommentSubSys_start(void); /* lifecycle start */
+
+void RemoveCommentSubSys_run(void); /* lifecycle run */
+
+void RemoveCommentSubSys_stop(void); /* lifecycle stop */
+void RemoveCommentSubSys_destroy(void); /* lifecycle destroy */
+
+void SubSysClass_shutdown(void); /* shutdown the dispatcher loop */
+
+
+#endif /* _REMOVECOMMENTSUBSYS_H_ */
+
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Disp.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Disp.h
index 8a53e12ca..daea560b3 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Disp.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Disp.h
@@ -1,31 +1,31 @@
-/**
- * @author generated by eTrice
- *
- * Dispatcher File of SubSystemClass RemoveCommentSubSys
- * - one generated dispatcher for each MessageService (Thread)
- */
-
-#include "messaging/etMessageReceiver.h"
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-
-static void MsgDispatcher_Thread1_receiveMessage(const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_Thread1", "receiveMessage")
- switch(msg->address){
-
- /* interface items of /RemoveCommentSubSys/Topref */
- /* interface items of /RemoveCommentSubSys/Topref/reader */
- case 103:
- AFileReader_receiveMessage((void*)&_RemoveCommentSubSys_Topref_reader,(etPort*)&_RemoveCommentSubSys_Topref_reader_const.outPort, msg);
- break;
- /* interface items of /RemoveCommentSubSys/Topref/cParser */
- case 105:
- ACParser_receiveMessage((void*)&_RemoveCommentSubSys_Topref_cParser,(etPort*)&_RemoveCommentSubSys_Topref_cParser_const.readerPort, msg);
- break;
-
- default:
- etLogger_logErrorF("MessageService_Thread1_receiveMessage: address %d does not exist ", msg->address);
- break;
- }
- ET_MSC_LOGGER_SYNC_EXIT
-}
+/**
+ * @author generated by eTrice
+ *
+ * Dispatcher File of SubSystemClass RemoveCommentSubSys
+ * - one generated dispatcher for each MessageService (Thread)
+ */
+
+#include "messaging/etMessageReceiver.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+
+static void MsgDispatcher_Thread1_receiveMessage(const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("MsgDispatcher_Thread1", "receiveMessage")
+ switch(msg->address){
+
+ /* interface items of /RemoveCommentSubSys/Topref */
+ /* interface items of /RemoveCommentSubSys/Topref/reader */
+ case 103:
+ AFileReader_receiveMessage((void*)&_RemoveCommentSubSys_Topref_reader,(etPort*)&_RemoveCommentSubSys_Topref_reader_const.outPort, msg);
+ break;
+ /* interface items of /RemoveCommentSubSys/Topref/cParser */
+ case 105:
+ ACParser_receiveMessage((void*)&_RemoveCommentSubSys_Topref_cParser,(etPort*)&_RemoveCommentSubSys_Topref_cParser_const.readerPort, msg);
+ break;
+
+ default:
+ etLogger_logErrorF("MessageService_Thread1_receiveMessage: address %d does not exist ", msg->address);
+ break;
+ }
+ ET_MSC_LOGGER_SYNC_EXIT
+}
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Inst.h b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Inst.h
index ba606608f..70f3e7378 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Inst.h
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Inst.h
@@ -1,76 +1,76 @@
-/**
- * @author generated by eTrice
- *
- * Instance File of SubSystemClass RemoveCommentSubSys
- * - instantiation of all actor instances and port instances
- * - configuration of data and connection of ports
- */
-
-#include "messaging/etMessageService.h"
-#include "platform/etMemory.h"
-
-/* instantiation of message services */
-
-/* MessageService for Thread1 */
-static uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
-static etMessageService msgService_Thread1;
-
-
-/* include all used ActorClasses */
-#include "ATop.h"
-#include "ACParser.h"
-#include "AFileReader.h"
-
-/* include all used ProtcolClasses */
-#include "FileReaderProtocol.h"
-
-
-/* declarations of all ActorClass instances (const and variable structs) */
-
-/* forward declaration of variable actor structs */
-static ATop _RemoveCommentSubSys_Topref;
-static AFileReader _RemoveCommentSubSys_Topref_reader;
-static ACParser _RemoveCommentSubSys_Topref_cParser;
-
-/* forward declaration of variable port structs */
-/*nothing to do */
-
-
-/* instance _RemoveCommentSubSys_Topref */
-/* no ports/saps/services - nothing to initialize statically */
-
-/* instance _RemoveCommentSubSys_Topref_reader */
-static const AFileReader_const _RemoveCommentSubSys_Topref_reader_const = {
- /* Ports: {varData, msgService, peerAddress, localId} */
- {0,&msgService_Thread1, 105, 1} /* Port outPort */
-
- /* data receive ports */
-};
-static AFileReader _RemoveCommentSubSys_Topref_reader = {
- &_RemoveCommentSubSys_Topref_reader_const,
-
- /* data send ports */
-
- /* attributes */
- 0,
-
- /* state and history are initialized in init fuction */
-};
-
-/* instance _RemoveCommentSubSys_Topref_cParser */
-static const ACParser_const _RemoveCommentSubSys_Topref_cParser_const = {
- /* Ports: {varData, msgService, peerAddress, localId} */
- {0,&msgService_Thread1, 103, 1} /* Port readerPort */
-
- /* data receive ports */
-};
-static ACParser _RemoveCommentSubSys_Topref_cParser = {
- &_RemoveCommentSubSys_Topref_cParser_const,
-
- /* data send ports */
-
- /* attributes */
-
- /* state and history are initialized in init fuction */
-};
-
+/**
+ * @author generated by eTrice
+ *
+ * Instance File of SubSystemClass RemoveCommentSubSys
+ * - instantiation of all actor instances and port instances
+ * - configuration of data and connection of ports
+ */
+
+#include "messaging/etMessageService.h"
+#include "platform/etMemory.h"
+
+/* instantiation of message services */
+
+/* MessageService for Thread1 */
+static uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
+static etMessageService msgService_Thread1;
+
+
+/* include all used ActorClasses */
+#include "ATop.h"
+#include "ACParser.h"
+#include "AFileReader.h"
+
+/* include all used ProtcolClasses */
+#include "FileReaderProtocol.h"
+
+
+/* declarations of all ActorClass instances (const and variable structs) */
+
+/* forward declaration of variable actor structs */
+static ATop _RemoveCommentSubSys_Topref;
+static AFileReader _RemoveCommentSubSys_Topref_reader;
+static ACParser _RemoveCommentSubSys_Topref_cParser;
+
+/* forward declaration of variable port structs */
+/*nothing to do */
+
+
+/* instance _RemoveCommentSubSys_Topref */
+/* no ports/saps/services - nothing to initialize statically */
+
+/* instance _RemoveCommentSubSys_Topref_reader */
+static const AFileReader_const _RemoveCommentSubSys_Topref_reader_const = {
+ /* Ports: {varData, msgService, peerAddress, localId} */
+ {0,&msgService_Thread1, 105, 1} /* Port outPort */
+
+ /* data receive ports */
+};
+static AFileReader _RemoveCommentSubSys_Topref_reader = {
+ &_RemoveCommentSubSys_Topref_reader_const,
+
+ /* data send ports */
+
+ /* attributes */
+ 0,
+
+ /* state and history are initialized in init fuction */
+};
+
+/* instance _RemoveCommentSubSys_Topref_cParser */
+static const ACParser_const _RemoveCommentSubSys_Topref_cParser_const = {
+ /* Ports: {varData, msgService, peerAddress, localId} */
+ {0,&msgService_Thread1, 103, 1} /* Port readerPort */
+
+ /* data receive ports */
+};
+static ACParser _RemoveCommentSubSys_Topref_cParser = {
+ &_RemoveCommentSubSys_Topref_cParser_const,
+
+ /* data send ports */
+
+ /* attributes */
+
+ /* state and history are initialized in init fuction */
+};
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Runner.c b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Runner.c
index b613131cc..4d6220e70 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Runner.c
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/RemoveComment/RemoveCommentSubSys_Runner.c
@@ -1,49 +1,49 @@
-/**
- * @author generated by eTrice
- *
- * this class contains the main function running component RemoveCommentSubSys
- * it instantiates RemoveCommentSubSys and starts and ends the lifecycle
- */
-
-
-#include "RemoveCommentSubSys.h"
-
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-#include "platform/etPlatform.h"
-
-
-/**
- * main function
- * creates component and starts and stops the lifecycle
- */
-
-int main(void) {
- etUserEntry(); /* platform specific */
-
- etLogger_logInfo("*** T H E B E G I N ***");
- ET_MSC_LOGGER_OPEN("main");
-
- /* startup sequence of lifecycle */
- RemoveCommentSubSys_init(); /* lifecycle init */
- RemoveCommentSubSys_start(); /* lifecycle start */
-
- etUserPreRun(); /* platform specific */
-
- /* run Scheduler */
- RemoveCommentSubSys_run();
-
- etUserPostRun(); /* platform specific */
-
- /* shutdown sequence of lifecycle */
- RemoveCommentSubSys_stop(); /* lifecycle stop */
- RemoveCommentSubSys_destroy(); /* lifecycle destroy */
-
- ET_MSC_LOGGER_CLOSE
- etLogger_logInfo("*** T H E E N D ***");
-
- etUserExit(); /* platform specific */
-
- return 0;
-}
-
+/**
+ * @author generated by eTrice
+ *
+ * this class contains the main function running component RemoveCommentSubSys
+ * it instantiates RemoveCommentSubSys and starts and ends the lifecycle
+ */
+
+
+#include "RemoveCommentSubSys.h"
+
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "platform/etPlatform.h"
+
+
+/**
+ * main function
+ * creates component and starts and stops the lifecycle
+ */
+
+int main(void) {
+ etUserEntry(); /* platform specific */
+
+ etLogger_logInfo("*** T H E B E G I N ***");
+ ET_MSC_LOGGER_OPEN("main");
+
+ /* startup sequence of lifecycle */
+ RemoveCommentSubSys_init(); /* lifecycle init */
+ RemoveCommentSubSys_start(); /* lifecycle start */
+
+ etUserPreRun(); /* platform specific */
+
+ /* run Scheduler */
+ RemoveCommentSubSys_run();
+
+ etUserPostRun(); /* platform specific */
+
+ /* shutdown sequence of lifecycle */
+ RemoveCommentSubSys_stop(); /* lifecycle stop */
+ RemoveCommentSubSys_destroy(); /* lifecycle destroy */
+
+ ET_MSC_LOGGER_CLOSE
+ etLogger_logInfo("*** T H E E N D ***");
+
+ etUserExit(); /* platform specific */
+
+ return 0;
+}
+
diff --git a/examples/org.eclipse.etrice.tutorials.c/src-gen/readme.txt b/examples/org.eclipse.etrice.tutorials.c/src-gen/readme.txt
index 1dc2b35ab..c3b99d458 100644
--- a/examples/org.eclipse.etrice.tutorials.c/src-gen/readme.txt
+++ b/examples/org.eclipse.etrice.tutorials.c/src-gen/readme.txt
@@ -1,4 +1,4 @@
-This directory is an eTrice code generation target.
-It will be erased every time the generator is executed.
-
-DO NOT PLACE OTHER FILES HERE!
+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/examples/org.eclipse.etrice.tutorials.c/test.txt b/examples/org.eclipse.etrice.tutorials.c/test.txt
index 61e44a287..dfdd262e9 100644
--- a/examples/org.eclipse.etrice.tutorials.c/test.txt
+++ b/examples/org.eclipse.etrice.tutorials.c/test.txt
@@ -1,325 +1,325 @@
-/**
- * @author generated by eTrice
- *
- * Source File of ActorClass ACParser
- *
- */
-
-#include "ACParser.h"
-
-#include "modelbase/etActor.h"
-#include "debugging/etLogger.h"
-#include "debugging/etMSCLogger.h"
-#include "etUnit/etUnit.h"
-#include "platform/etMemory.h"
-
-#include "FileReaderProtocol.h"
-
-
-/* interface item IDs */
-enum interface_items {
- IFITEM_readerPort = 1
-};
-
-
-/* state IDs */
-enum state_ids {
- NO_STATE = 0,
- STATE_TOP = 1,
- STATE_code = 2,
- STATE_firstSlash = 3,
- STATE_blockComment = 4,
- STATE_firstStar = 5,
- STATE_lineComment = 6
-};
-
-/* transition chains */
-enum chain_ids {
- CHAIN_TRANS_INITIAL_TO__code = 1,
- CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort = 2,
- CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort = 3,
- CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort = 4,
- CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort = 5,
- CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort = 6
-};
-
-/* triggers */
-enum triggers {
- POLLING = 0,
- TRIG_readerPort__nextChar = IFITEM_readerPort + EVT_SHIFT*FileReaderProtocol_OUT_nextChar
-};
-
-
-static void setState(ACParser* self, int new_state) {
- self->state = new_state;
-}
-
-/* Entry and Exit Codes */
-
-/* Action Codes */
-static void action_TRANS_INITIAL_TO__code(ACParser* self) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr1_FROM_cp0_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
- printf("%c",c);
-}
-static void action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-static void action_TRANS_tr12_FROM_cp4_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
- printf("%c%c",'/',c);
-}
-static void action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
- FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
-}
-
-/**
- * calls exit codes while exiting from the current state to one of its
- * parent states while remembering the history
- * @param current - the current state
- * @param to - the final parent state
- * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
- */
-static void exitTo(ACParser* self, int current, int to, boolean handler) {
- while (current!=to) {
- switch (current) {
- case STATE_code:
- self->history[STATE_TOP] = STATE_code;
- current = STATE_TOP;
- break;
- case STATE_firstSlash:
- self->history[STATE_TOP] = STATE_firstSlash;
- current = STATE_TOP;
- break;
- case STATE_blockComment:
- self->history[STATE_TOP] = STATE_blockComment;
- current = STATE_TOP;
- break;
- case STATE_firstStar:
- self->history[STATE_TOP] = STATE_firstStar;
- current = STATE_TOP;
- break;
- case STATE_lineComment:
- self->history[STATE_TOP] = STATE_lineComment;
- current = STATE_TOP;
- 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 - the chain ID
- * @param generic_data - the generic data pointer
- * @return the ID of the final state
- */
-static int executeTransitionChain(ACParser* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
- switch (chain) {
- case CHAIN_TRANS_INITIAL_TO__code:
- {
- action_TRANS_INITIAL_TO__code(self);
- return STATE_code;
- }
- case CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='/') {
- return STATE_firstSlash;}
- else {
- action_TRANS_tr1_FROM_cp0_TO_code(self, ifitem, c);
- return STATE_code;}
- }
- case CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='*') {
- return STATE_blockComment;}
- else {
- if (c=='/') {
- return STATE_lineComment;}
- else {
- action_TRANS_tr12_FROM_cp4_TO_code(self, ifitem, c);
- return STATE_code;}
- }
- }
- case CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='*') {
- return STATE_firstStar;}
- else {
- return STATE_blockComment;}
- }
- case CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='/') {
- return STATE_code;}
- else {
- return STATE_blockComment;}
- }
- case CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort:
- {
- char c = *((char*) generic_data);
- action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(self, ifitem, c);
- if (c=='\n') {
- return STATE_code;}
- else {
- return STATE_lineComment;}
- }
- }
- return NO_STATE;
-}
-
-/**
- * calls entry codes while entering a state's history. The ID of the final leaf state is returned
- * @param state - the state which is entered
- * @param handler - entry code is executed if not handler
- * @return - the ID of the final leaf state
- */
-static int enterHistory(ACParser* self, int state, boolean handler, boolean skip_entry) {
- while (TRUE) {
- switch (state) {
- case STATE_code:
- // in leaf state: return state id
- return STATE_code;
- case STATE_firstSlash:
- // in leaf state: return state id
- return STATE_firstSlash;
- case STATE_blockComment:
- // in leaf state: return state id
- return STATE_blockComment;
- case STATE_firstStar:
- // in leaf state: return state id
- return STATE_firstStar;
- case STATE_lineComment:
- // in leaf state: return state id
- return STATE_lineComment;
- case STATE_TOP:
- state = self->history[STATE_TOP];
- break;
- }
- skip_entry = FALSE;
- }
- //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
-}
-
-static void executeInitTransition(ACParser* self) {
- int chain = CHAIN_TRANS_INITIAL_TO__code;
- int next = executeTransitionChain(self, chain, NULL, NULL);
- next = enterHistory(self, next, FALSE, FALSE);
- setState(self, next);
-}
-
-/* receiveEvent contains the main implementation of the FSM */
-static void receiveEvent(ACParser* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
- int trigger = ifitem->localId + EVT_SHIFT*evt;
- int chain = NOT_CAUGHT;
- int catching_state = NO_STATE;
- boolean is_handler = FALSE;
- boolean skip_entry = FALSE;
-
- if (!handleSystemEvent(ifitem, evt, generic_data)) {
- switch (self->state) {
- case STATE_code:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_firstSlash:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_blockComment:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_firstStar:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- case STATE_lineComment:
- switch(trigger) {
- case TRIG_readerPort__nextChar:
- {
- chain = CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort;
- catching_state = STATE_TOP;
- }
- break;
- }
- break;
- }
- }
- if (chain != NOT_CAUGHT) {
- exitTo(self, self->state, catching_state, is_handler);
- int next = executeTransitionChain(self, chain, ifitem, generic_data);
- next = enterHistory(self, next, is_handler, skip_entry);
- setState(self, next);
- }
-}
-
-//******************************************
-// END of generated code for FSM
-//******************************************
-
-void ACParser_init(ACParser* self){
- ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "init")
- self->state = STATE_TOP;
- {
- int i;
- for (i=0; i<ACPARSER_HISTORY_SIZE; ++i)
- self->history[i] = NO_STATE;
- }
- executeInitTransition(self);
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg){
- ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "_receiveMessage")
-
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
-
- ET_MSC_LOGGER_SYNC_EXIT
-}
-
-
-/*--------------------- operations ---------------------*/
-
+/**
+ * @author generated by eTrice
+ *
+ * Source File of ActorClass ACParser
+ *
+ */
+
+#include "ACParser.h"
+
+#include "modelbase/etActor.h"
+#include "debugging/etLogger.h"
+#include "debugging/etMSCLogger.h"
+#include "etUnit/etUnit.h"
+#include "platform/etMemory.h"
+
+#include "FileReaderProtocol.h"
+
+
+/* interface item IDs */
+enum interface_items {
+ IFITEM_readerPort = 1
+};
+
+
+/* state IDs */
+enum state_ids {
+ NO_STATE = 0,
+ STATE_TOP = 1,
+ STATE_code = 2,
+ STATE_firstSlash = 3,
+ STATE_blockComment = 4,
+ STATE_firstStar = 5,
+ STATE_lineComment = 6
+};
+
+/* transition chains */
+enum chain_ids {
+ CHAIN_TRANS_INITIAL_TO__code = 1,
+ CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort = 2,
+ CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort = 3,
+ CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort = 4,
+ CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort = 5,
+ CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort = 6
+};
+
+/* triggers */
+enum triggers {
+ POLLING = 0,
+ TRIG_readerPort__nextChar = IFITEM_readerPort + EVT_SHIFT*FileReaderProtocol_OUT_nextChar
+};
+
+
+static void setState(ACParser* self, int new_state) {
+ self->state = new_state;
+}
+
+/* Entry and Exit Codes */
+
+/* Action Codes */
+static void action_TRANS_INITIAL_TO__code(ACParser* self) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr1_FROM_cp0_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
+ printf("%c",c);
+}
+static void action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+static void action_TRANS_tr12_FROM_cp4_TO_code(ACParser* self, InterfaceItemBase ifitem, char c) {
+ printf("%c%c",'/',c);
+}
+static void action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(ACParser* self, InterfaceItemBase ifitem, char c) {
+ FileReaderProtocolConjPort_getNextChar(&self->constData->readerPort) /* ORIG: readerPort.getNextChar() */;
+}
+
+/**
+ * calls exit codes while exiting from the current state to one of its
+ * parent states while remembering the history
+ * @param current - the current state
+ * @param to - the final parent state
+ * @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
+ */
+static void exitTo(ACParser* self, int current, int to, boolean handler) {
+ while (current!=to) {
+ switch (current) {
+ case STATE_code:
+ self->history[STATE_TOP] = STATE_code;
+ current = STATE_TOP;
+ break;
+ case STATE_firstSlash:
+ self->history[STATE_TOP] = STATE_firstSlash;
+ current = STATE_TOP;
+ break;
+ case STATE_blockComment:
+ self->history[STATE_TOP] = STATE_blockComment;
+ current = STATE_TOP;
+ break;
+ case STATE_firstStar:
+ self->history[STATE_TOP] = STATE_firstStar;
+ current = STATE_TOP;
+ break;
+ case STATE_lineComment:
+ self->history[STATE_TOP] = STATE_lineComment;
+ current = STATE_TOP;
+ 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 - the chain ID
+ * @param generic_data - the generic data pointer
+ * @return the ID of the final state
+ */
+static int executeTransitionChain(ACParser* self, int chain, InterfaceItemBase ifitem, void* generic_data) {
+ switch (chain) {
+ case CHAIN_TRANS_INITIAL_TO__code:
+ {
+ action_TRANS_INITIAL_TO__code(self);
+ return STATE_code;
+ }
+ case CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='/') {
+ return STATE_firstSlash;}
+ else {
+ action_TRANS_tr1_FROM_cp0_TO_code(self, ifitem, c);
+ return STATE_code;}
+ }
+ case CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='*') {
+ return STATE_blockComment;}
+ else {
+ if (c=='/') {
+ return STATE_lineComment;}
+ else {
+ action_TRANS_tr12_FROM_cp4_TO_code(self, ifitem, c);
+ return STATE_code;}
+ }
+ }
+ case CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='*') {
+ return STATE_firstStar;}
+ else {
+ return STATE_blockComment;}
+ }
+ case CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='/') {
+ return STATE_code;}
+ else {
+ return STATE_blockComment;}
+ }
+ case CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort:
+ {
+ char c = *((char*) generic_data);
+ action_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort(self, ifitem, c);
+ if (c=='\n') {
+ return STATE_code;}
+ else {
+ return STATE_lineComment;}
+ }
+ }
+ return NO_STATE;
+}
+
+/**
+ * calls entry codes while entering a state's history. The ID of the final leaf state is returned
+ * @param state - the state which is entered
+ * @param handler - entry code is executed if not handler
+ * @return - the ID of the final leaf state
+ */
+static int enterHistory(ACParser* self, int state, boolean handler, boolean skip_entry) {
+ while (TRUE) {
+ switch (state) {
+ case STATE_code:
+ // in leaf state: return state id
+ return STATE_code;
+ case STATE_firstSlash:
+ // in leaf state: return state id
+ return STATE_firstSlash;
+ case STATE_blockComment:
+ // in leaf state: return state id
+ return STATE_blockComment;
+ case STATE_firstStar:
+ // in leaf state: return state id
+ return STATE_firstStar;
+ case STATE_lineComment:
+ // in leaf state: return state id
+ return STATE_lineComment;
+ case STATE_TOP:
+ state = self->history[STATE_TOP];
+ break;
+ }
+ skip_entry = FALSE;
+ }
+ //return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
+}
+
+static void executeInitTransition(ACParser* self) {
+ int chain = CHAIN_TRANS_INITIAL_TO__code;
+ int next = executeTransitionChain(self, chain, NULL, NULL);
+ next = enterHistory(self, next, FALSE, FALSE);
+ setState(self, next);
+}
+
+/* receiveEvent contains the main implementation of the FSM */
+static void receiveEvent(ACParser* self, InterfaceItemBase ifitem, int evt, void* generic_data) {
+ int trigger = ifitem->localId + EVT_SHIFT*evt;
+ int chain = NOT_CAUGHT;
+ int catching_state = NO_STATE;
+ boolean is_handler = FALSE;
+ boolean skip_entry = FALSE;
+
+ if (!handleSystemEvent(ifitem, evt, generic_data)) {
+ switch (self->state) {
+ case STATE_code:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr0_FROM_code_TO_cp0_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_firstSlash:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr3_FROM_firstSlash_TO_cp1_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_blockComment:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr6_FROM_blockComment_TO_cp2_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_firstStar:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr9_FROM_firstStar_TO_cp3_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ case STATE_lineComment:
+ switch(trigger) {
+ case TRIG_readerPort__nextChar:
+ {
+ chain = CHAIN_TRANS_tr15_FROM_lineComment_TO_cp5_BY_nextCharreaderPort;
+ catching_state = STATE_TOP;
+ }
+ break;
+ }
+ break;
+ }
+ }
+ if (chain != NOT_CAUGHT) {
+ exitTo(self, self->state, catching_state, is_handler);
+ int next = executeTransitionChain(self, chain, ifitem, generic_data);
+ next = enterHistory(self, next, is_handler, skip_entry);
+ setState(self, next);
+ }
+}
+
+//******************************************
+// END of generated code for FSM
+//******************************************
+
+void ACParser_init(ACParser* self){
+ ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "init")
+ self->state = STATE_TOP;
+ {
+ int i;
+ for (i=0; i<ACPARSER_HISTORY_SIZE; ++i)
+ self->history[i] = NO_STATE;
+ }
+ executeInitTransition(self);
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+void ACParser_receiveMessage(void* self, void* ifitem, const etMessage* msg){
+ ET_MSC_LOGGER_SYNC_ENTRY("ACParser", "_receiveMessage")
+
+ receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
+
+ ET_MSC_LOGGER_SYNC_EXIT
+}
+
+
+/*--------------------- operations ---------------------*/
+
diff --git a/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.BlinkyTop.behavior b/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.BlinkyTop.behavior
index 0132445bf..c266e6635 100644
--- a/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.BlinkyTop.behavior
+++ b/examples/org.eclipse.etrice.tutorials.java/model/Blinky/diagrams/Blinky.BlinkyTop.behavior
@@ -1,25 +1,25 @@
-<?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 BlinkyTop" pictogramLinks="//@link //@children.0/@link" verticalGridUnit="10" version="0.9.0">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../Blinky.room#ActorClass:BlinkyTop"/>
- </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="654" height="436" x="59" y="10">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="574" height="356" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="574" height="356" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../Blinky.room#StateGraph:BlinkyTop$sg"/>
- </link>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="574" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
- </children>
- </children>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <fonts name="Arial" size="8"/>
- <fonts name="Arial" size="9" bold="true"/>
-</pi:Diagram>
+<?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 BlinkyTop" pictogramLinks="//@link //@children.0/@link" verticalGridUnit="10" version="0.9.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../Blinky.room#ActorClass:BlinkyTop"/>
+ </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="654" height="436" x="59" y="10">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="574" height="356" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="574" height="356" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../Blinky.room#StateGraph:BlinkyTop$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="574" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Async.seq b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Async.seq
new file mode 100644
index 000000000..dce783e24
--- /dev/null
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Async.seq
@@ -0,0 +1,15 @@
+#generated MSC for Trace2UML
+ /SubSysDemo >-- /SubSysDemo/application executeInitialTransition
+ /SubSysDemo >-- /SubSysDemo/application/tc1 executeInitialTransition
+ /SubSysDemo >-- /SubSysDemo/ref0 executeInitialTransition
+ /SubSysDemo --> /SubSysDemo/application executeInitialTransition
+ /SubSysDemo --> /SubSysDemo/application/tc1 executeInitialTransition
+ /SubSysDemo/application/tc1 >-- /SubSysDemo/ref0 internalStartTimeout
+ /SubSysDemo/application/tc1 >>> Idle
+ /SubSysDemo --> /SubSysDemo/ref0 executeInitialTransition
+ /SubSysDemo/ref0 >>> Operational
+ /SubSysDemo/application/tc1 --> /SubSysDemo/ref0 internalStartTimeout
+ /SubSysDemo/ref0 >>> Operational
+ /SubSysDemo/ref0 >-- /SubSysDemo/application/tc1 internalTimeout
+ /SubSysDemo/ref0 --> /SubSysDemo/application/tc1 internalTimeout
+ /SubSysDemo/application/tc1 >>> SwitchToLight1GreenForCars
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Sync.seq b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Sync.seq
new file mode 100644
index 000000000..50058ecdd
--- /dev/null
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/tmp/log/SubSysDemo_Sync.seq
@@ -0,0 +1 @@
+#generated MSC for Trace2UML
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
index 18d70f02c..07ca123c6 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.classpath
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
index a0bb7df0c..c67fa413e 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.project
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.tutorials.simulators.trafficlight</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.tutorials.simulators.trafficlight</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
index a23aa28f4..b1bdd4dee 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/.settings/org.eclipse.jdt.core.prefs
@@ -1,12 +1,12 @@
-#Sat Jun 16 13:47:44 CEST 2012
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+#Sat Jun 16 13:47:44 CEST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
index 339890e9b..aa0b55c28 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
-<jardesc>
- <jar path="org.eclipse.etrice.tutorials.simulators.trafficlight/release/trafficlight.jar"/>
- <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
- <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
- <selectedProjects/>
- <manifest generateManifest="true" mainClassHandleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src&lt;org.eclipse.etrice.tutorials.simulators.trafficlight{Main.java[Main" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
- <sealing sealJar="false">
- <packagesToSeal/>
- <packagesToUnSeal/>
- </sealing>
- </manifest>
- <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
- <javaElement handleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src"/>
- </selectedElements>
-</jardesc>
+<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
+<jardesc>
+ <jar path="org.eclipse.etrice.tutorials.simulators.trafficlight/release/trafficlight.jar"/>
+ <options buildIfNeeded="true" compress="true" descriptionLocation="/org.eclipse.etrice.tutorials.simulators.trafficlight/release.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="false" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
+ <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
+ <selectedProjects/>
+ <manifest generateManifest="true" mainClassHandleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src&lt;org.eclipse.etrice.tutorials.simulators.trafficlight{Main.java[Main" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
+ <sealing sealJar="false">
+ <packagesToSeal/>
+ <packagesToUnSeal/>
+ </sealing>
+ </manifest>
+ <selectedElements exportClassFiles="true" exportJavaFiles="false" exportOutputFolder="false">
+ <javaElement handleIdentifier="=org.eclipse.etrice.tutorials.simulators.trafficlight/src"/>
+ </selectedElements>
+</jardesc>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
index 94e3ffbe3..b95ec3e43 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/PedastrianLightWnd.java
@@ -1,182 +1,182 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-import java.awt.Button;
-import java.awt.Frame;
-import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
-import java.awt.Insets;
-import java.awt.TextField;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-public class PedastrianLightWnd extends Frame {
- private static final long serialVersionUID = 1L;
-
- private TrafficLight3 carLights = null;
- private TrafficLight2 pedLights = null;
-
- ButtonActionListener buttonListener = null;
-
- Button requestButton = null;
- TextField statusLine = null;
-
-
- public PedastrianLightWnd(int ipPort) {
- super("PedestrianLightsGUI");
- GridBagLayout layout = new GridBagLayout();
- GridBagConstraints gbc;
- carLights = new TrafficLight3(4);
- pedLights = new TrafficLight2(2);
- statusLine = new TextField();
- requestButton = new Button("REQUEST");
- requestButton.setEnabled(false);
- addWindowListener(new WindowClosingAdapter(true));
-
- setLayout(layout);
-
- gbc = makeGbc(0, 1, 1, 1);
- layout.setConstraints(carLights, gbc);
- add(carLights);
-
- gbc = makeGbc(1, 1, 1, 1);
- layout.setConstraints(pedLights, gbc);
- add(pedLights);
-
- statusLine.setText("listening on TCP Port " + ipPort);
- statusLine.setEditable(false);
- statusLine.setFocusable(false);
- gbc = makeGbc(0, 0, 2, 1);
- gbc.fill = GridBagConstraints.BOTH;
- layout.setConstraints(statusLine, gbc);
- add(statusLine);
-
- gbc = makeGbc(0, 2, 2, 1);
- gbc.fill = GridBagConstraints.BOTH;
- layout.setConstraints(requestButton, gbc);
- add(requestButton);
-
- pack();
- setVisible(true);
-
- loopSocket(ipPort); // blocking loop
- }
-
- private void loopSocket(int ipPort) {
- while (true) {
- // open and close socket endlessly
- try {
- // open Socket
- ServerSocket socketServer = new ServerSocket(ipPort);
-
- // wait blocking for client to connect
- Socket socket = socketServer.accept();
- statusLine.setText("socket connected !");
-
- // prepare input and output streams
- BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
- OutputStream out = socket.getOutputStream();
-
- // add listener for outgoing command
- buttonListener = new ButtonActionListener(out);
- requestButton.addActionListener(buttonListener);
- requestButton.setEnabled(true);
-
- resetLights();
-
- // read blocking until socket is disconnected
- String cmd;
- while ((cmd = in.readLine()) != null) {
- dispatchCommand(requestButton, cmd);
- }
- statusLine.setText("socket disconnected !");
-
- // deactivate button
- requestButton.removeActionListener(buttonListener);
- requestButton.setEnabled(false);
-
- resetLights();
-
- // clean up socket
- socket.close();
- socketServer.close();
-
- } catch (IOException e) {
- System.err.println(e.toString());
- System.exit(1);
- }
- }
- }
-
- private void dispatchCommand(Button requestButton, String cmd) {
- // check carLights
- if (cmd.equals("carLights=red")) {
- carLights.setState(carLights.RED);
- }
- if (cmd.equals("carLights=yellowRed")) {
- carLights.setState(carLights.YELLOWRED);
- }
- if (cmd.equals("carLights=green")) {
- carLights.setState(carLights.GREEN);
- }
- if (cmd.equals("carLights=yellow")) {
- carLights.setState(carLights.YELLOW);
- }
- if (cmd.equals("carLights=off")) {
- carLights.setState(carLights.OFF);
- }
-
- // check pedLights
- if (cmd.equals("pedLights=red")) {
- pedLights.setState(pedLights.RED);
- }
- if (cmd.equals("pedLights=green")) {
- pedLights.setState(pedLights.GREEN);
- }
- if (cmd.equals("pedLights=off")) {
- pedLights.setState(pedLights.OFF);
- }
-
- // check button
- if (cmd.equals("button=on")) {
- requestButton.setEnabled(true);
- }
- if (cmd.equals("button=off")) {
- requestButton.setEnabled(false);
- }
- }
-
- private void resetLights() {
- carLights.setState(carLights.OFF);
- pedLights.setState(pedLights.OFF);
- }
-
- private GridBagConstraints makeGbc(int x, int y, int width, int height) {
- GridBagConstraints gbc = new GridBagConstraints();
- gbc.gridx = x;
- gbc.gridy = y;
- gbc.gridwidth = width;
- gbc.gridheight = height;
- gbc.weightx = 1;
- gbc.weighty = 1;
- // gbc.fill = GridBagConstraints.BOTH;
- gbc.anchor = GridBagConstraints.CENTER;
- gbc.insets = new Insets(1, 1, 1, 1);
- return gbc;
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.TextField;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+public class PedastrianLightWnd extends Frame {
+ private static final long serialVersionUID = 1L;
+
+ private TrafficLight3 carLights = null;
+ private TrafficLight2 pedLights = null;
+
+ ButtonActionListener buttonListener = null;
+
+ Button requestButton = null;
+ TextField statusLine = null;
+
+
+ public PedastrianLightWnd(int ipPort) {
+ super("PedestrianLightsGUI");
+ GridBagLayout layout = new GridBagLayout();
+ GridBagConstraints gbc;
+ carLights = new TrafficLight3(4);
+ pedLights = new TrafficLight2(2);
+ statusLine = new TextField();
+ requestButton = new Button("REQUEST");
+ requestButton.setEnabled(false);
+ addWindowListener(new WindowClosingAdapter(true));
+
+ setLayout(layout);
+
+ gbc = makeGbc(0, 1, 1, 1);
+ layout.setConstraints(carLights, gbc);
+ add(carLights);
+
+ gbc = makeGbc(1, 1, 1, 1);
+ layout.setConstraints(pedLights, gbc);
+ add(pedLights);
+
+ statusLine.setText("listening on TCP Port " + ipPort);
+ statusLine.setEditable(false);
+ statusLine.setFocusable(false);
+ gbc = makeGbc(0, 0, 2, 1);
+ gbc.fill = GridBagConstraints.BOTH;
+ layout.setConstraints(statusLine, gbc);
+ add(statusLine);
+
+ gbc = makeGbc(0, 2, 2, 1);
+ gbc.fill = GridBagConstraints.BOTH;
+ layout.setConstraints(requestButton, gbc);
+ add(requestButton);
+
+ pack();
+ setVisible(true);
+
+ loopSocket(ipPort); // blocking loop
+ }
+
+ private void loopSocket(int ipPort) {
+ while (true) {
+ // open and close socket endlessly
+ try {
+ // open Socket
+ ServerSocket socketServer = new ServerSocket(ipPort);
+
+ // wait blocking for client to connect
+ Socket socket = socketServer.accept();
+ statusLine.setText("socket connected !");
+
+ // prepare input and output streams
+ BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+ OutputStream out = socket.getOutputStream();
+
+ // add listener for outgoing command
+ buttonListener = new ButtonActionListener(out);
+ requestButton.addActionListener(buttonListener);
+ requestButton.setEnabled(true);
+
+ resetLights();
+
+ // read blocking until socket is disconnected
+ String cmd;
+ while ((cmd = in.readLine()) != null) {
+ dispatchCommand(requestButton, cmd);
+ }
+ statusLine.setText("socket disconnected !");
+
+ // deactivate button
+ requestButton.removeActionListener(buttonListener);
+ requestButton.setEnabled(false);
+
+ resetLights();
+
+ // clean up socket
+ socket.close();
+ socketServer.close();
+
+ } catch (IOException e) {
+ System.err.println(e.toString());
+ System.exit(1);
+ }
+ }
+ }
+
+ private void dispatchCommand(Button requestButton, String cmd) {
+ // check carLights
+ if (cmd.equals("carLights=red")) {
+ carLights.setState(carLights.RED);
+ }
+ if (cmd.equals("carLights=yellowRed")) {
+ carLights.setState(carLights.YELLOWRED);
+ }
+ if (cmd.equals("carLights=green")) {
+ carLights.setState(carLights.GREEN);
+ }
+ if (cmd.equals("carLights=yellow")) {
+ carLights.setState(carLights.YELLOW);
+ }
+ if (cmd.equals("carLights=off")) {
+ carLights.setState(carLights.OFF);
+ }
+
+ // check pedLights
+ if (cmd.equals("pedLights=red")) {
+ pedLights.setState(pedLights.RED);
+ }
+ if (cmd.equals("pedLights=green")) {
+ pedLights.setState(pedLights.GREEN);
+ }
+ if (cmd.equals("pedLights=off")) {
+ pedLights.setState(pedLights.OFF);
+ }
+
+ // check button
+ if (cmd.equals("button=on")) {
+ requestButton.setEnabled(true);
+ }
+ if (cmd.equals("button=off")) {
+ requestButton.setEnabled(false);
+ }
+ }
+
+ private void resetLights() {
+ carLights.setState(carLights.OFF);
+ pedLights.setState(pedLights.OFF);
+ }
+
+ private GridBagConstraints makeGbc(int x, int y, int width, int height) {
+ GridBagConstraints gbc = new GridBagConstraints();
+ gbc.gridx = x;
+ gbc.gridy = y;
+ gbc.gridwidth = width;
+ gbc.gridheight = height;
+ gbc.weightx = 1;
+ gbc.weighty = 1;
+ // gbc.fill = GridBagConstraints.BOTH;
+ gbc.anchor = GridBagConstraints.CENTER;
+ gbc.insets = new Insets(1, 1, 1, 1);
+ return gbc;
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
index ff3d40fc1..552906493 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight2.java
@@ -1,86 +1,86 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-import java.awt.Canvas;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-
-
-public class TrafficLight2 extends Canvas {
- private static final long serialVersionUID = 1L;
- // Traffic light has 4 states
- public final int RED = 0;
- public final int GREEN = 1;
- public final int OFF = 2;
-
- private int state;
-
- public TrafficLight2(int state){
- this.state = state;
- }
- public TrafficLight2(){
- this.state = 0;
- }
-
- private int singleLightSize = 20;
- private int xPosition = 5;
- private int gap = 5;
-
- public void paint(Graphics g){
- Color lightRed = new Color(255,0,0);
- Color darkRed = new Color (127,0,0);
- Color lightGreen = new Color (0,255,0);
- Color darkGreen = new Color (0,127,0);
-
- Color colors [][] = {
- {lightRed,darkGreen},
- {darkRed,lightGreen},
- {darkRed,darkGreen}
- };
-
- // set Background
- g.setColor(Color.lightGray);
- g.fillRect(0,0,getSize().width,getSize().height);
- // draw boarder
- g.setColor(Color.BLACK);
- g.drawRect(0,0,getSize().width-1,getSize().height-1);
-
- for (int i = 0; i<2; i++) {
- g.setColor(colors[state][i]);
- g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
- g.setColor(Color.black);
- g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
- }
- }
-
- public Dimension getPreferredSize(){
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
- }
-
- public Dimension getMinimumSize()
- {
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
- }
-
- public void setState(int state)
- {
- // avoid array error
- if (state < 3){
- this.state = state;
- repaint();
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+import java.awt.Canvas;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+
+
+public class TrafficLight2 extends Canvas {
+ private static final long serialVersionUID = 1L;
+ // Traffic light has 4 states
+ public final int RED = 0;
+ public final int GREEN = 1;
+ public final int OFF = 2;
+
+ private int state;
+
+ public TrafficLight2(int state){
+ this.state = state;
+ }
+ public TrafficLight2(){
+ this.state = 0;
+ }
+
+ private int singleLightSize = 20;
+ private int xPosition = 5;
+ private int gap = 5;
+
+ public void paint(Graphics g){
+ Color lightRed = new Color(255,0,0);
+ Color darkRed = new Color (127,0,0);
+ Color lightGreen = new Color (0,255,0);
+ Color darkGreen = new Color (0,127,0);
+
+ Color colors [][] = {
+ {lightRed,darkGreen},
+ {darkRed,lightGreen},
+ {darkRed,darkGreen}
+ };
+
+ // set Background
+ g.setColor(Color.lightGray);
+ g.fillRect(0,0,getSize().width,getSize().height);
+ // draw boarder
+ g.setColor(Color.BLACK);
+ g.drawRect(0,0,getSize().width-1,getSize().height-1);
+
+ for (int i = 0; i<2; i++) {
+ g.setColor(colors[state][i]);
+ g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
+ g.setColor(Color.black);
+ g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
+ }
+ }
+
+ public Dimension getPreferredSize(){
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
+ }
+
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 2 + 2 * gap);
+ }
+
+ public void setState(int state)
+ {
+ // avoid array error
+ if (state < 3){
+ this.state = state;
+ repaint();
+ }
+ }
+
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
index 7e3314b90..afcc78176 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/TrafficLight3.java
@@ -1,91 +1,91 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thomas Jung (initial contribution)
- * Thomas Schuetz
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-import java.awt.Canvas;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.Graphics;
-
-
-public class TrafficLight3 extends Canvas {
- private static final long serialVersionUID = 1L;
- // Traffic light has 4 states
- public final int RED = 0;
- public final int YELLOWRED = 1;
- public final int GREEN = 2;
- public final int YELLOW = 3;
- public final int OFF = 4;
-
- private int state;
-
- public TrafficLight3(int state){
- this.state = state;
- }
- public TrafficLight3(){
- this.state = 0;
- }
-
- private int singleLightSize = 20;
- private int xPosition = 5;
- private int gap = 5;
-
- public void paint(Graphics g){
- Color lightRed = new Color(255,0,0);
- Color darkRed = new Color (127,0,0);
- Color lightGreen = new Color (0,255,0);
- Color darkGreen = new Color (0,127,0);
- Color lightYellow = new Color (255,255,0);
- Color darkYellow = new Color (127,127,0);
-
- Color colors [][] = {
- {lightRed,darkYellow,darkGreen},
- {lightRed,lightYellow,darkGreen},
- {darkRed,darkYellow,lightGreen},
- {darkRed,lightYellow,darkGreen},
- {darkRed,darkYellow,darkGreen}
- };
-
-
- // set Background
- g.setColor(Color.lightGray);
- g.fillRect(0,0,getSize().width,getSize().height);
- // draw boarder
- g.setColor(Color.BLACK);
- g.drawRect(0,0,getSize().width-1,getSize().height-1);
-
- for (int i = 0; i<3; i++) {
- g.setColor(colors[state][i]);
- g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
- g.setColor(Color.black);
- g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
- }
- }
-
- public Dimension getPreferredSize(){
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
- }
-
- public Dimension getMinimumSize()
- {
- return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
- }
-
- public void setState(int state)
- {
- if (state < 5){
- this.state = state;
- repaint();
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thomas Jung (initial contribution)
+ * Thomas Schuetz
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+import java.awt.Canvas;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+
+
+public class TrafficLight3 extends Canvas {
+ private static final long serialVersionUID = 1L;
+ // Traffic light has 4 states
+ public final int RED = 0;
+ public final int YELLOWRED = 1;
+ public final int GREEN = 2;
+ public final int YELLOW = 3;
+ public final int OFF = 4;
+
+ private int state;
+
+ public TrafficLight3(int state){
+ this.state = state;
+ }
+ public TrafficLight3(){
+ this.state = 0;
+ }
+
+ private int singleLightSize = 20;
+ private int xPosition = 5;
+ private int gap = 5;
+
+ public void paint(Graphics g){
+ Color lightRed = new Color(255,0,0);
+ Color darkRed = new Color (127,0,0);
+ Color lightGreen = new Color (0,255,0);
+ Color darkGreen = new Color (0,127,0);
+ Color lightYellow = new Color (255,255,0);
+ Color darkYellow = new Color (127,127,0);
+
+ Color colors [][] = {
+ {lightRed,darkYellow,darkGreen},
+ {lightRed,lightYellow,darkGreen},
+ {darkRed,darkYellow,lightGreen},
+ {darkRed,lightYellow,darkGreen},
+ {darkRed,darkYellow,darkGreen}
+ };
+
+
+ // set Background
+ g.setColor(Color.lightGray);
+ g.fillRect(0,0,getSize().width,getSize().height);
+ // draw boarder
+ g.setColor(Color.BLACK);
+ g.drawRect(0,0,getSize().width-1,getSize().height-1);
+
+ for (int i = 0; i<3; i++) {
+ g.setColor(colors[state][i]);
+ g.fillOval(xPosition,i*singleLightSize+gap,singleLightSize,singleLightSize);
+ g.setColor(Color.black);
+ g.drawOval(xPosition,i*singleLightSize+gap,singleLightSize-1,singleLightSize-1);
+ }
+ }
+
+ public Dimension getPreferredSize(){
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
+ }
+
+ public Dimension getMinimumSize()
+ {
+ return new Dimension(singleLightSize + 2 * gap, singleLightSize * 3 + 2 * gap);
+ }
+
+ public void setState(int state)
+ {
+ if (state < 5){
+ this.state = state;
+ repaint();
+ }
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
index e43b8a232..e37fdb029 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/WindowClosingAdapter.java
@@ -1,53 +1,53 @@
-/*******************************************************************************
- * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Thomas Jung (initial contribution)
- *******************************************************************************/
-
-
-package org.eclipse.etrice.tutorials.simulators.trafficlight;
-
-
-/* WindowClosingAdapter.java */
-
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
-public class WindowClosingAdapter
-extends WindowAdapter
-{
- private boolean exitSystem;
-
- /**
- * Erzeugt einen WindowClosingAdapter zum Schliessen
- * des Fensters. Ist exitSystem true, wird das komplette
- * Programm beendet.
- */
- public WindowClosingAdapter(boolean exitSystem)
- {
- this.exitSystem = exitSystem;
- }
-
- /**
- * Erzeugt einen WindowClosingAdapter zum Schliessen
- * des Fensters. Das Programm wird nicht beendet.
- */
- public WindowClosingAdapter()
- {
- this(false);
- }
-
- public void windowClosing(WindowEvent event)
- {
- event.getWindow().setVisible(false);
- event.getWindow().dispose();
- if (exitSystem) {
- System.exit(0);
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2012 tieto deutschland gmbh (http://www.tieto.com)
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Thomas Jung (initial contribution)
+ *******************************************************************************/
+
+
+package org.eclipse.etrice.tutorials.simulators.trafficlight;
+
+
+/* WindowClosingAdapter.java */
+
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+public class WindowClosingAdapter
+extends WindowAdapter
+{
+ private boolean exitSystem;
+
+ /**
+ * Erzeugt einen WindowClosingAdapter zum Schliessen
+ * des Fensters. Ist exitSystem true, wird das komplette
+ * Programm beendet.
+ */
+ public WindowClosingAdapter(boolean exitSystem)
+ {
+ this.exitSystem = exitSystem;
+ }
+
+ /**
+ * Erzeugt einen WindowClosingAdapter zum Schliessen
+ * des Fensters. Das Programm wird nicht beendet.
+ */
+ public WindowClosingAdapter()
+ {
+ this(false);
+ }
+
+ public void windowClosing(WindowEvent event)
+ {
+ event.getWindow().setVisible(false);
+ event.getWindow().dispose();
+ if (exitSystem) {
+ System.exit(0);
+ }
+ }
+}
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
index 82afbbd0a..a39cce7fc 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4441.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4441"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4441"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
index 30b28c52f..56ec1a32d 100644
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
+++ b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight/trafficlight_port_4442.launch
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4442"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.etrice.tutorials.simulators.trafficlight/src/org/eclipse/etrice/tutorials/simulators/trafficlight/Main.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.etrice.tutorials.simulators.trafficlight.Main"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="4442"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.tutorials.simulators.trafficlight"/>
+</launchConfiguration>

Back to the top