CoAP Notification API#
Modules#
Functions#
Register a new notification.
Get notification by ID.
Initialization of the CoAP notification service.
Init default notification instance.
Print notifications.
Remove notification from the CoAP notification table referenced by name.
Send notification.
Function Documentation#
sl_wisun_coap_notify_add#
sl_status_t sl_wisun_coap_notify_add (const sl_wisun_coap_notify_t *const src_notify)
Register a new notification.
[in] | src_notify | the new notifcation's descriptor to add |
Notification is added to the internal storage. Returns
sl_status_t SL_STATUS_OK if the notification is added successfully, otherwise SL_STATUS_FAIL
114
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_get_by_id#
const sl_wisun_coap_notify_t * sl_wisun_coap_notify_get_by_id (const char * id)
Get notification by ID.
[in] | id | unique ID of the notification (custom string) |
Get pointer to the notification instance in the storage. Returns
sl_wisun_coap_notify_t * pointer to notify instance if succeeded, otherwise NULL ptr
123
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_init#
void sl_wisun_coap_notify_init (void )
Initialization of the CoAP notification service.
N/A |
If the service is enabled, the notification thread is initialized also.
94
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_init_default_inst#
sl_status_t sl_wisun_coap_notify_init_default_inst (sl_wisun_coap_notify_t *const notify, const char * id)
Init default notification instance.
[in] | notify | notify descriptor for init |
[in] | id | unique ID of the notification (custom string) |
Default remote address and port are defined in the config file. Returns
sl_status_t SL_STATUS_OK if the initialization is succeeded, otherwise SL_STATUS_FAIL
104
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_print_notifications#
void sl_wisun_coap_notify_print_notifications (void )
Print notifications.
N/A |
Print content of the internal storage.
Print resource URI paths
139
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_remove_by_id#
sl_status_t sl_wisun_coap_notify_remove_by_id (const char * id)
Remove notification from the CoAP notification table referenced by name.
[in] | id | Notification ID |
Remove notification from the internal storage. Returns
sl_status_t SL_STATUS_OK if the notification is removed successfully, otherwise SL_STATUS_FAIL
132
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h
sl_wisun_coap_notify_send_notification#
sl_status_t sl_wisun_coap_notify_send_notification (const sl_wisun_coap_notify_t *const notify)
Send notification.
[in] | notify | Notification instance. It includes all the necessary information about destination. |
Notification should be initialised properly before sending. Returns
sl_status_t SL_STATUS_OK if the notification is sent successfully, otherwise SL_STATUS_FAIL
149
of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/coap/sl_wisun_coap_notify.h