Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.cpp')
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.cproject296
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.gitignore4
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.project142
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.codan.core.prefs134
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.managedbuilder.core.prefs18
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/about.html56
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec2
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp152
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h134
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp96
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h96
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp208
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h136
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h96
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp174
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h102
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp46
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h68
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp40
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h70
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp66
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h124
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp156
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h96
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp128
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h98
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp314
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h166
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp238
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h140
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp146
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h98
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp88
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h104
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp438
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h296
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp124
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h156
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp42
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h76
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp46
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h62
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp120
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h124
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp64
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h86
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp318
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h146
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp246
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h92
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp76
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h90
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/platform/etTimer.h92
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/config/etRuntimeConfig.h66
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/platforms/generic/etDatatypes.h154
55 files changed, 3473 insertions, 3473 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.cproject b/runtime/org.eclipse.etrice.runtime.cpp/.cproject
index 9ae0da066..4f8cb2d71 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.cproject
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.cproject
@@ -1,148 +1,148 @@
-<?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.lib.debug.878140176">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" moduleId="org.eclipse.cdt.core.settings" name="Debug">
- <externalSettings>
- <externalSetting>
- <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.cpp"/>
- <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.cpp/Debug"/>
- <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.cpp" srcPrefixMapping="" srcRootPath=""/>
- </externalSetting>
- </externalSettings>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.1964804313" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.1363258846" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.runtime.cpp/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.765054146" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug.778368249" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug">
- <option id="gnu.both.asm.option.include.paths.479529629" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.cpp/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1431383431" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug.2067321690" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1516705340" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug">
- <option id="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level.143629884" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level.1636571561" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.option.include.paths.371088988" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.834970834" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.787652226" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug">
- <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.lib.debug.option.optimization.level.1338147333" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.debug.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.lib.debug.option.debugging.level.1088652134" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.181765143" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1322245631" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.833683108" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.1619419934" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- <cconfiguration id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536">
- <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536" moduleId="org.eclipse.cdt.core.settings" name="Release">
- <externalSettings>
- <externalSetting>
- <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.cpp"/>
- <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.cpp/Release"/>
- <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.cpp" srcPrefixMapping="" srcRootPath=""/>
- </externalSetting>
- </externalSettings>
- <extensions>
- <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
- <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
- </extensions>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536" name="Release" parent="cdt.managedbuild.config.gnu.mingw.lib.release">
- <folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536." name="/" resourcePath="">
- <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.release.341416755" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.release">
- <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.release.2033657787" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.release"/>
- <builder buildPath="${workspace_loc:/org.eclipse.etrice.runtime.cpp/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.629737011" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release.1791075014" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release">
- <option id="gnu.both.asm.option.include.paths.227502240" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
- <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1768068662" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release.633341399" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release.567360588" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release">
- <option id="gnu.cpp.compiler.mingw.lib.release.option.optimization.level.584961348" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.mingw.lib.release.option.debugging.level.1368123052" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
- <option id="gnu.cpp.compiler.option.include.paths.763277987" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1712453980" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.2143016498" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release">
- <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.lib.release.option.optimization.level.180068255" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.release.option.optimization.level" valueType="enumerated"/>
- <option id="gnu.c.compiler.mingw.lib.release.option.debugging.level.1290753638" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
- <option id="gnu.c.compiler.option.include.paths.1098867338" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
- </option>
- <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1857566126" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
- </tool>
- <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.536323295" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
- <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.2051974509" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
- </toolChain>
- </folderInfo>
- <sourceEntries>
- <entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
- <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
- </sourceEntries>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
- </cconfiguration>
- </storageModule>
- <storageModule moduleId="cdtBuildSystem" version="4.0.0">
- <project id="org.eclipse.etrice.runtime.cpp.cdt.managedbuild.target.gnu.mingw.lib.335663705" name="Static Library" projectType="cdt.managedbuild.target.gnu.mingw.lib"/>
- </storageModule>
- <storageModule moduleId="refreshScope" versionNumber="2">
- <configuration configurationName="Release">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.cpp"/>
- </configuration>
- <configuration configurationName="Debug">
- <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.cpp"/>
- </configuration>
- </storageModule>
- <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
- <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
- <storageModule moduleId="scannerConfiguration">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176;cdt.managedbuild.config.gnu.mingw.lib.debug.878140176.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1516705340;cdt.managedbuild.tool.gnu.cpp.compiler.input.834970834">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536;cdt.managedbuild.config.gnu.mingw.lib.release.1265017536.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.2143016498;cdt.managedbuild.tool.gnu.c.compiler.input.1857566126">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176;cdt.managedbuild.config.gnu.mingw.lib.debug.878140176.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.787652226;cdt.managedbuild.tool.gnu.c.compiler.input.1322245631">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
- </scannerConfigBuildInfo>
- <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536;cdt.managedbuild.config.gnu.mingw.lib.release.1265017536.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release.567360588;cdt.managedbuild.tool.gnu.cpp.compiler.input.1712453980">
- <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
- </scannerConfigBuildInfo>
- </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.lib.debug.878140176">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.cpp"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.cpp/Debug"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.cpp" srcPrefixMapping="" srcRootPath=""/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.lib.debug">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.debug.1964804313" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.debug">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.debug.1363258846" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.debug"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.runtime.cpp/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.765054146" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug.778368249" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.debug">
+ <option id="gnu.both.asm.option.include.paths.479529629" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/org.eclipse.etrice.runtime.cpp/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1431383431" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug.2067321690" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.debug"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1516705340" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug">
+ <option id="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level.143629884" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level.1636571561" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.include.paths.371088988" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.834970834" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.787652226" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug">
+ <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.lib.debug.option.optimization.level.1338147333" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.debug.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.lib.debug.option.debugging.level.1088652134" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.181765143" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1322245631" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.833683108" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.1619419934" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <externalSettings>
+ <externalSetting>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/org.eclipse.etrice.runtime.cpp"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/org.eclipse.etrice.runtime.cpp/Release"/>
+ <entry flags="RESOLVED" kind="libraryFile" name="org.eclipse.etrice.runtime.cpp" srcPrefixMapping="" srcRootPath=""/>
+ </externalSetting>
+ </externalSettings>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" 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.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536" name="Release" parent="cdt.managedbuild.config.gnu.mingw.lib.release">
+ <folderInfo id="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536." name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.mingw.lib.release.341416755" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.lib.release">
+ <targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.lib.release.2033657787" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.lib.release"/>
+ <builder buildPath="${workspace_loc:/org.eclipse.etrice.runtime.cpp/Release}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.629737011" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release.1791075014" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.lib.release">
+ <option id="gnu.both.asm.option.include.paths.227502240" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1768068662" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release.633341399" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.lib.release"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release.567360588" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release">
+ <option id="gnu.cpp.compiler.mingw.lib.release.option.optimization.level.584961348" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.mingw.lib.release.option.debugging.level.1368123052" name="Debug Level" superClass="gnu.cpp.compiler.mingw.lib.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.cpp.compiler.option.include.paths.763277987" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1712453980" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.2143016498" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.mingw.lib.release.option.optimization.level.180068255" name="Optimization Level" superClass="gnu.c.compiler.mingw.lib.release.option.optimization.level" valueType="enumerated"/>
+ <option id="gnu.c.compiler.mingw.lib.release.option.debugging.level.1290753638" name="Debug Level" superClass="gnu.c.compiler.mingw.lib.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+ <option id="gnu.c.compiler.option.include.paths.1098867338" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platforms/generic}&quot;"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1857566126" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+ </tool>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.base.536323295" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base.2051974509" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base"/>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="org.eclipse.etrice.runtime.cpp.cdt.managedbuild.target.gnu.mingw.lib.335663705" name="Static Library" projectType="cdt.managedbuild.target.gnu.mingw.lib"/>
+ </storageModule>
+ <storageModule moduleId="refreshScope" versionNumber="2">
+ <configuration configurationName="Release">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.cpp"/>
+ </configuration>
+ <configuration configurationName="Debug">
+ <resource resourceType="PROJECT" workspacePath="/org.eclipse.etrice.runtime.cpp"/>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176;cdt.managedbuild.config.gnu.mingw.lib.debug.878140176.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.debug.1516705340;cdt.managedbuild.tool.gnu.cpp.compiler.input.834970834">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536;cdt.managedbuild.config.gnu.mingw.lib.release.1265017536.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.release.2143016498;cdt.managedbuild.tool.gnu.c.compiler.input.1857566126">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.debug.878140176;cdt.managedbuild.config.gnu.mingw.lib.debug.878140176.;cdt.managedbuild.tool.gnu.c.compiler.mingw.lib.debug.787652226;cdt.managedbuild.tool.gnu.c.compiler.input.1322245631">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.lib.release.1265017536;cdt.managedbuild.config.gnu.mingw.lib.release.1265017536.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.lib.release.567360588;cdt.managedbuild.tool.gnu.cpp.compiler.input.1712453980">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+</cproject>
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.gitignore b/runtime/org.eclipse.etrice.runtime.cpp/.gitignore
index 5dde7aeef..9904774eb 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.gitignore
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.gitignore
@@ -1,2 +1,2 @@
-bin
-Debug
+bin
+Debug
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.project b/runtime/org.eclipse.etrice.runtime.cpp/.project
index fa5e9dbfd..3dbf92d9e 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.project
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.project
@@ -1,71 +1,71 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.etrice.runtime.cpp</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
- <triggers>clean,full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>?name?</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.append_environment</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildArguments</key>
- <value></value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildCommand</key>
- <value>make</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.buildLocation</key>
- <value>${workspace_loc:/org.eclipse.etrice.runtime.cpp/Debug}</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.contents</key>
- <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
- <value>false</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.enableFullBuild</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.stopOnError</key>
- <value>true</value>
- </dictionary>
- <dictionary>
- <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
- <value>true</value>
- </dictionary>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.cdt.core.cnature</nature>
- <nature>org.eclipse.cdt.core.ccnature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
- <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.runtime.cpp</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/org.eclipse.etrice.runtime.cpp/Debug}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.codan.core.prefs b/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.codan.core.prefs
index 3ab3be8eb..d1c7b011a 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.codan.core.prefs
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.codan.core.prefs
@@ -1,67 +1,67 @@
-eclipse.preferences.version=1
-org.eclipse.cdt.codan.checkers.errnoreturn=Warning
-org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
-org.eclipse.cdt.codan.checkers.errreturnvalue=Error
-org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.checkers.noreturn=Error
-org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
-org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
-org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
-org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
-org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
-org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
-org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
-org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
-org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
-org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
-org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
-org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
-org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
-org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
-org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
-org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
-org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
-org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
-org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
-org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
-org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
-org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
-org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
-org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
-org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
-org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
-org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
-org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
-org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.checkers.noreturn=Error
+org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.managedbuilder.core.prefs
index 8be085b41..ddf4b4b1c 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.managedbuilder.core.prefs
+++ b/runtime/org.eclipse.etrice.runtime.cpp/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -1,9 +1,9 @@
-eclipse.preferences.version=1
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPATH/delimiter=;
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPATH/operation=remove
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPLUS_INCLUDE_PATH/delimiter=;
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPLUS_INCLUDE_PATH/operation=remove
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/C_INCLUDE_PATH/delimiter=;
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/C_INCLUDE_PATH/operation=remove
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/append=true
-environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/appendContributed=true
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPATH/delimiter=;
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPATH/operation=remove
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPLUS_INCLUDE_PATH/delimiter=;
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/CPLUS_INCLUDE_PATH/operation=remove
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/C_INCLUDE_PATH/delimiter=;
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/C_INCLUDE_PATH/operation=remove
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/append=true
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.lib.debug.878140176/appendContributed=true
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/about.html b/runtime/org.eclipse.etrice.runtime.cpp/about.html
index 82d49bf5f..d35d5aed6 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/about.html
+++ b/runtime/org.eclipse.etrice.runtime.cpp/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec b/runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec
index 7ba0fbcf8..229c05b70 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec
+++ b/runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.runtime.cpp" componentType="buckminster" version="0.3.0.qualifier"/>
+<?xml version="1.0" encoding="UTF-8"?><cs:cspec xmlns:cs="http://www.eclipse.org/buckminster/CSpec-1.0" name="org.eclipse.etrice.runtime.cpp" componentType="buckminster" version="0.3.0.qualifier"/>
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp
index a2e2abc97..ed8c11e57 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp
@@ -1,76 +1,76 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-
-#include "DebuggingService.h"
-#include "common/modelbase/ActorClassBase.h"
-#include <iostream>
-
-namespace etRuntime {
-
-DebuggingService* DebuggingService::s_instance = 0;
-
-DebuggingService::DebuggingService()
-: asyncLogger() ,
- syncLogger(),
- portInstances()
-{
-}
-
-DebuggingService::~DebuggingService() {
-}
-
-
-void DebuggingService::addMessageAsyncOut(Address source, Address target,
- const std::string& msg) {
- asyncLogger.addMessageAsyncOut(portInstances.at(source)->getActorPath(),
- portInstances.at(target)->getActorPath(), msg);
-}
-
-void DebuggingService::addMessageAsyncIn(Address source, Address target,
- const std::string& msg) {
- asyncLogger.addMessageAsyncIn(portInstances.at(source)->getActorPath(),
- portInstances.at(target)->getActorPath(), msg);
-}
-
-void DebuggingService::addMessageSyncCall(Address source, Address target,
- const std::string& msg) {
- asyncLogger.addMessageSyncCall(portInstances.at(source)->getActorPath(),
- portInstances.at(target)->getActorPath(), msg);
-}
-
-void DebuggingService::addMessageSyncReturn(Address source, Address target,
- const std::string& msg) {
- asyncLogger.addMessageSyncReturn(portInstances.at(source)->getActorPath(),
- portInstances.at(target)->getActorPath(), msg);
-}
-
-void DebuggingService::addActorState(const ActorClassBase& actor,
- const std::string& state) {
- asyncLogger.addActorState(actor.getInstancePath(), state);
-}
-
-void DebuggingService::addPortInstance(PortBase& port) {
- portInstances[port.getAddress()] = &port;
- std::cout << "adding " << port.getAddress().toID() << " " << &port << " " << port.getParent()->getInstancePathName()<< std::endl;
-}
-
-MSCLogger& DebuggingService::getSyncLogger() {
- return syncLogger;
-}
-
-MSCLogger& DebuggingService::getAsyncLogger() {
- return asyncLogger;
-}
-
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+
+#include "DebuggingService.h"
+#include "common/modelbase/ActorClassBase.h"
+#include <iostream>
+
+namespace etRuntime {
+
+DebuggingService* DebuggingService::s_instance = 0;
+
+DebuggingService::DebuggingService()
+: asyncLogger() ,
+ syncLogger(),
+ portInstances()
+{
+}
+
+DebuggingService::~DebuggingService() {
+}
+
+
+void DebuggingService::addMessageAsyncOut(Address source, Address target,
+ const std::string& msg) {
+ asyncLogger.addMessageAsyncOut(portInstances.at(source)->getActorPath(),
+ portInstances.at(target)->getActorPath(), msg);
+}
+
+void DebuggingService::addMessageAsyncIn(Address source, Address target,
+ const std::string& msg) {
+ asyncLogger.addMessageAsyncIn(portInstances.at(source)->getActorPath(),
+ portInstances.at(target)->getActorPath(), msg);
+}
+
+void DebuggingService::addMessageSyncCall(Address source, Address target,
+ const std::string& msg) {
+ asyncLogger.addMessageSyncCall(portInstances.at(source)->getActorPath(),
+ portInstances.at(target)->getActorPath(), msg);
+}
+
+void DebuggingService::addMessageSyncReturn(Address source, Address target,
+ const std::string& msg) {
+ asyncLogger.addMessageSyncReturn(portInstances.at(source)->getActorPath(),
+ portInstances.at(target)->getActorPath(), msg);
+}
+
+void DebuggingService::addActorState(const ActorClassBase& actor,
+ const std::string& state) {
+ asyncLogger.addActorState(actor.getInstancePath(), state);
+}
+
+void DebuggingService::addPortInstance(PortBase& port) {
+ portInstances[port.getAddress()] = &port;
+ std::cout << "adding " << port.getAddress().toID() << " " << &port << " " << port.getParent()->getInstancePathName()<< std::endl;
+}
+
+MSCLogger& DebuggingService::getSyncLogger() {
+ return syncLogger;
+}
+
+MSCLogger& DebuggingService::getAsyncLogger() {
+ return asyncLogger;
+}
+
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h
index 1768584b2..872eabf6c 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h
@@ -1,67 +1,67 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef DEBUGGINGSERVICE_H_
-#define DEBUGGINGSERVICE_H_
-
-#include "common/messaging/Address.h"
-#include "common/debugging/MSCLogger.h"
-#include "common/modelbase/PortBase.h"
-#include <string>
-#include <map>
-
-namespace etRuntime {
- class ActorClassBase;
-
-
-class DebuggingService {
-private:
- static DebuggingService* s_instance;
-
-public:
- virtual ~DebuggingService();
-
- static DebuggingService& getInstance() {
- if (s_instance == 0) {
- s_instance = new DebuggingService();
- }
- return *s_instance;
- }
-
- void addMessageAsyncOut(Address source, Address target, const std::string& msg);
- void addMessageAsyncIn(Address source, Address target, const std::string& msg);
- void addMessageSyncCall(Address source, Address target, const std::string& msg);
- void addMessageSyncReturn(Address source, Address target, const std::string& msg);
- void addActorState(const ActorClassBase& actor, const std::string& state);
- void addPortInstance(PortBase& port);
- MSCLogger& getSyncLogger();
- MSCLogger& getAsyncLogger();
-
-private:
-
- MSCLogger asyncLogger;
- MSCLogger syncLogger;
- std::map<Address, PortBase*> portInstances;
-
- DebuggingService();
- DebuggingService(const DebuggingService& right);
- DebuggingService& operator=(const DebuggingService& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* DEBUGGINGSERVICE_H_ */
-
-
-
-
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef DEBUGGINGSERVICE_H_
+#define DEBUGGINGSERVICE_H_
+
+#include "common/messaging/Address.h"
+#include "common/debugging/MSCLogger.h"
+#include "common/modelbase/PortBase.h"
+#include <string>
+#include <map>
+
+namespace etRuntime {
+ class ActorClassBase;
+
+
+class DebuggingService {
+private:
+ static DebuggingService* s_instance;
+
+public:
+ virtual ~DebuggingService();
+
+ static DebuggingService& getInstance() {
+ if (s_instance == 0) {
+ s_instance = new DebuggingService();
+ }
+ return *s_instance;
+ }
+
+ void addMessageAsyncOut(Address source, Address target, const std::string& msg);
+ void addMessageAsyncIn(Address source, Address target, const std::string& msg);
+ void addMessageSyncCall(Address source, Address target, const std::string& msg);
+ void addMessageSyncReturn(Address source, Address target, const std::string& msg);
+ void addActorState(const ActorClassBase& actor, const std::string& state);
+ void addPortInstance(PortBase& port);
+ MSCLogger& getSyncLogger();
+ MSCLogger& getAsyncLogger();
+
+private:
+
+ MSCLogger asyncLogger;
+ MSCLogger syncLogger;
+ std::map<Address, PortBase*> portInstances;
+
+ DebuggingService();
+ DebuggingService(const DebuggingService& right);
+ DebuggingService& operator=(const DebuggingService& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* DEBUGGINGSERVICE_H_ */
+
+
+
+
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp
index c0d0ada18..d720bbe5e 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp
@@ -1,48 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MSCFilter.h"
-
-namespace etRuntime {
-
-MSCFilter::MSCFilter() :
- filterList() {
-}
-MSCFilter::~MSCFilter() {
-}
-
-void MSCFilter::addFilter(FilterItem filter) {
- filterList.push_back(filter);
-}
-
-bool MSCFilter::applyTo(const std::string& text) {
- if (filterList.empty())
- return true; // no filters -> all messages will be logged
- std::list<FilterItem>::iterator it = filterList.begin();
- for ( ; it != filterList.end(); ++it) {
- if (text.compare((*it).filter) == 0)
- return !(*it).exclude;
- }
- return false;
-}
-
-std::string MSCFilter::reduceString(const std::string& string) {
- if (filterList.size() == 1)
- //TODO: filtering with regular expression
- // return string.replaceFirst(filterList.front().filter, "");
- return string;
- else
- return string;
-}
-
-} /* namespace etRuntime */
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MSCFilter.h"
+
+namespace etRuntime {
+
+MSCFilter::MSCFilter() :
+ filterList() {
+}
+MSCFilter::~MSCFilter() {
+}
+
+void MSCFilter::addFilter(FilterItem filter) {
+ filterList.push_back(filter);
+}
+
+bool MSCFilter::applyTo(const std::string& text) {
+ if (filterList.empty())
+ return true; // no filters -> all messages will be logged
+ std::list<FilterItem>::iterator it = filterList.begin();
+ for ( ; it != filterList.end(); ++it) {
+ if (text.compare((*it).filter) == 0)
+ return !(*it).exclude;
+ }
+ return false;
+}
+
+std::string MSCFilter::reduceString(const std::string& string) {
+ if (filterList.size() == 1)
+ //TODO: filtering with regular expression
+ // return string.replaceFirst(filterList.front().filter, "");
+ return string;
+ else
+ return string;
+}
+
+} /* namespace etRuntime */
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h
index d3bbd8c7b..917feb460 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h
@@ -1,48 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MSCFILTER_H_
-#define MSCFILTER_H_
-
-#include <list>
-#include <string>
-
-namespace etRuntime {
-
-class MSCFilter {
-public:
- class FilterItem{
- public:
- FilterItem(const std::string& filter_, bool exclude_)
- : exclude(exclude_),
- filter(filter_)
- {};
- bool exclude;
- std::string filter;
- private:
- FilterItem();
- };
-
- MSCFilter();
- virtual ~MSCFilter();
-
- void addFilter(FilterItem filter);
- bool applyTo(const std::string& text);
- std::string reduceString(const std::string& string);
-
-private:
- std::list<FilterItem> filterList;
-
-};
-
-} /* namespace etRuntime */
-#endif /* MSCFILTER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MSCFILTER_H_
+#define MSCFILTER_H_
+
+#include <list>
+#include <string>
+
+namespace etRuntime {
+
+class MSCFilter {
+public:
+ class FilterItem{
+ public:
+ FilterItem(const std::string& filter_, bool exclude_)
+ : exclude(exclude_),
+ filter(filter_)
+ {};
+ bool exclude;
+ std::string filter;
+ private:
+ FilterItem();
+ };
+
+ MSCFilter();
+ virtual ~MSCFilter();
+
+ void addFilter(FilterItem filter);
+ bool applyTo(const std::string& text);
+ std::string reduceString(const std::string& string);
+
+private:
+ std::list<FilterItem> filterList;
+
+};
+
+} /* namespace etRuntime */
+#endif /* MSCFILTER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp
index d36b4c87c..5ecb0354d 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp
@@ -1,104 +1,104 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MSCLogger.h"
-
-namespace etRuntime {
-
-MSCLogger::MSCLogger()
-: commandList(),
- filter(0),
- path(),
- msc_name(),
-is_open(false)
-{
-}
-
-MSCLogger::~MSCLogger() {
- delete filter;
- filter = 0;
-}
-
-void MSCLogger::setMSC(const std::string& msc_name_, const std::string& path_) {
- msc_name = msc_name_;
- path = path_;
- delete filter;
- filter = new MSCFilter();
-}
-
-void MSCLogger::addMessageAsyncOut(const std::string& source, const std::string& target,
- const std::string& message) {
- createLine(source, " >-- ", target, message);
-}
-
-void MSCLogger::addMessageAsyncIn(const std::string& source, const std::string& target,
- const std::string& message) {
- createLine(source, " --> ", target, message);
-}
-
-void MSCLogger::addMessageSyncCall(const std::string& source, const std::string& target,
- const std::string& message) {
- createLine(source, " ==> ", target, message);
-}
-
-void MSCLogger::addMessageSyncReturn(const std::string& source, const std::string& target,
- const std::string& message) {
- createLine(source, " <== ", target, message);
-}
-
-void MSCLogger::addActorState(const std::string& actor, const std::string& state) {
- if (filter->applyTo(actor))
- commandList.push_back("\t" + filter->reduceString(actor) + " >>> " + state);
-}
-
-void MSCLogger::createLine(const std::string& source, const std::string& mid, const std::string& target, const std::string& message) {
- if (filter->applyTo(source) && filter->applyTo(target)) {
- commandList.push_back( "\t"+filter->reduceString(source)+mid+filter->reduceString(target)+ " " + message);
- }
-}
-
-void MSCLogger::close() {
- if (is_open) {
-// try {
- //TODO: error handling
- // Create file
- std::ofstream myfile;
- //TODO: where to create the file
- // std::string dir = "tmp/log"; doesn't work on windows
- std::string dir = "";
- myfile.open (std::string(dir + path + msc_name + ".seq").c_str(), std::ios::out);
- if (myfile.is_open()) { /* ok, proceed with output */
- saveMSCforTrace2UML(myfile);
- myfile.close();
- }
-// };
- }
- is_open = false;
-}
-
-void MSCLogger::saveMSCforTrace2UML(std::ofstream& out) {
- //try {
- //TODO: errorhandling
- out << "#generated MSC for Trace2UML";
- out << std::endl ;
- std::list<std::string>::iterator it = commandList.begin();
- for ( ; it != commandList.end(); ++it) {
- out << (*it) << std::endl;
- }
-// } catch (IOException e) {
-// System.err.println("Error: " + e.getMessage());
-// }
-
-}
-
-
-}
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MSCLogger.h"
+
+namespace etRuntime {
+
+MSCLogger::MSCLogger()
+: commandList(),
+ filter(0),
+ path(),
+ msc_name(),
+is_open(false)
+{
+}
+
+MSCLogger::~MSCLogger() {
+ delete filter;
+ filter = 0;
+}
+
+void MSCLogger::setMSC(const std::string& msc_name_, const std::string& path_) {
+ msc_name = msc_name_;
+ path = path_;
+ delete filter;
+ filter = new MSCFilter();
+}
+
+void MSCLogger::addMessageAsyncOut(const std::string& source, const std::string& target,
+ const std::string& message) {
+ createLine(source, " >-- ", target, message);
+}
+
+void MSCLogger::addMessageAsyncIn(const std::string& source, const std::string& target,
+ const std::string& message) {
+ createLine(source, " --> ", target, message);
+}
+
+void MSCLogger::addMessageSyncCall(const std::string& source, const std::string& target,
+ const std::string& message) {
+ createLine(source, " ==> ", target, message);
+}
+
+void MSCLogger::addMessageSyncReturn(const std::string& source, const std::string& target,
+ const std::string& message) {
+ createLine(source, " <== ", target, message);
+}
+
+void MSCLogger::addActorState(const std::string& actor, const std::string& state) {
+ if (filter->applyTo(actor))
+ commandList.push_back("\t" + filter->reduceString(actor) + " >>> " + state);
+}
+
+void MSCLogger::createLine(const std::string& source, const std::string& mid, const std::string& target, const std::string& message) {
+ if (filter->applyTo(source) && filter->applyTo(target)) {
+ commandList.push_back( "\t"+filter->reduceString(source)+mid+filter->reduceString(target)+ " " + message);
+ }
+}
+
+void MSCLogger::close() {
+ if (is_open) {
+// try {
+ //TODO: error handling
+ // Create file
+ std::ofstream myfile;
+ //TODO: where to create the file
+ // std::string dir = "tmp/log"; doesn't work on windows
+ std::string dir = "";
+ myfile.open (std::string(dir + path + msc_name + ".seq").c_str(), std::ios::out);
+ if (myfile.is_open()) { /* ok, proceed with output */
+ saveMSCforTrace2UML(myfile);
+ myfile.close();
+ }
+// };
+ }
+ is_open = false;
+}
+
+void MSCLogger::saveMSCforTrace2UML(std::ofstream& out) {
+ //try {
+ //TODO: errorhandling
+ out << "#generated MSC for Trace2UML";
+ out << std::endl ;
+ std::list<std::string>::iterator it = commandList.begin();
+ for ( ; it != commandList.end(); ++it) {
+ out << (*it) << std::endl;
+ }
+// } catch (IOException e) {
+// System.err.println("Error: " + e.getMessage());
+// }
+
+}
+
+
+}
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h
index 19b9d94ca..01499863d 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h
@@ -1,68 +1,68 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MSCLOGGER_H_
-#define MSCLOGGER_H_
-
-#include <string>
-#include <list>
-#include <iostream>
-#include <fstream>
-#include "MSCFilter.h"
-
-namespace etRuntime {
-
-class MSCLogger {
-public:
- MSCLogger();
- virtual ~MSCLogger();
-
- void setMSC(const std::string& msc_name_, const std::string& path_);
-
- //TODO synchronized
- void open() {is_open = true; };
- //TODO synchronized
- void addMessageAsyncOut(const std::string& source, const std::string& target, const std::string& message);
- //TODO synchronized
- void addMessageAsyncIn(const std::string& source, const std::string& target, const std::string& message);
- //TODO synchronized
- void addMessageSyncCall(const std::string& source, const std::string& target, const std::string& message);
- //TODO synchronized
- void addMessageSyncReturn(const std::string& source, const std::string& target, const std::string& message);
- //TODO synchronized
- void addActorState(const std::string& actor, const std::string& state);
- //TODO synchronized
- void close();
-
- const std::list<std::string>& getCommandList() { return commandList; };
- MSCFilter* getMSCFilter(){ return filter; };
-
-private:
- void createLine(const std::string& source, const std::string& mid, const std::string& target, const std::string& message);
- void saveMSCforTrace2UML(std::ofstream& out);
-
- std::list<std::string> commandList;
- MSCFilter* filter;
-
- std::string path;
- std::string msc_name ;
- bool is_open;
-
- MSCLogger(const MSCLogger& right);
- MSCLogger& operator=(const MSCLogger& right);
-
-
-};
-
-
-} /* namespace etRuntime */
-#endif /* MSCLOGGER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MSCLOGGER_H_
+#define MSCLOGGER_H_
+
+#include <string>
+#include <list>
+#include <iostream>
+#include <fstream>
+#include "MSCFilter.h"
+
+namespace etRuntime {
+
+class MSCLogger {
+public:
+ MSCLogger();
+ virtual ~MSCLogger();
+
+ void setMSC(const std::string& msc_name_, const std::string& path_);
+
+ //TODO synchronized
+ void open() {is_open = true; };
+ //TODO synchronized
+ void addMessageAsyncOut(const std::string& source, const std::string& target, const std::string& message);
+ //TODO synchronized
+ void addMessageAsyncIn(const std::string& source, const std::string& target, const std::string& message);
+ //TODO synchronized
+ void addMessageSyncCall(const std::string& source, const std::string& target, const std::string& message);
+ //TODO synchronized
+ void addMessageSyncReturn(const std::string& source, const std::string& target, const std::string& message);
+ //TODO synchronized
+ void addActorState(const std::string& actor, const std::string& state);
+ //TODO synchronized
+ void close();
+
+ const std::list<std::string>& getCommandList() { return commandList; };
+ MSCFilter* getMSCFilter(){ return filter; };
+
+private:
+ void createLine(const std::string& source, const std::string& mid, const std::string& target, const std::string& message);
+ void saveMSCforTrace2UML(std::ofstream& out);
+
+ std::list<std::string> commandList;
+ MSCFilter* filter;
+
+ std::string path;
+ std::string msc_name ;
+ bool is_open;
+
+ MSCLogger(const MSCLogger& right);
+ MSCLogger& operator=(const MSCLogger& right);
+
+
+};
+
+
+} /* namespace etRuntime */
+#endif /* MSCLOGGER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
index f9d46a43f..7086a8ac3 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h
@@ -1,48 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef ABSTRACTMESSAGERECEIVER_H_
-#define ABSTRACTMESSAGERECEIVER_H_
-
-#include "common/messaging/Address.h"
-#include "common/messaging/IMessageReceiver.h"
-#include "common/messaging/RTObject.h"
-#include <string>
-
-namespace etRuntime {
-
-class AbstractMessageReceiver: public RTObject, public virtual IMessageReceiver {
-
-public:
- Address getAddress() const {
- return m_address;
- }
- virtual ~AbstractMessageReceiver() {};
-
-protected:
- AbstractMessageReceiver(IRTObject* parent, Address address, std::string name)
- : IMessageReceiver(),
- RTObject(parent, name),
- m_address(address)
- {
-
- }
-
-private:
- Address m_address;
-
- AbstractMessageReceiver();
-};
-
-
-}
-#endif /* ABSTRACTMESSAGERECEIVER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ABSTRACTMESSAGERECEIVER_H_
+#define ABSTRACTMESSAGERECEIVER_H_
+
+#include "common/messaging/Address.h"
+#include "common/messaging/IMessageReceiver.h"
+#include "common/messaging/RTObject.h"
+#include <string>
+
+namespace etRuntime {
+
+class AbstractMessageReceiver: public RTObject, public virtual IMessageReceiver {
+
+public:
+ Address getAddress() const {
+ return m_address;
+ }
+ virtual ~AbstractMessageReceiver() {};
+
+protected:
+ AbstractMessageReceiver(IRTObject* parent, Address address, std::string name)
+ : IMessageReceiver(),
+ RTObject(parent, name),
+ m_address(address)
+ {
+
+ }
+
+private:
+ Address m_address;
+
+ AbstractMessageReceiver();
+};
+
+
+}
+#endif /* ABSTRACTMESSAGERECEIVER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp
index 529f5b72c..4adbf895e 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp
@@ -1,87 +1,87 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "Address.h"
-#include <sstream>
-#include <iostream>
-
-namespace etRuntime {
-
-Address::Address(int nodeID, int threadID, int objectID) :
- m_nodeID(nodeID),
- m_threadID(threadID),
- m_objectID(objectID) {
-};
-
-Address::Address(const Address & right) :
- m_nodeID(right.m_nodeID),
- m_threadID(right.m_threadID),
- m_objectID(right.m_objectID) {
-};
-
-Address & Address::operator = (const Address& right) {
- if (this != &right) {
- m_nodeID = right.m_nodeID;
- m_threadID = right.m_threadID;
- m_objectID = right.m_objectID;
- }
- return *this;
-}
-
-bool Address::operator< (const Address& right) const {
- if (m_nodeID == right.m_nodeID) {
- if (m_threadID == right.m_threadID) {
- return (m_objectID < right.m_objectID);
- }
- else {
- return (m_threadID < right.m_threadID);
- }
- }
- else {
- return (m_nodeID < right.m_nodeID);
- }
-}
-
-Address::~Address() {
-}
-
-std::string Address::toString() const{
- std::stringstream strm;
- strm << "Address(nodeID=" << m_nodeID
- << ",threadID=" << m_threadID << ",objectID=" << m_objectID+")";
- return strm.str();
-}
-std::string Address::toID() const{
- std::stringstream strm;
- strm << m_nodeID << "_" << m_threadID << "_" << m_objectID;
- return strm.str();
-}
-
-Address Address::createInc(int i) {
- return Address(m_nodeID, m_threadID, m_objectID+i);
-}
-
-void Address::printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses){
- std::vector<std::vector<etRuntime::Address> >::const_iterator outerIt = addresses.begin();
- std::cout << "{" ;
- for (int i=0; outerIt!= addresses.end(); ++outerIt,++i) {
- std::cout << "{" ;
- std::vector<etRuntime::Address>::const_iterator it = (*outerIt).begin();
- for (int j=0; it!=(*outerIt).end(); ++it,++j) {
- std::cout << (*it).toID() << ":" << addresses[i][j].toID() << ",";
- }
- std::cout << "}" << std::endl;
- }
- std::cout << "}" << std::endl;
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "Address.h"
+#include <sstream>
+#include <iostream>
+
+namespace etRuntime {
+
+Address::Address(int nodeID, int threadID, int objectID) :
+ m_nodeID(nodeID),
+ m_threadID(threadID),
+ m_objectID(objectID) {
+};
+
+Address::Address(const Address & right) :
+ m_nodeID(right.m_nodeID),
+ m_threadID(right.m_threadID),
+ m_objectID(right.m_objectID) {
+};
+
+Address & Address::operator = (const Address& right) {
+ if (this != &right) {
+ m_nodeID = right.m_nodeID;
+ m_threadID = right.m_threadID;
+ m_objectID = right.m_objectID;
+ }
+ return *this;
+}
+
+bool Address::operator< (const Address& right) const {
+ if (m_nodeID == right.m_nodeID) {
+ if (m_threadID == right.m_threadID) {
+ return (m_objectID < right.m_objectID);
+ }
+ else {
+ return (m_threadID < right.m_threadID);
+ }
+ }
+ else {
+ return (m_nodeID < right.m_nodeID);
+ }
+}
+
+Address::~Address() {
+}
+
+std::string Address::toString() const{
+ std::stringstream strm;
+ strm << "Address(nodeID=" << m_nodeID
+ << ",threadID=" << m_threadID << ",objectID=" << m_objectID+")";
+ return strm.str();
+}
+std::string Address::toID() const{
+ std::stringstream strm;
+ strm << m_nodeID << "_" << m_threadID << "_" << m_objectID;
+ return strm.str();
+}
+
+Address Address::createInc(int i) {
+ return Address(m_nodeID, m_threadID, m_objectID+i);
+}
+
+void Address::printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses){
+ std::vector<std::vector<etRuntime::Address> >::const_iterator outerIt = addresses.begin();
+ std::cout << "{" ;
+ for (int i=0; outerIt!= addresses.end(); ++outerIt,++i) {
+ std::cout << "{" ;
+ std::vector<etRuntime::Address>::const_iterator it = (*outerIt).begin();
+ for (int j=0; it!=(*outerIt).end(); ++it,++j) {
+ std::cout << (*it).toID() << ":" << addresses[i][j].toID() << ",";
+ }
+ std::cout << "}" << std::endl;
+ }
+ std::cout << "}" << std::endl;
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h
index d26acf52d..870e25500 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h
@@ -1,51 +1,51 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef ADDRESS_H_
-#define ADDRESS_H_
-
-#include <string>
-#include <vector>
-
-namespace etRuntime {
-
-class Address {
- public:
- explicit Address(int nodeID=0, int threadID=0, int objectID=0);
- Address(const Address & right);
- ~Address();
-
- Address & operator = (const Address& right);
- bool operator< (const Address& right) const;
-
- std::string toString() const;
- std::string toID()const;
-
- Address createInc(int i);
- bool isValid() const {
- return (m_nodeID != 0) || (m_threadID != 0) || (m_objectID != 0);
- };
-
- int m_nodeID;
- int m_threadID;
- int m_objectID;
-
- //debug helper function
- static void printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses);
-
- private:
-};
-
-} /* namespace etRuntime */
-#endif /* ADDRESS_H_ */
-
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ADDRESS_H_
+#define ADDRESS_H_
+
+#include <string>
+#include <vector>
+
+namespace etRuntime {
+
+class Address {
+ public:
+ explicit Address(int nodeID=0, int threadID=0, int objectID=0);
+ Address(const Address & right);
+ ~Address();
+
+ Address & operator = (const Address& right);
+ bool operator< (const Address& right) const;
+
+ std::string toString() const;
+ std::string toID()const;
+
+ Address createInc(int i);
+ bool isValid() const {
+ return (m_nodeID != 0) || (m_threadID != 0) || (m_objectID != 0);
+ };
+
+ int m_nodeID;
+ int m_threadID;
+ int m_objectID;
+
+ //debug helper function
+ static void printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses);
+
+ private:
+};
+
+} /* namespace etRuntime */
+#endif /* ADDRESS_H_ */
+
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp
index 640628392..40e97cf86 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp
@@ -1,23 +1,23 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "IMessageReceiver.h"
-
-namespace etRuntime {
-
-IMessageReceiver::IMessageReceiver() {
-}
-
-IMessageReceiver::~IMessageReceiver() {
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "IMessageReceiver.h"
+
+namespace etRuntime {
+
+IMessageReceiver::IMessageReceiver() {
+}
+
+IMessageReceiver::~IMessageReceiver() {
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
index cc6bdcd48..a1136ab7a 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h
@@ -1,34 +1,34 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef IMESSAGERECEIVER_H_
-#define IMESSAGERECEIVER_H_
-
-#include "common/messaging/Address.h"
-#include "common/messaging/Message.h"
-#include "common/messaging/IRTObject.h"
-
-namespace etRuntime {
-
-class IMessageReceiver{
-public:
- IMessageReceiver();
- virtual ~IMessageReceiver();
-
- virtual void receive(Message* msg) = 0;
- virtual Address getAddress() const = 0;
- virtual bool isMsgService() const { return false;};
-
-};
-
-} /* namespace etRuntime */
-#endif /* IMESSAGERECEIVER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef IMESSAGERECEIVER_H_
+#define IMESSAGERECEIVER_H_
+
+#include "common/messaging/Address.h"
+#include "common/messaging/Message.h"
+#include "common/messaging/IRTObject.h"
+
+namespace etRuntime {
+
+class IMessageReceiver{
+public:
+ IMessageReceiver();
+ virtual ~IMessageReceiver();
+
+ virtual void receive(Message* msg) = 0;
+ virtual Address getAddress() const = 0;
+ virtual bool isMsgService() const { return false;};
+
+};
+
+} /* namespace etRuntime */
+#endif /* IMESSAGERECEIVER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp
index 7f7e1259f..edf5ee57d 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp
@@ -1,20 +1,20 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "IRTObject.h"
-
-namespace etRuntime {
-
-const std::string IRTObject::NO_NAME = "<no name>";
-
-}
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "IRTObject.h"
+
+namespace etRuntime {
+
+const std::string IRTObject::NO_NAME = "<no name>";
+
+}
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h
index 8553052d6..d10dd8022 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h
@@ -1,35 +1,35 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef IRTOBJECT_H_
-#define IRTOBJECT_H_
-
-#include <string>
-
-namespace etRuntime {
-
-class IRTObject {
-
-public:
- virtual ~IRTObject() {};
-
- static const char PATH_DELIM = '/';
- static const char PATHNAME_DELIM = '_';
- static const std::string NO_NAME;
-
- virtual const std::string& getInstancePath() const = 0;
- virtual const std::string& getInstancePathName() const = 0;
-};
-
-}
-
-#endif /* IRTOBJECT_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef IRTOBJECT_H_
+#define IRTOBJECT_H_
+
+#include <string>
+
+namespace etRuntime {
+
+class IRTObject {
+
+public:
+ virtual ~IRTObject() {};
+
+ static const char PATH_DELIM = '/';
+ static const char PATHNAME_DELIM = '_';
+ static const std::string NO_NAME;
+
+ virtual const std::string& getInstancePath() const = 0;
+ virtual const std::string& getInstancePathName() const = 0;
+};
+
+}
+
+#endif /* IRTOBJECT_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp
index bef4ff1fa..0a4aa42bb 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp
@@ -1,33 +1,33 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "Message.h"
-
-#include <sstream>
-
-namespace etRuntime {
-
-
-Message::~Message() {
- m_next = 0;
-}
-
-std::string Message::toString(){
- std::stringstream strm;
- strm << "EventMessage(" << m_address.toString() << ", evt=" << m_evtId << ")";
- if (m_data) {
- strm << std::showbase << std::hex << m_data;
- }
- return strm.str();
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "Message.h"
+
+#include <sstream>
+
+namespace etRuntime {
+
+
+Message::~Message() {
+ m_next = 0;
+}
+
+std::string Message::toString(){
+ std::stringstream strm;
+ strm << "EventMessage(" << m_address.toString() << ", evt=" << m_evtId << ")";
+ if (m_data) {
+ strm << std::showbase << std::hex << m_data;
+ }
+ return strm.str();
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h
index 0b900a5b7..2307a1ead 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h
@@ -1,62 +1,62 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MESSAGE_H_
-#define MESSAGE_H_
-
-#include "common/messaging/Address.h"
-#include "etDatatypes.h"
-#include <string>
-
-namespace etRuntime {
-
-class Message {
-public:
- Message(Address addr, int evtId, void* data, size_t dataSize) :
- m_address(addr), m_evtId(evtId), m_next(0),
- m_dataSize(dataSize), m_data(data), m_logFlag(true)
- {}
- Message(Address addr, int evtId) :
- m_address(addr), m_evtId(evtId), m_next(0),
- m_dataSize(0), m_data(0), m_logFlag(true)
- {}
- virtual ~Message();
-
- void setNext(Message* msg){m_next = msg;}
- Message* getNext() const {return m_next;}
-
- void setAddress(Address address){m_address = address; }
- Address getAddress() const { return m_address; };
-
- int getEvtId() const { return m_evtId; }
- void* getData() const { return m_data; }
- bool hasDebugFlagSet() const { return m_logFlag; };
-
- std::string toString();
-
-private:
- Address m_address;
- int m_evtId;
-
- Message* m_next;
- size_t m_dataSize;
- void* m_data;
- bool m_logFlag;
-
- Message();
- Message(const Message & right);
- Message & operator = (const Message& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* MESSAGE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MESSAGE_H_
+#define MESSAGE_H_
+
+#include "common/messaging/Address.h"
+#include "etDatatypes.h"
+#include <string>
+
+namespace etRuntime {
+
+class Message {
+public:
+ Message(Address addr, int evtId, void* data, size_t dataSize) :
+ m_address(addr), m_evtId(evtId), m_next(0),
+ m_dataSize(dataSize), m_data(data), m_logFlag(true)
+ {}
+ Message(Address addr, int evtId) :
+ m_address(addr), m_evtId(evtId), m_next(0),
+ m_dataSize(0), m_data(0), m_logFlag(true)
+ {}
+ virtual ~Message();
+
+ void setNext(Message* msg){m_next = msg;}
+ Message* getNext() const {return m_next;}
+
+ void setAddress(Address address){m_address = address; }
+ Address getAddress() const { return m_address; };
+
+ int getEvtId() const { return m_evtId; }
+ void* getData() const { return m_data; }
+ bool hasDebugFlagSet() const { return m_logFlag; };
+
+ std::string toString();
+
+private:
+ Address m_address;
+ int m_evtId;
+
+ Message* m_next;
+ size_t m_dataSize;
+ void* m_data;
+ bool m_logFlag;
+
+ Message();
+ Message(const Message & right);
+ Message & operator = (const Message& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp
index 045e4dbf9..9f5e2b759 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp
@@ -1,78 +1,78 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MessageDispatcher.h"
-
-namespace etRuntime {
-
-
-MessageDispatcher::~MessageDispatcher() {
-}
-
-MessageDispatcher::MessageDispatcher(IRTObject* parent, Address addr, std::string name)
-: RTObject(parent, name) ,
- IMessageReceiver(),
- m_local_map(),
- m_thread_map(),
- m_node_map(),
- m_address(addr)
-{};
-
-void MessageDispatcher::addMessageReceiver(IMessageReceiver& receiver){
-if (! receiver.getAddress().isValid() )
- return;
-
-// TODO: does only work same thread (else)
-if (receiver.getAddress().m_nodeID != m_address.m_nodeID){
- m_node_map[receiver.getAddress().m_objectID] = &receiver;
-}
-else if(receiver.getAddress().m_threadID != m_address.m_threadID){
- m_thread_map[receiver.getAddress().m_threadID] = &receiver;
-}
-else {
- m_local_map[receiver.getAddress().m_objectID] = &receiver;
-}
-};
-
-void MessageDispatcher::receive(Message* msg) {
-// TODO: does only work same thread (else)
- //TODO: assert msg != 0
-IMessageReceiver* receiver = 0;
-std::map<int, IMessageReceiver*>::iterator it;
-if (msg->getAddress().m_nodeID != m_address.m_nodeID){
- it = m_node_map.find(msg->getAddress().m_objectID);
- if (it != m_node_map.end() ) {
- receiver = (*it).second;
- }
-}
-else if(msg->getAddress().m_threadID != m_address.m_threadID){
- it = m_thread_map.find(msg->getAddress().m_objectID);
- if (it != m_thread_map.end() ) {
- receiver = (*it).second;
- }
-}
-else {
- // Same node, same thread -> local call Dispatch Map
- it = m_local_map.find(msg->getAddress().m_objectID);
- if (it != m_local_map.end() ) {
- receiver = (*it).second;
- }
-}
-if (receiver!=0)
-{
- receiver->receive(msg);
- // TODO: error handling for not found addresses
-}
-}
-
-} /* namespace etRuntime */
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MessageDispatcher.h"
+
+namespace etRuntime {
+
+
+MessageDispatcher::~MessageDispatcher() {
+}
+
+MessageDispatcher::MessageDispatcher(IRTObject* parent, Address addr, std::string name)
+: RTObject(parent, name) ,
+ IMessageReceiver(),
+ m_local_map(),
+ m_thread_map(),
+ m_node_map(),
+ m_address(addr)
+{};
+
+void MessageDispatcher::addMessageReceiver(IMessageReceiver& receiver){
+if (! receiver.getAddress().isValid() )
+ return;
+
+// TODO: does only work same thread (else)
+if (receiver.getAddress().m_nodeID != m_address.m_nodeID){
+ m_node_map[receiver.getAddress().m_objectID] = &receiver;
+}
+else if(receiver.getAddress().m_threadID != m_address.m_threadID){
+ m_thread_map[receiver.getAddress().m_threadID] = &receiver;
+}
+else {
+ m_local_map[receiver.getAddress().m_objectID] = &receiver;
+}
+};
+
+void MessageDispatcher::receive(Message* msg) {
+// TODO: does only work same thread (else)
+ //TODO: assert msg != 0
+IMessageReceiver* receiver = 0;
+std::map<int, IMessageReceiver*>::iterator it;
+if (msg->getAddress().m_nodeID != m_address.m_nodeID){
+ it = m_node_map.find(msg->getAddress().m_objectID);
+ if (it != m_node_map.end() ) {
+ receiver = (*it).second;
+ }
+}
+else if(msg->getAddress().m_threadID != m_address.m_threadID){
+ it = m_thread_map.find(msg->getAddress().m_objectID);
+ if (it != m_thread_map.end() ) {
+ receiver = (*it).second;
+ }
+}
+else {
+ // Same node, same thread -> local call Dispatch Map
+ it = m_local_map.find(msg->getAddress().m_objectID);
+ if (it != m_local_map.end() ) {
+ receiver = (*it).second;
+ }
+}
+if (receiver!=0)
+{
+ receiver->receive(msg);
+ // TODO: error handling for not found addresses
+}
+}
+
+} /* namespace etRuntime */
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h
index c49628a09..57b50e5f6 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h
@@ -1,48 +1,48 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MESSAGEDISPATCHER_H_
-#define MESSAGEDISPATCHER_H_
-
-#include "common/messaging/IMessageReceiver.h"
-#include "common/messaging/IRTObject.h"
-#include "common/messaging/RTObject.h"
-#include <map>
-#include <string>
-
-namespace etRuntime {
-
-class MessageDispatcher : public RTObject, public IMessageReceiver {
- public:
- MessageDispatcher(IRTObject* parent, Address addr, std::string name);
- virtual ~MessageDispatcher();
-
- void addMessageReceiver(IMessageReceiver& receiver);
- void receive(Message* msg);
-
- Address getAddress() const { return m_address; };
-
- private:
- std::map<int, IMessageReceiver*> m_local_map;
- std::map<int, IMessageReceiver*> m_thread_map;
- std::map<int, IMessageReceiver*> m_node_map;
- Address m_address;
-
- MessageDispatcher();
- MessageDispatcher(const MessageDispatcher& right);
- MessageDispatcher& operator=(const MessageDispatcher& right);
-};
-
-} /* namespace etRuntime */
-#endif /* MESSAGEDISPATCHER_H_ */
-
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MESSAGEDISPATCHER_H_
+#define MESSAGEDISPATCHER_H_
+
+#include "common/messaging/IMessageReceiver.h"
+#include "common/messaging/IRTObject.h"
+#include "common/messaging/RTObject.h"
+#include <map>
+#include <string>
+
+namespace etRuntime {
+
+class MessageDispatcher : public RTObject, public IMessageReceiver {
+ public:
+ MessageDispatcher(IRTObject* parent, Address addr, std::string name);
+ virtual ~MessageDispatcher();
+
+ void addMessageReceiver(IMessageReceiver& receiver);
+ void receive(Message* msg);
+
+ Address getAddress() const { return m_address; };
+
+ private:
+ std::map<int, IMessageReceiver*> m_local_map;
+ std::map<int, IMessageReceiver*> m_thread_map;
+ std::map<int, IMessageReceiver*> m_node_map;
+ Address m_address;
+
+ MessageDispatcher();
+ MessageDispatcher(const MessageDispatcher& right);
+ MessageDispatcher& operator=(const MessageDispatcher& right);
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGEDISPATCHER_H_ */
+
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp
index fcf619c9c..ab2f54a8b 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp
@@ -1,64 +1,64 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MessageSeQueue.h"
-
-namespace etRuntime {
-
-
-MessageSeQueue::~MessageSeQueue() {
- m_first = 0;
- m_last = 0;
-}
-
-MessageSeQueue::MessageSeQueue(IRTObject* parent, std::string name)
- : RTObject(parent, name),
- m_first(0),
- m_last(0),
- m_highWaterMark(0),
- m_size(0)
-{
-}
-
-void MessageSeQueue::push(Message* msg) {
- // TODO: optimize queue for concurrent push / pop
- if (m_first == 0) {
- m_first = m_last = msg;
- } else {
- m_last->setNext(msg);
- m_last = msg;
- }
- if (++m_size > m_highWaterMark)
- m_highWaterMark++;
-
-}
-
-Message* MessageSeQueue::pop() {
- // TODO: optimize queue for concurrent push / pop
- Message* pop_msg = m_first;
- if (m_first == 0) {
- return m_first;
- }
- if (m_first->getNext() == 0) {
- m_first = m_last = 0;
- } else {
- m_first = m_first->getNext();
- }
-
- pop_msg->setNext(0);
- m_size--;
-
- return pop_msg;
-}
-
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MessageSeQueue.h"
+
+namespace etRuntime {
+
+
+MessageSeQueue::~MessageSeQueue() {
+ m_first = 0;
+ m_last = 0;
+}
+
+MessageSeQueue::MessageSeQueue(IRTObject* parent, std::string name)
+ : RTObject(parent, name),
+ m_first(0),
+ m_last(0),
+ m_highWaterMark(0),
+ m_size(0)
+{
+}
+
+void MessageSeQueue::push(Message* msg) {
+ // TODO: optimize queue for concurrent push / pop
+ if (m_first == 0) {
+ m_first = m_last = msg;
+ } else {
+ m_last->setNext(msg);
+ m_last = msg;
+ }
+ if (++m_size > m_highWaterMark)
+ m_highWaterMark++;
+
+}
+
+Message* MessageSeQueue::pop() {
+ // TODO: optimize queue for concurrent push / pop
+ Message* pop_msg = m_first;
+ if (m_first == 0) {
+ return m_first;
+ }
+ if (m_first->getNext() == 0) {
+ m_first = m_last = 0;
+ } else {
+ m_first = m_first->getNext();
+ }
+
+ pop_msg->setNext(0);
+ m_size--;
+
+ return pop_msg;
+}
+
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h
index 3e63a6b28..1468cea16 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h
@@ -1,49 +1,49 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MESSAGESEQUEUE_H_
-#define MESSAGESEQUEUE_H_
-
-#include "common/messaging/RTObject.h"
-#include <string>
-#include "common/messaging/Message.h"
-
-namespace etRuntime {
-
-class MessageSeQueue: public RTObject {
- public:
- MessageSeQueue(IRTObject* parent, std::string name);
- virtual ~MessageSeQueue();
-
- void push(Message* msg);
- Message* pop();
-
- long getSize() const {return m_size; }
- Message* getFirst() const {return m_first; }
- Message* getLast() const { return m_last; }
- bool isNotEmpty() const { return m_last != 0; }
- long getHightWaterMark() const { return m_highWaterMark; }
-
- private:
- Message* m_first;
- Message* m_last;
- long m_highWaterMark;
- long m_size;
-
- MessageSeQueue();
- MessageSeQueue(const MessageSeQueue& right);
- MessageSeQueue& operator=(const MessageSeQueue& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* MESSAGESEQUEUE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MESSAGESEQUEUE_H_
+#define MESSAGESEQUEUE_H_
+
+#include "common/messaging/RTObject.h"
+#include <string>
+#include "common/messaging/Message.h"
+
+namespace etRuntime {
+
+class MessageSeQueue: public RTObject {
+ public:
+ MessageSeQueue(IRTObject* parent, std::string name);
+ virtual ~MessageSeQueue();
+
+ void push(Message* msg);
+ Message* pop();
+
+ long getSize() const {return m_size; }
+ Message* getFirst() const {return m_first; }
+ Message* getLast() const { return m_last; }
+ bool isNotEmpty() const { return m_last != 0; }
+ long getHightWaterMark() const { return m_highWaterMark; }
+
+ private:
+ Message* m_first;
+ Message* m_last;
+ long m_highWaterMark;
+ long m_size;
+
+ MessageSeQueue();
+ MessageSeQueue(const MessageSeQueue& right);
+ MessageSeQueue& operator=(const MessageSeQueue& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGESEQUEUE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp
index cd516c7bf..21153ce56 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp
@@ -1,157 +1,157 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MessageService.h"
-#include <iostream>
-#include <stdlib.h>
-#include <unistd.h>
-
-namespace etRuntime {
-
-extern "C" {
- void* threadStarter(void* arg) {
- MessageService* thisPtr = static_cast<MessageService*>(arg);
- std::cout << "Thread " << thisPtr->getName() << " is started." << std::endl;
- thisPtr->run();
- return arg;
- // pthread_exit(NULL);
- }
-}
-
-MessageService::MessageService(IRTObject* parent, Address addr, std::string name, int priority)
- : IMessageReceiver(),
- RTObject(parent, name),
- m_running(false),
- m_thread(),
- m_mutex(),
- m_mutexAttr(),
- m_conditionVar(),
- m_threadAttr(),
- m_messageQueue(this, "Queue"),
- m_messageDispatcher( this,
- Address(addr.m_nodeID, addr.m_threadID, addr.m_objectID + 1),
- "Dispatcher"),
- m_address(addr),
- m_lastMessageTimestamp(0),
- m_asyncActors()
-{
- pthread_mutexattr_init(&m_mutexAttr);
- pthread_mutexattr_settype(&m_mutexAttr, PTHREAD_MUTEX_RECURSIVE);
- pthread_mutex_init(&m_mutex, &m_mutexAttr);
- pthread_cond_init (&m_conditionVar, NULL);
- pthread_attr_init(&m_threadAttr);
- pthread_attr_setdetachstate(&m_threadAttr, PTHREAD_CREATE_JOINABLE);
-
- // check and set priority
-// assert priority >= Thread.MIN_PRIORITY : ("priority smaller than Thread.MIN_PRIORITY (1)");
-// assert priority <= Thread.MAX_PRIORITY : ("priority bigger than Thread.MAX_PRIORITY (10)");
-// this.setPriority(priority);
-
-}
-
-MessageService::~MessageService() {
- pthread_attr_destroy(&m_threadAttr);
- pthread_mutex_destroy(&m_mutex);
- pthread_cond_destroy(&m_conditionVar);
- pthread_exit(NULL);
-
-}
-
-void MessageService::start(bool singlethreaded) {
- if (singlethreaded) {
- std::cout << "starting message service " << getName() << " singlethreaded" << std::endl;
- }
- else {
- std::cout << "starting message service " << getName() << " on own thread" << std::endl;
- int rc = pthread_create(&m_thread, &m_threadAttr, threadStarter, static_cast<void *>(this));
- if (rc){
- std::cout << "ERROR; return code from pthread_create() is " << rc << std::endl;
- exit(-1);
- }
- }
-}
-
-void MessageService::join() {
- void *status;
- int rc = pthread_join(m_thread, &status);
- if (rc){
- std::cout << "ERROR; return code from pthread_join() is " << rc << std::endl;
- exit(-1);
- }
-}
-void MessageService::run() {
- m_running = true;
- while (m_running) {
- pollOneMessage();
- usleep(10000);
- }
- std::cout << "ending message service " << getName() << " on own thread" << std::endl;
-}
-
-void MessageService::runOnce() {
- pollAsyncActors();
- while (m_messageQueue.isNotEmpty()){
- Message* msg = m_messageQueue.pop(); // get next Message from Queue
- if (msg != 0) {
- m_messageDispatcher.receive(msg);
- }
- }
-}
-
-void MessageService::receive(Message* msg) {
- pthread_mutex_lock(&m_mutex);
- if (msg != 0) {
- m_messageQueue.push(msg);
- pthread_cond_signal(&m_conditionVar); // wake up thread to compute message
- }
- pthread_mutex_unlock(&m_mutex);
-}
-
-
-// TODO: synchronized
-void MessageService::terminate() {
- pthread_mutex_lock(&m_mutex);
- if (m_running) {
- m_running = false;
- pthread_cond_signal(&m_conditionVar); // wake up thread to terminate
- }
- pthread_mutex_unlock(&m_mutex);
-}
-
-void MessageService::pollOneMessage() {
- pthread_mutex_lock(&m_mutex);
- Message* msg = m_messageQueue.pop(); // get next Message from Queue
- if (msg == 0) {
- // no message in queue -> wait till Thread is notified
- pthread_cond_wait(&m_conditionVar, &m_mutex);
- } else {
- //TODO: set timestamp
- // m_lastMessageTimestamp = System.currentTimeMillis();
- m_messageDispatcher.receive(msg);
- }
- pthread_mutex_unlock(&m_mutex);
-
-}
-
-void MessageService::addAsyncActor(IEventReceiver& evtReceiver) {
- m_asyncActors.push_back(&evtReceiver);
-}
-
-void MessageService::pollAsyncActors() {
- std::vector<IEventReceiver*>::iterator it = m_asyncActors.begin();
- for ( ; it != m_asyncActors.end(); ++it) {
- // polling event
- (*it)->receiveEvent(0,0,0);
- }
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MessageService.h"
+#include <iostream>
+#include <stdlib.h>
+#include <unistd.h>
+
+namespace etRuntime {
+
+extern "C" {
+ void* threadStarter(void* arg) {
+ MessageService* thisPtr = static_cast<MessageService*>(arg);
+ std::cout << "Thread " << thisPtr->getName() << " is started." << std::endl;
+ thisPtr->run();
+ return arg;
+ // pthread_exit(NULL);
+ }
+}
+
+MessageService::MessageService(IRTObject* parent, Address addr, std::string name, int priority)
+ : IMessageReceiver(),
+ RTObject(parent, name),
+ m_running(false),
+ m_thread(),
+ m_mutex(),
+ m_mutexAttr(),
+ m_conditionVar(),
+ m_threadAttr(),
+ m_messageQueue(this, "Queue"),
+ m_messageDispatcher( this,
+ Address(addr.m_nodeID, addr.m_threadID, addr.m_objectID + 1),
+ "Dispatcher"),
+ m_address(addr),
+ m_lastMessageTimestamp(0),
+ m_asyncActors()
+{
+ pthread_mutexattr_init(&m_mutexAttr);
+ pthread_mutexattr_settype(&m_mutexAttr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&m_mutex, &m_mutexAttr);
+ pthread_cond_init (&m_conditionVar, NULL);
+ pthread_attr_init(&m_threadAttr);
+ pthread_attr_setdetachstate(&m_threadAttr, PTHREAD_CREATE_JOINABLE);
+
+ // check and set priority
+// assert priority >= Thread.MIN_PRIORITY : ("priority smaller than Thread.MIN_PRIORITY (1)");
+// assert priority <= Thread.MAX_PRIORITY : ("priority bigger than Thread.MAX_PRIORITY (10)");
+// this.setPriority(priority);
+
+}
+
+MessageService::~MessageService() {
+ pthread_attr_destroy(&m_threadAttr);
+ pthread_mutex_destroy(&m_mutex);
+ pthread_cond_destroy(&m_conditionVar);
+ pthread_exit(NULL);
+
+}
+
+void MessageService::start(bool singlethreaded) {
+ if (singlethreaded) {
+ std::cout << "starting message service " << getName() << " singlethreaded" << std::endl;
+ }
+ else {
+ std::cout << "starting message service " << getName() << " on own thread" << std::endl;
+ int rc = pthread_create(&m_thread, &m_threadAttr, threadStarter, static_cast<void *>(this));
+ if (rc){
+ std::cout << "ERROR; return code from pthread_create() is " << rc << std::endl;
+ exit(-1);
+ }
+ }
+}
+
+void MessageService::join() {
+ void *status;
+ int rc = pthread_join(m_thread, &status);
+ if (rc){
+ std::cout << "ERROR; return code from pthread_join() is " << rc << std::endl;
+ exit(-1);
+ }
+}
+void MessageService::run() {
+ m_running = true;
+ while (m_running) {
+ pollOneMessage();
+ usleep(10000);
+ }
+ std::cout << "ending message service " << getName() << " on own thread" << std::endl;
+}
+
+void MessageService::runOnce() {
+ pollAsyncActors();
+ while (m_messageQueue.isNotEmpty()){
+ Message* msg = m_messageQueue.pop(); // get next Message from Queue
+ if (msg != 0) {
+ m_messageDispatcher.receive(msg);
+ }
+ }
+}
+
+void MessageService::receive(Message* msg) {
+ pthread_mutex_lock(&m_mutex);
+ if (msg != 0) {
+ m_messageQueue.push(msg);
+ pthread_cond_signal(&m_conditionVar); // wake up thread to compute message
+ }
+ pthread_mutex_unlock(&m_mutex);
+}
+
+
+// TODO: synchronized
+void MessageService::terminate() {
+ pthread_mutex_lock(&m_mutex);
+ if (m_running) {
+ m_running = false;
+ pthread_cond_signal(&m_conditionVar); // wake up thread to terminate
+ }
+ pthread_mutex_unlock(&m_mutex);
+}
+
+void MessageService::pollOneMessage() {
+ pthread_mutex_lock(&m_mutex);
+ Message* msg = m_messageQueue.pop(); // get next Message from Queue
+ if (msg == 0) {
+ // no message in queue -> wait till Thread is notified
+ pthread_cond_wait(&m_conditionVar, &m_mutex);
+ } else {
+ //TODO: set timestamp
+ // m_lastMessageTimestamp = System.currentTimeMillis();
+ m_messageDispatcher.receive(msg);
+ }
+ pthread_mutex_unlock(&m_mutex);
+
+}
+
+void MessageService::addAsyncActor(IEventReceiver& evtReceiver) {
+ m_asyncActors.push_back(&evtReceiver);
+}
+
+void MessageService::pollAsyncActors() {
+ std::vector<IEventReceiver*>::iterator it = m_asyncActors.begin();
+ for ( ; it != m_asyncActors.end(); ++it) {
+ // polling event
+ (*it)->receiveEvent(0,0,0);
+ }
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h
index e34b17ab6..3a9a91f61 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h
@@ -1,83 +1,83 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MESSAGESERVICE_H_
-#define MESSAGESERVICE_H_
-
-#include <string>
-#include <vector>
-#include <pthread.h>
-#include "common/messaging/MessageDispatcher.h"
-#include "common/messaging/Address.h"
-#include "common/modelbase/IEventReceiver.h"
-#include "MessageSeQueue.h"
-
-namespace etRuntime {
-
-//TODO: abstraction from posix threads missing
-
-class MessageService: public IMessageReceiver, public RTObject {
-public:
- MessageService(IRTObject* parent, Address addr, std::string name, int priority = 0);
- virtual ~MessageService();
-
- Address getAddress() const { return m_address; } ;
-
- void start(bool singlethreaded);
- void run();
- // for single threaded configuration only
- void runOnce();
-
- void join();
- void terminate();
- void receive(Message* msg);
-
- virtual MessageDispatcher& getMessageDispatcher() { return m_messageDispatcher; }
- virtual bool isMsgService() const { return true;};
-
- void addAsyncActor(IEventReceiver& evtReceiver);
- void pollAsyncActors();
-
-
- // protected methods for sole use by test cases
-protected:
- MessageSeQueue& getMessageQueue() { return m_messageQueue; }
- long getLastMessageTimestamp() const { return m_lastMessageTimestamp; }
-
-private:
- //TODO: synchronized
- void pollOneMessage();
-
- bool m_running;
- pthread_t m_thread;
- pthread_mutex_t m_mutex;
- pthread_mutexattr_t m_mutexAttr;
- pthread_cond_t m_conditionVar;
- pthread_attr_t m_threadAttr;
-
- // TODO: add internal message queue for less locks (faster thread internal
- // messaging)
- MessageSeQueue m_messageQueue;
- MessageDispatcher m_messageDispatcher;
- Address m_address;
- long m_lastMessageTimestamp;
-
- std::vector<IEventReceiver*> m_asyncActors;
-
- MessageService();
- MessageService(const MessageService& right);
- MessageService& operator=(const MessageService& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* MESSAGESERVICE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MESSAGESERVICE_H_
+#define MESSAGESERVICE_H_
+
+#include <string>
+#include <vector>
+#include <pthread.h>
+#include "common/messaging/MessageDispatcher.h"
+#include "common/messaging/Address.h"
+#include "common/modelbase/IEventReceiver.h"
+#include "MessageSeQueue.h"
+
+namespace etRuntime {
+
+//TODO: abstraction from posix threads missing
+
+class MessageService: public IMessageReceiver, public RTObject {
+public:
+ MessageService(IRTObject* parent, Address addr, std::string name, int priority = 0);
+ virtual ~MessageService();
+
+ Address getAddress() const { return m_address; } ;
+
+ void start(bool singlethreaded);
+ void run();
+ // for single threaded configuration only
+ void runOnce();
+
+ void join();
+ void terminate();
+ void receive(Message* msg);
+
+ virtual MessageDispatcher& getMessageDispatcher() { return m_messageDispatcher; }
+ virtual bool isMsgService() const { return true;};
+
+ void addAsyncActor(IEventReceiver& evtReceiver);
+ void pollAsyncActors();
+
+
+ // protected methods for sole use by test cases
+protected:
+ MessageSeQueue& getMessageQueue() { return m_messageQueue; }
+ long getLastMessageTimestamp() const { return m_lastMessageTimestamp; }
+
+private:
+ //TODO: synchronized
+ void pollOneMessage();
+
+ bool m_running;
+ pthread_t m_thread;
+ pthread_mutex_t m_mutex;
+ pthread_mutexattr_t m_mutexAttr;
+ pthread_cond_t m_conditionVar;
+ pthread_attr_t m_threadAttr;
+
+ // TODO: add internal message queue for less locks (faster thread internal
+ // messaging)
+ MessageSeQueue m_messageQueue;
+ MessageDispatcher m_messageDispatcher;
+ Address m_address;
+ long m_lastMessageTimestamp;
+
+ std::vector<IEventReceiver*> m_asyncActors;
+
+ MessageService();
+ MessageService(const MessageService& right);
+ MessageService& operator=(const MessageService& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGESERVICE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp
index fbf903313..6a71f9a81 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp
@@ -1,119 +1,119 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "MessageServiceController.h"
-
-namespace etRuntime {
-
-
-MessageServiceController::~MessageServiceController() {
- // TODO Auto-generated destructor stub
-}
-
-MessageServiceController::MessageServiceController(/*IRTObject parent*/)
- : m_messageServiceList(),
- m_running(false) {
- // TODO: Who is parent of MessageServices and Controller?
- // this.parent = parent;
-}
-
-void MessageServiceController::addMsgSvc(MessageService& msgSvc) {
- // TODO TS: Who is parent of MessageServices ?
- //TODO assert
- //assert(msgSvc.getAddress().m_threadID == m_messageServiceList.size());
- m_messageServiceList.push_back(&msgSvc);
-}
-
-MessageService* MessageServiceController::getMsgSvc(int threadID) {
- return m_messageServiceList.at(threadID);
-}
-
-void MessageServiceController::connectAll() {
- for (size_t i = 0; i < m_messageServiceList.size(); i++) {
- MessageDispatcher& dispatcher = getMsgSvc(i)->getMessageDispatcher();
- for (size_t j = 0; j < m_messageServiceList.size(); j++) {
- if (i != j) {
- dispatcher.addMessageReceiver(*RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(j));
- }
- }
- }
-}
-
-void MessageServiceController::start(bool singlethreaded) {
- // start all message services
- for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
- it != m_messageServiceList.end(); ++it) {
- (*it)->start(singlethreaded);
- // TODO TS: start in order of priorities
- }
- m_running = true;
-}
-
-void MessageServiceController::stop(bool singlethreaded) {
- //dumpThreads("org.eclipse.etrice.runtime.java.messaging.MessageServiceController.stop()");
- if (! singlethreaded) {
- terminate();
- waitTerminate();
- }
-}
-
-void MessageServiceController::waitTerminate() {
- for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
- it != m_messageServiceList.end(); ++it) {
- (*it)->join();
- }
-}
-
-void MessageServiceController::dumpThreads(std::string msg) {
- std::cout << "<<< begin dump threads <<<" << std::endl;
- std::cout << "=== " << msg << std::endl;
- //TODO dump stack traces
-// Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces();
-// for (Thread thread : traces.keySet()) {
-// std::cout << "thread " << thread.getName() << std::endl;
-// StackTraceElement[] elements = traces.get(thread);
-// int n = 2;
-// if (elements.length < n)
-// n = elements.length;
-// for (int i = 0; i < n; i++) {
-// std::cout << " " << elements[i].toString() << std::endl;
-// }
-// }
- std::cout <<(">>> end dump threads >>>");
-}
-
-void MessageServiceController::terminate() {
- if (!m_running) {
- return;
- }
- m_running = false;
-
- // terminate all message services
- for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
- it != m_messageServiceList.end(); ++it) {
- (*it)->terminate();
- //TODO TS: stop in order of priorities
- }
-}
-
-void MessageServiceController::runOnce() {
- if (!m_running) {
- return;
- }
-
- for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
- it != m_messageServiceList.end(); ++it) {
- (*it)->runOnce();
- }
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "MessageServiceController.h"
+
+namespace etRuntime {
+
+
+MessageServiceController::~MessageServiceController() {
+ // TODO Auto-generated destructor stub
+}
+
+MessageServiceController::MessageServiceController(/*IRTObject parent*/)
+ : m_messageServiceList(),
+ m_running(false) {
+ // TODO: Who is parent of MessageServices and Controller?
+ // this.parent = parent;
+}
+
+void MessageServiceController::addMsgSvc(MessageService& msgSvc) {
+ // TODO TS: Who is parent of MessageServices ?
+ //TODO assert
+ //assert(msgSvc.getAddress().m_threadID == m_messageServiceList.size());
+ m_messageServiceList.push_back(&msgSvc);
+}
+
+MessageService* MessageServiceController::getMsgSvc(int threadID) {
+ return m_messageServiceList.at(threadID);
+}
+
+void MessageServiceController::connectAll() {
+ for (size_t i = 0; i < m_messageServiceList.size(); i++) {
+ MessageDispatcher& dispatcher = getMsgSvc(i)->getMessageDispatcher();
+ for (size_t j = 0; j < m_messageServiceList.size(); j++) {
+ if (i != j) {
+ dispatcher.addMessageReceiver(*RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(j));
+ }
+ }
+ }
+}
+
+void MessageServiceController::start(bool singlethreaded) {
+ // start all message services
+ for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
+ it != m_messageServiceList.end(); ++it) {
+ (*it)->start(singlethreaded);
+ // TODO TS: start in order of priorities
+ }
+ m_running = true;
+}
+
+void MessageServiceController::stop(bool singlethreaded) {
+ //dumpThreads("org.eclipse.etrice.runtime.java.messaging.MessageServiceController.stop()");
+ if (! singlethreaded) {
+ terminate();
+ waitTerminate();
+ }
+}
+
+void MessageServiceController::waitTerminate() {
+ for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
+ it != m_messageServiceList.end(); ++it) {
+ (*it)->join();
+ }
+}
+
+void MessageServiceController::dumpThreads(std::string msg) {
+ std::cout << "<<< begin dump threads <<<" << std::endl;
+ std::cout << "=== " << msg << std::endl;
+ //TODO dump stack traces
+// Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces();
+// for (Thread thread : traces.keySet()) {
+// std::cout << "thread " << thread.getName() << std::endl;
+// StackTraceElement[] elements = traces.get(thread);
+// int n = 2;
+// if (elements.length < n)
+// n = elements.length;
+// for (int i = 0; i < n; i++) {
+// std::cout << " " << elements[i].toString() << std::endl;
+// }
+// }
+ std::cout <<(">>> end dump threads >>>");
+}
+
+void MessageServiceController::terminate() {
+ if (!m_running) {
+ return;
+ }
+ m_running = false;
+
+ // terminate all message services
+ for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
+ it != m_messageServiceList.end(); ++it) {
+ (*it)->terminate();
+ //TODO TS: stop in order of priorities
+ }
+}
+
+void MessageServiceController::runOnce() {
+ if (!m_running) {
+ return;
+ }
+
+ for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
+ it != m_messageServiceList.end(); ++it) {
+ (*it)->runOnce();
+ }
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h
index d975233a5..5f79bbea0 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h
@@ -1,70 +1,70 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef MESSAGESERVICECONTROLLER_H_
-#define MESSAGESERVICECONTROLLER_H_
-
-#include "common/messaging/MessageService.h"
-#include "common/messaging/RTServices.h"
-#include <vector>
-#include <string>
-#include <iostream>
-#include <algorithm>
-
-namespace etRuntime {
-
-class MessageServiceController {
-public:
- MessageServiceController(/*IRTObject parent*/);
- virtual ~MessageServiceController();
-
- void addMsgSvc(MessageService& msgSvc);
- //raises an exception if the service does not exist for this threadID
- MessageService* getMsgSvc(int threadID);
-
- void addAsyncActor(IEventReceiver& evtReceiver);
- void pollAsyncActors();
-
- //the connectAll method connects all messageServices
- //it is included for test purposes
- //currently it is not called
- void connectAll();
- void start(bool singlethreaded);
- void stop(bool singlethreaded);
-
- //TODO: this is only for single threaded configurations
- void runOnce();
-
- /**
- * waitTerminate waits blocking for all MessageServices to terminate
- * ! not threadsafe !
- */
- void waitTerminate();
-
-protected:
- void dumpThreads(std::string msg);
-
-private:
- void terminate();
-
- MessageServiceController(const MessageServiceController& right);
- MessageServiceController& operator=(const MessageServiceController& right);
-
-
- std::vector<MessageService*> m_messageServiceList;
- // IRTObject parent = null;
- bool m_running;
-
-};
-
-} /* namespace etRuntime */
-#endif /* MESSAGESERVICECONTROLLER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef MESSAGESERVICECONTROLLER_H_
+#define MESSAGESERVICECONTROLLER_H_
+
+#include "common/messaging/MessageService.h"
+#include "common/messaging/RTServices.h"
+#include <vector>
+#include <string>
+#include <iostream>
+#include <algorithm>
+
+namespace etRuntime {
+
+class MessageServiceController {
+public:
+ MessageServiceController(/*IRTObject parent*/);
+ virtual ~MessageServiceController();
+
+ void addMsgSvc(MessageService& msgSvc);
+ //raises an exception if the service does not exist for this threadID
+ MessageService* getMsgSvc(int threadID);
+
+ void addAsyncActor(IEventReceiver& evtReceiver);
+ void pollAsyncActors();
+
+ //the connectAll method connects all messageServices
+ //it is included for test purposes
+ //currently it is not called
+ void connectAll();
+ void start(bool singlethreaded);
+ void stop(bool singlethreaded);
+
+ //TODO: this is only for single threaded configurations
+ void runOnce();
+
+ /**
+ * waitTerminate waits blocking for all MessageServices to terminate
+ * ! not threadsafe !
+ */
+ void waitTerminate();
+
+protected:
+ void dumpThreads(std::string msg);
+
+private:
+ void terminate();
+
+ MessageServiceController(const MessageServiceController& right);
+ MessageServiceController& operator=(const MessageServiceController& right);
+
+
+ std::vector<MessageService*> m_messageServiceList;
+ // IRTObject parent = null;
+ bool m_running;
+
+};
+
+} /* namespace etRuntime */
+#endif /* MESSAGESERVICECONTROLLER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp
index 2ccccb590..68ba311fa 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp
@@ -1,73 +1,73 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "RTObject.h"
-
-namespace etRuntime {
-
-RTObject::RTObject() :
- IRTObject(),
- m_parent(0),
- m_name(NO_NAME) ,
- m_instancePath(),
- m_instancePathName()
-{
- setPathNames();
-}
-
-RTObject::RTObject(IRTObject* parent, std::string name) :
- IRTObject(),
- m_parent(parent),
- m_name(name),
- m_instancePath(),
- m_instancePathName()
-{
- setPathNames();
-}
-
-RTObject::RTObject(const RTObject & right) :
- m_parent(right.m_parent),
- m_name(right.m_name),
- m_instancePath(right.m_instancePath),
- m_instancePathName(right.m_instancePathName)
-{
-}
-
-RTObject & RTObject::operator = (RTObject right) {
- std::swap(right, *this);
- return *this;
-}
-
-RTObject::~RTObject() {
- m_parent = 0;
-}
-
-void RTObject::setPathNames() {
- if (m_parent != 0) {
- m_instancePath = m_parent->getInstancePath() + PATH_DELIM + m_name;
- m_instancePathName = m_parent->getInstancePathName() + PATHNAME_DELIM + m_name;
- }
- else {
- m_instancePath = PATH_DELIM + m_name;
- m_instancePathName = PATHNAME_DELIM + m_name;
- }
-}
-
-const std::string& RTObject::getInstancePath() const{
- return m_instancePath;
-}
-
-const std::string& RTObject::getInstancePathName() const{
- return m_instancePathName;
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "RTObject.h"
+
+namespace etRuntime {
+
+RTObject::RTObject() :
+ IRTObject(),
+ m_parent(0),
+ m_name(NO_NAME) ,
+ m_instancePath(),
+ m_instancePathName()
+{
+ setPathNames();
+}
+
+RTObject::RTObject(IRTObject* parent, std::string name) :
+ IRTObject(),
+ m_parent(parent),
+ m_name(name),
+ m_instancePath(),
+ m_instancePathName()
+{
+ setPathNames();
+}
+
+RTObject::RTObject(const RTObject & right) :
+ m_parent(right.m_parent),
+ m_name(right.m_name),
+ m_instancePath(right.m_instancePath),
+ m_instancePathName(right.m_instancePathName)
+{
+}
+
+RTObject & RTObject::operator = (RTObject right) {
+ std::swap(right, *this);
+ return *this;
+}
+
+RTObject::~RTObject() {
+ m_parent = 0;
+}
+
+void RTObject::setPathNames() {
+ if (m_parent != 0) {
+ m_instancePath = m_parent->getInstancePath() + PATH_DELIM + m_name;
+ m_instancePathName = m_parent->getInstancePathName() + PATHNAME_DELIM + m_name;
+ }
+ else {
+ m_instancePath = PATH_DELIM + m_name;
+ m_instancePathName = PATHNAME_DELIM + m_name;
+ }
+}
+
+const std::string& RTObject::getInstancePath() const{
+ return m_instancePath;
+}
+
+const std::string& RTObject::getInstancePathName() const{
+ return m_instancePathName;
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h
index 60266b14f..e70059035 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h
@@ -1,49 +1,49 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef RTOBJECT_H_
-#define RTOBJECT_H_
-
-#include <string>
-#include "common/messaging/IRTObject.h"
-
-namespace etRuntime {
-
-class RTObject : public virtual IRTObject{
-public:
- RTObject();
- RTObject(IRTObject* parent, std::string name);
- RTObject(const RTObject & right);
- RTObject & operator = (RTObject right);
-
- virtual ~RTObject();
-
- IRTObject* getParent() const { return m_parent; };
- const std::string& getName() const { return m_name; };
-
- virtual const std::string& getInstancePath() const;
- virtual const std::string& getInstancePathName() const;
-
-private:
- void setPathNames();
-
- IRTObject* m_parent;
- std::string m_name;
- // for speed optimization the instance paths are created at instantiation
- // and used as const ref parameters in the logging methods to avoid copying
- std::string m_instancePath;
- std::string m_instancePathName;
-
-};
-
-} /* namespace etRuntime */
-#endif /* RTOBJECT_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef RTOBJECT_H_
+#define RTOBJECT_H_
+
+#include <string>
+#include "common/messaging/IRTObject.h"
+
+namespace etRuntime {
+
+class RTObject : public virtual IRTObject{
+public:
+ RTObject();
+ RTObject(IRTObject* parent, std::string name);
+ RTObject(const RTObject & right);
+ RTObject & operator = (RTObject right);
+
+ virtual ~RTObject();
+
+ IRTObject* getParent() const { return m_parent; };
+ const std::string& getName() const { return m_name; };
+
+ virtual const std::string& getInstancePath() const;
+ virtual const std::string& getInstancePathName() const;
+
+private:
+ void setPathNames();
+
+ IRTObject* m_parent;
+ std::string m_name;
+ // for speed optimization the instance paths are created at instantiation
+ // and used as const ref parameters in the logging methods to avoid copying
+ std::string m_instancePath;
+ std::string m_instancePathName;
+
+};
+
+} /* namespace etRuntime */
+#endif /* RTOBJECT_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp
index 0d7ad9865..6aa7b5656 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp
@@ -1,44 +1,44 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "RTServices.h"
-
-namespace etRuntime {
-
-RTServices* RTServices::s_instance = 0;
-
-RTServices::RTServices()
- : m_subSystem(0),
- m_messageServiceController( new MessageServiceController())
-{
-}
-
-RTServices::~RTServices() {
- // TODO Auto-generated destructor stub
-}
-
-void RTServices::destroy() {
- // TODO: also clean up all sub elements
- m_subSystem = 0;
- m_messageServiceController = 0;
- //TODO is delete necessary here??
- //delete s_instance;
- s_instance = 0;
-}
-
-MessageServiceController& RTServices::getMsgSvcCtrl() {
- //TODO
- //assert(m_messageServiceController != 0);
- return *m_messageServiceController;
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "RTServices.h"
+
+namespace etRuntime {
+
+RTServices* RTServices::s_instance = 0;
+
+RTServices::RTServices()
+ : m_subSystem(0),
+ m_messageServiceController( new MessageServiceController())
+{
+}
+
+RTServices::~RTServices() {
+ // TODO Auto-generated destructor stub
+}
+
+void RTServices::destroy() {
+ // TODO: also clean up all sub elements
+ m_subSystem = 0;
+ m_messageServiceController = 0;
+ //TODO is delete necessary here??
+ //delete s_instance;
+ s_instance = 0;
+}
+
+MessageServiceController& RTServices::getMsgSvcCtrl() {
+ //TODO
+ //assert(m_messageServiceController != 0);
+ return *m_messageServiceController;
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h
index 8bebd49c4..fe9c36395 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h
@@ -1,52 +1,52 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef RTSERVICES_H_
-#define RTSERVICES_H_
-#include "common/messaging/MessageServiceController.h"
-
-namespace etRuntime {
-
-class SubSystemClassBase;
-class MessageServiceController;
-
-
-class RTServices {
-public:
- virtual ~RTServices();
-
- static RTServices& getInstance() {
- if (s_instance == 0) {
- s_instance = new RTServices();
- }
- return *s_instance;
- }
-
- void destroy();
- MessageServiceController& getMsgSvcCtrl();
- SubSystemClassBase* getSubSystem() { return m_subSystem; };
- void setSubSystem(SubSystemClassBase* subSystem) { m_subSystem = subSystem; };
-
-private:
- static RTServices* s_instance;
-
- SubSystemClassBase* m_subSystem;
- MessageServiceController* m_messageServiceController;
-
- RTServices();
- RTServices(const RTServices & right);
- RTServices & operator = (const RTServices& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* RTSERVICES_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef RTSERVICES_H_
+#define RTSERVICES_H_
+#include "common/messaging/MessageServiceController.h"
+
+namespace etRuntime {
+
+class SubSystemClassBase;
+class MessageServiceController;
+
+
+class RTServices {
+public:
+ virtual ~RTServices();
+
+ static RTServices& getInstance() {
+ if (s_instance == 0) {
+ s_instance = new RTServices();
+ }
+ return *s_instance;
+ }
+
+ void destroy();
+ MessageServiceController& getMsgSvcCtrl();
+ SubSystemClassBase* getSubSystem() { return m_subSystem; };
+ void setSubSystem(SubSystemClassBase* subSystem) { m_subSystem = subSystem; };
+
+private:
+ static RTServices* s_instance;
+
+ SubSystemClassBase* m_subSystem;
+ MessageServiceController* m_messageServiceController;
+
+ RTServices();
+ RTServices(const RTServices & right);
+ RTServices & operator = (const RTServices& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* RTSERVICES_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
index 963340860..34ab12c46 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp
@@ -1,219 +1,219 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "RTSystemServicesProtocol.h"
-#include "common/debugging/DebuggingService.h"
-
-namespace etRuntime {
-
-std::string RTSystemServicesProtocol::s_messageStrings[] =
- { "MIN",
- "dummy",
- "executeInitialTransition",
- "startDebugging",
- "stopDebugging",
- "MAX"};
-
-std::string RTSystemServicesProtocol::getMessageString(int msg_id) {
- if ((MSG_MIN < msg_id ) && ( msg_id < MSG_MAX )) {
- return s_messageStrings[msg_id];
- } else {
- // id out of range
- return "Message ID out of range";
- }
-}
-
-//------------------------------------------------------------------
-// RTSystemServicesProtocol: surrounding class
-//------------------------------------------------------------------
-
-
-RTSystemServicesProtocol::RTSystemServicesProtocol() {
-}
-
-RTSystemServicesProtocol::~RTSystemServicesProtocol() {
-}
-
-
-//------------------------------------------------------------------
-// RTSystemServicesProtocolPort
-//------------------------------------------------------------------
-
-RTSystemServicesProtocolPort::RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
- int localId, Address addr, Address peerAddress, bool doRegistration)
-:PortBase(actor, parent, name, localId, 0, addr, peerAddress)
-{
- if (doRegistration) {
- DebuggingService::getInstance().addPortInstance(*this);
- }
-};
-
-RTSystemServicesProtocolPort::RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
- int localId, int idx, Address addr, Address peerAddress, bool doRegistration)
-: PortBase(actor, parent, name, localId, idx, addr, peerAddress)
-{
- if (doRegistration) {
- DebuggingService::getInstance().addPortInstance(*this);
- }
-};
-
-void RTSystemServicesProtocolPort::receive(Message* msg) {
- if (! RTSystemServicesProtocol::isValidIncomingEvtID(msg->getEvtId())) {
- std::cout << "unknown" << std::endl;
- }
- else {
- if (msg->hasDebugFlagSet()) { // TODO: model switch for activation of this flag
- DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), RTSystemServicesProtocol::getMessageString(msg->getEvtId()));
- }
- getEventReceiver().receiveEvent(this, msg->getEvtId(), msg->getData());
- }
-};
-
-// sent messages
-
-void RTSystemServicesProtocolPort::dummy() {
- DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
- RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::OUT_dummy));
- PortBase::send(RTSystemServicesProtocol::OUT_dummy);
-};
-
-//------------------------------------------------------------------
-// RTSystemServicesProtocolPortRepl
-//------------------------------------------------------------------
-
-
-RTSystemServicesProtocolPortRepl::
-RTSystemServicesProtocolPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address> peerAddress)
-: m_replication(addr.size()),
- m_ports()
-{
- char numstr[10]; // enough to hold all numbers up to 32-bits
-
- //m_ports.reserve(m_replication);
- m_ports = reinterpret_cast<RTSystemServicesProtocolPort*> (new char[sizeof(RTSystemServicesProtocolPort) * addr.size()]);
-
- for (int i = 0; i < m_replication; ++i) {
- snprintf(numstr, sizeof(numstr), "%d", i);
- new (&m_ports[i]) RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]);
-
- //m_ports.push_back(std::auto_ptr_ref<RTSystemServicesProtocolPort>(new RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i], false)));
- //m_ports[i] = std::auto_ptr<RTSystemServicesProtocolPort>(new RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]));
- }
-// for (int i = 0; i < m_replication; ++i) {
-// DebuggingService::getInstance().addPortInstance(m_ports.at(i));
-// }
-
-};
-
-// outgoing messages
-
-void RTSystemServicesProtocolPortRepl::dummy() {
- for (int i = 0; i < m_replication; ++i) {
- m_ports[i].dummy();
- }
-};
-
-//------------------------------------------------------------------
-// RTSystemServicesProtocolConjPort
-//------------------------------------------------------------------
-
-RTSystemServicesProtocolConjPort::RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
- std::string name, int localId, Address addr, Address peerAddress, bool doRegistration)
- : PortBase(actor, parent, name, localId, 0, addr, peerAddress)
-{
- if (doRegistration) {
- DebuggingService::getInstance().addPortInstance(*this);
- }
-}
-RTSystemServicesProtocolConjPort::RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
- std::string name, int localId, int idx, Address addr,
- Address peerAddress, bool doRegistration)
-: PortBase(actor, parent, name, localId, idx, addr, peerAddress)
-{
- if (doRegistration) {
- DebuggingService::getInstance().addPortInstance(*this);
- }
-}
-
-void RTSystemServicesProtocolConjPort::receive(Message* msg) {
- if (! RTSystemServicesProtocol::isValidOutgoingEvtID(msg->getEvtId())) { //conjugated port receives out-messages
- std::cout << "unknown" << std::endl;
- }
- else {
- if (msg->hasDebugFlagSet()) { // TODO: model switch for activation of this flag
- DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), RTSystemServicesProtocol::getMessageString(msg->getEvtId()));
- }
- getEventReceiver().receiveEvent(this, msg->getEvtId(), msg->getData());
- }
-}
-
-// sent messages
-
-void RTSystemServicesProtocolConjPort::executeInitialTransition() {
- DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
- RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_executeInitialTransition));
- PortBase::send(RTSystemServicesProtocol::IN_executeInitialTransition);
-}
-
-void RTSystemServicesProtocolConjPort::startDebugging() {
- DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
- RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_startDebugging));
- PortBase::send(RTSystemServicesProtocol::IN_startDebugging);
-}
-
-void RTSystemServicesProtocolConjPort::stopDebugging() {
- DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
- RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_stopDebugging));
- PortBase::send(RTSystemServicesProtocol::IN_stopDebugging);
-}
-
-//------------------------------------------------------------------
-// RTSystemServicesProtocolConjPortRepl
-//------------------------------------------------------------------
-
-RTSystemServicesProtocolConjPortRepl::
-RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address>& peerAddress)
-: m_replication(addr.size()),
- m_ports()
-{
- char numstr[10]; // enough to hold all numbers up to 32-bits
- m_ports = reinterpret_cast<RTSystemServicesProtocolConjPort*> (new char[sizeof(RTSystemServicesProtocolConjPort) * addr.size()]);
- for (int i = 0; i < m_replication; ++i) {
- snprintf(numstr, sizeof(numstr), "%d", i);
- //placement new to avoid copy construction, therefore no vector is used
- new (&m_ports[i]) RTSystemServicesProtocolConjPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]);
- }
-
-};
-
-// sent messages
-
-void RTSystemServicesProtocolConjPortRepl::executeInitialTransition() {
- for (int i = 0; i < m_replication; ++i) {
- m_ports[i].executeInitialTransition();
- }
-}
-
-void RTSystemServicesProtocolConjPortRepl::startDebugging() {
- for (int i = 0; i < m_replication; ++i) {
- m_ports[i].startDebugging();
- }
-}
-
-void RTSystemServicesProtocolConjPortRepl::stopDebugging() {
- for (int i = 0; i < m_replication; ++i) {
- m_ports[i].stopDebugging();
- }
-}
-
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "RTSystemServicesProtocol.h"
+#include "common/debugging/DebuggingService.h"
+
+namespace etRuntime {
+
+std::string RTSystemServicesProtocol::s_messageStrings[] =
+ { "MIN",
+ "dummy",
+ "executeInitialTransition",
+ "startDebugging",
+ "stopDebugging",
+ "MAX"};
+
+std::string RTSystemServicesProtocol::getMessageString(int msg_id) {
+ if ((MSG_MIN < msg_id ) && ( msg_id < MSG_MAX )) {
+ return s_messageStrings[msg_id];
+ } else {
+ // id out of range
+ return "Message ID out of range";
+ }
+}
+
+//------------------------------------------------------------------
+// RTSystemServicesProtocol: surrounding class
+//------------------------------------------------------------------
+
+
+RTSystemServicesProtocol::RTSystemServicesProtocol() {
+}
+
+RTSystemServicesProtocol::~RTSystemServicesProtocol() {
+}
+
+
+//------------------------------------------------------------------
+// RTSystemServicesProtocolPort
+//------------------------------------------------------------------
+
+RTSystemServicesProtocolPort::RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
+ int localId, Address addr, Address peerAddress, bool doRegistration)
+:PortBase(actor, parent, name, localId, 0, addr, peerAddress)
+{
+ if (doRegistration) {
+ DebuggingService::getInstance().addPortInstance(*this);
+ }
+};
+
+RTSystemServicesProtocolPort::RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
+ int localId, int idx, Address addr, Address peerAddress, bool doRegistration)
+: PortBase(actor, parent, name, localId, idx, addr, peerAddress)
+{
+ if (doRegistration) {
+ DebuggingService::getInstance().addPortInstance(*this);
+ }
+};
+
+void RTSystemServicesProtocolPort::receive(Message* msg) {
+ if (! RTSystemServicesProtocol::isValidIncomingEvtID(msg->getEvtId())) {
+ std::cout << "unknown" << std::endl;
+ }
+ else {
+ if (msg->hasDebugFlagSet()) { // TODO: model switch for activation of this flag
+ DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), RTSystemServicesProtocol::getMessageString(msg->getEvtId()));
+ }
+ getEventReceiver().receiveEvent(this, msg->getEvtId(), msg->getData());
+ }
+};
+
+// sent messages
+
+void RTSystemServicesProtocolPort::dummy() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::OUT_dummy));
+ PortBase::send(RTSystemServicesProtocol::OUT_dummy);
+};
+
+//------------------------------------------------------------------
+// RTSystemServicesProtocolPortRepl
+//------------------------------------------------------------------
+
+
+RTSystemServicesProtocolPortRepl::
+RTSystemServicesProtocolPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address> peerAddress)
+: m_replication(addr.size()),
+ m_ports()
+{
+ char numstr[10]; // enough to hold all numbers up to 32-bits
+
+ //m_ports.reserve(m_replication);
+ m_ports = reinterpret_cast<RTSystemServicesProtocolPort*> (new char[sizeof(RTSystemServicesProtocolPort) * addr.size()]);
+
+ for (int i = 0; i < m_replication; ++i) {
+ snprintf(numstr, sizeof(numstr), "%d", i);
+ new (&m_ports[i]) RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]);
+
+ //m_ports.push_back(std::auto_ptr_ref<RTSystemServicesProtocolPort>(new RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i], false)));
+ //m_ports[i] = std::auto_ptr<RTSystemServicesProtocolPort>(new RTSystemServicesProtocolPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]));
+ }
+// for (int i = 0; i < m_replication; ++i) {
+// DebuggingService::getInstance().addPortInstance(m_ports.at(i));
+// }
+
+};
+
+// outgoing messages
+
+void RTSystemServicesProtocolPortRepl::dummy() {
+ for (int i = 0; i < m_replication; ++i) {
+ m_ports[i].dummy();
+ }
+};
+
+//------------------------------------------------------------------
+// RTSystemServicesProtocolConjPort
+//------------------------------------------------------------------
+
+RTSystemServicesProtocolConjPort::RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
+ std::string name, int localId, Address addr, Address peerAddress, bool doRegistration)
+ : PortBase(actor, parent, name, localId, 0, addr, peerAddress)
+{
+ if (doRegistration) {
+ DebuggingService::getInstance().addPortInstance(*this);
+ }
+}
+RTSystemServicesProtocolConjPort::RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
+ std::string name, int localId, int idx, Address addr,
+ Address peerAddress, bool doRegistration)
+: PortBase(actor, parent, name, localId, idx, addr, peerAddress)
+{
+ if (doRegistration) {
+ DebuggingService::getInstance().addPortInstance(*this);
+ }
+}
+
+void RTSystemServicesProtocolConjPort::receive(Message* msg) {
+ if (! RTSystemServicesProtocol::isValidOutgoingEvtID(msg->getEvtId())) { //conjugated port receives out-messages
+ std::cout << "unknown" << std::endl;
+ }
+ else {
+ if (msg->hasDebugFlagSet()) { // TODO: model switch for activation of this flag
+ DebuggingService::getInstance().addMessageAsyncIn(getPeerAddress(), getAddress(), RTSystemServicesProtocol::getMessageString(msg->getEvtId()));
+ }
+ getEventReceiver().receiveEvent(this, msg->getEvtId(), msg->getData());
+ }
+}
+
+// sent messages
+
+void RTSystemServicesProtocolConjPort::executeInitialTransition() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_executeInitialTransition));
+ PortBase::send(RTSystemServicesProtocol::IN_executeInitialTransition);
+}
+
+void RTSystemServicesProtocolConjPort::startDebugging() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_startDebugging));
+ PortBase::send(RTSystemServicesProtocol::IN_startDebugging);
+}
+
+void RTSystemServicesProtocolConjPort::stopDebugging() {
+ DebuggingService::getInstance().addMessageAsyncOut(getAddress(), getPeerAddress(),
+ RTSystemServicesProtocol::getMessageString(RTSystemServicesProtocol::IN_stopDebugging));
+ PortBase::send(RTSystemServicesProtocol::IN_stopDebugging);
+}
+
+//------------------------------------------------------------------
+// RTSystemServicesProtocolConjPortRepl
+//------------------------------------------------------------------
+
+RTSystemServicesProtocolConjPortRepl::
+RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId, const std::vector<Address>& addr, const std::vector<Address>& peerAddress)
+: m_replication(addr.size()),
+ m_ports()
+{
+ char numstr[10]; // enough to hold all numbers up to 32-bits
+ m_ports = reinterpret_cast<RTSystemServicesProtocolConjPort*> (new char[sizeof(RTSystemServicesProtocolConjPort) * addr.size()]);
+ for (int i = 0; i < m_replication; ++i) {
+ snprintf(numstr, sizeof(numstr), "%d", i);
+ //placement new to avoid copy construction, therefore no vector is used
+ new (&m_ports[i]) RTSystemServicesProtocolConjPort(actor, parent, name + numstr, localId, i, addr[i], peerAddress[i]);
+ }
+
+};
+
+// sent messages
+
+void RTSystemServicesProtocolConjPortRepl::executeInitialTransition() {
+ for (int i = 0; i < m_replication; ++i) {
+ m_ports[i].executeInitialTransition();
+ }
+}
+
+void RTSystemServicesProtocolConjPortRepl::startDebugging() {
+ for (int i = 0; i < m_replication; ++i) {
+ m_ports[i].startDebugging();
+ }
+}
+
+void RTSystemServicesProtocolConjPortRepl::stopDebugging() {
+ for (int i = 0; i < m_replication; ++i) {
+ m_ports[i].stopDebugging();
+ }
+}
+
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
index ccdb38876..d2646df61 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h
@@ -1,148 +1,148 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef RTSYSTEMSERVICESPROTOCOL_H_
-#define RTSYSTEMSERVICESPROTOCOL_H_
-
-#include "common/modelbase/PortBase.h"
-#include "common/modelbase/IEventReceiver.h"
-#include "common/messaging/Address.h"
-#include <vector>
-#include <string>
-#include <memory>
-
-namespace etRuntime {
-
-//---------------------------------------------------
-// interface for port class
-//---------------------------------------------------
-class IRTSystemServicesProtocolPort {
-public:
- virtual ~IRTSystemServicesProtocolPort() {};
- virtual void dummy() = 0;
-};
-
-//---------------------------------------------------
-// interface for conjugated port class
-//---------------------------------------------------
-class IRTSystemServicesProtocolConjPort {
-public:
- virtual ~IRTSystemServicesProtocolConjPort() {};
- virtual void executeInitialTransition() = 0;
- virtual void startDebugging() = 0;
- virtual void stopDebugging() = 0;
-};
-
-
-class RTSystemServicesProtocol {
-public:
- enum eventIDs {
- MSG_MIN = 0,
- OUT_dummy = 1,
- MSG_SEP = 2,
- IN_executeInitialTransition = 2,
- IN_startDebugging = 3,
- IN_stopDebugging = 4,
- MSG_MAX = 5
- };
- static bool isValidEvtID(int evtId) {
- return ((MSG_MIN < evtId) && (evtId < MSG_MAX));
- };
- static bool isValidOutgoingEvtID(int evtId) {
- return ((MSG_MIN < evtId) && (evtId < MSG_SEP));
- };
- static bool isValidIncomingEvtID(int evtId) {
- return ((MSG_SEP <= evtId) && (evtId < MSG_MAX));
- };
- static std::string getMessageString(int msg_id);
-
- private:
- static std::string s_messageStrings[];
-
- RTSystemServicesProtocol();
- virtual ~RTSystemServicesProtocol();
-};
-
- //---------------------------------------------------
- // port class
- //---------------------------------------------------
- class RTSystemServicesProtocolPort : public PortBase , public IRTSystemServicesProtocolPort {
- public:
- RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
- int localId, Address addr, Address peerAddress, bool doRegistration = true);
-
- RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
- int localId, int idx, Address addr, Address peerAddress, bool doRegistration = true);
-
- virtual void receive(Message* m);
- // sent messages
- void dummy();
- };
-
- //---------------------------------------------------
- // replicated port class
- //---------------------------------------------------
- class RTSystemServicesProtocolPortRepl: public IRTSystemServicesProtocolPort {
- private:
- int m_replication;
- RTSystemServicesProtocolPort* m_ports;
-
- public:
- RTSystemServicesProtocolPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
- const std::vector<Address>& addr, const std::vector<Address> peerAddress);
-
- int getReplication() const { return m_replication; } ;
- RTSystemServicesProtocolPort& get(int i) { return m_ports[i]; };
- // outgoing messages
- void dummy();
- };
-
-
- //---------------------------------------------------
- // conjugated port class
- //---------------------------------------------------
- class RTSystemServicesProtocolConjPort : public PortBase, public IRTSystemServicesProtocolConjPort{
- public:
- RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
- std::string name, int localId, Address addr, Address peerAddress, bool doRegistration = true);
- RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
- std::string name, int localId, int idx, Address addr,
- Address peerAddress, bool doRegistration = true);
-
- virtual void receive(Message* m);
- void executeInitialTransition();
- void startDebugging();
- void stopDebugging();
- };
-
- //---------------------------------------------------
- // replicated conjugated port class
- //---------------------------------------------------
- class RTSystemServicesProtocolConjPortRepl : public IRTSystemServicesProtocolConjPort{
- private:
- int m_replication;
- RTSystemServicesProtocolConjPort* m_ports; //dynamic array used instead of vector to avoid copy construction
-
- public:
- RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
- const std::vector<Address>& addr, const std::vector<Address>& peerAddress);
-
- int getReplication() const { return m_replication; } ;
- RTSystemServicesProtocolConjPort& get(int i) { return m_ports[i]; };
-
- void executeInitialTransition();
- void startDebugging();
- void stopDebugging();
- };
-
-} /* namespace etRuntime */
-#endif /* RTSYSTEMSERVICESPROTOCOL_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef RTSYSTEMSERVICESPROTOCOL_H_
+#define RTSYSTEMSERVICESPROTOCOL_H_
+
+#include "common/modelbase/PortBase.h"
+#include "common/modelbase/IEventReceiver.h"
+#include "common/messaging/Address.h"
+#include <vector>
+#include <string>
+#include <memory>
+
+namespace etRuntime {
+
+//---------------------------------------------------
+// interface for port class
+//---------------------------------------------------
+class IRTSystemServicesProtocolPort {
+public:
+ virtual ~IRTSystemServicesProtocolPort() {};
+ virtual void dummy() = 0;
+};
+
+//---------------------------------------------------
+// interface for conjugated port class
+//---------------------------------------------------
+class IRTSystemServicesProtocolConjPort {
+public:
+ virtual ~IRTSystemServicesProtocolConjPort() {};
+ virtual void executeInitialTransition() = 0;
+ virtual void startDebugging() = 0;
+ virtual void stopDebugging() = 0;
+};
+
+
+class RTSystemServicesProtocol {
+public:
+ enum eventIDs {
+ MSG_MIN = 0,
+ OUT_dummy = 1,
+ MSG_SEP = 2,
+ IN_executeInitialTransition = 2,
+ IN_startDebugging = 3,
+ IN_stopDebugging = 4,
+ MSG_MAX = 5
+ };
+ static bool isValidEvtID(int evtId) {
+ return ((MSG_MIN < evtId) && (evtId < MSG_MAX));
+ };
+ static bool isValidOutgoingEvtID(int evtId) {
+ return ((MSG_MIN < evtId) && (evtId < MSG_SEP));
+ };
+ static bool isValidIncomingEvtID(int evtId) {
+ return ((MSG_SEP <= evtId) && (evtId < MSG_MAX));
+ };
+ static std::string getMessageString(int msg_id);
+
+ private:
+ static std::string s_messageStrings[];
+
+ RTSystemServicesProtocol();
+ virtual ~RTSystemServicesProtocol();
+};
+
+ //---------------------------------------------------
+ // port class
+ //---------------------------------------------------
+ class RTSystemServicesProtocolPort : public PortBase , public IRTSystemServicesProtocolPort {
+ public:
+ RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
+ int localId, Address addr, Address peerAddress, bool doRegistration = true);
+
+ RTSystemServicesProtocolPort(IEventReceiver& actor, IRTObject* parent, std::string name,
+ int localId, int idx, Address addr, Address peerAddress, bool doRegistration = true);
+
+ virtual void receive(Message* m);
+ // sent messages
+ void dummy();
+ };
+
+ //---------------------------------------------------
+ // replicated port class
+ //---------------------------------------------------
+ class RTSystemServicesProtocolPortRepl: public IRTSystemServicesProtocolPort {
+ private:
+ int m_replication;
+ RTSystemServicesProtocolPort* m_ports;
+
+ public:
+ RTSystemServicesProtocolPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
+ const std::vector<Address>& addr, const std::vector<Address> peerAddress);
+
+ int getReplication() const { return m_replication; } ;
+ RTSystemServicesProtocolPort& get(int i) { return m_ports[i]; };
+ // outgoing messages
+ void dummy();
+ };
+
+
+ //---------------------------------------------------
+ // conjugated port class
+ //---------------------------------------------------
+ class RTSystemServicesProtocolConjPort : public PortBase, public IRTSystemServicesProtocolConjPort{
+ public:
+ RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
+ std::string name, int localId, Address addr, Address peerAddress, bool doRegistration = true);
+ RTSystemServicesProtocolConjPort(IEventReceiver& actor, IRTObject* parent,
+ std::string name, int localId, int idx, Address addr,
+ Address peerAddress, bool doRegistration = true);
+
+ virtual void receive(Message* m);
+ void executeInitialTransition();
+ void startDebugging();
+ void stopDebugging();
+ };
+
+ //---------------------------------------------------
+ // replicated conjugated port class
+ //---------------------------------------------------
+ class RTSystemServicesProtocolConjPortRepl : public IRTSystemServicesProtocolConjPort{
+ private:
+ int m_replication;
+ RTSystemServicesProtocolConjPort* m_ports; //dynamic array used instead of vector to avoid copy construction
+
+ public:
+ RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
+ const std::vector<Address>& addr, const std::vector<Address>& peerAddress);
+
+ int getReplication() const { return m_replication; } ;
+ RTSystemServicesProtocolConjPort& get(int i) { return m_ports[i]; };
+
+ void executeInitialTransition();
+ void startDebugging();
+ void stopDebugging();
+ };
+
+} /* namespace etRuntime */
+#endif /* RTSYSTEMSERVICESPROTOCOL_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
index 3c8c872cf..6cfc0cc92 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp
@@ -1,62 +1,62 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "ActorClassBase.h"
-
-namespace etRuntime {
-
-ActorClassBase::ActorClassBase(IRTObject* parent, std::string name, Address ownAddr, Address systemPortPeerAddr)
- : EventReceiver(parent, name),
- IMessageReceiver(),
- m_state(0),
- history(0), //to be instantiated by derived class
- m_RTSystemPort(0),
- m_className("noname"),
- m_ownAddr(ownAddr),
- m_ownMsgsvc(RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(ownAddr.m_threadID)) {
-
- // own ports
- m_RTSystemPort = new RTSystemServicesProtocolPort(*this, this, "RTSystemPort", 0, 0, ownAddr,
- systemPortPeerAddr);
-}
-
-ActorClassBase::~ActorClassBase() {
- delete m_RTSystemPort;
- m_RTSystemPort = 0;
- delete history;
- history = 0;
-}
-
-bool ActorClassBase::handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data) {
- if ((ifitem != 0) && (ifitem->getLocalId() != 0)) {
- return false;
- }
-
- switch (evt) {
- case RTSystemServicesProtocol::IN_executeInitialTransition:
- executeInitTransition();
- break;
- case RTSystemServicesProtocol::IN_startDebugging:
- break;
- case RTSystemServicesProtocol::IN_stopDebugging:
- break;
- default:
- return false;
- }
- return true;
-}
-
-std::string ActorClassBase::toString() {
- return "ActorClass(className=" + m_className + ", instancePath=" + getInstancePath() + ")";
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "ActorClassBase.h"
+
+namespace etRuntime {
+
+ActorClassBase::ActorClassBase(IRTObject* parent, std::string name, Address ownAddr, Address systemPortPeerAddr)
+ : EventReceiver(parent, name),
+ IMessageReceiver(),
+ m_state(0),
+ history(0), //to be instantiated by derived class
+ m_RTSystemPort(0),
+ m_className("noname"),
+ m_ownAddr(ownAddr),
+ m_ownMsgsvc(RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(ownAddr.m_threadID)) {
+
+ // own ports
+ m_RTSystemPort = new RTSystemServicesProtocolPort(*this, this, "RTSystemPort", 0, 0, ownAddr,
+ systemPortPeerAddr);
+}
+
+ActorClassBase::~ActorClassBase() {
+ delete m_RTSystemPort;
+ m_RTSystemPort = 0;
+ delete history;
+ history = 0;
+}
+
+bool ActorClassBase::handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data) {
+ if ((ifitem != 0) && (ifitem->getLocalId() != 0)) {
+ return false;
+ }
+
+ switch (evt) {
+ case RTSystemServicesProtocol::IN_executeInitialTransition:
+ executeInitTransition();
+ break;
+ case RTSystemServicesProtocol::IN_startDebugging:
+ break;
+ case RTSystemServicesProtocol::IN_stopDebugging:
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+std::string ActorClassBase::toString() {
+ return "ActorClass(className=" + m_className + ", instancePath=" + getInstancePath() + ")";
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
index 30b0d3399..3efca3121 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h
@@ -1,78 +1,78 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef ACTORCLASSBASE_H_
-#define ACTORCLASSBASE_H_
-
-#include "common/modelbase/EventReceiver.h"
-#include "common/messaging/IMessageReceiver.h"
-#include "common/messaging/RTServices.h"
-#include "common/messaging/RTSystemServicesProtocol.h"
-
-namespace etRuntime {
-
-class ActorClassBase: public EventReceiver, public IMessageReceiver {
-public:
- ActorClassBase(IRTObject* parent, std::string name, Address ownAddr, Address systemPortPeerAddr);
- virtual ~ActorClassBase();
-
- std::string toString();
- std::string getClassName() const { return m_className; }
- void setClassName(std::string className) { m_className = className; }
- virtual Address getAddress() const {
- // TODO: Actor should have its own address for services and debugging
- return Address(0,0,0);
- }
-
- //--------------------- lifecycle functions
- // automatically generated lifecycle functions
- virtual void init() = 0;
- virtual void start() = 0;
- virtual void stop() = 0;
- virtual void destroy() = 0;
- virtual void executeInitTransition() = 0;
-
- // not automatically generated lifecycle functions
- // are called, but with empty implementation -> can be overridden by user
- void initUser() { }
- void startUser() { }
- void stopUser() { }
- void destroyUser() { }
- virtual void receive(Message* msg) { }
-
- int getState() const { return m_state; }
- MessageService* getMsgsvc() const { return m_ownMsgsvc; }
-
-protected:
- static const int EVT_SHIFT = 1000; // TODOHRR: use 256 or shift operation later
- static const int NO_STATE = 0;
- static const int STATE_TOP = 1;
- static const int NOT_CAUGHT = 0;
-
- /**
- * the current state
- */
- int m_state;
- int* history; //Todo pka: name is not prefixed by m_ because generic generator uses this member
-
- RTSystemServicesProtocolPort* m_RTSystemPort;
-
- virtual bool handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data);
-private:
- std::string m_className;
- Address m_ownAddr;
- MessageService* m_ownMsgsvc;
-
-};
-
-} /* namespace etRuntime */
-#endif /* ACTORCLASSBASE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ACTORCLASSBASE_H_
+#define ACTORCLASSBASE_H_
+
+#include "common/modelbase/EventReceiver.h"
+#include "common/messaging/IMessageReceiver.h"
+#include "common/messaging/RTServices.h"
+#include "common/messaging/RTSystemServicesProtocol.h"
+
+namespace etRuntime {
+
+class ActorClassBase: public EventReceiver, public IMessageReceiver {
+public:
+ ActorClassBase(IRTObject* parent, std::string name, Address ownAddr, Address systemPortPeerAddr);
+ virtual ~ActorClassBase();
+
+ std::string toString();
+ std::string getClassName() const { return m_className; }
+ void setClassName(std::string className) { m_className = className; }
+ virtual Address getAddress() const {
+ // TODO: Actor should have its own address for services and debugging
+ return Address(0,0,0);
+ }
+
+ //--------------------- lifecycle functions
+ // automatically generated lifecycle functions
+ virtual void init() = 0;
+ virtual void start() = 0;
+ virtual void stop() = 0;
+ virtual void destroy() = 0;
+ virtual void executeInitTransition() = 0;
+
+ // not automatically generated lifecycle functions
+ // are called, but with empty implementation -> can be overridden by user
+ void initUser() { }
+ void startUser() { }
+ void stopUser() { }
+ void destroyUser() { }
+ virtual void receive(Message* msg) { }
+
+ int getState() const { return m_state; }
+ MessageService* getMsgsvc() const { return m_ownMsgsvc; }
+
+protected:
+ static const int EVT_SHIFT = 1000; // TODOHRR: use 256 or shift operation later
+ static const int NO_STATE = 0;
+ static const int STATE_TOP = 1;
+ static const int NOT_CAUGHT = 0;
+
+ /**
+ * the current state
+ */
+ int m_state;
+ int* history; //Todo pka: name is not prefixed by m_ because generic generator uses this member
+
+ RTSystemServicesProtocolPort* m_RTSystemPort;
+
+ virtual bool handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data);
+private:
+ std::string m_className;
+ Address m_ownAddr;
+ MessageService* m_ownMsgsvc;
+
+};
+
+} /* namespace etRuntime */
+#endif /* ACTORCLASSBASE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp
index 10c0a59d7..818229e9f 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp
@@ -1,21 +1,21 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "EventReceiver.h"
-
-namespace etRuntime {
-
-
-EventReceiver::~EventReceiver() {
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "EventReceiver.h"
+
+namespace etRuntime {
+
+
+EventReceiver::~EventReceiver() {
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h
index 1bb699617..6a2dfae38 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef EVENTRECEIVER_H_
-#define EVENTRECEIVER_H_
-
-#include "common/messaging/RTObject.h"
-#include "common/modelbase/IEventReceiver.h"
-#include <string>
-
-namespace etRuntime {
-
-class EventReceiver : public RTObject, public IEventReceiver{
-public:
- EventReceiver(IRTObject* parent, std::string name)
- : RTObject(parent, name),
- IEventReceiver()
- {};
- virtual ~EventReceiver();
-
-private:
- EventReceiver();
- EventReceiver(const EventReceiver& right);
- EventReceiver& operator=(const EventReceiver& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* EVENTRECEIVER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef EVENTRECEIVER_H_
+#define EVENTRECEIVER_H_
+
+#include "common/messaging/RTObject.h"
+#include "common/modelbase/IEventReceiver.h"
+#include <string>
+
+namespace etRuntime {
+
+class EventReceiver : public RTObject, public IEventReceiver{
+public:
+ EventReceiver(IRTObject* parent, std::string name)
+ : RTObject(parent, name),
+ IEventReceiver()
+ {};
+ virtual ~EventReceiver();
+
+private:
+ EventReceiver();
+ EventReceiver(const EventReceiver& right);
+ EventReceiver& operator=(const EventReceiver& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* EVENTRECEIVER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp
index 558ec8e9f..c0051f968 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp
@@ -1,23 +1,23 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "IEventReceiver.h"
-
-namespace etRuntime {
-
-IEventReceiver::IEventReceiver() {
-}
-
-IEventReceiver::~IEventReceiver() {
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "IEventReceiver.h"
+
+namespace etRuntime {
+
+IEventReceiver::IEventReceiver() {
+}
+
+IEventReceiver::~IEventReceiver() {
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
index 7b75e68f8..627195838 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h
@@ -1,31 +1,31 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef IEVENTRECEIVER_H_
-#define IEVENTRECEIVER_H_
-
-#include "common/messaging/IRTObject.h"
-
-namespace etRuntime {
- class InterfaceItemBase;
-
-class IEventReceiver {
-public:
- IEventReceiver();
- virtual ~IEventReceiver();
-
- virtual void receiveEvent(InterfaceItemBase* ifitem, int evt, void* data) = 0;
-
-};
-
-} /* namespace etRuntime */
-#endif /* IEVENTRECEIVER_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef IEVENTRECEIVER_H_
+#define IEVENTRECEIVER_H_
+
+#include "common/messaging/IRTObject.h"
+
+namespace etRuntime {
+ class InterfaceItemBase;
+
+class IEventReceiver {
+public:
+ IEventReceiver();
+ virtual ~IEventReceiver();
+
+ virtual void receiveEvent(InterfaceItemBase* ifitem, int evt, void* data) = 0;
+
+};
+
+} /* namespace etRuntime */
+#endif /* IEVENTRECEIVER_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp
index 5560db077..c689f5feb 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp
@@ -1,60 +1,60 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "InterfaceItemBase.h"
-#include "common/messaging/AbstractMessageReceiver.h"
-#include "common/messaging/RTServices.h"
-
-namespace etRuntime {
-
-InterfaceItemBase::InterfaceItemBase (IEventReceiver& evtReceiver, IRTObject* parent, std::string name, int localId, int idx, Address ownAddress, Address peerAddress)
-: AbstractMessageReceiver(parent, ownAddress, name),
- m_idx(idx),
- m_localId(localId),
- m_actorPath(name),
- m_peerAddress(peerAddress),
- m_ownMsgReceiver(RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(ownAddress.m_threadID)),
- m_peerMsgReceiver(peerAddress.isValid()? RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(peerAddress.m_threadID): 0),
- m_eventReceiver(&evtReceiver)
-{
- if (getAddress().isValid() && m_ownMsgReceiver->isMsgService()) {
- MessageService* ms = static_cast<MessageService*>(m_ownMsgReceiver);
- // register at the own dispatcher to receive messages
- ms->getMessageDispatcher().addMessageReceiver(*this);
- }
- if (parent) {
- m_actorPath = parent->getInstancePath();
- }
-}
-
-InterfaceItemBase::InterfaceItemBase(const InterfaceItemBase & right)
-: AbstractMessageReceiver(right),
- m_idx(right.m_idx),
- m_localId(right.m_localId),
- m_actorPath(right.m_actorPath),
- m_peerAddress(right.m_peerAddress),
- m_ownMsgReceiver(right.m_ownMsgReceiver),
- m_peerMsgReceiver(right.m_peerMsgReceiver),
- m_eventReceiver(right.m_eventReceiver)
-{
-
-}
-
-
-InterfaceItemBase::~InterfaceItemBase() {
- m_ownMsgReceiver = 0;
- m_peerMsgReceiver = 0;
- m_eventReceiver = 0;
-
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "InterfaceItemBase.h"
+#include "common/messaging/AbstractMessageReceiver.h"
+#include "common/messaging/RTServices.h"
+
+namespace etRuntime {
+
+InterfaceItemBase::InterfaceItemBase (IEventReceiver& evtReceiver, IRTObject* parent, std::string name, int localId, int idx, Address ownAddress, Address peerAddress)
+: AbstractMessageReceiver(parent, ownAddress, name),
+ m_idx(idx),
+ m_localId(localId),
+ m_actorPath(name),
+ m_peerAddress(peerAddress),
+ m_ownMsgReceiver(RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(ownAddress.m_threadID)),
+ m_peerMsgReceiver(peerAddress.isValid()? RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(peerAddress.m_threadID): 0),
+ m_eventReceiver(&evtReceiver)
+{
+ if (getAddress().isValid() && m_ownMsgReceiver->isMsgService()) {
+ MessageService* ms = static_cast<MessageService*>(m_ownMsgReceiver);
+ // register at the own dispatcher to receive messages
+ ms->getMessageDispatcher().addMessageReceiver(*this);
+ }
+ if (parent) {
+ m_actorPath = parent->getInstancePath();
+ }
+}
+
+InterfaceItemBase::InterfaceItemBase(const InterfaceItemBase & right)
+: AbstractMessageReceiver(right),
+ m_idx(right.m_idx),
+ m_localId(right.m_localId),
+ m_actorPath(right.m_actorPath),
+ m_peerAddress(right.m_peerAddress),
+ m_ownMsgReceiver(right.m_ownMsgReceiver),
+ m_peerMsgReceiver(right.m_peerMsgReceiver),
+ m_eventReceiver(right.m_eventReceiver)
+{
+
+}
+
+
+InterfaceItemBase::~InterfaceItemBase() {
+ m_ownMsgReceiver = 0;
+ m_peerMsgReceiver = 0;
+ m_eventReceiver = 0;
+
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h
index 70d977949..70187be3e 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h
@@ -1,62 +1,62 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef INTERFACEITEMBASE_H_
-#define INTERFACEITEMBASE_H_
-
-#include "common/messaging/Address.h"
-#include "common/messaging/IMessageReceiver.h"
-#include "common/modelbase/IEventReceiver.h"
-#include "common/messaging/AbstractMessageReceiver.h"
-#include <string>
-
-namespace etRuntime {
-class IEventReceiver;
-
-
-class InterfaceItemBase : public AbstractMessageReceiver{
-public:
- InterfaceItemBase (IEventReceiver& evtReceiver, IRTObject* parentActor, std::string name, int localId, int idx, Address ownAddress, Address peerAddress);
- InterfaceItemBase(const InterfaceItemBase & right);
- virtual ~InterfaceItemBase();
-
- int getIdx() const { return m_idx; } ;
- IEventReceiver& getEventReceiver() { return *m_eventReceiver; };
- std::string& getActorPath() { return m_actorPath; };
- int getLocalId() const {return m_localId; };
-
- void setMsgReceiver(IMessageReceiver& msgReceiver) { m_ownMsgReceiver = &msgReceiver; };
-
-protected:
- IMessageReceiver* getMsgReceiver() const{ return m_ownMsgReceiver; };
- IMessageReceiver* getPeerMsgReceiver() const { return m_peerMsgReceiver; };
- Address getPeerAddress() const { return m_peerAddress; };
-
-private:
-
- int m_idx;
- int m_localId;
-
- std::string m_actorPath;
-
- Address m_peerAddress;
- IMessageReceiver* m_ownMsgReceiver;
- IMessageReceiver* m_peerMsgReceiver;
- IEventReceiver* m_eventReceiver;
-
- InterfaceItemBase();
- InterfaceItemBase & operator = (const InterfaceItemBase& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* INTERFACEITEMBASE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef INTERFACEITEMBASE_H_
+#define INTERFACEITEMBASE_H_
+
+#include "common/messaging/Address.h"
+#include "common/messaging/IMessageReceiver.h"
+#include "common/modelbase/IEventReceiver.h"
+#include "common/messaging/AbstractMessageReceiver.h"
+#include <string>
+
+namespace etRuntime {
+class IEventReceiver;
+
+
+class InterfaceItemBase : public AbstractMessageReceiver{
+public:
+ InterfaceItemBase (IEventReceiver& evtReceiver, IRTObject* parentActor, std::string name, int localId, int idx, Address ownAddress, Address peerAddress);
+ InterfaceItemBase(const InterfaceItemBase & right);
+ virtual ~InterfaceItemBase();
+
+ int getIdx() const { return m_idx; } ;
+ IEventReceiver& getEventReceiver() { return *m_eventReceiver; };
+ std::string& getActorPath() { return m_actorPath; };
+ int getLocalId() const {return m_localId; };
+
+ void setMsgReceiver(IMessageReceiver& msgReceiver) { m_ownMsgReceiver = &msgReceiver; };
+
+protected:
+ IMessageReceiver* getMsgReceiver() const{ return m_ownMsgReceiver; };
+ IMessageReceiver* getPeerMsgReceiver() const { return m_peerMsgReceiver; };
+ Address getPeerAddress() const { return m_peerAddress; };
+
+private:
+
+ int m_idx;
+ int m_localId;
+
+ std::string m_actorPath;
+
+ Address m_peerAddress;
+ IMessageReceiver* m_ownMsgReceiver;
+ IMessageReceiver* m_peerMsgReceiver;
+ IEventReceiver* m_eventReceiver;
+
+ InterfaceItemBase();
+ InterfaceItemBase & operator = (const InterfaceItemBase& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* INTERFACEITEMBASE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp
index 7390106d4..ad880933d 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp
@@ -1,32 +1,32 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "PortBase.h"
-
-namespace etRuntime {
-
-
-PortBase::~PortBase() {
-}
-
-void PortBase::send(int evtID) {
-
- //TODO: how to avoid logging timerTicks
- //if (s_messageStrings[IRTSystemServicesProtocolPort::OUT_dummy] != "timerTick") {
- // TODOTS: model switch for activation
- if (getPeerAddress().isValid())
- getPeerMsgReceiver()->receive(
- new Message(getPeerAddress(), evtID)); //TODO: placement new mit message pool verwenden
-
-};
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "PortBase.h"
+
+namespace etRuntime {
+
+
+PortBase::~PortBase() {
+}
+
+void PortBase::send(int evtID) {
+
+ //TODO: how to avoid logging timerTicks
+ //if (s_messageStrings[IRTSystemServicesProtocolPort::OUT_dummy] != "timerTick") {
+ // TODOTS: model switch for activation
+ if (getPeerAddress().isValid())
+ getPeerMsgReceiver()->receive(
+ new Message(getPeerAddress(), evtID)); //TODO: placement new mit message pool verwenden
+
+};
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h
index 2f2fa29e6..9b0e6f04a 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h
@@ -1,43 +1,43 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef PORTBASE_H_
-#define PORTBASE_H_
-
-#include "common/modelbase/InterfaceItemBase.h"
-#include "common/messaging/Address.h"
-#include <string>
-
-namespace etRuntime {
-class IEventReceiver;
-
-class PortBase : public InterfaceItemBase{
-public:
- PortBase (IEventReceiver& actor, IRTObject* parent, std::string name, int localId, int idx, Address address, Address peerAddress)
- : InterfaceItemBase(actor, parent, name, localId, idx, address, peerAddress){};
- PortBase(const PortBase & right)
- : InterfaceItemBase(right) {};
-
-
- virtual ~PortBase();
-
- virtual void send(int evtID);
-
-
-private:
- PortBase();
- PortBase & operator = (const PortBase& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* PORTBASE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef PORTBASE_H_
+#define PORTBASE_H_
+
+#include "common/modelbase/InterfaceItemBase.h"
+#include "common/messaging/Address.h"
+#include <string>
+
+namespace etRuntime {
+class IEventReceiver;
+
+class PortBase : public InterfaceItemBase{
+public:
+ PortBase (IEventReceiver& actor, IRTObject* parent, std::string name, int localId, int idx, Address address, Address peerAddress)
+ : InterfaceItemBase(actor, parent, name, localId, idx, address, peerAddress){};
+ PortBase(const PortBase & right)
+ : InterfaceItemBase(right) {};
+
+
+ virtual ~PortBase();
+
+ virtual void send(int evtID);
+
+
+private:
+ PortBase();
+ PortBase & operator = (const PortBase& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* PORTBASE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp
index 1a23bbb8e..550dba3dc 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp
@@ -1,159 +1,159 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "SubSystemClassBase.h"
-#include "common/messaging/MessageService.h"
-#include "common/messaging/RTServices.h"
-#include "ActorClassBase.h"
-#include "common/debugging/DebuggingService.h"
-
-namespace etRuntime {
-
-
-SubSystemClassBase::~SubSystemClassBase() {
- m_testSem = 0;
- m_RTSystemPort = 0;
-}
-
-SubSystemClassBase::SubSystemClassBase(IRTObject* parent, std::string name)
- : RTObject(parent, name),
- IEventReceiver(),
- m_RTSystemPort(0),
- m_instances(),
- m_testSem(0),
- m_testErrorCode(0)
-{
- DebuggingService::getInstance().getAsyncLogger().setMSC(name + "_Async", "");
- DebuggingService::getInstance().getAsyncLogger().open();
- DebuggingService::getInstance().getSyncLogger().setMSC(name + "_Sync", "");
- DebuggingService::getInstance().getSyncLogger().open();
-
- RTServices::getInstance().setSubSystem(this);
-}
-
-void SubSystemClassBase::init() {
-
- std::cout << "*** MainComponent " << getInstancePath() << "::init ***" << std::endl;
-
- // MessageService
- instantiateMessageServices();
-
- // this is the place to connect the message services if necessary
- // normaly the ports will address the correct target message service directly
- // it is just for test purposes
- // RTServices::getInstance().getMsgSvcCtrl().connectAll();
-
- instantiateActors();
-
- // initialize all actor m_instances
- for (unsigned int i = 0; i < m_instances.size(); i++) {
- m_instances[i]->init();
- }
-}
-
-void SubSystemClassBase::start(bool singlethreaded) {
- // start all actors instances
- m_RTSystemPort->executeInitialTransition();
-
- // start all message services
- RTServices::getInstance().getMsgSvcCtrl().start(singlethreaded);
-
-}
-
-void SubSystemClassBase::stop(bool singlethreaded) {
- std::cout << "*** MainComponent " << this->getInstancePath() << "::stop ***" << std::endl;
-
- RTServices::getInstance().getMsgSvcCtrl().stop(singlethreaded);
- std::cout << "=== done stop MsgSvcCtrl" << std::endl;
-
- // stop all actor instances
- for (unsigned int i = 0; i < m_instances.size(); i++) {
- m_instances[i]->stop();
- }
- std::cout << "=== done stop actor instances" << std::endl;
-}
-
-void SubSystemClassBase::runOnce() {
- // run all message services one time
- RTServices::getInstance().getMsgSvcCtrl().runOnce();
-
-}
-
-void SubSystemClassBase::destroy() {
- std::cout << "*** MainComponent " << this->getInstancePath() << "::destroy ***" << std::endl;
- for (unsigned int i = 0; i < m_instances.size(); i++) {
- m_instances[i]->destroy();
- }
- std::cout << "=== done destroy actor instances" << std::endl;
-
- DebuggingService::getInstance().getAsyncLogger().close();
- DebuggingService::getInstance().getSyncLogger().close();
- std::cout << "=== done close loggers" << std::endl;
-
- RTServices::getInstance().destroy();
- std::cout << "=== done destroy RTServices\n\n\n" << std::endl;
-}
-
-MessageService* SubSystemClassBase::getMsgService(int idx) const {
- return RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(idx);
-}
-
-ActorClassBase* SubSystemClassBase::getInstance(unsigned int i) {
- if (i < 0 || i >= m_instances.size())
- return 0;
-
- return m_instances[i];
-}
-
-ActorClassBase* SubSystemClassBase::getInstance(std::string path) {
- for (unsigned int i = 0; i < m_instances.size(); i++) {
- if (m_instances[i]->getInstancePath() == path)
- return m_instances[i];
- }
-
- return 0;
-}
-
-// this is to run integration tests
-// TODO synchronized
-void SubSystemClassBase::setTestSemaphore(TestSemaphore& sem) {
- m_testErrorCode = -1;
- m_testSem = &sem;
-}
-
-//TODO synchronized
-int SubSystemClassBase::getTestErrorCode() const {
- return m_testErrorCode;
-}
-
-void SubSystemClassBase::testFinished(int errorCode) {
- if (m_testSem != 0) {
- std::cout
- << "org.eclipse.etrice.runtime.cpp.modelbase.SubSystemClassBase.testFinished(int): before releasing semaphore"
- << std::endl;
- //m_testSem.printWaitingThreads();
- //TODO synchronized (this) {
- m_testErrorCode = errorCode;
- m_testSem->give();
- //}
- std::cout
- << "org.eclipse.etrice.runtime.cpp.modelbase.SubSystemClassBase.testFinished(int): semaphore released"
- << std::endl;
- //m_testSem.printWaitingThreads();
- //TODO
- //Thread.yield();
- }
-}
-
-
-} /* namespace etRuntime */
-
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "SubSystemClassBase.h"
+#include "common/messaging/MessageService.h"
+#include "common/messaging/RTServices.h"
+#include "ActorClassBase.h"
+#include "common/debugging/DebuggingService.h"
+
+namespace etRuntime {
+
+
+SubSystemClassBase::~SubSystemClassBase() {
+ m_testSem = 0;
+ m_RTSystemPort = 0;
+}
+
+SubSystemClassBase::SubSystemClassBase(IRTObject* parent, std::string name)
+ : RTObject(parent, name),
+ IEventReceiver(),
+ m_RTSystemPort(0),
+ m_instances(),
+ m_testSem(0),
+ m_testErrorCode(0)
+{
+ DebuggingService::getInstance().getAsyncLogger().setMSC(name + "_Async", "");
+ DebuggingService::getInstance().getAsyncLogger().open();
+ DebuggingService::getInstance().getSyncLogger().setMSC(name + "_Sync", "");
+ DebuggingService::getInstance().getSyncLogger().open();
+
+ RTServices::getInstance().setSubSystem(this);
+}
+
+void SubSystemClassBase::init() {
+
+ std::cout << "*** MainComponent " << getInstancePath() << "::init ***" << std::endl;
+
+ // MessageService
+ instantiateMessageServices();
+
+ // this is the place to connect the message services if necessary
+ // normaly the ports will address the correct target message service directly
+ // it is just for test purposes
+ // RTServices::getInstance().getMsgSvcCtrl().connectAll();
+
+ instantiateActors();
+
+ // initialize all actor m_instances
+ for (unsigned int i = 0; i < m_instances.size(); i++) {
+ m_instances[i]->init();
+ }
+}
+
+void SubSystemClassBase::start(bool singlethreaded) {
+ // start all actors instances
+ m_RTSystemPort->executeInitialTransition();
+
+ // start all message services
+ RTServices::getInstance().getMsgSvcCtrl().start(singlethreaded);
+
+}
+
+void SubSystemClassBase::stop(bool singlethreaded) {
+ std::cout << "*** MainComponent " << this->getInstancePath() << "::stop ***" << std::endl;
+
+ RTServices::getInstance().getMsgSvcCtrl().stop(singlethreaded);
+ std::cout << "=== done stop MsgSvcCtrl" << std::endl;
+
+ // stop all actor instances
+ for (unsigned int i = 0; i < m_instances.size(); i++) {
+ m_instances[i]->stop();
+ }
+ std::cout << "=== done stop actor instances" << std::endl;
+}
+
+void SubSystemClassBase::runOnce() {
+ // run all message services one time
+ RTServices::getInstance().getMsgSvcCtrl().runOnce();
+
+}
+
+void SubSystemClassBase::destroy() {
+ std::cout << "*** MainComponent " << this->getInstancePath() << "::destroy ***" << std::endl;
+ for (unsigned int i = 0; i < m_instances.size(); i++) {
+ m_instances[i]->destroy();
+ }
+ std::cout << "=== done destroy actor instances" << std::endl;
+
+ DebuggingService::getInstance().getAsyncLogger().close();
+ DebuggingService::getInstance().getSyncLogger().close();
+ std::cout << "=== done close loggers" << std::endl;
+
+ RTServices::getInstance().destroy();
+ std::cout << "=== done destroy RTServices\n\n\n" << std::endl;
+}
+
+MessageService* SubSystemClassBase::getMsgService(int idx) const {
+ return RTServices::getInstance().getMsgSvcCtrl().getMsgSvc(idx);
+}
+
+ActorClassBase* SubSystemClassBase::getInstance(unsigned int i) {
+ if (i < 0 || i >= m_instances.size())
+ return 0;
+
+ return m_instances[i];
+}
+
+ActorClassBase* SubSystemClassBase::getInstance(std::string path) {
+ for (unsigned int i = 0; i < m_instances.size(); i++) {
+ if (m_instances[i]->getInstancePath() == path)
+ return m_instances[i];
+ }
+
+ return 0;
+}
+
+// this is to run integration tests
+// TODO synchronized
+void SubSystemClassBase::setTestSemaphore(TestSemaphore& sem) {
+ m_testErrorCode = -1;
+ m_testSem = &sem;
+}
+
+//TODO synchronized
+int SubSystemClassBase::getTestErrorCode() const {
+ return m_testErrorCode;
+}
+
+void SubSystemClassBase::testFinished(int errorCode) {
+ if (m_testSem != 0) {
+ std::cout
+ << "org.eclipse.etrice.runtime.cpp.modelbase.SubSystemClassBase.testFinished(int): before releasing semaphore"
+ << std::endl;
+ //m_testSem.printWaitingThreads();
+ //TODO synchronized (this) {
+ m_testErrorCode = errorCode;
+ m_testSem->give();
+ //}
+ std::cout
+ << "org.eclipse.etrice.runtime.cpp.modelbase.SubSystemClassBase.testFinished(int): semaphore released"
+ << std::endl;
+ //m_testSem.printWaitingThreads();
+ //TODO
+ //Thread.yield();
+ }
+}
+
+
+} /* namespace etRuntime */
+
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h
index 526cc93dd..ed5c8522b 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h
@@ -1,73 +1,73 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef SUBSYSTEMCLASSBASE_H_
-#define SUBSYSTEMCLASSBASE_H_
-
-#include "common/messaging/RTSystemServicesProtocol.h"
-#include "common/messaging/IRTObject.h"
-#include "common/debugging/MSCLogger.h"
-#include "common/modelbase/TestSemaphore.h"
-#include <string>
-#include <vector>
-#include <iostream>
-
-namespace etRuntime {
-
-class MessageService;
-class ActorClassBase;
-
-class SubSystemClassBase: public RTObject, public IEventReceiver {
-public:
- SubSystemClassBase(IRTObject* parent, std::string name);
- virtual ~SubSystemClassBase();
-
- void init();
- virtual void instantiateMessageServices() = 0;
- virtual void instantiateActors() = 0;
-
- void start(bool singlethreaded);
- void stop(bool singlethreaded);
- void runOnce();
-
- void destroy();
-
- MessageService* getMsgService(int idx) const;
-
- ActorClassBase* getInstance(unsigned int i);
- ActorClassBase* getInstance(std::string path);
-
- //---------------------------------------------
- // this is to run integration tests
- //---------------------------------------------
- // TODO synchronized
- void setTestSemaphore(TestSemaphore& sem);
- //TODO synchronized
- int getTestErrorCode() const;
- void testFinished(int errorCode);
-
-protected:
- RTSystemServicesProtocolConjPortRepl* m_RTSystemPort;
- //--------------------- interface item IDs
- static const int IFITEM_RTSystemPort = 0;
- std::vector<ActorClassBase*> m_instances;
-private:
- TestSemaphore* m_testSem;
- int m_testErrorCode;
-
- SubSystemClassBase();
- SubSystemClassBase(const SubSystemClassBase& right);
- SubSystemClassBase& operator=(const SubSystemClassBase& right);
-};
-
-} /* namespace etRuntime */
-#endif /* SUBSYSTEMCLASSBASE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef SUBSYSTEMCLASSBASE_H_
+#define SUBSYSTEMCLASSBASE_H_
+
+#include "common/messaging/RTSystemServicesProtocol.h"
+#include "common/messaging/IRTObject.h"
+#include "common/debugging/MSCLogger.h"
+#include "common/modelbase/TestSemaphore.h"
+#include <string>
+#include <vector>
+#include <iostream>
+
+namespace etRuntime {
+
+class MessageService;
+class ActorClassBase;
+
+class SubSystemClassBase: public RTObject, public IEventReceiver {
+public:
+ SubSystemClassBase(IRTObject* parent, std::string name);
+ virtual ~SubSystemClassBase();
+
+ void init();
+ virtual void instantiateMessageServices() = 0;
+ virtual void instantiateActors() = 0;
+
+ void start(bool singlethreaded);
+ void stop(bool singlethreaded);
+ void runOnce();
+
+ void destroy();
+
+ MessageService* getMsgService(int idx) const;
+
+ ActorClassBase* getInstance(unsigned int i);
+ ActorClassBase* getInstance(std::string path);
+
+ //---------------------------------------------
+ // this is to run integration tests
+ //---------------------------------------------
+ // TODO synchronized
+ void setTestSemaphore(TestSemaphore& sem);
+ //TODO synchronized
+ int getTestErrorCode() const;
+ void testFinished(int errorCode);
+
+protected:
+ RTSystemServicesProtocolConjPortRepl* m_RTSystemPort;
+ //--------------------- interface item IDs
+ static const int IFITEM_RTSystemPort = 0;
+ std::vector<ActorClassBase*> m_instances;
+private:
+ TestSemaphore* m_testSem;
+ int m_testErrorCode;
+
+ SubSystemClassBase();
+ SubSystemClassBase(const SubSystemClassBase& right);
+ SubSystemClassBase& operator=(const SubSystemClassBase& right);
+};
+
+} /* namespace etRuntime */
+#endif /* SUBSYSTEMCLASSBASE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp
index 108c7a8a5..9348c0d84 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp
@@ -1,123 +1,123 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "common/modelbase/SubSystemRunnerBase.h"
-#include "common/modelbase/SubSystemClassBase.h"
-#include "common/platform/etTimer.h"
-#include <unistd.h>
-#include <iostream>
-#include <sstream>
-
-namespace etRuntime {
-
-const std::string SubSystemRunnerBase::OPTION_RUN_AS_TEST = "-run_as_test";
-const std::string SubSystemRunnerBase::OPTION_RUN_AS_TEST_SINGLETHREADED = "-run_as_test_single_threaded";
-const std::string SubSystemRunnerBase::OPTION_RUN_SINGLETHREADED = "-run_single_threaded";
-
-TestSemaphore SubSystemRunnerBase::s_testSem;
-
-SubSystemRunnerBase::SubSystemRunnerBase() {
-}
-
-SubSystemRunnerBase::~SubSystemRunnerBase() {
-}
-
-void SubSystemRunnerBase::run(SubSystemClassBase& mainComponent, int argc, char* argv[] ) {
-
- //etUserEntry(); /* platform specific */
-
- std::cout << "*** T H E B E G I N ***" << std::endl;
-
- bool test = false;
- bool singleThreaded = false;
- int cycles = 100;
-
- for (int i=1; i<argc; ++i) { // omit first argument, which is the program name
- if (SubSystemRunnerBase::OPTION_RUN_AS_TEST.compare(argv[i]) == 0) {
- std::cout << "*** running as test" << std::endl;
- test = true;
- }
- else if (SubSystemRunnerBase::OPTION_RUN_AS_TEST_SINGLETHREADED.compare(argv[i]) == 0) {
-
- singleThreaded = true;
- i++;
- if (i < argc) {
- std::stringstream sstr(argv[i]);
- sstr >> cycles;
- }
- std::cout << "*** running as test singlethreaded " << cycles << " cycles" << std::endl;
- }
- else if (SubSystemRunnerBase::OPTION_RUN_SINGLETHREADED.compare(argv[i]) == 0) {
-
- singleThreaded = true;
- i++;
- if (i < argc) {
- std::stringstream sstr(argv[i]);
- sstr >> cycles;
- }
- std::cout << "*** running singlethreaded " << cycles << " cycles" << std::endl;
- }
- else {
- std::cout << "*** running multithreaded" << std::endl;
- }
- }
-
- if (test)
- mainComponent.setTestSemaphore(s_testSem);
-
- mainComponent.init(); // lifecycle init
- mainComponent.start(singleThreaded); // lifecycle start
-
- // application runs until quit
- if (test) {
- waitForTestcase();
- }
- else if (singleThreaded){
- waitAndPollSingleThreaded(mainComponent, cycles);
- }
- else {
- waitForQuitMultiThreaded();
- }
- // end the lifecycle
- mainComponent.stop(singleThreaded); // lifecycle stop
- mainComponent.destroy(); // lifecycle destroy
-
- std::cout << "*** T H E E N D ***" << std::endl;
-
- //etUserExit(); /* platform specific */
-}
-
-void SubSystemRunnerBase::waitForTestcase() {
- //std::cout << "=== waitForTestcase: before acq. semaphore, thread " << Thread.currentThread().getName() << std::endl;
- s_testSem.take();
- //std::cout << "=== waitForTestcase: after acq. semaphore, thread " << Thread.currentThread().getName() << std::endl;
-}
-
-void SubSystemRunnerBase::waitForQuitMultiThreaded() {
- // waiting for command line input
- std::string token = "";
- std::cout << "type 'quit' to exit" << std::endl;
- while (token != "quit") {
- std::getline(std::cin, token);
- std::cout << "echo: " << token << std::endl;
- }
-}
-
-void SubSystemRunnerBase::waitAndPollSingleThreaded(SubSystemClassBase& mainComponent, int cycles) {
- for (int i=0; i< cycles; ++i) {
- if (etTimer_executeNeeded()) {
- mainComponent.runOnce();
- }
- usleep(100000);
- }
-}
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "common/modelbase/SubSystemRunnerBase.h"
+#include "common/modelbase/SubSystemClassBase.h"
+#include "common/platform/etTimer.h"
+#include <unistd.h>
+#include <iostream>
+#include <sstream>
+
+namespace etRuntime {
+
+const std::string SubSystemRunnerBase::OPTION_RUN_AS_TEST = "-run_as_test";
+const std::string SubSystemRunnerBase::OPTION_RUN_AS_TEST_SINGLETHREADED = "-run_as_test_single_threaded";
+const std::string SubSystemRunnerBase::OPTION_RUN_SINGLETHREADED = "-run_single_threaded";
+
+TestSemaphore SubSystemRunnerBase::s_testSem;
+
+SubSystemRunnerBase::SubSystemRunnerBase() {
+}
+
+SubSystemRunnerBase::~SubSystemRunnerBase() {
+}
+
+void SubSystemRunnerBase::run(SubSystemClassBase& mainComponent, int argc, char* argv[] ) {
+
+ //etUserEntry(); /* platform specific */
+
+ std::cout << "*** T H E B E G I N ***" << std::endl;
+
+ bool test = false;
+ bool singleThreaded = false;
+ int cycles = 100;
+
+ for (int i=1; i<argc; ++i) { // omit first argument, which is the program name
+ if (SubSystemRunnerBase::OPTION_RUN_AS_TEST.compare(argv[i]) == 0) {
+ std::cout << "*** running as test" << std::endl;
+ test = true;
+ }
+ else if (SubSystemRunnerBase::OPTION_RUN_AS_TEST_SINGLETHREADED.compare(argv[i]) == 0) {
+
+ singleThreaded = true;
+ i++;
+ if (i < argc) {
+ std::stringstream sstr(argv[i]);
+ sstr >> cycles;
+ }
+ std::cout << "*** running as test singlethreaded " << cycles << " cycles" << std::endl;
+ }
+ else if (SubSystemRunnerBase::OPTION_RUN_SINGLETHREADED.compare(argv[i]) == 0) {
+
+ singleThreaded = true;
+ i++;
+ if (i < argc) {
+ std::stringstream sstr(argv[i]);
+ sstr >> cycles;
+ }
+ std::cout << "*** running singlethreaded " << cycles << " cycles" << std::endl;
+ }
+ else {
+ std::cout << "*** running multithreaded" << std::endl;
+ }
+ }
+
+ if (test)
+ mainComponent.setTestSemaphore(s_testSem);
+
+ mainComponent.init(); // lifecycle init
+ mainComponent.start(singleThreaded); // lifecycle start
+
+ // application runs until quit
+ if (test) {
+ waitForTestcase();
+ }
+ else if (singleThreaded){
+ waitAndPollSingleThreaded(mainComponent, cycles);
+ }
+ else {
+ waitForQuitMultiThreaded();
+ }
+ // end the lifecycle
+ mainComponent.stop(singleThreaded); // lifecycle stop
+ mainComponent.destroy(); // lifecycle destroy
+
+ std::cout << "*** T H E E N D ***" << std::endl;
+
+ //etUserExit(); /* platform specific */
+}
+
+void SubSystemRunnerBase::waitForTestcase() {
+ //std::cout << "=== waitForTestcase: before acq. semaphore, thread " << Thread.currentThread().getName() << std::endl;
+ s_testSem.take();
+ //std::cout << "=== waitForTestcase: after acq. semaphore, thread " << Thread.currentThread().getName() << std::endl;
+}
+
+void SubSystemRunnerBase::waitForQuitMultiThreaded() {
+ // waiting for command line input
+ std::string token = "";
+ std::cout << "type 'quit' to exit" << std::endl;
+ while (token != "quit") {
+ std::getline(std::cin, token);
+ std::cout << "echo: " << token << std::endl;
+ }
+}
+
+void SubSystemRunnerBase::waitAndPollSingleThreaded(SubSystemClassBase& mainComponent, int cycles) {
+ for (int i=0; i< cycles; ++i) {
+ if (etTimer_executeNeeded()) {
+ mainComponent.runOnce();
+ }
+ usleep(100000);
+ }
+}
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h
index c2f2ec1c0..971c38cdf 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef SUBSYSTEMRUNNERBASE_H_
-#define SUBSYSTEMRUNNERBASE_H_
-
-#include <iostream>
-#include <string>
-#include "common/modelbase/TestSemaphore.h"
-
-namespace etRuntime {
-
-class SubSystemClassBase;
-
-class SubSystemRunnerBase {
-public:
- SubSystemRunnerBase();
- ~SubSystemRunnerBase();
- static void run(SubSystemClassBase& mainComponent, int argc, char* argv[] );
-
-protected:
- /**
- * blocks until the String "quit" is entered on the console
- */
- static void waitForTestcase();
- static TestSemaphore s_testSem;
-
-private:
- static const std::string OPTION_RUN_AS_TEST;
- static const std::string OPTION_RUN_AS_TEST_SINGLETHREADED;
- static const std::string OPTION_RUN_SINGLETHREADED;
- static void waitForQuitMultiThreaded();
- static void waitAndPollSingleThreaded(SubSystemClassBase& mainComponent, int cycles);
-};
-
-} /* namespace etRuntime */
-#endif /* SUBSYSTEMRUNNERBASE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef SUBSYSTEMRUNNERBASE_H_
+#define SUBSYSTEMRUNNERBASE_H_
+
+#include <iostream>
+#include <string>
+#include "common/modelbase/TestSemaphore.h"
+
+namespace etRuntime {
+
+class SubSystemClassBase;
+
+class SubSystemRunnerBase {
+public:
+ SubSystemRunnerBase();
+ ~SubSystemRunnerBase();
+ static void run(SubSystemClassBase& mainComponent, int argc, char* argv[] );
+
+protected:
+ /**
+ * blocks until the String "quit" is entered on the console
+ */
+ static void waitForTestcase();
+ static TestSemaphore s_testSem;
+
+private:
+ static const std::string OPTION_RUN_AS_TEST;
+ static const std::string OPTION_RUN_AS_TEST_SINGLETHREADED;
+ static const std::string OPTION_RUN_SINGLETHREADED;
+ static void waitForQuitMultiThreaded();
+ static void waitAndPollSingleThreaded(SubSystemClassBase& mainComponent, int cycles);
+};
+
+} /* namespace etRuntime */
+#endif /* SUBSYSTEMRUNNERBASE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp
index 52440f182..99a43383f 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#include "TestSemaphore.h"
-
-namespace etRuntime {
-
-
-TestSemaphore::~TestSemaphore() {
- sem_destroy(&m_sem);
-}
-
-void TestSemaphore::printWaitingThreads() {
- std::cout << ">>> begin semaphore info >>>" << std::endl;
- int value;
- sem_getvalue(&m_sem, &value);
- std::cout << "value of the semaphore:" << value << std::endl;
-// std::cout << "current thread is " + Thread.currentThread().getName() << std::endl;
-// Collection < Thread > threads = getQueuedThreads();
-// if (threads.isEmpty())
-// std::cout << " no waiting threads" << std::endl;
-// else
-// for (Thread thread : threads) {
-// std::cout << " blocked: " << thread.getName() << std::endl;
-// }
- std::cout << "<<< end semaphore info <<<" << std::endl;
-}
-
-} /* namespace etRuntime */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#include "TestSemaphore.h"
+
+namespace etRuntime {
+
+
+TestSemaphore::~TestSemaphore() {
+ sem_destroy(&m_sem);
+}
+
+void TestSemaphore::printWaitingThreads() {
+ std::cout << ">>> begin semaphore info >>>" << std::endl;
+ int value;
+ sem_getvalue(&m_sem, &value);
+ std::cout << "value of the semaphore:" << value << std::endl;
+// std::cout << "current thread is " + Thread.currentThread().getName() << std::endl;
+// Collection < Thread > threads = getQueuedThreads();
+// if (threads.isEmpty())
+// std::cout << " no waiting threads" << std::endl;
+// else
+// for (Thread thread : threads) {
+// std::cout << " blocked: " << thread.getName() << std::endl;
+// }
+ std::cout << "<<< end semaphore info <<<" << std::endl;
+}
+
+} /* namespace etRuntime */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h
index 9d1ba1bc0..b65ba9dee 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h
@@ -1,45 +1,45 @@
-/*******************************************************************************
- * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
- * Peter Karlitschek (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef TESTSEMAPHORE_H_
-#define TESTSEMAPHORE_H_
-
-#include <iostream>
-#include <semaphore.h>
-
-namespace etRuntime {
-
-class TestSemaphore { //extends Semaphore
-public:
- TestSemaphore(int permits = 1)
- : m_sem()
- {
- sem_init(&m_sem, 0, permits);
- }
-
- virtual ~TestSemaphore();
-
- void give() { sem_post(&m_sem); };
- void take() { sem_wait(&m_sem); };
-
- void printWaitingThreads();
-
-private:
- sem_t m_sem;
-
- TestSemaphore(const TestSemaphore& right);
- TestSemaphore& operator=(const TestSemaphore& right);
-
-};
-
-} /* namespace etRuntime */
-#endif /* TESTSEMAPHORE_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 Draeger Medical GmbH (http://www.draeger.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:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef TESTSEMAPHORE_H_
+#define TESTSEMAPHORE_H_
+
+#include <iostream>
+#include <semaphore.h>
+
+namespace etRuntime {
+
+class TestSemaphore { //extends Semaphore
+public:
+ TestSemaphore(int permits = 1)
+ : m_sem()
+ {
+ sem_init(&m_sem, 0, permits);
+ }
+
+ virtual ~TestSemaphore();
+
+ void give() { sem_post(&m_sem); };
+ void take() { sem_wait(&m_sem); };
+
+ void printWaitingThreads();
+
+private:
+ sem_t m_sem;
+
+ TestSemaphore(const TestSemaphore& right);
+ TestSemaphore& operator=(const TestSemaphore& right);
+
+};
+
+} /* namespace etRuntime */
+#endif /* TESTSEMAPHORE_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/common/platform/etTimer.h b/runtime/org.eclipse.etrice.runtime.cpp/src/common/platform/etTimer.h
index 4f2c25bb9..449c5588a 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/common/platform/etTimer.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/common/platform/etTimer.h
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * 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)
- *
- *******************************************************************************/
-
-#ifndef _ETTIMER_H_
-#define _ETTIMER_H_
-
-#include "etDatatypes.h"
-
-typedef struct etTargetTime {
- unsigned long nSec;
- unsigned long sec;
-} etTargetTime_t;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-void etTimer_init(void);
-
-uint32 getNSecFromTarget(void);
-uint32 getSecFromTarget(void);
-
-void getTimeFromTarget(etTargetTime_t *t);
-
-int isTimeGreaterThanActualTime(const etTargetTime_t *t);
-
-etBool etTimer_executeNeeded(void);
-
-uint32 getTimeBaseNS(void);
-
-uint32 getTimeBaseUS(void);
-
-uint32 getTimeBaseMS(void);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __ETTIMER_H__ */
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * 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)
+ *
+ *******************************************************************************/
+
+#ifndef _ETTIMER_H_
+#define _ETTIMER_H_
+
+#include "etDatatypes.h"
+
+typedef struct etTargetTime {
+ unsigned long nSec;
+ unsigned long sec;
+} etTargetTime_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+void etTimer_init(void);
+
+uint32 getNSecFromTarget(void);
+uint32 getSecFromTarget(void);
+
+void getTimeFromTarget(etTargetTime_t *t);
+
+int isTimeGreaterThanActualTime(const etTargetTime_t *t);
+
+etBool etTimer_executeNeeded(void);
+
+uint32 getTimeBaseNS(void);
+
+uint32 getTimeBaseUS(void);
+
+uint32 getTimeBaseMS(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __ETTIMER_H__ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/config/etRuntimeConfig.h b/runtime/org.eclipse.etrice.runtime.cpp/src/config/etRuntimeConfig.h
index b1759ab47..379729eea 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/config/etRuntimeConfig.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/config/etRuntimeConfig.h
@@ -1,33 +1,33 @@
-/*******************************************************************************
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * 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 Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef ETGLOBALFLAGS_H_
-#define ETGLOBALFLAGS_H_
-
-/* flags for debugging */
-#define ET_MSC_LOGGER_ACTIVATE /* needs ET_LOGGER_ACTIVATE */
-#define ET_LOGGER_ACTIVATE
-
-
-#define STRUCT_ALIGN 8
-
-/* timing and scheduling */
-#define FREQUENCY 10L
-#define ET_RUNTIME_MAXLOOP 100
-//#define ET_RUNTIME_ENDLESS
-
-/* pool and block size */
-#define MESSAGE_POOL_MAX 50
-#define MESSAGE_BLOCK_SIZE 64
-
-
-#endif /* ETGLOBALFLAGS_H_ */
+/*******************************************************************************
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * 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 Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef ETGLOBALFLAGS_H_
+#define ETGLOBALFLAGS_H_
+
+/* flags for debugging */
+#define ET_MSC_LOGGER_ACTIVATE /* needs ET_LOGGER_ACTIVATE */
+#define ET_LOGGER_ACTIVATE
+
+
+#define STRUCT_ALIGN 8
+
+/* timing and scheduling */
+#define FREQUENCY 10L
+#define ET_RUNTIME_MAXLOOP 100
+//#define ET_RUNTIME_ENDLESS
+
+/* pool and block size */
+#define MESSAGE_POOL_MAX 50
+#define MESSAGE_BLOCK_SIZE 64
+
+
+#endif /* ETGLOBALFLAGS_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.cpp/src/platforms/generic/etDatatypes.h b/runtime/org.eclipse.etrice.runtime.cpp/src/platforms/generic/etDatatypes.h
index dfae6df6c..3792040e4 100644
--- a/runtime/org.eclipse.etrice.runtime.cpp/src/platforms/generic/etDatatypes.h
+++ b/runtime/org.eclipse.etrice.runtime.cpp/src/platforms/generic/etDatatypes.h
@@ -1,77 +1,77 @@
-/*******************************************************************************
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * 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 Schuetz (initial contribution)
- *
- *******************************************************************************/
-
-#ifndef _ETDATATYPES_H_
-#define _ETDATATYPES_H_
-
-/*
- * typedefs for platform specific datatypes
- * generic Version for most bigger 32 and 64 bit platforms like Linux an Windows
- *
- * */
-
-#include <stdio.h>
-
-/* unsigned integer datatypes */
-typedef unsigned char uint8;
-typedef unsigned short int uint16;
-typedef unsigned long uint32;
-typedef unsigned long long uint64;
-
-/* signed integer datatypes */
-typedef char int8;
-typedef short int int16;
-typedef long int32;
-typedef long long int64;
-
-
-/* float datatypes */
-typedef float float32;
-typedef double float64;
-
-/* boolean datatypes and values */
-
-#ifndef __cplusplus
-typedef char bool; /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
-#endif /* __cplusplus */
-
-//typedef bool boolean;
-#ifndef TRUE
- #define TRUE 1
-#endif
-#ifndef FALSE
- #define FALSE 0
-#endif
-
-/*
- * typedefs for eTrice Runtime and Testing
- *
- * */
-
-typedef int8 etInt8;
-typedef int16 etInt16;
-typedef int32 etInt32;
-
-typedef uint8 etUInt8;
-typedef uint16 etUInt16;
-typedef uint32 etUInt32;
-
-typedef bool etBool;
-
-typedef float32 etFloat32;
-typedef float64 etFloat64;
-
-typedef FILE* etFileHandle;
-
-typedef int8 etAddressId;
-
-#endif /* _DATATYPES_H_ */
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * 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 Schuetz (initial contribution)
+ *
+ *******************************************************************************/
+
+#ifndef _ETDATATYPES_H_
+#define _ETDATATYPES_H_
+
+/*
+ * typedefs for platform specific datatypes
+ * generic Version for most bigger 32 and 64 bit platforms like Linux an Windows
+ *
+ * */
+
+#include <stdio.h>
+
+/* unsigned integer datatypes */
+typedef unsigned char uint8;
+typedef unsigned short int uint16;
+typedef unsigned long uint32;
+typedef unsigned long long uint64;
+
+/* signed integer datatypes */
+typedef char int8;
+typedef short int int16;
+typedef long int32;
+typedef long long int64;
+
+
+/* float datatypes */
+typedef float float32;
+typedef double float64;
+
+/* boolean datatypes and values */
+
+#ifndef __cplusplus
+typedef char bool; /* TODO: bool, Bool, Boolean, and boolean are already defined in some platforms*/
+#endif /* __cplusplus */
+
+//typedef bool boolean;
+#ifndef TRUE
+ #define TRUE 1
+#endif
+#ifndef FALSE
+ #define FALSE 0
+#endif
+
+/*
+ * typedefs for eTrice Runtime and Testing
+ *
+ * */
+
+typedef int8 etInt8;
+typedef int16 etInt16;
+typedef int32 etInt32;
+
+typedef uint8 etUInt8;
+typedef uint16 etUInt16;
+typedef uint32 etUInt32;
+
+typedef bool etBool;
+
+typedef float32 etFloat32;
+typedef float64 etFloat64;
+
+typedef FILE* etFileHandle;
+
+typedef int8 etAddressId;
+
+#endif /* _DATATYPES_H_ */

Back to the top