Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
xbot_driver
packets
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
35
class
xbot_PUBLIC
Sensors
:
public
packet_handler::payloadBase
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
;
43
bool
sound_enabled
;
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__ */
xbot::Sensors::Data::q4
float q4
Definition:
sensors.hpp:60
xbot::Sensors::Data::gyro_x
float gyro_x
Definition:
sensors.hpp:47
xbot::Sensors::Data::mag_z
float mag_z
Definition:
sensors.hpp:52
xbot::Sensors::Data::error_status
unsigned char error_status
Definition:
sensors.hpp:61
xbot::Sensors::Data::acc_y
float acc_y
Definition:
sensors.hpp:45
xbot::Sensors::Data::sound_enabled
bool sound_enabled
Definition:
sensors.hpp:43
ecl::PushAndPop< unsigned char >
xbot::Sensors::Data::yaw
float yaw
Definition:
sensors.hpp:54
xbot::Sensors::Data::pitch
float pitch
Definition:
sensors.hpp:55
packet_handler
Definition:
payload_base.hpp:27
xbot::Sensors::Data::acc_z
float acc_z
Definition:
sensors.hpp:46
xbot::Sensors::Data::gyro_z
float gyro_z
Definition:
sensors.hpp:49
xbot::Sensors::Data::yaw_platform_degree
unsigned char yaw_platform_degree
Definition:
sensors.hpp:41
xbot::Sensors::Data::pitch_platform_degree
unsigned char pitch_platform_degree
Definition:
sensors.hpp:42
xbot::Sensors::Data::version
uint8_t version
Definition:
sensors.hpp:63
xbot_PUBLIC
#define xbot_PUBLIC
Definition:
xbot_driver/macros.hpp:39
xbot::Sensors::Data::roll
float roll
Definition:
sensors.hpp:56
xbot::Sensors::Data::q2
float q2
Definition:
sensors.hpp:58
xbot::Sensors::Data::acc_x
float acc_x
Definition:
sensors.hpp:44
xbot::Sensors::Data::q1
float q1
Definition:
sensors.hpp:57
packet_handler::payloadBase
Provides base class for payloads.
Definition:
payload_base.hpp:38
xbot::Sensors::Data::timestamp
uint32_t timestamp
Definition:
sensors.hpp:62
xbot::Sensors::Data::q3
float q3
Definition:
sensors.hpp:59
xbot::Sensors::Sensors
Sensors()
Definition:
sensors.hpp:38
xbot::Sensors::Data::mag_x
float mag_x
Definition:
sensors.hpp:50
xbot::Sensors
Definition:
sensors.hpp:35
xbot::Sensors::Data
Definition:
sensors.hpp:40
xbot
Definition:
command.hpp:30
xbot::Sensors::Data::mag_y
float mag_y
Definition:
sensors.hpp:51
xbot::Sensors::Data::gyro_y
float gyro_y
Definition:
sensors.hpp:48
xbot_driver
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:27:38