sensors.hpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10 ** Preprocessor
11 *****************************************************************************/
12 
13 #ifndef XBOT_SENSORS_HPP__
14 #define XBOT_SENSORS_HPP__
15 
16 /*****************************************************************************
17 ** Include
18 *****************************************************************************/
19 
20 #include "../packet_handler/payload_base.hpp"
21 #include "../macros.hpp"
22 #include <stdint.h>
23 
24 /*****************************************************************************
25 ** Namespaces
26 *****************************************************************************/
27 
28 namespace xbot
29 {
30 
31 /*****************************************************************************
32 ** Interface
33 *****************************************************************************/
34 
36 {
37 public:
38  Sensors() : packet_handler::payloadBase(false, 72) {};
39 
40  struct Data {
41  unsigned char yaw_platform_degree;
42  unsigned char pitch_platform_degree;
44  float acc_x;
45  float acc_y;
46  float acc_z;
47  float gyro_x;
48  float gyro_y;
49  float gyro_z;
50  float mag_x;
51  float mag_y;
52  float mag_z;
53 
54  float yaw;
55  float pitch;
56  float roll;
57  float q1;
58  float q2;
59  float q3;
60  float q4;
61  unsigned char error_status;
62  uint32_t timestamp;
63  uint8_t version;
64 
65 
66  } data;
67 
68 
69  bool serialise(ecl::PushAndPop<unsigned char> & byteStream);
70  bool deserialise(ecl::PushAndPop<unsigned char> & byteStream);
71 };
72 
73 } // namespace xbot
74 
75 #endif /* XBOT_SENSORS_HPP__ */
unsigned char error_status
Definition: sensors.hpp:61
unsigned char yaw_platform_degree
Definition: sensors.hpp:41
unsigned char pitch_platform_degree
Definition: sensors.hpp:42
#define xbot_PUBLIC
Provides base class for payloads.
uint32_t timestamp
Definition: sensors.hpp:62
Definition: command.hpp:30


xbot_driver
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:27:38