![]() |
MAK RTIspy API Documentation for HLA 1.3
|
This class represents a network connection with another RTI component. More...
Inheritance diagram for DtRtiConnection:
Collaboration diagram for DtRtiConnection:Public Member Functions | |
| DtRtiConnection (DtMsgSocket *skt) | |
| Constructor. | |
| virtual | ~DtRtiConnection () |
| Destructor. | |
| virtual void | setMsgFactory (DtRtiMsgFactory *fact) |
| Set/Get the Message Factory used by this object. | |
| virtual DtRtiMsgFactory * | rtiMsgFactory () |
| virtual DtRtiMsg * | netRead (DtNetReadStatus *retCode=NULL) |
| Note: netRead() creates a new DtRtiMsg using the message factory Caller is responsible for deleting it when through. | |
| virtual int | send (const DtRtiMsg &msg, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr()) |
| Send a message. | |
| virtual bool | flush () |
| Send buffered messages. | |
| virtual int | isOk () |
| Return true if the status of the connection is OK. | |
| virtual void | setCheckVersion (bool enableCheckVersion) |
| Set/get whether to check message version. | |
| virtual bool | checkVersion () const |
| virtual void | disableCheckSize () |
| Disable message size check. | |
| virtual void | enableCheckSize () |
| Enable message size check. | |
| virtual void | setFedExName (const MAKRti::DtString &newFedExName) |
| Set/Get federation execution name. NULL means "all". | |
| virtual const MAKRti::DtString & | fedExName () const |
| virtual void | setFedExHandle (int handle) |
| Set/Get federation execution handle. 0 means "all". | |
| virtual int | fedExHandle () const |
| virtual void | setFederateHandle (DtFederationHandle handle) |
| Set/Get federate handle. | |
| virtual DtFederationHandle | federateHandle () const |
| virtual void | setConnId (unsigned long connId) |
| Set/Get the connection ID assigned to the connection. | |
| virtual unsigned long | connId () const |
| virtual DtMsgSocket * | socket () |
| Returns our socket. | |
Protected Member Functions | |
| void | init (DtMsgSocket *s) |
Protected Attributes | |
| MAKRti::DtString | myFedExName |
| int | myFedExHandle |
| DtFederationHandle | myFedHandle |
| DtMsgSocket * | mySocket |
| DtRtiMsgFactory * | myMsgFact |
| unsigned long | myReceivedMsgCount |
| bool | myCheckSize |
| bool | myCheckVersion |
| unsigned int | myWaitEventIndex |
| unsigned long | myConnId |
| Win32 only. | |
Private Member Functions | |
| DtRtiConnection (const DtRtiConnection &orig) | |
| Copy CTOR not implemented. | |
| DtRtiConnection & | operator= (DtRtiConnection const &orig) |
| Assignment Operator not implemented. | |
This class represents a network connection with another RTI component.
| DtRtiConnection::DtRtiConnection | ( | DtMsgSocket * | skt | ) |
Constructor.
References DtBindMessage(), and init().
|
virtual |
Destructor.
|
private |
Copy CTOR not implemented.
|
virtual |
References myCheckVersion.
Referenced by netRead().
|
inlinevirtual |
References myConnId.
Referenced by DtConnectionMgr::processConnections(), and setConnId().
|
virtual |
Disable message size check.
References myCheckSize.
|
virtual |
Enable message size check.
References myCheckSize.
|
inlinevirtual |
References myFedHandle.
|
inlinevirtual |
References myFedExHandle.
|
inlinevirtual |
References myFedExName.
|
virtual |
Send buffered messages.
Returns indication of whether the flush is complete or incomplete.
Reimplemented in DtSmRtiConnection.
References DtMsgSocket::flush(), isOk(), DtMsgSocket::lastError(), PERROR, DtMsgSocket::printStateToStream(), and socket().
Referenced by DtConnectionMgr::flush(), DtConnectionMgr::repairFederationConnection(), and DtAsyncConnectionMgr::sendPackets().
|
protected |
References myFedExHandle, myFedExName, myFedHandle, myMsgFact, mySocket, NULL, and DtMsgSocket::state().
Referenced by DtRtiConnection().
|
virtual |
Return true if the status of the connection is OK.
References mySocket, and DtMsgSocket::state().
Referenced by DtConnectionMgr::destroyRelConn(), flush(), netRead(), DtConnectionMgr::processConnections(), DtAsyncConnectionMgr::receivePackets(), send(), and DtAsyncConnectionMgr::sendPackets().
|
virtual |
Note: netRead() creates a new DtRtiMsg using the message factory Caller is responsible for deleting it when through.
References checkVersion(), DtMessageFactory< T_Message, T_MessageKind, T_NetworkHeader >::create(), DtInvalidMsgKind, DtNET_BUFFER_TOO_SMALL, DtNET_READ_BAD_PACKET, DtNET_READ_FILTERED_PACKET, DtNET_READ_NO_PACKETS, DtNET_READ_SIZE_MISMATCH, DtNET_READ_SUCCESS, DtNET_READ_VERSION_MISMATCH, DtNET_READ_VERSION_UNKNOWN, DtNET_UNKNOWN_ERROR, DtRtiMessageVersion, DtRtiMessageVersionString(), DtNetMsgHeader::fedHandle, DtNetMsgHeader::isForExec(), isOk(), DtRtiMsg::kindToString(), DtMsgSocket::lastError(), MSG_STATUS_OK, DtNetMsgHeader::msgKind, myCheckSize, myFedExHandle, myFedExName, NULL, PERROR, DtMsgSocket::printStateToStream(), DtMsgSocket::recvMessage(), rtiMsgFactory(), socket(), DtRtiMsg::status(), DtNetMsgHeader::totalSize, DtNetMsgHeader::version, DtNetMsgHeader::versionCheck, and DtNetMsgHeader::versionMatches().
Referenced by DtConnectionMgr::createAncillaryRelConns(), DtConnectionMgr::createRelConn(), DtConnectionMgr::destroyRelConn(), DtSmConnectionMgr::getMessage(), DtConnectionMgr::getMessage(), DtNetStatsAsyncConnMgr::processConnection(), DtSmConnectionMgr::processConnection(), DtRtiShmQNetMgr::processConnection(), DtConnectionMgr::processConnection(), DtAsyncConnectionMgr::receivePacket(), and DtConnectionMgr::repairFederationConnection().
|
private |
Assignment Operator not implemented.
|
inlinevirtual |
|
virtual |
Send a message.
Reimplemented in DtGsRtiConnection, and DtSmRtiConnection.
References DtUseFedObservers, DtNetMsgHeader::flags, isOk(), DtMsgSocket::lastError(), DtRtiMsg::netHeader(), PERROR, DtMsgSocket::printStateToStream(), DtMsgSocket::sendMessage(), and socket().
Referenced by DtConnectionMgr::createAncillaryRelConns(), DtConnectionMgr::destroyRelConn(), DtConnectionMgr::send(), and DtAsyncConnectionMgr::sendPackets().
|
virtual |
Set/get whether to check message version.
This connection will filter invalid versions when enabled.
References enableCheckVersion, and myCheckVersion.
|
inlinevirtual |
Set/Get the connection ID assigned to the connection.
References connId(), and myConnId.
Referenced by DtConnectionMgr::createAncillaryRelConns(), and DtConnectionMgr::createRelConn().
|
inlinevirtual |
Set/Get federate handle.
References myFedHandle.
Referenced by DtSmConnectionMgr::connectFederation(), DtConnectionMgr::connectFederation(), DtSmConnectionMgr::disconnectFederation(), DtConnectionMgr::disconnectFederation(), DtSmConnectionMgr::repairFederationConnection(), DtConnectionMgr::repairFederationConnection(), and DtConnectionMgr::setFederateHandle().
|
inlinevirtual |
Set/Get federation execution handle. 0 means "all".
References myFedExHandle.
Referenced by DtSmConnectionMgr::connectFederation(), DtConnectionMgr::connectFederation(), DtSmConnectionMgr::disconnectFederation(), DtConnectionMgr::disconnectFederation(), DtSmConnectionMgr::repairFederationConnection(), and DtConnectionMgr::repairFederationConnection().
|
inlinevirtual |
Set/Get federation execution name. NULL means "all".
References myFedExName.
Referenced by DtSmConnectionMgr::connectFederation(), DtConnectionMgr::connectFederation(), DtSmConnectionMgr::disconnectFederation(), DtConnectionMgr::disconnectFederation(), DtSmConnectionMgr::repairFederationConnection(), and DtConnectionMgr::repairFederationConnection().
|
virtual |
Set/Get the Message Factory used by this object.
fact becomes property of this object, meaning it will be deleted when the factory is replaced, or when the DtRtiConnection is destroyed.
References myMsgFact.
Referenced by DtConnectionMgr::createAncillaryRelConns(), DtConnectionMgr::createBestEffortConn(), DtConnectionMgr::createRelConn(), DtSmConnectionMgr::createSharedMemConn(), DtSmConnectionMgr::setMsgFactory(), and DtConnectionMgr::setMsgFactory().
|
inlinevirtual |
Returns our socket.
References mySocket.
Referenced by DtConnectionMgr::createAncillaryRelConns(), DtConnectionMgr::destroyAncillaryRelConn(), DtConnectionMgr::destroyAncillaryRelConns(), DtConnectionMgr::destroyBestEffortConn(), DtConnectionMgr::destroyRelConn(), DtConnectionMgr::disconnectFederation(), DtConnectionMgr::dropMulticastGroup(), flush(), DtConnectionMgr::flush(), DtConnectionMgr::forceDropMulticastGroup(), DtRtiShmQNetMgr::init(), DtSmConnectionMgr::initConnections(), DtConnectionMgr::listenToMulticastGroup(), netRead(), DtConnectionMgr::readFileDescriptor(), send(), DtConnectionMgr::updateBufferSizes(), DtAsyncConnectionMgr::workerThread(), and DtSmConnectionMgr::~DtSmConnectionMgr().
|
protected |
Referenced by disableCheckSize(), enableCheckSize(), and netRead().
|
protected |
Referenced by checkVersion(), and setCheckVersion().
|
protected |
Win32 only.
Referenced by connId(), and setConnId().
|
protected |
Referenced by fedExHandle(), init(), netRead(), and setFedExHandle().
|
protected |
Referenced by fedExName(), init(), netRead(), and setFedExName().
|
protected |
Referenced by federateHandle(), init(), and setFederateHandle().
|
protected |
Referenced by init(), rtiMsgFactory(), and setMsgFactory().
|
protected |
|
protected |
|
protected |