MsgRx.h
Go to the documentation of this file.
1 #ifndef _MSG_RX_H_
2 #define _MSG_RX_H_
3 
4 #include <ros/ros.h>
5 
6 template <typename MsgT>
7 class MsgRx {
8 public:
9  MsgRx() : valid_(false) {};
10  MsgRx(const MsgT& msg) : valid_(false) { set(msg); };
11  const MsgT& get() const { return msg_; }
12  void set(const MsgT& msg) { msg_ = msg; valid_ = true; }
13  void clear() { valid_ = false; }
14  bool valid() const { return valid_; }
15 private:
16  MsgT msg_;
17  bool valid_;
18 };
19 
20 #endif // _MSG_RX_H_
bool valid() const
Definition: MsgRx.h:14
bool valid_
Definition: MsgRx.h:17
MsgRx()
Definition: MsgRx.h:9
Definition: MsgRx.h:7
MsgRx(const MsgT &msg)
Definition: MsgRx.h:10
void clear()
Definition: MsgRx.h:13
MsgT msg_
Definition: MsgRx.h:16


oxford_gps_eth
Author(s): Kevin Hallenbeck
autogenerated on Sun Aug 9 2020 04:05:34