MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
msgBundler.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2010 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: msgBundler.h,v $ $Revision: $ $State: Exp $
7 *********************************************************************/
8 
12 
13 #pragma once
14 
15 #include "rtiMsConfig.h"
16 #include "msgHeaderReader.h"
17 
18 #include <vlutil/vlMachineTypes.h>
19 #include <vlutil/vlSmartPointers.h>
20 
21 #include <vector>
22 
23 
28 {
29 public:
30 
32  DtMsgBundler(std::shared_ptr<DtMsgHeaderReader> hdrReader, size_t maxBundleSize = 0, size_t byteAlignment = 0);
33 
35  virtual ~DtMsgBundler();
36 
39  virtual bool addToBundle(char* msg, size_t msgSize);
40 
44  virtual bool getBundle(char** bundlePtr, size_t& bundleSize);
45 
47  virtual bool isBundled(const char* bufferPtr, size_t size) const;
48 
52  virtual bool unbundle(char* bufferPtr, size_t size);
53 
55  virtual bool isEmpty();
56 
59  virtual bool recvNextMsgFromBundle(char** msgPtr, size_t& msgSize);
60 
63  virtual size_t maxSendBundleSize() const;
64  virtual void setMaxSendBundleSize(size_t maxSize);
65 
66 protected:
67 
69  std::vector<char> mySendBundlingBuff;
70 
73 
76 
79 
82 
85 
87  std::shared_ptr<DtMsgHeaderReader> myHeaderReader;
88 
91 
92 };
size_t myNewSendBuffSize
The new size for the send buffer.
Definition: msgBundler.h:84
size_t myMsgAddrByteAlignment
The message address byte alignment.
Definition: msgBundler.h:90
std::shared_ptr< DtMsgHeaderReader > myHeaderReader
Reads data from message header.
Definition: msgBundler.h:87
std::vector< char > mySendBundlingBuff
The buffer for storing messages in the current outgoing bundle.
Definition: msgBundler.h:69
The DtMsgBundler class provides a means for bundling and unbundling messages.
Definition: msgBundler.h:27
char * myNextRecvMsg
The location of the next message in the received bundle.
Definition: msgBundler.h:78
bool myResizeSendBuff
Whether the maximum send bundle must be resized next time it is emptied.
Definition: msgBundler.h:81
size_t myRemainingRecvBundleSize
The remaining size of the current received bundle.
Definition: msgBundler.h:75
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:160
size_t myCurrSendBundleSize
The size of the current outgoing bundle.
Definition: msgBundler.h:72

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)