kdriveExpress SDK 23.2.0
kdrive_express_event.h File Reference

Go to the source code of this file.

Macros

#define KDRIVE_EVENT_ERROR   (0x0000)
 The error signal is emitted when an error was occurred. More...
 
#define KDRIVE_EVENT_OPENING   (0x0001)
 The opening signal is emitted when the port is about to be opened. More...
 
#define KDRIVE_EVENT_OPENED   (0x0002)
 The opened signal is emitted when the port was opened. More...
 
#define KDRIVE_EVENT_CLOSING   (0x0003)
 The closing signal is emitted when the port is about to be closed. More...
 
#define KDRIVE_EVENT_CLOSED   (0x0004)
 The closed signal is emitted when the port was closed. More...
 
#define KDRIVE_EVENT_TERMINATED   (0x0005)
 The terminated signal is emitted when the port was closed (internally) on error. More...
 
#define KDRIVE_EVENT_KNX_BUS_CONNECTED   (0x0006)
 The knx bus connected signal is emitted when the KNX bus was connected. More...
 
#define KDRIVE_EVENT_KNX_BUS_DISCONNECTED   (0x0007)
 The knx bus disconnected signal is emitted when the KNX bus was disconnected. More...
 
#define KDRIVE_EVENT_LOCAL_DEVICE_RESET   (0x0008)
 The local device reset signal is emitted when a KNX reset.ind was received. More...
 
#define KDRIVE_EVENT_TELEGRAM_INDICATION   (0x0009) /*! A telegram was received from the bus */
 
#define KDRIVE_EVENT_TELEGRAM_CONFIRM   (0x000A) /*! A L_Data_Confirm indication was received after sending a telegram */
 
#define KDRIVE_EVENT_TELEGRAM_CONFIRM_TIMEOUT   (0x000B) /*! A L_Data_Confirm indication was not received after sending a telegram */
 
#define KDRIVE_EVENT_INTERNAL_01   (0x000C) /*! Reserved for internal use */
 

Typedefs

typedef void(* kdrive_event_callback) (int32_t ap, uint32_t e, void *user_data)
 Event Callback function type (pointer to function definition) More...
 

Functions

kdriveExpress_API error_t kdrive_set_event_callback (int32_t ap, kdrive_event_callback c, void *user_data)
 Sets the event callback, for a specific access port. More...
 

Macro Definition Documentation

◆ KDRIVE_EVENT_CLOSED

#define KDRIVE_EVENT_CLOSED   (0x0004)

The closed signal is emitted when the port was closed.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_CLOSING

#define KDRIVE_EVENT_CLOSING   (0x0003)

The closing signal is emitted when the port is about to be closed.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_ERROR

#define KDRIVE_EVENT_ERROR   (0x0000)

The error signal is emitted when an error was occurred.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_INTERNAL_01

#define KDRIVE_EVENT_INTERNAL_01   (0x000C) /*! Reserved for internal use */

◆ KDRIVE_EVENT_KNX_BUS_CONNECTED

#define KDRIVE_EVENT_KNX_BUS_CONNECTED   (0x0006)

The knx bus connected signal is emitted when the KNX bus was connected.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_KNX_BUS_DISCONNECTED

#define KDRIVE_EVENT_KNX_BUS_DISCONNECTED   (0x0007)

The knx bus disconnected signal is emitted when the KNX bus was disconnected.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_LOCAL_DEVICE_RESET

#define KDRIVE_EVENT_LOCAL_DEVICE_RESET   (0x0008)

The local device reset signal is emitted when a KNX reset.ind was received.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_OPENED

#define KDRIVE_EVENT_OPENED   (0x0002)

The opened signal is emitted when the port was opened.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_OPENING

#define KDRIVE_EVENT_OPENING   (0x0001)

The opening signal is emitted when the port is about to be opened.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ KDRIVE_EVENT_TELEGRAM_CONFIRM

#define KDRIVE_EVENT_TELEGRAM_CONFIRM   (0x000A) /*! A L_Data_Confirm indication was received after sending a telegram */

◆ KDRIVE_EVENT_TELEGRAM_CONFIRM_TIMEOUT

#define KDRIVE_EVENT_TELEGRAM_CONFIRM_TIMEOUT   (0x000B) /*! A L_Data_Confirm indication was not received after sending a telegram */

◆ KDRIVE_EVENT_TELEGRAM_INDICATION

#define KDRIVE_EVENT_TELEGRAM_INDICATION   (0x0009) /*! A telegram was received from the bus */

◆ KDRIVE_EVENT_TERMINATED

#define KDRIVE_EVENT_TERMINATED   (0x0005)

The terminated signal is emitted when the port was closed (internally) on error.

Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

Typedef Documentation

◆ kdrive_event_callback

typedef void(* kdrive_event_callback) (int32_t ap, uint32_t e, void *user_data)

Event Callback function type (pointer to function definition)

See also
kdrive_set_event_callback
Parameters
[in]apthe access port descriptor
[in]eholds the event
[in]user_datapointer to user data or NULL

Function Documentation

◆ kdrive_set_event_callback()

kdriveExpress_API error_t kdrive_set_event_callback ( int32_t  ap,
kdrive_event_callback  c,
void *  user_data 
)

Sets the event callback, for a specific access port.

This callback function will be called when an event occurred by the Access Port. A notification thread is used internally so this callback will be in the context of the notification thread (and not the main thread). That is, care should be taken when calling out from the callback. There can only be one callback per access port. To remove the callback add an empty callback (0).

Parameters
[in]apthe access port descriptor
[in]cthe event callback pointer to function
[in]user_data(optional) pointer to user data
Examples
kdrive_express_data_secure.c, kdrive_express_ip_tunneling.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.