KNX IoT
KNX IoT Point API stack implementation
|
S-mode server side support functions. More...
Modules | |
s-mode client | |
S-mode Client side support functions. | |
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... | |
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... | |
bool | oc_set_s_mode_response_cb (oc_s_mode_response_cb_t my_func) |
set the s-mode response callback e.g. More... | |
S-mode server side support functions.
This module contains the receiving side of the s-mode functionality. The received s-mode messages are routed to the appropriate POST methods of the data point. However since not all data is in the s-mode message the POST method needs to retrieve the data from the s-mode message differently than for an normal CoAP post message (the message payload is constructed differently).
void oc_do_s_mode_read | ( | int64_t | group_address | ) |
sends out an s-mode read request.
The read request has no data value
Note: function does not check the flags on the resources
group_address | the group address to invoke a read on |
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.
only the first group address is used to send the s-mode message for the recipient table all entries are used to send the unicast communication.
Note: function does check the T flag on the resource if the T flag is not set, then the message is NOT send.
scope | the multi-cast scope |
resource_url | URI of the resource (e.g. implemented on the device that is calling this function) |
rp | the "st" value to send e.g. "w" | "rp" | "r" |
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.
only the first group address is used to send the s-mode message for the recipient table all entries are used to send the unicast communication.
Note: function does NOT check the T flag on the resource e.g. always send the s-mode message used in case the rp value = "rp", e.g.sending a response on read ("r")
scope | the multi-cast scope |
resource_url | URI of the resource (e.g. implemented on the device that is calling this function) |
rp | the "st" value to send e.g. "w" | "rp" | "r" |
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 be in the CBOR object
request | the request to be checked |
bool oc_set_s_mode_response_cb | ( | oc_s_mode_response_cb_t | my_func | ) |
set the s-mode response callback e.g.
function is called when a s-mode response is coming back
my_func | the callback function |