MOOS 0.2375
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
CMOOSCommPkt Class Reference

#include <MOOSCommPkt.h>

Collaboration diagram for CMOOSCommPkt:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool Serialize (MOOSMSG_LIST &List, bool bToStream=true, bool bNoNULL=false, double *pdfPktTime=NULL)
int GetStreamLength ()
bool Fill (unsigned char *InData, int nData)
int GetBytesRequired ()
double GetCompression ()
 CMOOSCommPkt ()
virtual ~CMOOSCommPkt ()

Public Attributes

unsigned char * m_pStream
unsigned char * m_pNextData
int m_nStreamSpace
unsigned char DefaultStream [MOOS_PKT_DEFAULT_SPACE]

Protected Member Functions

bool InflateTo (int nNewStreamSize)
bool CopyToStream (unsigned char *pData, int nBytes)

Protected Attributes

int m_nByteCount
int m_nMsgLen
bool m_bAllocated
double m_dfCompression

Detailed Description

This class is part of MOOS's internal transport mechanism. It any number of CMOOSMsg's can be packed into a CMOOSCommPkt and sent in one lump between a CMOOSCommServer and CMOOSCommClient object. It is never used by a user of MOOSLib

Definition at line 61 of file MOOSCommPkt.h.


Constructor & Destructor Documentation

CMOOSCommPkt::CMOOSCommPkt ( )

Definition at line 67 of file MOOSCommPkt.cpp.

CMOOSCommPkt::~CMOOSCommPkt ( ) [virtual]

Definition at line 80 of file MOOSCommPkt.cpp.


Member Function Documentation

bool CMOOSCommPkt::CopyToStream ( unsigned char *  pData,
int  nBytes 
) [protected]

Definition at line 439 of file MOOSCommPkt.cpp.

bool CMOOSCommPkt::Fill ( unsigned char *  InData,
int  nData 
)

Definition at line 105 of file MOOSCommPkt.cpp.

int CMOOSCommPkt::GetBytesRequired ( )

Definition at line 93 of file MOOSCommPkt.cpp.

double CMOOSCommPkt::GetCompression ( )

Definition at line 88 of file MOOSCommPkt.cpp.

int CMOOSCommPkt::GetStreamLength ( )

Definition at line 135 of file MOOSCommPkt.cpp.

bool CMOOSCommPkt::InflateTo ( int  nNewStreamSize) [protected]

Definition at line 463 of file MOOSCommPkt.cpp.

bool CMOOSCommPkt::Serialize ( MOOSMSG_LIST List,
bool  bToStream = true,
bool  bNoNULL = false,
double *  pdfPktTime = NULL 
)

This function stuffs messages in/from a packet

Definition at line 142 of file MOOSCommPkt.cpp.


Member Data Documentation

unsigned char CMOOSCommPkt::DefaultStream[MOOS_PKT_DEFAULT_SPACE]

Definition at line 76 of file MOOSCommPkt.h.

true is the packet has been infated to increase capicity and m_pStream no longer points to DefaultStream but to heap space allocated with new

Definition at line 85 of file MOOSCommPkt.h.

double CMOOSCommPkt::m_dfCompression [protected]

Definition at line 86 of file MOOSCommPkt.h.

int CMOOSCommPkt::m_nByteCount [protected]

Definition at line 81 of file MOOSCommPkt.h.

int CMOOSCommPkt::m_nMsgLen [protected]

Definition at line 82 of file MOOSCommPkt.h.

Definition at line 75 of file MOOSCommPkt.h.

unsigned char* CMOOSCommPkt::m_pNextData

Definition at line 74 of file MOOSCommPkt.h.

unsigned char* CMOOSCommPkt::m_pStream

Definition at line 73 of file MOOSCommPkt.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines