optris_sdk_build_info
Where this library came from -- the answer to "what exactly are you running", which is the first thing a support request is asked for and the one thing a version number alone cannot say.
Read it with optris_sdk_get_build_info(). Every field is a display string, UTF-8 and NUL-terminated, and no field is ever empty: one that could not be determined at build time reads exactly "unknown". That distinction is the point of the type. An empty string is indistinguishable from a field nobody filled in, and a stale or invented commit is worse than none at all -- it sends support to code that is not in the binary. So the values here are either true or visibly absent.
The one qualification worth knowing: commit is stamped at CMake configure time. A build made from a modified working tree has -dirty appended, so the hash never silently claims to describe source that was edited afterwards.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_build_info).
version
char version[OPTRIS_SDK_MAX_VERSION]
Product version as a display string, e.g. "12.0.0". The same value optris_sdk_version_string() returns; it is repeated here so that one call answers the whole "which build is this" question, which is what a diagnostics bundle records. Both read the same generated constant, so they cannot disagree.
commit
char commit[OPTRIS_SDK_MAX_COMMIT]
Abbreviated hash of the commit the library was built from, with -dirty appended if the working tree differed from it, or "unknown".
commit_date
char commit_date[OPTRIS_SDK_MAX_TIMESTAMP]
Date of that commit, ISO 8601 with a zone offset, or "unknown".
branch
char branch[OPTRIS_SDK_MAX_BRANCH]
Branch the build was made from, or "unknown". A release build is made from a detached checkout of a bare revision, so this is the branch the build system said it was building rather than anything the checkout itself remembers.
build_type
char build_type[OPTRIS_SDK_MAX_BUILD_TYPE]
CMake build type, e.g. "Release" or "Debug".
build_date
char build_date[OPTRIS_SDK_MAX_TIMESTAMP]
When the library was compiled, ISO 8601. Always UTC, and the +0000 is present in the text.
os
char os[OPTRIS_SDK_MAX_PLATFORM]
Operating system the library was built for, e.g. "Linux".
platform
char platform[OPTRIS_SDK_MAX_PLATFORM]
Architecture the library was built for, e.g. "amd64".