#include <CigiMessage.h>
Inheritance diagram for CigiMessage:
Public Member Functions | |
CigiMessage () | |
virtual | ~CigiMessage () |
bool | GetValidIGCtrlSOF () |
int | CreateBuffer (const int NumBuf=2, const int BufLen=16384) |
Protected Member Functions | |
void | SetAnimationTable (CigiAnimationTable *AnimationTable) |
void | SetSession (CigiSession *SessionIn) |
Protected Attributes | |
list< CigiMessageBuffer * > | Buffers |
list< CigiMessageBuffer * > | AvailBuff |
CigiMessageBuffer * | CrntMsgBuf |
CigiMessageBuffer * | CrntFillBuf |
CigiMessageBuffer * | PackagedMsg |
int | BufferSize |
CigiAnimationTable * | ATbl |
CigiHoldEnvCtrl | EnvHoldObj |
CigiSession * | Session |
Friends | |
class | CigiSession |
Definition at line 69 of file CigiMessage.h.
CigiMessage::CigiMessage | ( | ) |
General Constructor
Definition at line 62 of file CigiMessage.cpp.
00063 : BufferSize(0) 00064 , CrntMsgBuf(NULL) 00065 , CrntFillBuf(NULL) 00066 , PackagedMsg(NULL) 00067 , ATbl(NULL) 00068 , Session(NULL) 00069 { 00070 00071 }
CigiMessage::~CigiMessage | ( | ) | [virtual] |
General Destructor
Definition at line 76 of file CigiMessage.cpp.
References AvailBuff, and Buffers.
00077 { 00078 00079 if(Buffers.size() > 0) 00080 { 00081 list<CigiMessageBuffer *>::iterator iBuf; 00082 for(iBuf=Buffers.begin();iBuf!=Buffers.end();iBuf++) 00083 { 00084 delete (*iBuf); 00085 } 00086 Buffers.clear(); 00087 } 00088 00089 if(AvailBuff.size() > 0) 00090 { 00091 list<CigiMessageBuffer *>::iterator iBuf; 00092 for(iBuf=AvailBuff.begin();iBuf!=AvailBuff.end();iBuf++) 00093 { 00094 delete (*iBuf); 00095 } 00096 AvailBuff.clear(); 00097 } 00098 00099 }
int CigiMessage::CreateBuffer | ( | const int | NumBuf = 2 , |
|
const int | BufLen = 16384 | |||
) |
This creates the message buffers.
NumBuf | - Number of buffers to create | |
BufLen | - The size in bytes of each buffer |
Definition at line 109 of file CigiMessage.cpp.
References AvailBuff, BufferSize, and CIGI_SUCCESS.
Referenced by CigiSession::CigiSession().
00110 { 00111 if(BufferSize <= 0) 00112 BufferSize = BufLen; 00113 00114 int BuffCnt = AvailBuff.size(); 00115 int AddBuff = 0; 00116 if(BuffCnt < NumBuf) 00117 AddBuff = NumBuf - BuffCnt; 00118 00119 if(AddBuff > 0) 00120 { 00121 for(int ndx=0;ndx<AddBuff;ndx++) 00122 { 00123 CigiMessageBuffer *NewBuff = new CigiMessageBuffer(BufferSize); 00124 AvailBuff.push_back(NewBuff); 00125 } 00126 } 00127 00128 return(CIGI_SUCCESS); 00129 00130 }
bool CigiMessage::GetValidIGCtrlSOF | ( | ) | [inline] |
Gets the value indicating if a valid IGCtrl or SOF packet has been packed for the message.
Definition at line 98 of file CigiMessage.h.
00099 { 00100 bool Rslt = false; 00101 if(CrntMsgBuf != NULL) 00102 Rslt = CrntMsgBuf->IsValidIGCtrlSOF(); 00103 00104 return(Rslt); 00105 }
void CigiMessage::SetAnimationTable | ( | CigiAnimationTable * | AnimationTable | ) | [inline, protected] |
Sets the Animation Table object pointer
AnimationTable | - Specifies a Animation table object |
Definition at line 183 of file CigiMessage.h.
References CigiSession::ATbl.
Referenced by CigiSession::CigiSession().
00183 { ATbl = AnimationTable; }
void CigiMessage::SetSession | ( | CigiSession * | SessionIn | ) | [inline, protected] |
Sets the Session object pointer
SessionIn | - Specifies a session object |
Definition at line 190 of file CigiMessage.h.
Referenced by CigiSession::CigiSession().
00190 { Session = SessionIn; }
friend class CigiSession [friend] |
CigiAnimationTable* CigiMessage::ATbl [protected] |
Animation Table object
A pointer to the Animation Table object for this session
Definition at line 162 of file CigiMessage.h.
Referenced by CigiIncomingMsg::GetNextPacket(), CigiOutgoingMsg::operator<<(), and CigiIncomingMsg::ProcessIncomingMsg().
list<CigiMessageBuffer *> CigiMessage::AvailBuff [protected] |
Available buffers
Definition at line 133 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiIncomingMsg::AdvanceCrntBuffer(), CreateBuffer(), CigiIncomingMsg::GetNextBuffToLoad(), CigiOutgoingMsg::Reset(), CigiOutgoingMsg::UnlockMsg(), and ~CigiMessage().
list<CigiMessageBuffer *> CigiMessage::Buffers [protected] |
Active buffers
Definition at line 128 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiIncomingMsg::AdvanceCrntBuffer(), CigiIncomingMsg::GetNextBuffToLoad(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::Reset(), CigiOutgoingMsg::UnlockMsg(), CigiOutgoingMsg::UpdateFrameCntr(), and ~CigiMessage().
int CigiMessage::BufferSize [protected] |
Buffer Size
Specifies the size of each buffer.
Definition at line 156 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiMessageBuffer::CigiMessageBuffer(), CreateBuffer(), CigiMessageBuffer::GetBufferSize(), CigiIncomingMsg::GetNextBuffToLoad(), CigiOutgoingMsg::operator<<(), and CigiOutgoingMsg::PackObj().
CigiMessageBuffer* CigiMessage::CrntFillBuf [protected] |
Current fill Buffer
Points to the buffer being currently filled
Definition at line 144 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::AdvanceBuffer(), CigiOutgoingMsg::ChangeBufferCigiVersion(), CigiIncomingMsg::GetNextBuffToLoad(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiOutgoingMsg::PackObj(), CigiOutgoingMsg::Reset(), CigiOutgoingMsg::SetMostMatureReceivedCigiVersion(), and CigiOutgoingMsg::SetOutgoingCigiVersion().
CigiMessageBuffer* CigiMessage::CrntMsgBuf [protected] |
Current buffer
Definition at line 138 of file CigiMessage.h.
Referenced by CigiIncomingMsg::AdvanceCrntBuffer(), CigiOutgoingMsg::GetBuffer(), CigiIncomingMsg::GetFirstPacket(), CigiOutgoingMsg::GetMsg(), CigiOutgoingMsg::GetMsgLength(), CigiIncomingMsg::GetNextPacket(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::PackageMsg(), CigiOutgoingMsg::Reset(), CigiOutgoingMsg::UnlockMsg(), and CigiOutgoingMsg::UpdateFrameCntr().
CigiHoldEnvCtrl CigiMessage::EnvHoldObj [protected] |
Definition at line 168 of file CigiMessage.h.
Referenced by CigiIncomingMsg::GetNextPacket(), CigiOutgoingMsg::operator<<(), and CigiIncomingMsg::ProcessIncomingMsg().
CigiMessageBuffer* CigiMessage::PackagedMsg [protected] |
Packaged Message
Points to the currently packaged message buffer
Definition at line 150 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::FreeMsg(), CigiOutgoingMsg::PackageMsg(), and CigiOutgoingMsg::Reset().
CigiSession* CigiMessage::Session [protected] |
The parent CIGI session for this outgoing message
Definition at line 173 of file CigiMessage.h.
Referenced by CigiOutgoingMsg::ChangeBufferCigiVersion(), CigiOutgoingMsg::ChangeOutgoingCigiVersion(), CigiIncomingMsg::CheckFirstPacket(), CigiIncomingMsg::GetFirstPacket(), CigiOutgoingMsg::IsSynchronous(), CigiOutgoingMsg::LockMsg(), CigiOutgoingMsg::operator<<(), CigiIncomingMsg::ProcessIncomingMsg(), CigiOutgoingMsg::RegisterUserPacket(), CigiIncomingMsg::RegisterUserPacket(), CigiIncomingMsg::SetReaderVersion(), and CigiOutgoingMsg::UpdateFrameCntr().