deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
node_event.h
1#ifndef DECONZ_NODE_EVENT_H
2#define DECONZ_NODE_EVENT_H
3
4/*
5 * Copyright (c) 2012-2023 dresden elektronik ingenieurtechnik gmbh.
6 * All rights reserved.
7 *
8 * The software in this package is published under the terms of the BSD
9 * style license a copy of which has been included with this distribution in
10 * the LICENSE.txt file.
11 *
12 */
13
14#include <QObject>
15#include <deconz/types.h>
16#include <deconz/aps.h>
17
18namespace deCONZ {
19
20// forward declarations
21class Node;
22class NodeEventPrivate;
23
29class DECONZ_DLLSPEC NodeEvent
30{
31public:
33 enum Event
34 {
36 NodeSelected,
38 NodeDeselected,
40 NodeContextMenu,
42 NodeAdded,
44 NodeRemoved,
46 NodeMacDataRequest,
50 NodeZombieChanged,
52 UpdatedNodeAddress,
54 UpdatedNodeDescriptor,
56 UpdatedPowerDescriptor,
58 UpdatedUserDescriptor,
62 UpdatedSimpleDescriptor,
66 UpdatedClusterData,
70 UpdatedClusterDataZclRead,
74 UpdatedClusterDataZclReport,
76 EditDeviceDDF
77 };
78
80 NodeEvent();
82 NodeEvent(Event event, const Node *node = 0, uint8_t endpoint = 0, uint16_t profileId = 0, uint16_t clusterId = 0);
84 NodeEvent(Event event, const Node *node, const ApsDataIndication &ind);
86 NodeEvent(const NodeEvent &other);
88 NodeEvent &operator= (const NodeEvent &other);
90 ~NodeEvent();
92 const Node *node() const;
94 Event event() const;
101 uint8_t endpoint() const;
106 uint16_t profileId() const;
111 uint16_t clusterId() const;
112
117 const std::vector<uint16_t> &attributeIds() const;
118
119 /* \cond INTERNAL_SYMBOLS */
120 void addAttributeId(uint16_t id);
121private:
122 NodeEventPrivate *d_ptr;
123 Q_DECLARE_PRIVATE(NodeEvent)
124};
125
126} // namespace deCONZ
127
128Q_DECLARE_METATYPE(deCONZ::NodeEvent)
129
130#endif // DECONZ_NODE_EVENT_H
The deCONZ namespace.
Definition aps.cpp:19
Declaration of the most common deCONZ library types.