Lucon SDK 1.0.7
Loading...
Searching...
No Matches

Typedefs

typedef void(* LuconHintCallback) (const char *, LuconHintLevel level, const LuconHandle caller)
 Signature of a callback function to receive hints from a Lucon module.

Functions

LuconResult LUCON_ConnectionSetReadCallback (LuconHandle handle, const LuconStringCallback callback)
 Set a callback function to be executed after the connection received data from the device.
LuconResult LUCON_ConnectionSetWriteCallback (LuconHandle handle, const LuconStringCallback callback)
 Set a callback function to be executed after data was sent over the connection given by handle.

Detailed Description

Typedef Documentation

◆ LuconHintCallback

typedef void(* LuconHintCallback) (const char *, LuconHintLevel level, const LuconHandle caller)

Signature of a callback function to receive hints from a Lucon module.

Hints are string messages which may be sent to the host by Lucon modules independent of the hosts requests

Function Documentation

◆ LUCON_ConnectionSetReadCallback()

LuconResult LUCON_ConnectionSetReadCallback ( LuconHandle handle,
const LuconStringCallback callback )
extern

Set a callback function to be executed after the connection received data from the device.

In case of a streaming connection like RS232, the callback execution is delayed, until either the received data forms a valid Lucon message according to the protocol or until the internal receive-buffer is filled.

Remarks
The set function is called from the background thread which is listening for and processing incoming device messages. The callbacks execution will delay message processing and might cause timeouts. Do not call any other Lucon function within the event handler, as will always timeout or might deadlock.
Parameters
handleA handle to a connection
callbackPointer to the callback function to be used. NULL for deregistration
Returns

◆ LUCON_ConnectionSetWriteCallback()

LuconResult LUCON_ConnectionSetWriteCallback ( LuconHandle handle,
const LuconStringCallback callback )
extern

Set a callback function to be executed after data was sent over the connection given by handle.

Remarks
The set function is called from the background thread which is listening for and processing incoming device messages. The callbacks execution will delay message processing and might cause timeouts. Do not call any other Lucon function within the event handler, as will always timeout or might deadlock.
Parameters
handleA handle to a connection
callbackPointer to the callback function to be used. NULL for deregistration.
Returns