![]() |
MAK RTIspy API Documentation for HLA Evolved
|
DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using the same multicast address. More...
Collaboration diagram for DtRtiAssistantPeer:Classes | |
| struct | DtPeerMsgStats |
Public Member Functions | |
| DtRtiAssistantPeer (int id, int port=DtASSISTANT_DEFAULT_PORT, const MAKRti::DtInetAddr &ipv4Addr=DtASSISTANT_DEFAULT_IPV4_ADDR, const MAKRti::DtInetAddr &ipv6Addr=DtASSISTANT_DEFAULT_IPV6_ADDR) | |
| Constructor. | |
| virtual | ~DtRtiAssistantPeer () |
| Destructor. | |
| virtual bool | tick (unsigned int timeout=0) |
| Do the actual message processing. | |
| virtual void | setMsgFactory (DtAssistantMessageFactory *fact) |
| Set the message factory. | |
| virtual DtAssistantMessageFactory * | msgFactory () const |
| Get the message factory. | |
| virtual void | sendQueryMsg () |
| Sends a query message to the other Assistants for their information. | |
| virtual void | sendInfoMsg (const DtRtiConnectionAndConfiguration &connsAndConfigs, unsigned memoryPeriod, bool acceptRemoteCommands, bool removal) |
| Sends the information from this Assistant to the other Assistants. | |
| virtual void | sendLightweightInfoMsg (const DtRtiConnectionAndConfiguration &connsAndConfigs, unsigned memoryPeriod) |
| Sends the local lightweight connection information from this Assistant to the other Assistants. | |
| virtual void | sendLicServerInfoMsg (const DtLicServerSet &licServers, bool removal) |
| Sends the information from this Assistant to the other Assistants. | |
| virtual void | sendStartRtiexecMsg (const DtRtiConnectionInfoDataPair &conn, const DtRtiConnectionConfigurationInfo &config) |
| Sends a message to another Assistant to start an rtiexec with the given connection parameters. | |
| virtual void | sendObserveFederationsMsg (const DtRtiConnectionInfo &conn, bool observe, const DtAssistantInfo &assistant=DtAssistantInfo(), int compId=-1) |
| Sends a message to another Assistant to either begin or stop observing the federations of the given connection. | |
| virtual void | sendObserveRtiExecLogMsg (const DtAssistantInfo &assistant, int compId, bool observe) |
| Sends a message to another Assistant to either begin or stop observing the given rtiExec printer connection. | |
| virtual void | sendObserveRtiexecRspMsg (const MAKRti::DtInetAddr &webSpyAddr, int webSpyPort, DtNotifyLevelType notifyLevel, int compId, const DtAssistantInfo &destination) |
| Sends an observe response message to a remote Assistant observing a local rtiexec. | |
| virtual void | sendObserveRtiForwarderMsg (const DtRtiConnectionInfo &conn, bool observe, const DtAssistantInfo &assistant, int compId) |
| Sends a message to another Assistant to either begin or stop observing the RTI Forwarder on the given connection. | |
| virtual void | sendFederationStateMsg (const DtRtiConnectionInfoDataPair &conn, const DtAssistantFederationInfo &federation, bool isRemoval) |
| Sends a message to the other Assistants with the state of the given federation. | |
| virtual void | sendNoFederationMsg (const DtRtiConnectionInfoDataPair &conn) |
| Sends a message to the other Assistants informing them that a local rtiexec has no federations. | |
| virtual void | sendFederateResignMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, int federateHdl) |
| Sends a force federate resign message to a remote Assistant to be forwarded to a remote rtiexec. | |
| virtual void | sendFederationDestroyMsg (const DtAssistantInfo &assistant, int compId, int federationHdl) |
| Sends a force federation destroy message to a remote Assistant to be forwarded to a remote rtiexec. | |
| virtual void | sendRidParamsRequestMsg (const DtAssistantInfo &assistant, int compId) |
| Sends a message to a remote Assistant to get the RID parameters of one of its rtiexecs. | |
| virtual void | sendLogRequestMsg (const DtAssistantInfo &assistant, int compId, unsigned maxLogSize) |
| Sends a message to a remote Assistant to get the log, or at least the most recent entries up to a size of maxLogSize bytes, of one of its rtiexecs. | |
| virtual bool | sendLatencyTestRequestMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, int federateHdl, bool runTest, bool continuous, bool shouldHalt, bool observing, unsigned int interactionPeriod, unsigned int numInteractions, unsigned int payloadBytes) |
| Sends a latency test request message to a remote Assistant to be forwarded to a remote rtiexec. | |
| virtual void | sendNetworkTestEnableMsg (const DtAssistantInfo &assistant, int compId, int federationHdl, bool enable) |
| Sends a message enabling or disabling network testing for the given federation. | |
| virtual void | sendRtiexecExitMsg (const DtAssistantInfo &assistant, int compId) |
| Sends a message to a remote Assistant asking it to shutdown one of its local rtiexecs. | |
| virtual void | sendNotifyObserveMsg (bool isObserving) |
| Sends a message to other assistants letting them know that we are observing notification messages. | |
| virtual void | sendNotifyMsg (const MAKRti::DtString &text, DtNotifyLevelType notifyLevel, const MAKRti::DtString &sourceName) |
| Sends a notification message to other assistants. | |
| virtual void | sendRemovalMsg () |
| Sends a removal message to the other Assistants to inform them that this Assistant should be removed from their lists of known Assistants. | |
| virtual void | forwardMsg (const DtAssistantMsg &msg, int localCompId, const DtAssistantInfo &dest=DtAssistantInfo()) |
| Forwards the given message to the other Assistants over the given interface. | |
| virtual int | port () const |
| Returns the Assistant peer port. | |
| virtual MAKRti::DtInetAddr | ipv4Address () const |
| Returns the Assistant IPv4 peer address. | |
| virtual MAKRti::DtInetAddr | ipv6Address () const |
| Returns the Assistant IPv6 peer address. | |
| virtual int | id () const |
| Returns the Assistant peer ID. | |
| virtual MAKRti::DtInetAddr | currentNetworkInterfaceAddr () const |
| Returns the network interface address of the current socket being processed. | |
| virtual void | getMsgStats (unsigned &totalRecv, double &recvPerSecOverall, double &recvPerSecCurr, unsigned &totalProc, double &procPerSecOverall, double &procPerSecCurr, unsigned &totalSent, double &sentPerSecOverall, double &sentPerSecCurr) |
| Get message statistics. | |
| virtual DtU32 | maxMsgSize () const |
| Gets the maximum message size. | |
Callback addition and removal methods | |
| virtual void | addMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| Adds/removes callback for a particular message kind. | |
| virtual void | removeMsgCallback (DtAssistantMsgKind msgKind, DtAssistantMsgCbMgr::DtCallbackFcn fcn, void *usr) |
| Adds/removes callback for a particular message kind. | |
| virtual void | addInterfaceFoundCallback (DtInterfaceFoundCb cb, void *usr) |
| Adds a callback for notification for the discovery of a new network interface on the local machine. | |
| virtual void | removeInterfaceFoundCallback (DtInterfaceFoundCb cb, void *usr) |
| Adds/removes callback for a particular message kind. | |
Public Attributes | |
| DtCbInfoStruct(DtInterfaceFoundCb) protected MAKRti::DtInetAddr | myIpv4Addr |
| The IPv4 multicast or broadcast address used by the assistant peer. | |
| MAKRti::DtInetAddr | myIpv6Addr |
| The IPv6 multicast address used by the assistant peer. | |
| int | myId |
| A unique ID assigned to this assistant peer. | |
| std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * > | mySockets |
| A map of network interface addresses to the sockets used on those interfaces to communicate with other Assistants. | |
| std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * >::iterator | mySocketIter |
| Iterator of the current socket being processed or the next one that will be processed. | |
| MAKRti::DtInetAddr | myCurrNetworkInterfaceAddr |
| The address of the current network interface being read from. | |
| DtAssistantMsgCbMgr | myMsgCbMgr |
| Message callback manager. | |
| DtAssistantMessageFactory * | myMessageFactory |
| The message factory. | |
| DtAssistantDfltMsgFactory | myDefaultMessageFactory |
| Default message factory. | |
| DtClock | myClock |
| Clock for timeouts and periodic update messages. | |
| DtTime | myNextCheckInterfacesTime |
| Time to recheck the interfaces that are available. | |
| DtTime | myCheckInterfacesInterval |
| Interval at which periodic interface checking should be performed. | |
| DtTime | myBeginProcessingTime |
| The time when this assistant began processing messages. | |
| DtTime | myNextStatsTime |
| The next time to compute message statistics. | |
| DtTime | myLastStatsTime |
| The last time message statistics were computed. | |
| DtPeerMsgStats | myReceivedMsgStats |
| Message statistics for messages received from other assistants. | |
| DtPeerMsgStats | myProcessedMsgStats |
| Message statistics for messages processed from other assistants. | |
| DtPeerMsgStats | mySentMsgStats |
| Message statistics for messages sent to other assistants. | |
| std::list< DtInterfaceFoundCbInfo > | myInterfaceFoundCallbacks |
| The list of network interface discovery callbacks. | |
| bool | myUsingIpv4 |
| Indicates whether any IPv4 sockets are currently in use. | |
| bool | myUsingIpv6 |
| Indicates whether any IPv4 sockets are currently in use. | |
Static Public Attributes | |
| static const DtTime | theStatisticsInterval = 60 |
| The interval at which message statistics are calculated. | |
Protected Member Functions | |
| virtual bool | needsProcessing (const DtAssistantMsg &msg) |
| Returns true if the message should be processed by this assistant. | |
| virtual bool | addSocketsForInterfaces () |
| Adds a new socket for each new interface. | |
| virtual bool | readAndProcess (DtTime maxTime) |
| Read and process the messages on the socket for up to the maximum time. | |
| virtual void | calculateMsgStatistics () |
| Calculate message statistics. | |
| virtual void | sendMsg (std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * >::iterator sockIter, DtAssistantMsg &msg) |
| Sends the message to the other Assistants on the given socket. | |
| virtual void | sendMsgToAll (DtAssistantMsg &msg) |
| Sends the message to the other Assistants on all sockets. | |
| virtual std::auto_ptr < DtAssistantMsg > | netRead (DtUdpMsgSocket *sock, int *retCode) const |
| Read a message from the socket. | |
DtRtiAssistantPeer manages the sharing of information between one Assistant to other Assistants using the same multicast address.
| DtRtiAssistantPeer::DtRtiAssistantPeer | ( | int | id, |
| int | port = DtASSISTANT_DEFAULT_PORT, |
||
| const MAKRti::DtInetAddr & | ipv4Addr = DtASSISTANT_DEFAULT_IPV4_ADDR, |
||
| const MAKRti::DtInetAddr & | ipv6Addr = DtASSISTANT_DEFAULT_IPV6_ADDR |
||
| ) |
Constructor.
References addSocketsForInterfaces(), myCheckInterfacesInterval, myClock, myId, myNextCheckInterfacesTime, mySocketIter, mySockets, and DtAssistantInfo::setThisAssistantId().
| DtRtiAssistantPeer::~DtRtiAssistantPeer | ( | ) | [virtual] |
Destructor.
References mySockets.
| void DtRtiAssistantPeer::addInterfaceFoundCallback | ( | DtInterfaceFoundCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Adds a callback for notification for the discovery of a new network interface on the local machine.
References myInterfaceFoundCallbacks.
| void DtRtiAssistantPeer::addMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Adds/removes callback for a particular message kind.
References myMsgCbMgr.
Referenced by DtAssistantRemovalMsg::addCallback(), DtAssistantQueryMsg::addCallback(), DtAssistantNotifyObserveMsg::addCallback(), DtAssistantExitMsg::addCallback(), DtAssistantFederateSignalTickIntervalMsg::addCallback(), DtAssistantLicServerInfoMsg::addCallback(), DtAssistantForwarderStateMsg::addCallback(), DtAssistantExecStateMsg::addCallback(), DtAssistantLogRequestMsg::addCallback(), DtAssistantDeleteFederationMsg::addCallback(), DtAssistantLightweightInfoMsg::addCallback(), DtAssistantDeleteFederateMsg::addCallback(), DtAssistantLogMsg::addCallback(), DtAssistantInfoMsg::addCallback(), DtAssistantExecObserveRspMsg::addCallback(), DtAssistantNotifyMsg::addCallback(), DtAssistantPopupMsg::addCallback(), DtAssistantSyncPtUpdateMsg::addCallback(), DtAssistantRidParamsMsg::addCallback(), DtAssistantLatencyReportMsg::addCallback(), DtAssistantTestMgrStatusMsg::addCallback(), DtAssistantStartRtiexecMsg::addCallback(), DtAssistantChangeLatencyTestModeMsg::addCallback(), DtAssistantStateObserveMsg::addCallback(), DtAssistantFederationStateMsg::addCallback(), and DtAssistantFederateStateMsg::addCallback().
| bool DtRtiAssistantPeer::addSocketsForInterfaces | ( | ) | [protected, virtual] |
Adds a new socket for each new interface.
Returns true if any sockets were added.
References DtUdpMsgSocket::isOpen(), DtRtiConnectionInfo::localIpAddresses(), myIpv4Addr, myIpv6Addr, mySockets, myUsingIpv4, myUsingIpv6, DtUdpMsgSocket::openSocket(), and DtRtiConnectionInfo::setLocalIpAddresses().
Referenced by DtRtiAssistantPeer(), and tick().
| void DtRtiAssistantPeer::calculateMsgStatistics | ( | ) | [protected, virtual] |
Calculate message statistics.
References DtRtiAssistantPeer::DtPeerMsgStats::msgsPerSecLastPeriod, DtRtiAssistantPeer::DtPeerMsgStats::msgsPerSecOverall, myBeginProcessingTime, myClock, myLastStatsTime, myNextStatsTime, myProcessedMsgStats, myReceivedMsgStats, mySentMsgStats, DtRtiAssistantPeer::DtPeerMsgStats::numMsgsCurrPeriod, DtRtiAssistantPeer::DtPeerMsgStats::numMsgsTotal, and theStatisticsInterval.
Referenced by tick().
| MAKRti::DtInetAddr DtRtiAssistantPeer::currentNetworkInterfaceAddr | ( | ) | const [virtual] |
Returns the network interface address of the current socket being processed.
References myCurrNetworkInterfaceAddr.
| void DtRtiAssistantPeer::forwardMsg | ( | const DtAssistantMsg & | msg, |
| int | localCompId, | ||
| const DtAssistantInfo & | dest = DtAssistantInfo() |
||
| ) | [virtual] |
Forwards the given message to the other Assistants over the given interface.
The local component ID will be included in the message to indicate the original message sender. Optional parameter specifies a specific assistant to send the message to.
References DtAssistantInfo::address(), DtAssistantMsg::clone(), DtAssistantInfo::host(), DtAssistantInfo::id(), DtHostNameAddress::isValid(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), sendMsgToAll(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), and DtAssistantMsg::setDestId().
| int DtRtiAssistantPeer::id | ( | ) | const [virtual] |
Returns the Assistant peer ID.
References myId.
| MAKRti::DtInetAddr DtRtiAssistantPeer::ipv4Address | ( | ) | const [virtual] |
Returns the Assistant IPv4 peer address.
Returns inaddr_any adress if IPv4 is not in use.
References myIpv4Addr, and myUsingIpv4.
| MAKRti::DtInetAddr DtRtiAssistantPeer::ipv6Address | ( | ) | const [virtual] |
Returns the Assistant IPv6 peer address.
Returns in6addr_any adress if IPv6 is not in use.
References myIpv6Addr, and myUsingIpv6.
| DtU32 DtRtiAssistantPeer::maxMsgSize | ( | ) | const [virtual] |
Gets the maximum message size.
References mySockets.
| DtAssistantMessageFactory * DtRtiAssistantPeer::msgFactory | ( | ) | const [virtual] |
Get the message factory.
References myMessageFactory.
Referenced by netRead(), sendFederateResignMsg(), sendFederationDestroyMsg(), sendFederationStateMsg(), sendInfoMsg(), sendLatencyTestRequestMsg(), sendLicServerInfoMsg(), sendLightweightInfoMsg(), sendLogRequestMsg(), sendNetworkTestEnableMsg(), sendNoFederationMsg(), sendNotifyMsg(), sendNotifyObserveMsg(), sendObserveFederationsMsg(), sendObserveRtiExecLogMsg(), sendObserveRtiexecRspMsg(), sendObserveRtiForwarderMsg(), sendQueryMsg(), sendRemovalMsg(), sendRidParamsRequestMsg(), sendRtiexecExitMsg(), and sendStartRtiexecMsg().
| bool DtRtiAssistantPeer::needsProcessing | ( | const DtAssistantMsg & | msg | ) | [protected, virtual] |
Returns true if the message should be processed by this assistant.
Filters out messages that were either sent by the local assistant or are specifically targeted to another assistant.
References DtAssistantMsg::destAddr(), myId, mySockets, DtAssistantMsg::sourceAddr(), and DtAssistantMsg::sourceId().
Referenced by readAndProcess().
| std::auto_ptr< DtAssistantMsg > DtRtiAssistantPeer::netRead | ( | DtUdpMsgSocket * | sock, |
| int * | retCode | ||
| ) | const [protected, virtual] |
Read a message from the 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, DtUdpMsgSocket::inetUdpSocket(), DtAssistantMsg::isOk(), msgFactory(), DtUdpMsgSocket::recvMessage(), and DtAssistantMsg::sourceAddr().
Referenced by readAndProcess().
| int DtRtiAssistantPeer::port | ( | ) | const [virtual] |
Returns the Assistant peer port.
| bool DtRtiAssistantPeer::readAndProcess | ( | DtTime | maxTime | ) | [protected, virtual] |
Read and process the messages on the socket for up to the maximum time.
References DtASSISTANT_READ_SUCCESS, DtAssistantMsg::kindToString(), DtAssistantMsg::msgKind(), myClock, myCurrNetworkInterfaceAddr, myMsgCbMgr, myProcessedMsgStats, myReceivedMsgStats, mySocketIter, mySockets, needsProcessing(), netRead(), DtRtiAssistantPeer::DtPeerMsgStats::numMsgsCurrPeriod, DtRtiAssistantPeer::DtPeerMsgStats::numMsgsTotal, and DtAssistantMsg::sourceHost().
Referenced by tick().
| void DtRtiAssistantPeer::removeInterfaceFoundCallback | ( | DtInterfaceFoundCb | cb, |
| void * | usr | ||
| ) | [virtual] |
Adds/removes callback for a particular message kind.
References myInterfaceFoundCallbacks.
| void DtRtiAssistantPeer::removeMsgCallback | ( | DtAssistantMsgKind | msgKind, |
| DtAssistantMsgCbMgr::DtCallbackFcn | fcn, | ||
| void * | usr | ||
| ) | [virtual] |
Adds/removes callback for a particular message kind.
References myMsgCbMgr.
Referenced by DtAssistantRemovalMsg::removeCallback(), DtAssistantQueryMsg::removeCallback(), DtAssistantNotifyObserveMsg::removeCallback(), DtAssistantExitMsg::removeCallback(), DtAssistantFederateSignalTickIntervalMsg::removeCallback(), DtAssistantLicServerInfoMsg::removeCallback(), DtAssistantForwarderStateMsg::removeCallback(), DtAssistantExecStateMsg::removeCallback(), DtAssistantLogRequestMsg::removeCallback(), DtAssistantDeleteFederationMsg::removeCallback(), DtAssistantLightweightInfoMsg::removeCallback(), DtAssistantLogMsg::removeCallback(), DtAssistantDeleteFederateMsg::removeCallback(), DtAssistantInfoMsg::removeCallback(), DtAssistantExecObserveRspMsg::removeCallback(), DtAssistantNotifyMsg::removeCallback(), DtAssistantPopupMsg::removeCallback(), DtAssistantSyncPtUpdateMsg::removeCallback(), DtAssistantRidParamsMsg::removeCallback(), DtAssistantLatencyReportMsg::removeCallback(), DtAssistantStartRtiexecMsg::removeCallback(), DtAssistantTestMgrStatusMsg::removeCallback(), DtAssistantChangeLatencyTestModeMsg::removeCallback(), DtAssistantStateObserveMsg::removeCallback(), DtAssistantFederationStateMsg::removeCallback(), and DtAssistantFederateStateMsg::removeCallback().
| void DtRtiAssistantPeer::sendFederateResignMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| int | federationHdl, | ||
| int | federateHdl | ||
| ) | [virtual] |
Sends a force federate resign message to a remote Assistant to be forwarded to a remote rtiexec.
References DtAssistantInfo::address(), DtAssistantDeleteFederateMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantDeleteFederateMsg::setFederateHandle(), and DtAssistantDeleteFederateMsg::setFederationHandle().
| void DtRtiAssistantPeer::sendFederationDestroyMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| int | federationHdl | ||
| ) | [virtual] |
Sends a force federation destroy message to a remote Assistant to be forwarded to a remote rtiexec.
References DtAssistantInfo::address(), DtAssistantDeleteFederationMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), and DtAssistantDeleteFederationMsg::setFederationHandle().
| void DtRtiAssistantPeer::sendFederationStateMsg | ( | const DtRtiConnectionInfoDataPair & | conn, |
| const DtAssistantFederationInfo & | federation, | ||
| bool | isRemoval | ||
| ) | [virtual] |
Sends a message to the other Assistants with the state of the given federation.
References DtAssistantFederationStateMsgKind, DtAssistantFederationInfo::federates(), DtAssistantFederationInfo::federationHandle(), DtAssistantFederationInfo::federationName(), DtAssistantFederationInfo::fomModules(), msgFactory(), mySockets, sendMsg(), DtAssistantMsg::setCompId(), DtAssistantFederationStateMsg::setConnection(), DtAssistantFederationStateMsg::setFederateStates(), DtAssistantFederationStateMsg::setFederationHandle(), DtAssistantFederationStateMsg::setFederationName(), DtAssistantFederationStateMsg::setFedFileName(), DtAssistantFederationStateMsg::setFomModules(), DtAssistantFederationStateMsg::setIsRemoval(), DtAssistantFederationStateMsg::setIsTestEnabled(), DtAssistantFederationStateMsg::setNoFederations(), and DtAssistantFederationInfo::testingEnabled().
| void DtRtiAssistantPeer::sendInfoMsg | ( | const DtRtiConnectionAndConfiguration & | connsAndConfigs, |
| unsigned | memoryPeriod, | ||
| bool | acceptRemoteCommands, | ||
| bool | removal | ||
| ) | [virtual] |
Sends the information from this Assistant to the other Assistants.
This message includes rtiexecs, forwarders, and assistant settings
References DtRtiConnectionAndConfiguration::connections(), DtAssistantInfoMsgKind, DtRtiConnectionAndConfiguration::findConfigMapping(), msgFactory(), mySockets, sendMsg(), DtAssistantInfoMsg::setAssistantInfoMemoryPeriod(), DtAssistantInfoMsg::setRemoteCmdsAccepted(), DtAssistantInfoMsg::setRemoval(), and DtAssistantInfoMsg::setRtiexecsAndForwarders().
| bool DtRtiAssistantPeer::sendLatencyTestRequestMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| int | federationHdl, | ||
| int | federateHdl, | ||
| bool | runTest, | ||
| bool | continuous, | ||
| bool | shouldHalt, | ||
| bool | observing, | ||
| unsigned int | interactionPeriod, | ||
| unsigned int | numInteractions, | ||
| unsigned int | payloadBytes | ||
| ) | [virtual] |
Sends a latency test request message to a remote Assistant to be forwarded to a remote rtiexec.
References DtAssistantInfo::address(), DtAssistantChangeLatencyTestModeMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantChangeLatencyTestModeMsg::setContinuousUpdate(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantChangeLatencyTestModeMsg::setFederationHandle(), DtAssistantChangeLatencyTestModeMsg::setInitFedHandle(), DtAssistantChangeLatencyTestModeMsg::setInteractionPeriod(), DtAssistantChangeLatencyTestModeMsg::setNumInteractions(), DtAssistantChangeLatencyTestModeMsg::setObservingResults(), DtAssistantChangeLatencyTestModeMsg::setPayloadBytes(), DtAssistantChangeLatencyTestModeMsg::setRunTest(), and DtAssistantChangeLatencyTestModeMsg::setShouldHaltContinuous().
| void DtRtiAssistantPeer::sendLicServerInfoMsg | ( | const DtLicServerSet & | licServers, |
| bool | removal | ||
| ) | [virtual] |
Sends the information from this Assistant to the other Assistants.
This message includes rtiexecs, forwarders, and licenses
References DtAssistantLicServerInfoMsgKind, msgFactory(), sendMsgToAll(), DtAssistantLicServerInfoMsg::setLicenseServers(), and DtAssistantLicServerInfoMsg::setRemoval().
| void DtRtiAssistantPeer::sendLightweightInfoMsg | ( | const DtRtiConnectionAndConfiguration & | connsAndConfigs, |
| unsigned | memoryPeriod | ||
| ) | [virtual] |
Sends the local lightweight connection information from this Assistant to the other Assistants.
References DtRtiConnectionAndConfiguration::addConfiguration(), DtRtiConnectionAndConfiguration::addConnection(), DtRtiConnectionAndConfiguration::connections(), DtAssistantLightweightInfoMsgKind, DtRtiConnectionAndConfiguration::findConfigMapping(), msgFactory(), mySockets, sendMsg(), DtRtiConnectionAndConfiguration::setConnectionConfigMapping(), DtAssistantLightweightInfoMsg::setLightweightConns(), and DtAssistantLightweightInfoMsg::setLightweightMemoryPeriod().
| void DtRtiAssistantPeer::sendLogRequestMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| unsigned | maxLogSize | ||
| ) | [virtual] |
Sends a message to a remote Assistant to get the log, or at least the most recent entries up to a size of maxLogSize bytes, of one of its rtiexecs.
References DtAssistantInfo::address(), DtAssistantLogRequestMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), and DtAssistantLogRequestMsg::setMaxLogSize().
| void DtRtiAssistantPeer::sendMsg | ( | std::map< MAKRti::DtInetAddr, DtUdpMsgSocket * >::iterator | sockIter, |
| DtAssistantMsg & | msg | ||
| ) | [protected, virtual] |
Sends the message to the other Assistants on the given socket.
References DtAssistantMsg::destAddr(), DtGetLocalHostName(), DtUdpMsgSocket::isOpen(), DtAssistantMsg::kindToString(), DtAssistantMsg::msgKind(), myId, mySentMsgStats, DtRtiAssistantPeer::DtPeerMsgStats::numMsgsCurrPeriod, DtRtiAssistantPeer::DtPeerMsgStats::numMsgsTotal, DtUdpMsgSocket::sendMessage(), DtAssistantMsg::setSourceAddr(), DtAssistantMsg::setSourceHost(), DtAssistantMsg::setSourceId(), and DtAssistantMsg::sourceHost().
Referenced by forwardMsg(), sendFederateResignMsg(), sendFederationDestroyMsg(), sendFederationStateMsg(), sendInfoMsg(), sendLatencyTestRequestMsg(), sendLightweightInfoMsg(), sendLogRequestMsg(), sendMsgToAll(), sendNetworkTestEnableMsg(), sendNoFederationMsg(), sendObserveFederationsMsg(), sendObserveRtiExecLogMsg(), sendObserveRtiexecRspMsg(), sendObserveRtiForwarderMsg(), sendRidParamsRequestMsg(), sendRtiexecExitMsg(), and sendStartRtiexecMsg().
| void DtRtiAssistantPeer::sendMsgToAll | ( | DtAssistantMsg & | msg | ) | [protected, virtual] |
Sends the message to the other Assistants on all sockets.
References mySockets, and sendMsg().
Referenced by forwardMsg(), sendLicServerInfoMsg(), sendNotifyMsg(), sendNotifyObserveMsg(), sendQueryMsg(), and sendRemovalMsg().
| void DtRtiAssistantPeer::sendNetworkTestEnableMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| int | federationHdl, | ||
| bool | enable | ||
| ) | [virtual] |
Sends a message enabling or disabling network testing for the given federation.
References DtAssistantInfo::address(), DtAssistantNetworkTestEnableMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantNetworkTestEnableMsg::setEnableTesting(), and DtAssistantNetworkTestEnableMsg::setFederationHandle().
| void DtRtiAssistantPeer::sendNoFederationMsg | ( | const DtRtiConnectionInfoDataPair & | conn | ) | [virtual] |
Sends a message to the other Assistants informing them that a local rtiexec has no federations.
References DtAssistantFederationStateMsgKind, msgFactory(), mySockets, sendMsg(), DtAssistantMsg::setCompId(), DtAssistantFederationStateMsg::setConnection(), and DtAssistantFederationStateMsg::setNoFederations().
| void DtRtiAssistantPeer::sendNotifyMsg | ( | const MAKRti::DtString & | text, |
| DtNotifyLevelType | notifyLevel, | ||
| const MAKRti::DtString & | sourceName | ||
| ) | [virtual] |
Sends a notification message to other assistants.
References DtAssistantNotifyMsgKind, msgFactory(), sendMsgToAll(), DtAssistantNotifyMsg::setNotifyLevel(), DtAssistantNotifyMsg::setSourceName(), and DtAssistantNotifyMsg::setText().
| void DtRtiAssistantPeer::sendNotifyObserveMsg | ( | bool | isObserving | ) | [virtual] |
Sends a message to other assistants letting them know that we are observing notification messages.
References DtAssistantNotifyObserveMsgKind, msgFactory(), sendMsgToAll(), and DtAssistantNotifyObserveMsg::setIsObserved().
| void DtRtiAssistantPeer::sendObserveFederationsMsg | ( | const DtRtiConnectionInfo & | conn, |
| bool | observe, | ||
| const DtAssistantInfo & | assistant = DtAssistantInfo(), |
||
| int | compId = -1 |
||
| ) | [virtual] |
Sends a message to another Assistant to either begin or stop observing the federations of the given connection.
Can optionally specify the specific location (Assistant and component ID) of the rtiexec.
References DtAssistantInfo::address(), DtAssistantStateObserveFederationsOrRtiexec, DtAssistantStateObserveMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtRtiConnectionInfo::networkInterfaceAddr(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantStateObserveMsg::setConnection(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), and DtAssistantStateObserveMsg::setTargetType().
| void DtRtiAssistantPeer::sendObserveRtiExecLogMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId, | ||
| bool | observe | ||
| ) | [virtual] |
Sends a message to another Assistant to either begin or stop observing the given rtiExec printer connection.
References DtAssistantInfo::address(), DtAssistantStateObserveFederationsOrRtiexec, DtAssistantStateObserveMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantStateObserveMsg::setIsLogRequest(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), DtAssistantStateObserveMsg::setTargetType(), and DtAssistantStateObserveMsg::setTimeStateUpdateInterval().
| void DtRtiAssistantPeer::sendObserveRtiexecRspMsg | ( | const MAKRti::DtInetAddr & | webSpyAddr, |
| int | webSpyPort, | ||
| DtNotifyLevelType | notifyLevel, | ||
| int | compId, | ||
| const DtAssistantInfo & | destination | ||
| ) | [virtual] |
Sends an observe response message to a remote Assistant observing a local rtiexec.
References DtAssistantInfo::address(), DtAssistantExecObserveRspMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantExecObserveRspMsg::setNotifyLevel(), DtAssistantExecObserveRspMsg::setWebServerIp(), and DtAssistantExecObserveRspMsg::setWebServerPort().
| void DtRtiAssistantPeer::sendObserveRtiForwarderMsg | ( | const DtRtiConnectionInfo & | conn, |
| bool | observe, | ||
| const DtAssistantInfo & | assistant, | ||
| int | compId | ||
| ) | [virtual] |
Sends a message to another Assistant to either begin or stop observing the RTI Forwarder on the given connection.
References DtAssistantInfo::address(), DtAssistantStateObserveForwarderPersistent, DtAssistantStateObserveMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantStateObserveMsg::setConnection(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), DtAssistantStateObserveMsg::setIsObserved(), DtAssistantStateObserveMsg::setIsSingleView(), and DtAssistantStateObserveMsg::setTargetType().
| void DtRtiAssistantPeer::sendQueryMsg | ( | ) | [virtual] |
Sends a query message to the other Assistants for their information.
References DtAssistantQueryMsgKind, msgFactory(), and sendMsgToAll().
| void DtRtiAssistantPeer::sendRemovalMsg | ( | ) | [virtual] |
Sends a removal message to the other Assistants to inform them that this Assistant should be removed from their lists of known Assistants.
References DtAssistantRemovalMsgKind, msgFactory(), and sendMsgToAll().
| void DtRtiAssistantPeer::sendRidParamsRequestMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId | ||
| ) | [virtual] |
Sends a message to a remote Assistant to get the RID parameters of one of its rtiexecs.
References DtAssistantInfo::address(), DtAssistantRidParamsMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), DtAssistantMsg::setDestId(), and DtAssistantRidParamsMsg::setIsRequest().
| void DtRtiAssistantPeer::sendRtiexecExitMsg | ( | const DtAssistantInfo & | assistant, |
| int | compId | ||
| ) | [virtual] |
Sends a message to a remote Assistant asking it to shutdown one of its local rtiexecs.
References DtAssistantInfo::address(), DtAssistantExitMsgKind, DtAssistantInfo::id(), msgFactory(), mySockets, DtAssistantInfo::networkInterfaceAddress(), sendMsg(), DtAssistantMsg::setCompId(), DtAssistantMsg::setDestAddr(), and DtAssistantMsg::setDestId().
| void DtRtiAssistantPeer::sendStartRtiexecMsg | ( | const DtRtiConnectionInfoDataPair & | conn, |
| const DtRtiConnectionConfigurationInfo & | config | ||
| ) | [virtual] |
Sends a message to another Assistant to start an rtiexec with the given connection parameters.
References DtAssistantStartRtiexecMsgKind, DtRtiConnectionConfigurationInfo::forceFullCompliance(), msgFactory(), mySockets, DtAssistantStartRtiexecMsg::reliableIpAddress(), sendMsg(), DtAssistantStartRtiexecMsg::setBestEffortIpAddress(), DtAssistantStartRtiexecMsg::setConnectionName(), DtAssistantStartRtiexecMsg::setForwarderPort(), DtAssistantStartRtiexecMsg::setForwarderToConnectTo(), DtAssistantStartRtiexecMsg::setFullCompliance(), DtAssistantStartRtiexecMsg::setReliableIpAddress(), DtAssistantStartRtiexecMsg::setTcpPort(), and DtAssistantStartRtiexecMsg::setUdpPort().
| void DtRtiAssistantPeer::setMsgFactory | ( | DtAssistantMessageFactory * | fact | ) | [virtual] |
Set the message factory.
References myMessageFactory.
| bool DtRtiAssistantPeer::tick | ( | unsigned int | timeout = 0 | ) | [virtual] |
Do the actual message processing.
References addSocketsForInterfaces(), calculateMsgStatistics(), myBeginProcessingTime, myCheckInterfacesInterval, myClock, myInterfaceFoundCallbacks, myLastStatsTime, myNextCheckInterfacesTime, myNextStatsTime, mySocketIter, mySockets, and readAndProcess().
The time when this assistant began processing messages.
Referenced by calculateMsgStatistics(), and tick().
Interval at which periodic interface checking should be performed.
Referenced by DtRtiAssistantPeer(), and tick().
| DtClock DtRtiAssistantPeer::myClock |
Clock for timeouts and periodic update messages.
Referenced by calculateMsgStatistics(), DtRtiAssistantPeer(), readAndProcess(), and tick().
| MAKRti::DtInetAddr DtRtiAssistantPeer::myCurrNetworkInterfaceAddr |
The address of the current network interface being read from.
Will have an invalid value if no messages are currently being processed.
Referenced by currentNetworkInterfaceAddr(), and readAndProcess().
Default message factory.
A unique ID assigned to this assistant peer.
This ID, along with the IP address of this machine, should uniquely identify this Assistant.
Referenced by DtRtiAssistantPeer(), id(), needsProcessing(), and sendMsg().
| std::list<DtInterfaceFoundCbInfo> DtRtiAssistantPeer::myInterfaceFoundCallbacks |
The list of network interface discovery callbacks.
Referenced by addInterfaceFoundCallback(), removeInterfaceFoundCallback(), and tick().
| DtCbInfoStruct (DtInterfaceFoundCb) protected MAKRti::DtInetAddr DtRtiAssistantPeer::myIpv4Addr |
The IPv4 multicast or broadcast address used by the assistant peer.
Referenced by addSocketsForInterfaces(), and ipv4Address().
| MAKRti::DtInetAddr DtRtiAssistantPeer::myIpv6Addr |
The IPv6 multicast address used by the assistant peer.
Referenced by addSocketsForInterfaces(), and ipv6Address().
The last time message statistics were computed.
Referenced by calculateMsgStatistics(), and tick().
The message factory.
Referenced by msgFactory(), and setMsgFactory().
Message callback manager.
Referenced by addMsgCallback(), readAndProcess(), and removeMsgCallback().
Time to recheck the interfaces that are available.
Referenced by DtRtiAssistantPeer(), and tick().
The next time to compute message statistics.
Referenced by calculateMsgStatistics(), and tick().
Message statistics for messages processed from other assistants.
Referenced by calculateMsgStatistics(), getMsgStats(), and readAndProcess().
Message statistics for messages received from other assistants.
Referenced by calculateMsgStatistics(), getMsgStats(), and readAndProcess().
Message statistics for messages sent to other assistants.
Referenced by calculateMsgStatistics(), getMsgStats(), and sendMsg().
| std::map< MAKRti::DtInetAddr, DtUdpMsgSocket*>::iterator DtRtiAssistantPeer::mySocketIter |
Iterator of the current socket being processed or the next one that will be processed.
Referenced by DtRtiAssistantPeer(), readAndProcess(), and tick().
| std::map< MAKRti::DtInetAddr, DtUdpMsgSocket*> DtRtiAssistantPeer::mySockets |
A map of network interface addresses to the sockets used on those interfaces to communicate with other Assistants.
Referenced by addSocketsForInterfaces(), DtRtiAssistantPeer(), forwardMsg(), maxMsgSize(), needsProcessing(), readAndProcess(), sendFederateResignMsg(), sendFederationDestroyMsg(), sendFederationStateMsg(), sendInfoMsg(), sendLatencyTestRequestMsg(), sendLightweightInfoMsg(), sendLogRequestMsg(), sendMsgToAll(), sendNetworkTestEnableMsg(), sendNoFederationMsg(), sendObserveFederationsMsg(), sendObserveRtiExecLogMsg(), sendObserveRtiexecRspMsg(), sendObserveRtiForwarderMsg(), sendRidParamsRequestMsg(), sendRtiexecExitMsg(), sendStartRtiexecMsg(), tick(), and ~DtRtiAssistantPeer().
Indicates whether any IPv4 sockets are currently in use.
Referenced by addSocketsForInterfaces(), and ipv4Address().
Indicates whether any IPv4 sockets are currently in use.
Referenced by addSocketsForInterfaces(), and ipv6Address().
const DtTime DtRtiAssistantPeer::theStatisticsInterval = 60 [static] |
The interval at which message statistics are calculated.
Referenced by calculateMsgStatistics().