Zigbee Protocol Controller 1.6.0
zigpc_discovery_events.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_EVENTS_HPP
25#define ZIGPC_DISCOVERY_EVENTS_HPP
26
27#include <vector>
28
29// Shared Unify includes
30#include <sys/ctimer.h>
31#include <sl_status.h>
32
33// ZigPC includes
34#include <zigpc_common_zigbee.h>
35
36// Component includes
37#include "zigpc_discovery.h"
38
40{
42
44 zigpc_discovery_status_t timeout_status);
45
47{
48 public:
49 const char *label;
50 explicit DiscoverEvent(const char *label) : label(label) {}
51 virtual sl_status_t handle(void) = 0;
52 virtual ~DiscoverEvent() = default;
53};
54
56{
57 private:
59
60 public:
62
63 ~DeviceDiscoverRequest() override = default;
64
65 sl_status_t handle(void) override;
66};
67
69{
70 private:
72 std::vector<zigbee_endpoint_id_t> endpoints;
73
74 public:
76 zigbee_eui64_uint_t eui64, std::vector<zigbee_endpoint_id_t> &&endpoints);
77
78 ~DeviceDiscoverResponse() override = default;
79
80 sl_status_t handle(void) override;
81};
82
84{
85 private:
88
89 public:
92
93 ~EndpointDiscoverRequest() override = default;
94
95 sl_status_t handle(void) override;
96};
97
99{
100 private:
103 std::vector<zcl_cluster_id_t> server_clusters;
104 std::vector<zcl_cluster_id_t> client_clusters;
105
106 public:
110 std::vector<zcl_cluster_id_t> &&server_clusters,
111 std::vector<zcl_cluster_id_t> &&client_clusters);
112
113 ~EndpointDiscoverResponse() override = default;
114
115 sl_status_t handle(void) override;
116};
117
118} // namespace zigpc_discovery::events
119
120#endif /* ZIGPC_DISCOVERY_EVENTS_HPP */
121
Definition: zigpc_discovery_events.hpp:56
zigbee_eui64_uint_t eui64
Definition: zigpc_discovery_events.hpp:58
DeviceDiscoverRequest(zigbee_eui64_uint_t eui64)
Definition: zigpc_discovery_events.hpp:69
std::vector< zigbee_endpoint_id_t > endpoints
Definition: zigpc_discovery_events.hpp:72
DeviceDiscoverResponse(zigbee_eui64_uint_t eui64, std::vector< zigbee_endpoint_id_t > &&endpoints)
zigbee_eui64_uint_t eui64
Definition: zigpc_discovery_events.hpp:71
Definition: zigpc_discovery_events.hpp:47
DiscoverEvent(const char *label)
Definition: zigpc_discovery_events.hpp:50
virtual sl_status_t handle(void)=0
const char * label
Definition: zigpc_discovery_events.hpp:49
Definition: zigpc_discovery_events.hpp:84
EndpointDiscoverRequest(zigbee_eui64_uint_t eui64, zigbee_endpoint_id_t endpoint_id)
zigbee_endpoint_id_t endpoint_id
Definition: zigpc_discovery_events.hpp:87
zigbee_eui64_uint_t eui64
Definition: zigpc_discovery_events.hpp:86
Definition: zigpc_discovery_events.hpp:99
EndpointDiscoverResponse(zigbee_eui64_uint_t eui64, zigbee_endpoint_id_t endpoint_id, std::vector< zcl_cluster_id_t > &&server_clusters, std::vector< zcl_cluster_id_t > &&client_clusters)
zigbee_endpoint_id_t endpoint_id
Definition: zigpc_discovery_events.hpp:102
zigbee_eui64_uint_t eui64
Definition: zigpc_discovery_events.hpp:101
std::vector< zcl_cluster_id_t > server_clusters
Definition: zigpc_discovery_events.hpp:103
std::vector< zcl_cluster_id_t > client_clusters
Definition: zigpc_discovery_events.hpp:104
#define CLOCK_SECOND
Definition: clock.h:131
uint64_t zigbee_eui64_uint_t
Zigbee Device Identifier (stored as integer)
Definition: zigpc_common_zigbee.h:199
uint8_t zigbee_endpoint_id_t
A representation of the endpoint id used on the Zigbee protocol.
Definition: zigpc_common_zigbee.h:248
enum zigpc_discovery_status zigpc_discovery_status_t
Discovery status types possible for a device being discovered.
Definition: zigpc_discovery_events.hpp:40
constexpr clock_time_t DISCOVERY_REQUEST_TIMEOUT
Definition: zigpc_discovery_events.hpp:41
void on_request_timeout(zigbee_eui64_uint_t eui64, zigpc_discovery_status_t timeout_status)
SL Status Codes.