KNX IoT
KNX IoT Point API stack implementation
oc_knx_client.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2022-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 */
25 #ifndef OC_KNX_CLIENT_INTERNAL_H
26 #define OC_KNX_CLIENT_INTERNAL_H
27 
28 #include <stddef.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
45 typedef void (*oc_spake_cb_t)(int error, char *serial_number, char *oscore_id,
46  int oscore_id_size, uint8_t *secret,
47  int secret_size);
48 
58 
69 int oc_initiate_spake(oc_endpoint_t *endpoint, char *password,
70  char *recipient_id);
71 
89  char *serial_number, char *password,
90  char *recipient_id,
91  size_t recipient_id_len);
92 
93 typedef void (*oc_s_mode_response_cb_t)(char *url, oc_rep_t *rep,
94  oc_rep_t *rep_value);
95 
118 bool oc_set_s_mode_response_cb(oc_s_mode_response_cb_t my_func);
119 
125 oc_s_mode_response_cb_t oc_get_s_mode_response_cb();
126 
136 
158  // end of doc_module_tag_s_mode_server
160 
170 void oc_do_s_mode_read(int64_t group_address);
171 
192 void oc_do_s_mode_with_scope(int scope, const char *resource_url, char *rp);
193 
215 void oc_do_s_mode_with_scope_no_check(int scope, const char *resource_url,
216  char *rp);
217  // end of doc_module_tag_s_mode_client
219 
220 #ifdef __cplusplus
221 }
222 #endif
223 
224 #endif /* OC_KNX_CLIENT_INTERNAL_H */
oc_rep_t * oc_s_mode_get_value(oc_request_t *request)
parses out the value of the s-mode request.
oc_s_mode_response_cb_t oc_get_s_mode_response_cb()
retrieve the callback function
bool oc_is_redirected_request(oc_request_t *request)
checks if the request is a redirected request from /k or /p when that happened, extra information can...
void oc_do_s_mode_with_scope(int scope, const char *resource_url, char *rp)
sends (transmits) an s-mode message the value comes from the GET of the resource indicated by the res...
bool oc_set_s_mode_response_cb(oc_s_mode_response_cb_t my_func)
set the s-mode response callback e.g.
void oc_do_s_mode_with_scope_no_check(int scope, const char *resource_url, char *rp)
sends (transmits) an s-mode message the value comes from the GET of the resource indicated by the res...
void oc_do_s_mode_read(int64_t group_address)
sends out an s-mode read request.
int oc_initiate_spake_parameter_request(oc_endpoint_t *endpoint, char *serial_number, char *password, char *recipient_id, size_t recipient_id_len)
initiate the spake handshake
bool oc_set_spake_response_cb(oc_spake_cb_t my_func)
set the spake response callback e.g.
int oc_initiate_spake(oc_endpoint_t *endpoint, char *password, char *recipient_id)
initiate the spake handshake
void(* oc_spake_cb_t)(int error, char *serial_number, char *oscore_id, int oscore_id_size, uint8_t *secret, int secret_size)
the spake response callback type e.g.
Definition: oc_knx_client.h:45
the endpoint information
Definition: oc_endpoint.h:78
parsed entry of a cbor object This represents a link list of response values one can iterate over the...
Definition: oc_rep.h:1642
request information structure
Definition: oc_ri.h:412