MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
execObserverForAssistant.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "execObserver.h"
13 #include "execCmdProc.h"
14 #include <rtiMsConfig.h>
15 #include <vlutil/vlUtil.h>
16 #include <vlutil/vlTime.h>
17 #include <vlutil/vlInetAddr.h>
18 #include <RIDparams.h>
19 #include <testMgrStatusMsg.h>
20 #include <latencyReportMsg.h>
21 #include <federationInfo.h>
23 #include <map>
24 #include <vector>
25 #include <list>
26 
27 class DtRtiMsg;
29 class DtAssistantPrinter;
30 class DtBufferPrinter;
31 class DtPrinterBuf;
34 class DtAssistantExitMsg;
44 
50 {
51 public:
52 
55 
58 
62  virtual void initialize( DtRIDParameters* params,
63  std::shared_ptr<DtRtiexecCmdProc> cmdProc );
64 
66  virtual void startObservation();
67 
70 
72  static void tick( void* usr );
73 
75  virtual void tick();
76 
78 
81  virtual void queryForConnectionInfo( DtRtiConnectionInfoDataPair& connInfo,
83 
85  virtual void performParameterOverrides( DtRIDParameters& ridParams ) const;
86 
89  virtual void setForwarderInfo( int forwarderPort,
90  const MAKRti::DtInetAddr& forwarderToConnectTo );
91 
93  virtual void enableNotifications();
94 
96  virtual void disableNotifications();
97 
100 
102  virtual void processFedExCreatedEvent( DtFedExec* exec );
103 
105  virtual void processFedExDestroyedEvent( DtFedExec* exec );
106 
108  virtual void processFederateJoinedEvent( DtFedExec* exec, DtFederate* federate );
109 
111  virtual void processFederateResignedEvent( DtFedExec* exec, DtFederate* federate );
112 
114  virtual void processSyncPtRegisteredEvent( DtFedExec* exec, DtSyncPt* pt );
115 
117  virtual void processFederationSynchronizedEvent( DtFedExec* exec, DtSyncPt* pt );
118 
120  virtual void processSyncPtAchievedEvent( DtFedExec* exec, DtFederate* federate, DtSyncPt* pt );
121 
123  virtual void processFederateDisconnectedEvent( DtFedExec* exec, DtFederate* federate );
124 
126  virtual void processFederateReconnectSucceededEvent( DtFedExec* exec, DtFederate* federate );
127 
129  virtual void processFederateReconnectFailedEvent( DtFedExec* exec, DtFederate* federate );
130 
132  virtual void processLogFileUpdatedEvent( const MAKRti::DtFilename& logFile );
133 
135  static void processTimeStateEvent( const DtRtiExec& exec, void* usr );
137  virtual void processTimeStateEvent( const DtRtiExec& exec );
138 
140 
143 
145  static void processLatencyTestStatusMsg( const DtRtiMsg& msg, void* usr );
147  virtual void processLatencyTestStatusMsg( const DtTestMgrStatusMsg& msg );
148 
150  static void processLatencyTestResultsMsg( const DtRtiMsg& msg, void* usr );
152  virtual void processLatencyTestResultsMsg( const DtLatencyReportMsg& msg );
153 
155 
158 
160  static void processExecObserveMsg( const DtAssistantStateObserveMsg& msg, void* usr );
162  virtual void processExecObserveMsg( const DtAssistantStateObserveMsg& msg );
163 
165  static void processDeleteFederateMsg( const DtAssistantDeleteFederateMsg& msg, void* usr );
167  virtual void processDeleteFederateMsg( const DtAssistantDeleteFederateMsg& msg );
168 
170  static void processDeleteFederationMsg( const DtAssistantDeleteFederationMsg& msg, void* usr );
172  virtual void processDeleteFederationMsg( const DtAssistantDeleteFederationMsg& msg );
173 
175  static void processEnableLoggingMsg( const DtAssistantLogEnableMsg& msg, void* usr );
177  virtual void processEnableLoggingMsg( const DtAssistantLogEnableMsg& msg );
178 
180  static void processNotifyLevelChangeMsg( const DtAssistantNtfyLvlUpdateMsg& msg, void* usr );
182  virtual void processNotifyLevelChangeMsg( const DtAssistantNtfyLvlUpdateMsg& msg );
183 
185  static void processNetworkTestingEnableMsg( const DtAssistantNetworkTestEnableMsg& msg, void* usr );
187  virtual void processNetworkTestingEnableMsg( const DtAssistantNetworkTestEnableMsg& msg );
188 
190  static void processLatencyTestCmndMsg( const DtAssistantChangeLatencyTestModeMsg& msg, void* usr );
192  virtual void processLatencyTestCmndMsg( const DtAssistantChangeLatencyTestModeMsg& msg );
193 
195  static void processRidParamRequestMsg( const DtAssistantRidParamsMsg& msg, void* usr );
197  virtual void processRidParamRequestMsg( const DtAssistantRidParamsMsg& msg );
198 
200  static void processLogRequestMsg( const DtAssistantLogRequestMsg& msg, void* usr );
202  virtual void processLogRequestMsg( const DtAssistantLogRequestMsg& msg );
203 
205  static void processExitCmndMsg( const DtAssistantExitMsg& msg, void* usr );
207  virtual void processExitCmndMsg( const DtAssistantExitMsg& msg );
208 
210  static void processAssistantDisconnect( void* usr );
212  virtual void processAssistantDisconnect();
213 
215 
217  bool gotConnInfoFromAssistant();
218 
219  virtual void sendTrayNotification( const MAKRti::DtString& text, DtNotifyLevelType notifyLevel );
220 
221  inline const DtRIDParameters* ridParams() const { return myParams; }
222  inline DtRIDParameters* ridParams() { return myParams; }
223 
224 protected:
225 
227  virtual void addCallbacks();
228 
231  virtual void removeCallbacks();
232 
234  void fillFederateTimeStateInfo( DtAssistantFederateInfo& stateInfo,
235  unsigned long connId, const MAKRti::DtString& fedType, const MAKRti::DtString& fedName,
236  DtFederateHandle fedHandle, const MAKRti::DtString& fedHostName,
237  const MAKRti::DtInetAddr& fedHost, DtHlaVersionId hlaVersion,
238  int astntCompId, const DtFedExec& fedExec );
239 
241  virtual void sendConnectionInfo( bool isConnected );
242 
243 protected:
244 
246  std::shared_ptr<DtRtiAssistantExecClient> myAssistantClient;
247 
250 
253 
255  std::shared_ptr<DtPrinterBuf> myPrinterBuffer;
256 
258  std::shared_ptr<DtRtiexecCmdProc> myCmdProc;
259 
262 
265 
268 
271 
273  MAKRti::DtTime myMinTimeBetweenUpdates;
274 
277 
280 
283 
286 
288  MAKRti::DtInetAddr myForwarderToConnectTo;
289 
291 
292 };
293 
294 
296 {
298 }
This file contains the declaration of DtAssistantFederationInfo.
virtual Boolean tick(TickTime minimum, TickTime maximum)
bool myGotConnInfoFromAssistant
Whether or not the assistant supplied connection info.
Definition: execObserverForAssistant.h:276
bool myFedReconnectEnabled
Is federate reconnect enabled?
Definition: execObserverForAssistant.h:261
virtual void processLogFileUpdatedEvent(const MAKRti::DtFilename &logFile)
Process a log file name update event.
Definition: execObserver.h:84
This file contains the declaration of DtTestMgrStatusMsg.
virtual void addCallbacks()=0
Adds all RTI message and tick callbacks. Called when a manager is set.
std::shared_ptr< DtPrinterBuf > myPrinterBuffer
Buffer which the buffer printer writes to.
Definition: execObserverForAssistant.h:255
virtual void processSyncPtRegisteredEvent(DtFedExec *exec, DtSyncPt *pt)
Process a new sync. point registered event.
Definition: execObserver.h:66
Buffers data output by a DtBufferPrinter.
Definition: printerBuf.h:37
bool gotConnInfoFromAssistant()
Returns true if the assistant supplied the rtiexec connection info.
Definition: execObserverForAssistant.h:295
The DtTestMgrStatusMsg defines a msg for a client to report the results of a latency test...
Definition: testMgrStatusMsg.h:36
The DtAssistantLogEnableMsg defines a wrapper for the RTI Assistant logging enable message used by th...
Definition: assistantLogEnableMsg.h:31
DtFederationStateByNameMap myFederations
Cache the complete state of the federations.
Definition: execObserverForAssistant.h:267
This class manages the RTI&#39;s start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
virtual void processFedExDestroyedEvent(DtFedExec *exec)
Process a federation execution destroyed event.
Definition: execObserver.h:57
int myForwarderPort
Stored information about the forwarder.
Definition: execObserverForAssistant.h:287
Definition: syncPt.h:24
This file contains the declaration of DtRtiConnectionInfo.
virtual void processFederateReconnectFailedEvent(DtFedExec *exec, DtFederate *fed)
Process a federate reconnect failed event.
Definition: execObserver.h:81
DtRIDParameters * myParams
The RID parameter settings.
Definition: execObserverForAssistant.h:282
std::pair< DtRtiConnectionInfo, DtRtiAssociatedConnectionData > DtRtiConnectionInfoDataPair
Pair of connection with associated data.
Definition: assistantConnectionInfo.h:29
Definition: fedex.h:117
virtual void processFederateDisconnectedEvent(DtFedExec *exec, DtFederate *fed)
Process a federate disconnect event.
Definition: execObserver.h:75
The DtAssistantDeleteFederationMsg defines a wrapper for the RTI Assistant delete federation message ...
Definition: assistantDeleteFederationMsg.h:32
DtHlaVersionId
Definition: rtiVersion.h:50
virtual void processFederationSynchronizedEvent(DtFedExec *exec, DtSyncPt *pt)
Process a federation synchronized to an existing sync. point event.
Definition: execObserver.h:69
DtAssistantPrinter * myAssistantPrinter
The printer which sends notifications to the assistant.
Definition: execObserverForAssistant.h:249
Sends data from an output stream to the RTI Assistant.
Definition: assistantPrinter.h:33
The DtAssistantDeleteFederateMsg defines a wrapper for the RTI Assistant delete federate command mess...
Definition: assistantDeleteFederateMsg.h:32
MAKRti::DtTime myMinTimeBetweenUpdates
Min. time exec should wait between time state updates.
Definition: execObserverForAssistant.h:273
Stores information on a known federate.
Definition: federateInfo.h:21
virtual void processFederateReconnectSucceededEvent(DtFedExec *exec, DtFederate *fed)
Process a federate reconnect succeeded event.
Definition: execObserver.h:78
DtFederationNameByHandleMap myFederationNames
Map of federation handles to names.
Definition: execObserverForAssistant.h:270
The DtAssistantNtfyLvlUpdateMsg defines a wrapper for the RTI Assistant notify level update message u...
Definition: assistantNtfyLvlUpdateMsg.h:31
std::shared_ptr< DtRtiexecCmdProc > myCmdProc
Processes commands to be performed by the rtiexec.
Definition: execObserverForAssistant.h:258
Definition: federate.h:39
The DtRtiexecObserver is the base class for all observers of rtiexec events.
Definition: execObserver.h:30
virtual void removeCallbacks()=0
Removes all RTI message and tick callbacks.
bool myExecIsObserved
Whether or not there is currently an assistant observing this rtiexec.
Definition: execObserverForAssistant.h:279
Observes the rtiexec and is responsible sending information on rtiexec to the RTI Assistant...
Definition: execObserverForAssistant.h:49
The DtLatencyReportMsg defines a msg for a client to report the results of a latency test...
Definition: latencyReportMsg.h:37
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
DtHandle DtFederateHandle
Definition: internalTypes.h:46
DtRIDParameters * ridParams()
Definition: execObserverForAssistant.h:222
MAKRti::DtInetAddr myForwarderToConnectTo
Stored information about the forwarder.
Definition: execObserverForAssistant.h:288
The DtAssistantChangeLatencyTestModeMsg defines a wrapper for the RTI Assistant initiate latency test...
Definition: assistantChangeLatencyTestModeMsg.h:36
virtual void processSyncPtAchievedEvent(DtFedExec *exec, DtFederate *fed, DtSyncPt *pt)
Process an existing sync. point achieved event.
Definition: execObserver.h:72
virtual void processFederateJoinedEvent(DtFedExec *exec, DtFederate *federate)
Process a federate joined event.
Definition: execObserver.h:60
DtBufferPrinter * myBufferPrinter
The printer which stores all rtiexec output.
Definition: execObserverForAssistant.h:252
const DtRIDParameters * ridParams() const
Definition: execObserverForAssistant.h:221
Stores the information on an RTI configuration known by the Assistant.
Definition: assistantConnectionConfigurationInfo.h:61
bool myAllowNetworkTesting
Whether or not this rtiexec allows network testing for its federations.
Definition: execObserverForAssistant.h:264
virtual void startObservation()
Indicates that observation of the exec has begun.
Definition: execObserver.h:48
Definition: exec.h:148
std::map< int, MAKRti::DtString > DtFederationNameByHandleMap
Map of federation handles to names.
Definition: federationInfo.h:38
virtual void processFederateResignedEvent(DtFedExec *exec, DtFederate *federate)
Process a federate resigned event.
Definition: execObserver.h:63
This file contains the declaration of DtLatencyReportMsg.
The DtAssistantRidParamsMsg defines a wrapper for the RTI Assistant RID parameter message used by the...
Definition: assistantRidParamsMsg.h:33
The DtAssistantStateObserveMsg defines a wrapper for the RTI Assistant message used by the Assistant ...
Definition: assistantStateObserveMsg.h:40
Prints data from an output stream to a buffer.
Definition: bufferPrinter.h:25
The DtAssistantExitMsg defines a wrapper for the RTI Assistant exit message used by the Assistant to ...
Definition: assistantExitMsg.h:32
std::shared_ptr< DtRtiAssistantExecClient > myAssistantClient
The assistant client.
Definition: execObserverForAssistant.h:246
The DtAssistantLogRequestMsg defines a wrapper for the RTI Assistant message used by the Assistant to...
Definition: assistantLogRequestMsg.h:31
virtual void processFedExCreatedEvent(DtFedExec *exec)
Process a new federation execution created event.
Definition: execObserver.h:54
std::map< MAKRti::DtString, DtAssistantFederationInfo > DtFederationStateByNameMap
Definition: federationInfo.h:138
The DtAssistantNetworkTestEnableMsg defines a wrapper for the RTI Assistant network testing enable/di...
Definition: assistantNetworkTestEnableMsg.h:31
The client connection to the RTI Assistant for the rtiexec.
Definition: rtiAssistantExecClient.h:23
Stores the information on an RTI connection known by the Assistant.
Definition: assistantConnectionInfo.h:36
#define DT_DLL_EXEC
Definition: rtiMsConfig.h:152

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)