Definition of the BCON adapter interface. More...
Macros | |
#define | BCON_ADAPTER_API_MAJORVERSION 1u |
Current major version of the BCON adapter API. A change to the major version number indicates a breaking change. The BCON adapter will not be loaded if the version is different from the supported version. | |
#define | BCON_ADAPTER_API_MINORVERSION 0u |
Current minor version of the BCON adapter API. If only the minor version number differs, the API differences will be handled correctly by the caller. | |
Functions | |
BCONSTATUS BCON_ADAPTER_CALL | BconAdapterInit (BconTraceFunc pTraceFunc) |
Initializes/opens the BCON adapter layer. This function is called when the library is loaded. Re-initialization is possible after calling BconAdapterExit(). More... | |
BCONSTATUS BCON_ADAPTER_CALL | BconAdapterExit (void) |
Closes the BCON adapter layer. This function is called before the library is unloaded. It should free all resources. More... | |
BCONSTATUS BCON_ADAPTER_CALL | BconAdapterGetVersion (unsigned int *apiMajorVersion, unsigned int *apiMinorVersion, unsigned int *adapterMajorVersion, unsigned int *adapterMinorVersion) |
Returns the version of the library. This function is called to check the API version implemented by the library. Two different sets of major/minor version numbers are returned: More... | |
BCONSTATUS BCON_ADAPTER_CALL | BconAdapterGetStatusMessage (BCONSTATUS statusToDecode, char *pBuffer, size_t bufferSize, size_t *pRequiredSize) |
Retrieves the message text of a status code. This function is called to decode a user-defined status code into a readable string. More... | |
Definition of the BCON adapter interface.
BCONSTATUS BCON_ADAPTER_CALL BconAdapterExit | ( | void | ) |
Closes the BCON adapter layer. This function is called before the library is unloaded. It should free all resources.
BCON_OK | if resources were freed. |
Any | other BCON adapter error code otherwise. |
BCONSTATUS BCON_ADAPTER_CALL BconAdapterGetStatusMessage | ( | BCONSTATUS | statusToDecode, |
char * | pBuffer, | ||
size_t | bufferSize, | ||
size_t * | pRequiredSize | ||
) |
Retrieves the message text of a status code. This function is called to decode a user-defined status code into a readable string.
[in] | statusToDecode | Status to decode into string. |
[in] | pBuffer | Optional. The buffer for the returned string. This parameter can be NULL to retrieve the required buffer size. |
[in] | bufferSize | Size in number of characters. This parameter can be 0 to retrieve the required buffer size. |
[in,out] | pRequiredSize | Optional. Required size of the buffer including terminating 0. If the buffer is not large enough to hold the full string and is at least of one byte size, an empty string is returned. |
BCON_OK | on success. |
BCON_E_INSUFFICIENT_BUFFER | if the buffer provided is too small. |
BCON_E_NOT_FOUND | if the status code was not found. |
Any | other BCON adapter error code otherwise. |
BCONSTATUS BCON_ADAPTER_CALL BconAdapterGetVersion | ( | unsigned int * | apiMajorVersion, |
unsigned int * | apiMinorVersion, | ||
unsigned int * | adapterMajorVersion, | ||
unsigned int * | adapterMinorVersion | ||
) |
Returns the version of the library. This function is called to check the API version implemented by the library. Two different sets of major/minor version numbers are returned:
[out] | apiMajorVersion | Major version of the BCON adapter API (BCON_ADAPTER_API_MAJORVERSION ). |
[out] | apiMinorVersion | Minor version of the BCON adapter API (BCON_ADAPTER_API_MINORVERSION ). |
[out] | adapterMajorVersion | Major version of the adapter library. |
[out] | adapterMinorVersion | Minor version of the adapter library. |
BCON_OK | on success. |
Any | other BCON adapter error code otherwise. |
BCONSTATUS BCON_ADAPTER_CALL BconAdapterInit | ( | BconTraceFunc | pTraceFunc | ) |
Initializes/opens the BCON adapter layer. This function is called when the library is loaded. Re-initialization is possible after calling BconAdapterExit().
[in] | pTraceFunc | Optional. Pointer to a function. If this parameter is not NULL, you can call this to write to the host application. |
BCON_OK | on success. |
Any | other BCON adapter error code otherwise. |