aVersion.h¶
- group aVersion
Library version interface.
aVersion.h Provides version information for the BrainStem2 library.
-
aVERSION_MAJOR 2¶
Major revision level of library.
Major revision bumps will break compatibility with existing versions and may introduce protocol changes or other fundamental differences.
-
aVERSION_MINOR 11¶
Minor revision level of library.
Minor revisions should largly be compatible, however new features may be added with a minor revision change.
-
aVERSION_PATCH 1¶
Patch revision level of library.
Patch revisions are bug fixes and small performance changes. They add no significant new features or interfaces.
- group Firmware_version_parsing
Functions
-
uint8_t aVersion_ParseMajor(uint32_t build)¶
Parse out the major revision number.
Parses the major revision level from the given uint32.
- Parameters:
build – The packed version number returned from the system.getVersion call.
- Returns:
The major revision number.
-
uint8_t aVersion_ParseMinor(uint32_t build)¶
Parse out the minor revision number.
Parses the minor revision level from the given uint32.
- Parameters:
build – The packed version number returned from the system.getVersion call.
- Returns:
The minor revision number.
-
uint32_t aVersion_ParsePatch(uint32_t build)¶
Parse out the revision patch number.
Parses the revision patch level from the given uint32.
- Parameters:
build – The packed version number returned from the system.getVersion call.
- Returns:
The revision patch number.
-
void aVersion_ParseString(uint32_t build, char *string, size_t len)¶
Parse the Version number into a human readable format.
Fills the string parameter with a human readable formated version number.
- Parameters:
build – The packed version number returned from the system.getVersion call.
string – The string to fill with the version string.
len – The length of the filled string, not longer than MAX_VERSION_STRING.
-
bool aVersion_IsLegacyFormat(uint32_t build)¶
Check if the given build version is of the legacy packing format.
Parses the revision format from the given uint32.
- Parameters:
build – The packed version number returned from the system.getVersion call.
- Returns:
Whether the revision format is the old packing format.
-
uint8_t aVersion_ParseMajor(uint32_t build)¶
-
uint8_t aVersion_GetMajor(void)¶
Return the major revision number.
- Returns:
The major revision number.
-
uint8_t aVersion_GetMinor(void)¶
Return the minor revision number.
- Returns:
The minor revision number.
-
uint32_t aVersion_GetPatch(void)¶
Return the revision patch number.
- Returns:
The revision patch number.
-
const char *aVersion_GetString(void)¶
Return a human readable version string.
- Returns:
char* human readable version string.
-
bool aVersion_IsAtLeast(const uint8_t major, const uint8_t minor, const uint8_t patch)¶
Check that the current software version is at least major.minor.patch.
- Parameters:
major – The major revision level.
minor – The minor revision.
patch – The patch level.
- Returns:
True when current version is at least what is given, false otherwise
-
char *aVersion_GetFeatureList(void)¶
Get an array of the features the library supports.
- Returns:
an array of c strings describing the features the library supports.
-
void aVersion_DestroyFeatureList(char **featureList)¶
Destroy the feature list.
- Parameters:
featureList – pointer to featurelist.