CARMA C++
AntennaMonitorMsg.h
Go to the documentation of this file.
1 #ifndef ANTENNAMONITORMSG_H
2 #define ANTENNAMONITORMSG_H
3 
12 
13 namespace sza {
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  sza::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  sza::util::GenericTaskMsg::TASK_SPECIFIC;
75 
76  type = PACK_DATAFRAME;
77  }
78 
79  inline void packDispatchDataFrameMsg()
80  {
82  sza::util::GenericTaskMsg::TASK_SPECIFIC;
83 
84  type = DISPATCH_DATAFRAME;
85  }
86 
90  inline void packConnectMsg() {
92  sza::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 sza
102 
103 #endif // End #ifndef
void packConnectMsg()
Pack a message to connect to the pmac.
MsgType
Enumerate supported AntennaMonitor messages.
struct sza::antenna::control::AntennaMonitorMsg::@16::@17 flagBoard
Flag a board.
MsgType type
The type of this message.
Tagged: Fri Nov 14 12:39:34 UTC 2003.
A class to encapsulate messages sent to the Monitor Task.
union sza::antenna::control::AntennaMonitorMsg::@16 body
A union of message bodies.
GenericMsgType genericMsgType_
A type for this message.
A class to encapsulate message types for a generic task.