Zigbee Protocol Controller 1.6.0
zigpc_ucl.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 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
36#ifndef ZIGPC_UCL_HPP
37#define ZIGPC_UCL_HPP
38
39#include <string>
40
41// Shared Unify includes
42#include <sl_status.h>
43
44// ZigPC includes
45#include <zigpc_common_zigbee.h>
46
51namespace zigpc_ucl
52{
58namespace mqtt
59{
65enum class topic_type_t {
71};
72
77typedef struct {
81
94 std::string &topic);
95
105
107 std::string endpoint_str,
108 zigbee_endpoint_id_t &endpoint);
109
111 const std::string topic,
112 zigbee_eui64_uint_t &eui64);
113
115 const std::string topic,
116 zigbee_endpoint_id_t &endpoint);
117
119 const std::string topic,
120 std::string &cluster_name);
121
123 const std::string topic,
124 const std::string payload,
125 zigbee_eui64_uint_t &source_eui64,
126 zigbee_endpoint_id_t &source_ep,
127 std::string &cluster_name,
128 zigbee_eui64_uint_t &dest_eui64,
129 zigbee_endpoint_id_t &dest_ep);
130
138
142 zigbee_endpoint_id_t endpoint_id);
143
144} // namespace mqtt
145
146namespace node_state
147{
159 zigbee_node_network_status_t network_status,
160 uint32_t max_cmd_delay);
161
170
178
179} // namespace node_state
180
181} // namespace zigpc_ucl
182
183#endif /* ZIGPC_UCL_HPP */
184
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
uint8_t zigbee_endpoint_id_t
A representation of the endpoint id used on the Zigbee protocol.
Definition: zigpc_common_zigbee.h:248
enum zigbee_node_network_status zigbee_node_network_status_t
The possible states that a Zigbee node can be in.
sl_status_t parse_unid(std::string unid, zigbee_eui64_uint_t &eui64)
Parse a UCL UNID into Zigbee device identifier.
sl_status_t parse_topic_endpoint(const std::string topic, zigbee_endpoint_id_t &endpoint)
topic_type_t
Types of specific UCL topics that can be build along with variables passed via mqtt::topic_data_t.
Definition: zigpc_ucl.hpp:65
sl_status_t parse_topic_eui64(const std::string topic, zigbee_eui64_uint_t &eui64)
std::string build_unid(zigbee_eui64_uint_t eui64)
Build a UCL UNID based on the Zigbee device identifier.
sl_status_t publish_supported_generated(zigbee_eui64_uint_t eui64, zigbee_endpoint_id_t endpoint_id)
sl_status_t build_topic(zigpc_ucl::mqtt::topic_type_t topic_type, zigpc_ucl::mqtt::topic_data_t topic_data, std::string &topic)
Populate the topic string based on the topic type and data passed in.
sl_status_t parse_endpoint(std::string endpoint_str, zigbee_endpoint_id_t &endpoint)
sl_status_t parse_topic_cluster(const std::string topic, std::string &cluster_name)
sl_status_t parse_binding(const std::string topic, const std::string payload, zigbee_eui64_uint_t &source_eui64, zigbee_endpoint_id_t &source_ep, std::string &cluster_name, zigbee_eui64_uint_t &dest_eui64, zigbee_endpoint_id_t &dest_ep)
sl_status_t remove_node_topics(zigbee_eui64_uint_t eui64)
Unretain all topic for a particular device.
void cleanup_all_node_topics(void)
Unretain all node topics except the node state topic.
sl_status_t publish_state(zigbee_eui64_uint_t eui64, zigbee_node_network_status_t network_status, uint32_t max_cmd_delay)
Update the device status with the parameters provided. This handler will publish the updated device s...
UCL topic and payload manipulators in the Zigbee Protocol Controller.
Definition: zigpc_ucl.hpp:52
SL Status Codes.
Data that is used to build UCL topics.
Definition: zigpc_ucl.hpp:77
zigbee_eui64_uint_t eui64
Definition: zigpc_ucl.hpp:78
zigbee_endpoint_id_t endpoint_id
Definition: zigpc_ucl.hpp:79