Zigbee Protocol Controller 1.6.0
zigpc_discovery_timers.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
24#ifndef ZIGPC_DISCOVERY_TIMERS_HPP
25#define ZIGPC_DISCOVERY_TIMERS_HPP
26
27#include <functional>
28#include <unordered_map>
29
30// Unify includes
31#include <sys/ctimer.h>
32
33// ZigPC includes
34#include <zigpc_common_zigbee.h>
35
36// Component includes
37#include "zigpc_discovery.h"
38
40{
46 = std::function<void(zigbee_eui64_uint_t, zigpc_discovery_status_t)>;
47
52void clear(void);
53
65 clock_time_t duration_ms,
66 zigpc_discovery_status_t timeout_status,
67 const callback_t &timeout_cb);
68
77
78} // namespace zigpc_discovery::timers
79
80#endif /* ZIGPC_DISCOVERY_TIMERS_HPP */
81
uint32_t sl_status_t
Definition: sl_status.h:139
uint64_t zigbee_eui64_uint_t
Zigbee Device Identifier (stored as integer)
Definition: zigpc_common_zigbee.h:199
enum zigpc_discovery_status zigpc_discovery_status_t
Discovery status types possible for a device being discovered.
Definition: zigpc_discovery_timers.hpp:40
std::function< void(zigbee_eui64_uint_t, zigpc_discovery_status_t)> callback_t
Callback type used to notify timeout events.
Definition: zigpc_discovery_timers.hpp:46
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.
void clear(void)
Clear all timers.
sl_status_t remove(zigbee_eui64_uint_t eui64)
Remove a created callback timer.