The DtMsgBundler class provides a means for bundling and unbundling messages.
More...
The DtMsgBundler class provides a means for bundling and unbundling messages.
| DtMsgBundler::DtMsgBundler |
( |
DtBoost::shared_ptr< DtMsgHeaderReader > |
hdrReader, |
|
|
size_t |
maxBundleSize = 0, |
|
|
size_t |
byteAlignment = 0 |
|
) |
| |
| virtual DtMsgBundler::~DtMsgBundler |
( |
| ) |
|
|
virtual |
| virtual bool DtMsgBundler::addToBundle |
( |
char * |
msg, |
|
|
size_t |
msgSize |
|
) |
| |
|
virtual |
Adds a message to the current bundle.
Returns false if message was too large to be added to the bundle.
| virtual bool DtMsgBundler::getBundle |
( |
char ** |
bundlePtr, |
|
|
size_t & |
bundleSize |
|
) |
| |
|
virtual |
Returns the location and size of the current bundle.
A new bundle will be started the next time addToBundle is called. Return value is false if there are no bundled messages.
| virtual bool DtMsgBundler::isBundled |
( |
const char * |
bufferPtr, |
|
|
size_t |
size |
|
) |
| const |
|
virtual |
Returns true if the given message is bundled.
| virtual bool DtMsgBundler::isEmpty |
( |
| ) |
|
|
virtual |
Returns true if the msgBundler has no messages.
| virtual size_t DtMsgBundler::maxSendBundleSize |
( |
| ) |
const |
|
virtual |
Get/Set the maximum outgoing bundle size.
Changes may not take affect until after the current bundle is sent.
| virtual bool DtMsgBundler::recvNextMsgFromBundle |
( |
char ** |
msgPtr, |
|
|
size_t & |
msgSize |
|
) |
| |
|
virtual |
Returns the location and size of the next message in the received bundle.
Returns false if there were no messages left in bundle.
| virtual void DtMsgBundler::setMaxSendBundleSize |
( |
size_t |
maxSize | ) |
|
|
virtual |
| virtual bool DtMsgBundler::unbundle |
( |
char * |
bufferPtr, |
|
|
size_t |
size |
|
) |
| |
|
virtual |
Unbundle new packet.
Buffer must remain valid until bundle is completely processed. If unbundling already in progress, previous bundle is lost. Returns false if an error occurs.
| size_t DtMsgBundler::myCurrSendBundleSize |
|
protected |
The size of the current outgoing bundle.
Reads data from message header.
| size_t DtMsgBundler::myMsgAddrByteAlignment |
|
protected |
The message address byte alignment.
| size_t DtMsgBundler::myNewSendBuffSize |
|
protected |
The new size for the send buffer.
| char* DtMsgBundler::myNextRecvMsg |
|
protected |
The location of the next message in the received bundle.
| size_t DtMsgBundler::myRemainingRecvBundleSize |
|
protected |
The remaining size of the current received bundle.
| bool DtMsgBundler::myResizeSendBuff |
|
protected |
Whether the maximum send bundle must be resized next time it is emptied.
| std::vector<char> DtMsgBundler::mySendBundlingBuff |
|
protected |
The buffer for storing messages in the current outgoing bundle.
The documentation for this class was generated from the following file: