My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
DioMsg.h
Go to the documentation of this file.
1 #ifndef DIOMSG_H
2 #define DIOMSG_H
3 
11 #include "gcp/util/common/GenericTaskMsg.h"
12 
13 namespace gcp {
14  namespace mediator {
15 
16  class DioMsg :
18 
19  public:
20 
24  enum MsgType {
25  SETFILTER
26  };
27 
32 
33  union body {
34 
35  struct {
36  unsigned mask;
37  double freqHz;
38  unsigned ntaps;
39  } setFilter;
40 
41  } body;
42 
43  //------------------------------------------------------------
44  // Methods for packing messages intended for the
45  // Dio task
46  //------------------------------------------------------------
47 
51  inline void packSetFilterMsg(unsigned mask,
52  double freqHz, unsigned ntaps) {
53 
55  gcp::util::GenericTaskMsg::TASK_SPECIFIC;
56 
57  body.setFilter.mask = mask;
58  body.setFilter.freqHz = freqHz;
59  body.setFilter.ntaps = ntaps;
60 
61  type = SETFILTER;
62  }
63 
64  }; // End class DioMsg
65 
66  } // End namespace mediator
67 } // End namespace gcp
68 
69 #endif // End #ifndef
Definition: GenericTaskMsg.h:31
void packSetFilterMsg(unsigned mask, double freqHz, unsigned ntaps)
Definition: DioMsg.h:51
Definition: DioMsg.h:16
MsgType type
Definition: DioMsg.h:31
GenericMsgType genericMsgType_
Definition: GenericTaskMsg.h:50
MsgType
Definition: DioMsg.h:24
Definition: DioMsg.h:33