KNX IoT
KNX IoT Point API stack implementation
oc_knx_gm.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2021-2023 Cascoda Ltd
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
21 #ifndef OC_KNX_GM_INTERNAL_H
22 #define OC_KNX_GM_INTERNAL_H
23 
24 #include <stddef.h>
25 #include "oc_knx.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
97 {
98  int id;
99  int ga_len;
100  uint64_t *ga;
101  uint32_t dataType;
102  oc_string_t groupKey;
108 
115 void oc_create_knx_iot_router_resources(size_t device_index);
116 
117 void oc_create_iot_router_functional_block(size_t device_index);
118 void oc_core_f_netip_get_handler(oc_request_t *request,
119  oc_interface_mask_t iface_mask, void *data);
120 
127 
134 
145 int oc_core_set_group_mapping_table(size_t device_index, int index,
146  oc_group_mapping_table_t entry, bool store);
147 
156  int index);
157 
163 
169 int oc_get_f_netip_fra(size_t device_index);
170 
177 int oc_get_f_netip_tol(size_t device_index);
178 
185 oc_string_t oc_get_f_netip_key(size_t device_index);
186 
194 int oc_get_f_netip_ttl(size_t device_index);
201 uint32_t oc_get_f_netip_mcast(size_t device_index);
202 
207 typedef void (*oc_gateway_s_mode_cb_t)(
208  size_t device_index, char *sender_ip_address,
209  oc_group_object_notification_t *s_mode_message, void *data);
210 
215 typedef struct oc_gateway_t
216 {
218  void *data;
220 
227 
245  void *data);
246  // end of doc_module_tag_gateway
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif /* OC_KNX_GM_INTERNAL_H */
void oc_create_knx_iot_router_resources(size_t device_index)
Creation of the knx iot router resources.
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.
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
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.
Definition: oc_knx_gm.h:207
int oc_get_f_netip_fra(size_t device_index)
retrieve the IPv4 sync latency fraction (fra).
oc_string_t oc_get_f_netip_key(size_t device_index)
retrieve the IPv4 routing backbone key
struct oc_gateway_t oc_gateway_t
The gateway info.
oc_group_mapping_table_t * oc_get_group_mapping_entry(size_t device_index, int index)
retrieve group mapping entry
oc_gateway_t * oc_get_gateway_cb(void)
retrieve the gateway info, e.g.
uint32_t oc_get_f_netip_mcast(size_t device_index)
retrieve the current IPv4 routing multicast address.
void oc_delete_group_mapping_table()
delete all entries of the Group Mapping Table (from persistent) storage
int oc_get_f_netip_tol(size_t device_index)
retrieve the IPv4 routing latency tolerance (tol)
struct oc_group_mapping_table_t oc_group_mapping_table_t
Group Mapping Table Resource (/fp/gm) The payload is an array of objects.
int oc_core_get_group_mapping_table_size()
returns the size (amount of total entries) of the fp / gm table
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.
implementation of /.well-known/knx and /k resources
oc_interface_mask_t
interface masks security access scopes defined as interfaces note that scope = 1 is not used.
Definition: oc_ri.h:261
The gateway info.
Definition: oc_knx_gm.h:216
oc_gateway_s_mode_cb_t cb
the callback
Definition: oc_knx_gm.h:217
void * data
the callback user data
Definition: oc_knx_gm.h:218
Group Mapping Table Resource (/fp/gm) The payload is an array of objects.
Definition: oc_knx_gm.h:97
bool confidentiality
(115:28:99) c confidentiality applied (default true, if groupKey exists)
Definition: oc_knx_gm.h:105
int ga_len
length of the array of ga identifiers
Definition: oc_knx_gm.h:99
uint64_t * ga
(7) array of group addresses (unsigned 64 bit integers)
Definition: oc_knx_gm.h:100
int id
(0) contents of id
Definition: oc_knx_gm.h:98
oc_string_t groupKey
(s:107) groupKey
Definition: oc_knx_gm.h:102
uint32_t dataType
(116) dataType
Definition: oc_knx_gm.h:101
bool authentication
(115:28:97) a authentication applied (default true, if groupKey exists)
Definition: oc_knx_gm.h:103
Group Object Notification (s-mode messages) Can be used for receiving messages or sending messages.
Definition: oc_knx.h:90
request information structure
Definition: oc_ri.h:412