1#ifndef DECONZ_APS_CONTROLLER_H
2#define DECONZ_APS_CONTROLLER_H
16#include <deconz/aps.h>
17#include <deconz/binding_table.h>
19#define FW_ONLY_AVR_BOOTLOADER 1
20#define FW_ONLY_R21_BOOTLOADER 2
30 FirmwareUpdateReadyToStart,
325 void nodeEvent(
const deCONZ::NodeEvent&);
330 void configurationChanged();
335 void networkStateChangeRequest(
bool);
350 void sourceRouteDeleted(
const QString &uuid);
355 void nodesRestored();
Convenience class to work with network, extended and group addresses.
Definition aps.h:111
Provides APSDE-DATA service and access to node cache.
Definition aps_controller.h:117
static ApsController * instance()
Get the singleton instance of the ApsController.
virtual uint64_t getParameter(U64Parameter parameter)=0
Returns a 64-bit parameter.
virtual bool setParameter(VariantMapParameter parameter, QVariantMap value)=0
Sets a VariantMap parameter.
virtual uint32_t getParameter(U32Parameter parameter)=0
Returns a 32-bit parameter.
virtual uint8_t getParameter(U8Parameter parameter)=0
Returns a 8-bit parameter.
virtual void removeBinding(const deCONZ::Binding &binding)=0
Removes a binding to a nodes binding table.
virtual int setNetworkState(State state)=0
Sets the current network state.
virtual int apsQueueSize()=0
Returns number of enqueued APS requests.
virtual ~ApsController()
Deconstructor.
virtual QByteArray getParameter(ArrayParameter parameter)=0
Returns a byte array parameter.
virtual int getNode(int index, const Node **node)=0
Iterates through the internal node cache.
virtual State networkState()=0
Returns the current network state.
virtual bool setParameter(U32Parameter parameter, uint32_t value)=0
Sets a 32-bit parameter.
virtual uint8_t nextRequestId()=0
Alloctes a new APS request id.
virtual QVariantMap getParameter(VariantMapParameter parameter, int index)=0
Returns a variant map parameter.
ApsController(QObject *parent)
Constructor.
virtual bool setParameter(U64Parameter parameter, uint64_t value)=0
Sets a 64-bit parameter.
virtual void addBinding(const deCONZ::Binding &binding)=0
Adds a binding, if not already exists, to a nodes binding table.
virtual bool setParameter(U16Parameter parameter, uint16_t value)=0
Sets a 16-bit parameter.
virtual bool setParameter(StringParameter parameter, const QString &value)=0
Sets a string parameter.
virtual int apsdeDataRequest(const ApsDataRequest &req)=0
Send a APSDE-DATA.request to the network.
virtual QString getParameter(StringParameter parameter)=0
Returns a string parameter.
virtual void activateSourceRoute(const SourceRoute &sourceRoute)=0
Activate a source route, also called when restored from database.
virtual int setPermitJoin(uint8_t duration)=0
Sets the permit join duration.
virtual bool setParameter(U8Parameter parameter, uint8_t value)=0
Sets a 8-bit parameter.
virtual uint16_t getParameter(U16Parameter parameter)=0
Returns a 16-bit parameter.
virtual bool setParameter(ArrayParameter parameter, QByteArray value)=0
Sets a byte array parameter.
virtual int resolveAddress(Address &addr)=0
Fills in missing network or extended IEEE address information.
virtual bool updateNode(const Node &node)=0
TODO: return object instead of pointer ...
APSDE-DATA.confirm primitive.
Definition aps.h:352
APSDE-DATA.indication primitive.
Definition aps.h:408
APSDE-DATA.request primitive.
Definition aps.h:227
Definition binding_table.h:24
Represents a ZigBee node with all its descriptors and clusters.
Definition node.h:119
The deCONZ namespace.
Definition aps.cpp:19
U16Parameter
Parameters of type uint16_t.
Definition aps_controller.h:56
@ ParamNwkAddress
the network address of the device
Definition aps_controller.h:58
@ ParamHttpPort
the http server port
Definition aps_controller.h:59
@ ParamPANID
the short PANID
Definition aps_controller.h:57
U8Parameter
Parameters of type uint8_t.
Definition aps_controller.h:37
@ ParamCurrentChannel
the current operation channel
Definition aps_controller.h:38
@ ParamPermitJoin
permit join duration
Definition aps_controller.h:41
@ ParamAutoPollingActive
Automatic polling of ZDP / REST Plugin: 1 = activated, 0 = deactivated.
Definition aps_controller.h:43
@ ParamFirmwareUpdateActive
values from FirmwareUpdateState enum
Definition aps_controller.h:45
@ ParamOtauActive
otau server: 1 = activated, 0 = deactivated
Definition aps_controller.h:42
@ ParamDeviceConnected
device connected state: 1 = connected, 0 = disconnected
Definition aps_controller.h:46
@ ParamApsAck
aps ack enabled/disabled
Definition aps_controller.h:47
@ ParamNetworkUpdateId
network update id
Definition aps_controller.h:44
@ ParamStaticNwkAddress
static NwkAddress enabled/disabled
Definition aps_controller.h:50
@ ParamSecurityMode
one of the deCONZ::SecurityMode values
Definition aps_controller.h:40
@ ParamPredefinedPanId
Predefined PanId enabled/disabled.
Definition aps_controller.h:48
@ ParamDeviceType
deCONZ::Coordinator or deCONZ::Router
Definition aps_controller.h:39
@ ParamCustomMacAddress
custom Mac Address enabled/disabled
Definition aps_controller.h:49
ArrayParameter
Parameters of type QByteArray.
Definition aps_controller.h:93
@ ParamSecurityMaterial0
the 256-bit security material set 0
Definition aps_controller.h:96
@ ParamNetworkKey
the 128-bit network key
Definition aps_controller.h:94
@ ParamTrustCenterLinkKey
the 128-bit trust center link key
Definition aps_controller.h:95
U64Parameter
Parameters of type uint64_t.
Definition aps_controller.h:74
@ ParamExtendedPANID
the current extended PANID
Definition aps_controller.h:76
@ ParamApsUseExtendedPANID
the extended PANID to use during join
Definition aps_controller.h:75
@ ParamMacAddress
the MAC address of the device
Definition aps_controller.h:77
@ ParamTrustCenterAddress
the MAC address of the trust center
Definition aps_controller.h:78
State
The state of a device or node.
Definition types.h:376
U32Parameter
Parameters of type uint32_t.
Definition aps_controller.h:65
@ ParamChannelMask
the 32-bit bitmap with enabled channels set as bit
Definition aps_controller.h:66
@ ParamFirmwareVersion
the firmware version of the connected device, special value 1 means bootloader but no firmware
Definition aps_controller.h:67
@ ParamFrameCounter
the current outgoing frame counter
Definition aps_controller.h:68
StringParameter
Parameters of type QString.
Definition aps_controller.h:84
@ ParamDeviceName
name of the connetced device (RaspBee, ConBee, ...)
Definition aps_controller.h:85
@ ParamHttpRoot
the http server root directory
Definition aps_controller.h:87
@ ParamDevicePath
/dev/ttyUSB0, /dev/ttyAMA0, COM49, ...
Definition aps_controller.h:86
VariantMapParameter
Parameters of type QVariantMap.
Definition aps_controller.h:102
FirmwareUpdateState
Values for ParamFirmwareUpdateActive.
Definition aps_controller.h:28
Declaration of the most common deCONZ library types.