Clean up clusters and implement default get methods for now

This commit is contained in:
Simon Stürz 2020-11-12 13:27:37 +01:00
parent af26efac17
commit 4eafe285b0
28 changed files with 153 additions and 139 deletions

View File

@ -571,7 +571,7 @@ void ZigbeeNetworkNxp::onNodeLeftIndication(const ZigbeeAddress &ieeeAddress, bo
{
qCDebug(dcZigbeeNetwork()) << "Received node left indication" << ieeeAddress.toString() << "rejoining:" << rejoining;
if (!hasNode(ieeeAddress)) {
qCWarning(dcZigbeeNetwork()) << "Unknown node left the network" << ieeeAddress.toString();
qCDebug(dcZigbeeNetwork()) << "Node left the network" << ieeeAddress.toString();
return;
}

View File

@ -113,13 +113,7 @@ ZigbeeClusterDoorLock::DoorState ZigbeeClusterDoorLock::doorState() const
void ZigbeeClusterDoorLock::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
switch (attribute.id()) {
case AttributeLockState:
@ -135,10 +129,22 @@ void ZigbeeClusterDoorLock::setAttribute(const ZigbeeClusterAttribute &attribute
void ZigbeeClusterDoorLock::processDataIndication(ZigbeeClusterLibrary::Frame frame)
{
//qCDebug(dcZigbeeCluster()) << "Processing cluster frame" << m_node << m_endpoint << this << frame;
qCDebug(dcZigbeeCluster()) << "Processing cluster frame" << m_node << m_endpoint << this << frame;
// Increase the tsn for continuous id increasing on both sides
m_transactionSequenceNumber = frame.header.transactionSequenceNumber;
qCWarning(dcZigbeeCluster()) << "Unhandled ZCL indication in" << m_node << m_endpoint << this << frame;
switch (m_direction) {
case Client:
// If the client cluster sends data to a server cluster (independent which), the command was executed on the device like button pressed
if (frame.header.frameControl.direction == ZigbeeClusterLibrary::DirectionClientToServer) {
// Read the payload which is
Command command = static_cast<Command>(frame.header.command);
qCDebug(dcZigbeeCluster()) << "Received" << command << "from" << m_node << m_endpoint << this;
}
break;
case Server:
qCWarning(dcZigbeeCluster()) << "Unhandled ZCL indication in" << m_node << m_endpoint << this << frame;
break;
}
}

View File

@ -39,11 +39,5 @@ ZigbeeClusterBasic::ZigbeeClusterBasic(ZigbeeNetwork *network, ZigbeeNode *node,
void ZigbeeClusterBasic::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}

View File

@ -64,13 +64,7 @@ ZigbeeClusterReply *ZigbeeClusterIdentify::triggerEffect(ZigbeeClusterIdentify::
void ZigbeeClusterIdentify::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}
void ZigbeeClusterIdentify::processDataIndication(ZigbeeClusterLibrary::Frame frame)

View File

@ -102,24 +102,24 @@ ZigbeeClusterReply *ZigbeeClusterLevelControl::commandStopWithOnOff()
return executeClusterCommand(ZigbeeClusterLevelControl::CommandStopWithOnOff);
}
quint8 ZigbeeClusterLevelControl::currentLevel() const
{
return m_currentLevel;
}
void ZigbeeClusterLevelControl::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeCurrentLevel) {
bool valueOk = false;
quint8 value = attribute.dataType().toUInt8(&valueOk);
if (valueOk) {
qCDebug(dcZigbeeCluster()) << "CurrentLevel state changed on" << m_node << m_endpoint << this << value;
emit currentLevelChanged(value);
m_currentLevel = value;
qCDebug(dcZigbeeCluster()) << "CurrentLevel state changed on" << m_node << m_endpoint << this << m_currentLevel;
emit currentLevelChanged(m_currentLevel);
} else {
qCWarning(dcZigbeeCluster()) << "Failed to parse attribute data" << m_node << m_endpoint << this << attribute;
}

View File

@ -94,7 +94,11 @@ public:
ZigbeeClusterReply *commandStepWithOnOff(FadeMode fadeMode, quint8 stepSize = 0x01, quint16 transitionTime = 0xffff);
ZigbeeClusterReply *commandStopWithOnOff();
quint8 currentLevel() const;
private:
quint8 m_currentLevel = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
protected:

View File

@ -76,24 +76,24 @@ ZigbeeClusterReply *ZigbeeClusterOnOff::commandOnWithTimedOff(bool acceptOnlyWhe
return executeClusterCommand(ZigbeeClusterOnOff::CommandOnWithTimedOff, payload);
}
bool ZigbeeClusterOnOff::power() const
{
return m_power;
}
void ZigbeeClusterOnOff::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeOnOff) {
bool valueOk = false;
bool value = attribute.dataType().toBool(&valueOk);
if (valueOk) {
qCDebug(dcZigbeeCluster()) << "OnOff state changed on" << m_node << m_endpoint << this << value;
emit powerChanged(value);
m_power = value;
qCDebug(dcZigbeeCluster()) << "OnOff state changed on" << m_node << m_endpoint << this << m_power;
emit powerChanged(m_power);
} else {
qCWarning(dcZigbeeCluster()) << "Failed to parse attribute data" << m_node << m_endpoint << this << attribute;
}

View File

@ -79,7 +79,11 @@ public:
ZigbeeClusterReply *commandOnWithRecallGlobalScene();
ZigbeeClusterReply *commandOnWithTimedOff(bool acceptOnlyWhenOn, quint16 onTime, quint16 offWaitTime);
bool power() const;
private:
bool m_power = false;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
protected:

View File

@ -36,23 +36,23 @@ ZigbeeClusterPowerConfiguration::ZigbeeClusterPowerConfiguration(ZigbeeNetwork *
}
double ZigbeeClusterPowerConfiguration::batteryPercentage() const
{
return m_batteryPercentage;
}
void ZigbeeClusterPowerConfiguration::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
if (attribute.id() == AttributeBatteryPercentageRemaining) {
bool valueOk = false;
quint8 value = attribute.dataType().toUInt8(&valueOk);
if (valueOk) {
qCDebug(dcZigbeeCluster()) << "PowerConfiguration attribute changed on" << m_node << m_endpoint << this << value;
emit batteryPercentageChanged(value / 2.0);
m_batteryPercentage = value / 2.0;
qCDebug(dcZigbeeCluster()) << "PowerConfiguration remaining battery percentage changed on" << m_node << m_endpoint << this << m_batteryPercentage << "%";
emit batteryPercentageChanged(m_batteryPercentage);
} else {
qCWarning(dcZigbeeCluster()) << "Failed to parse attribute data" << m_node << m_endpoint << this << attribute;
}

View File

@ -89,7 +89,11 @@ public:
explicit ZigbeeClusterPowerConfiguration(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
double batteryPercentage() const;
private:
double m_batteryPercentage = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -216,14 +216,7 @@ ZigbeeClusterReply *ZigbeeClusterColorControl::commandStepColorTemperature(Zigbe
void ZigbeeClusterColorControl::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Attribute changed" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}
void ZigbeeClusterColorControl::processDataIndication(ZigbeeClusterLibrary::Frame frame)

View File

@ -36,24 +36,24 @@ ZigbeeClusterIlluminanceMeasurment::ZigbeeClusterIlluminanceMeasurment(ZigbeeNet
}
quint16 ZigbeeClusterIlluminanceMeasurment::illuminance() const
{
return m_illuminance;
}
void ZigbeeClusterIlluminanceMeasurment::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeMeasuredValue) {
bool valueOk = false;
quint16 value = attribute.dataType().toUInt16(&valueOk);
if (valueOk) {
qCDebug(dcZigbeeCluster()) << "Illuminance changed on" << m_node << m_endpoint << this << value << "lux";
emit illuminanceChanged(value);
m_illuminance = value;
qCDebug(dcZigbeeCluster()) << "Illuminance changed on" << m_node << m_endpoint << this << m_illuminance << "lux";
emit illuminanceChanged(m_illuminance);
}
}
}

View File

@ -63,7 +63,11 @@ public:
explicit ZigbeeClusterIlluminanceMeasurment(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
quint16 illuminance() const;
private:
quint16 m_illuminance = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -36,24 +36,24 @@ ZigbeeClusterOccupancySensing::ZigbeeClusterOccupancySensing(ZigbeeNetwork *netw
}
bool ZigbeeClusterOccupancySensing::occupied() const
{
return m_occupied;
}
void ZigbeeClusterOccupancySensing::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeOccupancy) {
bool valueOk = false;
bool value = attribute.dataType().toBool(&valueOk);
if (valueOk) {
qCDebug(dcZigbeeCluster()) << "Occupancy changed on" << m_node << m_endpoint << this << value;
emit occupancyChanged(value);
m_occupied = value;
qCDebug(dcZigbeeCluster()) << "Occupancy changed on" << m_node << m_endpoint << this << m_occupied;
emit occupancyChanged(m_occupied);
}
}
}

View File

@ -72,7 +72,11 @@ public:
explicit ZigbeeClusterOccupancySensing(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
bool occupied() const;
private:
bool m_occupied = false;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -36,33 +36,37 @@ ZigbeeClusterPressureMeasurement::ZigbeeClusterPressureMeasurement(ZigbeeNetwork
}
double ZigbeeClusterPressureMeasurement::pressure() const
{
return m_pressure;
}
double ZigbeeClusterPressureMeasurement::pressureScaled() const
{
return m_pressureScaled;
}
void ZigbeeClusterPressureMeasurement::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convinience
if (attribute.id() == AttributeMeasuredValue) {
bool valueOk = false;
qint16 value = attribute.dataType().toInt16(&valueOk);
if (valueOk) {
double pressure = value / 10.0;
qCDebug(dcZigbeeCluster()) << "Pressure changed on" << m_node << m_endpoint << this << pressure << "kPa";
emit pressureChanged(pressure);
m_pressure = value / 10.0;
qCDebug(dcZigbeeCluster()) << "Pressure changed on" << m_node << m_endpoint << this << m_pressure << "kPa";
emit pressureChanged(m_pressure);
}
} else if (attribute.id() == AttributeScaledValue) {
bool valueOk = false;
qint16 value = attribute.dataType().toInt16(&valueOk);
if (valueOk) {
double pressureScaled = value / 10.0;
qCDebug(dcZigbeeCluster()) << "Pressure scaled changed on" << m_node << m_endpoint << this << pressureScaled << "Pa";
emit pressureScaledChanged(pressureScaled);
m_pressureScaled = value / 10.0;
qCDebug(dcZigbeeCluster()) << "Pressure scaled changed on" << m_node << m_endpoint << this << m_pressureScaled << "Pa";
emit pressureScaledChanged(m_pressureScaled);
}
}
}

View File

@ -62,7 +62,12 @@ public:
explicit ZigbeeClusterPressureMeasurement(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
double pressure() const;
double pressureScaled() const;
private:
double m_pressure = 0;
double m_pressureScaled = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -36,25 +36,24 @@ ZigbeeClusterRelativeHumidityMeasurement::ZigbeeClusterRelativeHumidityMeasureme
}
double ZigbeeClusterRelativeHumidityMeasurement::humidity() const
{
return m_humidity;
}
void ZigbeeClusterRelativeHumidityMeasurement::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeMeasuredValue) {
bool valueOk = false;
quint16 value = attribute.dataType().toUInt16(&valueOk);
if (valueOk) {
double humidity = value / 100.0;
qCDebug(dcZigbeeCluster()) << "Humidity changed on" << m_node << m_endpoint << this << humidity << "%";
emit humidityChanged(humidity);
m_humidity = value / 100.0;
qCDebug(dcZigbeeCluster()) << "Humidity changed on" << m_node << m_endpoint << this << m_humidity << "%";
emit humidityChanged(m_humidity);
}
}
}

View File

@ -56,7 +56,11 @@ public:
explicit ZigbeeClusterRelativeHumidityMeasurement(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
double humidity() const;
private:
double m_humidity = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -36,25 +36,24 @@ ZigbeeClusterTemperatureMeasurement::ZigbeeClusterTemperatureMeasurement(ZigbeeN
}
double ZigbeeClusterTemperatureMeasurement::temperature() const
{
return m_temperature;
}
void ZigbeeClusterTemperatureMeasurement::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
// Parse the information for convenience
if (attribute.id() == AttributeMeasuredValue) {
bool valueOk = false;
qint16 value = attribute.dataType().toInt16(&valueOk);
if (valueOk) {
double temperature = value / 100.0;
qCDebug(dcZigbeeCluster()) << "Temperature changed on" << m_node << m_endpoint << this << temperature << "°C";
emit temperatureChanged(temperature);
m_temperature = value / 100.0;
qCDebug(dcZigbeeCluster()) << "Temperature changed on" << m_node << m_endpoint << this << m_temperature << "°C";
emit temperatureChanged(m_temperature);
}
}
}

View File

@ -56,7 +56,11 @@ public:
explicit ZigbeeClusterTemperatureMeasurement(ZigbeeNetwork *network, ZigbeeNode *node, ZigbeeNodeEndpoint *endpoint, Direction direction, QObject *parent = nullptr);
double temperature() const;
private:
double m_temperature = 0;
void setAttribute(const ZigbeeClusterAttribute &attribute) override;
signals:

View File

@ -42,13 +42,7 @@ ZigbeeClusterOta::ZigbeeClusterOta(ZigbeeNetwork *network, ZigbeeNode *node, Zig
void ZigbeeClusterOta::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}
ZigbeeClusterOta::FileVersion ZigbeeClusterOta::parseFileVersion(quint32 fileVersionValue)

View File

@ -42,13 +42,7 @@ ZigbeeClusterIasZone::ZigbeeClusterIasZone(ZigbeeNetwork *network, ZigbeeNode *n
void ZigbeeClusterIasZone::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << static_cast<Attribute>(attribute.id()) << attribute.dataType();
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}
void ZigbeeClusterIasZone::processDataIndication(ZigbeeClusterLibrary::Frame frame)

View File

@ -97,7 +97,7 @@ public:
ZoneStatusTest = 0x0100,
ZoneStatusBatteryDefect = 0x0200
};
Q_ENUM(ZoneStatus)
Q_FLAG(ZoneStatus)
Q_DECLARE_FLAGS(ZoneStatusFlags, ZoneStatus)
enum EnrollResponseCode {
@ -137,6 +137,4 @@ signals:
};
Q_DECLARE_OPERATORS_FOR_FLAGS(ZigbeeClusterIasZone::ZoneStatusFlags)
#endif // ZIGBEECLUSTERIASZONE_H

View File

@ -93,13 +93,7 @@ ZigbeeClusterAttribute ZigbeeCluster::attribute(quint16 attributeId)
void ZigbeeCluster::setAttribute(const ZigbeeClusterAttribute &attribute)
{
qCDebug(dcZigbeeCluster()) << "Update attribute" << m_node << m_endpoint << this << attribute;
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
updateOrAddAttribute(attribute);
}
ZigbeeClusterReply *ZigbeeCluster::readAttributes(QList<quint16> attributes)
@ -363,6 +357,17 @@ void ZigbeeCluster::processDataIndication(ZigbeeClusterLibrary::Frame frame)
qCWarning(dcZigbeeCluster()) << "Unhandled ZCL indication in" << m_node << m_endpoint << this << frame;
}
void ZigbeeCluster::updateOrAddAttribute(const ZigbeeClusterAttribute &attribute)
{
if (hasAttribute(attribute.id())) {
m_attributes[attribute.id()] = attribute;
emit attributeChanged(attribute);
} else {
m_attributes.insert(attribute.id(), attribute);
emit attributeChanged(attribute);
}
}
void ZigbeeCluster::processApsDataIndication(const QByteArray &asdu, const ZigbeeClusterLibrary::Frame &frame)
{
// Check if this indication is for a pending reply

View File

@ -114,7 +114,6 @@ protected:
// Global commands
ZigbeeClusterReply *executeGlobalCommand(quint8 command, const QByteArray &payload = QByteArray());
// Cluster specific
ZigbeeClusterReply *createClusterReply(const ZigbeeNetworkRequest &request, ZigbeeClusterLibrary::Frame frame);
ZigbeeClusterReply *executeClusterCommand(quint8 command, const QByteArray &payload = QByteArray());
@ -126,6 +125,8 @@ protected:
virtual void processDataIndication(ZigbeeClusterLibrary::Frame frame);
void updateOrAddAttribute(const ZigbeeClusterAttribute &attribute);
private:
virtual void setAttribute(const ZigbeeClusterAttribute &attribute);

View File

@ -628,6 +628,6 @@ QDebug operator<<(QDebug debug, ZigbeeNode *node)
{
debug.nospace().noquote() << "ZigbeeNode(" << ZigbeeUtils::convertUint16ToHexString(node->shortAddress());
debug.nospace().noquote() << ", " << node->extendedAddress().toString();
debug.nospace().noquote() << ")";
return debug.space();
debug.nospace().noquote() << ") ";
return debug;
}

View File

@ -285,6 +285,6 @@ QDebug operator<<(QDebug debug, ZigbeeNodeEndpoint *endpoint)
debug.nospace().noquote() << ", " << static_cast<Zigbee::GreenPowerDevice>(endpoint->deviceId());
}
debug.nospace().noquote() << ")";
return debug.space();
debug.nospace().noquote() << ") ";
return debug;
}