Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ff070c2437a7f74c67da5d12c1e924be74ddfdef (plain) (blame)
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
/*******************************************************************************
 * 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/debugging/MSCLogger.h"
#include "common/containers/Map.h"
#include "common/messaging/Address.h"
#include "etDatatypes.h"
#include "common/modelbase/InterfaceItemBase.h"

namespace etRuntime {

class ActorClassBase;
class SubSystemClassBase;
class PortBase;

class DebuggingService {

public:
	virtual ~DebuggingService() {}

	static DebuggingService& getInstance();

	void addMessageAsyncOut(const Address& source, const Address& target, const String& msg);
	void addMessageAsyncIn(const Address& source, const Address& target, const String& msg);
	void addMessageSyncCall(const Address& source, const Address& target, const String& msg);
	void addMessageSyncReturn(const Address& source, const Address& target, const String& msg);
	void addActorState(const ActorClassBase& actor, const String& state);
	void addMessageActorCreate(const SubSystemClassBase& parent, const String& refName);
	void addMessageActorCreate(const ActorClassBase& parent, const String& refName);
	void addMessageActorDestroy(const ActorClassBase& inst);
	void addVisibleComment(const String& comment);
	void addPortInstance(const InterfaceItemBase& port);
	void removePortInstance(const InterfaceItemBase& port);

	MSCLogger& getSyncLogger() { return m_syncLogger; }
	MSCLogger& getAsyncLogger() { return m_asyncLogger; }

private:

	MSCLogger m_asyncLogger;
	MSCLogger m_syncLogger;
	Map<Address, const InterfaceItemBase*> m_portInstances;

	const InterfaceItemBase* getPort(const Address& address) const;

	DebuggingService();
	DebuggingService(DebuggingService const&);
	DebuggingService& operator=(DebuggingService const&);

};

} /* namespace etRuntime */
#endif /* DEBUGGINGSERVICE_H_ */

Back to the top