KNX IoT
KNX IoT Point API stack implementation
|
client code for the device (s-mode) More...
#include <stddef.h>
Go to the source code of this file.
Typedefs | |
typedef void(* | oc_s_mode_response_cb_t) (char *url, oc_rep_t *rep, oc_rep_t *rep_value) |
typedef 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. More... | |
Functions | |
void | oc_do_s_mode_read (int64_t group_address) |
sends out an s-mode read request. More... | |
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 resource_url the path is "k" the sia (sender individual address) is taken from the device the ga is coming from the group address table that is listing the resource url (path) the url of the resource to obtain the value from. More... | |
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 resource_url the path is "k" the sia (sender individual address) is taken from the device the ga is coming from the group address table that is listing the resource url (path) the url of the resource to obtain the value from. More... | |
oc_s_mode_response_cb_t | oc_get_s_mode_response_cb () |
retrieve the callback function More... | |
int | oc_initiate_spake (oc_endpoint_t *endpoint, char *password, char *recipient_id) |
initiate the spake handshake More... | |
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 More... | |
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 be in the CBOR object More... | |
oc_rep_t * | oc_s_mode_get_value (oc_request_t *request) |
parses out the value of the s-mode request. More... | |
bool | oc_set_s_mode_response_cb (oc_s_mode_response_cb_t my_func) |
set the s-mode response callback e.g. More... | |
bool | oc_set_spake_response_cb (oc_spake_cb_t my_func) |
set the spake response callback e.g. More... | |
client code for the device (s-mode)
compile flag:
Definition in file oc_knx_client.h.
typedef 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.
function prototype that is called when the spake handshake is finished
error | 0 = ok |
serial_number | the serial number of the device on the other side |
oscore_id | the oscore identifier (bytes) |
oscore_id_size | the size in bytes of the oscore identifier |
secret | the negotiated secret (bytes) |
secret_size | the size in bytes of the secret |
Definition at line 45 of file oc_knx_client.h.
int oc_initiate_spake | ( | oc_endpoint_t * | endpoint, |
char * | password, | ||
char * | recipient_id | ||
) |
initiate the spake handshake
NOTE: recipient id in HEX string (e.g. null terminated)
endpoint | the endpoint of the device to be used |
password | the spake password to be used |
recipient_id | the recipient id (HEX string) |
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
NOTE: After the success full handshake the OSCORE context should have:
endpoint | the endpoint of the device to be used |
serial_number | the serial number of the device, to put back in the callback, this is a string, e.g. SN as HEX string e.g. "00FA10010701" |
password | the spake password to be used |
recipient_id | the recipient ID id for the resulting OSCORE context (byte string) |
recipient_id_len | length of the recipient ID byte string |
bool oc_set_spake_response_cb | ( | oc_spake_cb_t | my_func | ) |
set the spake response callback e.g.
function is called when the spake handshake is finished
my_func | the callback function |