CigiMessageBuffer Class Reference

#include <CigiMessageBuffer.h>

List of all members.

Public Member Functions

 CigiMessageBuffer (const int BufLen=16384)
virtual ~CigiMessageBuffer (void)
CigiVersionID GetCigiVersion (void)
int GetCigiMajorVersion (void)
int GetCigiMinorVersion (void)
int GetBufferSize (void)
bool IsActive (void)
bool IsLocked (void)
bool IsValidIGCtrlSOF (void)
bool IsDataPresent (void)

Protected Attributes

Cigi_uint8Buffer
CigiVersionID CigiVersion
int BufferSize
Cigi_uint8FillBufferPos
int BufferFillCnt
bool Active
bool Locked
bool ValidIGCtrlSOF
bool DataPresent
CigiBaseIGCtrlPackIGCtrl
CigiBaseSOFPackSOF

Friends

class CigiOutgoingMsg
class CigiIncomingMsg


Detailed Description

The class Containing the Message buffer

Definition at line 61 of file CigiMessageBuffer.h.


Constructor & Destructor Documentation

CigiMessageBuffer::CigiMessageBuffer ( const int  BufLen = 16384  )  [inline]

General Constructor

Definition at line 74 of file CigiMessageBuffer.h.

References CigiMessage::BufferSize.

00075       : Buffer(NULL)
00076       , BufferSize(0)
00077       , FillBufferPos(NULL)
00078       , BufferFillCnt(0)
00079       , Active(false)
00080       , Locked(false)
00081       , ValidIGCtrlSOF(false)
00082       , DataPresent(false)
00083       , PackIGCtrl(NULL)
00084       , PackSOF(NULL)
00085    {
00086       // This creates a buffer that is double word aligned and
00087       //  has double word aligned size
00088 
00089       // Determine the number of bytes with a safety buffer
00090       BufferSize = BufLen +                          // Requested buffer length
00091                    (BufLen % sizeof(Cigi_uint64)) +  // make double word aligned
00092                    sizeof(Cigi_uint64);              // add a safety buffer
00093 
00094       // Allocate the message buffer
00095       Buffer = new Cigi_uint8[BufferSize];
00096 
00097       // Initialize empty buffer
00098       memset( Buffer, 0, BufferSize );
00099 
00100    }

virtual CigiMessageBuffer::~CigiMessageBuffer ( void   )  [inline, virtual]

General Destructor

Definition at line 105 of file CigiMessageBuffer.h.

00106    {
00107       if(Buffer != NULL)
00108       {
00109          delete [] Buffer;
00110          Buffer = NULL;
00111       }
00112    }


Member Function Documentation

int CigiMessageBuffer::GetBufferSize ( void   )  [inline]

Gets the size of the buffer.

Returns:
The size of the buffer.

Definition at line 143 of file CigiMessageBuffer.h.

References CigiMessage::BufferSize.

00143 { return(BufferSize); }

int CigiMessageBuffer::GetCigiMajorVersion ( void   )  [inline]

Gets the Major Cigi Version used by this buffer.

Returns:
The Major Cigi Version used by this buffer.

Definition at line 129 of file CigiMessageBuffer.h.

00129 { return(CigiVersion.CigiMajorVersion); }

int CigiMessageBuffer::GetCigiMinorVersion ( void   )  [inline]

Gets the Minor Cigi Version used by this buffer.

Returns:
The Minor Cigi Version used by this buffer.

Definition at line 136 of file CigiMessageBuffer.h.

00136 { return(CigiVersion.CigiMinorVersion); }

CigiVersionID CigiMessageBuffer::GetCigiVersion ( void   )  [inline]

Gets the Cigi Version used by this buffer.

Returns:
The Cigi Version used by this buffer.

Definition at line 122 of file CigiMessageBuffer.h.

00122 { return(CigiVersion); }

bool CigiMessageBuffer::IsActive ( void   )  [inline]

Gets the value indicating if the buffer is active.

Returns:
This returns a value indicating if the buffer is active

Definition at line 151 of file CigiMessageBuffer.h.

00151 { return(Active); }

bool CigiMessageBuffer::IsDataPresent ( void   )  [inline]

Gets the value indicating if valid data is in the buffer.

Returns:
This returns a value indicating if valid data is in the buffer

Definition at line 176 of file CigiMessageBuffer.h.

00176 { return(DataPresent); }

bool CigiMessageBuffer::IsLocked ( void   )  [inline]

Gets the value indicating if the buffer is locked.

Returns:
This returns a value indicating if the buffer is locked

Definition at line 159 of file CigiMessageBuffer.h.

00159 { return(Locked); }

bool CigiMessageBuffer::IsValidIGCtrlSOF ( void   )  [inline]

Gets the value indicating if a valid IG Control or SOF packet has been packed into the buffer.

Returns:
This returns a value indicating if a valid IG Control or SOF packet has been packed into the buffer.

Definition at line 168 of file CigiMessageBuffer.h.

00168 { return(ValidIGCtrlSOF); }


Friends And Related Function Documentation

friend class CigiIncomingMsg [friend]

Definition at line 66 of file CigiMessageBuffer.h.

friend class CigiOutgoingMsg [friend]

Definition at line 65 of file CigiMessageBuffer.h.


Member Data Documentation

bool CigiMessageBuffer::Active [protected]

Active
A flag indicating whether the buffer is active.

Definition at line 219 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::GetBuffer(), CigiOutgoingMsg::GetMsg(), CigiOutgoingMsg::GetMsgLength(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), CigiOutgoingMsg::Reset(), CigiOutgoingMsg::SetMostMatureReceivedCigiVersion(), CigiOutgoingMsg::SetOutgoingCigiVersion(), and CigiOutgoingMsg::UnlockMsg().

Cigi_uint8* CigiMessageBuffer::Buffer [protected]

Buffer
The pointer to the buffer

Definition at line 189 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::ChangeBufferCigiVersion(), CigiOutgoingMsg::GetBuffer(), CigiIncomingMsg::GetFirstPacket(), CigiOutgoingMsg::GetMsg(), CigiIncomingMsg::GetNextBuffToLoad(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::UnlockMsg(), and CigiOutgoingMsg::UpdateFrameCntr().

int CigiMessageBuffer::BufferFillCnt [protected]

BufferFillCnt
The number of bytes currently packed into the buffer.

Definition at line 213 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::ChangeBufferCigiVersion(), CigiIncomingMsg::GetFirstPacket(), CigiOutgoingMsg::GetMsg(), CigiOutgoingMsg::GetMsgLength(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), and CigiOutgoingMsg::UnlockMsg().

int CigiMessageBuffer::BufferSize [protected]

BufferSize
The size of the buffer.

Definition at line 201 of file CigiMessageBuffer.h.

CigiVersionID CigiMessageBuffer::CigiVersion [protected]

CigiVersion
The CIGI Version currently used by this buffer.

Definition at line 195 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::ChangeBufferCigiVersion().

bool CigiMessageBuffer::DataPresent [protected]

DataPresent
A flag indicating whether the buffer contains valid data.

Definition at line 238 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), CigiOutgoingMsg::SetMostMatureReceivedCigiVersion(), CigiOutgoingMsg::SetOutgoingCigiVersion(), and CigiOutgoingMsg::UnlockMsg().

Cigi_uint8* CigiMessageBuffer::FillBufferPos [protected]

FillBufferPos
A pointer to the next byte available for filling.

Definition at line 207 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::ChangeBufferCigiVersion(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), and CigiOutgoingMsg::UnlockMsg().

bool CigiMessageBuffer::Locked [protected]

Locked
A flag indicating whether the buffer is Locked.

Definition at line 225 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::GetBuffer(), CigiOutgoingMsg::GetMsg(), CigiOutgoingMsg::GetMsgLength(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), and CigiOutgoingMsg::UnlockMsg().

CigiBaseIGCtrl* CigiMessageBuffer::PackIGCtrl [protected]

Pack IG Ctrl pointer
A pointer to the IG Control packet object that will pack the IG Control data into this buffer.

Definition at line 245 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::ChangeBufferCigiVersion(), and CigiOutgoingMsg::operator<<().

CigiBaseSOF* CigiMessageBuffer::PackSOF [protected]

Pack SOF pointer
A pointer to the SOF packet object that will pack the SOF data into this buffer.

Definition at line 252 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::ChangeBufferCigiVersion(), and CigiOutgoingMsg::operator<<().

bool CigiMessageBuffer::ValidIGCtrlSOF [protected]

ValidIGCtrlSOF
A flag indicating whether the buffer contains a valid IG Control or SOF packet.

Definition at line 232 of file CigiMessageBuffer.h.

Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::UnlockMsg(), and CigiOutgoingMsg::UpdateFrameCntr().


The documentation for this class was generated from the following file:
Generated on Wed Apr 29 09:00:09 2009 for CCL by  doxygen 1.4.7