KNX IoT
KNX IoT Point API stack implementation
|
Optional group of iot_router functions. More...
Data Structures | |
struct | oc_gateway_t |
The gateway info. More... | |
struct | oc_group_mapping_table_t |
Group Mapping Table Resource (/fp/gm) The payload is an array of objects. More... | |
Typedefs | |
typedef void(* | oc_gateway_s_mode_cb_t) (size_t device_index, char *sender_ip_address, oc_group_object_notification_t *s_mode_message, void *data) |
Callback invoked for all s-mode communication e.g. More... | |
typedef struct oc_gateway_t | oc_gateway_t |
The gateway info. More... | |
typedef struct oc_group_mapping_table_t | oc_group_mapping_table_t |
Group Mapping Table Resource (/fp/gm) The payload is an array of objects. More... | |
Functions | |
void | oc_core_f_netip_get_handler (oc_request_t *request, oc_interface_mask_t iface_mask, void *data) |
int | oc_core_get_group_mapping_table_size () |
returns the size (amount of total entries) of the fp / gm table More... | |
int | oc_core_set_group_mapping_table (size_t device_index, int index, oc_group_mapping_table_t entry, bool store) |
set an entry in the group mapping table More... | |
void | oc_create_iot_router_functional_block (size_t device_index) |
void | oc_create_knx_iot_router_resources (size_t device_index) |
Creation of the knx iot router resources. More... | |
void | oc_delete_group_mapping_table () |
delete all entries of the Group Mapping Table (from persistent) storage More... | |
int | oc_get_f_netip_fra (size_t device_index) |
retrieve the IPv4 sync latency fraction (fra). More... | |
oc_string_t | oc_get_f_netip_key (size_t device_index) |
retrieve the IPv4 routing backbone key More... | |
uint32_t | oc_get_f_netip_mcast (size_t device_index) |
retrieve the current IPv4 routing multicast address. More... | |
int | oc_get_f_netip_tol (size_t device_index) |
retrieve the IPv4 routing latency tolerance (tol) More... | |
int | oc_get_f_netip_ttl (size_t device_index) |
retrieve the value defines how many routers a multicast message MAY pass until it gets discarded. More... | |
oc_gateway_t * | oc_get_gateway_cb (void) |
retrieve the gateway info, e.g. More... | |
oc_group_mapping_table_t * | oc_get_group_mapping_entry (size_t device_index, int index) |
retrieve group mapping entry More... | |
void | oc_load_group_mapping_table () |
load all entries of the Group Mapping Table (from persistent) storage More... | |
int | oc_set_gateway_cb (oc_gateway_s_mode_cb_t oc_gateway_s_mode_cb_t, void *data) |
Initialize the gateway callbacks. More... | |
Optional group of iot_router functions.
Currently implemented:
typedef void(* oc_gateway_s_mode_cb_t) (size_t device_index, char *sender_ip_address, oc_group_object_notification_t *s_mode_message, void *data) |
Callback invoked for all s-mode communication e.g.
to be used to create a KNX-IOT to CLASSIC gateway
Definition at line 207 of file oc_knx_gm.h.
typedef struct oc_gateway_t oc_gateway_t |
The gateway info.
typedef struct oc_group_mapping_table_t oc_group_mapping_table_t |
Group Mapping Table Resource (/fp/gm) The payload is an array of objects.
Example (JSON):
Key translation
Json Key | Integer Value |
---|---|
id | 0 |
ga | 7 |
dataType | 116 (t) |
s | 115 (s) |
groupKey | 107 |
secSettings | 28 |
a | 97 (a) |
c | 99 (c) |
The structure stores the information. The structure will be used as an array. There are function to find
int oc_core_get_group_mapping_table_size | ( | ) |
returns the size (amount of total entries) of the fp / gm table
int oc_core_set_group_mapping_table | ( | size_t | device_index, |
int | index, | ||
oc_group_mapping_table_t | entry, | ||
bool | store | ||
) |
set an entry in the group mapping table
Note: does not write to persistent storage
device_index | index of the device |
index | the index in the table, will overwrite if something is there |
entry | the group mapping entry |
store | the store the entry to persistent storage |
void oc_create_knx_iot_router_resources | ( | size_t | device_index | ) |
Creation of the knx iot router resources.
device_index | index of the device to which the resource are to be created |
void oc_delete_group_mapping_table | ( | ) |
delete all entries of the Group Mapping Table (from persistent) storage
int oc_get_f_netip_fra | ( | size_t | device_index | ) |
retrieve the IPv4 sync latency fraction (fra).
device_index | index of the device |
oc_string_t oc_get_f_netip_key | ( | size_t | device_index | ) |
retrieve the IPv4 routing backbone key
device_index | index of the device |
uint32_t oc_get_f_netip_mcast | ( | size_t | device_index | ) |
retrieve the current IPv4 routing multicast address.
(mcast)
device_index | index of the device |
int oc_get_f_netip_tol | ( | size_t | device_index | ) |
retrieve the IPv4 routing latency tolerance (tol)
device_index | index of the device |
int oc_get_f_netip_ttl | ( | size_t | device_index | ) |
retrieve the value defines how many routers a multicast message MAY pass until it gets discarded.
(ttl)
device_index | index of the device |
oc_gateway_t* oc_get_gateway_cb | ( | void | ) |
retrieve the gateway info, e.g.
the callback and callback data
oc_group_mapping_table_t* oc_get_group_mapping_entry | ( | size_t | device_index, |
int | index | ||
) |
retrieve group mapping entry
device_index | the device index |
index | the index in the table |
void oc_load_group_mapping_table | ( | ) |
load all entries of the Group Mapping Table (from persistent) storage
int oc_set_gateway_cb | ( | oc_gateway_s_mode_cb_t | oc_gateway_s_mode_cb_t, |
void * | data | ||
) |
Initialize the gateway callbacks.
This function is typically called as part of an KNX-IOT to Classic gateway
[in] | oc_gateway_s_mode_cb_t | callback function invoked for each received s-mode message. |
[in] | data | context pointer that is passed to the oc_gateway_s_mode_cb_t |
0
on success-1
on failure