IDS peak AFL v1.6.0
Loading...
Searching...
No Matches
Library

Functions

PEAK_AFL_API_STATUS peak_afl_Init (void)
 Init the peak_afl auto feature library.
 
PEAK_AFL_API_STATUS peak_afl_Exit (void)
 Exit the peak_afl auto feature library.
 
PEAK_AFL_API_STATUS peak_afl_GetLastError (peak_afl_status *lastErrorCode, char *lastErrorMessage, size_t *lastErrorMessageSize)
 Get the last error message.
 
PEAK_AFL_API_STATUS peak_afl_GetVersion (uint32_t *majorVersion, uint32_t *minorVersion, uint32_t *subminorVersion, uint32_t *patchVersion)
 Query the library version.
 

Detailed Description

Library level functions and types.

Function Documentation

◆ peak_afl_Exit()

PEAK_AFL_API_STATUS peak_afl_Exit ( void  )

Exit the peak_afl auto feature library.

Deinitializes the internal library status.

For each call to peak_afl_Init there must be a corresponding call to this function to ensure proper deinitialization of the library status.
After the library has been exited, its functions (besides peak_afl_Init) will not be operable until peak_afl_Init has been called again.

Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.

◆ peak_afl_GetLastError()

PEAK_AFL_API_STATUS peak_afl_GetLastError ( peak_afl_status *  lastErrorCode,
char *  lastErrorMessage,
size_t *  lastErrorMessageSize 
)

Get the last error message.

This function implements the Two Staged Data Query principle.

Parameters
[out]lastErrorCodeThe error code of the last error. NULL if not required.
[out]lastErrorMessagePointer to a user allocated C string buffer to receive the last error text. If this parameter is NULL, lastErrorMessageSize will contain the needed size of lastErrorMessage in bytes. The size includes the terminating 0.
[in,out]lastErrorMessageSize
  • lastErrorMessage equal NULL:
    out: minimal size of lastErrorMessage in bytes to hold all information
  • lastErrorMessage unequal NULL:
    in: size of the provided lastErrorMessage in bytes
    out: number of bytes filled by the function
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_AFL_STATUS_BUFFER_TOO_SMALL The supplied buffer is too small.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.

◆ peak_afl_GetVersion()

PEAK_AFL_API_STATUS peak_afl_GetVersion ( uint32_t *  majorVersion,
uint32_t *  minorVersion,
uint32_t *  subminorVersion,
uint32_t *  patchVersion 
)

Query the library version.

Provides the version of the library divided in major, minor, subminor and patch, in that order of magnitude.

It is allowed to pass NULL for parts not needed.

Parameters
[out]majorVersionMajor Version. NULL if not required.
[out]minorVersionMinor Version. NULL if not required.
[out]subminorVersionSubminor Version. NULL if not required.
[out]patchVersionPatch Version. NULL if not required.
Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
Note
This function can be used even if the library is not initialized.

◆ peak_afl_Init()

PEAK_AFL_API_STATUS peak_afl_Init ( void  )

Init the peak_afl auto feature library.

Initializes the internal library status.

This function must be called prior to any other function call.
The function may be called multiple times from a single client process. For each call, there must be a corresponding call to peak_afl_Exit to ensure proper deinitialization of the library status.

Returns
PEAK_AFL_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_AFL_STATUS_ERROR An unexpected internal error occurred.