![]() |
MAK RTIspy API Documentation for HLA Evolved
|
The DtMulitcastDiscoveryMgr can act as either a Requester or a Responder. More...
Collaboration diagram for DtMulitcastDiscoveryMgr:Public Types | |
| typedef std::pair < MAKRti::DtInetAddr, unsigned int > | DtMcastResponderId |
| Multicast Discovery Responders are identified by an <Address:ID> pair. | |
Public Member Functions | |
| DtMulitcastDiscoveryMgr (const DtRIDParameters *params, DtMulticastDiscoveryMsg::DtDiscoveryTarget targetType, bool isResponder=false, bool allowMultipleResponders=false) | |
| Constructor. | |
| virtual | ~DtMulitcastDiscoveryMgr () |
| Destructor. | |
| virtual bool | init () |
| Finish manager initialization. | |
| virtual DtMcastResponderId | discover () |
| Discover and return the address of the Multicast Discovery Responder (blocking) Returns zero if discovery failed. | |
| virtual bool | responderAlreadyExists () |
| Discover any existing responders and return true if a responder exists. | |
| virtual bool | tick (float timeToWait) |
| Give the Manager time to respond to incoming Address Requests Returns true if at least one request was processed. | |
| virtual MAKRti::DtInetAddr | hostAddr () const |
Protected Member Functions | |
| virtual DtMcastResponderId | requestAddress (float timeToWait) |
| Request Multicast Discovery Responder Address from the network. | |
Protected Attributes | |
| bool | myIsResponder |
| bool | myAllowMultipleResponders |
| DtMulticastDiscoveryMsg::DtDiscoveryTarget | myDiscoveryTargetType |
| const DtRIDParameters * | myParams |
| MAKRti::DtClock | myClock |
| DtUdpMsgSocket * | mySocket |
| DtMcastResponderId | myMcastResponderId |
| The ID of the discovered RTI Forwarder. | |
| DtMcastResponderId | myHostId |
| The ID of this process. | |
Private Member Functions | |
| DtMulitcastDiscoveryMgr () | |
| Default Ctor - unimplemented. | |
The DtMulitcastDiscoveryMgr can act as either a Requester or a Responder.
As a Requester, the DtMulitcastDiscoveryMgr discovers the host address of a Responder, if any are active. As a Responder, the DtMulitcastDiscoveryMgr responds to MulticastDiscovery Requests with its host address, and if requested it ensures that only one responder is active at a given time.
| typedef std::pair< MAKRti::DtInetAddr, unsigned int > DtMulitcastDiscoveryMgr::DtMcastResponderId |
Multicast Discovery Responders are identified by an <Address:ID> pair.
| DtMulitcastDiscoveryMgr::DtMulitcastDiscoveryMgr | ( | ) | [private] |
Default Ctor - unimplemented.
| DtMulitcastDiscoveryMgr::DtMulitcastDiscoveryMgr | ( | const DtRIDParameters * | params, |
| DtMulticastDiscoveryMsg::DtDiscoveryTarget | targetType, | ||
| bool | isResponder = false, |
||
| bool | allowMultipleResponders = false |
||
| ) |
Constructor.
References DtDefaultInterfaceAddr(), myClock, myHostId, myParams, and DtRIDParameters::networkInterfaceAddr().
| DtMulitcastDiscoveryMgr::~DtMulitcastDiscoveryMgr | ( | ) | [virtual] |
Destructor.
References mySocket.
Discover and return the address of the Multicast Discovery Responder (blocking) Returns zero if discovery failed.
References DtRIDParameters::lrcMcastDiscoveryDelay, DtRIDParameters::mcastDiscoveryTries, myAllowMultipleResponders, myHostId, myIsResponder, myMcastResponderId, myParams, and requestAddress().
Referenced by DtRtiMsgForwarder::performMcastDiscovery(), DtRtiShmQNetMgr::performMulticastDiscovery(), DtRtiAmbassadorBaseImplementor::performMulticastDiscovery(), DtRtiExec::performMulticastDiscovery(), and responderAlreadyExists().
| MAKRti::DtInetAddr DtMulitcastDiscoveryMgr::hostAddr | ( | ) | const [inline, virtual] |
References myHostId.
| bool DtMulitcastDiscoveryMgr::init | ( | ) | [virtual] |
Finish manager initialization.
References DtRIDParameters::bestEffortSendRetryWaitUsec, DtRIDParameters::enableBestEffortSendRetry, DtUdpMsgSocket::isOpen(), DtRIDParameters::maxUdpPacketSize, DtRIDParameters::mcastDiscoveryAddr(), myParams, mySocket, DtRIDParameters::networkInterfaceAddr(), DtUdpMsgSocket::openSocket(), DtUdpMsgSocket::setMcastTtlOption(), DtMsgSocket::setRecvBufferSize(), DtUdpMsgSocket::setRetryOnSend(), DtMsgSocket::setSendBufferSize(), DtRIDParameters::socketReceiveBufferSize, and DtRIDParameters::socketSendBufferSize.
Referenced by DtRtiMsgForwarder::performMcastDiscovery(), DtRtiShmQNetMgr::performMulticastDiscovery(), DtRtiAmbassadorBaseImplementor::performMulticastDiscovery(), and DtRtiExec::performMulticastDiscovery().
| DtMulitcastDiscoveryMgr::DtMcastResponderId DtMulitcastDiscoveryMgr::requestAddress | ( | float | timeToWait | ) | [protected, virtual] |
Request Multicast Discovery Responder Address from the network.
References DtMulticastDiscoveryMsg::discoveryAddr(), DtMulticastDiscoveryMsg::discoveryId(), DtMulticastDiscoveryMsg::discoveryStatus(), DtMulticastDiscoveryMsg::discoveryTarget(), DtMulticastDiscoveryMsg::DtDiscoveryRequest, DtMulticastDiscoveryMsg::DtDiscoveryResponse, DtMulticastDiscoveryMsgKind, DtUdpMsgSocket::flush(), myClock, myDiscoveryTargetType, myHostId, myIsResponder, myParams, mySocket, DtUdpMsgSocket::recvMessage(), DtUdpMsgSocket::sendMessage(), and DtRtiMtdTransportType::set().
Referenced by discover().
| bool DtMulitcastDiscoveryMgr::responderAlreadyExists | ( | ) | [virtual] |
Discover any existing responders and return true if a responder exists.
References discover().
| bool DtMulitcastDiscoveryMgr::tick | ( | float | timeToWait | ) | [virtual] |
Give the Manager time to respond to incoming Address Requests Returns true if at least one request was processed.
References DtMulticastDiscoveryMsg::discoveryAddr(), DtMulticastDiscoveryMsg::discoveryId(), DtMulticastDiscoveryMsg::discoveryStatus(), DtMulticastDiscoveryMsg::discoveryTarget(), DtMulticastDiscoveryMsg::DtDiscoveryRequest, DtMulticastDiscoveryMsg::DtDiscoveryResponse, DtMulticastDiscoveryMsgKind, myClock, myDiscoveryTargetType, myHostId, myIsResponder, myParams, mySocket, DtUdpMsgSocket::recvMessage(), DtUdpMsgSocket::sendMessage(), and DtRtiMtdTransportType::set().
Referenced by DtExtendedRtiMsgForwarder::getNextMsg(), DtRtiMsgForwarder::run(), and DtRtiExec::tick().
Referenced by discover().
MAKRti::DtClock DtMulitcastDiscoveryMgr::myClock [protected] |
Referenced by DtMulitcastDiscoveryMgr(), requestAddress(), and tick().
DtMulticastDiscoveryMsg::DtDiscoveryTarget DtMulitcastDiscoveryMgr::myDiscoveryTargetType [protected] |
Referenced by requestAddress(), and tick().
DtMcastResponderId DtMulitcastDiscoveryMgr::myHostId [protected] |
The ID of this process.
Referenced by discover(), DtMulitcastDiscoveryMgr(), hostAddr(), requestAddress(), and tick().
bool DtMulitcastDiscoveryMgr::myIsResponder [protected] |
Referenced by discover(), requestAddress(), and tick().
The ID of the discovered RTI Forwarder.
Referenced by discover().
const DtRIDParameters* DtMulitcastDiscoveryMgr::myParams [protected] |
Referenced by discover(), DtMulitcastDiscoveryMgr(), init(), requestAddress(), and tick().
DtUdpMsgSocket* DtMulitcastDiscoveryMgr::mySocket [protected] |
Referenced by init(), requestAddress(), tick(), and ~DtMulitcastDiscoveryMgr().