aVersion.h

group aVersion

Library version interface.

aVersion.h Provides version information for the BrainStem2 library.

aVERSION_MAJOR

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

Minor revision level of library.

Minor revisions should largly be compatible, however new features may be added with a minor revision change.

aVERSION_PATCH

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.

Return
The major revision number.
Parameters
  • build: The packed version number returned from the system.getVersion call.

uint8_t aVersion_ParseMinor(uint32_t build)

Parse out the minor revision number.

Parses the minor revision level from the given uint32.

Return
The minor revision number.
Parameters
  • build: The packed version number returned from the system.getVersion call.

uint32_t aVersion_ParsePatch(uint32_t build)

Parse out the revision patch number.

Parses the revision patch level from the given uint32.

Return
The revision patch number.
Parameters
  • build: The packed version number returned from the system.getVersion call.

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.

uint8_t aVersion_GetMajor(void)

Return the major revision number.

Return
The major revision number.

uint8_t aVersion_GetMinor(void)

Return the minor revision number.

Return
The minor revision number.

uint32_t aVersion_GetPatch(void)

Return the revision patch number.

Return
The revision patch number.

const char *aVersion_GetString(void)

Return a human readable version string.

Return
char* human readable version string.

bool aVersion_IsAtLeast(const uint8_t major, const uint8_t minor, const uint8_t patch)

Check that the current version is at least major.minor.patch.

Return
True when current version is at least what is given, false otherwise
Parameters
  • major: The major revision level.
  • minor: The minor revision.
  • patch: The patch level.

char *aVersion_GetFeatureList(void)

Get an array of the features the library supports.

Return
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.