summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Karlitschek2013-02-06 04:08:43 (EST)
committer Peter Karlitschek2013-02-06 04:23:00 (EST)
commit4112c37a5a030998e70e456d91568b6181a759d6 (patch)
tree6de80bba48865831d147236c37662f0c9c731deb
parentcaf23609e5b0f58e31d88b35d570ca3bb818eb9e (diff)
downloadorg.eclipse.etrice-4112c37a5a030998e70e456d91568b6181a759d6.zip
org.eclipse.etrice-4112c37a5a030998e70e456d91568b6181a759d6.tar.gz
org.eclipse.etrice-4112c37a5a030998e70e456d91568b6181a759d6.tar.bz2
Cleanup cpp generator + runtime. License comments added.
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend16
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend17
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend1
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend17
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend7
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend17
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend16
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.cpp26
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/DebuggingService.h27
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.cpp19
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCFilter.h21
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.cpp37
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/debugging/MSCLogger.h29
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/AbstractMessageReceiver.h15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Address.h51
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IMessageReceiver.h15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.cpp16
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/IRTObject.h19
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/Message.h18
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageDispatcher.h50
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageSeQueue.h59
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.cpp46
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageService.h23
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.cpp21
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/MessageServiceController.h15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.cpp65
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTObject.h29
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTServices.h17
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.cpp16
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/messaging/RTSystemServicesProtocol.h17
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/ActorClassBase.h15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/EventReceiver.h16
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/IEventReceiver.h17
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.cpp33
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/InterfaceItemBase.h17
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/PortBase.h20
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.cpp18
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemClassBase.h16
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/SubSystemRunnerBase.h18
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.cpp15
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/src/common/modelbase/TestSemaphore.h15
55 files changed, 711 insertions, 399 deletions
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
index 268bf81..23cf3f7 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.xtend
@@ -1,4 +1,14 @@
-
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen
@@ -18,6 +28,10 @@ import org.eclipse.etrice.generator.cpp.GeneratorOptions
import static extension org.eclipse.etrice.core.room.util.RoomHelpers.*
import org.eclipse.etrice.core.room.ActorCommunicationType
+/**
+ * @author Peter Karlitschek
+ *
+ */
@Singleton
class ActorClassGen extends GenericActorClassGenerator {
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
index 25375c7..ef0a402 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.xtend
@@ -7,6 +7,7 @@
*
* CONTRIBUTORS:
* Juergen Haug
+ * Peter Karlitschek
*
*******************************************************************************/
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
index 11b69b5..1e2ef46 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/CppExtensions.xtend
@@ -7,6 +7,7 @@
*
* CONTRIBUTORS:
* Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
+ * Peter Karlitschek
*
*******************************************************************************/
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
index ed88dc3..41699a2 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/DataClassGen.xtend
@@ -1,4 +1,14 @@
-
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen
@@ -19,7 +29,10 @@ import org.eclipse.etrice.generator.cpp.GeneratorOptions
import static extension org.eclipse.etrice.core.room.util.RoomHelpers.*
-
+/**
+ * @author Peter Karlitschek
+ *
+ */
@Singleton
class DataClassGen {
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
index ea260c6..6b1d729 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/Initialization.xtend
@@ -7,6 +7,7 @@
*
* CONTRIBUTORS:
* Henrik Rentz-Reichert (initial contribution)
+ * Peter Karlitschek
*
*******************************************************************************/
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend
index 87658c1..d6b72e8 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/MainGen.xtend
@@ -7,6 +7,7 @@
*
* CONTRIBUTORS:
* Henrik Rentz-Reichert (initial contribution)
+ * Peter Karlitschek
*
*******************************************************************************/
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
index 93ad2f3..1541e04 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.xtend
@@ -1,4 +1,14 @@
-
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen
@@ -24,7 +34,10 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.core.room.PortClass
import org.eclipse.etrice.generator.cpp.GeneratorOptions
-
+/**
+ * @author Peter Karlitschek
+ *
+ */
@Singleton
class ProtocolClassGen extends GenericProtocolClassGenerator {
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend
index 67549ef..f59aa20 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.xtend
@@ -7,6 +7,7 @@
*
* CONTRIBUTORS:
* Henrik Rentz-Reichert (initial contribution)
+ * Peter Karlitschek
*
*******************************************************************************/
@@ -21,7 +22,11 @@ import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass
import org.eclipse.etrice.generator.generic.GenericStateMachineGenerator
import org.eclipse.etrice.generator.generic.RoomExtensions
-@Singleton
+/**
+ * @author Peter Karlitschek
+ *
+ */
+ @Singleton
class StateMachineGen extends GenericStateMachineGenerator {
@Inject extension RoomExtensions
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
index 4f48ae6..589294d 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemClassGen.xtend
@@ -1,4 +1,14 @@
-
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen
@@ -16,7 +26,10 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import static extension org.eclipse.etrice.generator.base.Indexed.*
import org.eclipse.etrice.generator.base.IDataConfiguration
-
+/**
+ * @author Peter Karlitschek
+ *
+ */
@Singleton
class SubSystemClassGen {
diff --git a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
index ce8e4e8..5393e23 100644
--- a/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.cpp/src/org/eclipse/etrice/generator/cpp/gen/SubSystemRunnerGen.xtend
@@ -1,4 +1,14 @@
-
+/*******************************************************************************
+ * Copyright (c) 2011 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)
+ *
+ *******************************************************************************/
package org.eclipse.etrice.generator.cpp.gen
import com.google.inject.Inject
@@ -9,6 +19,10 @@ import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance
import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
+/**
+ * @author Peter Karlitschek
+ *
+ */
@Singleton
class SubSystemRunnerGen {
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 dd17958..a2e2abc 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,9 +1,15 @@
-/*
- * DebuggingService.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
+
#include "DebuggingService.h"
#include "common/modelbase/ActorClassBase.h"
@@ -25,31 +31,31 @@ DebuggingService::~DebuggingService() {
void DebuggingService::addMessageAsyncOut(Address source, Address target,
- std::string msg) {
+ const std::string& msg) {
asyncLogger.addMessageAsyncOut(portInstances.at(source)->getActorPath(),
portInstances.at(target)->getActorPath(), msg);
}
void DebuggingService::addMessageAsyncIn(Address source, Address target,
- std::string msg) {
+ const std::string& msg) {
asyncLogger.addMessageAsyncIn(portInstances.at(source)->getActorPath(),
portInstances.at(target)->getActorPath(), msg);
}
void DebuggingService::addMessageSyncCall(Address source, Address target,
- std::string msg) {
+ const std::string& msg) {
asyncLogger.addMessageSyncCall(portInstances.at(source)->getActorPath(),
portInstances.at(target)->getActorPath(), msg);
}
void DebuggingService::addMessageSyncReturn(Address source, Address target,
- std::string msg) {
+ const std::string& msg) {
asyncLogger.addMessageSyncReturn(portInstances.at(source)->getActorPath(),
portInstances.at(target)->getActorPath(), msg);
}
void DebuggingService::addActorState(const ActorClassBase& actor,
- std::string state) {
+ const std::string& state) {
asyncLogger.addActorState(actor.getInstancePath(), state);
}
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 ebfeb0f..1768584 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef DEBUGGINGSERVICE_H_
#define DEBUGGINGSERVICE_H_
@@ -15,8 +20,8 @@
#include <map>
namespace etRuntime {
+ class ActorClassBase;
-class ActorClassBase;
class DebuggingService {
private:
@@ -32,11 +37,11 @@ public:
return *s_instance;
}
- void addMessageAsyncOut(Address source, Address target, std::string msg);
- void addMessageAsyncIn(Address source, Address target, std::string msg);
- void addMessageSyncCall(Address source, Address target, std::string msg);
- void addMessageSyncReturn(Address source, Address target, std::string msg);
- void addActorState(const ActorClassBase& actor, std::string state);
+ 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();
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 b50cc8e..c0d0ada 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,9 +1,14 @@
-/*
- * MSCFilter.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 16.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MSCFilter.h"
@@ -19,7 +24,7 @@ void MSCFilter::addFilter(FilterItem filter) {
filterList.push_back(filter);
}
-bool MSCFilter::applyTo(std::string text) {
+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();
@@ -30,7 +35,7 @@ bool MSCFilter::applyTo(std::string text) {
return false;
}
-std::string MSCFilter::reduceString(std::string string) {
+std::string MSCFilter::reduceString(const std::string& string) {
if (filterList.size() == 1)
//TODO: filtering with regular expression
// return string.replaceFirst(filterList.front().filter, "");
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 c1e34c4..d3bbd8c 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 16.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MSCFILTER_H_
#define MSCFILTER_H_
@@ -17,7 +22,7 @@ class MSCFilter {
public:
class FilterItem{
public:
- FilterItem(std::string filter_, bool exclude_)
+ FilterItem(const std::string& filter_, bool exclude_)
: exclude(exclude_),
filter(filter_)
{};
@@ -31,8 +36,8 @@ public:
virtual ~MSCFilter();
void addFilter(FilterItem filter);
- bool applyTo(std::string text);
- std::string reduceString(std::string string);
+ bool applyTo(const std::string& text);
+ std::string reduceString(const std::string& string);
private:
std::list<FilterItem> filterList;
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 42099f8..d36b4c8 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,9 +1,14 @@
-/*
- * MSCLogger.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 16.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MSCLogger.h"
@@ -23,39 +28,39 @@ MSCLogger::~MSCLogger() {
filter = 0;
}
-void MSCLogger::setMSC(std::string msc_name_, std::string path_) {
+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(std::string source, std::string target,
- std::string message) {
+void MSCLogger::addMessageAsyncOut(const std::string& source, const std::string& target,
+ const std::string& message) {
createLine(source, " >-- ", target, message);
}
-void MSCLogger::addMessageAsyncIn(std::string source, std::string target,
- std::string message) {
+void MSCLogger::addMessageAsyncIn(const std::string& source, const std::string& target,
+ const std::string& message) {
createLine(source, " --> ", target, message);
}
-void MSCLogger::addMessageSyncCall(std::string source, std::string target,
- std::string message) {
+void MSCLogger::addMessageSyncCall(const std::string& source, const std::string& target,
+ const std::string& message) {
createLine(source, " ==> ", target, message);
}
-void MSCLogger::addMessageSyncReturn(std::string source, std::string target,
- std::string message) {
+void MSCLogger::addMessageSyncReturn(const std::string& source, const std::string& target,
+ const std::string& message) {
createLine(source, " <== ", target, message);
}
-void MSCLogger::addActorState(std::string actor, std::string state) {
+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(std::string source, std::string mid, std::string target, std::string message) {
+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);
}
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 51827d9..19b9d94 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 16.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MSCLOGGER_H_
#define MSCLOGGER_H_
@@ -21,20 +26,20 @@ public:
MSCLogger();
virtual ~MSCLogger();
- void setMSC(std::string msc_name_, std::string path_);
+ void setMSC(const std::string& msc_name_, const std::string& path_);
//TODO synchronized
void open() {is_open = true; };
//TODO synchronized
- void addMessageAsyncOut(std::string source, std::string target, std::string message);
+ void addMessageAsyncOut(const std::string& source, const std::string& target, const std::string& message);
//TODO synchronized
- void addMessageAsyncIn(std::string source, std::string target, std::string message);
+ void addMessageAsyncIn(const std::string& source, const std::string& target, const std::string& message);
//TODO synchronized
- void addMessageSyncCall(std::string source, std::string target, std::string message);
+ void addMessageSyncCall(const std::string& source, const std::string& target, const std::string& message);
//TODO synchronized
- void addMessageSyncReturn(std::string source, std::string target, std::string message);
+ void addMessageSyncReturn(const std::string& source, const std::string& target, const std::string& message);
//TODO synchronized
- void addActorState(std::string actor, std::string state);
+ void addActorState(const std::string& actor, const std::string& state);
//TODO synchronized
void close();
@@ -42,7 +47,7 @@ public:
MSCFilter* getMSCFilter(){ return filter; };
private:
- void createLine(std::string source, std::string mid, std::string target, std::string message);
+ 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;
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 e48f552..f9d46a4 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef ABSTRACTMESSAGERECEIVER_H_
#define 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 aa1c49e..529f5b7 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,9 +1,14 @@
-/*
- * Address.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "Address.h"
#include <sstream>
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 66a164b..d26acf5 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef ADDRESS_H_
#define ADDRESS_H_
@@ -14,30 +19,30 @@
namespace etRuntime {
class Address {
-public:
- explicit Address(int nodeID=0, int threadID=0, int objectID=0);
- Address(const Address & right);
- Address & operator = (const Address& right);
- bool operator< (const Address& right) const;
- ~Address();
+ public:
+ explicit Address(int nodeID=0, int threadID=0, int objectID=0);
+ Address(const Address & right);
+ ~Address();
- std::string toString() const;
- std::string toID()const;
+ Address & operator = (const Address& right);
+ bool operator< (const Address& right) const;
- Address createInc(int i);
- bool isValid() const {
- return (m_nodeID != 0) || (m_threadID != 0) || (m_objectID != 0);
- };
+ std::string toString() const;
+ std::string toID()const;
- int m_nodeID;
- int m_threadID;
- int m_objectID;
+ Address createInc(int i);
+ bool isValid() const {
+ return (m_nodeID != 0) || (m_threadID != 0) || (m_objectID != 0);
+ };
- //debug helper function
- static void printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses);
+ int m_nodeID;
+ int m_threadID;
+ int m_objectID;
+ //debug helper function
+ static void printAddrVector(const std::vector<std::vector<etRuntime::Address> >& addresses);
-private:
+ private:
};
} /* namespace etRuntime */
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 10b3e12..6406283 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,9 +1,14 @@
-/*
- * IMessageReceiver.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 08.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "IMessageReceiver.h"
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 50dff0f..cc6bdcd 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 08.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef IMESSAGERECEIVER_H_
#define 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 158cb2a..7f7e125 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,10 +1,14 @@
-/*
- * IRTObject.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
-
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "IRTObject.h"
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 e7168c9..8553052 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 16.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef IRTOBJECT_H_
#define IRTOBJECT_H_
@@ -21,8 +26,8 @@ public:
static const char PATHNAME_DELIM = '_';
static const std::string NO_NAME;
- virtual std::string getInstancePath() const = 0;
- virtual std::string getInstancePathName() const = 0;
+ virtual const std::string& getInstancePath() const = 0;
+ virtual const std::string& getInstancePathName() const = 0;
};
}
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 aebf4d1..bef4ff1 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,9 +1,14 @@
-/*
- * Message.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "Message.h"
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 414858c..0b900a5 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MESSAGE_H_
#define MESSAGE_H_
@@ -48,6 +53,9 @@ private:
bool m_logFlag;
Message();
+ Message(const Message & right);
+ Message & operator = (const Message& right);
+
};
} /* namespace etRuntime */
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 f709d47..045e4db 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,9 +1,14 @@
-/*
- * MessageDispatcher.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MessageDispatcher.h"
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 1a246e9..c49628a 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MESSAGEDISPATCHER_H_
#define MESSAGEDISPATCHER_H_
@@ -17,23 +22,24 @@
namespace etRuntime {
class MessageDispatcher : public RTObject, public IMessageReceiver {
-public:
- virtual ~MessageDispatcher();
- MessageDispatcher(IRTObject* parent, Address addr, std::string name);
- 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);
+ 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 */
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 632464f..fcf619c 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,9 +1,14 @@
-/*
- * MessageSeQueue.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MessageSeQueue.h"
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 d7c5351..3e63a6b 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MESSAGESEQUEUE_H_
#define MESSAGESEQUEUE_H_
@@ -15,28 +20,28 @@
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);
+ 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);
};
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 ae1a4ea..07d6fd7 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,9 +1,14 @@
-/*
- * MessageService.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MessageService.h"
#include <iostream>
@@ -22,11 +27,8 @@ extern "C" {
}
MessageService::MessageService(IRTObject* parent, Address addr, std::string name, int priority)
- : // super("MessageService "+name),
- IMessageReceiver(),
- IRTObject(),
- m_parent(parent),
- m_name(name),
+ : IMessageReceiver(),
+ RTObject(parent, name),
m_running(false),
m_thread(),
m_mutex(),
@@ -56,7 +58,6 @@ MessageService::MessageService(IRTObject* parent, Address addr, std::string name
}
MessageService::~MessageService() {
- m_parent = 0;
pthread_attr_destroy(&m_threadAttr);
pthread_mutex_destroy(&m_mutex);
pthread_cond_destroy(&m_conditionVar);
@@ -66,10 +67,10 @@ MessageService::~MessageService() {
void MessageService::start(bool singlethreaded) {
if (singlethreaded) {
- std::cout << "starting message service " << m_name << " singlethreaded" << std::endl;
+ std::cout << "starting message service " << getName() << " singlethreaded" << std::endl;
}
else {
- std::cout << "starting message service " << m_name << " on own thread" << std::endl;
+ 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;
@@ -92,7 +93,7 @@ void MessageService::run() {
pollOneMessage();
usleep(10000);
}
- std::cout << "ending message service " << m_name << " on own thread" << std::endl;
+ std::cout << "ending message service " << getName() << " on own thread" << std::endl;
}
void MessageService::runOnce() {
@@ -114,23 +115,6 @@ void MessageService::receive(Message* msg) {
pthread_mutex_unlock(&m_mutex);
}
-std::string MessageService::getInstancePath() const {
- std::string path = PATH_DELIM + m_name;
-
- if (m_parent != 0)
- path = m_parent->getInstancePath() + path;
-
- return path;
-}
-
-std::string MessageService::getInstancePathName() const {
- std::string path = PATHNAME_DELIM + m_name;
-
- if (m_parent != 0)
- path = m_parent->getInstancePathName() + path;
-
- return path;
-}
// TODO: synchronized
void MessageService::terminate() {
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 6eb6ae6..e34b17a 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MESSAGESERVICE_H_
#define MESSAGESERVICE_H_
@@ -20,16 +25,14 @@ namespace etRuntime {
//TODO: abstraction from posix threads missing
-class MessageService: public IMessageReceiver, public IRTObject {
+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; } ;
- std::string getName() const { return m_name; };
void start(bool singlethreaded);
-
void run();
// for single threaded configuration only
void runOnce();
@@ -39,8 +42,6 @@ public:
void receive(Message* msg);
virtual MessageDispatcher& getMessageDispatcher() { return m_messageDispatcher; }
- virtual std::string getInstancePath() const ;
- virtual std::string getInstancePathName() const ;
virtual bool isMsgService() const { return true;};
void addAsyncActor(IEventReceiver& evtReceiver);
@@ -56,8 +57,6 @@ private:
//TODO: synchronized
void pollOneMessage();
- IRTObject* m_parent;
- std::string m_name;
bool m_running;
pthread_t m_thread;
pthread_mutex_t m_mutex;
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 ad6d7b1..fbf9033 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,9 +1,14 @@
-/*
- * MessageServiceController.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "MessageServiceController.h"
@@ -22,7 +27,7 @@ MessageServiceController::MessageServiceController(/*IRTObject parent*/)
}
void MessageServiceController::addMsgSvc(MessageService& msgSvc) {
- // TODOTS: Who is parent of MessageServices ?
+ // TODO TS: Who is parent of MessageServices ?
//TODO assert
//assert(msgSvc.getAddress().m_threadID == m_messageServiceList.size());
m_messageServiceList.push_back(&msgSvc);
@@ -48,7 +53,7 @@ void MessageServiceController::start(bool singlethreaded) {
for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
it != m_messageServiceList.end(); ++it) {
(*it)->start(singlethreaded);
- // TODOTS: start in order of priorities
+ // TODO TS: start in order of priorities
}
m_running = true;
}
@@ -96,7 +101,7 @@ void MessageServiceController::terminate() {
for (std::vector<MessageService*>::iterator it = m_messageServiceList.begin();
it != m_messageServiceList.end(); ++it) {
(*it)->terminate();
- // TODOTS: stop in order of priorities
+ //TODO TS: stop in order of priorities
}
}
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 8ea6bf3..d975233 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef MESSAGESERVICECONTROLLER_H_
#define 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 490d5ae..2ccccb5 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,28 +1,46 @@
-/*
- * RTObject.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "RTObject.h"
namespace etRuntime {
RTObject::RTObject() :
- IRTObject(), m_parent(0), m_name(NO_NAME) {
+ 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) {
+ 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_name(right.m_name),
+ m_instancePath(right.m_instancePath),
+ m_instancePathName(right.m_instancePathName)
{
-};
+}
RTObject & RTObject::operator = (RTObject right) {
std::swap(right, *this);
@@ -33,22 +51,23 @@ RTObject::~RTObject() {
m_parent = 0;
}
-std::string RTObject::getInstancePath() const{
- std::string path = PATH_DELIM + m_name;
-
- if (m_parent != 0)
- path = m_parent->getInstancePath() + path;
-
- return path;
+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;
+ }
}
-std::string RTObject::getInstancePathName() const{
- std::string path = PATHNAME_DELIM + m_name;
-
- if (m_parent != 0)
- path = m_parent->getInstancePathName() + path;
+const std::string& RTObject::getInstancePath() const{
+ return m_instancePath;
+}
- return path;
+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 530fb66..60266b1 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef RTOBJECT_H_
#define RTOBJECT_H_
@@ -22,13 +27,21 @@ public:
virtual ~RTObject();
- virtual IRTObject* getParent() const { return m_parent; };
- virtual std::string getInstancePath() const;
- virtual std::string getInstancePathName() const;
+ 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;
};
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 09e966b..0d7ad98 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,9 +1,14 @@
-/*
- * RTServices.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "RTServices.h"
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 05348de..8bebd49 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 22.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef RTSERVICES_H_
#define RTSERVICES_H_
@@ -38,6 +43,8 @@ private:
MessageServiceController* m_messageServiceController;
RTServices();
+ RTServices(const RTServices & right);
+ RTServices & operator = (const RTServices& right);
};
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 ea4520b..9633408 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,9 +1,14 @@
-/*
- * RTSystemServicesProtocol.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "RTSystemServicesProtocol.h"
#include "common/debugging/DebuggingService.h"
@@ -175,7 +180,6 @@ void RTSystemServicesProtocolConjPort::stopDebugging() {
// RTSystemServicesProtocolConjPortRepl
//------------------------------------------------------------------
-//TODO: data type of addr and peerAddress
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()),
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 f8852c5..ccdb388 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef RTSYSTEMSERVICESPROTOCOL_H_
#define RTSYSTEMSERVICESPROTOCOL_H_
@@ -92,7 +97,6 @@ public:
RTSystemServicesProtocolPort* m_ports;
public:
- //TODO: data type of addr and peerAddress?
RTSystemServicesProtocolPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
const std::vector<Address>& addr, const std::vector<Address> peerAddress);
@@ -129,7 +133,6 @@ public:
RTSystemServicesProtocolConjPort* m_ports; //dynamic array used instead of vector to avoid copy construction
public:
- //TODO: data type of addr and peerAddress
RTSystemServicesProtocolConjPortRepl(IEventReceiver& actor, IRTObject* parent, std::string name, int localId,
const std::vector<Address>& addr, const std::vector<Address>& peerAddress);
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 0020249..3c8c872 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,9 +1,14 @@
-/*
- * ActorClassBase.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "ActorClassBase.h"
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 947c54c..30b0d33 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,11 +1,14 @@
-/*
- * 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
*
- * The base class for model actor classes.
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ *******************************************************************************/
#ifndef ACTORCLASSBASE_H_
#define 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 64026d8..10c0a59 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,9 +1,14 @@
-/*
- * EventReceiver.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "EventReceiver.h"
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 05cad0c..1bb6996 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,11 +1,14 @@
-/*
- * 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
*
- * The abstract base class for event receivers.
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ *******************************************************************************/
#ifndef EVENTRECEIVER_H_
#define EVENTRECEIVER_H_
@@ -25,6 +28,7 @@ public:
virtual ~EventReceiver();
private:
+ EventReceiver();
EventReceiver(const EventReceiver& right);
EventReceiver& operator=(const EventReceiver& right);
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 976cda3..558ec8e 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,9 +1,14 @@
-/*
- * IEventReceiver.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 08.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "IEventReceiver.h"
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 c6966c3..7b75e68 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 08.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef IEVENTRECEIVER_H_
#define IEVENTRECEIVER_H_
@@ -11,7 +16,7 @@
#include "common/messaging/IRTObject.h"
namespace etRuntime {
-class InterfaceItemBase;
+ class InterfaceItemBase;
class IEventReceiver {
public:
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 2331695..5560db0 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,9 +1,14 @@
-/*
- * InterfaceItemBaase.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "InterfaceItemBase.h"
#include "common/messaging/AbstractMessageReceiver.h"
@@ -31,9 +36,25 @@ InterfaceItemBase::InterfaceItemBase (IEventReceiver& evtReceiver, IRTObject* pa
}
}
+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() {
- // TODO Auto-generated destructor stub
+ 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 857a026..70d9779 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,9 +1,14 @@
-/*
- * InterfaceItemBaase.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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef INTERFACEITEMBASE_H_
#define INTERFACEITEMBASE_H_
@@ -21,6 +26,7 @@ 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; } ;
@@ -48,6 +54,7 @@ private:
IEventReceiver* m_eventReceiver;
InterfaceItemBase();
+ InterfaceItemBase & operator = (const InterfaceItemBase& right);
};
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 8e5170e..7390106 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,9 +1,14 @@
-/*
- * PortBase.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "PortBase.h"
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 f7ffb66..2f2fa29 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 06.06.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef PORTBASE_H_
#define PORTBASE_H_
@@ -19,6 +24,10 @@ 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);
@@ -26,6 +35,7 @@ public:
private:
PortBase();
+ PortBase & operator = (const PortBase& right);
};
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 9d39227..1a23bbb 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,9 +1,14 @@
-/*
- * SubSystemClassBase.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 31.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "SubSystemClassBase.h"
#include "common/messaging/MessageService.h"
@@ -15,7 +20,8 @@ namespace etRuntime {
SubSystemClassBase::~SubSystemClassBase() {
- // TODO Auto-generated destructor stub
+ m_testSem = 0;
+ m_RTSystemPort = 0;
}
SubSystemClassBase::SubSystemClassBase(IRTObject* parent, std::string name)
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 e7609c7..526cc93 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,12 +1,14 @@
-/*
- * 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
*
- * The base class for all SubSystems.
- * It and its derived classes take care of the instantiation, binding (connection) and complete lifecycle of all Actor Classes of a SubSystem
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
*
- * Created on: 31.08.2012
- * Author: karlitsc
- */
+ *******************************************************************************/
#ifndef SUBSYSTEMCLASSBASE_H_
#define 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 996a3a9..108c7a8 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,9 +1,14 @@
-/*
- * SubSystemRunnerBase.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "common/modelbase/SubSystemRunnerBase.h"
#include "common/modelbase/SubSystemClassBase.h"
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 824bf2f..c2f2ec1 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,21 +1,21 @@
-/*
- * 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
*
- * The base class for running components.
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
*
- * Created on: 29.08.2012
- * Author: karlitsc
- */
+ *******************************************************************************/
#ifndef SUBSYSTEMRUNNERBASE_H_
#define SUBSYSTEMRUNNERBASE_H_
#include <iostream>
#include <string>
-#ifdef WIN32
-#include <windows.h>
#include "common/modelbase/TestSemaphore.h"
-#endif
namespace etRuntime {
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 c62f4c0..52440f1 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,9 +1,14 @@
-/*
- * TestSemaphore.cpp
+/*******************************************************************************
+ * 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
*
- * Created on: 31.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#include "TestSemaphore.h"
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 6859e95..9d1ba1b 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,9 +1,14 @@
-/*
- * 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
*
- * Created on: 31.08.2012
- * Author: karlitsc
- */
+ * CONTRIBUTORS:
+ * Peter Karlitschek (initial contribution)
+ *
+ *******************************************************************************/
#ifndef TESTSEMAPHORE_H_
#define TESTSEMAPHORE_H_