#include <Messages.h>
Classes | |
struct | InitMsgHeader |
Public Member Functions | |
void * | data () const |
int | dataSize () const |
int | getDataSize () const |
InitMsg (void *buffer, int size, bool setcode=false) | |
InitMsg (MsgCode &m) | |
int | msgSize () const |
void | setDataSize (int s) |
Private Attributes | |
int | data_size_ |
InitMsgHeader * | head_ |
Definition at line 257 of file Messages.h.
edm::InitMsg::InitMsg | ( | MsgCode & | m | ) | [inline] |
Definition at line 265 of file Messages.h.
References data_size_, and setDataSize().
: MsgCode(m), head_((InitMsgHeader*)MsgCode::payload()), data_size_(payloadSize() - sizeof(InitMsgHeader)) { setDataSize(data_size_); }
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().
: MsgCode(buffer,size), head_((InitMsgHeader*)MsgCode::payload()), data_size_(payloadSize() - sizeof(InitMsgHeader)) // default to full length { if(setcode) { // for new message setCode(MsgCode::INIT); setDataSize(data_size_); } else // for existing message data_size_ = getDataSize(); }
void* edm::InitMsg::data | ( | ) | const [inline] |
Definition at line 291 of file Messages.h.
References edm::MsgCode::payload().
Referenced by edm::JobHeaderDecoder::decodeJobHeader().
{ return (char*)payload()+sizeof(InitMsgHeader); }
int edm::InitMsg::dataSize | ( | ) | const [inline] |
Definition at line 292 of file Messages.h.
References edm::MsgCode::payloadSize().
{ return payloadSize() + sizeof(InitMsgHeader); }
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 edm::JobHeaderDecoder::decodeJobHeader(), InitMsg(), and msgSize().
{ return decodeInt(head_->data_size_); }
int edm::InitMsg::msgSize | ( | ) | const [inline] |
Definition at line 305 of file Messages.h.
References edm::MsgCode::codeSize(), and getDataSize().
{ return codeSize()+sizeof(InitMsgHeader)+getDataSize(); }
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().
{ encodeInt(s,head_->data_size_); }
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().