Definition of the BCON adapter interface. More...
Macros | |
#define | BCON_ADAPTER_API_MAJORVERSION 3u |
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 | Resources have been freed. |
Any | Other BCON adapter error code. |
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. |
[out] | pBuffer | 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. |
[out] | pRequiredSize | Required size of the buffer including a terminating zero. If the buffer is not large enough to hold the full string, it will be truncated. The returned string will always be zero-terminated. |
BCON_OK | Success. |
BCON_E_NOT_FOUND | Status code was not found. |
Any | Other BCON adapter error code. |
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 | Success. |
Any | Other BCON adapter error code. |
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 | Success. |
Any | Other BCON adapter error code. |