C++ TargetRTS
Loading...
Searching...
No Matches
RTToolsetObserver.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 __RTToolsetObserver_h__
11#define __RTToolsetObserver_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTObserver_h__
18#include <RTObserver.h>
19#endif
20
21#ifndef __endeBoth_h__
22#include <endeBoth.h>
23#endif
24
25#ifndef __endeTarg_h__
26#include <endeTarg.h>
27#endif
28
30{
31private:
32 TO_bufferInfo rxBuffer;
33 TO_bufferInfo txBuffer;
34 TO_bufferInfo txTempBuffer;
35 TO_structInfo structInfo;
36
37public:
38 RTToolsetObserver( RTDebugger * theDebugger,
39 RTTcpSocket * theSocket,
40 int theObsId,
41 const char * initBuf = nullptr,
42 int initLen = 0 );
43 virtual ~RTToolsetObserver( void );
44
45 virtual int evtChain( int daemonId,
46 const RTDaemonInfo & daemonInfo,
47 const RTEventInfo & eventInfo ) override;
48 virtual int evtState( int daemonId,
49 const RTDaemonInfo & daemonInfo,
50 const RTEventInfo & eventInfo ) override;
51
52 virtual int evtPresence( int daemonId,
53 const RTDaemonInfo & daemonInfo,
54 const RTEventInfo & eventInfo ) override;
55
56 virtual int evtReference( int daemonId,
57 const RTDaemonInfo & daemonInfo,
58 const RTEventInfo & eventInfo ) override;
59
60 virtual int evtMessageIn( int daemonId,
61 const RTDaemonInfo & daemonInfo,
62 const RTEventInfo & eventInfo ) override;
63
64 virtual int evtMessageOut( int daemonId,
65 const RTDaemonInfo & daemonInfo,
66 const RTEventInfo & eventInfo ) override;
67
68 virtual int evtMessageOutIn( int daemonId,
69 const RTDaemonInfo & sndDaemonInfo,
70 const RTDaemonInfo & recDaemonInfo,
71 const RTEventInfo & eventInfo ) override;
72
73 virtual int evtRtsStatus( int daemonId,
74 const RTEventInfo & eventInfo ) override;
75
76 virtual int evtVariable( int daemonId,
77 const RTDaemonInfo & daemonInfo,
78 const RTEventInfo & eventInfo ) override;
79
80 virtual int evtChildren( int daemonId,
81 const RTDaemonInfo & daemonInfo,
82 const RTEventInfo & eventInfo ) override;
83
84 virtual int evtHistory( int daemonId,
85 const RTDaemonInfo & daemonInfo,
86 const RTEventInfo & eventInfo ) override;
87
88 virtual int evtMessageQueue( int daemonId,
89 const RTDaemonInfo & daemonInfo,
90 const RTEventInfo & eventInfo ) override;
91
92 virtual int receiveData ( void ) override;
93 virtual int transmitData( void ) override;
94
95private:
96 void encoDeco( char * buffer, int bufLen );
97
98 void handleDaemon( void );
99 void handleActor( void );
100 void handlePort( void );
101 void handleState( void );
102 void handleChain( void );
103 void handleVariable( void );
104 void accessVariable( void );
105 void handleInject( void );
106 void handleGetMessages( void );
107 void handleSendToApp(void);
108 void handleGetChildren(void);
109 void sendResultCode( int resultCode );
110
111 void sendTxBuffer( void );
112
113 static char * buildString( const char * actor_path,
114 int actor_index,
115 const char * component_name = nullptr );
116
117 // The data in message events is limited to this many bytes.
118 enum { msgDataBufSize = 1000 };
119
120private:
121 // unavailable methods
123 RTToolsetObserver & operator=( const RTToolsetObserver & );
124}; //lint !e1712
125
126#endif // __RTToolsetObserver_h__
Definition: RTDaemonInfo.h:24
Definition: RTDebugger.h:58
Definition: RTEventInfo.h:26
Definition: RTObserver.h:28
Definition: RTTcpSocket.h:24
Definition: RTToolsetObserver.h:30
Definition: endeBoth.h:351
Definition: endeBoth.h:360