16 #include <vlutil/vlBaseMsg.h>
17 #include <vlutil/vlUtil.h>
18 #include <vlutil/vlTime.h>
19 #include <vlutil/vlPrint.h>
31 class DtAssistantSocketAdditionCbInfo;
32 class DtAssistantSocketRemovalCbInfo;
52 const MAKRti::DtInetAddr& networkInterface = MAKRti::DtInetAddr() );
64 virtual void addMsgCallback(
DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn,
66 virtual void removeMsgCallback(
DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn,
68 virtual void addWildcardMsgCallback(DtAssistantMsgCbMgr::DtCallbackFcn fcn,
70 virtual void removeWildcardMsgCallback(DtAssistantMsgCbMgr::DtCallbackFcn fcn,
82 virtual bool tick(
double timeout = 0 );
85 virtual unsigned int numConnections()
const;
88 virtual void sendMsgOnConn(
int compId,
const DtAssistantMsg& msg );
94 virtual void sendConnMsg(
int compId,
bool disconnect =
false,
95 const MAKRti::DtString& display = MAKRti::DtString::nullString() );
103 virtual void sendLicRespMsg(
int compId,
bool runUnlicensed,
104 const MAKRti::DtString& server,
int port,
bool accepted );
107 virtual void sendAssistantCommandResponseMsg(
108 int compId,
const MAKRti::DtString& formattedData );
111 virtual void sendForwarderConnectMsg(
112 int compId,
const MAKRti::DtString& targetHost,
113 const MAKRti::DtInetAddr& targetAddress,
int targetPort);
116 virtual void sendNtfyLvlUpdateMsg(
int compId, DtNotifyLevelType notifyLevel );
120 virtual void sendLatencyTestRequestMsg(
int compId,
bool runTest,
bool continuous,
121 bool shouldHalt,
bool observing,
unsigned int interactionPeriod,
122 unsigned int numInteractions,
unsigned int payloadBytes,
123 unsigned long federationHandle = 0,
124 unsigned long initFedHandle = 0 );
128 virtual void sendNetworkTestEnableMsg(
int compId,
int federationHdl,
bool enable );
131 virtual void sendLogEnableMsg(
int compId,
bool enable );
135 virtual void sendObserveRtiexecMsg(
int compId,
bool isObserved,
136 unsigned int timeStateIntervalMs );
140 virtual void sendObserveRtiexecLogMsg(
int connId,
bool isObserved );
144 virtual void sendObserveRtiForwarderMsg(
int compId,
bool isObserved,
145 unsigned int timeStateIntervalMs,
int defunctRemovalTime );
149 virtual void sendSingleObserveRtiExecMsg(
int compId );
153 virtual void sendSingleObserveForwarderMsg(
int compId );
156 virtual void sendFederateResignMsg(
int compId,
int federationHdl,
int federateHdl );
159 virtual void sendFederationDestroyMsg(
int compId,
int federationHdl );
162 virtual void sendDeleteFederateMsg(
int compId, DtU16 fedexHandle, DtU16 fedHandle );
165 virtual void sendRidParamsRequestMsg(
int compId );
169 virtual void sendLogRequestMsg(
int compId,
unsigned maxLogSize );
174 int compId,
bool observe =
false,
unsigned int interval = 0);
178 virtual void sendExitMsg(
int compId = -1 );
182 virtual void sendDoNotWaitForForwardersMsg(
int compId );
189 virtual void sendSignalTickIntervalMsg(
int compId,
float signalTickInterval );
193 virtual int currentCompId()
const;
196 virtual void closeConn(
int compId );
199 virtual int port()
const;
202 virtual DtU32 maxMsgSize()
const;
205 static void tcpSocketAdditionCb(
DtTcpMsgSocket* sock,
void* usr );
206 static void tcpSocketRemovalCb(
DtTcpMsgSocket* sock,
void* usr );
208 virtual const DtInetAddr& getNetworkAddr();
212 void enableMsgDiagnostics(
bool enable );
222 virtual void testConnections();
226 virtual bool readAndProcess( DtTime maxTimePerSocket );
233 virtual DtUniquePtr<DtAssistantMsg> netRead(
DtTcpMsgSocket* sock,
int *retCode)
const;
307 bool myDiagnosticsEnabled;
DtAssistantMsgCbMgr myMsgCbMgr
Message callback manager.
Definition: rtiAssistantServer.h:291
std::list< DtAssistantSocketAdditionCbInfo * > DtAssistantSocketAdditionCallbackList
Definition: rtiAssistantServer.h:32
void(* DtAssistantSocketRemovalCb)(int compId, const MAKRti::DtString &reason, void *usr)
Definition: rtiAssistantPeer.h:77
DtAssistantMessageFactory * myMessageFactory
The message factory.
Definition: rtiAssistantServer.h:260
virtual Boolean tick(TickTime minimum, TickTime maximum)
DtAssistantDfltMsgFactory myDefaultMessageFactory
Default message factory.
Definition: rtiAssistantServer.h:263
unsigned int myPort
Port to which RTI components may connect.
Definition: rtiAssistantServer.h:270
std::list< DtTcpMsgSocket * > mySocketsToDisconnect
List of sockets to be disconnected before next read.
Definition: rtiAssistantServer.h:288
std::map< DtTcpMsgSocket *, int > SocketToCompIdMap
Definition: rtiAssistantServer.h:248
unsigned myNumMsgsReceived
Total messages received.
Definition: rtiAssistantServer.h:304
SocketToCompIdMap myIdsByConnection
Map of component IDs by connection.
Definition: rtiAssistantServer.h:251
DtAssistantSocketRemovalCallbackList myRemovalCallbacks
Definition: rtiAssistantServer.h:298
This file contains the declaration of DtRtiConnectionInfo.
std::pair< DtRtiConnectionInfo, DtRtiAssociatedConnectionData > DtRtiConnectionInfoDataPair
Pair of connection with associated data.
Definition: assistantConnectionInfo.h:29
Definition: tcpMsgSocketMgr.h:43
Contains the DtRtiConnectionConfigurationInfo class declaration.
DtTime myTimeToTestConnections
Next time to test connections.
Definition: rtiAssistantServer.h:279
DtAssistantMsgKind
Definition: assistantMsg.h:53
Base class for assistant Messages.
Definition: assistantMsg.h:153
std::list< DtAssistantSocketRemovalCbInfo * > DtAssistantSocketRemovalCallbackList
Definition: rtiAssistantServer.h:34
DtTime myConnTestInterval
Interval at which connections should be tested.
Definition: rtiAssistantServer.h:276
unsigned myNumMsgsSent
Total messages sent.
Definition: rtiAssistantServer.h:301
DtTcpMsgSocket * myCurrentSocket
The socket on which the current message being processed was received.
Definition: rtiAssistantServer.h:267
#define DT_DLL_ASSISTANT
Default – Unix or Win32 static.
Definition: rtiMsConfig.h:150
#define DtASSISTANT_DEFAULT_PORT
Definition: assistantMsg.h:30
DtAssistantObservationType
Definition: assistantNetStatsEnums.h:8
Instances of DtAssistantDfltMsgFactory are used to create DtRtiMsgs.
Definition: assistantDefaultMsgFact.h:20
MAKRti::DtInetAddr myNetworkInterface
Network Interface.
Definition: rtiAssistantServer.h:285
Manages the server connections of the RTI Assistant.
Definition: rtiAssistantServer.h:45
void(* DtAssistantSocketAdditionCb)(int compId, void *usr)
Socket addition and removal callback signatures.
Definition: rtiAssistantPeer.h:76
Stores the information on an RTI configuration known by the Assistant.
Definition: assistantConnectionConfigurationInfo.h:61
DtClock myClock
Clock for timeouts.
Definition: rtiAssistantServer.h:273
The DtTcpMsgSocket class provides an address family independent TCP socket that handles RTI messages...
Definition: tcpMsgSocket.h:40
std::map< int, MAKRti::DtString > myDisconnectReasons
List of reasons for socket disconnects.
Definition: rtiAssistantServer.h:294
int myNextCompId
Next component ID to use.
Definition: rtiAssistantServer.h:257
std::map< int, DtTcpMsgSocket * > CompIdToSocketMap
Maps of the connections and component IDs.
Definition: rtiAssistantServer.h:247
DT_DLL_ASSISTANT DtMessageCallbackManager< DtAssistantMsg, DtAssistantMsgKind > DtAssistantMsgCbMgr
Definition: assistantMsgCbMgr.h:18
DtUniquePtr< DtTcpMsgSocketMgr > mySocketMgr
Manager for the sockets.
Definition: rtiAssistantServer.h:282
DtAssistantSocketAdditionCallbackList myAdditionCallbacks
Lists of pointers to socket addition and socket removal callbacks.
Definition: rtiAssistantServer.h:297
CompIdToSocketMap myConnectionsById
Map of connections by component ID.
Definition: rtiAssistantServer.h:254