![]() |
MAK RTIspy API Documentation for HLA 1.3
|
DtRtiSmSocket provides access to shared memory via a subscribable message queue tailored to the need of the RTI. More...
Inheritance diagram for DtRtiSmSocket:
Collaboration diagram for DtRtiSmSocket:Classes | |
| class | DtRtiSmSocketBundleBuff |
Public Member Functions | |
| DtRtiSmSocket (const char *sharename, std::shared_ptr< DtMsgHeaderReader > hdrReader) | |
| virtual | ~DtRtiSmSocket () |
| virtual bool | initializeSmQueue (MAKRti::DtU32 id=DtSM_INVALID_SUBSCRIBER_ID, bool forceSubscribe=false) |
| Attach to RTI specific variant of shared memory message queue. More... | |
| virtual bool | initializeSmQueue (MAKRti::DtU32 numBuckets, MAKRti::DtU32 payloadSize, bool reliableQueue, MAKRti::DtU32 id=DtSM_INVALID_SUBSCRIBER_ID, bool forceSubscribe=false) |
| The following version of initializeSmQueue() is specific to management of the shared memory subscribable message queue which the socket interfaces with. More... | |
| virtual int | sendMessage (caddr_t msg, size_t msgSize, bool deleteAfterSend, unsigned int flags, const MAKRti::DtInetAddr &destAddr=MAKRti::DtInetAddr::inaddrAny()) |
| The send method takes an extra flags parameter which identifies the transport method (DtReliable or DtBestEffort) and priority. More... | |
| virtual bool | flush () |
| Send buffered messages. More... | |
| virtual int | getMsgTransportInfo (MAKRti::DtInetAddr *addr, MAKRti::DtU32 *transAndPriority) |
| This receive method returns the size of the next message in shared memory as well as additional information needed by a forwarder or shared memory queue manager net I/O handler to pass messages to the network. More... | |
| virtual MAKRti::DtSmSubscribableMessageQueue__rti__ * | msgQueue () const |
| Return pointer to the attached queue. More... | |
| virtual bool | queueIsReliable () const |
| Query the queue to see if it is configured to operate in reliable mode. More... | |
| virtual int | waitForMessages (MAKRti::DtTime waitTime=0.0) |
| These methods are substitutes for using 'select()' calls on net sockets to check for messages. More... | |
| virtual int | waitUntilFull (MAKRti::DtTime waitTime=0.0) |
| Wait (block) for the specified time until the shared memory is full. More... | |
| virtual void | setReceiveMask (MAKRti::DtU32 rcvMask) |
| Set the message retrieval characteristics for this socket. More... | |
| virtual void | setAnonFilter (bool onOrOff) |
| Enable or disable filtering of anonymous MOM messages. More... | |
| virtual MAKRti::DtInetSockState | state () const |
| Returns the state of the socket. More... | |
Protected Types | |
| typedef std::vector< char > | Buffer |
| typedef std::map < MAKRti::DtInetAddr, DtRtiSmSocketBundleBuff > | RtiBufferMap |
Protected Member Functions | |
| DtRtiSmSocket (const DtRtiSmSocket &) | |
| Not Implemented. More... | |
| DtRtiSmSocket & | operator= (const DtRtiSmSocket &) |
| Not Implemented. More... | |
| virtual int | recv (caddr_t *buffptr, MAKRti::DtInetEndpoint *ep) |
| virtual bool | filterAnonMsgs (caddr_t buffptr, MAKRti::DtU32 msgSenderId) |
Protected Attributes | |
| MAKRti::DtString | mySharedMemName |
| DtRtiSubscribableMessageQueue * | myRtiSmMsgQueue |
| MAKRti::DtU32 | myRecvMask |
| bool | myAnonFilterEnabled |
| RtiBufferMap | myRtiBufferMap |
| MAKRti::DtInetSockState | myState |
| The current state of the socket. More... | |
Friends | |
| class | DtRtiSmSocketBundleBuff |
DtRtiSmSocket provides access to shared memory via a subscribable message queue tailored to the need of the RTI.
DtRtiSmSocket isn't really a socket in the classical 'BSD sockets' sense. It is an interface abstraction that mirrors socket functionality to allow applications to easily use either network I/O or shared memory for communication using the same general interface. Where this flexibility is not a paramount concern direct access to the subscribable message queue is more efficient.
|
protected |
|
protected |
| DtRtiSmSocket::DtRtiSmSocket | ( | const char * | sharename, |
| std::shared_ptr< DtMsgHeaderReader > | hdrReader | ||
| ) |
|
virtual |
|
protected |
Not Implemented.
|
protectedvirtual |
|
virtual |
Send buffered messages.
Returns indication of whether flush is complete or incomplete.
|
virtual |
This receive method returns the size of the next message in shared memory as well as additional information needed by a forwarder or shared memory queue manager net I/O handler to pass messages to the network.
|
virtual |
Attach to RTI specific variant of shared memory message queue.
If 'id' is not specified one will be assigned automatically. For use by non- manager subscribers.
|
virtual |
The following version of initializeSmQueue() is specific to management of the shared memory subscribable message queue which the socket interfaces with.
These should only be used by a queue manager, not by ordinary subscribers. It must be called once and only once prior to use of the message queue.
|
virtual |
Return pointer to the attached queue.
|
protected |
Not Implemented.
|
virtual |
Query the queue to see if it is configured to operate in reliable mode.
|
protectedvirtual |
|
virtual |
The send method takes an extra flags parameter which identifies the transport method (DtReliable or DtBestEffort) and priority.
|
virtual |
Enable or disable filtering of anonymous MOM messages.
Enabled by default for federate LRCs employing shared memory. Must be disabled by shared memory queue manager connection manager to allow these messages to be forwarded to the network.
|
virtual |
Set the message retrieval characteristics for this socket.
Options allow for all messages or only a subset of messages in shared memory to be retrieved based on message originator, transport method, or priority
|
virtual |
Returns the state of the socket.
|
virtual |
These methods are substitutes for using 'select()' calls on net sockets to check for messages.
The Win32 implementation of shared memory does not provide a way to get a file descriptor suitable for use in a select() call (shm_open() should work in Unix/Linux). Wait (block) for the specified time until a message can be read. Return status: 0 if messages are ready, > 0 if wait expired, or < 0 if error
|
virtual |
Wait (block) for the specified time until the shared memory is full.
Return status: 0 if full, > 0 if wait expired, or < 0 if error
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The current state of the socket.