Zigbee Protocol Controller 1.6.0
zigpc_discovery::timers Namespace Reference

Typedefs

using callback_t = std::function< void(zigbee_eui64_uint_t, zigpc_discovery_status_t)>
 Callback type used to notify timeout events. More...
 

Functions

void clear (void)
 Clear all timers. More...
 
sl_status_t create (zigbee_eui64_uint_t eui64, clock_time_t duration_ms, zigpc_discovery_status_t timeout_status, const callback_t &timeout_cb)
 Create a callback timer. More...
 
sl_status_t remove (zigbee_eui64_uint_t eui64)
 Remove a created callback timer. More...
 

Typedef Documentation

◆ callback_t

Callback type used to notify timeout events.

Function Documentation

◆ clear()

void zigpc_discovery::timers::clear ( void  )

Clear all timers.

◆ create()

sl_status_t zigpc_discovery::timers::create ( zigbee_eui64_uint_t  eui64,
clock_time_t  duration_ms,
zigpc_discovery_status_t  timeout_status,
const callback_t timeout_cb 
)

Create a callback timer.

Parameters
eui64Device identifier.
duration_msDuration to set timer.
timeout_statusStatus to send on timer expiry.
timeout_cbCallback to invoke on timer expiry.
Returns
sl_status_t SL_STATUS_OK on successful creation, SL_STATUS_NULL_POINTER on invalid callback passed in, or error otherwise.

◆ remove()

sl_status_t zigpc_discovery::timers::remove ( zigbee_eui64_uint_t  eui64)

Remove a created callback timer.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on successful removal, or error otherwise.