Version

group Version

Functions for getting and comparing software and firmware version.

void version_ParseMajor(struct Result *result, unsigned int build)

Parses the major revision level from the given build number.

Parameters:
  • result – object, containing NO_ERROR or a non zero Error code.

  • build – The packed version number returned from the system.getVersion call.

void version_ParseMinor(struct Result *result, unsigned int build)

Parses the minor revision level from the given build number.

Parameters:
  • result – object, containing NO_ERROR or a non zero Error code.

  • build – The packed version number returned from the system.getVersion call.

void version_ParsePatch(struct Result *result, unsigned int build)

Parses the revision patch level from the given build number.

Parameters:
  • result – object, containing NO_ERROR or a non zero Error code.

  • build – The packed version number returned from the system.getVersion call.

void version_IsLegacyFormat(struct Result *result, unsigned int build)

Check if the given build version is of the legacy packing format

Parameters:
  • result – object, containing NO_ERROR or a non zero Error code.

  • build – The packed version number returned from the system.getVersion call.

void version_GetMajor(struct Result *result)

Return the major revision number for the software package.

Parameters:

result – Object containing aErrNone and the requested value on success.

void version_GetMinor(struct Result *result)

Return the minor revision number for the software package.

Parameters:

result – Object containing aErrNone and the requested value on success.

void version_GetPatch(struct Result *result)

Return the patch revision number for the software package.

Parameters:

result – Object containing aErrNone and the requested value on success.

void version_IsAtLeast(struct Result *result, unsigned int major, unsigned int minor, unsigned int patch)

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

Parameters:
  • result – Object containing aErrNone and the requested value on success.

  • major – The major revision level.

  • minor – The minor revision.

  • patch – The patch level.

void version_IsAtLeastCompare(struct Result *result, unsigned int major_lhs, unsigned int minor_lhs, unsigned int patch_lhs, unsigned int major_rhs, unsigned int minor_rhs, unsigned int patch_rhs)

Check that the supplied left hand side (lhs) version is at least (>=) the right hand side (rhs).

Parameters:
  • result – Object containing aErrNone and the requested value on success.

  • major_lhs – The lhs major revision level.

  • minor_lhs – The lhs minor revision.

  • patch_lhs – The lhs patch level.

  • major_rhs – The rhs major revision level.

  • minor_rhs – The rhs minor revision.

  • patch_rhs – The rhs patch level.

void version_Pack(struct Result *result, unsigned int major, unsigned int minor, unsigned int patch)

Packs the given version into a single integer

Parameters:
  • result – Object containing aErrNone and the requested value on success.

  • major – The major revision level.

  • minor – The minor revision.

  • patch – The patch level.