MAK RTIspy API Documentation for HLA 1.3
msgBundler.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: msgBundler.h,v $ $Revision: $ $State: Exp $
00007 *********************************************************************/
00008 
00012 
00013 #ifndef msgBundler_H_
00014 #define msgBundler_H_
00015 
00016 #include <rtiMsConfig.h>
00017 #include <vlutil/vlMachineTypes.h>
00018 #include <vlutil/vlSmartPointers.h>
00019 #include <vector>
00020 
00021 #include "msgHeaderReader.h"
00022 
00026 class DT_DLL_RTIUTIL DtMsgBundler
00027 {
00028 public:
00029 
00031    DtMsgBundler(DtBoost::shared_ptr<DtMsgHeaderReader> hdrReader, size_t maxBundleSize = 0);
00032 
00034    virtual ~DtMsgBundler();
00035 
00038    virtual bool addToBundle(char* msg, size_t msgSize);
00039 
00043    virtual bool getBundle(char** bundlePtr, size_t& bundleSize);
00044 
00046    virtual bool isBundled(const char* bufferPtr, size_t size) const;
00047 
00051    virtual bool unbundle(char* bufferPtr, size_t size);
00052 
00055    virtual bool recvNextMsgFromBundle(char** msgPtr, size_t& msgSize);
00056 
00059    virtual size_t maxSendBundleSize() const;
00060    virtual void setMaxSendBundleSize(size_t maxSize);
00061 
00062 protected:
00063 
00065    std::vector<char> mySendBundlingBuff;
00066 
00068    size_t myCurrSendBundleSize;
00069 
00071    size_t myRemainingRecvBundleSize;
00072 
00074    char* myNextRecvMsg;
00075 
00077    bool myResizeSendBuff;
00078 
00080    size_t myNewSendBuffSize;
00081 
00083    DtBoost::shared_ptr<DtMsgHeaderReader> myHeaderReader;
00084 };
00085 
00086 #endif //! msgBundler_H_

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)