My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
AntennaMonitorMsg.h
Go to the documentation of this file.
1 #ifndef ANTENNAMONITORMSG_H
2 #define ANTENNAMONITORMSG_H
3 
11 #include "gcp/util/common/GenericTaskMsg.h"
12 
13 namespace gcp {
14  namespace antenna {
15  namespace control {
16 
17 
23 
24  public:
25 
29  enum MsgType {
30  CONNECT, // Connect to the archiver
31  FLAG_BOARD,
32  PACK_DATAFRAME, // Pack a data frame.
33  DISPATCH_DATAFRAME // Send a data frame.
34  };
35 
40 
44  union {
45 
49  struct {
50  unsigned short board; // The register map index of the
51  // board to un/flag
52  bool flag; // True to flag, false to unflag
53  } flagBoard;
54 
55  } body;
56 
57  //------------------------------------------------------------
58  // Methods for packing messages
59  //------------------------------------------------------------
60 
61  inline void packFlagBoardMsg(unsigned short board, bool flag)
62  {
64  gcp::util::GenericTaskMsg::TASK_SPECIFIC;
65 
66  type = FLAG_BOARD;
67  body.flagBoard.board = board;
68  body.flagBoard.flag = flag;
69  }
70 
71  inline void packPackDataFrameMsg()
72  {
74  gcp::util::GenericTaskMsg::TASK_SPECIFIC;
75 
76  type = PACK_DATAFRAME;
77  }
78 
79  inline void packDispatchDataFrameMsg()
80  {
82  gcp::util::GenericTaskMsg::TASK_SPECIFIC;
83 
84  type = DISPATCH_DATAFRAME;
85  }
86 
90  inline void packConnectMsg() {
92  gcp::util::GenericTaskMsg::TASK_SPECIFIC;
93 
94  type = CONNECT;
95  }
96 
97  }; // End class AntennaMonitorMsg
98 
99  }; // End namespace control
100  }; // End namespace antenna
101 } // End namespace gcp
102 
103 #endif // End #ifndef
Definition: GenericTaskMsg.h:31
void packConnectMsg()
Definition: AntennaMonitorMsg.h:90
union gcp::antenna::control::AntennaMonitorMsg::@16 body
MsgType type
Definition: AntennaMonitorMsg.h:39
GenericMsgType genericMsgType_
Definition: GenericTaskMsg.h:50
Definition: AntennaMonitorMsg.h:21
struct gcp::antenna::control::AntennaMonitorMsg::@16::@17 flagBoard
MsgType
Definition: AntennaMonitorMsg.h:29