CoRE RD Endpoint Standalone Extension¶
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.
-
enum
cord_ep_standalone_event_t
¶ - CORD_EP_REGISTERED
- CORD_EP_DEREGISTERED
- CORD_EP_UPDATED
-
void(*
cord_ep_standalone_cb_t
()¶ 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.
Parameters
t: type of event
-
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
(ep_standalone.h::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.
Parameters
cb: callback to execute on RD endpoint state changes
-
void
cord_ep_standalone_signal
(bool connected)¶ Signal the cord_ep thread about connection status change.
Note
This function should not be called by a user, but it is called from withing the cord_ep implementation
Parameters
connected: set to true if we are connected to a RD