CARMA C++
UmacControlMsg.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CONTROL_UMACCONTROLMSG_H
2 #define SZA_ANTENNA_CONTROL_UMACCONTROLMSG_H
3 
12 
13 namespace sza {
14  namespace antenna {
15  namespace control {
16 
17  class UmacControlMsg :
19 
20  public:
21 
25  enum MsgType {
26  POWER, // Cycle power to the named device/circuit breaker
27  RESET // Reset the RPC module
28  };
29 
33  MsgType type;
34 
38  union {
39 
43  struct {
44  unsigned breaker; // The register map index of the
45  bool power; // True to turn power on, false to
46  // turn power off.
47  } power;
48  } body;
49 
50  inline void packPowerMsg(unsigned breaker, bool power)
51  {
53  sza::util::GenericTaskMsg::TASK_SPECIFIC;
54 
55  type = POWER;
56  body.power.breaker = breaker;
57  body.power.power = power;
58  }
59 
60  }; // End class UmacControlMsg
61 
62  } // End namespace control
63  } // End namespace antenna
64 } // End namespace sza
65 
66 
67 
68 #endif // End #ifndef SZA_ANTENNA_CONTROL_UMACCONTROLMSG_H
Tagged: Fri Nov 14 12:39:34 UTC 2003.
GenericMsgType genericMsgType_
A type for this message.
A class to encapsulate message types for a generic task.