![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Manages the server connections of the RTI Assistant. More...
Collaboration diagram for DtRtiAssistantServer:Public Member Functions | |
| DtRtiAssistantServer (DtNotifyLevelType level, int port=DtASSISTANT_DEFAULT_PORT, const MAKRti::DtInetAddr &networkInterface=MAKRti::DtInetAddr()) | |
| Constructor, networkInterface defaults to INADDR_ANY. | |
| virtual | ~DtRtiAssistantServer () |
| Destructor. | |
| bool | isOk () const |
| Returns true if the server was successfully started. | |
| virtual void | addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual void | removeMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | addWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | removeWildcardMsgCallback (DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| virtual void | addSocketAdditionCallback (DtAssistantSocketAdditionCb cb, void *usr) |
| These functions add callbacks for notification of the addition or removal of Assistant socket connections. | |
| virtual void | removeSocketAdditionCallback (DtAssistantSocketAdditionCb cb, void *usr) |
| virtual void | addSocketRemovalCallback (DtAssistantSocketRemovalCb cb, void *usr) |
| virtual void | removeSocketRemovalCallback (DtAssistantSocketRemovalCb cb, void *usr) |
| virtual bool | tick (unsigned int timeout=0) |
| Do the actual message processing. | |
| virtual unsigned int | numConnections () const |
| Return the number of current RTI component connections. | |
| virtual void | sendMsgOnConn (int compId, const DtAssistantMsg &msg) |
| Send the message over the specified connection. | |
| virtual void | sendBroadcast (const DtAssistantMsg &msg) |
| Send the message over the all connections. | |
| virtual void | sendConnMsg (int compId, bool disconnect=false, const MAKRti::DtString &display=MAKRti::DtString::nullString()) |
| Sends a component ID back to a connecting component. | |
| virtual void | sendConnRespMsg (int compId, const DtRtiConnectionInfoDataPair &conn, const DtRtiConnectionConfigurationInfo &config, bool accepted) |
| Sends a connection query response message. | |
| virtual void | sendLicRespMsg (int compId, bool runUnlicensed, const MAKRti::DtString &server, int port, bool accepted) |
| Sends a license query response message. | |
| virtual void | sendAssistantCommandResponseMsg (int compId, const MAKRti::DtString &formattedData) |
| Sends a response to an assistant command message. | |
| virtual void | sendNtfyLvlUpdateMsg (int compId, DtNotifyLevelType notifyLevel) |
| Sends a notify level update message. | |
| virtual void | sendLatencyTestRequestMsg (int compId, bool runTest, bool continuous, bool shouldHalt, bool observing, unsigned int interactionPeriod, unsigned int numInteractions, unsigned int payloadBytes, unsigned long federationHandle=0, unsigned long initFedHandle=0) |
| Sends an initiate latency test request message. | |
| virtual void | sendNetworkTestEnableMsg (int compId, int federationHdl, bool enable) |
| Sends a message enabling or disabling network testing for the given federation. | |
| virtual void | sendLogEnableMsg (int compId, bool enable) |
| Sends a logging enable message. | |
| virtual void | sendObserveRtiexecMsg (int compId, bool isObserved, unsigned int timeStateIntervalMs) |
| Sends a message to tell an rtiexec that it should either start or stop sending its information. | |
| virtual void | sendObserveRtiexecLogMsg (int connId, bool isObserved) |
| Sends a message to tell an rtiexec that it should either start or stop sending its log information. | |
| virtual void | sendObserveRtiForwarderMsg (int compId, bool isObserved, unsigned int timeStateIntervalMs, int defunctRemovalTime) |
| Sends a message to tell an RTI Forwarder that it should either start or stop sending its information. | |
| virtual void | sendSingleObserveRtiExecMsg (int compId) |
| Sends a message to tell a local rtiExec that it should send its data one time only. | |
| virtual void | sendSingleObserveForwarderMsg (int compId) |
| Sends a message to tell a local forwarder that it should send its data one time only. | |
| virtual void | sendFederateResignMsg (int compId, int federationHdl, int federateHdl) |
| Sends a force federate resign message to an rtiexec. | |
| virtual void | sendFederationDestroyMsg (int compId, int federationHdl) |
| Sends a force federation destroy message to an rtiexec. | |
| virtual void | sendDeleteFederateMsg (int compId, DtU16 fedexHandle, DtU16 fedHandle) |
| Sends a message to tell an rtiexec that it shold delete a federate. | |
| virtual void | sendRidParamsRequestMsg (int compId) |
| Sends a RID parameter request to an rtiexec. | |
| virtual void | sendLogRequestMsg (int compId, unsigned maxLogSize) |
| Sends a log request to an rtiexec. | |
| virtual void | sendExitMsg (int compId=-1) |
| Sends an exit command message for the specified component, or for all components if none specified. | |
| virtual void | sendDoNotWaitForForwardersMsg (int compId) |
| Sends a message to the specified forwarder telling it to proceed without waiting for any more forwarders to connect. | |
| virtual void | forwardMsg (const DtAssistantMsg &msg) |
| Forwards a message from a remote assistant to the local component that is its final destination. | |
| virtual void | sendSignalTickIntervalMsg (int compId, float signalTickInterval) |
| sends the signal tick interval | |
| virtual int | currentCompId () const |
| Returns the component ID from which the current message being processed was received, or -1 if there is no such message. | |
| virtual void | closeConn (int compId) |
| Close the connection with the given component ID. | |
| virtual int | port () const |
| Returns the Assistant server port. | |
| virtual DtU32 | maxMsgSize () const |
| Gets the maximum message size. | |
Static Public Member Functions | |
| static void | tcpSocketAdditionCb (DtTcpMsgSocket *sock, void *usr) |
| Callbacks on addition/removal of TCP sockets. | |
| static void | tcpSocketRemovalCb (DtTcpMsgSocket *sock, void *usr) |
Protected Types | |
| typedef std::map< int, DtTcpMsgSocket * > | CompIdToSocketMap |
| Maps of the connections and component IDs. | |
| typedef std::map < DtTcpMsgSocket *, int > | SocketToCompIdMap |
Protected Member Functions | |
| virtual void | sendMsg (DtTcpMsgSocket *sock, const DtAssistantMsg &msg) |
| Sends the message over the specified socket. | |
| virtual void | testConnections () |
| Verify connection status and mark bad connections for removal. | |
| virtual bool | readAndProcess (DtTime maxTimePerSocket) |
| Make a single pass over the socket list allocating up to max. | |
| virtual void | tcpSocketAdditionCb (DtTcpMsgSocket *sock) |
| Callbacks on addition/removal of TCP sockets. | |
| virtual void | tcpSocketRemovalCb (DtTcpMsgSocket *sock) |
| virtual std::auto_ptr < DtAssistantMsg > | netRead (DtTcpMsgSocket *sock, int *retCode) const |
| Read a message from a socket. | |
| virtual void | setMsgFactory (DtAssistantMessageFactory *fact) |
| Get/Set the message factory . | |
| virtual DtAssistantMessageFactory * | msgFactory () const |
Protected Attributes | |
| SocketToCompIdMap | myIdsByConnection |
| Map of component IDs by connection. | |
| CompIdToSocketMap | myConnectionsById |
| Map of connections by component ID. | |
| int | myNextCompId |
| Next component ID to use. | |
| DtAssistantMessageFactory * | myMessageFactory |
| The message factory. | |
| DtAssistantDfltMsgFactory | myDefaultMessageFactory |
| Default message factory. | |
| DtTcpMsgSocket * | myCurrentSocket |
| The socket on which the current message being processed was received. | |
| unsigned int | myPort |
| Port to which RTI components may connect. | |
| DtClock | myClock |
| Clock for timeouts. | |
| DtTime | myConnTestInterval |
| Interval at which connections should be tested. | |
| DtTime | myTimeToTestConnections |
| Next time to test connections. | |
| std::auto_ptr< DtTcpMsgSocketMgr > | mySocketMgr |
| Manager for the sockets. | |
| std::list< DtTcpMsgSocket * > | mySocketsToDisconnect |
| List of sockets to be disconnected before next read. | |
| DtAssistantMsgCbMgr | myMsgCbMgr |
| Message callback manager. | |
| std::map< int, MAKRti::DtString > | myDisconnectReasons |
| List of reasons for socket disconnects. | |
| DtAssistantSocketAdditionCallbackList | myAdditionCallbacks |
| Lists of pointers to socket addition and socket removal callbacks. | |
| DtAssistantSocketRemovalCallbackList | myRemovalCallbacks |
| unsigned | myNumMsgsSent |
| Total messages sent. | |
| unsigned | myNumMsgsReceived |
| Total messages received. | |
Private Member Functions | |
| DtRtiAssistantServer (const DtRtiAssistantServer &) | |
| Copy and Assignment unimplemented. | |
| DtRtiAssistantServer & | operator= (const DtRtiAssistantServer &) |
Manages the server connections of the RTI Assistant.
DtRtiAssistantServer manages the connections of the RTI Assistant. It also provides methods for packaging and sending messages to the connected RTI components.
typedef std::map< int, DtTcpMsgSocket* > DtRtiAssistantServer::CompIdToSocketMap [protected] |
Maps of the connections and component IDs.
typedef std::map< DtTcpMsgSocket*, int > DtRtiAssistantServer::SocketToCompIdMap [protected] |
| DtRtiAssistantServer::DtRtiAssistantServer | ( | DtNotifyLevelType | level, |
| int | port = DtASSISTANT_DEFAULT_PORT, |
||
| const MAKRti::DtInetAddr & | networkInterface = MAKRti::DtInetAddr() |
||
| ) |
Constructor, networkInterface defaults to INADDR_ANY.
References myPort, mySocketMgr, tcpSocketAdditionCb(), and tcpSocketRemovalCb().
| DtRtiAssistantServer::~DtRtiAssistantServer | ( | ) | [virtual] |
Destructor.
References mySocketMgr, tcpSocketAdditionCb(), and tcpSocketRemovalCb().
| DtRtiAssistantServer::DtRtiAssistantServer | ( | const DtRtiAssistantServer & | ) | [private] |
Copy and Assignment unimplemented.
| void DtRtiAssistantServer::addMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Message Callbacks These callback functions operate on all of the connections.
References myMsgCbMgr.
Referenced by DtAssistantSignalTickedMsg::addCallback(), DtAssistantExecStateMsg::addCallback(), DtAssistantForwarderStateMsg::addCallback(), DtAssistantAwaitingForwardersMsg::addCallback(), DtAssistantTimeStateMsg::addCallback(), DtAssistantLogMsg::addCallback(), DtAssistantConnMsg::addCallback(), DtAssistantShutdownMsg::addCallback(), DtAssistantExecObserveRspMsg::addCallback(), DtAssistantShowDialogMsg::addCallback(), DtAssistantNotifyMsg::addCallback(), DtAssistantPopupMsg::addCallback(), DtAssistantLicQueryMsg::addCallback(), DtAssistantSyncPtUpdateMsg::addCallback(), DtAssistantShmCompInfoMsg::addCallback(), DtAssistantRidParamsMsg::addCallback(), DtAssistantLatencyReportMsg::addCallback(), DtAssistantWwwCompInfoMsg::addCallback(), DtAssistantTestMgrStatusMsg::addCallback(), DtAssistantCommandMsg::addCallback(), DtAssistantRtiForwarderCompInfoMsg::addCallback(), DtAssistantFederationStateMsg::addCallback(), DtAssistantRtiexecCompInfoMsg::addCallback(), DtAssistantConnQueryMsg::addCallback(), DtAssistantFederateStateMsg::addCallback(), and DtAssistantLrcCompInfoMsg::addCallback().
| void DtRtiAssistantServer::addSocketAdditionCallback | ( | DtAssistantSocketAdditionCb | cb, |
| void * | usr | ||
| ) | [virtual] |
These functions add callbacks for notification of the addition or removal of Assistant socket connections.
References myAdditionCallbacks.
| void DtRtiAssistantServer::addSocketRemovalCallback | ( | DtAssistantSocketRemovalCb | cb, |
| void * | usr | ||
| ) | [virtual] |
References myRemovalCallbacks.
| void DtRtiAssistantServer::addWildcardMsgCallback | ( | DtAssistantMsgCbMgr::DtCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
| void DtRtiAssistantServer::closeConn | ( | int | compId | ) | [virtual] |
Close the connection with the given component ID.
References myConnectionsById, and mySocketsToDisconnect.
Referenced by readAndProcess().
| int DtRtiAssistantServer::currentCompId | ( | ) | const [virtual] |
Returns the component ID from which the current message being processed was received, or -1 if there is no such message.
References myCurrentSocket, and myIdsByConnection.
Referenced by readAndProcess().
| void DtRtiAssistantServer::forwardMsg | ( | const DtAssistantMsg & | msg | ) | [virtual] |
Forwards a message from a remote assistant to the local component that is its final destination.
References DtAssistantMsg::compId(), DtAssistantMsg::isAssistantToAssistantMessage(), and sendMsgOnConn().
| bool DtRtiAssistantServer::isOk | ( | ) | const |
Returns true if the server was successfully started.
References mySocketMgr.
| DtU32 DtRtiAssistantServer::maxMsgSize | ( | ) | const [virtual] |
Gets the maximum message size.
References mySocketMgr.
| DtAssistantMessageFactory * DtRtiAssistantServer::msgFactory | ( | ) | const [protected, virtual] |
References myMessageFactory.
Referenced by netRead(), readAndProcess(), sendAssistantCommandResponseMsg(), sendConnMsg(), sendConnRespMsg(), sendDeleteFederateMsg(), sendDoNotWaitForForwardersMsg(), sendExitMsg(), sendFederateResignMsg(), sendFederationDestroyMsg(), sendLatencyTestRequestMsg(), sendLicRespMsg(), sendLogEnableMsg(), sendLogRequestMsg(), sendNetworkTestEnableMsg(), sendNtfyLvlUpdateMsg(), sendObserveRtiexecLogMsg(), sendObserveRtiexecMsg(), sendObserveRtiForwarderMsg(), sendRidParamsRequestMsg(), sendSignalTickIntervalMsg(), sendSingleObserveForwarderMsg(), and sendSingleObserveRtiExecMsg().
| std::auto_ptr< DtAssistantMsg > DtRtiAssistantServer::netRead | ( | DtTcpMsgSocket * | sock, |
| int * | retCode | ||
| ) | const [protected, virtual] |
Read a message from a socket.
References DtASSISTANT_BUFFER_TOO_SMALL, DtASSISTANT_INVALID_VERSION, DtASSISTANT_READ_BAD_PACKET, DtASSISTANT_READ_FILTERED_PACKET, DtASSISTANT_READ_NO_PACKETS, DtASSISTANT_READ_SIZE_MISMATCH, DtASSISTANT_READ_SUCCESS, DtASSISTANT_UNKNOWN_ERROR, DtAssistantMessageVersion, DtAssistantMsg::isOk(), DtAssistantMsg::kindToString(), msgFactory(), and DtTcpMsgSocket::recvMessage().
Referenced by readAndProcess().
| unsigned int DtRtiAssistantServer::numConnections | ( | ) | const [virtual] |
Return the number of current RTI component connections.
References myIdsByConnection.
| DtRtiAssistantServer& DtRtiAssistantServer::operator= | ( | const DtRtiAssistantServer & | ) | [private] |
| int DtRtiAssistantServer::port | ( | ) | const [virtual] |
Returns the Assistant server port.
References myPort.
| bool DtRtiAssistantServer::readAndProcess | ( | DtTime | maxTimePerSocket | ) | [protected, virtual] |
Make a single pass over the socket list allocating up to max.
time per socket to each.
References closeConn(), currentCompId(), DtASSISTANT_INVALID_VERSION, DtASSISTANT_READ_NO_PACKETS, DtASSISTANT_READ_SUCCESS, DtAssistantConnMsgKind, DtTcpMsgSocket::inetTcpSocket(), DtTcpMsgSocket::isConnected(), DtAssistantMsg::kindToString(), msgFactory(), DtAssistantMsg::msgKind(), myClock, myCurrentSocket, myDisconnectReasons, myMsgCbMgr, myNumMsgsReceived, mySocketMgr, mySocketsToDisconnect, netRead(), sendMsg(), and DtAssistantConnMsg::setDisconnect().
Referenced by tick().
| void DtRtiAssistantServer::removeMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
Referenced by DtAssistantSignalTickedMsg::removeCallback(), DtAssistantExecStateMsg::removeCallback(), DtAssistantForwarderStateMsg::removeCallback(), DtAssistantAwaitingForwardersMsg::removeCallback(), DtAssistantTimeStateMsg::removeCallback(), DtAssistantLogMsg::removeCallback(), DtAssistantConnMsg::removeCallback(), DtAssistantShutdownMsg::removeCallback(), DtAssistantExecObserveRspMsg::removeCallback(), DtAssistantShowDialogMsg::removeCallback(), DtAssistantNotifyMsg::removeCallback(), DtAssistantPopupMsg::removeCallback(), DtAssistantLicQueryMsg::removeCallback(), DtAssistantShmCompInfoMsg::removeCallback(), DtAssistantSyncPtUpdateMsg::removeCallback(), DtAssistantRidParamsMsg::removeCallback(), DtAssistantWwwCompInfoMsg::removeCallback(), DtAssistantLatencyReportMsg::removeCallback(), DtAssistantTestMgrStatusMsg::removeCallback(), DtAssistantCommandMsg::removeCallback(), DtAssistantRtiForwarderCompInfoMsg::removeCallback(), DtAssistantFederationStateMsg::removeCallback(), DtAssistantRtiexecCompInfoMsg::removeCallback(), DtAssistantConnQueryMsg::removeCallback(), DtAssistantFederateStateMsg::removeCallback(), and DtAssistantLrcCompInfoMsg::removeCallback().
| void DtRtiAssistantServer::removeSocketAdditionCallback | ( | DtAssistantSocketAdditionCb | cb, |
| void * | usr | ||
| ) | [virtual] |
| void DtRtiAssistantServer::removeSocketRemovalCallback | ( | DtAssistantSocketRemovalCb | cb, |
| void * | usr | ||
| ) | [virtual] |
| void DtRtiAssistantServer::removeWildcardMsgCallback | ( | DtAssistantMsgCbMgr::DtCallbackFcn | fcn, |
| void * | usr | ||
| ) | [virtual] |
References myMsgCbMgr.
| void DtRtiAssistantServer::sendAssistantCommandResponseMsg | ( | int | compId, |
| const MAKRti::DtString & | formattedData | ||
| ) | [virtual] |
Sends a response to an assistant command message.
References DtAssistantCommandMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantCommandMsg::setMessageString().
| void DtRtiAssistantServer::sendBroadcast | ( | const DtAssistantMsg & | msg | ) | [virtual] |
Send the message over the all connections.
References DtAssistantMsg::kindToString(), DtAssistantMsg::msgKind(), myNumMsgsSent, mySocketMgr, and sendMsg().
Referenced by sendExitMsg().
| void DtRtiAssistantServer::sendConnMsg | ( | int | compId, |
| bool | disconnect = false, |
||
| const MAKRti::DtString & | display = MAKRti::DtString::nullString() |
||
| ) | [virtual] |
Sends a component ID back to a connecting component.
References DtAssistantConnMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantConnMsg::setDisconnect(), and DtAssistantConnMsg::setDisplay().
| void DtRtiAssistantServer::sendConnRespMsg | ( | int | compId, |
| const DtRtiConnectionInfoDataPair & | conn, | ||
| const DtRtiConnectionConfigurationInfo & | config, | ||
| bool | accepted | ||
| ) | [virtual] |
Sends a connection query response message.
References DtAssistantConnQueryMsgKind, DtRtiConnectionConfigurationInfo::forceFullCompliance(), msgFactory(), sendMsgOnConn(), DtAssistantConnQueryMsg::setForwardingParameters(), and DtAssistantConnQueryMsg::setLRCParameters().
| void DtRtiAssistantServer::sendDeleteFederateMsg | ( | int | compId, |
| DtU16 | fedexHandle, | ||
| DtU16 | fedHandle | ||
| ) | [virtual] |
Sends a message to tell an rtiexec that it shold delete a federate.
References DtAssistantDeleteFederateMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantDeleteFederateMsg::setFederateHandle(), and DtAssistantDeleteFederateMsg::setFederationHandle().
| void DtRtiAssistantServer::sendDoNotWaitForForwardersMsg | ( | int | compId | ) | [virtual] |
Sends a message to the specified forwarder telling it to proceed without waiting for any more forwarders to connect.
References DtAssistantAwaitingForwardersMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantAwaitingForwardersMsg::setIsWaitingForForwarders().
| void DtRtiAssistantServer::sendExitMsg | ( | int | compId = -1 | ) | [virtual] |
Sends an exit command message for the specified component, or for all components if none specified.
References DtAssistantExitMsgKind, msgFactory(), sendBroadcast(), and sendMsgOnConn().
| void DtRtiAssistantServer::sendFederateResignMsg | ( | int | compId, |
| int | federationHdl, | ||
| int | federateHdl | ||
| ) | [virtual] |
Sends a force federate resign message to an rtiexec.
References DtAssistantDeleteFederateMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantDeleteFederateMsg::setFederateHandle(), and DtAssistantDeleteFederateMsg::setFederationHandle().
| void DtRtiAssistantServer::sendFederationDestroyMsg | ( | int | compId, |
| int | federationHdl | ||
| ) | [virtual] |
Sends a force federation destroy message to an rtiexec.
References DtAssistantDeleteFederationMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantDeleteFederationMsg::setFederationHandle().
| void DtRtiAssistantServer::sendLatencyTestRequestMsg | ( | int | compId, |
| bool | runTest, | ||
| bool | continuous, | ||
| bool | shouldHalt, | ||
| bool | observing, | ||
| unsigned int | interactionPeriod, | ||
| unsigned int | numInteractions, | ||
| unsigned int | payloadBytes, | ||
| unsigned long | federationHandle = 0, |
||
| unsigned long | initFedHandle = 0 |
||
| ) | [virtual] |
Sends an initiate latency test request message.
Federation and initiating federate handles are only needed when recipient is an rtiexec.
References DtAssistantChangeLatencyTestModeMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantChangeLatencyTestModeMsg::setContinuousUpdate(), DtAssistantChangeLatencyTestModeMsg::setFederationHandle(), DtAssistantChangeLatencyTestModeMsg::setInitFedHandle(), DtAssistantChangeLatencyTestModeMsg::setInteractionPeriod(), DtAssistantChangeLatencyTestModeMsg::setNumInteractions(), DtAssistantChangeLatencyTestModeMsg::setObservingResults(), DtAssistantChangeLatencyTestModeMsg::setPayloadBytes(), DtAssistantChangeLatencyTestModeMsg::setRunTest(), and DtAssistantChangeLatencyTestModeMsg::setShouldHaltContinuous().
| void DtRtiAssistantServer::sendLicRespMsg | ( | int | compId, |
| bool | runUnlicensed, | ||
| const MAKRti::DtString & | server, | ||
| int | port, | ||
| bool | accepted | ||
| ) | [virtual] |
Sends a license query response message.
References DtAssistantLicQueryMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantLicQueryMsg::setAccepted(), DtAssistantLicQueryMsg::setLicenseServerName(), DtAssistantLicQueryMsg::setPort(), and DtAssistantLicQueryMsg::setUnlicensed().
| void DtRtiAssistantServer::sendLogEnableMsg | ( | int | compId, |
| bool | enable | ||
| ) | [virtual] |
Sends a logging enable message.
References DtAssistantLogEnableMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantLogEnableMsg::setEnable().
| void DtRtiAssistantServer::sendLogRequestMsg | ( | int | compId, |
| unsigned | maxLogSize | ||
| ) | [virtual] |
Sends a log request to an rtiexec.
The response will contain either the entire rtiexec log, or at most recent maxLogSize bytes.
References DtAssistantLogRequestMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantLogRequestMsg::setMaxLogSize().
| void DtRtiAssistantServer::sendMsg | ( | DtTcpMsgSocket * | sock, |
| const DtAssistantMsg & | msg | ||
| ) | [protected, virtual] |
Sends the message over the specified socket.
References myNumMsgsSent, and DtTcpMsgSocket::sendMessage().
Referenced by readAndProcess(), sendBroadcast(), and sendMsgOnConn().
| void DtRtiAssistantServer::sendMsgOnConn | ( | int | compId, |
| const DtAssistantMsg & | msg | ||
| ) | [virtual] |
Send the message over the specified connection.
References DtAssistantMsg::kindToString(), DtAssistantMsg::msgKind(), myConnectionsById, myNumMsgsSent, and sendMsg().
Referenced by forwardMsg(), sendAssistantCommandResponseMsg(), sendConnMsg(), sendConnRespMsg(), sendDeleteFederateMsg(), sendDoNotWaitForForwardersMsg(), sendExitMsg(), sendFederateResignMsg(), sendFederationDestroyMsg(), sendLatencyTestRequestMsg(), sendLicRespMsg(), sendLogEnableMsg(), sendLogRequestMsg(), sendNetworkTestEnableMsg(), sendNtfyLvlUpdateMsg(), sendObserveRtiexecLogMsg(), sendObserveRtiexecMsg(), sendObserveRtiForwarderMsg(), sendRidParamsRequestMsg(), sendSignalTickIntervalMsg(), sendSingleObserveForwarderMsg(), and sendSingleObserveRtiExecMsg().
| void DtRtiAssistantServer::sendNetworkTestEnableMsg | ( | int | compId, |
| int | federationHdl, | ||
| bool | enable | ||
| ) | [virtual] |
Sends a message enabling or disabling network testing for the given federation.
References DtAssistantNetworkTestEnableMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantNetworkTestEnableMsg::setEnableTesting(), and DtAssistantNetworkTestEnableMsg::setFederationHandle().
| void DtRtiAssistantServer::sendNtfyLvlUpdateMsg | ( | int | compId, |
| DtNotifyLevelType | notifyLevel | ||
| ) | [virtual] |
Sends a notify level update message.
References DtAssistantNtfyLvlUpdateMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantNtfyLvlUpdateMsg::setNotifyLevel().
| void DtRtiAssistantServer::sendObserveRtiexecLogMsg | ( | int | connId, |
| bool | isObserved | ||
| ) | [virtual] |
Sends a message to tell an rtiexec that it should either start or stop sending its log information.
References DtAssistantStateObserveFederationsOrRtiexec, DtAssistantStateObserveMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), DtAssistantStateObserveMsg::setTargetType(), and DtAssistantStateObserveMsg::setTimeStateUpdateInterval().
| void DtRtiAssistantServer::sendObserveRtiexecMsg | ( | int | compId, |
| bool | isObserved, | ||
| unsigned int | timeStateIntervalMs | ||
| ) | [virtual] |
Sends a message to tell an rtiexec that it should either start or stop sending its information.
References DtAssistantStateObserveFederationsOrRtiexec, DtAssistantStateObserveMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), DtAssistantStateObserveMsg::setTargetType(), and DtAssistantStateObserveMsg::setTimeStateUpdateInterval().
| void DtRtiAssistantServer::sendObserveRtiForwarderMsg | ( | int | compId, |
| bool | isObserved, | ||
| unsigned int | timeStateIntervalMs, | ||
| int | defunctRemovalTime | ||
| ) | [virtual] |
Sends a message to tell an RTI Forwarder that it should either start or stop sending its information.
References DtAssistantStateObserveForwarderPersistent, DtAssistantStateObserveMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantStateObserveMsg::setDefunctRemovalTime(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), DtAssistantStateObserveMsg::setTargetType(), and DtAssistantStateObserveMsg::setTimeStateUpdateInterval().
| void DtRtiAssistantServer::sendRidParamsRequestMsg | ( | int | compId | ) | [virtual] |
Sends a RID parameter request to an rtiexec.
References DtAssistantRidParamsMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantRidParamsMsg::setIsRequest().
| void DtRtiAssistantServer::sendSignalTickIntervalMsg | ( | int | compId, |
| float | signalTickInterval | ||
| ) | [virtual] |
sends the signal tick interval
References DtAssistantFederateSignalTickIntervalMsgKind, msgFactory(), sendMsgOnConn(), and DtAssistantFederateSignalTickIntervalMsg::setSignalTickInterval().
| void DtRtiAssistantServer::sendSingleObserveForwarderMsg | ( | int | compId | ) | [virtual] |
Sends a message to tell a local forwarder that it should send its data one time only.
References DtAssistantStateObserveForwarder, DtAssistantStateObserveMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), and DtAssistantStateObserveMsg::setTargetType().
| void DtRtiAssistantServer::sendSingleObserveRtiExecMsg | ( | int | compId | ) | [virtual] |
Sends a message to tell a local rtiExec that it should send its data one time only.
References DtAssistantStateObserveFederationsOrRtiexec, DtAssistantStateObserveMsgKind, msgFactory(), sendMsgOnConn(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), and DtAssistantStateObserveMsg::setTargetType().
| void DtRtiAssistantServer::setMsgFactory | ( | DtAssistantMessageFactory * | fact | ) | [protected, virtual] |
Get/Set the message factory .
References myMessageFactory.
| void DtRtiAssistantServer::tcpSocketAdditionCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Callbacks on addition/removal of TCP sockets.
Referenced by DtRtiAssistantServer(), and ~DtRtiAssistantServer().
| void DtRtiAssistantServer::tcpSocketAdditionCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
Callbacks on addition/removal of TCP sockets.
References myAdditionCallbacks, DtAssistantSocketAdditionCbInfo::myCb, myClock, myConnectionsById, myIdsByConnection, myNextCompId, and DtAssistantSocketAdditionCbInfo::myUsr.
| void DtRtiAssistantServer::tcpSocketRemovalCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Referenced by DtRtiAssistantServer(), and ~DtRtiAssistantServer().
| void DtRtiAssistantServer::tcpSocketRemovalCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
| void DtRtiAssistantServer::testConnections | ( | ) | [protected, virtual] |
Verify connection status and mark bad connections for removal.
References mySocketMgr, and DtTcpMsgSocket::testConnectionStatus().
Referenced by tick().
| bool DtRtiAssistantServer::tick | ( | unsigned int | timeout = 0 | ) | [virtual] |
Do the actual message processing.
References myClock, myConnTestInterval, mySocketMgr, myTimeToTestConnections, readAndProcess(), and testConnections().
Lists of pointers to socket addition and socket removal callbacks.
Referenced by addSocketAdditionCallback(), removeSocketAdditionCallback(), and tcpSocketAdditionCb().
DtClock DtRtiAssistantServer::myClock [protected] |
Clock for timeouts.
Referenced by readAndProcess(), tcpSocketAdditionCb(), and tick().
Map of connections by component ID.
Referenced by closeConn(), sendMsgOnConn(), tcpSocketAdditionCb(), and tcpSocketRemovalCb().
DtTime DtRtiAssistantServer::myConnTestInterval [protected] |
Interval at which connections should be tested.
Referenced by tick().
DtTcpMsgSocket* DtRtiAssistantServer::myCurrentSocket [protected] |
The socket on which the current message being processed was received.
Responses to this message should use this socket.
Referenced by currentCompId(), and readAndProcess().
Default message factory.
std::map<int, MAKRti::DtString> DtRtiAssistantServer::myDisconnectReasons [protected] |
List of reasons for socket disconnects.
Referenced by readAndProcess(), and tcpSocketRemovalCb().
Map of component IDs by connection.
Referenced by currentCompId(), numConnections(), tcpSocketAdditionCb(), and tcpSocketRemovalCb().
The message factory.
Referenced by msgFactory(), and setMsgFactory().
DtAssistantMsgCbMgr DtRtiAssistantServer::myMsgCbMgr [protected] |
Message callback manager.
Referenced by addMsgCallback(), addWildcardMsgCallback(), readAndProcess(), removeMsgCallback(), and removeWildcardMsgCallback().
int DtRtiAssistantServer::myNextCompId [protected] |
Next component ID to use.
Referenced by tcpSocketAdditionCb().
unsigned DtRtiAssistantServer::myNumMsgsReceived [protected] |
Total messages received.
Referenced by readAndProcess().
unsigned DtRtiAssistantServer::myNumMsgsSent [protected] |
Total messages sent.
Referenced by sendBroadcast(), sendMsg(), and sendMsgOnConn().
unsigned int DtRtiAssistantServer::myPort [protected] |
Port to which RTI components may connect.
Referenced by DtRtiAssistantServer(), and port().
Referenced by addSocketRemovalCallback(), removeSocketRemovalCallback(), and tcpSocketRemovalCb().
std::auto_ptr<DtTcpMsgSocketMgr> DtRtiAssistantServer::mySocketMgr [protected] |
Manager for the sockets.
Referenced by DtRtiAssistantServer(), isOk(), maxMsgSize(), readAndProcess(), sendBroadcast(), testConnections(), tick(), and ~DtRtiAssistantServer().
std::list< DtTcpMsgSocket* > DtRtiAssistantServer::mySocketsToDisconnect [protected] |
List of sockets to be disconnected before next read.
Referenced by closeConn(), and readAndProcess().
DtTime DtRtiAssistantServer::myTimeToTestConnections [protected] |
Next time to test connections.
Referenced by tick().