MAK RTIspy API Documentation for HLA 1.3
 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 #ifndef msgBundler_H_
14 #define msgBundler_H_
15 
16 #include <rtiMsConfig.h>
17 #include <vlutil/vlMachineTypes.h>
18 #include <vlutil/vlSmartPointers.h>
19 #include <vector>
20 
21 #include "msgHeaderReader.h"
22 
27 {
28 public:
29 
31  DtMsgBundler(DtBoost::shared_ptr<DtMsgHeaderReader> hdrReader, size_t maxBundleSize = 0, size_t byteAlignment = 0);
32 
34  virtual ~DtMsgBundler();
35 
38  virtual bool addToBundle(char* msg, size_t msgSize);
39 
43  virtual bool getBundle(char** bundlePtr, size_t& bundleSize);
44 
46  virtual bool isBundled(const char* bufferPtr, size_t size) const;
47 
51  virtual bool unbundle(char* bufferPtr, size_t size);
52 
54  virtual bool isEmpty();
55 
58  virtual bool recvNextMsgFromBundle(char** msgPtr, size_t& msgSize);
59 
62  virtual size_t maxSendBundleSize() const;
63  virtual void setMaxSendBundleSize(size_t maxSize);
64 
65 protected:
66 
68  std::vector<char> mySendBundlingBuff;
69 
72 
75 
78 
81 
84 
86  DtBoost::shared_ptr<DtMsgHeaderReader> myHeaderReader;
87 
90 
91 };
92 
93 #endif
size_t myNewSendBuffSize
The new size for the send buffer.
Definition: msgBundler.h:83
size_t myMsgAddrByteAlignment
The message address byte alignment.
Definition: msgBundler.h:89
DtBoost::shared_ptr< DtMsgHeaderReader > myHeaderReader
Reads data from message header.
Definition: msgBundler.h:86
std::vector< char > mySendBundlingBuff
The buffer for storing messages in the current outgoing bundle.
Definition: msgBundler.h:68
The DtMsgBundler class provides a means for bundling and unbundling messages.
Definition: msgBundler.h:26
char * myNextRecvMsg
The location of the next message in the received bundle.
Definition: msgBundler.h:77
bool myResizeSendBuff
Whether the maximum send bundle must be resized next time it is emptied.
Definition: msgBundler.h:80
size_t myRemainingRecvBundleSize
The remaining size of the current received bundle.
Definition: msgBundler.h:74
#define DT_DLL_RTIUTIL
Definition: rtiMsConfig.h:127
size_t myCurrSendBundleSize
The size of the current outgoing bundle.
Definition: msgBundler.h:71

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)