13 #ifndef KOBUKI_VERSION_HPP_ 14 #define KOBUKI_VERSION_HPP_ 41 VersionInfo(
const uint32_t &fw,
const uint32_t &hw,
const uint32_t udid0_,
const uint32_t udid1_,
const uint32_t udid2_ ) :
57 return ((version & 0x00FF0000) >> 16);
61 return ((version & 0x0000FF00) >> 8);
65 return (version & 0x000000FF);
68 static std::string
toString(
const uint32_t &version)
72 ss << majorVersion(version) <<
"." << minorVersion(version) <<
"." << patchVersion(version);
73 return std::string(ss.str());
76 static std::string
toString(
const std::vector<uint32_t> &versions)
79 std::size_t number_versions = versions.size();
80 for(std::size_t i = 0; i < number_versions; ++i) {
82 if (i != (number_versions - 1)) {
86 return std::string(ss.str());
89 static std::string
toString(
const uint32_t &udid0,
const uint32_t &udid1,
const uint32_t &udid2)
93 ss << udid0 <<
"-" << udid1 <<
"-" << udid2;
94 return std::string(ss.str());
97 static std::string getSoftwareVersion();
static int majorVersion(const uint32_t &version)
static std::string toString(const std::vector< uint32_t > &versions)
static std::string toString(const uint32_t &version)
Macros for kobuki_driver.
static int patchVersion(const uint32_t &version)
static int minorVersion(const uint32_t &version)
VersionInfo(const uint32_t &fw, const uint32_t &hw, const uint32_t udid0_, const uint32_t udid1_, const uint32_t udid2_)
static std::string toString(const uint32_t &udid0, const uint32_t &udid1, const uint32_t &udid2)