This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2020-05-25 22:25:49 +02:00

56 lines
1.7 KiB
C++

#ifndef ZIGBEECLUSTERBASIC_H
#define ZIGBEECLUSTERBASIC_H
#include <QObject>
#include "zcl/zigbeecluster.h"
class ZigbeeClusterBasic : public ZigbeeCluster
{
Q_OBJECT
public:
friend class ZigbeeNode;
friend class ZigbeeNetwork;
enum Attribute {
AttributeZclVersion = 0x0000, // Mandatory
AttributeAppVersion = 0x0001,
AttributeStackVersion = 0x0002,
AttributeHardwareVersion = 0x0003,
AttributeManufacturerName = 0x0004,
AttributeModelIdentifier = 0x0005,
AttributeDateCode = 0x0006, // ISO 8601 YYYYMMDD
AttributePowerSource = 0x0007, // Mandatory
AttributeLocationDescription = 0x0010,
AttributePhysicalEnvironment = 0x0011,
AttributeDeviceEnabled = 0x0012, // 0: disabled, 1: enabled
AttributeAlarmMask = 0x0013,
AttributeDisableLocalConfig = 0x0014,
AttributeSwBuildId = 0x4000
};
Q_ENUM(Attribute)
// Enum for AttributePowerSource(0x0007)
enum AttributePowerSourceValue {
AttributePowerSourceValueUnknown = 0x00,
AttributePowerSourceValueMainsSinglePhase = 0x01,
AttributePowerSourceValueMainsThreePhase = 0x02,
AttributePowerSourceValueBattery = 0x03,
AttributePowerSourceValueDcSource = 0x04,
AttributePowerSourceValueEmergencyMainsConstantlyPowered = 0x05,
AttributePowerSourceValueEmergencyMainsTransferSwitch = 0x06
};
Q_ENUM(AttributePowerSourceValue)
explicit ZigbeeClusterBasic(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
private:
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:
};
#endif // ZIGBEECLUSTERBASIC_H