CoAP Resource Handler API#
Modules#
Functions#
Get resources.
Initialization of the CoAP Resource Discovery internals.
Is request packet?
Print resources.
Reset auto-response callback.
Register a new resource into the CoAP Resource table.
Initialise empty resource.
Remove a resource from the CoAP Resource table referenced by name.
Set auto-response callback.
Function Documentation#
sl_wisun_coap_rhnd_get_resources#
const sl_wisun_coap_rhnd_resource_t * sl_wisun_coap_rhnd_get_resources (void )
Get resources.
N/A |
Getting linked list of resources Returns
const sl_wisun_coap_rhnd_resource_t* Resource list, on error is NULL ptr
155
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_init#
void sl_wisun_coap_rhnd_init (void )
Initialization of the CoAP Resource Discovery internals.
N/A |
117
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_is_request_packet#
bool sl_wisun_coap_rhnd_is_request_packet (const sl_wisun_coap_packet_t *const packet)
Is request packet?
[in] | packet | Packet |
helper function Returns
true Request packet
false Response or Empty packet
248
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_print_resources#
void sl_wisun_coap_rhnd_print_resources (void )
Print resources.
N/A |
Print resource URI paths
179
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_reset_auto_response#
sl_status_t sl_wisun_coap_rhnd_reset_auto_response (const char * uri_path)
Reset auto-response callback.
[in] | uri_path | URI path |
Set callback ptr to NULL in resource descriptor Returns
sl_status_t SL_STATUS_OK on succes, SL_STATUS_FAIL on error
173
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_resource_add#
sl_status_t sl_wisun_coap_rhnd_resource_add (const sl_wisun_coap_rhnd_resource_t *const src_resource)
Register a new resource into the CoAP Resource table.
[in] | src_resource | the new resource's descriptor |
Returns
True if the registration is successful
141
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_resource_init#
__STATIC_INLINE void sl_wisun_coap_rhnd_resource_init (sl_wisun_coap_rhnd_resource_t *const src_resource)
Initialise empty resource.
[in] | src_resource | Resource descriptor |
Set pointers to NULL and flags to false
124
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_resource_remove_by_uri#
sl_status_t sl_wisun_coap_rhnd_resource_remove_by_uri (const char * uri_path)
Remove a resource from the CoAP Resource table referenced by name.
[in] | uri_path | URI path of the resource to be removed |
Returns
True if removal is successful
148
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h
sl_wisun_coap_rhnd_set_auto_response#
sl_status_t sl_wisun_coap_rhnd_set_auto_response (const char * uri_path, sl_wisun_coap_rhnd_auto_resp_t response)
Set auto-response callback.
[in] | uri_path | URI path |
[in] | response | Response callback |
Set callback for resource Returns
sl_status_t SL_STATUS_OK on succes, SL_STATUS_FAIL on error
164
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_rhnd.h