1#ifndef GIMBAL_VERSION_HPP
2#define GIMBAL_VERSION_HPP
13 constexpr Version(uint8_t major = 0,
15 uint8_t patch = 0)
noexcept:
16 version_(GBL_VERSION_MAKE_(major, minor, patch)) {}
18 constexpr Version(
GblVersion version)
noexcept:
21 Version(
const char* pString) {
30 constexpr void setMajor(uint8_t major)
noexcept {
35 constexpr void setMinor(uint16_t minor)
noexcept {
40 constexpr void setPatch(uint16_t patch)
noexcept {
45 constexpr operator
GblVersion()
const noexcept {
return version_; }
50 "C++ Version incompatiblly sized with C version!");
#define GBL_VERSION_MINOR_BITPOS
Bit position of the MINOR field.
#define GBL_VERSION_MINOR_MASK
Bit mask of the MINOR field.
GblVersion GblVersion_parse(const char *pString)
Parses and returns a GblVersion from an encoded version string in the format "MAJOR....
#define GBL_VERSION_PATCH_MASK
Bit mask of the PATCH field.
#define GBL_VERSION_MAJOR_BITPOS
Bit position of the MAJOR field.
#define GBL_VERSION_MAJOR_MASK
Bit mask of the MAJOR field.
#define GBL_VERSION_PATCH_BITPOS
Bit position of the PATCH field.
uint32_t GblVersion
32-bit unsigned integer representing a packed version in the form (MAJOR.MINOR.PATCH)