kdriveExpress SDK 22.1.1
kdriveExpress Access API

Data Structures

struct  usb_dev_t
 Structure holding usb device information. More...
 
struct  ip_tunn_slot_info_t
 Structure holding ip tunnling slot information. More...
 
struct  ip_tunn_dev_t
 Structure holding ip tunneling device information. More...
 
struct  ip_rout_info_t
 Structure holding ip routing information. More...
 

Typedefs

typedef struct usb_dev_t usb_dev_t
 Structure holding usb device information. More...
 
typedef struct ip_tunn_slot_info_t ip_tunn_slot_info_t
 Structure holding ip tunnling slot information. More...
 
typedef struct ip_tunn_dev_t ip_tunn_dev_t
 Structure holding ip tunneling device information. More...
 
typedef struct ip_rout_info_t ip_rout_info_t
 Structure holding ip routing information. More...
 
typedef void(* kdrive_ap_telegram_callback) (const uint8_t telegram[], uint32_t telegram_len, void *user_data)
 Callback function type (pointer to function definition) More...
 
typedef void(* kdrive_ap_packet_trace_callback) (const uint8_t telegram[], uint32_t telegram_len, int32_t direction, void *user_data)
 Packet Trace callback function type (pointer to function definition) More...
 

Functions

kdriveExpress_API int32_t kdrive_ap_create (void)
 Creates an internal AccessPort interface This should be the first function called when working with the access library. More...
 
kdriveExpress_API bool_t kdrive_ap_release (int32_t ap)
 Releases the AccessPort interface. More...
 
kdriveExpress_API error_t kdrive_ap_set_keyring (int32_t ap, int32_t keyring)
 Sets the used knx keyring project. More...
 
kdriveExpress_API uint32_t kdrive_ap_enum_usb (int32_t ap)
 Scan for all KNX USB Interface devices. More...
 
kdriveExpress_API error_t kdrive_ap_enum_usb_ex (usb_dev_t items[], uint32_t *items_length)
 Scan for all KNX USB Interface devices. More...
 
kdriveExpress_API error_t kdrive_ap_only_enum_usb (usb_dev_t items[], uint32_t *items_length)
 Scan for all KNX USB Interface devices. More...
 
kdriveExpress_API error_t kdrive_ap_open_usb (int32_t ap, uint32_t iface_index)
 Opens a connection to a KNX USB Interface device iface_index should be in the range 0..iface_count-1 where iface_count is > 0. More...
 
kdriveExpress_API error_t kdrive_ap_enum_ip_tunn (int32_t ap, ip_tunn_dev_t items[], uint32_t *items_length)
 Scans for all KNX IP Tunneling Interface devices The items array must exist (should be pre-allocated by the user). More...
 
kdriveExpress_API error_t kdrive_ap_read_ip_tunn_device_info (int32_t ap, const char *ip_address, uint16_t port, const char *iface_address, ip_tunn_dev_t *device_info)
 Gets the information for one specific tunneling device. More...
 
kdriveExpress_API error_t kdrive_ap_open_ip_tunn (int32_t ap, const char *ip_address, uint16_t port, const char *iface_address)
 Opens a connection to a KNX IP Tunneling Interface device on a specific network interface or default network interface. More...
 
kdriveExpress_API error_t kdrive_ap_open_ip_tunn_nat (int32_t ap, const char *ip_address, uint16_t port, const char *iface_address)
 Opens a connection to a KNX IP Tunneling Interface device on a specific network interface in Network Address Translation (NAT) mode. More...
 
kdriveExpress_API error_t kdrive_ap_open_ip (int32_t ap, const char *ip_address)
 
kdriveExpress_API error_t kdrive_ap_open_ip_ex (int32_t ap, const char *ip_address, const char *iface_address)
 
kdriveExpress_API error_t kdrive_ap_open_ip_nat (int32_t ap, const char *ip_address, const char *iface_address)
 
kdriveExpress_API error_t kdrive_ap_is_ip_tunn_secure (int32_t ap, bool_t *secured)
 Only has works for knxnet ip tunneling ports, returns if security is enabled or not. More...
 
kdriveExpress_API error_t kdrive_ap_set_ip_tunn_auth_code (int32_t ap, const char *authentication_code)
 Sets the optional authentication code for the KNXnet/IP tunneling connection. More...
 
kdriveExpress_API error_t kdrive_ap_set_ip_tunn_credentials (int32_t ap, uint8_t user_id, const char *password)
 Sets the user id and the security password for the KNXnet/IP tunneling connection. More...
 
kdriveExpress_API error_t kdrive_ap_set_ip_tunn_user_id (int32_t ap, uint8_t user_id)
 Sets the security user id for the KNXnet/IP tunneling connection. More...
 
kdriveExpress_API error_t kdrive_ap_get_ip_tunn_user_id (int32_t ap, uint8_t *user_id)
 Gets the security user id for the KNXnet/IP tunneling connection. More...
 
kdriveExpress_API error_t kdrive_ap_set_ip_tunn_requested_ia (int32_t ap, uint16_t address)
 Sets the (optional) requested individual address This function is used for KNXnet/IP v2 devices. More...
 
kdriveExpress_API error_t kdrive_ap_enum_ip_rout (int32_t ap, ip_rout_info_t items[], uint32_t *items_length)
 Scans for all KNX IP Routing devices The items array must exist (should be pre-allocated by the user). More...
 
kdriveExpress_API error_t kdrive_ap_open_ip_rout (int32_t ap, const char *multicast_address, const char *iface_address, bool_t secured)
 Creates an KNXnet/IP Routing access port. More...
 
kdriveExpress_API error_t kdrive_ap_is_ip_rout_secure (int32_t ap, bool_t *secured)
 Only has works for knxnet ip routing ports, returns if security is enabled or not. More...
 
kdriveExpress_API error_t kdrive_ap_set_ip_rout_backbone_key (int32_t ap, const char *key)
 Sets the backbone key for the KNXnet/IP routing connection. More...
 
kdriveExpress_API error_t kdrive_ap_open_serial_ft12 (int32_t ap, const char *serial_device)
 Opens a connection to a KNX FT1.2 serial interface. More...
 
kdriveExpress_API error_t kdrive_ap_open_tiny_serial (int32_t ap, const char *serial_device)
 Opens a connection to the KNX Tiny Serial Interface 810. More...
 
kdriveExpress_API error_t kdrive_ap_close (int32_t ap)
 Closes the access port If the access port is not open nothing happens. More...
 
kdriveExpress_API bool_t kdrive_ap_is_open (int32_t ap)
 Returns whether the access port is open. More...
 
kdriveExpress_API error_t kdrive_ap_send (int32_t ap, const uint8_t telegram[], uint32_t telegram_len)
 Sends a KNX Telegram on the Access Port. More...
 
kdriveExpress_API error_t kdrive_ap_group_write (int32_t ap, uint16_t address, const uint8_t *value, uint32_t bits)
 Sends a GroupValue_Write Telegram The length is specified in bits to enable values less than one byte to be sent (i.e. More...
 
kdriveExpress_API error_t kdrive_ap_group_read (int32_t ap, uint16_t address)
 Sends a GroupValue_Read Telegram on the Access Port This function does not wait for a GroupValue_Response telegram. More...
 
kdriveExpress_API error_t kdrive_ap_group_response (int32_t ap, uint16_t address, const uint8_t *value, uint32_t bits)
 Sends a GroupValue_Response Telegram. More...
 
kdriveExpress_API uint32_t kdrive_ap_read_group_object (int32_t ap, uint16_t address, uint8_t telegram[], uint32_t telegram_len, uint32_t timeout)
 Sends a GroupValue_Read Telegram on the Access Port and waits for a GroupValue_Response indication telegram (with a matching Group Address). More...
 
kdriveExpress_API error_t kdrive_ap_enable_queue (int32_t ap, bool_t enabled)
 Enables/Disables the receive queue for the access port. More...
 
kdriveExpress_API uint32_t kdrive_ap_receive (int32_t ap, uint8_t telegram[], uint32_t telegram_len, uint32_t timeout)
 Waits for an inbound KNX telegram and (if received) copies the data into the telegram buffer. More...
 
kdriveExpress_API error_t kdrive_ap_register_telegram_callback (int32_t ap, kdrive_ap_telegram_callback c, void *user_data, uint32_t *key)
 Registers a callback function. More...
 
kdriveExpress_API error_t kdrive_ap_register_sec_telegram_callback (int32_t ap, kdrive_ap_telegram_callback c, void *user_data, uint32_t *key)
 Registers a callback function. More...
 
kdriveExpress_API error_t kdrive_ap_remove_telegram_callback (int32_t ap, uint32_t key)
 Removes (de-registers) a telegram callback. More...
 
kdriveExpress_API error_t kdrive_ap_get_dest (const uint8_t telegram[], uint32_t telegram_len, uint16_t *address)
 Extracts the Destination Address from the Telegram. More...
 
kdriveExpress_API error_t kdrive_ap_get_src (const uint8_t telegram[], uint32_t telegram_len, uint16_t *address)
 Extracts the Source Address from the Telegram. More...
 
kdriveExpress_API error_t kdrive_ap_get_apci (const uint8_t telegram[], uint32_t telegram_len, uint16_t *apci)
 Extracts the APCI from the Telegram. More...
 
kdriveExpress_API error_t kdrive_ap_get_message_code (const uint8_t telegram[], uint32_t telegram_len, uint8_t *message_code)
 Extracts the Message Code from the Telegram. More...
 
kdriveExpress_API error_t kdrive_ap_get_serial_number (const uint8_t telegram[], uint32_t telegram_len, uint8_t sn[KDRIVE_SN_LEN])
 Extracts the Serial Number from the Additional Info (if available) This is extracted from the Additional Info field i.e. More...
 
kdriveExpress_API bool_t kdrive_ap_is_group (const uint8_t telegram[], uint32_t telegram_len)
 Determines if the specified telegram is a GroupValue telegram This is, one of GroupValue_Read, GroupValue_Write or GroupValue_Response. More...
 
kdriveExpress_API bool_t kdrive_ap_is_group_write (const uint8_t telegram[], uint32_t telegram_len)
 Determines if the specified telegram is a GroupValue_Write telegram. More...
 
kdriveExpress_API bool_t kdrive_ap_is_group_read (const uint8_t telegram[], uint32_t telegram_len)
 Determines if the specified telegram is a GroupValue_Read telegram. More...
 
kdriveExpress_API bool_t kdrive_ap_is_group_response (const uint8_t telegram[], uint32_t telegram_len)
 Determines if the specified telegram is a GroupValue_Response telegram. More...
 
kdriveExpress_API error_t kdrive_ap_get_group_data (const uint8_t telegram[], uint32_t telegram_len, uint8_t *data, uint32_t *data_len)
 Extracts the Group Value data from the KNX telegram. More...
 
kdriveExpress_API error_t kdrive_ap_is_compressed_group_data (const uint8_t telegram[], uint32_t telegram_len, bool_t *is_commpressed)
 Determines if the group value size is compressed (6 bits or less). More...
 
kdriveExpress_API error_t kdrive_ap_set_data_sec (int32_t ap, enum data_sec_t dataSec)
 Set the Data Security of the access point. More...
 
kdriveExpress_API error_t kdrive_ap_get_data_sec (int32_t ap, enum data_sec_t *dataSec)
 Get the Data Security usage of the access point. More...
 
kdriveExpress_API error_t kdrive_ap_set_data_sec_own_seq_num (int32_t ap, const uint8_t seq_num[6])
 Set the own sending sequence number. More...
 
kdriveExpress_API error_t kdrive_ap_set_data_sec_device_seq_num (int32_t ap, uint16_t address, const uint8_t seq_num[6])
 Set the sequence number of a device. More...
 
kdriveExpress_API bool_t kdrive_ap_is_data_sec (const uint8_t telegram[], uint32_t telegram_len)
 Check if the telegram is a data secure one. More...
 
kdriveExpress_API error_t kdrive_ap_get_layer (int32_t ap, uint16_t *layer)
 Gets the Layer of the Local Device (KNX Interface Device) The default value is Link Layer. More...
 
kdriveExpress_API error_t kdrive_ap_set_layer (int32_t ap, uint16_t layer)
 Sets the Layer of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_get_ind_addr (int32_t ap, uint16_t *address)
 Gets the Individual Address of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_set_ind_addr (int32_t ap, uint16_t address)
 Sets the Individual Address of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_get_rf_domain_addr (int32_t ap, uint8_t da[KDRIVE_DA_LEN])
 Gets the Domain Address of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_set_rf_domain_addr (int32_t ap, const uint8_t da[KDRIVE_DA_LEN])
 Sets the Domain Address of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_get_serial_no (int32_t ap, uint8_t sn[KDRIVE_SN_LEN])
 Gets the Serial Number of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_set_serial_no (int32_t ap, const uint8_t sn[KDRIVE_SN_LEN])
 Sets the Serial Number of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_get_tunnel_ind_addr (int32_t ap, uint16_t *address)
 Gets the used Individual Address of the tunnel connection (KNX Interface Device). More...
 
kdriveExpress_API error_t kdrive_ap_set_tunnel_ind_addr (int32_t ap, uint16_t address)
 Sets the used Individual Address of the tunnel connection (KNX Interface Device). More...
 
kdriveExpress_API error_t kdrive_ap_get_additional_ind_addr (int32_t ap, uint16_t addresses[], uint32_t *addresses_len)
 Gets the Additional Individual Addresses of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_set_additional_ind_addr (int32_t ap, const uint16_t addresses[], uint16_t addresses_len)
 Sets the Additional Individual Addresses of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_get_filter_dest_addr (int32_t ap, bool_t *is_enabled)
 Gets the destination individual address filter setting. More...
 
kdriveExpress_API error_t kdrive_ap_set_filter_dest_addr (int32_t ap, bool_t enable)
 Enable or disable filter destination individual address for L-Data.ind telegrams. More...
 
kdriveExpress_API error_t kdrive_ap_get_filter_rf_domain_addr (int32_t ap, bool_t *is_enabled)
 Gets the rf domain adrress filter setting. More...
 
kdriveExpress_API error_t kdrive_ap_set_filter_rf_domain_addr (int32_t ap, bool_t enable)
 Enable or disable filter rf domain address for L-Data.ind telegrams. More...
 
kdriveExpress_API error_t kdrive_ap_get_bus_state (int32_t ap, bool_t use_cache, uint32_t *bus_state)
 Reads the current bus state from the interface (use_cache == false) or gets the last status of the knx bus from the cache (use_cache == true). More...
 
kdriveExpress_API error_t kdrive_ap_get_max_apdu_length (int32_t ap, uint32_t *max_apdu_length)
 Gets the maximum supported apdu length of the Local Device (KNX Interface Device) More...
 
kdriveExpress_API error_t kdrive_ap_packet_trace_connect (int32_t ap)
 Starts the Packet Trace, for a specific access port. More...
 
kdriveExpress_API error_t kdrive_ap_packet_trace_disconnect (int32_t ap)
 Stops the Packet Trace. More...
 
kdriveExpress_API error_t kdrive_ap_set_packet_trace_callback (int32_t ap, kdrive_ap_packet_trace_callback c, void *user_data)
 Sets the packet trace callback function, for a specific access port. More...
 

Detailed Description

Typedef Documentation

◆ ip_rout_info_t

Structure holding ip routing information.

See also
kdrive_ap_enum_ip_rout

◆ ip_tunn_dev_t

typedef struct ip_tunn_dev_t ip_tunn_dev_t

Structure holding ip tunneling device information.

See also
kdrive_ap_enum_ip_tunn

◆ ip_tunn_slot_info_t

Structure holding ip tunnling slot information.

See also
ip_tunn_dev_t

◆ kdrive_ap_packet_trace_callback

typedef void(* kdrive_ap_packet_trace_callback) (const uint8_t telegram[], uint32_t telegram_len, int32_t direction, void *user_data)

Packet Trace callback function type (pointer to function definition)

See also
kdrive_ap_set_packet_trace_callback
Parameters
[in]telegramholds the received telegram, the buffer is temporary
[in]telegram_lenindicates the length of the telegram
[in]directionthe packet direction: KDRIVE_PACKET_DIR_TX (send) or KDRIVE_PACKET_DIR_RX (received)
[in]user_datapointer to user data or NULL

◆ kdrive_ap_telegram_callback

typedef void(* kdrive_ap_telegram_callback) (const uint8_t telegram[], uint32_t telegram_len, void *user_data)

Callback function type (pointer to function definition)

See also
kdrive_ap_register_telegram_callback
Parameters
[in]telegramholds the received telegram, the buffer is temporary
[in]telegram_lenindicates the length of the telegram
[in]user_datapointer to user data or NULL

◆ usb_dev_t

typedef struct usb_dev_t usb_dev_t

Structure holding usb device information.

See also
kdrive_ap_enum_usb_ex and kdrive_ap_only_enum_usb

Function Documentation

◆ kdrive_ap_close()

kdriveExpress_API error_t kdrive_ap_close ( int32_t  ap)

Closes the access port If the access port is not open nothing happens.

Parameters
[in]apthe access port descriptor
Examples
kdrive_express_dpt.c, kdrive_express_ip_routing.c, kdrive_express_ip_tunneling.c, kdrive_express_services.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ kdrive_ap_create()

kdriveExpress_API int32_t kdrive_ap_create ( void  )

Creates an internal AccessPort interface This should be the first function called when working with the access library.

It creates a unique access port descriptor which will be passed to all kdrive access functions. When finished, call kdrive_ap_release. If create fails the function returns KDRIVE_INVALID_DESCRIPTOR

Returns
access port descriptor if successful
Examples
kdrive_express_dpt.c, kdrive_express_ip_routing.c, kdrive_express_ip_routing_enumerate.c, kdrive_express_ip_tunneling.c, kdrive_express_ip_tunneling_enumerate.c, kdrive_express_services.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ kdrive_ap_enable_queue()

kdriveExpress_API error_t kdrive_ap_enable_queue ( int32_t  ap,
bool_t  enabled 
)

Enables/Disables the receive queue for the access port.

Parameters
[in]apthe access port descriptor
[in]enabledtrue enables the receive queue false disables the queue
Examples
kdrive_express_ip_tunneling.c.

◆ kdrive_ap_enum_ip_rout()

kdriveExpress_API error_t kdrive_ap_enum_ip_rout ( int32_t  ap,
ip_rout_info_t  items[],
uint32_t items_length 
)

Scans for all KNX IP Routing devices The items array must exist (should be pre-allocated by the user).

The max size of the array must be passed in as items_length. items_length will be updated to correspond to the length of the found devices. If the array is to small than only the possible values will returned.

Note
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor
[out]itemsthe array of routing information struct items with the found ip routing devices
[in,out]items_lengththe data array capacity (in) and actual length of the data array (out)
Examples
kdrive_express_ip_routing_enumerate.c.

◆ kdrive_ap_enum_ip_tunn()

kdriveExpress_API error_t kdrive_ap_enum_ip_tunn ( int32_t  ap,
ip_tunn_dev_t  items[],
uint32_t items_length 
)

Scans for all KNX IP Tunneling Interface devices The items array must exist (should be pre-allocated by the user).

The max size of the array must be passed in as items_length. items_length will be updated to correspond to the length of the found devices. If the array is to small than only the possible values will returned.

Parameters
[in]apthe access port descriptor
[out]itemsthe array of tunneling device struct items with the found ip tunning devices
[in,out]items_lengththe data array capacity (in) and actual length of the data array (out)
Examples
kdrive_express_ip_tunneling_enumerate.c.

◆ kdrive_ap_enum_usb()

kdriveExpress_API uint32_t kdrive_ap_enum_usb ( int32_t  ap)

Scan for all KNX USB Interface devices.

Parameters
[in]apthe access port descriptor
Returns
count of successfully enumerated interface devices
Examples
kdrive_express_dpt.c, and kdrive_express_services.c.

◆ kdrive_ap_enum_usb_ex()

kdriveExpress_API error_t kdrive_ap_enum_usb_ex ( usb_dev_t  items[],
uint32_t items_length 
)

Scan for all KNX USB Interface devices.

Note: This function also opens and closes a connection to usb interface to read some info e.g. media type, individual address etc. It also list only not already opened usb interfaces. If you do not need this additional informations you could use kdrive_ap_only_enum_usb.

The items array must exist (should be pre-allocated by the user). The max size of the array must be passed in as items_length. items_length will be updated to correspond to the length of the found devices. If the array is to small than only the possible values will returned.

Parameters
[out]itemsthe array of usb device struct items with the found usb devices
[in,out]items_lengththe data array capacity (in) and actual length of the data array (out)
Examples
kdrive_express_usb.c.

◆ kdrive_ap_get_additional_ind_addr()

kdriveExpress_API error_t kdrive_ap_get_additional_ind_addr ( int32_t  ap,
uint16_t  addresses[],
uint32_t addresses_len 
)

Gets the Additional Individual Addresses of the Local Device (KNX Interface Device)

Note
This function is only for tunneling access ports
Parameters
[in]apthe access port descriptor of a tunneling access port
[out]addressesthe array of additional individual addresses
[in,out]addresses_lenthe array capacity (in) and actual length of the array (out)
Examples
kdrive_express_tunnel_ind_addr.c.

◆ kdrive_ap_get_apci()

kdriveExpress_API error_t kdrive_ap_get_apci ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint16_t apci 
)

Extracts the APCI from the Telegram.

Parameters
[in]telegramthe the KNX telegram
[in]telegram_lenthe length of the KNX telegram
[out]apciAPCI

◆ kdrive_ap_get_bus_state()

kdriveExpress_API error_t kdrive_ap_get_bus_state ( int32_t  ap,
bool_t  use_cache,
uint32_t bus_state 
)

Reads the current bus state from the interface (use_cache == false) or gets the last status of the knx bus from the cache (use_cache == true).

Normally the interface inform the client when the bus state changed.

Note
This function is only for KNX USB interfaces.
Parameters
[in]apthe access port descriptor
[in]use_cacheread from interface (false) or use last known status (true)
[out]bus_statethe current knx bus state (KDRIVE_KNX_BUS_STATE_UNKNOWN, KDRIVE_KNX_BUS_STATE_DISCONNECTED or KDRIVE_KNX_BUS_STATE_CONNECTED)

◆ kdrive_ap_get_data_sec()

kdriveExpress_API error_t kdrive_ap_get_data_sec ( int32_t  ap,
enum data_sec_t dataSec 
)

Get the Data Security usage of the access point.

It can be: KDRIVE_ACCESS_DATA_SEC_OFF = 0x00 KDRIVE_ACCESS_DATA_SEC_ON = 0x01 KDRIVE_ACCESS_DATA_SEC_AUTO = 0xFF

Parameters
[in]apthe access port descriptor
[out]dataSeccurrent Data Security usage

◆ kdrive_ap_get_dest()

kdriveExpress_API error_t kdrive_ap_get_dest ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint16_t address 
)

Extracts the Destination Address from the Telegram.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
[out]addressthe destination address
Examples
kdrive_express_dpt.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_get_filter_dest_addr()

kdriveExpress_API error_t kdrive_ap_get_filter_dest_addr ( int32_t  ap,
bool_t is_enabled 
)

Gets the destination individual address filter setting.

The default is 1 (filter is enabled).

Note
This function is only for KNXnet/IP Routing or Weinzierl cEMI FT1.2 interfaces.
Parameters
[in]apthe access port descriptor of a FT1.2 or routing access port
[out]is_enabled1 if filter is enabled or 0 otherwise
See also
kdrive_ap_set_filter_dest_addr

◆ kdrive_ap_get_filter_rf_domain_addr()

kdriveExpress_API error_t kdrive_ap_get_filter_rf_domain_addr ( int32_t  ap,
bool_t is_enabled 
)

Gets the rf domain adrress filter setting.

The default is 1 (filter is enabled).

Note
This function is only for RF interfaces.
Parameters
[in]apthe access port descriptor
[out]is_enabled1 if filter is enabled or 0 otherwise
See also
kdrive_ap_set_filter_rf_domain_addr

◆ kdrive_ap_get_group_data()

kdriveExpress_API error_t kdrive_ap_get_group_data ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint8_t data,
uint32_t data_len 
)

Extracts the Group Value data from the KNX telegram.

If the telegram is not a GroupValue_Write or GroupValue_Response telegram an Invalid Telegram error is returned. The data buffer should be large enough to hold the data from the telegram. This length is checked against the length held in the telegram and if insufficient an Access Port Error is returned (Buffer Overflow).

Parameters
[in]telegramthe KNX Telegram (Group Value Telegram)
[in]telegram_lenthe length of the telegram
[out]dataThe data buffer
[in,out]data_lenthe data buffer capacity (in) and actual length of the data buffer (out)
Examples
kdrive_express_dpt.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_get_ind_addr()

kdriveExpress_API error_t kdrive_ap_get_ind_addr ( int32_t  ap,
uint16_t address 
)

Gets the Individual Address of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[out]addressthe individual address of the local device

◆ kdrive_ap_get_ip_tunn_user_id()

kdriveExpress_API error_t kdrive_ap_get_ip_tunn_user_id ( int32_t  ap,
uint8_t user_id 
)

Gets the security user id for the KNXnet/IP tunneling connection.

Note
This function is only for tunneling access ports
Parameters
[in]apthe access port descriptor
[out]user_idthe security user id of the local device

◆ kdrive_ap_get_layer()

kdriveExpress_API error_t kdrive_ap_get_layer ( int32_t  ap,
uint16_t layer 
)

Gets the Layer of the Local Device (KNX Interface Device) The default value is Link Layer.

Parameters
[in]apthe access port descriptor
[out]layerthe KNX layer of the local device
See also
kdrive_ap_set_layer

◆ kdrive_ap_get_max_apdu_length()

kdriveExpress_API error_t kdrive_ap_get_max_apdu_length ( int32_t  ap,
uint32_t max_apdu_length 
)

Gets the maximum supported apdu length of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[out]max_apdu_lengththe maximum apdu length from the interface

◆ kdrive_ap_get_message_code()

kdriveExpress_API error_t kdrive_ap_get_message_code ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint8_t message_code 
)

Extracts the Message Code from the Telegram.

See also
KDRIVE_CEMI_L_DATA_REQ
KDRIVE_CEMI_L_DATA_CON
KDRIVE_CEMI_L_DATA_IND
Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
[out]message_codethe Message Code
Examples
kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_get_rf_domain_addr()

kdriveExpress_API error_t kdrive_ap_get_rf_domain_addr ( int32_t  ap,
uint8_t  da[KDRIVE_DA_LEN] 
)

Gets the Domain Address of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[out]dathe domain address of the local device

◆ kdrive_ap_get_serial_no()

kdriveExpress_API error_t kdrive_ap_get_serial_no ( int32_t  ap,
uint8_t  sn[KDRIVE_SN_LEN] 
)

Gets the Serial Number of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[out]snthe serial number of the local device

◆ kdrive_ap_get_serial_number()

kdriveExpress_API error_t kdrive_ap_get_serial_number ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint8_t  sn[KDRIVE_SN_LEN] 
)

Extracts the Serial Number from the Additional Info (if available) This is extracted from the Additional Info field i.e.

for KNX-RF telegrams

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
[out]snthe Serial Number
Examples
kdrive_express_usb.c.

◆ kdrive_ap_get_src()

kdriveExpress_API error_t kdrive_ap_get_src ( const uint8_t  telegram[],
uint32_t  telegram_len,
uint16_t address 
)

Extracts the Source Address from the Telegram.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
[out]addressthe source address

◆ kdrive_ap_get_tunnel_ind_addr()

kdriveExpress_API error_t kdrive_ap_get_tunnel_ind_addr ( int32_t  ap,
uint16_t address 
)

Gets the used Individual Address of the tunnel connection (KNX Interface Device).

This address is the device address PID_KNX_INDIVIDUAL_ADDRESS or a additional individual address PID_ADDITIONAL_INDIVIDUAL_ADDRESSES (normal case). The interface communicates it at the connecting procedure. So if somebody changed the additional individual addresses than this value is not up to data!

Note
This function is only for tunneling access ports.
Parameters
[in]apthe access port descriptor of a tunneling access port
[out]addressthe used individual address for the tunnel
Examples
kdrive_express_tunnel_ind_addr.c.

◆ kdrive_ap_group_read()

kdriveExpress_API error_t kdrive_ap_group_read ( int32_t  ap,
uint16_t  address 
)

Sends a GroupValue_Read Telegram on the Access Port This function does not wait for a GroupValue_Response telegram.

Parameters
[in]apthe access port descriptor
[in]addressis the Group Address (destination)

◆ kdrive_ap_group_response()

kdriveExpress_API error_t kdrive_ap_group_response ( int32_t  ap,
uint16_t  address,
const uint8_t value,
uint32_t  bits 
)

Sends a GroupValue_Response Telegram.

See also
kdriveGroupValueWrite
Parameters
[in]apthe access port descriptor
[in]addressis the Group Address (destination)
[in]valueis the datapoint value to be sent
[in]bitsrespresents the length of the datapoint value, in bits

◆ kdrive_ap_group_write()

kdriveExpress_API error_t kdrive_ap_group_write ( int32_t  ap,
uint16_t  address,
const uint8_t value,
uint32_t  bits 
)

Sends a GroupValue_Write Telegram The length is specified in bits to enable values less than one byte to be sent (i.e.

1 bit boolean) etc.

Parameters
[in]apthe access port descriptor
[in]addressis the Group Address (destination)
[in]valueis the datapoint value to be sent
[in]bitsrespresents the length of the datapoint value, in bits
Examples
kdrive_express_dpt.c, kdrive_express_ip_routing.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_is_compressed_group_data()

kdriveExpress_API error_t kdrive_ap_is_compressed_group_data ( const uint8_t  telegram[],
uint32_t  telegram_len,
bool_t is_commpressed 
)

Determines if the group value size is compressed (6 bits or less).

If the telegram is not a GroupValue_Write or GroupValue_Response telegram an Invalid Telegram error is returned.

Parameters
[in]telegramthe KNX Telegram (Group Value Telegram)
[in]telegram_lenthe length of the telegram
[out]is_commpressed1 : compressed (6 bits or less) or 0 : not compressed (>= 1 byte)

◆ kdrive_ap_is_data_sec()

kdriveExpress_API bool_t kdrive_ap_is_data_sec ( const uint8_t  telegram[],
uint32_t  telegram_len 
)

Check if the telegram is a data secure one.

Parameters
[in]telegramthe KNX Telegram
[in]telegram_lenthe length of the telegram

◆ kdrive_ap_is_group()

kdriveExpress_API bool_t kdrive_ap_is_group ( const uint8_t  telegram[],
uint32_t  telegram_len 
)

Determines if the specified telegram is a GroupValue telegram This is, one of GroupValue_Read, GroupValue_Write or GroupValue_Response.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
Returns
true if a Group Telegram false otherwise

◆ kdrive_ap_is_group_read()

kdriveExpress_API bool_t kdrive_ap_is_group_read ( const uint8_t  telegram[],
uint32_t  telegram_len 
)

Determines if the specified telegram is a GroupValue_Read telegram.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
Returns
true if a GroupValue_Read telegram false otherwise

◆ kdrive_ap_is_group_response()

kdriveExpress_API bool_t kdrive_ap_is_group_response ( const uint8_t  telegram[],
uint32_t  telegram_len 
)

Determines if the specified telegram is a GroupValue_Response telegram.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
Returns
true if a GroupValue_Response telegram false otherwise
Examples
kdrive_express_ip_tunneling.c.

◆ kdrive_ap_is_group_write()

kdriveExpress_API bool_t kdrive_ap_is_group_write ( const uint8_t  telegram[],
uint32_t  telegram_len 
)

Determines if the specified telegram is a GroupValue_Write telegram.

Parameters
[in]telegramthe KNX telegram
[in]telegram_lenthe length of the KNX telegram
Returns
true if a GroupValue_Write telegram false otherwise
Examples
kdrive_express_dpt.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_is_ip_rout_secure()

kdriveExpress_API error_t kdrive_ap_is_ip_rout_secure ( int32_t  ap,
bool_t secured 
)

Only has works for knxnet ip routing ports, returns if security is enabled or not.

Note
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe (routing) access port descriptor
[out]securedis security enabled or disabled for routing port

◆ kdrive_ap_is_ip_tunn_secure()

kdriveExpress_API error_t kdrive_ap_is_ip_tunn_secure ( int32_t  ap,
bool_t secured 
)

Only has works for knxnet ip tunneling ports, returns if security is enabled or not.

Parameters
[in]apthe (tunneling) access port descriptor
[out]securedis security used for tunning port

◆ kdrive_ap_is_open()

kdriveExpress_API bool_t kdrive_ap_is_open ( int32_t  ap)

Returns whether the access port is open.

Parameters
[in]apthe access port descriptor
Returns
1 if the access port is open, 0 otherwise

◆ kdrive_ap_only_enum_usb()

kdriveExpress_API error_t kdrive_ap_only_enum_usb ( usb_dev_t  items[],
uint32_t items_length 
)

Scan for all KNX USB Interface devices.

This function does not open a connection to the usb interface so also already opened devices are seen but some information like media type and individual address is not available (set to 0). When you need this information see kdrive_ap_enum_usb_ex.

Note: usb_dev_t.ind_addr and usb_dev_t.media_tytes are not read so the are not valid!

The items array must exist (should be pre-allocated by the user). The max size of the array must be passed in as items_length. items_length will be updated to correspond to the length of the found devices. If the array is to small than only the possible values will returned.

Parameters
[out]itemsthe array of usb device struct items with the found usb devices
[in,out]items_lengththe data array capacity (in) and actual length of the data array (out)

◆ kdrive_ap_open_ip()

kdriveExpress_API error_t kdrive_ap_open_ip ( int32_t  ap,
const char *  ip_address 
)
Deprecated:
Use kdrive_ap_open_ip_tunn instead. Call it with iface_address=0.

Opens a connection to a KNX IP Tunneling Interface device on default network interface

See also
kdrive_ap_open_ip_tunn
kdrive_ap_open_ip_tunn_nat
Parameters
[in]apthe access port descriptor
[in]ip_addressThe IP Address and (optional) the port which is separated by a colon. When the port is not set then the default port for KNXnet/IP (3671) is used e.g. "192.168.1.47" "192.168.1.47:3671"

◆ kdrive_ap_open_ip_ex()

kdriveExpress_API error_t kdrive_ap_open_ip_ex ( int32_t  ap,
const char *  ip_address,
const char *  iface_address 
)
Deprecated:
Was renamed to kdrive_ap_open_ip_tunn

Opens a connection to a KNX IP Tunneling Interface device on a specific network interface or default network interface

See also
kdrive_ap_open_ip_tunn
Parameters
[in]apthe access port descriptor
[in]ip_addressThe IP Address and (optional) the port which is separated by a colon. When the port is not set then the default port for KNXnet/IP (3671) is used e.g. "192.168.1.47" "192.168.1.47:3671"
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used

◆ kdrive_ap_open_ip_nat()

kdriveExpress_API error_t kdrive_ap_open_ip_nat ( int32_t  ap,
const char *  ip_address,
const char *  iface_address 
)
Deprecated:
Was renamed to kdrive_ap_open_ip_tunn_nat

Opens a connection to a KNX IP Tunneling Interface device on a specific network interface in Network Address Translation (NAT) mode.

See also
kdrive_ap_open_ip_tunn_nat
Parameters
[in]apthe access port descriptor
[in]ip_addressThe IP Address and (optional) the port which is separated by a colon. When the port is not set then the default port for KNXnet/IP (3671) is used e.g. "192.168.1.47" "192.168.1.47:3671"
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used

◆ kdrive_ap_open_ip_rout()

kdriveExpress_API error_t kdrive_ap_open_ip_rout ( int32_t  ap,
const char *  multicast_address,
const char *  iface_address,
bool_t  secured 
)

Creates an KNXnet/IP Routing access port.

When is_secure is true then backbone key must set before open.

See also
kdrive_ap_set_ip_rout_backbone_key

or via keyring file

See also
kdrive_ap_set_keyring
Note
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor
[in]multicast_address(optional) The Multicast IP Address When the multicast_address = 0 (null pointer) then the default KNXnet/IP multicast address is used (224.0.23.12)
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used
[in]securedwith (1) or without encrypted comunication (0)
Examples
kdrive_express_ip_routing.c.

◆ kdrive_ap_open_ip_tunn()

kdriveExpress_API error_t kdrive_ap_open_ip_tunn ( int32_t  ap,
const char *  ip_address,
uint16_t  port,
const char *  iface_address 
)

Opens a connection to a KNX IP Tunneling Interface device on a specific network interface or default network interface.

Interfaces which supports this protocol: all KNX conform KNXnet/IP Tunneling interfaces e.g. Weinzierl KNX IP Interface 730/731/732 e.g. Weinzierl KNX IP Interface 740 Wireless e.g. Weinzierl KNX IP Router 750/751/752 e.g. Weinzierl KNX IP LineMaster 760/762 e.g. Weinzierl KNX IP BAOS 770/771/772/773/774/777

When a secure KNX IP Tunneling device is used then user id, password and authentication code (optional) must set before open.

See also
kdrive_ap_set_ip_tunn_credentials
kdrive_ap_set_authentication_code

or via keyring file

See also
kdrive_ap_set_keyring
kdrive_ap_set_ip_tunn_user_id

For use a given tunneling individual address set it with

See also
kdrive_ap_set_ip_tunn_requested_ia before open.
kdrive_ap_open_ip_tunn_nat
Parameters
[in]apthe access port descriptor
[in]ip_addressthe IP Address
[in]port(optional) the server port. When the port is 0 then the default port for KNXnet/IP (3671) is used
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used
Examples
kdrive_express_ip_tunneling.c, and kdrive_express_tunnel_ind_addr.c.

◆ kdrive_ap_open_ip_tunn_nat()

kdriveExpress_API error_t kdrive_ap_open_ip_tunn_nat ( int32_t  ap,
const char *  ip_address,
uint16_t  port,
const char *  iface_address 
)

Opens a connection to a KNX IP Tunneling Interface device on a specific network interface in Network Address Translation (NAT) mode.

See also
kdrive_ap_open_ip_tunn
Parameters
[in]apthe access port descriptor
[in]ip_addressthe IP Address
[in]port(optional) the server port. When the port is 0 then the default port for KNXnet/IP (3671) is used
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used

◆ kdrive_ap_open_serial_ft12()

kdriveExpress_API error_t kdrive_ap_open_serial_ft12 ( int32_t  ap,
const char *  serial_device 
)

Opens a connection to a KNX FT1.2 serial interface.

Interfaces which supports this protocol: all KNX conform FT1.2 serial interfaces e.g. Weinzierl KNX Serial BAOS 870 e.g. Weinzierl KNX BAOS Module 820/822/830/838

Parameters
[in]apthe access port descriptor
[in]serial_deviceis the device where the interface is attached, i.e. COM1 or /dev/ttyS0 etc

◆ kdrive_ap_open_tiny_serial()

kdriveExpress_API error_t kdrive_ap_open_tiny_serial ( int32_t  ap,
const char *  serial_device 
)

Opens a connection to the KNX Tiny Serial Interface 810.

This is a modified TP-UART Protocol without real-time requirements to the host

Interfaces which supports this protocol: Weinzierl KNX Tiny Serial Interface 810

Parameters
[in]apthe access port descriptor
[in]serial_deviceis the device where the interface is attached, i.e. COM1 or /dev/ttyS0 etc

◆ kdrive_ap_open_usb()

kdriveExpress_API error_t kdrive_ap_open_usb ( int32_t  ap,
uint32_t  iface_index 
)

Opens a connection to a KNX USB Interface device iface_index should be in the range 0..iface_count-1 where iface_count is > 0.

Interfaces which supports this protocol: all KNX conform USB interfaces e.g. Weinzierl KNX USB Interface 310/311/320/330

See also
kdriveEnumerateUSB
Parameters
[in]apthe access port descriptor
[in]iface_indexthe interface device enumeration index
Examples
kdrive_express_dpt.c, kdrive_express_services.c, and kdrive_express_usb.c.

◆ kdrive_ap_packet_trace_connect()

kdriveExpress_API error_t kdrive_ap_packet_trace_connect ( int32_t  ap)

Starts the Packet Trace, for a specific access port.

When no packet trace callback was set (the default) then it write Rx and Tx packets to the logger (level: information), otherwise it calls the callback function. precondition: the access port is open

Parameters
[in]apthe access port descriptor
Examples
kdrive_express_ip_routing.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_packet_trace_disconnect()

kdriveExpress_API error_t kdrive_ap_packet_trace_disconnect ( int32_t  ap)

Stops the Packet Trace.

Parameters
[in]apthe access port descriptor

◆ kdrive_ap_read_group_object()

kdriveExpress_API uint32_t kdrive_ap_read_group_object ( int32_t  ap,
uint16_t  address,
uint8_t  telegram[],
uint32_t  telegram_len,
uint32_t  timeout 
)

Sends a GroupValue_Read Telegram on the Access Port and waits for a GroupValue_Response indication telegram (with a matching Group Address).

If the response telegram has been received you can use kdrive_ap_get_group_data to get the response data. This function waits until either a telegram is received or the timeout elapses. If the timeout elapses the number of bytes returned is 0. On receipt of a matching GroupValue_Response telegram indication the corresponding telegram length is returned.

Parameters
[in]apthe access port descriptor
[in]addressis the Group Address (destination)
[out]telegrambuffer to hold the inbound telegram
[in]telegram_lenAs an input this holds the size of the telegram buffer
[in]timeoutThe time period to wait in milliseconds for the response to arrive
Examples
kdrive_express_ip_tunneling.c.

◆ kdrive_ap_read_ip_tunn_device_info()

kdriveExpress_API error_t kdrive_ap_read_ip_tunn_device_info ( int32_t  ap,
const char *  ip_address,
uint16_t  port,
const char *  iface_address,
ip_tunn_dev_t device_info 
)

Gets the information for one specific tunneling device.

Parameters
[in]apthe access port descriptor
[in]ip_addressthe IP Address
[in]port(optional) the server port. When the port is 0 then the default port for KNXnet/IP (3671) is used
[in]iface_address(optional) The Interface Adaptor IP Address
If iface_address = 0 (null pointer) then the default network interface is used
[out]device_infotunneling device struct item of the IP device

◆ kdrive_ap_receive()

kdriveExpress_API uint32_t kdrive_ap_receive ( int32_t  ap,
uint8_t  telegram[],
uint32_t  telegram_len,
uint32_t  timeout 
)

Waits for an inbound KNX telegram and (if received) copies the data into the telegram buffer.

This function waits until either a telegram is received or the timeout elapses. If the timeout elapses the number of bytes returned is 0. On receipt of a telegram the corresponding telegram length is returned.

Parameters
[in]apthe access port descriptor
[out]telegrambuffer to hold the inbound telegram
[in]telegram_lenAs an input this holds the size of the telegram buffer
[out]telegram_lenHolds the length of the received telegram
[in]timeoutThe time period to wait in milliseconds for a telegram to arrive
Examples
kdrive_express_ip_tunneling.c.

◆ kdrive_ap_register_sec_telegram_callback()

kdriveExpress_API error_t kdrive_ap_register_sec_telegram_callback ( int32_t  ap,
kdrive_ap_telegram_callback  c,
void *  user_data,
uint32_t key 
)

Registers a callback function.

This callback function will be called when a secure telegram is received 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. This function generates a unique key to represent the callback. This key can be used to remove the callback at a later state.

See also
kdrive_ap_remove_telegram_callback
Parameters
[in]apthe access port descriptor
[in]cthe telegram callback pointer to function
[in]user_data(optional) pointer to user data
[out]keyis set as a unique internal handle representing the callback function and can be used to remove the callback

◆ kdrive_ap_register_telegram_callback()

kdriveExpress_API error_t kdrive_ap_register_telegram_callback ( int32_t  ap,
kdrive_ap_telegram_callback  c,
void *  user_data,
uint32_t key 
)

Registers a callback function.

This callback function will be called when a telegram is received 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. This function generates a unique key to represent the callback. This key can be used to remove the callback at a later state.

See also
kdrive_ap_remove_telegram_callback
Parameters
[in]apthe access port descriptor
[in]cthe telegram callback pointer to function
[in]user_data(optional) pointer to user data
[out]keyis set as a unique internal handle representing the callback function and can be used to remove the callback
Examples
kdrive_express_dpt.c, kdrive_express_ip_tunneling.c, and kdrive_express_usb.c.

◆ kdrive_ap_release()

kdriveExpress_API bool_t kdrive_ap_release ( int32_t  ap)

Releases the AccessPort interface.

This should be the last function called when working with the access library. Returns true if successfully released false otherwise (i.e. the descriptor wasn't found).

Parameters
[in]apthe access port descriptor
Examples
kdrive_express_dpt.c, kdrive_express_ip_routing.c, kdrive_express_ip_routing_enumerate.c, kdrive_express_ip_tunneling.c, kdrive_express_ip_tunneling_enumerate.c, kdrive_express_services.c, kdrive_express_tunnel_ind_addr.c, and kdrive_express_usb.c.

◆ kdrive_ap_remove_telegram_callback()

kdriveExpress_API error_t kdrive_ap_remove_telegram_callback ( int32_t  ap,
uint32_t  key 
)

Removes (de-registers) a telegram callback.

Parameters
[in]apthe access port descriptor
[in]keyis the key returned from kdrive_ap_register_telegram_callback

◆ kdrive_ap_send()

kdriveExpress_API error_t kdrive_ap_send ( int32_t  ap,
const uint8_t  telegram[],
uint32_t  telegram_len 
)

Sends a KNX Telegram on the Access Port.

Parameters
[in]apthe access port descriptor
[in]telegramis the EMIC encoded KNX Telegram
[in]telegram_lenindicates the length of the telegram

◆ kdrive_ap_set_additional_ind_addr()

kdriveExpress_API error_t kdrive_ap_set_additional_ind_addr ( int32_t  ap,
const uint16_t  addresses[],
uint16_t  addresses_len 
)

Sets the Additional Individual Addresses of the Local Device (KNX Interface Device)

Note
This function is only for tunneling access ports
Parameters
[in]apthe access port descriptor of a tunneling access port
[out]addressesthe array of additional individual addresses
[in]addresses_lenthe array length

◆ kdrive_ap_set_data_sec()

kdriveExpress_API error_t kdrive_ap_set_data_sec ( int32_t  ap,
enum data_sec_t  dataSec 
)

Set the Data Security of the access point.

It can be set to: KDRIVE_ACCESS_DATA_SEC_OFF = 0x00 KDRIVE_ACCESS_DATA_SEC_ON = 0x01 KDRIVE_ACCESS_DATA_SEC_AUTO = 0xFF

Parameters
[in]apthe access port descriptor
[in]dataSecData Security usage to set

◆ kdrive_ap_set_data_sec_device_seq_num()

kdriveExpress_API error_t kdrive_ap_set_data_sec_device_seq_num ( int32_t  ap,
uint16_t  address,
const uint8_t  seq_num[6] 
)

Set the sequence number of a device.

Parameters
[in]apthe access port descriptor
[in]addressindividual address of the device
[in]seq_numthe sequence number of the device

◆ kdrive_ap_set_data_sec_own_seq_num()

kdriveExpress_API error_t kdrive_ap_set_data_sec_own_seq_num ( int32_t  ap,
const uint8_t  seq_num[6] 
)

Set the own sending sequence number.

Parameters
[in]apthe access port descriptor
[in]seq_numown sending sequence number

◆ kdrive_ap_set_filter_dest_addr()

kdriveExpress_API error_t kdrive_ap_set_filter_dest_addr ( int32_t  ap,
bool_t  enable 
)

Enable or disable filter destination individual address for L-Data.ind telegrams.

If enabled (=1) than individual addressed telegrams for other destinations will not route. Only available for Weinzierl cEMI FT1.2 Interface. The other interfaces filter the individual address already self in the link layer.

Note
This function is only for KNXnet/IP Routing or Weinzierl cEMI FT1.2 interfaces.
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor of a FT1.2 or routing access port
[in]enableenable (1) or disable (0) the filter

◆ kdrive_ap_set_filter_rf_domain_addr()

kdriveExpress_API error_t kdrive_ap_set_filter_rf_domain_addr ( int32_t  ap,
bool_t  enable 
)

Enable or disable filter rf domain address for L-Data.ind telegrams.

If enabled (=1) than telegrams for other domains will not route. Only available, if medium of interface is RF. If it has a other medium nothing happens.

Note
This function is only for RF interfaces.
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor
[in]enableenable (1) or disable (0) the filter

◆ kdrive_ap_set_ind_addr()

kdriveExpress_API error_t kdrive_ap_set_ind_addr ( int32_t  ap,
uint16_t  address 
)

Sets the Individual Address of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[in]addressthe individual address of the local device
Examples
kdrive_express_ip_routing.c.

◆ kdrive_ap_set_ip_rout_backbone_key()

kdriveExpress_API error_t kdrive_ap_set_ip_rout_backbone_key ( int32_t  ap,
const char *  key 
)

Sets the backbone key for the KNXnet/IP routing connection.

Note
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor
[in]keythe backbone key of the local device as hex string
Examples
kdrive_express_ip_routing.c.

◆ kdrive_ap_set_ip_tunn_auth_code()

kdriveExpress_API error_t kdrive_ap_set_ip_tunn_auth_code ( int32_t  ap,
const char *  authentication_code 
)

Sets the optional authentication code for the KNXnet/IP tunneling connection.

This function is used only for secure KNXnet/IP devices. Call this before open the connection. The default value is an empty string.

Note
This function is only for closed tunneling access ports
Parameters
[in]apthe access port descriptor
[in]authentication_codethe authentication code of the local device, an empty string means that no validation of the auth code will be done

◆ kdrive_ap_set_ip_tunn_credentials()

kdriveExpress_API error_t kdrive_ap_set_ip_tunn_credentials ( int32_t  ap,
uint8_t  user_id,
const char *  password 
)

Sets the user id and the security password for the KNXnet/IP tunneling connection.

This function is used for secure KNXnet/IP devices. Call this before opening the connection.

Note
This function is only for closed tunneling access ports
Parameters
[in]apthe (tunneling) access port descriptor
[in]user_idthe security user id of the local device
[in]passwordthe security password of the local device

◆ kdrive_ap_set_ip_tunn_requested_ia()

kdriveExpress_API error_t kdrive_ap_set_ip_tunn_requested_ia ( int32_t  ap,
uint16_t  address 
)

Sets the (optional) requested individual address This function is used for KNXnet/IP v2 devices.

The default value is 0 ( = considered any). Call this before opening the connection.

Note
This function is only for closed tunneling access ports
Parameters
[in]apthe (tunneling) access port descriptor
[in]addressthe individual address of the tunnel to open 0.0.0 is considered any

◆ kdrive_ap_set_ip_tunn_user_id()

kdriveExpress_API error_t kdrive_ap_set_ip_tunn_user_id ( int32_t  ap,
uint8_t  user_id 
)

Sets the security user id for the KNXnet/IP tunneling connection.

This function is used for secure KNXnet/IP devices. Call this before opening the connection. The default value is 1.

Note
This function is only for closed tunneling access ports
Parameters
[in]apthe access port descriptor
[in]user_idthe security user id of the local device

◆ kdrive_ap_set_keyring()

kdriveExpress_API error_t kdrive_ap_set_keyring ( int32_t  ap,
int32_t  keyring 
)

Sets the used knx keyring project.

Use 0 when you want remove it

Parameters
[in]apthe access port descriptor
[in]keyringthe keyring project descriptor

◆ kdrive_ap_set_layer()

kdriveExpress_API error_t kdrive_ap_set_layer ( int32_t  ap,
uint16_t  layer 
)

Sets the Layer of the Local Device (KNX Interface Device)

Note
Only available in the Commercial Access kdriveExpress SDK
Parameters
[in]apthe access port descriptor
[in]layerthe KNX layer of the local device KDRIVE_LAYER_LINK, KDRIVE_LAYER_BUSMON or KDRIVE_LAYER_RAW

◆ kdrive_ap_set_packet_trace_callback()

kdriveExpress_API error_t kdrive_ap_set_packet_trace_callback ( int32_t  ap,
kdrive_ap_packet_trace_callback  c,
void *  user_data 
)

Sets the packet trace callback function, for a specific access port.

This callback function will be called when a packet rx or tx 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 packet trace callback pointer to function
[in]user_data(optional) pointer to user data

◆ kdrive_ap_set_rf_domain_addr()

kdriveExpress_API error_t kdrive_ap_set_rf_domain_addr ( int32_t  ap,
const uint8_t  da[KDRIVE_DA_LEN] 
)

Sets the Domain Address of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[in]dathe new domain address of the local device
Examples
kdrive_express_services.c.

◆ kdrive_ap_set_serial_no()

kdriveExpress_API error_t kdrive_ap_set_serial_no ( int32_t  ap,
const uint8_t  sn[KDRIVE_SN_LEN] 
)

Sets the Serial Number of the Local Device (KNX Interface Device)

Parameters
[in]apthe access port descriptor
[in]snthe new serial number of the local device
Note
Normally the serial number is write protected. Only some interfaces for testing are support writing.

◆ kdrive_ap_set_tunnel_ind_addr()

kdriveExpress_API error_t kdrive_ap_set_tunnel_ind_addr ( int32_t  ap,
uint16_t  address 
)

Sets the used Individual Address of the tunnel connection (KNX Interface Device).

Returns an error, if it can not changed because for the tunnel address is the device individual address used.

Note
This function is only for tunneling access ports
Parameters
[in]apthe access port descriptor of a tunneling access port
[in]addressthe individual address of the tunnel
Examples
kdrive_express_tunnel_ind_addr.c.