Global functions which can be called without a corresponding object which handles the request. More...
Functions | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlGetVersionMajor () |
Returns the major version number of the VisionLib plugin. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlGetVersionMinor () |
Returns the minor version number of the VisionLib plugin. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlGetVersionRevision () |
Returns the revision version number of the VisionLib plugin. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlGetVersionString (char version[], unsigned int maxSize) |
Copies the version string of the VisionLib plugin into a buffer. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlGetVersionHashString (char version[], unsigned int maxSize) |
Copies the version hash of the VisionLib plugin into a buffer. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlGetVersionTimestampString (char versionTimeStamp[], unsigned int maxSize) |
Copies the version timestamp of the VisionLib plugin into a buffer. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlAddLogListener (vlCallbackZString fn, void *clientData) |
Registers a log listener. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlRemoveLogListener (vlCallbackZString fn, void *clientData) |
Unregisters a log listener. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlClearLogListeners () |
Removes all log listeners. More... | |
VL_SDK_API void VL_CALLINGCONVENTION | vlEnableLogBuffer () |
Enables log buffering. More... | |
VL_SDK_API void VL_CALLINGCONVENTION | vlDisableLogBuffer () |
Disables log buffering. More... | |
VL_SDK_API void VL_CALLINGCONVENTION | vlSetLogBufferSize (unsigned int maxEntries) |
Sets the maximum number of log messages in the log buffer. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlFlushLogBuffer () |
Notifies registered log listeners of all buffered log messages. More... | |
VL_SDK_API int VL_CALLINGCONVENTION | vlGetLogLevel () |
Gets the current log level. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlSetLogLevel (int level) |
Sets the log level. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlLog (const char message[], int level) |
Logs the given message as VisionLib log. More... | |
Global functions which can be called without a corresponding object which handles the request.
VL_SDK_API bool VL_CALLINGCONVENTION vlAddLogListener | ( | vlCallbackZString | fn, |
void * | clientData | ||
) |
Registers a log listener.
fn | Listener function which will receive all VisionLib log messages. |
clientData | The listener will be notified with the given pointer value. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlClearLogListeners | ( | ) |
Removes all log listeners.
true
, on success; false
otherwise. VL_SDK_API void VL_CALLINGCONVENTION vlDisableLogBuffer | ( | ) |
Disables log buffering.
If log buffering is disabled, then log messages will get dispatched immediately. This might happen from a different thread. Therefore one must make sure, that registered log listeners are thread-safe.
With disabled log buffering, calling the vlFlushLogBuffer function is not necessary.
By default log buffering is disabled.
VL_SDK_API void VL_CALLINGCONVENTION vlEnableLogBuffer | ( | ) |
Enables log buffering.
If log buffering is enabled, then log messages will not get dispatched immediately. Instead they will get buffered and one must continuously call the vlFlushLogBuffer function in order to dispatch the buffered log messages to the registered listeners.
This has the advantage, that registered listeners will not get notified from some arbitrary thread, which would require proper thread synchronization.
By default log buffering is disabled.
VL_SDK_API bool VL_CALLINGCONVENTION vlFlushLogBuffer | ( | ) |
Notifies registered log listeners of all buffered log messages.
If log buffering is enabled, then log messages will not get dispatched immediately. Instead they will get buffered and one must continuously call the vlFlushLogBuffer function in order to dispatch the buffered log messages to the registered listeners.
Failing to call vlFlushLogBuffer with enabled log buffering will have the effect, that registered log listeners will not get notified of any log messages and old log messages will be lost forever.
true
, on success; false
otherwise. VL_SDK_API int VL_CALLINGCONVENTION vlGetLogLevel | ( | ) |
Gets the current log level.
VL_SDK_API bool VL_CALLINGCONVENTION vlGetVersionHashString | ( | char | version[], |
unsigned int | maxSize | ||
) |
Copies the version hash of the VisionLib plugin into a buffer.
version | Buffer for storing the version hash. |
maxSize | The size of the buffer. |
true
, on success; false
otherwise. VL_SDK_API unsigned int VL_CALLINGCONVENTION vlGetVersionMajor | ( | ) |
Returns the major version number of the VisionLib plugin.
VL_SDK_API unsigned int VL_CALLINGCONVENTION vlGetVersionMinor | ( | ) |
Returns the minor version number of the VisionLib plugin.
VL_SDK_API unsigned int VL_CALLINGCONVENTION vlGetVersionRevision | ( | ) |
Returns the revision version number of the VisionLib plugin.
VL_SDK_API bool VL_CALLINGCONVENTION vlGetVersionString | ( | char | version[], |
unsigned int | maxSize | ||
) |
Copies the version string of the VisionLib plugin into a buffer.
version | Buffer for storing the version string. |
maxSize | The size of the buffer. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlGetVersionTimestampString | ( | char | versionTimeStamp[], |
unsigned int | maxSize | ||
) |
Copies the version timestamp of the VisionLib plugin into a buffer.
version | Buffer for storing the version timestamp. |
maxSize | The size of the buffer. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlLog | ( | const char | message[], |
int | level | ||
) |
Logs the given message as VisionLib log.
message | Zero terminated string with the message. |
level | Log level (0: log, 1: fatal, 2: warning, 3: notice, 4: info, 5: debug). |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlRemoveLogListener | ( | vlCallbackZString | fn, |
void * | clientData | ||
) |
Unregisters a log listener.
fn | Listener, which should be removed. |
clientData | Pointer value which was used during the registration. |
true
, on success; false
otherwise. VL_SDK_API void VL_CALLINGCONVENTION vlSetLogBufferSize | ( | unsigned int | maxEntries | ) |
Sets the maximum number of log messages in the log buffer.
If log buffering is enabled, then log messages will get buffered. In order to not allocate too much memory, the size of the log buffer is limited to a certain number of entries. If there are too many log messages in the buffer, then the oldest message will get removed.
By default the maximum number of buffer entries is 32.
VL_SDK_API bool VL_CALLINGCONVENTION vlSetLogLevel | ( | int | level | ) |
Sets the log level.
It is recommended to set the log level to 2 (warning) during development, otherwise there will be too many messages. Only for debugging purposes it might be useful to increase the log level. Before deploying your application you should set the log level to 0 (log) or 1 (fatal).
level | New log level. (0: log, 1: fatal, 2: warning, 3: notice, 4: info, 5: debug). |
true
, on success; false
otherwise.