CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MsgHeader.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_MsgHeader_h
2 #define IOPool_Streamer_MsgHeader_h
3 
5 // as it is in memory of file
6 struct Header
7 {
9  { convert(size,size_); }
10 
11  uint8 code_; // type of the message
12  char_uint32 size_; // of entire message including all headers
13 
14  // 20-Jul-2006, KAB: added enumeration for message types
15  enum Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3, // EOFRECORD = 4 is no longer used
20  FILE_CLOSE_REQUEST = 15, SPARE1 = 16, SPARE2 = 17 };
21 };
22 
23 // as we need to see it
25 {
26 public:
27  HeaderView(void* buf)
28  {
29  Header* h = (Header*)buf;
30  code_ = h->code_;
31  size_ = convert32(h->size_);
32  }
33 
34  uint32 code() const { return code_; }
35  uint32 size() const { return size_; }
36 private:
39 };
40 
41 #endif
uint32 code() const
Definition: MsgHeader.h:34
uint32 code_
Definition: MsgHeader.h:37
void convert(uint32 i, char_uint32 v)
Definition: MsgTools.h:46
HeaderView(void *buf)
Definition: MsgHeader.h:27
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
unsigned int uint32
Definition: MsgTools.h:13
unsigned char char_uint32[sizeof(uint32)]
Definition: MsgTools.h:16
uint8 code_
Definition: MsgHeader.h:11
char_uint32 size_
Definition: MsgHeader.h:12
uint32 size() const
Definition: MsgHeader.h:35
uint32 convert32(char_uint32 v)
Definition: MsgTools.h:30
unsigned char uint8
Definition: MsgTools.h:11
uint32 size_
Definition: MsgHeader.h:38
tuple size
Write out results.
Header(uint32 code, uint32 size)
Definition: MsgHeader.h:8