Run a CoRE Resource Directory endpoint standalone. More...
Run a CoRE Resource Directory endpoint standalone.
This sub-module enables a CoRE RD endpoint to manage is registration state with a RD autonomously by periodically running the update procedure. This is implemented by running a dedicated thread.
Files | |
| file | ep_standalone.h | 
| CoRE Resource Directory endpoint standalone extension.  | |
Typedefs | |
| typedef void(* | cord_ep_standalone_cb_t) (cord_ep_standalone_event_t event) | 
| Callback function signature for RD endpoint state synchronization.   | |
Enumerations | |
| enum | cord_ep_standalone_event_t { CORD_EP_REGISTERED , CORD_EP_DEREGISTERED , CORD_EP_UPDATED } | 
| Possible types of events triggered by the cord_ep_standalone module.  More... | |
Functions | |
| void | cord_ep_standalone_run (void) | 
| Spawn a new thread that takes care of sending periodic updates to an active RD entry.   | |
| void | cord_ep_standalone_reg_cb (cord_ep_standalone_cb_t cb) | 
| Register a callback to be notified about RD endpoint state changes.   | |
| void | cord_ep_standalone_signal (bool connected) | 
| Signal the cord_ep thread about connection status change.   | |
| typedef void(* cord_ep_standalone_cb_t) (cord_ep_standalone_event_t event) | 
Callback function signature for RD endpoint state synchronization.
The registered callback function is executed in the context of the dedicated standalone RD endpoint's thread.
| [in] | event | type of event | 
Definition at line 49 of file ep_standalone.h.
Possible types of events triggered by the cord_ep_standalone module.
Definition at line 35 of file ep_standalone.h.
| void cord_ep_standalone_reg_cb | ( | cord_ep_standalone_cb_t | cb | ) | 
Register a callback to be notified about RD endpoint state changes.
Only a single callback can be active at any point in time, so setting a new callback will override the existing one.
cb != NULL| [in] | cb | callback to execute on RD endpoint state changes | 
| void cord_ep_standalone_run | ( | void | ) | 
Spawn a new thread that takes care of sending periodic updates to an active RD entry.
| void cord_ep_standalone_signal | ( | bool | connected | ) | 
Signal the cord_ep thread about connection status change.
| [in] | connected | set to true if we are connected to a RD |