13 #ifndef KOBUKI_FW_DATA_HPP__ 14 #define KOBUKI_FW_DATA_HPP__ 20 #include "../packet_handler/payload_base.hpp" 21 #include "../packet_handler/payload_headers.hpp" 27 #define CURRENT_FIRMWARE_MAJOR_VERSION 1 28 #define CURRENT_FIRMWARE_MINOR_VERSION 2 51 bool serialise(ecl::PushAndPop<unsigned char> & byteStream)
62 if (byteStream.size() <
length+2)
68 unsigned char header_id, length_packed;
72 if( length_packed != 2 and length_packed != 4)
return false;
76 if (length_packed == 2)
78 uint16_t old_style_version = 0;
81 if (old_style_version == 123)
83 else if ((old_style_version == 10100) || (old_style_version == 110))
85 else if ((old_style_version == 10101) || (old_style_version == 111))
108 std::stringstream ss;
111 return std::string(ss.str());
116 std::stringstream ss;
119 return std::string(ss.str());
std::string flashed_version()
std::string current_version()
const unsigned char length
int check_major_version()
int current_major_version()
Provides base class for payloads.
#define CURRENT_FIRMWARE_MINOR_VERSION
payloadBase(const bool is_dynamic_=false, const unsigned char length_=0)
int check_minor_version()
int current_minor_version()
struct kobuki::Firmware::Data data
int flashed_major_version()
bool serialise(ecl::PushAndPop< unsigned char > &byteStream)
int flashed_minor_version()
void buildVariable(T &V, ecl::PushAndPop< unsigned char > &buffer)
bool deserialise(ecl::PushAndPop< unsigned char > &byteStream)
#define CURRENT_FIRMWARE_MAJOR_VERSION
void buildBytes(const T &V, ecl::PushAndPop< unsigned char > &buffer)