1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*
* DebuggingService.cpp
*
* Created on: 06.06.2012
* Author: karlitsc
*/
#include "DebuggingService.h"
#include "common/modelbase/ActorClassBase.h"
namespace etRuntime {
DebuggingService* DebuggingService::s_instance = 0;
DebuggingService::DebuggingService()
: asyncLogger() ,
syncLogger(),
portInstances()
{
}
DebuggingService::~DebuggingService() {
}
void DebuggingService::addMessageAsyncOut(Address source, Address target,
std::string msg) {
asyncLogger.addMessageAsyncOut(portInstances.at(source)->getActorRTObject().getInstancePath(),
portInstances.at(target)->getActorRTObject().getInstancePath(), msg);
}
void DebuggingService::addMessageAsyncIn(Address source, Address target,
std::string msg) {
asyncLogger.addMessageAsyncIn(portInstances.at(source)->getActorRTObject().getInstancePath(),
portInstances.at(target)->getActorRTObject().getInstancePath(), msg);
}
void DebuggingService::addMessageSyncCall(Address source, Address target,
std::string msg) {
asyncLogger.addMessageSyncCall(portInstances.at(source)->getActorRTObject().getInstancePath(),
portInstances.at(target)->getActorRTObject().getInstancePath(), msg);
}
void DebuggingService::addMessageSyncReturn(Address source, Address target,
std::string msg) {
asyncLogger.addMessageSyncReturn(portInstances.at(source)->getActorRTObject().getInstancePath(),
portInstances.at(target)->getActorRTObject().getInstancePath(), msg);
}
void DebuggingService::addActorState(const ActorClassBase& actor,
std::string state) {
asyncLogger.addActorState(actor.getInstancePath(), state);
}
void DebuggingService::addPortInstance(PortBase& port) {
portInstances.at(port.getAddress()) = &port;
}
MSCLogger& DebuggingService::getSyncLogger() {
return syncLogger;
}
MSCLogger& DebuggingService::getAsyncLogger() {
return asyncLogger;
}
} /* namespace etRuntime */
|