MIP_SDK
v3.0.0
MicroStrain Communications Library for embedded systems
|
Go to the documentation of this file.
8 #if __cpp_lib_string_view >= 201606L
36 bool isNull()
const {
return m_version == 0; }
42 uint16_t
asU16()
const {
return m_version; }
43 uint16_t&
asU16() {
return m_version; }
47 uint8_t
major()
const {
return uint8_t(m_version / 1000); }
48 uint8_t
minor()
const {
return (m_version / 100) % 10; }
49 uint8_t
patch()
const {
return m_version % 100; }
58 void toString(
char* buffer,
size_t buffer_size)
const;
59 bool fromString(
const char* str,
size_t length=-1);
62 #if __cpp_lib_string_view >= 201606L
67 uint16_t m_version = 0;
bool isDevVersion() const
Definition: firmware_version.hpp:38
A collection of C++ classes and functions covering the full mip api.
Definition: commands_3dm.c:11
FirmwareVersion()=default
FirmwareVersion(uint16_t version)
Definition: firmware_version.hpp:30
Represents the device firmware version.
Definition: firmware_version.hpp:25
uint16_t asU16() const
Definition: firmware_version.hpp:42
std::string toString() const
Convert a FirmwareVersion to a string separated by periods.
Definition: firmware_version.cpp:65
bool operator<=(FirmwareVersion other) const
Definition: firmware_version.hpp:53
uint8_t patch() const
Definition: firmware_version.hpp:49
bool fromString(const char *str, size_t length=-1)
Reads a standard-format string (X.Y.ZZ\0 or XYZZ\0).
Definition: firmware_version.cpp:31
bool operator==(FirmwareVersion other) const
Definition: firmware_version.hpp:51
uint8_t major() const
Definition: firmware_version.hpp:47
uint16_t & asU16()
Definition: firmware_version.hpp:43
void fromParts(uint8_t major, uint8_t minor, uint8_t patch)
Definition: firmware_version.hpp:45
bool operator>=(FirmwareVersion other) const
Definition: firmware_version.hpp:54
bool operator!=(FirmwareVersion other) const
Definition: firmware_version.hpp:52
FirmwareVersion & operator=(uint16_t version)
Definition: firmware_version.hpp:34
bool isReleaseVersion() const
Definition: firmware_version.hpp:39
bool operator>(FirmwareVersion other) const
Definition: firmware_version.hpp:56
FirmwareVersion(uint8_t major, uint8_t minor, uint8_t patch)
Definition: firmware_version.hpp:29
bool isSpecialVersion() const
Definition: firmware_version.hpp:40
uint8_t minor() const
Definition: firmware_version.hpp:48
bool isNull() const
Definition: firmware_version.hpp:36
FirmwareVersion & operator=(const FirmwareVersion &)=default
bool isValid() const
Definition: firmware_version.hpp:37
bool operator<(FirmwareVersion other) const
Definition: firmware_version.hpp:55