test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
edm::InitMsg Class Reference

#include <Messages.h>

Inheritance diagram for edm::InitMsg:
edm::MsgCode

Classes

struct  InitMsgHeader
 

Public Member Functions

void * data () const
 
int dataSize () const
 
int getDataSize () const
 
 InitMsg (MsgCode &m)
 
 InitMsg (void *buffer, int size, bool setcode=false)
 
int msgSize () const
 
void setDataSize (int s)
 
- Public Member Functions inherited from edm::MsgCode
int codeSize () const
 
Codes getCode () const
 
 MsgCode (void *buffer, int size)
 
 MsgCode (void *buffer)
 
 MsgCode (void *buffer, Codes c)
 
 MsgCode (void *buffer, int size, Codes c)
 
void * payload () const
 
int payloadSize () const
 
void setCode (Codes c)
 
int totalSize () const
 

Private Attributes

int data_size_
 
InitMsgHeaderhead_
 

Additional Inherited Members

- Public Types inherited from edm::MsgCode
enum  Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 }
 

Detailed Description

Definition at line 257 of file Messages.h.

Constructor & Destructor Documentation

edm::InitMsg::InitMsg ( MsgCode m)
inline

Definition at line 265 of file Messages.h.

References data_size_, and setDataSize().

265  :
266  MsgCode(m),
267  head_((InitMsgHeader*)MsgCode::payload()),
268  data_size_(payloadSize() - sizeof(InitMsgHeader))
269  { setDataSize(data_size_); }
MsgCode(void *buffer, int size)
Definition: Messages.h:64
void * payload() const
Definition: Messages.h:94
int data_size_
Definition: Messages.h:312
InitMsgHeader * head_
Definition: Messages.h:311
int payloadSize() const
Definition: Messages.h:95
void setDataSize(int s)
Definition: Messages.h:299
edm::InitMsg::InitMsg ( void *  buffer,
int  size,
bool  setcode = false 
)
inline

Definition at line 271 of file Messages.h.

References data_size_, getDataSize(), edm::MsgCode::INIT, edm::MsgCode::setCode(), and setDataSize().

271  :
272  MsgCode(buffer,size),
273  head_((InitMsgHeader*)MsgCode::payload()),
274  data_size_(payloadSize() - sizeof(InitMsgHeader)) // default to full length
275  {
276  if(setcode)
277  {
278  // for new message
281  }
282  else
283  // for existing message
285  }
MsgCode(void *buffer, int size)
Definition: Messages.h:64
void * payload() const
Definition: Messages.h:94
void setCode(Codes c)
Definition: Messages.h:83
int data_size_
Definition: Messages.h:312
InitMsgHeader * head_
Definition: Messages.h:311
int payloadSize() const
Definition: Messages.h:95
void setDataSize(int s)
Definition: Messages.h:299
int getDataSize() const
Definition: Messages.h:294
tuple size
Write out results.

Member Function Documentation

void* edm::InitMsg::data ( ) const
inline

Definition at line 291 of file Messages.h.

References edm::MsgCode::payload().

Referenced by cuy.FindIssue::__init__().

291 { return (char*)payload()+sizeof(InitMsgHeader); }
void * payload() const
Definition: Messages.h:94
int edm::InitMsg::dataSize ( ) const
inline

Definition at line 292 of file Messages.h.

References edm::MsgCode::payloadSize().

292 { return payloadSize() + sizeof(InitMsgHeader); }
int payloadSize() const
Definition: Messages.h:95
int edm::InitMsg::getDataSize ( ) const
inline

Definition at line 294 of file Messages.h.

References edm::InitMsg::InitMsgHeader::data_size_, edm::decodeInt(), and head_.

Referenced by InitMsg(), and msgSize().

295  {
296  return decodeInt(head_->data_size_);
297  }
InitMsgHeader * head_
Definition: Messages.h:311
unsigned char data_size_[4]
Definition: Messages.h:262
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
int edm::InitMsg::msgSize ( ) const
inline

Definition at line 305 of file Messages.h.

References edm::MsgCode::codeSize(), and getDataSize().

306  {
307  return codeSize()+sizeof(InitMsgHeader)+getDataSize();
308  }
int codeSize() const
Definition: Messages.h:96
int getDataSize() const
Definition: Messages.h:294
void edm::InitMsg::setDataSize ( int  s)
inline

Definition at line 299 of file Messages.h.

References edm::InitMsg::InitMsgHeader::data_size_, edm::encodeInt(), and head_.

Referenced by InitMsg().

300  {
302  }
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
InitMsgHeader * head_
Definition: Messages.h:311
unsigned char data_size_[4]
Definition: Messages.h:262

Member Data Documentation

int edm::InitMsg::data_size_
private

Definition at line 312 of file Messages.h.

Referenced by InitMsg().

InitMsgHeader* edm::InitMsg::head_
private

Definition at line 311 of file Messages.h.

Referenced by getDataSize(), and setDataSize().