22 #include "../../include/kobuki_driver/kobuki.hpp" 23 #include "../../include/kobuki_driver/packet_handler/payload_headers.hpp" 52 unsigned char header_id, length_packed;
56 if( length_packed != 2 and length_packed != 4)
return false;
60 if (length_packed == 2)
62 uint16_t old_style_version = 0;
65 if (old_style_version == 123)
67 else if ((old_style_version == 10100) || (old_style_version == 110))
69 else if ((old_style_version == 10101) || (old_style_version == 111))
113 }
else if (
majorVersion() < recommended_major_version ) {
115 }
else if (
minorVersion() > recommended_minor_version ) {
117 }
else if (
minorVersion() < recommended_minor_version ) {
119 }
else if (
patchVersion() > recommended_patch_version ) {
121 }
else if (
patchVersion() < recommended_patch_version ) {
int checkMajorVersion() const
static int majorVersion(const uint32_t &version)
unsigned int size() const
const unsigned char length
int checkRecommendedVersion() const
static const std::vector< uint32_t > RECOMMENDED_VERSIONS
const uint32_t & version() const
void buildVariable(T &V, ecl::PushAndPop< unsigned char > &buffer)
bool deserialise(ecl::PushAndPop< unsigned char > &byteStream)
static int patchVersion(const uint32_t &version)
static int minorVersion(const uint32_t &version)
static const uint32_t COMPATIBLE_MAJOR_VERSION