diff --git a/examples/window-app/common/gen/CHIPClientCallbacks.cpp b/examples/window-app/common/gen/CHIPClientCallbacks.cpp index 759d13c5028d26..b6d4e79d154630 100644 --- a/examples/window-app/common/gen/CHIPClientCallbacks.cpp +++ b/examples/window-app/common/gen/CHIPClientCallbacks.cpp @@ -16,3 +16,999 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include "gen/CHIPClientCallbacks.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::List; + +constexpr uint16_t kByteSpanSizeLengthInBytes = 2; + +#define CHECK_STATUS(error) \ + if (CHIP_NO_ERROR != error) \ + { \ + ChipLogError(Zcl, "CHECK_STATUS %s", ErrorStr(error)); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return true; \ + } + +#define CHECK_MESSAGE_LENGTH(value) \ + if (!chip::CanCastTo(value)) \ + { \ + ChipLogError(Zcl, "CHECK_MESSAGE_LENGTH expects a uint16_t value, got: %d", value); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return true; \ + } \ + \ + if (messageLen < value) \ + { \ + ChipLogError(Zcl, "Unexpected response length: %d", messageLen); \ + if (onFailureCallback != nullptr) \ + { \ + Callback::Callback * cb = \ + Callback::Callback::FromCancelable(onFailureCallback); \ + cb->mCall(cb->mContext, static_cast(EMBER_ZCL_STATUS_INVALID_VALUE)); \ + } \ + return true; \ + } \ + \ + messageLen = static_cast(messageLen - static_cast(value)); + +#define GET_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceId = emberAfCurrentCommand()->SourceNodeId(); \ + uint8_t sequenceNumber = emberAfCurrentCommand()->seqNum; \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceId, sequenceNumber, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +#define GET_CLUSTER_RESPONSE_CALLBACKS(name) \ + Callback::Cancelable * onSuccessCallback = nullptr; \ + Callback::Cancelable * onFailureCallback = nullptr; \ + NodeId sourceIdentifier = reinterpret_cast(commandObj); \ + /* #6559: Currently, we only have one commands for the IMInvokeCommands and to a device, so the seqNum is always set to 0. */ \ + CHIP_ERROR err = gCallbacks.GetResponseCallback(sourceIdentifier, 0, &onSuccessCallback, &onFailureCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onSuccessCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing success callback", name); \ + } \ + \ + if (onFailureCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing failure callback", name); \ + } \ + \ + return true; \ + } + +#define GET_REPORT_CALLBACK(name) \ + Callback::Cancelable * onReportCallback = nullptr; \ + CHIP_ERROR err = gCallbacks.GetReportCallback(sourceId, endpointId, clusterId, attributeId, &onReportCallback); \ + \ + if (CHIP_NO_ERROR != err) \ + { \ + if (onReportCallback == nullptr) \ + { \ + ChipLogDetail(Zcl, "%s: Missing report callback", name); \ + } \ + \ + return true; \ + } + +void LogStatus(uint8_t status) +{ + switch (status) + { + case EMBER_ZCL_STATUS_SUCCESS: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_SUCCESS (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_FAILURE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_FAILURE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_NOT_AUTHORIZED: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_NOT_AUTHORIZED (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_MALFORMED_COMMAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_MALFORMED_COMMAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUP_COMMAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUP_CLUSTER_COMMAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUP_GENERAL_COMMAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUP_GENERAL_COMMAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INVALID_FIELD: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INVALID_FIELD (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INVALID_VALUE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INVALID_VALUE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_READ_ONLY: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_READ_ONLY (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INSUFFICIENT_SPACE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INSUFFICIENT_SPACE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_DUPLICATE_EXISTS: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_DUPLICATE_EXISTS (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_NOT_FOUND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_NOT_FOUND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INVALID_DATA_TYPE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INVALID_DATA_TYPE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INVALID_SELECTOR: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INVALID_SELECTOR (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_WRITE_ONLY: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_WRITE_ONLY (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INCONSISTENT_STARTUP_STATE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INCONSISTENT_STARTUP_STATE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_DEFINED_OUT_OF_BAND: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_DEFINED_OUT_Of_BAND (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_ACTION_DENIED: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_ACTION_DENIED (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_TIMEOUT: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_TIMEOUT (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_ABORT: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_ABORT (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_INVALID_IMAGE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_INVALID_IMAGE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_WAIT_FOR_DATA: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_WAIT_FOR_DATA (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_NO_IMAGE_AVAILABLE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_NO_IMAGE_AVAILABLE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_REQUIRE_MORE_IMAGE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_REQUIRE_MORE_IMAGE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_HARDWARE_FAILURE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_HARDWARE_FAILURE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_SOFTWARE_FAILURE: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_SOFTWARE_FAILURE (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER (0x%02x)", status); + break; + case EMBER_ZCL_STATUS_LIMIT_REACHED: + ChipLogProgress(Zcl, " status: EMBER_ZCL_STATUS_LIMIT_REACHED (0x%02x)", status); + break; + default: + ChipLogError(Zcl, "Unknow status: 0x%02x", status); + break; + } +} + +void LogStringAttribute(const uint8_t * string, const uint16_t length, const bool isAscii) +{ + if (isAscii) + { + ChipLogProgress(Zcl, " value: %.*s", length, string); + return; + } + + constexpr size_t kByteInHexLength = 3; // 2 hex digits + space + char buffer[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE] = " value: "; + char * bufferPos = buffer + strlen(buffer); + char * const bufferEnd = buffer + CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE; + + for (uint16_t i = 0; i < length && bufferPos + kByteInHexLength < bufferEnd; i++, bufferPos += kByteInHexLength) + { + snprintf(bufferPos, static_cast(bufferEnd - bufferPos), "%02X ", string[i]); + } + + ChipLogProgress(Zcl, "%s", buffer); +} + +// Singleton instance of the callbacks manager +app::CHIPDeviceCallbacksMgr & gCallbacks = app::CHIPDeviceCallbacksMgr::GetInstance(); + +bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) +{ + ChipLogProgress(Zcl, "DefaultResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + ChipLogProgress(Zcl, " CommandId: 0x%02x", commandId); + LogStatus(status); + + GET_RESPONSE_CALLBACKS("emberAfDefaultResponseCallback"); + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + } + else + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, static_cast(status)); + } + + return true; +} + +bool IMDefaultResponseCallback(const chip::app::Command * commandObj, EmberAfStatus status) +{ + ChipLogProgress(Zcl, "DefaultResponse:"); + ChipLogProgress(Zcl, " Transaction: %p", commandObj); + LogStatus(status); + + GET_CLUSTER_RESPONSE_CALLBACKS("emberAfDefaultResponseCallback"); + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + } + else + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, static_cast(status)); + } + + return true; +} + +bool emberAfReadAttributesResponseCallback(ClusterId clusterId, uint8_t * message, uint16_t messageLen) +{ + ChipLogProgress(Zcl, "ReadAttributesResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + + GET_RESPONSE_CALLBACKS("emberAfReadAttributesResponseCallback"); + + // struct readAttributeResponseRecord[] + while (messageLen) + { + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + CHECK_MESSAGE_LENGTH(1); + uint8_t status = chip::Encoding::Read8(message); // zclStatus + LogStatus(status); + + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + CHECK_MESSAGE_LENGTH(1); + uint8_t attributeType = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " attributeType: 0x%02x", attributeType); + + switch (attributeType) + { + case 0x00: // nodata / No data + case 0x0A: // data24 / 24-bit data + case 0x0C: // data40 / 40-bit data + case 0x0D: // data48 / 48-bit data + case 0x0E: // data56 / 56-bit data + case 0x1A: // map24 / 24-bit bitmap + case 0x1C: // map40 / 40-bit bitmap + case 0x1D: // map48 / 48-bit bitmap + case 0x1E: // map56 / 56-bit bitmap + case 0x22: // uint24 / Unsigned 24-bit integer + case 0x24: // uint40 / Unsigned 40-bit integer + case 0x25: // uint48 / Unsigned 48-bit integer + case 0x26: // uint56 / Unsigned 56-bit integer + case 0x2A: // int24 / Signed 24-bit integer + case 0x2C: // int40 / Signed 40-bit integer + case 0x2D: // int48 / Signed 48-bit integer + case 0x2E: // int56 / Signed 56-bit integer + case 0x38: // semi / Semi-precision + case 0x39: // single / Single precision + case 0x3A: // double / Double precision + case 0x49: // struct / Structure + case 0x50: // set / Set + case 0x51: // bag / Bag + case 0xE0: // ToD / Time of day + { + ChipLogError(Zcl, "attributeType 0x%02x is not supported", attributeType); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + return true; + } + + case 0x41: // octstr / Octet string + case 0x42: // string / Character string + { + // Short Strings must contains at least one byte for the length + CHECK_MESSAGE_LENGTH(1); + uint8_t length = chip::Encoding::Read8(message); + + // When the length is set to 0xFF, it represents a non-value. In this case the data field is zero length. + if (length == 0xFF) + { + length = 0; + } + + CHECK_MESSAGE_LENGTH(length); + LogStringAttribute(message, length, attributeType == 0x42); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, chip::ByteSpan(message, length)); + break; + } + + case 0x43: // octstr16 / Long octet string + case 0x44: // string16 / Long character string + { + // Long Strings must contains at least two bytes for the length + CHECK_MESSAGE_LENGTH(2); + uint16_t length = chip::Encoding::LittleEndian::Read16(message); + + // When the length is set to 0xFFFF, it represents a non-value. In this case the data field is zero length. + if (length == 0xFFFF) + { + length = 0; + } + + CHECK_MESSAGE_LENGTH(length); + LogStringAttribute(message, length, attributeType == 0x44); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, chip::ByteSpan(message, length)); + break; + } + case 0x48: // array / Array + { + CHECK_MESSAGE_LENGTH(2); + uint16_t count = chip::Encoding::LittleEndian::Read16(message); + ChipLogProgress(Zcl, " count: %" PRIu16, count); + + switch (clusterId) + { + } + break; + } + + case 0x08: // data8 / 8-bit data + case 0x18: // map8 / 8-bit bitmap + case 0x20: // uint8 / Unsigned 8-bit integer + case 0x30: // enum8 / 8-bit enumeration + { + CHECK_MESSAGE_LENGTH(1); + uint8_t value = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " value: 0x%02x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x09: // data16 / 16-bit data + case 0x19: // map16 / 16-bit bitmap + case 0x21: // uint16 / Unsigned 16-bit integer + case 0x31: // enum16 / 16-bit enumeration + case 0xE8: // clusterId / Cluster ID + case 0xE9: // attribId / Attribute ID + case 0xEA: // bacOID / BACnet OID + case 0xF1: // key128 / 128-bit security key + case 0xFF: // unk / Unknown + { + CHECK_MESSAGE_LENGTH(2); + uint16_t value = chip::Encoding::LittleEndian::Read16(message); + ChipLogProgress(Zcl, " value: 0x%04x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x0B: // data32 / 32-bit data + case 0x1B: // map32 / 32-bit bitmap + case 0x23: // uint32 / Unsigned 32-bit integer + case 0xE1: // date / Date + case 0xE2: // UTC / UTCTime + { + CHECK_MESSAGE_LENGTH(4); + uint32_t value = chip::Encoding::LittleEndian::Read32(message); + ChipLogProgress(Zcl, " value: 0x%08x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x0F: // data64 / 64-bit data + case 0x1F: // map64 / 64-bit bitmap + case 0x27: // uint64 / Unsigned 64-bit integer + case 0xF0: // EUI64 / IEEE address + { + CHECK_MESSAGE_LENGTH(8); + uint64_t value = chip::Encoding::LittleEndian::Read64(message); + ChipLogProgress(Zcl, " value: 0x" ChipLogFormatX64, ChipLogValueX64(value)); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x10: // bool / Boolean + { + CHECK_MESSAGE_LENGTH(1); + uint8_t value = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " value: %d", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x28: // int8 / Signed 8-bit integer + { + CHECK_MESSAGE_LENGTH(1); + int8_t value = chip::CastToSigned(chip::Encoding::Read8(message)); + ChipLogProgress(Zcl, " value: %" PRId8, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x29: // int16 / Signed 16-bit integer + { + CHECK_MESSAGE_LENGTH(2); + int16_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read16(message)); + ChipLogProgress(Zcl, " value: %" PRId16, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x2B: // int32 / Signed 32-bit integer + { + CHECK_MESSAGE_LENGTH(4); + int32_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read32(message)); + ChipLogProgress(Zcl, " value: %" PRId32, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x2F: // int64 / Signed 64-bit integer + { + CHECK_MESSAGE_LENGTH(8); + int64_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read64(message)); + ChipLogProgress(Zcl, " value: %" PRId64, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, value); + break; + } + } + } + else + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, status); + } + + // The current code is written matching the current API where there is a single attribute read + // per read command. So if multiple attributes are read at the same time, something is wrong + // somewhere. + if (messageLen) + { + ChipLogError(Zcl, "Multiple attributes read at the same time. Something went wrong."); + break; + } + } + + return true; +} + +bool emberAfWriteAttributesResponseCallback(ClusterId clusterId, uint8_t * message, uint16_t messageLen) +{ + ChipLogProgress(Zcl, "WriteAttributesResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + + GET_RESPONSE_CALLBACKS("emberAfWriteAttributesResponseCallback"); + + // struct writeAttributeResponseRecord[] + while (messageLen) + { + CHECK_MESSAGE_LENGTH(1); + uint8_t status = chip::Encoding::Read8(message); // zclStatus + LogStatus(status); + + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + } + else + { + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, status); + } + + // The current code is written matching the current API where there is a single attribute written + // per write command. So if multiple attributes are written at the same time, something is wrong + // somewhere. + if (messageLen) + { + ChipLogError(Zcl, "Multiple attributes written at the same time. Something went wrong."); + break; + } + } + + return true; +} + +bool emberAfConfigureReportingResponseCallback(ClusterId clusterId, uint8_t * message, uint16_t messageLen) +{ + ChipLogProgress(Zcl, "ConfigureReportingResponseCallback:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + + GET_RESPONSE_CALLBACKS("emberAfConfigureReportingResponseCallback"); + + // struct configureReportingResponseRecord[] + while (messageLen) + { + CHECK_MESSAGE_LENGTH(1); + uint8_t status = chip::Encoding::Read8(message); // zclStatus + LogStatus(status); + + if (status == EMBER_ZCL_STATUS_SUCCESS) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + } + else + { + CHECK_MESSAGE_LENGTH(1); + uint8_t direction = chip::Encoding::Read8(message); // reportingRole + ChipLogProgress(Zcl, " direction: 0x%02x", direction); + + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, status); + } + + // The current code is written matching the current API where there is a single attribute report + // per configure command. So if multiple attributes are configured at the same time, something is wrong + // somewhere. + if (messageLen) + { + ChipLogError(Zcl, "Multiple attributes reports configured at the same time. Something went wrong."); + break; + } + } + + return true; +} + +bool emberAfReadReportingConfigurationResponseCallback(chip::ClusterId clusterId, uint8_t * message, uint16_t messageLen) +{ + ChipLogProgress(Zcl, "ReadReportingConfigurationResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + + GET_RESPONSE_CALLBACKS("emberAfReadReportingConfigurationResponseCallback"); + + // struct readReportingConfigurationResponseRecord[] + while (messageLen) + { + CHECK_MESSAGE_LENGTH(1); + uint8_t direction = chip::Encoding::Read8(message); // reportingRole + ChipLogProgress(Zcl, " direction: 0x%02x", direction); + + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + if (direction == EMBER_ZCL_REPORTING_DIRECTION_REPORTED) + { + CHECK_MESSAGE_LENGTH(1); + uint8_t attributeType = chip::Encoding::Read8(message); // zclType + ChipLogProgress(Zcl, " attributeType: 0x%02x", attributeType); + + CHECK_MESSAGE_LENGTH(2); + uint16_t minimumReportingInterval = chip::Encoding::LittleEndian::Read16(message); // uint16 + ChipLogProgress(Zcl, " minimumReportingInterval: %" PRIu16, minimumReportingInterval); + + CHECK_MESSAGE_LENGTH(2); + uint16_t maximumReportingInterval = chip::Encoding::LittleEndian::Read16(message); // uint16 + ChipLogProgress(Zcl, " maximumReportingInterval: %" PRIu16, maximumReportingInterval); + + // FIXME: unk is not supported yet. + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, minimumReportingInterval, maximumReportingInterval); + } + else + { + CHECK_MESSAGE_LENGTH(2); + uint16_t timeout = chip::Encoding::LittleEndian::Read16(message); // uint16 + ChipLogProgress(Zcl, " timeout: %" PRIu16, timeout); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, timeout); + } + } + + return true; +} + +bool emberAfDiscoverAttributesResponseCallback(ClusterId clusterId, bool discoveryComplete, uint8_t * message, uint16_t messageLen, + bool extended) +{ + ChipLogProgress(Zcl, "DiscoverAttributesResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + ChipLogProgress(Zcl, " discoveryComplete: %d", discoveryComplete); + ChipLogProgress(Zcl, " extended: %d", extended); + + GET_RESPONSE_CALLBACKS("emberAfDiscoverAttributesCallback"); + + // struct discoverAttributesResponseRecord[] + while (messageLen) + { + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + CHECK_MESSAGE_LENGTH(1); + uint8_t attributeType = chip::Encoding::Read8(message); // zclType + ChipLogProgress(Zcl, " attributeType: 0x%02x", attributeType); + } + + Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + return true; +} + +bool emberAfDiscoverCommandsGeneratedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) +{ + ChipLogProgress(Zcl, "DiscoverCommandsGeneratedResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + ChipLogProgress(Zcl, " manufacturerCode: 0x%04x", manufacturerCode); + ChipLogProgress(Zcl, " discoveryComplete: %d", discoveryComplete); + ChipLogProgress(Zcl, " commandIdCount: %" PRIu16, commandIdCount); + + for (uint16_t i = 0; i < commandIdCount; i++) + { + ChipLogProgress(Zcl, " commandId: 0x%02x", *commandIds++); + } + + GET_RESPONSE_CALLBACKS("emberAfDiscoverCommandsGeneratedResponseCallback"); + Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + return true; +} + +bool emberAfDiscoverCommandsReceivedResponseCallback(ClusterId clusterId, uint16_t manufacturerCode, bool discoveryComplete, + CommandId * commandIds, uint16_t commandIdCount) +{ + ChipLogProgress(Zcl, "DiscoverCommandsReceivedResponse:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + ChipLogProgress(Zcl, " manufacturerCode: 0x%04x", manufacturerCode); + ChipLogProgress(Zcl, " discoveryComplete: %d", discoveryComplete); + ChipLogProgress(Zcl, " commandIdCount: %" PRIu16, commandIdCount); + + for (uint16_t i = 0; i < commandIdCount; i++) + { + ChipLogProgress(Zcl, " commandId: 0x%02x", *commandIds++); + } + + GET_RESPONSE_CALLBACKS("emberAfDiscoverCommandsGeneratedResponseCallback"); + Callback::Callback * cb = Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext); + return true; +} + +bool emberAfReportAttributesCallback(ClusterId clusterId, uint8_t * message, uint16_t messageLen) +{ + ChipLogProgress(Zcl, "emberAfReportAttributeCallback:"); + ChipLogProgress(Zcl, " ClusterId: 0x%04x", clusterId); + + NodeId sourceId = emberAfCurrentCommand()->SourceNodeId(); + ChipLogProgress(Zcl, " Source NodeId: %" PRIu64, sourceId); + + EndpointId endpointId = emberAfCurrentCommand()->apsFrame->sourceEndpoint; + ChipLogProgress(Zcl, " Source EndpointId: 0x%04x", endpointId); + + // TODO onFailureCallback is just here because of the CHECK_MESSAGE_LENGTH macro. It needs to be removed. + Callback::Cancelable * onFailureCallback = nullptr; + + while (messageLen) + { + CHECK_MESSAGE_LENGTH(2); + uint16_t attributeId = chip::Encoding::LittleEndian::Read16(message); // attribId + ChipLogProgress(Zcl, " attributeId: 0x%04x", attributeId); + + GET_REPORT_CALLBACK("emberAfReportAttributesCallback"); + + CHECK_MESSAGE_LENGTH(1); + uint8_t attributeType = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " attributeType: 0x%02x", attributeType); + + switch (attributeType) + { + case 0x00: // nodata / No data + case 0x0A: // data24 / 24-bit data + case 0x0C: // data40 / 40-bit data + case 0x0D: // data48 / 48-bit data + case 0x0E: // data56 / 56-bit data + case 0x1A: // map24 / 24-bit bitmap + case 0x1C: // map40 / 40-bit bitmap + case 0x1D: // map48 / 48-bit bitmap + case 0x1E: // map56 / 56-bit bitmap + case 0x22: // uint24 / Unsigned 24-bit integer + case 0x24: // uint40 / Unsigned 40-bit integer + case 0x25: // uint48 / Unsigned 48-bit integer + case 0x26: // uint56 / Unsigned 56-bit integer + case 0x2A: // int24 / Signed 24-bit integer + case 0x2C: // int40 / Signed 40-bit integer + case 0x2D: // int48 / Signed 48-bit integer + case 0x2E: // int56 / Signed 56-bit integer + case 0x38: // semi / Semi-precision + case 0x39: // single / Single precision + case 0x3A: // double / Double precision + case 0x48: // array / Array + case 0x49: // struct / Structure + case 0x50: // set / Set + case 0x51: // bag / Bag + case 0xE0: // ToD / Time of day + { + ChipLogError(Zcl, "attributeType 0x%02x is not supported", attributeType); + return true; + } + + case 0x41: // octstr / Octet string + case 0x42: // string / Character string + { + // Short Strings must contains at least one byte for the length + CHECK_MESSAGE_LENGTH(1); + uint8_t length = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " length: 0x%02x", length); + + // When the length is set to 0xFF, it represents a non-value. In this case the data field is zero length. + if (length == 0xFF) + { + length = 0; + } + + CHECK_MESSAGE_LENGTH(length); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, chip::ByteSpan(message, length)); + break; + } + + case 0x43: // octstr16 / Long octet string + case 0x44: // string16 / Long character string + { + // Long Strings must contains at least two bytes for the length + CHECK_MESSAGE_LENGTH(2); + uint16_t length = chip::Encoding::LittleEndian::Read16(message); + ChipLogProgress(Zcl, " length: 0x%02x", length); + + // When the length is set to 0xFFFF, it represents a non-value. In this case the data field is zero length. + if (length == 0xFFFF) + { + length = 0; + } + + CHECK_MESSAGE_LENGTH(length); + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, chip::ByteSpan(message, length)); + break; + } + + case 0x08: // data8 / 8-bit data + case 0x18: // map8 / 8-bit bitmap + case 0x20: // uint8 / Unsigned 8-bit integer + case 0x30: // enum8 / 8-bit enumeration + { + CHECK_MESSAGE_LENGTH(1); + uint8_t value = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " value: 0x%02x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x09: // data16 / 16-bit data + case 0x19: // map16 / 16-bit bitmap + case 0x21: // uint16 / Unsigned 16-bit integer + case 0x31: // enum16 / 16-bit enumeration + case 0xE8: // clusterId / Cluster ID + case 0xE9: // attribId / Attribute ID + case 0xEA: // bacOID / BACnet OID + case 0xF1: // key128 / 128-bit security key + case 0xFF: // unk / Unknown + { + CHECK_MESSAGE_LENGTH(2); + uint16_t value = chip::Encoding::LittleEndian::Read16(message); + ChipLogProgress(Zcl, " value: 0x%04x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x0B: // data32 / 32-bit data + case 0x1B: // map32 / 32-bit bitmap + case 0x23: // uint32 / Unsigned 32-bit integer + case 0xE1: // date / Date + case 0xE2: // UTC / UTCTime + { + CHECK_MESSAGE_LENGTH(4); + uint32_t value = chip::Encoding::LittleEndian::Read32(message); + ChipLogProgress(Zcl, " value: 0x%08x", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x0F: // data64 / 64-bit data + case 0x1F: // map64 / 64-bit bitmap + case 0x27: // uint64 / Unsigned 64-bit integer + case 0xF0: // EUI64 / IEEE address + { + CHECK_MESSAGE_LENGTH(8); + uint64_t value = chip::Encoding::LittleEndian::Read64(message); + ChipLogProgress(Zcl, " value: 0x" ChipLogFormatX64, ChipLogValueX64(value)); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x10: // bool / Boolean + { + CHECK_MESSAGE_LENGTH(1); + uint8_t value = chip::Encoding::Read8(message); + ChipLogProgress(Zcl, " value: %d", value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x28: // int8 / Signed 8-bit integer + { + CHECK_MESSAGE_LENGTH(1); + int8_t value = chip::CastToSigned(chip::Encoding::Read8(message)); + ChipLogProgress(Zcl, " value: %" PRId8, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x29: // int16 / Signed 16-bit integer + { + CHECK_MESSAGE_LENGTH(2); + int16_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read16(message)); + ChipLogProgress(Zcl, " value: %" PRId16, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x2B: // int32 / Signed 32-bit integer + { + CHECK_MESSAGE_LENGTH(4); + int32_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read32(message)); + ChipLogProgress(Zcl, " value: %" PRId32, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + + case 0x2F: // int64 / Signed 64-bit integer + { + CHECK_MESSAGE_LENGTH(8); + int64_t value = chip::CastToSigned(chip::Encoding::LittleEndian::Read64(message)); + ChipLogProgress(Zcl, " value: %" PRId64, value); + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onReportCallback); + cb->mCall(cb->mContext, value); + break; + } + } + } + + return true; +} diff --git a/examples/window-app/common/gen/CHIPClientCallbacks.h b/examples/window-app/common/gen/CHIPClientCallbacks.h index 302d36ce5d8076..dfbf602efc90f0 100644 --- a/examples/window-app/common/gen/CHIPClientCallbacks.h +++ b/examples/window-app/common/gen/CHIPClientCallbacks.h @@ -17,4 +17,35 @@ // THIS FILE IS GENERATED BY ZAP +#pragma once + +#include +#include +#include +#include +#include + +// Note: The IMDefaultResponseCallback is a bridge to the old CallbackMgr before IM is landed, so it still accepts EmberAfStatus +// instead of IM status code. +// #6308 should handle IM error code on the application side, either modify this function or remove this. +bool IMDefaultResponseCallback(const chip::app::Command * commandObj, EmberAfStatus status); + +// Global Response Callbacks +typedef void (*DefaultSuccessCallback)(void * context); +typedef void (*DefaultFailureCallback)(void * context, uint8_t status); +typedef void (*BooleanAttributeCallback)(void * context, bool value); +typedef void (*Int8uAttributeCallback)(void * context, uint8_t value); +typedef void (*Int8sAttributeCallback)(void * context, int8_t value); +typedef void (*Int16uAttributeCallback)(void * context, uint16_t value); +typedef void (*Int16sAttributeCallback)(void * context, int16_t value); +typedef void (*Int32uAttributeCallback)(void * context, uint32_t value); +typedef void (*Int32sAttributeCallback)(void * context, int32_t value); +typedef void (*Int64uAttributeCallback)(void * context, uint64_t value); +typedef void (*Int64sAttributeCallback)(void * context, int64_t value); +typedef void (*StringAttributeCallback)(void * context, const chip::ByteSpan value); +typedef void (*ReadReportingConfigurationReportedCallback)(void * context, uint16_t minInterval, uint16_t maxInterval); +typedef void (*ReadReportingConfigurationReceivedCallback)(void * context, uint16_t timeout); + +// Cluster Specific Response Callbacks + // List specific responses diff --git a/examples/window-app/common/gen/CHIPClusters.cpp b/examples/window-app/common/gen/CHIPClusters.cpp index 58bc84801b4b97..2df77e81751e12 100644 --- a/examples/window-app/common/gen/CHIPClusters.cpp +++ b/examples/window-app/common/gen/CHIPClusters.cpp @@ -30,5 +30,415 @@ namespace Controller { // TODO(#4503): length should be passed to commands when byte string is in argument list. // TODO(#4503): Commands should take group id as an argument. +// WindowCovering Cluster Commands +CHIP_ERROR WindowCoveringCluster::WindowCoveringDownClose(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringDownCloseCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringGoToLiftPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t percentageLiftValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringGoToLiftPercentageCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // percentageLiftValue: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), percentageLiftValue)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringGoToLiftValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t liftValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringGoToLiftValueCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // liftValue: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), liftValue)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringGoToTiltPercentage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint8_t percentageTiltValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringGoToTiltPercentageCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // percentageTiltValue: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), percentageTiltValue)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringGoToTiltValue(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t tiltValue) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringGoToTiltValueCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataElementTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // tiltValue: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), tiltValue)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringStop(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringStopCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +CHIP_ERROR WindowCoveringCluster::WindowCoveringUpOpen(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + app::CommandSender * sender = nullptr; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, kWindowCoveringUpOpenCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + + SuccessOrExit(err = chip::app::InteractionModelEngine::GetInstance()->NewCommandSender(&sender)); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + // Command takes no arguments. + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender, onSuccessCallback, onFailureCallback); + + err = mDevice->SendCommands(sender); + +exit: + // On error, we are responsible to close the sender. + if (err != CHIP_NO_ERROR && sender != nullptr) + { + sender->Shutdown(); + } + return err; +} + +// WindowCovering Cluster Attributes +CHIP_ERROR WindowCoveringCluster::DiscoverAttributes(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterDiscoverAttributes(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} +CHIP_ERROR WindowCoveringCluster::ReadAttributeWindowCoveringType(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadWindowCoveringTypeAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ConfigureAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minInterval, uint16_t maxInterval, uint16_t change) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = + encodeWindowCoveringClusterConfigureCurrentPositionLiftAttribute(seqNum, mEndpoint, minInterval, maxInterval, change); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionLift(Callback::Cancelable * onReportCallback) +{ + return RequestAttributeReporting(0x0003, onReportCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ConfigureAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint16_t minInterval, uint16_t maxInterval, uint16_t change) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = + encodeWindowCoveringClusterConfigureCurrentPositionTiltAttribute(seqNum, mEndpoint, minInterval, maxInterval, change); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionTilt(Callback::Cancelable * onReportCallback) +{ + return RequestAttributeReporting(0x0004, onReportCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadConfigStatusAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadModeAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::WriteAttributeMode(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t value) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterWriteModeAttribute(seqNum, mEndpoint, value); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + +CHIP_ERROR WindowCoveringCluster::ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + uint8_t seqNum = mDevice->GetNextSequenceNumber(); + System::PacketBufferHandle encodedCommand = encodeWindowCoveringClusterReadClusterRevisionAttribute(seqNum, mEndpoint); + return SendCommand(seqNum, std::move(encodedCommand), onSuccessCallback, onFailureCallback); +} + } // namespace Controller } // namespace chip diff --git a/examples/window-app/common/gen/CHIPClusters.h b/examples/window-app/common/gen/CHIPClusters.h index 759d13c5028d26..e756eb6b46b89d 100644 --- a/examples/window-app/common/gen/CHIPClusters.h +++ b/examples/window-app/common/gen/CHIPClusters.h @@ -16,3 +16,74 @@ */ // THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include +#include +#include + +namespace chip { +namespace Controller { + +constexpr ClusterId kWindowCoveringClusterId = 0x0102; + +class DLL_EXPORT WindowCoveringCluster : public ClusterBase +{ +public: + WindowCoveringCluster() : ClusterBase(kWindowCoveringClusterId) {} + ~WindowCoveringCluster() {} + + // Cluster Commands + CHIP_ERROR WindowCoveringDownClose(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR WindowCoveringGoToLiftPercentage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t percentageLiftValue); + CHIP_ERROR WindowCoveringGoToLiftValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t liftValue); + CHIP_ERROR WindowCoveringGoToTiltPercentage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t percentageTiltValue); + CHIP_ERROR WindowCoveringGoToTiltValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t tiltValue); + CHIP_ERROR WindowCoveringStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR WindowCoveringUpOpen(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + + // Cluster Attributes + CHIP_ERROR DiscoverAttributes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeWindowCoveringType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); + CHIP_ERROR WriteAttributeMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t value); + CHIP_ERROR ConfigureAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t minInterval, + uint16_t maxInterval, uint16_t change); + CHIP_ERROR ReportAttributeCurrentPositionLift(Callback::Cancelable * onReportCallback); + CHIP_ERROR ConfigureAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t minInterval, + uint16_t maxInterval, uint16_t change); + CHIP_ERROR ReportAttributeCurrentPositionTilt(Callback::Cancelable * onReportCallback); + +private: + static constexpr CommandId kWindowCoveringDownCloseCommandId = 0x01; + static constexpr CommandId kWindowCoveringGoToLiftPercentageCommandId = 0x05; + static constexpr CommandId kWindowCoveringGoToLiftValueCommandId = 0x04; + static constexpr CommandId kWindowCoveringGoToTiltPercentageCommandId = 0x08; + static constexpr CommandId kWindowCoveringGoToTiltValueCommandId = 0x07; + static constexpr CommandId kWindowCoveringStopCommandId = 0x02; + static constexpr CommandId kWindowCoveringUpOpenCommandId = 0x00; +}; + +} // namespace Controller +} // namespace chip diff --git a/examples/window-app/common/gen/IMClusterCommandHandler.cpp b/examples/window-app/common/gen/IMClusterCommandHandler.cpp index ebc300c8bb87ba..8fb375dab919d8 100644 --- a/examples/window-app/common/gen/IMClusterCommandHandler.cpp +++ b/examples/window-app/common/gen/IMClusterCommandHandler.cpp @@ -38,6 +38,202 @@ namespace app { namespace clusters { +namespace GeneralCommissioning { + +void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) +{ + // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV + // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. + // Any error value TLVUnpackError means we have received an illegal value. + // The following variables are used for all commands to save code size. + CHIP_ERROR TLVError = CHIP_NO_ERROR; + CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; + uint32_t validArgumentCount = 0; + uint32_t expectArgumentCount = 0; + uint32_t currentDecodeTagId = 0; + bool wasHandled = false; + { + switch (aCommandId) + { + case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { + expectArgumentCount = 3; + uint16_t expiryLengthSeconds; + uint64_t breadcrumb; + uint32_t timeoutMs; + bool argExists[3]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 3) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(expiryLengthSeconds); + break; + case 1: + TLVUnpackError = aDataTlv.Get(breadcrumb); + break; + case 2: + TLVUnpackError = aDataTlv.Get(timeoutMs); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + { + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + wasHandled = + emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, expiryLengthSeconds, breadcrumb, timeoutMs); + } + break; + } + case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); + break; + } + case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { + expectArgumentCount = 4; + uint8_t location; + const uint8_t * countryCode; + uint64_t breadcrumb; + uint32_t timeoutMs; + bool argExists[4]; + + memset(argExists, 0, sizeof argExists); + + while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) + { + // Since call to aDataTlv.Next() is CHIP_NO_ERROR, the read head always points to an element. + // Skip this element if it is not a ContextTag, not consider it as an error if other values are valid. + if (!TLV::IsContextTag(aDataTlv.GetTag())) + { + continue; + } + currentDecodeTagId = TLV::TagNumFromTag(aDataTlv.GetTag()); + if (currentDecodeTagId < 4) + { + if (argExists[currentDecodeTagId]) + { + ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); + TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; + break; + } + else + { + argExists[currentDecodeTagId] = true; + validArgumentCount++; + } + } + switch (currentDecodeTagId) + { + case 0: + TLVUnpackError = aDataTlv.Get(location); + break; + case 1: + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(countryCode); + break; + case 2: + TLVUnpackError = aDataTlv.Get(breadcrumb); + break; + case 3: + TLVUnpackError = aDataTlv.Get(timeoutMs); + break; + default: + // Unsupported tag, ignore it. + ChipLogProgress(Zcl, "Unknown TLV tag during processing."); + break; + } + if (CHIP_NO_ERROR != TLVUnpackError) + { + break; + } + } + + if (CHIP_END_OF_TLV == TLVError) + { + // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. + TLVError = CHIP_NO_ERROR; + } + + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) + { + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback( + apCommandObj, location, const_cast(countryCode), breadcrumb, timeoutMs); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + chip::app::CommandPathParams returnStatusParam = { aEndpointId, + 0, // GroupId + ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kNotFound, + Protocols::SecureChannel::Id, + Protocols::InteractionModel::ProtocolCode::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || CHIP_NO_ERROR != TLVUnpackError || expectArgumentCount != validArgumentCount || !wasHandled) + { + chip::app::CommandPathParams returnStatusParam = { aEndpointId, + 0, // GroupId + ZCL_GENERAL_COMMISSIONING_CLUSTER_ID, aCommandId, + (chip::app::CommandPathFlags::kEndpointIdValid) }; + apCommandObj->AddStatusCode(returnStatusParam, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, + Protocols::SecureChannel::Id, Protocols::InteractionModel::ProtocolCode::InvalidCommand); + ChipLogProgress(Zcl, + "Failed to dispatch command, %" PRIu32 "/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 + ", UnpackError=%" PRIu32 " (last decoded tag = %" PRIu32, + validArgumentCount, expectArgumentCount, TLVError, TLVUnpackError, currentDecodeTagId); + } +} + +} // namespace GeneralCommissioning + namespace NetworkCommissioning { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) @@ -1252,12 +1448,6 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En { switch (aCommandId) { - case ZCL_WINDOW_COVERING_DOWN_CLOSE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfWindowCoveringClusterWindowCoveringDownCloseCallback(apCommandObj); - break; - } case ZCL_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE_COMMAND_ID: { expectArgumentCount = 1; uint8_t percentageLiftValue; @@ -1496,18 +1686,6 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_WINDOW_COVERING_STOP_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfWindowCoveringClusterWindowCoveringStopCallback(apCommandObj); - break; - } - case ZCL_WINDOW_COVERING_UP_OPEN_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - wasHandled = emberAfWindowCoveringClusterWindowCoveringUpOpenCallback(apCommandObj); - break; - } default: { // Unrecognized command ID, error status will apply. chip::app::CommandPathParams returnStatusParam = { aEndpointId, @@ -1552,6 +1730,9 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC SuccessOrExit(aReader.EnterContainer(dataTlvType)); switch (aClusterId) { + case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; diff --git a/examples/window-app/common/gen/attribute-size.cpp b/examples/window-app/common/gen/attribute-size.cpp index 3e548ff5593c9f..9c124382ab6dc8 100644 --- a/examples/window-app/common/gen/attribute-size.cpp +++ b/examples/window-app/common/gen/attribute-size.cpp @@ -78,6 +78,47 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo uint16_t entryLength = 0; switch (clusterId) { + case 0x0033: // General Diagnostics Cluster + { + uint16_t entryOffset = kSizeLengthInBytes; + switch (am->attributeId) + { + case 0x0000: // NetworkInterfaces + { + entryLength = 46; + if (((index - 1) * entryLength) > (am->size - entryLength)) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid.", index); + return 0; + } + entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); + // Struct _NetworkInterfaceType + _NetworkInterfaceType * entry = reinterpret_cast<_NetworkInterfaceType *>(write ? src : dest); + chip::ByteSpan * NameSpan = &entry->Name; // OCTET_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %" PRId32 " is invalid. Not enough remaining space", index); + return 0; + } + entryOffset = static_cast(entryOffset + 34); + copyListMember(write ? dest : (uint8_t *) &entry->FabricConnected, write ? (uint8_t *) &entry->FabricConnected : src, + write, &entryOffset, sizeof(entry->FabricConnected)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv4, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv4 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv4)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->OffPremiseServicesReachableIPv6, + write ? (uint8_t *) &entry->OffPremiseServicesReachableIPv6 : src, write, &entryOffset, + sizeof(entry->OffPremiseServicesReachableIPv6)); // BOOLEAN + copyListMember(write ? dest : (uint8_t *) &entry->HardwareAddress, write ? (uint8_t *) &entry->HardwareAddress : src, + write, &entryOffset, sizeof(entry->HardwareAddress)); // IEEE_ADDRESS + copyListMember(write ? dest : (uint8_t *) &entry->Type, write ? (uint8_t *) &entry->Type : src, write, &entryOffset, + sizeof(entry->Type)); // ENUM8 + break; + } + } + break; + } case 0x003E: // Operational Credentials Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -287,6 +328,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut uint16_t entryLength = 0; switch (clusterId) { + case 0x0033: // General Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // NetworkInterfaces + // Struct _NetworkInterfaceType + entryLength = 46; + break; + } + break; case 0x003E: // Operational Credentials Cluster switch (attributeId) { diff --git a/examples/window-app/common/gen/callback-stub.cpp b/examples/window-app/common/gen/callback-stub.cpp index 8251d8136c9105..ccfcc4c270b7bd 100644 --- a/examples/window-app/common/gen/callback-stub.cpp +++ b/examples/window-app/common/gen/callback-stub.cpp @@ -32,15 +32,30 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_BASIC_CLUSTER_ID: emberAfBasicClusterInitCallback(endpoint); break; + case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: + emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); + break; + case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: + emberAfGeneralCommissioningClusterInitCallback(endpoint); + break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: emberAfNetworkCommissioningClusterInitCallback(endpoint); break; case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; + case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: + emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID: emberAfThreadNetworkDiagnosticsClusterInitCallback(endpoint); break; + case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: + emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_WINDOW_COVERING_CLUSTER_ID: emberAfWindowCoveringClusterInitCallback(endpoint); break; @@ -55,6 +70,21 @@ void __attribute__((weak)) emberAfBasicClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -65,11 +95,21 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfThreadNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfWiFiNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfWindowCoveringClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/window-app/common/gen/callback.h b/examples/window-app/common/gen/callback.h index a1b60a9cbe8104..4a96f72d86b1d5 100644 --- a/examples/window-app/common/gen/callback.h +++ b/examples/window-app/common/gen/callback.h @@ -48,6 +48,30 @@ void emberAfClusterInitCallback(chip::EndpointId endpoint, chip::ClusterId clust */ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); +/** @brief Ethernet Network Diagnostics Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfEthernetNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); + +/** @brief General Commissioning Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfGeneralCommissioningClusterInitCallback(chip::EndpointId endpoint); + +/** @brief General Diagnostics Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfGeneralDiagnosticsClusterInitCallback(chip::EndpointId endpoint); + /** @brief Network Commissioning Cluster Init * * Cluster Init @@ -64,6 +88,14 @@ void emberAfNetworkCommissioningClusterInitCallback(chip::EndpointId endpoint); */ void emberAfOperationalCredentialsClusterInitCallback(chip::EndpointId endpoint); +/** @brief Software Diagnostics Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfSoftwareDiagnosticsClusterInitCallback(chip::EndpointId endpoint); + /** @brief Thread Network Diagnostics Cluster Init * * Cluster Init @@ -72,6 +104,14 @@ void emberAfOperationalCredentialsClusterInitCallback(chip::EndpointId endpoint) */ void emberAfThreadNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); +/** @brief WiFi Network Diagnostics Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWiFiNetworkDiagnosticsClusterInitCallback(chip::EndpointId endpoint); + /** @brief Window Covering Cluster Init * * Cluster Init @@ -150,6 +190,220 @@ EmberAfStatus emberAfBasicClusterServerPreAttributeChangedCallback(chip::Endpoin */ void emberAfBasicClusterServerTickCallback(chip::EndpointId endpoint); +// +// Ethernet Network Diagnostics Cluster server +// + +/** @brief Ethernet Network Diagnostics Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfEthernetNetworkDiagnosticsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Ethernet Network Diagnostics Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfEthernetNetworkDiagnosticsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId); + +/** @brief Ethernet Network Diagnostics Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfEthernetNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Ethernet Network Diagnostics Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfEthernetNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Ethernet Network Diagnostics Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfEthernetNetworkDiagnosticsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, + uint16_t size, uint8_t * value); + +/** @brief Ethernet Network Diagnostics Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfEthernetNetworkDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); + +// +// General Commissioning Cluster server +// + +/** @brief General Commissioning Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfGeneralCommissioningClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief General Commissioning Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfGeneralCommissioningClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief General Commissioning Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief General Commissioning Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfGeneralCommissioningClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief General Commissioning Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief General Commissioning Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfGeneralCommissioningClusterServerTickCallback(chip::EndpointId endpoint); + +// +// General Diagnostics Cluster server +// + +/** @brief General Diagnostics Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfGeneralDiagnosticsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief General Diagnostics Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfGeneralDiagnosticsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief General Diagnostics Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfGeneralDiagnosticsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief General Diagnostics Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfGeneralDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief General Diagnostics Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfGeneralDiagnosticsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief General Diagnostics Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfGeneralDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); + // // Network Commissioning Cluster server // @@ -292,6 +546,77 @@ EmberAfStatus emberAfOperationalCredentialsClusterServerPreAttributeChangedCallb */ void emberAfOperationalCredentialsClusterServerTickCallback(chip::EndpointId endpoint); +// +// Software Diagnostics Cluster server +// + +/** @brief Software Diagnostics Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfSoftwareDiagnosticsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Software Diagnostics Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfSoftwareDiagnosticsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Software Diagnostics Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfSoftwareDiagnosticsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Software Diagnostics Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfSoftwareDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Software Diagnostics Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfSoftwareDiagnosticsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Software Diagnostics Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfSoftwareDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); + // // Thread Network Diagnostics Cluster server // @@ -363,6 +688,148 @@ EmberAfStatus emberAfThreadNetworkDiagnosticsClusterServerPreAttributeChangedCal */ void emberAfThreadNetworkDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); +// +// WiFi Network Diagnostics Cluster server +// + +/** @brief WiFi Network Diagnostics Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWiFiNetworkDiagnosticsClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief WiFi Network Diagnostics Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfWiFiNetworkDiagnosticsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief WiFi Network Diagnostics Cluster Server Manufacturer Specific Attribute Changed + * + * Server Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfWiFiNetworkDiagnosticsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief WiFi Network Diagnostics Cluster Server Message Sent + * + * Server Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfWiFiNetworkDiagnosticsClusterServerMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief WiFi Network Diagnostics Cluster Server Pre Attribute Changed + * + * server Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfWiFiNetworkDiagnosticsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, + uint16_t size, uint8_t * value); + +/** @brief WiFi Network Diagnostics Cluster Server Tick + * + * server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfWiFiNetworkDiagnosticsClusterServerTickCallback(chip::EndpointId endpoint); + +// +// Window Covering Cluster client +// + +/** @brief Window Covering Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfWindowCoveringClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Window Covering Cluster Client Attribute Changed + * + * Client Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + */ +void emberAfWindowCoveringClusterClientAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); + +/** @brief Window Covering Cluster Client Manufacturer Specific Attribute Changed + * + * Client Manufacturer Specific Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute that changed + * @param manufacturerCode Manufacturer Code of the attribute that changed + */ +void emberAfWindowCoveringClusterClientManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); + +/** @brief Window Covering Cluster Client Message Sent + * + * Client Message Sent + * + * @param type The type of message sent + * @param destination The destination to which the message was sent + * @param apsFrame The APS frame for the message + * @param msgLen The length of the message + * @param message The message that was sent + * @param status The status of the sent message + */ +void emberAfWindowCoveringClusterClientMessageSentCallback(const chip::MessageSendDestination & destination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); + +/** @brief Window Covering Cluster Client Pre Attribute Changed + * + * client Pre Attribute Changed + * + * @param endpoint Endpoint that is being initialized + * @param attributeId Attribute to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +EmberAfStatus emberAfWindowCoveringClusterClientPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint16_t size, + uint8_t * value); + +/** @brief Window Covering Cluster Client Tick + * + * client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfWindowCoveringClusterClientTickCallback(chip::EndpointId endpoint); + // // Window Covering Cluster server // @@ -436,6 +903,26 @@ void emberAfWindowCoveringClusterServerTickCallback(chip::EndpointId endpoint); // Cluster Commands Callback +/** + * @brief General Commissioning Cluster ArmFailSafe Command callback + */ + +bool emberAfGeneralCommissioningClusterArmFailSafeCallback(chip::app::Command * commandObj, uint16_t expiryLengthSeconds, + uint64_t breadcrumb, uint32_t timeoutMs); + +/** + * @brief General Commissioning Cluster CommissioningComplete Command callback + */ + +bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback(chip::app::Command * commandObj); + +/** + * @brief General Commissioning Cluster SetRegulatoryConfig Command callback + */ + +bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(chip::app::Command * commandObj, uint8_t location, + uint8_t * countryCode, uint64_t breadcrumb, uint32_t timeoutMs); + /** * @brief Network Commissioning Cluster AddThreadNetwork Command callback */ @@ -554,12 +1041,6 @@ bool emberAfOperationalCredentialsClusterSetFabricCallback(chip::app::Command * bool emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(chip::app::Command * commandObj, uint8_t * Label); -/** - * @brief Window Covering Cluster WindowCoveringDownClose Command callback - */ - -bool emberAfWindowCoveringClusterWindowCoveringDownCloseCallback(chip::app::Command * commandObj); - /** * @brief Window Covering Cluster WindowCoveringGoToLiftPercentage Command callback */ @@ -586,18 +1067,6 @@ bool emberAfWindowCoveringClusterWindowCoveringGoToTiltPercentageCallback(chip:: bool emberAfWindowCoveringClusterWindowCoveringGoToTiltValueCallback(chip::app::Command * commandObj, uint16_t tiltValue); -/** - * @brief Window Covering Cluster WindowCoveringStop Command callback - */ - -bool emberAfWindowCoveringClusterWindowCoveringStopCallback(chip::app::Command * commandObj); - -/** - * @brief Window Covering Cluster WindowCoveringUpOpen Command callback - */ - -bool emberAfWindowCoveringClusterWindowCoveringUpOpenCallback(chip::app::Command * commandObj); - // // Non-Cluster Related Callbacks // diff --git a/examples/window-app/common/gen/chip-zcl-zpro-codec-api.h b/examples/window-app/common/gen/chip-zcl-zpro-codec-api.h index 759d13c5028d26..df7110d9393494 100644 --- a/examples/window-app/common/gen/chip-zcl-zpro-codec-api.h +++ b/examples/window-app/common/gen/chip-zcl-zpro-codec-api.h @@ -16,3 +16,155 @@ */ // THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include +#include +#include +#include + +/*----------------------------------------------------------------------------*\ +| Cluster Name | ID | +|---------------------------------------------------------------------+--------| +| Basic | 0x0028 | +| EthernetNetworkDiagnostics | 0x0037 | +| GeneralCommissioning | 0x0030 | +| GeneralDiagnostics | 0x0033 | +| NetworkCommissioning | 0x0031 | +| OperationalCredentials | 0x003E | +| SoftwareDiagnostics | 0x0034 | +| ThreadNetworkDiagnostics | 0x0035 | +| WiFiNetworkDiagnostics | 0x0036 | +| WindowCovering | 0x0102 | +| WindowCovering | 0x0102 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * WindowCoveringDownClose | 0x01 | +| * WindowCoveringGoToLiftPercentage | 0x05 | +| * WindowCoveringGoToLiftValue | 0x04 | +| * WindowCoveringGoToTiltPercentage | 0x08 | +| * WindowCoveringGoToTiltValue | 0x07 | +| * WindowCoveringStop | 0x02 | +| * WindowCoveringUpOpen | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowCoveringType | 0x0000 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * ConfigStatus | 0x0007 | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +/** + * @brief + * Encode a Window Covering server discover command into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the window covering type attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadWindowCoveringTypeAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the current position - lift attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server configure report command for the current position - lift attribute into buffer including the + * APS frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterConfigureCurrentPositionLiftAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint, + uint16_t minInterval, uint16_t maxInterval, uint16_t change); + +/** + * @brief + * Encode a Window Covering server read command for the current position - tilt attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server configure report command for the current position - tilt attribute into buffer including the + * APS frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterConfigureCurrentPositionTiltAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint, + uint16_t minInterval, uint16_t maxInterval, uint16_t change); + +/** + * @brief + * Encode a Window Covering server read command for the config status attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadConfigStatusAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the installed open limit - lift attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the installed closed limit - lift attribute into buffer including the APS + * frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the installed open limit - tilt attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the installed closed limit - tilt attribute into buffer including the APS + * frame + */ +chip::System::PacketBufferHandle +encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server read command for the mode attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadModeAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint); + +/** + * @brief + * Encode a Window Covering server write command for the mode attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterWriteModeAttribute(uint8_t seqNum, chip::EndpointId destinationEndpoint, + uint8_t mode); + +/** + * @brief + * Encode a Window Covering server read command for the cluster revision attribute into buffer including the APS frame + */ +chip::System::PacketBufferHandle encodeWindowCoveringClusterReadClusterRevisionAttribute(uint8_t seqNum, + chip::EndpointId destinationEndpoint); diff --git a/examples/window-app/common/gen/encoder.cpp b/examples/window-app/common/gen/encoder.cpp index 759d13c5028d26..2bdc60e2771a77 100644 --- a/examples/window-app/common/gen/encoder.cpp +++ b/examples/window-app/common/gen/encoder.cpp @@ -16,3 +16,278 @@ */ // THIS FILE IS GENERATED BY ZAP + +#include + +#include +#include +#include + +#include +#include + +using namespace chip; +using namespace chip::System; +using namespace chip::Encoding::LittleEndian; + +#define COMMAND_HEADER(name, clusterId) \ + const char * kName = name; \ + \ + PacketBufferWriter buf(System::PacketBufferHandle::New(kMaxBufferSize)); \ + if (buf.IsNull()) \ + { \ + ChipLogError(Zcl, "Could not allocate packet buffer while trying to encode %s command", kName); \ + return PacketBufferHandle(); \ + } \ + \ + if (doEncodeApsFrame(buf, clusterId, kSourceEndpoint, destinationEndpoint, 0, 0, 0, 0, false)) \ + { + +#define COMMAND_FOOTER() \ + } \ + if (!buf.Fit()) \ + { \ + ChipLogError(Zcl, "Command %s can't fit in the allocated buffer", kName); \ + } \ + return buf.Finalize(); + +/*----------------------------------------------------------------------------*\ +| Cluster Name | ID | +|---------------------------------------------------------------------+--------| +| Basic | 0x0028 | +| EthernetNetworkDiagnostics | 0x0037 | +| GeneralCommissioning | 0x0030 | +| GeneralDiagnostics | 0x0033 | +| NetworkCommissioning | 0x0031 | +| OperationalCredentials | 0x003E | +| SoftwareDiagnostics | 0x0034 | +| ThreadNetworkDiagnostics | 0x0035 | +| WiFiNetworkDiagnostics | 0x0036 | +| WindowCovering | 0x0102 | +| WindowCovering | 0x0102 | +\*----------------------------------------------------------------------------*/ + +#define EMBER_ZCL_REPORTING_DIRECTION_REPORTED 0x00 + +#define ZCL_READ_ATTRIBUTES_COMMAND_ID (0x00) +#define ZCL_READ_ATTRIBUTES_RESPONSE_COMMAND_ID (0x01) +#define ZCL_WRITE_ATTRIBUTES_COMMAND_ID (0x02) +#define ZCL_WRITE_ATTRIBUTES_UNDIVIDED_COMMAND_ID (0x03) +#define ZCL_WRITE_ATTRIBUTES_RESPONSE_COMMAND_ID (0x04) +#define ZCL_WRITE_ATTRIBUTES_NO_RESPONSE_COMMAND_ID (0x05) +#define ZCL_CONFIGURE_REPORTING_COMMAND_ID (0x06) +#define ZCL_CONFIGURE_REPORTING_RESPONSE_COMMAND_ID (0x07) +#define ZCL_READ_REPORTING_CONFIGURATION_COMMAND_ID (0x08) +#define ZCL_READ_REPORTING_CONFIGURATION_RESPONSE_COMMAND_ID (0x09) +#define ZCL_REPORT_ATTRIBUTES_COMMAND_ID (0x0A) +#define ZCL_DEFAULT_RESPONSE_COMMAND_ID (0x0B) +#define ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID (0x0C) +#define ZCL_DISCOVER_ATTRIBUTES_RESPONSE_COMMAND_ID (0x0D) +#define ZCL_READ_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0E) +#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_COMMAND_ID (0x0F) +#define ZCL_WRITE_ATTRIBUTES_STRUCTURED_RESPONSE_COMMAND_ID (0x10) +#define ZCL_DISCOVER_COMMANDS_RECEIVED_COMMAND_ID (0x11) +#define ZCL_DISCOVER_COMMANDS_RECEIVED_RESPONSE_COMMAND_ID (0x12) +#define ZCL_DISCOVER_COMMANDS_GENERATED_COMMAND_ID (0x13) +#define ZCL_DISCOVER_COMMANDS_GENERATED_RESPONSE_COMMAND_ID (0x14) +#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_COMMAND_ID (0x15) +#define ZCL_DISCOVER_ATTRIBUTES_EXTENDED_RESPONSE_COMMAND_ID (0x16) + +#define WINDOW_COVERING_CLUSTER_ID 0x0102 +#define ZCL_WINDOW_COVERING_DOWN_CLOSE_COMMAND_ID (0x01) +#define ZCL_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE_COMMAND_ID (0x05) +#define ZCL_WINDOW_COVERING_GO_TO_LIFT_VALUE_COMMAND_ID (0x04) +#define ZCL_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE_COMMAND_ID (0x08) +#define ZCL_WINDOW_COVERING_GO_TO_TILT_VALUE_COMMAND_ID (0x07) +#define ZCL_WINDOW_COVERING_STOP_COMMAND_ID (0x02) +#define ZCL_WINDOW_COVERING_UP_OPEN_COMMAND_ID (0x00) + +// TODO: Find a way to calculate maximum message length for clusters +// https://github.com/project-chip/connectedhomeip/issues/965 +constexpr uint16_t kMaxBufferSize = 1024; + +// This is a global command, so the low bits are 0b00. The command is +// standard, so does not need a manufacturer code, and we're sending client +// to server, so all the remaining bits are 0. +constexpr uint8_t kFrameControlGlobalCommand = 0x00; + +// Pick source endpoint as 1 for now +constexpr EndpointId kSourceEndpoint = 1; + +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * WindowCoveringDownClose | 0x01 | +| * WindowCoveringGoToLiftPercentage | 0x05 | +| * WindowCoveringGoToLiftValue | 0x04 | +| * WindowCoveringGoToTiltPercentage | 0x08 | +| * WindowCoveringGoToTiltValue | 0x07 | +| * WindowCoveringStop | 0x02 | +| * WindowCoveringUpOpen | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowCoveringType | 0x0000 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * ConfigStatus | 0x0007 | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * ClusterRevision | 0xFFFD | +\*----------------------------------------------------------------------------*/ + +PacketBufferHandle encodeWindowCoveringClusterDiscoverAttributes(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("DiscoverWindowCoveringAttributes", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_DISCOVER_ATTRIBUTES_COMMAND_ID).Put16(0x0000).Put8(0xFF); + COMMAND_FOOTER(); +} + +/* + * Attribute WindowCoveringType + */ +PacketBufferHandle encodeWindowCoveringClusterReadWindowCoveringTypeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringWindowCoveringType", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0000); + COMMAND_FOOTER(); +} + +/* + * Attribute CurrentPositionLift + */ +PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringCurrentPositionLift", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0003); + COMMAND_FOOTER(); +} + +PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint, + uint16_t minInterval, uint16_t maxInterval, + uint16_t change) +{ + COMMAND_HEADER("ReportWindowCoveringCurrentPositionLift", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) + .Put16(0x0003) + .Put8(33) + .Put16(minInterval) + .Put16(maxInterval); + buf.Put16(static_cast(change)); + COMMAND_FOOTER(); +} + +/* + * Attribute CurrentPositionTilt + */ +PacketBufferHandle encodeWindowCoveringClusterReadCurrentPositionTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringCurrentPositionTilt", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0004); + COMMAND_FOOTER(); +} + +PacketBufferHandle encodeWindowCoveringClusterConfigureCurrentPositionTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint, + uint16_t minInterval, uint16_t maxInterval, + uint16_t change) +{ + COMMAND_HEADER("ReportWindowCoveringCurrentPositionTilt", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(ZCL_CONFIGURE_REPORTING_COMMAND_ID) + .Put8(EMBER_ZCL_REPORTING_DIRECTION_REPORTED) + .Put16(0x0004) + .Put8(33) + .Put16(minInterval) + .Put16(maxInterval); + buf.Put16(static_cast(change)); + COMMAND_FOOTER(); +} + +/* + * Attribute ConfigStatus + */ +PacketBufferHandle encodeWindowCoveringClusterReadConfigStatusAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringConfigStatus", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0007); + COMMAND_FOOTER(); +} + +/* + * Attribute InstalledOpenLimitLift + */ +PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitLift", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0010); + COMMAND_FOOTER(); +} + +/* + * Attribute InstalledClosedLimitLift + */ +PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitLiftAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitLift", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0011); + COMMAND_FOOTER(); +} + +/* + * Attribute InstalledOpenLimitTilt + */ +PacketBufferHandle encodeWindowCoveringClusterReadInstalledOpenLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringInstalledOpenLimitTilt", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0012); + COMMAND_FOOTER(); +} + +/* + * Attribute InstalledClosedLimitTilt + */ +PacketBufferHandle encodeWindowCoveringClusterReadInstalledClosedLimitTiltAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringInstalledClosedLimitTilt", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0013); + COMMAND_FOOTER(); +} + +/* + * Attribute Mode + */ +PacketBufferHandle encodeWindowCoveringClusterReadModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringMode", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0x0017); + COMMAND_FOOTER(); +} + +PacketBufferHandle encodeWindowCoveringClusterWriteModeAttribute(uint8_t seqNum, EndpointId destinationEndpoint, uint8_t mode) +{ + COMMAND_HEADER("WriteWindowCoveringMode", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand) + .Put8(seqNum) + .Put8(ZCL_WRITE_ATTRIBUTES_COMMAND_ID) + .Put16(0x0017) + .Put8(24) + .Put8(static_cast(mode)); + COMMAND_FOOTER(); +} + +/* + * Attribute ClusterRevision + */ +PacketBufferHandle encodeWindowCoveringClusterReadClusterRevisionAttribute(uint8_t seqNum, EndpointId destinationEndpoint) +{ + COMMAND_HEADER("ReadWindowCoveringClusterRevision", WINDOW_COVERING_CLUSTER_ID); + buf.Put8(kFrameControlGlobalCommand).Put8(seqNum).Put8(ZCL_READ_ATTRIBUTES_COMMAND_ID).Put16(0xFFFD); + COMMAND_FOOTER(); +} diff --git a/examples/window-app/common/gen/endpoint_config.h b/examples/window-app/common/gen/endpoint_config.h index 2b5cf589ce2900..ee693f3771649d 100644 --- a/examples/window-app/common/gen/endpoint_config.h +++ b/examples/window-app/common/gen/endpoint_config.h @@ -27,7 +27,7 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: Basic (server), big-endian */ \ + /* Endpoint: 0, Cluster: Basic (server), big-endian */ \ \ /* 0 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -59,21 +59,52 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Thread Network Diagnostics (server), big-endian */ \ + /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ \ - /* 244 - NetworkName, */ \ + /* 244 - FabricId, */ \ + 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 252 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ + \ + /* 260 - NetworkInterfaces, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Software Diagnostics (server), big-endian */ \ + \ + /* 514 - CurrentHeapHighWatermark, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), big-endian */ \ + \ + /* 522 - NetworkName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ExtendedPanId, */ \ + /* 538 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - MeshLocalPrefix, */ \ + /* 546 - MeshLocalPrefix, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 285 - OverrunCount, */ \ + /* 563 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 293 - NeighborTableList, */ \ + /* 571 - NeighborTableList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -89,7 +120,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 547 - RouteTableList, */ \ + /* 825 - RouteTableList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -105,123 +136,145 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 801 - PartitionId, */ \ + /* 1079 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 805 - TxTotalCount, */ \ + /* 1083 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 809 - TxUnicastCount, */ \ + /* 1087 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 813 - TxBroadcastCount, */ \ + /* 1091 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 817 - TxAckRequestedCount, */ \ + /* 1095 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 821 - TxAckedCount, */ \ + /* 1099 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 825 - TxNoAckRequestedCount, */ \ + /* 1103 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 829 - TxDataCount, */ \ + /* 1107 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 833 - TxDataPollCount, */ \ + /* 1111 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 837 - TxBeaconCount, */ \ + /* 1115 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 841 - TxBeaconRequestCount, */ \ + /* 1119 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 845 - TxOtherCount, */ \ + /* 1123 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 849 - TxRetryCount, */ \ + /* 1127 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 853 - TxDirectMaxRetryExpiryCount, */ \ + /* 1131 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 857 - TxIndirectMaxRetryExpiryCount, */ \ + /* 1135 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 861 - TxErrCcaCount, */ \ + /* 1139 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 865 - TxErrAbortCount, */ \ + /* 1143 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 869 - TxErrBusyChannelCount, */ \ + /* 1147 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 873 - RxTotalCount, */ \ + /* 1151 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 877 - RxUnicastCount, */ \ + /* 1155 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 881 - RxBroadcastCount, */ \ + /* 1159 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 885 - RxDataCount, */ \ + /* 1163 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 889 - RxDataPollCount, */ \ + /* 1167 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 893 - RxBeaconCount, */ \ + /* 1171 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 897 - RxBeaconRequestCount, */ \ + /* 1175 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 901 - RxOtherCount, */ \ + /* 1179 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 905 - RxAddressFilteredCount, */ \ + /* 1183 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 909 - RxDestAddrFilteredCount, */ \ + /* 1187 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 913 - RxDuplicatedCount, */ \ + /* 1191 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 917 - RxErrNoFrameCount, */ \ + /* 1195 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 921 - RxErrUnknownNeighborCount, */ \ + /* 1199 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 925 - RxErrInvalidSrcAddrCount, */ \ + /* 1203 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 929 - RxErrSecCount, */ \ + /* 1207 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 933 - RxErrFcsCount, */ \ + /* 1211 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 937 - RxErrOtherCount, */ \ + /* 1215 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 941 - SecurityPolicy, */ \ + /* 1219 - SecurityPolicy, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 946 - OperationalDatasetComponents, */ \ + /* 1224 - OperationalDatasetComponents, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 960 - ActiveNetworkFaultsList, */ \ + /* 1238 - ActiveNetworkFaultsList, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Operational Credentials (server), big-endian */ \ + /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ + \ + /* 1242 - bssid, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 964 - fabrics list, */ \ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ + \ + /* 1248 - PacketRxCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1256 - PacketTxCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1264 - TxErrCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1272 - CollisionCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1280 - OverrunCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Operational Credentials (server), big-endian */ \ + \ + /* 1288 - fabrics list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -242,7 +295,7 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: Basic (server), little-endian */ \ + /* Endpoint: 0, Cluster: Basic (server), little-endian */ \ \ /* 0 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -274,21 +327,52 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Thread Network Diagnostics (server), little-endian */ \ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ + \ + /* 244 - FabricId, */ \ + 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 252 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 260 - NetworkInterfaces, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Software Diagnostics (server), little-endian */ \ + \ + /* 514 - CurrentHeapHighWatermark, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server), little-endian */ \ \ - /* 244 - NetworkName, */ \ + /* 522 - NetworkName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 260 - ExtendedPanId, */ \ + /* 538 - ExtendedPanId, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 268 - MeshLocalPrefix, */ \ + /* 546 - MeshLocalPrefix, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 285 - OverrunCount, */ \ + /* 563 - OverrunCount, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 293 - NeighborTableList, */ \ + /* 571 - NeighborTableList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -304,7 +388,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 547 - RouteTableList, */ \ + /* 825 - RouteTableList, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -320,123 +404,145 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 801 - PartitionId, */ \ + /* 1079 - PartitionId, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 805 - TxTotalCount, */ \ + /* 1083 - TxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 809 - TxUnicastCount, */ \ + /* 1087 - TxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 813 - TxBroadcastCount, */ \ + /* 1091 - TxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 817 - TxAckRequestedCount, */ \ + /* 1095 - TxAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 821 - TxAckedCount, */ \ + /* 1099 - TxAckedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 825 - TxNoAckRequestedCount, */ \ + /* 1103 - TxNoAckRequestedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 829 - TxDataCount, */ \ + /* 1107 - TxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 833 - TxDataPollCount, */ \ + /* 1111 - TxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 837 - TxBeaconCount, */ \ + /* 1115 - TxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 841 - TxBeaconRequestCount, */ \ + /* 1119 - TxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 845 - TxOtherCount, */ \ + /* 1123 - TxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 849 - TxRetryCount, */ \ + /* 1127 - TxRetryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 853 - TxDirectMaxRetryExpiryCount, */ \ + /* 1131 - TxDirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 857 - TxIndirectMaxRetryExpiryCount, */ \ + /* 1135 - TxIndirectMaxRetryExpiryCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 861 - TxErrCcaCount, */ \ + /* 1139 - TxErrCcaCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 865 - TxErrAbortCount, */ \ + /* 1143 - TxErrAbortCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 869 - TxErrBusyChannelCount, */ \ + /* 1147 - TxErrBusyChannelCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 873 - RxTotalCount, */ \ + /* 1151 - RxTotalCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 877 - RxUnicastCount, */ \ + /* 1155 - RxUnicastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 881 - RxBroadcastCount, */ \ + /* 1159 - RxBroadcastCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 885 - RxDataCount, */ \ + /* 1163 - RxDataCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 889 - RxDataPollCount, */ \ + /* 1167 - RxDataPollCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 893 - RxBeaconCount, */ \ + /* 1171 - RxBeaconCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 897 - RxBeaconRequestCount, */ \ + /* 1175 - RxBeaconRequestCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 901 - RxOtherCount, */ \ + /* 1179 - RxOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 905 - RxAddressFilteredCount, */ \ + /* 1183 - RxAddressFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 909 - RxDestAddrFilteredCount, */ \ + /* 1187 - RxDestAddrFilteredCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 913 - RxDuplicatedCount, */ \ + /* 1191 - RxDuplicatedCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 917 - RxErrNoFrameCount, */ \ + /* 1195 - RxErrNoFrameCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 921 - RxErrUnknownNeighborCount, */ \ + /* 1199 - RxErrUnknownNeighborCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 925 - RxErrInvalidSrcAddrCount, */ \ + /* 1203 - RxErrInvalidSrcAddrCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 929 - RxErrSecCount, */ \ + /* 1207 - RxErrSecCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 933 - RxErrFcsCount, */ \ + /* 1211 - RxErrFcsCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 937 - RxErrOtherCount, */ \ + /* 1215 - RxErrOtherCount, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 941 - SecurityPolicy, */ \ + /* 1219 - SecurityPolicy, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 946 - OperationalDatasetComponents, */ \ + /* 1224 - OperationalDatasetComponents, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 960 - ActiveNetworkFaultsList, */ \ + /* 1238 - ActiveNetworkFaultsList, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Operational Credentials (server), little-endian */ \ + /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ + \ + /* 1242 - bssid, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ + \ + /* 1248 - PacketRxCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1256 - PacketTxCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1264 - TxErrCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1272 - CollisionCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 1280 - OverrunCount, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 964 - fabrics list, */ \ + /* Endpoint: 0, Cluster: Operational Credentials (server), little-endian */ \ + \ + /* 1288 - fabrics list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -455,7 +561,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (52) +#define GENERATED_DEFAULTS_COUNT (62) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -483,11 +589,11 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 86 +#define GENERATED_ATTRIBUTE_COUNT 107 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 1, Cluster: Basic (server) */ \ + /* Endpoint: 0, Cluster: Basic (server) */ \ { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* InteractionModelVersion */ \ { 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(0) }, /* VendorName */ \ { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ @@ -505,20 +611,34 @@ ZAP_LONG_DEFAULTS_INDEX(180) }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ \ - /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ + /* Endpoint: 0, Cluster: General Commissioning (server) */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 8, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* FabricId */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(252) }, /* Breadcrumb */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ - /* Endpoint: 1, Cluster: Thread Network Diagnostics (server) */ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* NetworkInterfaces */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* CurrentHeapHighWatermark */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* channel */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RoutingRole */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 16, 0, ZAP_LONG_DEFAULTS_INDEX(244) }, /* NetworkName */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 16, 0, ZAP_LONG_DEFAULTS_INDEX(522) }, /* NetworkName */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PanId */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* ExtendedPanId */ \ - { 0x0005, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(268) }, /* MeshLocalPrefix */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(285) }, /* OverrunCount */ \ - { 0x0007, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(293) }, /* NeighborTableList */ \ - { 0x0008, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(547) }, /* RouteTableList */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(801) }, /* PartitionId */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(538) }, /* ExtendedPanId */ \ + { 0x0005, ZAP_TYPE(OCTET_STRING), 17, 0, ZAP_LONG_DEFAULTS_INDEX(546) }, /* MeshLocalPrefix */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(563) }, /* OverrunCount */ \ + { 0x0007, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(571) }, /* NeighborTableList */ \ + { 0x0008, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(825) }, /* RouteTableList */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1079) }, /* PartitionId */ \ { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* weighting */ \ { 0x000B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* DataVersion */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* StableDataVersion */ \ @@ -531,50 +651,69 @@ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* PartitionIdChangeCount */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* BetterPartitionAttachAttemptCount */ \ { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ParentChangeCount */ \ - { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(805) }, /* TxTotalCount */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(809) }, /* TxUnicastCount */ \ - { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(813) }, /* TxBroadcastCount */ \ - { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(817) }, /* TxAckRequestedCount */ \ - { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(821) }, /* TxAckedCount */ \ - { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(825) }, /* TxNoAckRequestedCount */ \ - { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(829) }, /* TxDataCount */ \ - { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(833) }, /* TxDataPollCount */ \ - { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(837) }, /* TxBeaconCount */ \ - { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(841) }, /* TxBeaconRequestCount */ \ - { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(845) }, /* TxOtherCount */ \ - { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(849) }, /* TxRetryCount */ \ - { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(853) }, /* TxDirectMaxRetryExpiryCount */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(857) }, /* TxIndirectMaxRetryExpiryCount */ \ - { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(861) }, /* TxErrCcaCount */ \ - { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(865) }, /* TxErrAbortCount */ \ - { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(869) }, /* TxErrBusyChannelCount */ \ - { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(873) }, /* RxTotalCount */ \ - { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(877) }, /* RxUnicastCount */ \ - { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(881) }, /* RxBroadcastCount */ \ - { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(885) }, /* RxDataCount */ \ - { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(889) }, /* RxDataPollCount */ \ - { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(893) }, /* RxBeaconCount */ \ - { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(897) }, /* RxBeaconRequestCount */ \ - { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(901) }, /* RxOtherCount */ \ - { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(905) }, /* RxAddressFilteredCount */ \ - { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(909) }, /* RxDestAddrFilteredCount */ \ - { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(913) }, /* RxDuplicatedCount */ \ - { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(917) }, /* RxErrNoFrameCount */ \ - { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(921) }, /* RxErrUnknownNeighborCount */ \ - { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(925) }, /* RxErrInvalidSrcAddrCount */ \ - { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(929) }, /* RxErrSecCount */ \ - { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(933) }, /* RxErrFcsCount */ \ - { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(937) }, /* RxErrOtherCount */ \ - { 0x003B, ZAP_TYPE(ARRAY), 5, 0, ZAP_LONG_DEFAULTS_INDEX(941) }, /* SecurityPolicy */ \ + { 0x0016, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1083) }, /* TxTotalCount */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1087) }, /* TxUnicastCount */ \ + { 0x0018, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1091) }, /* TxBroadcastCount */ \ + { 0x0019, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1095) }, /* TxAckRequestedCount */ \ + { 0x001A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1099) }, /* TxAckedCount */ \ + { 0x001B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1103) }, /* TxNoAckRequestedCount */ \ + { 0x001C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1107) }, /* TxDataCount */ \ + { 0x001D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1111) }, /* TxDataPollCount */ \ + { 0x001E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1115) }, /* TxBeaconCount */ \ + { 0x001F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1119) }, /* TxBeaconRequestCount */ \ + { 0x0020, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1123) }, /* TxOtherCount */ \ + { 0x0021, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1127) }, /* TxRetryCount */ \ + { 0x0022, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1131) }, /* TxDirectMaxRetryExpiryCount */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1135) }, /* TxIndirectMaxRetryExpiryCount */ \ + { 0x0024, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1139) }, /* TxErrCcaCount */ \ + { 0x0025, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1143) }, /* TxErrAbortCount */ \ + { 0x0026, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1147) }, /* TxErrBusyChannelCount */ \ + { 0x0027, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1151) }, /* RxTotalCount */ \ + { 0x0028, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1155) }, /* RxUnicastCount */ \ + { 0x0029, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1159) }, /* RxBroadcastCount */ \ + { 0x002A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1163) }, /* RxDataCount */ \ + { 0x002B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1167) }, /* RxDataPollCount */ \ + { 0x002C, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1171) }, /* RxBeaconCount */ \ + { 0x002D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1175) }, /* RxBeaconRequestCount */ \ + { 0x002E, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1179) }, /* RxOtherCount */ \ + { 0x002F, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1183) }, /* RxAddressFilteredCount */ \ + { 0x0030, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1187) }, /* RxDestAddrFilteredCount */ \ + { 0x0031, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1191) }, /* RxDuplicatedCount */ \ + { 0x0032, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1195) }, /* RxErrNoFrameCount */ \ + { 0x0033, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1199) }, /* RxErrUnknownNeighborCount */ \ + { 0x0034, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1203) }, /* RxErrInvalidSrcAddrCount */ \ + { 0x0035, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1207) }, /* RxErrSecCount */ \ + { 0x0036, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1211) }, /* RxErrFcsCount */ \ + { 0x0037, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1215) }, /* RxErrOtherCount */ \ + { 0x003B, ZAP_TYPE(ARRAY), 5, 0, ZAP_LONG_DEFAULTS_INDEX(1219) }, /* SecurityPolicy */ \ { 0x003C, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelMask */ \ - { 0x003D, ZAP_TYPE(ARRAY), 14, 0, ZAP_LONG_DEFAULTS_INDEX(946) }, /* OperationalDatasetComponents */ \ - { 0x003E, ZAP_TYPE(ARRAY), 4, 0, ZAP_LONG_DEFAULTS_INDEX(960) }, /* ActiveNetworkFaultsList */ \ + { 0x003D, ZAP_TYPE(ARRAY), 14, 0, ZAP_LONG_DEFAULTS_INDEX(1224) }, /* OperationalDatasetComponents */ \ + { 0x003E, ZAP_TYPE(ARRAY), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1238) }, /* ActiveNetworkFaultsList */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(1242) }, /* bssid */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ + { 0x0002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ + { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ + { 0x0004, ZAP_TYPE(INT8S), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ - /* Endpoint: 1, Cluster: Operational Credentials (server) */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(964) }, /* fabrics list */ \ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1248) }, /* PacketRxCount */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1256) }, /* PacketTxCount */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1264) }, /* TxErrCount */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1272) }, /* CollisionCount */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1280) }, /* OverrunCount */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1288) }, /* fabrics list */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + \ + /* Endpoint: 0, Cluster: Window Covering (client) */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ + \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* window covering type */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current position - lift */ \ @@ -598,7 +737,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 5 +#define GENERATED_CLUSTER_COUNT 11 #define GENERATED_CLUSTERS \ { \ { 0x0028, \ @@ -606,18 +745,36 @@ 12, \ 254, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ + chipFuncArrayBasicServer }, /* Endpoint: 0, Cluster: Basic (server) */ \ + { \ + 0x0030, ZAP_ATTRIBUTE_INDEX(12), 3, 18, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ + { \ + 0x0031, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ + { \ + 0x0033, ZAP_ATTRIBUTE_INDEX(16), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ + 0x0034, ZAP_ATTRIBUTE_INDEX(19), 2, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(13), 61, 747, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (server) */ \ + 0x0035, ZAP_ATTRIBUTE_INDEX(21), 61, 747, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(74), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 1, Cluster: Operational Credentials (server) */ \ + 0x0036, ZAP_ATTRIBUTE_INDEX(82), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(76), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(88), 6, 42, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ + { \ + 0x003E, ZAP_ATTRIBUTE_INDEX(94), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { \ + 0x0102, ZAP_ATTRIBUTE_INDEX(96), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + }, /* Endpoint: 0, Cluster: Window Covering (client) */ \ + { \ + 0x0102, ZAP_ATTRIBUTE_INDEX(97), 10, 17, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ } @@ -626,7 +783,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 5, 1276 }, \ + { ZAP_CLUSTER_INDEX(0), 10, 1602 }, { ZAP_CLUSTER_INDEX(10), 1, 17 }, \ } // Largest attribute size is needed for various buffers @@ -636,60 +793,68 @@ #define ATTRIBUTE_SINGLETONS_SIZE (254) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1276) +#define ATTRIBUTE_MAX_SIZE (1619) // Number of fixed endpoints -#define FIXED_ENDPOINT_COUNT (1) +#define FIXED_ENDPOINT_COUNT (2) // Array of endpoints that are supported, the data inside // the array is the endpoint number. #define FIXED_ENDPOINT_ARRAY \ { \ - 0x0001 \ + 0x0000, 0x0001 \ } // Array of profile ids #define FIXED_PROFILE_IDS \ { \ - 0x0104 \ + 0x0104, 0x0104 \ } // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 0 \ + 0, 0 \ } // Array of device versions #define FIXED_DEVICE_VERSIONS \ { \ - 1 \ + 1, 1 \ } // Array of endpoint types supported on each endpoint #define FIXED_ENDPOINT_TYPES \ { \ - 0 \ + 0, 1 \ } // Array of networks supported on each endpoint #define FIXED_NETWORKS \ { \ - 0 \ + 0, 0 \ } // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (38) +#define EMBER_AF_GENERATED_COMMAND_COUNT (48) #define GENERATED_COMMANDS \ { \ \ - /* Endpoint: 1, Cluster: Basic (server) */ \ + /* Endpoint: 0, Cluster: Basic (server) */ \ { 0x0028, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* StartUp */ \ { 0x0028, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ShutDown */ \ { 0x0028, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* Leave */ \ \ - /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ + /* Endpoint: 0, Cluster: General Commissioning (server) */ \ + { 0x0030, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ArmFailSafe */ \ + { 0x0030, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ArmFailSafeResponse */ \ + { 0x0030, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SetRegulatoryConfig */ \ + { 0x0030, 0x03, ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetRegulatoryConfigResponse */ \ + { 0x0030, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* CommissioningComplete */ \ + { 0x0030, 0x05, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* CommissioningCompleteResponse */ \ + \ + /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x0031, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ScanNetworks */ \ { 0x0031, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ScanNetworksResponse */ \ { 0x0031, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* AddWiFiNetwork */ \ @@ -708,7 +873,16 @@ { 0x0031, 0x0F, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* DisableNetworkResponse */ \ { 0x0031, 0x10, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* GetLastNetworkCommissioningResult */ \ \ - /* Endpoint: 1, Cluster: Operational Credentials (server) */ \ + /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ + { 0x0034, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ResetWatermarks */ \ + \ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ + { 0x0035, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ResetCounts */ \ + \ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ + { 0x0037, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ResetCounts */ \ + \ + /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { 0x003E, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* SetFabric */ \ { 0x003E, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* SetFabricResponse */ \ { 0x003E, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* OpCSRRequest */ \ @@ -718,8 +892,11 @@ { 0x003E, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* UpdateFabricLabel */ \ { 0x003E, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveFabric */ \ { 0x003E, 0x0B, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveAllFabrics */ \ - { 0x003E, 0xA1, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* AddTrustedRootCertificate */ \ - { 0x003E, 0xA2, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveTrustedRootCertificate */ \ + \ + /* Endpoint: 0, Cluster: Window Covering (client) */ \ + { 0x0102, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* WindowCoveringUpOpen */ \ + { 0x0102, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* WindowCoveringDownClose */ \ + { 0x0102, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* WindowCoveringStop */ \ \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ { 0x0102, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* WindowCoveringUpOpen */ \ diff --git a/examples/window-app/common/gen/gen_config.h b/examples/window-app/common/gen/gen_config.h index 0fc20d1dd335ed..7428e2f493e45e 100644 --- a/examples/window-app/common/gen/gen_config.h +++ b/examples/window-app/common/gen/gen_config.h @@ -30,9 +30,15 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -42,6 +48,21 @@ #define EMBER_AF_PLUGIN_BASIC_SERVER #define EMBER_AF_PLUGIN_BASIC +// Use this macro to check if the server side of the Ethernet Network Diagnostics cluster is included +#define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS + +// Use this macro to check if the server side of the General Commissioning cluster is included +#define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER +#define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING + +// Use this macro to check if the server side of the General Diagnostics cluster is included +#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER @@ -52,11 +73,25 @@ #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS +// Use this macro to check if the server side of the Software Diagnostics cluster is included +#define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS + // Use this macro to check if the server side of the Thread Network Diagnostics cluster is included #define ZCL_USING_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_THREAD_NETWORK_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_THREAD_NETWORK_DIAGNOSTICS +// Use this macro to check if the server side of the WiFi Network Diagnostics cluster is included +#define ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS + +// Use this macro to check if the client side of the Window Covering cluster is included +#define ZCL_USING_WINDOW_COVERING_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_WINDOW_COVERING_CLIENT + // Use this macro to check if the server side of the Window Covering cluster is included #define ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_WINDOW_COVERING_SERVER diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 02ed5c2d634320..7605689b7f22e7 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -30,6 +30,2376 @@ } ], "endpointTypes": [ + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "HA-windowcoveringcontroller", + "deviceTypeCode": 515, + "deviceTypeProfileId": 260, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "IdentifyQuery", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "IdentifyQueryResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "identify time", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic", + "code": 40, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic", + "code": 40, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "InteractionModelVersion", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UserLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FabricId", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "o", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Breadcrumb", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateWiFiNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddThreadNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateThreadNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetwork", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetwork", + "code": 14, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetLastNetworkCommissioningResult", + "code": 16, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddWiFiNetworkResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "UpdateWiFiNetworkResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "AddThreadNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "UpdateThreadNetworkResponse", + "code": 9, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveNetworkResponse", + "code": 11, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "EnableNetworkResponse", + "code": 13, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "DisableNetworkResponse", + "code": 15, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "channel", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTableList", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTableList", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelMask", + "code": 60, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "bssid", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Rssi", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetFabric", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpCSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOpCert", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllFabrics", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetFabricResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpCSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpCertResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "fabrics list", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Window Covering", + "code": 258, + "mfgCode": null, + "define": "WINDOW_COVERING_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "WindowCoveringUpOpen", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "WindowCoveringDownClose", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "WindowCoveringStop", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Window Covering", + "code": 258, + "mfgCode": null, + "define": "WINDOW_COVERING_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "window covering type", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "config status", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "installed open limit - lift", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "installed closed limit - lift", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "installed open limit - tilt", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "installed closed limit - tilt", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "mode", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x14", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "cluster revision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + }, { "name": "Anonymous Endpoint Type", "deviceTypeName": "HA-windowcovering", @@ -543,7 +2913,7 @@ "mfgCode": null, "define": "BASIC_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "StartUp", @@ -858,7 +3228,7 @@ "mfgCode": null, "define": "NETWORK_COMMISSIONING_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "ScanNetworksResponse", @@ -975,7 +3345,7 @@ "mfgCode": null, "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [], "attributes": [ { @@ -1992,7 +4362,7 @@ "mfgCode": null, "define": "OPERATIONAL_CREDENTIALS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "SetFabricResponse", @@ -2349,6 +4719,15 @@ "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 0, "profileId": 260, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 0, + "deviceIdentifier": 515 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 260, "endpointId": 1, "networkId": 0, "endpointVersion": null,