13 #ifndef KOBUKI_THREE_AXIS_GYRO_DATA_HPP__ 14 #define KOBUKI_THREE_AXIS_GYRO_DATA_HPP__ 20 #include "../packet_handler/payload_base.hpp" 21 #include "../packet_handler/payload_headers.hpp" 27 #define MAX_DATA_SIZE (3*8) //derived from ST_GYRO_MAX_DATA_SIZE in firmware 52 bool serialise(ecl::PushAndPop<unsigned char> & byteStream)
54 unsigned char length = 2 + 2 *
data.followed_data_length;
59 for (
unsigned int i=0; i<
data.followed_data_length; i++)
66 if (byteStream.size() <
length+2)
72 unsigned char header_id, length_packed;
76 if(
length > length_packed )
return false;
80 if( length_packed != 2 + 2 *
data.followed_data_length )
return false;
82 for (
unsigned int i=0; i<
data.followed_data_length; i++)
bool serialise(ecl::PushAndPop< unsigned char > &byteStream)
const unsigned char length
bool deserialise(ecl::PushAndPop< unsigned char > &byteStream)
Provides base class for payloads.
unsigned char followed_data_length
payloadBase(const bool is_dynamic_=false, const unsigned char length_=0)
void buildVariable(T &V, ecl::PushAndPop< unsigned char > &buffer)
unsigned short data[MAX_DATA_SIZE]
void buildBytes(const T &V, ecl::PushAndPop< unsigned char > &buffer)