CMS 3D CMS Logo

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

#include <OtherMessage.h>

Public Member Functions

uint32 code () const
 
uint8msgBody ()
 
 OtherMessageBuilder (void *buf, uint32 code, uint32 bodySize=0)
 
uint32 size () const
 
uint8startAddress ()
 

Private Attributes

uint8buf_
 
Headerh_
 

Detailed Description

Other type of Messages Represented here

code 1 | size 4 | msg_body 4

For now use can provide any code, in future we may restrict 0, 1 and 2.

Definition at line 17 of file OtherMessage.h.

Constructor & Destructor Documentation

OtherMessageBuilder::OtherMessageBuilder ( void *  buf,
uint32  code,
uint32  bodySize = 0 
)
inline

Definition at line 22 of file OtherMessage.h.

References h_.

22  :
23  buf_((uint8*)buf),
24  h_((Header*)buf)
25  {
26  new (h_) Header (code, (unsigned int)sizeof(Header)+bodySize);
27  }
uint32 code() const
Definition: OtherMessage.h:29
unsigned char uint8
Definition: MsgTools.h:11

Member Function Documentation

uint32 OtherMessageBuilder::code ( ) const
inline

Definition at line 29 of file OtherMessage.h.

References Header::code_, and h_.

29 { return h_->code_; }
uint8 code_
Definition: MsgHeader.h:11
uint8* OtherMessageBuilder::msgBody ( )
inline

Definition at line 31 of file OtherMessage.h.

References buf_.

Referenced by stor::EventServerProxy< RegInfo >::getInitMsgFromEventServer().

31 { return buf_+sizeof(Header); }
uint32 OtherMessageBuilder::size ( void  ) const
inline

Definition at line 30 of file OtherMessage.h.

References convert32(), h_, and Header::size_.

Referenced by stor::EventServerProxy< RegInfo >::getInitMsgFromEventServer().

30 { return convert32(h_->size_); }
char_uint32 size_
Definition: MsgHeader.h:12
uint32 convert32(char_uint32 v)
Definition: MsgTools.h:30
uint8* OtherMessageBuilder::startAddress ( )
inline

Definition at line 32 of file OtherMessage.h.

References buf_.

Referenced by stor::EventServerProxy< RegInfo >::getInitMsgFromEventServer().

32 { return buf_; }

Member Data Documentation

uint8* OtherMessageBuilder::buf_
private

Definition at line 35 of file OtherMessage.h.

Referenced by msgBody(), and startAddress().

Header* OtherMessageBuilder::h_
private

Definition at line 36 of file OtherMessage.h.

Referenced by code(), OtherMessageBuilder(), and size().