C++ TargetRTS
Loading...
Searching...
No Matches
RTDaemon.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTDaemon_h__
11#define __RTDaemon_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTElasticArray_h__
18#include <RTElasticArray.h>
19#endif
20
21#ifndef __RTEventInfo_h__
22#include <RTEventInfo.h>
23#endif
24
25#include <RTMutex.h>
26
27class RTDaemonInfo;
28class RTDebugger;
29
31{
32public:
33 enum SettingsType
34 {
35 SettHaltEnabled = RTEventInfo::EventLastEntry + 1,
36 SettHaltSystem,
37 SettDoReport,
38 SettRecThreshold,
39
40 SettLastEntry = SettRecThreshold
41 };
42
43private:
44 RTDebugger * debugger;
45 RTElasticArray actorInfo;
46 RTMutex lock;
47
48 int settings[ SettLastEntry + 1 ];
49
50 int posInfo_( RTDaemonInfo * );
51 void setInfo_( const RTEventInfo & );
52 RTDaemonInfo * eventMatches_( RTEventInfo & );
53public:
54 explicit RTDaemon( RTDebugger * );
55 ~RTDaemon( void );
56
57 void updateSettings( const char * settingsString );
58
59 int addInfo( RTDaemonInfo * );
60 int delInfo( RTDaemonInfo * );
61 int posInfo( RTDaemonInfo * );
62
63 RTDaemonInfo * eventMatches( RTEventInfo & );
64
65 void setInfo( const RTEventInfo & );
66
67 int monitorField( RTDaemonInfo *, bool enable );
68 void fieldValue( const char * variable, const char * value );
69
70 void logActorInfo();
71 int deleteActorInfo();
72 int inject( int inwards,
73 const char * signal,
74 int prio,
75 const void * data,
76 const RTObject_class * type );
77
78 int setting( int settingNr ) const;
79 void refresh( int observerId, int daemonId );
80
81 void getMessages( RTDaemonInfo * );
82
83 RTS_INLINE int shouldHalt( void ) const;
84 RTS_INLINE int shouldReport( void ) const;
85
86private:
87 // unavailable methods
88 RTDaemon( const RTDaemon & );
89 RTDaemon & operator=( const RTDaemon & );
90}; //lint !e1712
91
92#if RTS_INLINES
93#include <RTDaemon.inl>
94#endif
95
96#endif // __RTDaemon_h__
Definition: RTDaemon.h:31
Definition: RTDaemonInfo.h:24
Definition: RTDebugger.h:58
Definition: RTElasticArray.h:22
Definition: RTEventInfo.h:26
A type descriptor providing information about a type.
Definition: RTObject_class.h:64