|
libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Macros | |
| #define | GBL_VERSION_STRING_SIZE |
Bitfields | |
Bitfield positions and masks | |
| #define | GBL_VERSION_MAJOR_BITPOS |
| #define | GBL_VERSION_MAJOR_MASK |
| #define | GBL_VERSION_MINOR_BITPOS |
| #define | GBL_VERSION_MINOR_MASK |
| #define | GBL_VERSION_PATCH_BITPOS |
| #define | GBL_VERSION_PATCH_MASK |
Compile-Time Versioning | |
Macros for compile-time encoding | |
| #define | GBL_VERSION_MAKE(major, minor, patch) |
| #define | GBL_VERSION_STRING(major, minor, patch) |
Typedefs | |
| typedef uint32_t | GblVersion |
Functions | |
| char * | GblVersion_string (GblVersion self, char *pBuffer) |
Creation | |
Methods for creating and encoding | |
| GblVersion | GblVersion_make (uint8_t major, uint16_t minor, uint8_t patch) |
| GblVersion | GblVersion_parse (const char *pString) |
Field Extraction | |
Methods for getting field values | |
| uint8_t | GblVersion_major (GblVersion self) |
| uint16_t | GblVersion_minor (GblVersion self) |
| uint8_t | GblVersion_patch (GblVersion self) |
Field Encoding | |
Methods for setting field values | |
| void | GblVersion_setMajor (GblVersion *pSelf, uint8_t major) |
| void | GblVersion_setMinor (GblVersion *pSelf, uint16_t minor) |
| void | GblVersion_setPatch (GblVersion *pSelf, uint8_t patch) |
GblVersion type, utlities and query functions.
This file contains the GblVersion typedef and its associated API. A GblVersion is a 32-bit unsigned integer, encoded as:
| Bits | 24-31 | 9-23 | 0-8 |
|---|---|---|---|
| Field | Major | Minor | Patch |
Definition in file gimbal_version.h.
| #define GBL_VERSION_MAJOR_BITPOS |
Bit position of the MAJOR field.
Definition at line 32 of file gimbal_version.h.
| #define GBL_VERSION_MAJOR_MASK |
Bit mask of the MAJOR field.
Definition at line 33 of file gimbal_version.h.
| #define GBL_VERSION_MINOR_BITPOS |
Bit position of the MINOR field.
Definition at line 35 of file gimbal_version.h.
| #define GBL_VERSION_MINOR_MASK |
Bit mask of the MINOR field.
Definition at line 36 of file gimbal_version.h.
| #define GBL_VERSION_PATCH_BITPOS |
Bit position of the PATCH field.
Definition at line 38 of file gimbal_version.h.
| #define GBL_VERSION_PATCH_MASK |
Bit mask of the PATCH field.
Definition at line 39 of file gimbal_version.h.
| #define GBL_VERSION_STRING_SIZE |
Size required for a string buffer to hold a version, used with GblVersion_string()
Definition at line 43 of file gimbal_version.h.
| #define GBL_VERSION_MAKE | ( | major, | |
| minor, | |||
| patch ) |
Encodes a GblVersion from its constituents.
Definition at line 50 of file gimbal_version.h.
| #define GBL_VERSION_STRING | ( | major, | |
| minor, | |||
| patch ) |
Creates a compile-time stringified version from its constituents.
Definition at line 52 of file gimbal_version.h.
| GblVersion GblVersion_make | ( | uint8_t | major, |
| uint16_t | minor, | ||
| uint8_t | patch ) |
Creates and returns a GblVersion from its packed constituent values.
| GblVersion GblVersion_parse | ( | const char * | pString | ) |
Parses and returns a GblVersion from an encoded version string in the format "MAJOR.MINOR.PATCH".
| char * GblVersion_string | ( | GblVersion | self, |
| char * | pBuffer ) |
Stringifies a GblVersion, storing it within pBuffer and returning pBuffer.
| uint8_t GblVersion_major | ( | GblVersion | self | ) |
Extracts the 8-bit MAJOR version number field.
| uint16_t GblVersion_minor | ( | GblVersion | self | ) |
Extracts the 16-bit MINOR version number field.
| uint8_t GblVersion_patch | ( | GblVersion | self | ) |
Extracts the 8-bit PATCH version number field.
| void GblVersion_setMajor | ( | GblVersion * | pSelf, |
| uint8_t | major ) |
Sets the 8-bit MAJOR version number field to major.
| void GblVersion_setMinor | ( | GblVersion * | pSelf, |
| uint16_t | minor ) |
Sets the 16-bit MINOR version number field to minor.
| void GblVersion_setPatch | ( | GblVersion * | pSelf, |
| uint8_t | patch ) |
Sets the 8-bit PATCH version number field to patch.