diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 9f054b9c226504..b65c0287d00b57 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1510,6 +1510,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/af-structs.h +++ b/examples/all-clusters-app/all-clusters-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp index d99ff06e3b3da4..e4b249b6490f7c 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/attribute-size.cpp @@ -140,6 +140,47 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo } break; } + 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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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 0xF004: // Group Key Management Cluster { uint16_t entryOffset = kSizeLengthInBytes; @@ -178,8 +219,8 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, &entryOffset, sizeof(entry->VendorId)); // INT16U copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, - &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U - chip::ByteSpan * GroupKeyRootSpan = &entry->GroupKeyRoot; // OCTET_STRING + &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U + chip::ByteSpan * GroupKeyRootSpan = reinterpret_cast(&entry->GroupKeyRoot); // OCTET_STRING if (CHIP_NO_ERROR != (write ? WriteByteSpan(dest + entryOffset, 18, GroupKeyRootSpan) : ReadByteSpan(src + entryOffset, 18, GroupKeyRootSpan))) @@ -277,8 +318,8 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo // Struct _TestListStructOctet _TestListStructOctet * entry = reinterpret_cast<_TestListStructOctet *>(write ? src : dest); copyListMember(write ? dest : (uint8_t *) &entry->fabricIndex, write ? (uint8_t *) &entry->fabricIndex : src, write, - &entryOffset, sizeof(entry->fabricIndex)); // INT64U - chip::ByteSpan * operationalCertSpan = &entry->operationalCert; // OCTET_STRING + &entryOffset, sizeof(entry->fabricIndex)); // INT64U + chip::ByteSpan * operationalCertSpan = reinterpret_cast(&entry->operationalCert); // OCTET_STRING if (CHIP_NO_ERROR != (write ? WriteByteSpan(dest + entryOffset, 34, operationalCertSpan) : ReadByteSpan(src + entryOffset, 34, operationalCertSpan))) @@ -332,6 +373,15 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut break; } break; + case 0x0033: // General Diagnostics Cluster + switch (attributeId) + { + case 0x0000: // NetworkInterfaces + // Struct _NetworkInterfaceType + entryLength = 46; + break; + } + break; case 0xF004: // Group Key Management Cluster switch (attributeId) { diff --git a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp index 879e133d2a1aa4..a89515c86ec956 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/call-command-handler.cpp @@ -36,6 +36,7 @@ EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand EmberAfStatus emberAfDescriptorClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGroupKeyManagementClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfIasZoneClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -121,6 +122,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: // No commands are enabled for cluster Group Key Management result = status(false, true, cmd->mfgSpecific); diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp index a52f87dfdfaa4a..f2d43848eb2e3b 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp @@ -53,6 +53,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: emberAfGroupKeyManagementClusterInitCallback(endpoint); break; @@ -156,6 +159,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGroupKeyManagementClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/all-clusters-app/all-clusters-common/gen/callback.h b/examples/all-clusters-app/all-clusters-common/gen/callback.h index e3e8c4d5aa8127..b843493a101c76 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/callback.h +++ b/examples/all-clusters-app/all-clusters-common/gen/callback.h @@ -104,6 +104,14 @@ void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); */ 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 Group Key Management Cluster Init * * Cluster Init @@ -819,6 +827,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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); + // // Group Key Management Cluster server // diff --git a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h +++ b/examples/all-clusters-app/all-clusters-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h index c2630554589619..005d2c30c7f8e8 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/endpoint_config.h @@ -178,14 +178,32 @@ /* 1888 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ + \ + /* 1896 - 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: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 1896 - bssid, */ \ + /* 2150 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Operational Credentials (server), big-endian */ \ \ - /* 1902 - fabrics list, */ \ + /* 2156 - 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, \ @@ -203,7 +221,7 @@ \ /* Endpoint: 0, Cluster: Group Key Management (server), big-endian */ \ \ - /* 2156 - groups, */ \ + /* 2410 - groups, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -219,7 +237,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, \ \ - /* 2410 - group keys, */ \ + /* 2664 - group keys, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -237,7 +255,7 @@ \ /* Endpoint: 1, Cluster: Descriptor (server), big-endian */ \ \ - /* 2664 - device list, */ \ + /* 2918 - device 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, \ @@ -253,7 +271,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, \ \ - /* 2918 - server list, */ \ + /* 3172 - server 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, \ @@ -269,7 +287,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, \ \ - /* 3172 - client list, */ \ + /* 3426 - client 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, \ @@ -285,7 +303,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, \ \ - /* 3426 - parts list, */ \ + /* 3680 - parts 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, \ @@ -303,7 +321,7 @@ \ /* Endpoint: 1, Cluster: Color Control (server), big-endian */ \ \ - /* 3680 - compensation text, */ \ + /* 3934 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -321,50 +339,50 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 3934 - IAS CIE address, */ \ + /* 4188 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 3942 - vendor name, */ \ + /* 4196 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3974 - application name, */ \ + /* 4228 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4006 - application id, */ \ + /* 4260 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: Test Cluster (server), big-endian */ \ \ - /* 4038 - bitmap32, */ \ + /* 4292 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4042 - bitmap64, */ \ + /* 4296 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4050 - int32u, */ \ + /* 4304 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4054 - int64u, */ \ + /* 4308 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4062 - int32s, */ \ + /* 4316 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4066 - int64s, */ \ + /* 4320 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4074 - octet_string, */ \ + /* 4328 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4084 - list_int8u, */ \ + /* 4338 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4094 - list_octet_string, */ \ + /* 4348 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -380,7 +398,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, \ \ - /* 4348 - list_struct_octet_string, */ \ + /* 4602 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -552,14 +570,32 @@ /* 1888 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 1896 - 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: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 1896 - bssid, */ \ + /* 2150 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Operational Credentials (server), little-endian */ \ \ - /* 1902 - fabrics list, */ \ + /* 2156 - 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, \ @@ -577,7 +613,7 @@ \ /* Endpoint: 0, Cluster: Group Key Management (server), little-endian */ \ \ - /* 2156 - groups, */ \ + /* 2410 - groups, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -593,7 +629,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, \ \ - /* 2410 - group keys, */ \ + /* 2664 - group keys, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -611,7 +647,7 @@ \ /* Endpoint: 1, Cluster: Descriptor (server), little-endian */ \ \ - /* 2664 - device list, */ \ + /* 2918 - device 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, \ @@ -627,7 +663,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, \ \ - /* 2918 - server list, */ \ + /* 3172 - server 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, \ @@ -643,7 +679,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, \ \ - /* 3172 - client list, */ \ + /* 3426 - client 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, \ @@ -659,7 +695,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, \ \ - /* 3426 - parts list, */ \ + /* 3680 - parts 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, \ @@ -677,7 +713,7 @@ \ /* Endpoint: 1, Cluster: Color Control (server), little-endian */ \ \ - /* 3680 - compensation text, */ \ + /* 3934 - compensation text, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -695,50 +731,50 @@ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 3934 - IAS CIE address, */ \ + /* 4188 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 3942 - vendor name, */ \ + /* 4196 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3974 - application name, */ \ + /* 4228 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4006 - application id, */ \ + /* 4260 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: Test Cluster (server), little-endian */ \ \ - /* 4038 - bitmap32, */ \ + /* 4292 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4042 - bitmap64, */ \ + /* 4296 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4050 - int32u, */ \ + /* 4304 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4054 - int64u, */ \ + /* 4308 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4062 - int32s, */ \ + /* 4316 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4066 - int64s, */ \ + /* 4320 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4074 - octet_string, */ \ + /* 4328 - octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4084 - list_int8u, */ \ + /* 4338 - list_int8u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4094 - list_octet_string, */ \ + /* 4348 - list_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -754,7 +790,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, \ \ - /* 4348 - list_struct_octet_string, */ \ + /* 4602 - list_struct_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -773,7 +809,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (41) +#define GENERATED_DEFAULTS_COUNT (42) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -801,7 +837,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 180 +#define GENERATED_ATTRIBUTE_COUNT 183 #define GENERATED_ATTRIBUTES \ { \ \ @@ -848,8 +884,13 @@ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1896) }, /* 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: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(1896) }, /* bssid */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(2150) }, /* 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 */ \ @@ -857,7 +898,7 @@ { 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(1902) }, /* fabrics list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2156) }, /* fabrics list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Trusted Root Certificates (server) */ \ @@ -867,8 +908,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2156) }, /* groups */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2410) }, /* group keys */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2410) }, /* groups */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2664) }, /* group keys */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ @@ -896,10 +937,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2664) }, /* device list */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2918) }, /* server list */ \ - { 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3172) }, /* client list */ \ - { 0x0003, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3426) }, /* parts list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2918) }, /* device list */ \ + { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3172) }, /* server list */ \ + { 0x0002, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3426) }, /* client list */ \ + { 0x0003, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3680) }, /* parts list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: OTA Software Update Server (server) */ \ @@ -954,7 +995,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3680) }, /* compensation text */ \ + { 0x0006, ZAP_TYPE(CHAR_STRING), 254, 0, ZAP_LONG_DEFAULTS_INDEX(3934) }, /* compensation text */ \ { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ @@ -1012,7 +1053,7 @@ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ { 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3934) }, /* IAS CIE address */ \ + ZAP_LONG_DEFAULTS_INDEX(4188) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ \ @@ -1020,11 +1061,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3942) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(4196) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3974) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(4228) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(4006) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(4260) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -1033,23 +1074,23 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4038) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4042) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4292) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4296) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4050) }, /* int32u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4054) }, /* int64u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4304) }, /* int32u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4308) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4062) }, /* int32s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4066) }, /* int64s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4316) }, /* int32s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4320) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 10, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4074) }, /* octet_string */ \ - { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(4084) }, /* list_int8u */ \ - { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4094) }, /* list_octet_string */ \ - { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4348) }, /* list_struct_octet_string */ \ + ZAP_LONG_DEFAULTS_INDEX(4328) }, /* octet_string */ \ + { 0x001A, ZAP_TYPE(ARRAY), 10, 0, ZAP_LONG_DEFAULTS_INDEX(4338) }, /* list_int8u */ \ + { 0x001B, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4348) }, /* list_octet_string */ \ + { 0x001C, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(4602) }, /* list_struct_octet_string */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 1, Cluster: Binding (server) */ \ @@ -1097,7 +1138,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 30 +#define GENERATED_CLUSTER_COUNT 31 #define GENERATED_CLUSTERS \ { \ { \ @@ -1116,105 +1157,108 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(27), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(27), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(30), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(33), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(36), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Trusted Root Certificates (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Binding (server) */ \ { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(37), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF004, ZAP_ATTRIBUTE_INDEX(40), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(40), \ + ZAP_ATTRIBUTE_INDEX(43), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(42), \ + ZAP_ATTRIBUTE_INDEX(45), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(44), \ + ZAP_ATTRIBUTE_INDEX(47), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(50), \ + ZAP_ATTRIBUTE_INDEX(53), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(52), \ + ZAP_ATTRIBUTE_INDEX(55), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(54), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(57), 5, 1018, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Server (server) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Client (server) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(61), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 1, Cluster: Switch (server) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(64), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL }, /* Endpoint: 1, Cluster: Switch (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(64), \ + ZAP_ATTRIBUTE_INDEX(67), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(68), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(71), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(73), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(76), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(81), 6, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(84), 6, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(87), \ + ZAP_ATTRIBUTE_INDEX(90), \ 51, \ 336, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(138), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(141), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(142), \ + ZAP_ATTRIBUTE_INDEX(145), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(148), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(151), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(149), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(152), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(157), 20, 579, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(160), 20, 579, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(177), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0xF000, ZAP_ATTRIBUTE_INDEX(180), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(178), \ + ZAP_ATTRIBUTE_INDEX(181), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1226,7 +1270,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 9, 2696 }, { ZAP_CLUSTER_INDEX(9), 20, 2130 }, { ZAP_CLUSTER_INDEX(29), 1, 3 }, \ + { ZAP_CLUSTER_INDEX(0), 10, 2954 }, { ZAP_CLUSTER_INDEX(10), 20, 2130 }, { ZAP_CLUSTER_INDEX(30), 1, 3 }, \ } // Largest attribute size is needed for various buffers @@ -1236,7 +1280,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (875) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4829) +#define ATTRIBUTE_MAX_SIZE (5087) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/examples/all-clusters-app/all-clusters-common/gen/enums.h b/examples/all-clusters-app/all-clusters-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/enums.h +++ b/examples/all-clusters-app/all-clusters-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h index af9c161267b1b9..ebdfa01fe3a25f 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/gen_config.h +++ b/examples/all-clusters-app/all-clusters-common/gen/gen_config.h @@ -37,6 +37,7 @@ #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_DOOR_LOCK_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_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IAS_ZONE_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -103,6 +104,11 @@ #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 Group Key Management cluster is included #define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER diff --git a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h +++ b/examples/all-clusters-app/all-clusters-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 4283957757fdfd..13bf9f8e10305d 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -358,6 +358,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/bridge-app/bridge-common/gen/af-structs.h b/examples/bridge-app/bridge-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/bridge-app/bridge-common/gen/af-structs.h +++ b/examples/bridge-app/bridge-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/bridge-app/bridge-common/gen/attribute-id.h b/examples/bridge-app/bridge-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-id.h +++ b/examples/bridge-app/bridge-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/bridge-app/bridge-common/gen/attribute-size.cpp b/examples/bridge-app/bridge-common/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/bridge-app/bridge-common/gen/attribute-size.cpp +++ b/examples/bridge-app/bridge-common/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp index 2ac2b3c3d4b67b..30e85c0b98cb0e 100644 --- a/examples/bridge-app/bridge-common/gen/call-command-handler.cpp +++ b/examples/bridge-app/bridge-common/gen/call-command-handler.cpp @@ -30,6 +30,7 @@ using namespace chip; EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -81,6 +82,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: result = emberAfLevelControlClusterServerCommandParse(cmd); break; diff --git a/examples/bridge-app/bridge-common/gen/callback-stub.cpp b/examples/bridge-app/bridge-common/gen/callback-stub.cpp index aa0fb9c49f9518..178946d69a66ad 100644 --- a/examples/bridge-app/bridge-common/gen/callback-stub.cpp +++ b/examples/bridge-app/bridge-common/gen/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; @@ -63,6 +66,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/bridge-app/bridge-common/gen/callback.h b/examples/bridge-app/bridge-common/gen/callback.h index 736abee41c002e..27c23e7cd76f3d 100644 --- a/examples/bridge-app/bridge-common/gen/callback.h +++ b/examples/bridge-app/bridge-common/gen/callback.h @@ -56,6 +56,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ 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 Level Control Cluster Init * * Cluster Init @@ -229,6 +237,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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); + // // Level Control Cluster server // diff --git a/examples/bridge-app/bridge-common/gen/cluster-id.h b/examples/bridge-app/bridge-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/bridge-app/bridge-common/gen/cluster-id.h +++ b/examples/bridge-app/bridge-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/bridge-app/bridge-common/gen/endpoint_config.h b/examples/bridge-app/bridge-common/gen/endpoint_config.h index 3f80f088996f33..05738e445a663c 100644 --- a/examples/bridge-app/bridge-common/gen/endpoint_config.h +++ b/examples/bridge-app/bridge-common/gen/endpoint_config.h @@ -35,38 +35,56 @@ /* 8 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ + \ + /* 16 - 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: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 16 - bssid, */ \ + /* 270 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Basic (server), big-endian */ \ \ - /* 22 - VendorName, */ \ + /* 276 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 54 - ProductName, */ \ + /* 308 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - UserLabel, */ \ + /* 340 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 118 - Location, */ \ + /* 372 - Location, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 134 - HardwareVersionString, */ \ + /* 388 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 198 - SoftwareVersion, */ \ + /* 452 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 202 - SoftwareVersionString, */ \ + /* 456 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -74,31 +92,31 @@ \ /* Endpoint: 2, Cluster: Basic (server), big-endian */ \ \ - /* 266 - VendorName, */ \ + /* 520 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 298 - ProductName, */ \ + /* 552 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 330 - UserLabel, */ \ + /* 584 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - Location, */ \ + /* 616 - Location, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - HardwareVersionString, */ \ + /* 632 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - SoftwareVersion, */ \ + /* 696 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - SoftwareVersionString, */ \ + /* 700 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -117,38 +135,56 @@ /* 8 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 16 - 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: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 16 - bssid, */ \ + /* 270 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Basic (server), little-endian */ \ \ - /* 22 - VendorName, */ \ + /* 276 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 54 - ProductName, */ \ + /* 308 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 86 - UserLabel, */ \ + /* 340 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 118 - Location, */ \ + /* 372 - Location, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 134 - HardwareVersionString, */ \ + /* 388 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 198 - SoftwareVersion, */ \ + /* 452 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 202 - SoftwareVersionString, */ \ + /* 456 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -156,31 +192,31 @@ \ /* Endpoint: 2, Cluster: Basic (server), little-endian */ \ \ - /* 266 - VendorName, */ \ + /* 520 - VendorName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 298 - ProductName, */ \ + /* 552 - ProductName, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 330 - UserLabel, */ \ + /* 584 - UserLabel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 362 - Location, */ \ + /* 616 - Location, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 378 - HardwareVersionString, */ \ + /* 632 - HardwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 442 - SoftwareVersion, */ \ + /* 696 - SoftwareVersion, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 446 - SoftwareVersionString, */ \ + /* 700 - SoftwareVersionString, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -189,7 +225,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (17) +#define GENERATED_DEFAULTS_COUNT (18) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -217,7 +253,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 60 +#define GENERATED_ATTRIBUTE_COUNT 63 #define GENERATED_ATTRIBUTES \ { \ \ @@ -229,13 +265,18 @@ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(16) }, /* 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: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(16) }, /* 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 */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(270) }, /* 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: On/off (server) */ \ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* on/off */ \ @@ -247,20 +288,20 @@ \ /* Endpoint: 1, 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(22) }, /* VendorName */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(54) }, /* ProductName */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(276) }, /* VendorName */ \ + { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(308) }, /* ProductName */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ { 0x0005, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(86) }, /* UserLabel */ \ + ZAP_LONG_DEFAULTS_INDEX(340) }, /* UserLabel */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 16, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(118) }, /* Location */ \ + ZAP_LONG_DEFAULTS_INDEX(372) }, /* Location */ \ { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ { 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(134) }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(198) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(388) }, /* HardwareVersionString */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(452) }, /* SoftwareVersion */ \ { 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(202) }, /* SoftwareVersionString */ \ + ZAP_LONG_DEFAULTS_INDEX(456) }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: On/off (server) */ \ @@ -280,20 +321,20 @@ \ /* Endpoint: 2, 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(266) }, /* VendorName */ \ + { 0x0001, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(520) }, /* VendorName */ \ { 0x0002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(298) }, /* ProductName */ \ + { 0x0003, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(552) }, /* ProductName */ \ { 0x0004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ { 0x0005, ZAP_TYPE(CHAR_STRING), 32, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(330) }, /* UserLabel */ \ + ZAP_LONG_DEFAULTS_INDEX(584) }, /* UserLabel */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 16, ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(362) }, /* Location */ \ + ZAP_LONG_DEFAULTS_INDEX(616) }, /* Location */ \ { 0x0007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(0x00) }, /* HardwareVersion */ \ { 0x0008, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(378) }, /* HardwareVersionString */ \ - { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(442) }, /* SoftwareVersion */ \ + ZAP_LONG_DEFAULTS_INDEX(632) }, /* HardwareVersionString */ \ + { 0x0009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_LONG_DEFAULTS_INDEX(696) }, /* SoftwareVersion */ \ { 0x000A, ZAP_TYPE(CHAR_STRING), 64, ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_LONG_DEFAULTS_INDEX(446) }, /* SoftwareVersionString */ \ + ZAP_LONG_DEFAULTS_INDEX(700) }, /* SoftwareVersionString */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ \ /* Endpoint: 3, Cluster: On/off (server) */ \ @@ -328,7 +369,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 11 +#define GENERATED_CLUSTER_COUNT 12 #define GENERATED_CLUSTERS \ { \ { \ @@ -338,52 +379,55 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(3), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(4), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(4), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(7), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(10), \ + ZAP_ATTRIBUTE_INDEX(13), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(12), \ + ZAP_ATTRIBUTE_INDEX(15), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { 0x0028, \ - ZAP_ATTRIBUTE_INDEX(14), \ + ZAP_ATTRIBUTE_INDEX(17), \ 12, \ 254, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(26), \ + ZAP_ATTRIBUTE_INDEX(29), \ 6, \ 9, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(32), \ + ZAP_ATTRIBUTE_INDEX(35), \ 5, \ 7, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { 0x0028, \ - ZAP_ATTRIBUTE_INDEX(37), \ + ZAP_ATTRIBUTE_INDEX(40), \ 12, \ 254, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 2, Cluster: Basic (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(49), \ + ZAP_ATTRIBUTE_INDEX(52), \ 6, \ 9, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 3, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(55), \ + ZAP_ATTRIBUTE_INDEX(58), \ 5, \ 7, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -395,18 +439,18 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 3, 33 }, { ZAP_CLUSTER_INDEX(3), 3, 260 }, { ZAP_CLUSTER_INDEX(6), 3, 270 }, \ - { ZAP_CLUSTER_INDEX(9), 2, 16 }, \ + { ZAP_CLUSTER_INDEX(0), 4, 291 }, { ZAP_CLUSTER_INDEX(4), 3, 260 }, { ZAP_CLUSTER_INDEX(7), 3, 270 }, \ + { ZAP_CLUSTER_INDEX(10), 2, 16 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (65) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (508) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (579) +#define ATTRIBUTE_MAX_SIZE (837) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/examples/bridge-app/bridge-common/gen/enums.h b/examples/bridge-app/bridge-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/bridge-app/bridge-common/gen/enums.h +++ b/examples/bridge-app/bridge-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/bridge-app/bridge-common/gen/gen_config.h b/examples/bridge-app/bridge-common/gen/gen_config.h index b80ed46ef639a6..9a66510a8e4fae 100644 --- a/examples/bridge-app/bridge-common/gen/gen_config.h +++ b/examples/bridge-app/bridge-common/gen/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (3) @@ -48,6 +49,11 @@ #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 Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER diff --git a/examples/bridge-app/bridge-common/gen/print-cluster.h b/examples/bridge-app/bridge-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/bridge-app/bridge-common/gen/print-cluster.h +++ b/examples/bridge-app/bridge-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/chip-tool/gen/af-structs.h b/examples/chip-tool/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/chip-tool/gen/af-structs.h +++ b/examples/chip-tool/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/chip-tool/gen/attribute-id.h b/examples/chip-tool/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/chip-tool/gen/attribute-id.h +++ b/examples/chip-tool/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/chip-tool/gen/cluster-id.h b/examples/chip-tool/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/chip-tool/gen/cluster-id.h +++ b/examples/chip-tool/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/chip-tool/gen/enums.h b/examples/chip-tool/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/chip-tool/gen/enums.h +++ b/examples/chip-tool/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/chip-tool/gen/print-cluster.h b/examples/chip-tool/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/chip-tool/gen/print-cluster.h +++ b/examples/chip-tool/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/lighting-app/lighting-common/gen/af-structs.h b/examples/lighting-app/lighting-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/lighting-app/lighting-common/gen/af-structs.h +++ b/examples/lighting-app/lighting-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/lighting-app/lighting-common/gen/attribute-id.h b/examples/lighting-app/lighting-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-id.h +++ b/examples/lighting-app/lighting-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/lighting-app/lighting-common/gen/attribute-size.cpp b/examples/lighting-app/lighting-common/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/lighting-app/lighting-common/gen/attribute-size.cpp +++ b/examples/lighting-app/lighting-common/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp index 2ac2b3c3d4b67b..30e85c0b98cb0e 100644 --- a/examples/lighting-app/lighting-common/gen/call-command-handler.cpp +++ b/examples/lighting-app/lighting-common/gen/call-command-handler.cpp @@ -30,6 +30,7 @@ using namespace chip; EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -81,6 +82,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: result = emberAfLevelControlClusterServerCommandParse(cmd); break; diff --git a/examples/lighting-app/lighting-common/gen/callback-stub.cpp b/examples/lighting-app/lighting-common/gen/callback-stub.cpp index aa0fb9c49f9518..178946d69a66ad 100644 --- a/examples/lighting-app/lighting-common/gen/callback-stub.cpp +++ b/examples/lighting-app/lighting-common/gen/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; @@ -63,6 +66,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/lighting-app/lighting-common/gen/callback.h b/examples/lighting-app/lighting-common/gen/callback.h index 736abee41c002e..27c23e7cd76f3d 100644 --- a/examples/lighting-app/lighting-common/gen/callback.h +++ b/examples/lighting-app/lighting-common/gen/callback.h @@ -56,6 +56,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ 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 Level Control Cluster Init * * Cluster Init @@ -229,6 +237,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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); + // // Level Control Cluster server // diff --git a/examples/lighting-app/lighting-common/gen/cluster-id.h b/examples/lighting-app/lighting-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/lighting-app/lighting-common/gen/cluster-id.h +++ b/examples/lighting-app/lighting-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/lighting-app/lighting-common/gen/endpoint_config.h b/examples/lighting-app/lighting-common/gen/endpoint_config.h index b23b3f0842c146..d2940e0c2405bd 100644 --- a/examples/lighting-app/lighting-common/gen/endpoint_config.h +++ b/examples/lighting-app/lighting-common/gen/endpoint_config.h @@ -67,9 +67,27 @@ /* 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: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -117,15 +135,33 @@ /* 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: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (10) +#define GENERATED_DEFAULTS_COUNT (11) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -153,7 +189,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 26 +#define GENERATED_ATTRIBUTE_COUNT 29 #define GENERATED_ATTRIBUTES \ { \ \ @@ -191,8 +227,13 @@ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* 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: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* bssid */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* 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 */ \ @@ -216,7 +257,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 6 +#define GENERATED_CLUSTER_COUNT 7 #define GENERATED_CLUSTERS \ { \ { \ @@ -246,7 +287,10 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(19), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(20), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(20), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(23), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ } @@ -255,17 +299,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 6, 293 }, \ + { ZAP_CLUSTER_INDEX(0), 7, 551 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (65) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (254) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (293) +#define ATTRIBUTE_MAX_SIZE (551) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/examples/lighting-app/lighting-common/gen/enums.h b/examples/lighting-app/lighting-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/lighting-app/lighting-common/gen/enums.h +++ b/examples/lighting-app/lighting-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/lighting-app/lighting-common/gen/gen_config.h b/examples/lighting-app/lighting-common/gen/gen_config.h index c6e7536703d129..ca30018c251122 100644 --- a/examples/lighting-app/lighting-common/gen/gen_config.h +++ b/examples/lighting-app/lighting-common/gen/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_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_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -48,6 +49,11 @@ #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 Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER diff --git a/examples/lighting-app/lighting-common/gen/print-cluster.h b/examples/lighting-app/lighting-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/lighting-app/lighting-common/gen/print-cluster.h +++ b/examples/lighting-app/lighting-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 9fa37a855ab458..e1a7aec1e32761 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1299,6 +1299,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/lock-app/lock-common/gen/af-structs.h b/examples/lock-app/lock-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/lock-app/lock-common/gen/af-structs.h +++ b/examples/lock-app/lock-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/lock-app/lock-common/gen/attribute-id.h b/examples/lock-app/lock-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/lock-app/lock-common/gen/attribute-id.h +++ b/examples/lock-app/lock-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/lock-app/lock-common/gen/attribute-size.cpp b/examples/lock-app/lock-common/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/lock-app/lock-common/gen/attribute-size.cpp +++ b/examples/lock-app/lock-common/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/lock-app/lock-common/gen/call-command-handler.cpp b/examples/lock-app/lock-common/gen/call-command-handler.cpp index 687a8046a41566..e1bf1f704435aa 100644 --- a/examples/lock-app/lock-common/gen/call-command-handler.cpp +++ b/examples/lock-app/lock-common/gen/call-command-handler.cpp @@ -30,6 +30,7 @@ using namespace chip; EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfWiFiNetworkDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -80,6 +81,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: result = emberAfNetworkCommissioningClusterServerCommandParse(cmd); break; diff --git a/examples/lock-app/lock-common/gen/callback-stub.cpp b/examples/lock-app/lock-common/gen/callback-stub.cpp index f1abd42b7c490c..f39ce890b553d1 100644 --- a/examples/lock-app/lock-common/gen/callback-stub.cpp +++ b/examples/lock-app/lock-common/gen/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) 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; @@ -60,6 +63,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // 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 diff --git a/examples/lock-app/lock-common/gen/callback.h b/examples/lock-app/lock-common/gen/callback.h index 6c346f07c04408..328a63ed57bb15 100644 --- a/examples/lock-app/lock-common/gen/callback.h +++ b/examples/lock-app/lock-common/gen/callback.h @@ -56,6 +56,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ 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 @@ -221,6 +229,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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 // diff --git a/examples/lock-app/lock-common/gen/cluster-id.h b/examples/lock-app/lock-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/lock-app/lock-common/gen/cluster-id.h +++ b/examples/lock-app/lock-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/lock-app/lock-common/gen/endpoint_config.h b/examples/lock-app/lock-common/gen/endpoint_config.h index 0f683ace39894c..0ddf1f1178e56e 100644 --- a/examples/lock-app/lock-common/gen/endpoint_config.h +++ b/examples/lock-app/lock-common/gen/endpoint_config.h @@ -67,9 +67,27 @@ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -117,15 +135,33 @@ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (10) +#define GENERATED_DEFAULTS_COUNT (11) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -153,7 +189,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 24 +#define GENERATED_ATTRIBUTE_COUNT 27 #define GENERATED_ATTRIBUTES \ { \ \ @@ -187,8 +223,13 @@ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* bssid */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* 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 */ \ @@ -209,7 +250,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 5 +#define GENERATED_CLUSTER_COUNT 6 #define GENERATED_CLUSTERS \ { \ { \ @@ -233,7 +274,10 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(18), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(18), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(21), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (server) */ \ } @@ -242,17 +286,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 5, 290 }, \ + { ZAP_CLUSTER_INDEX(0), 6, 548 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (65) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (254) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (290) +#define ATTRIBUTE_MAX_SIZE (548) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/examples/lock-app/lock-common/gen/enums.h b/examples/lock-app/lock-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/lock-app/lock-common/gen/enums.h +++ b/examples/lock-app/lock-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/lock-app/lock-common/gen/gen_config.h b/examples/lock-app/lock-common/gen/gen_config.h index 200f624f2ed546..6337923b581b00 100644 --- a/examples/lock-app/lock-common/gen/gen_config.h +++ b/examples/lock-app/lock-common/gen/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_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_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -47,6 +48,11 @@ #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 diff --git a/examples/lock-app/lock-common/gen/print-cluster.h b/examples/lock-app/lock-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/lock-app/lock-common/gen/print-cluster.h +++ b/examples/lock-app/lock-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 375412d756aa44..3872c73b6e680d 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1841,6 +1841,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/pump-app/pump-common/gen/af-structs.h b/examples/pump-app/pump-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/pump-app/pump-common/gen/af-structs.h +++ b/examples/pump-app/pump-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/pump-app/pump-common/gen/attribute-id.h b/examples/pump-app/pump-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/pump-app/pump-common/gen/attribute-id.h +++ b/examples/pump-app/pump-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/pump-app/pump-common/gen/attribute-size.cpp b/examples/pump-app/pump-common/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/pump-app/pump-common/gen/attribute-size.cpp +++ b/examples/pump-app/pump-common/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/pump-app/pump-common/gen/call-command-handler.cpp b/examples/pump-app/pump-common/gen/call-command-handler.cpp index aa6832b5d26709..5f47549d31582c 100644 --- a/examples/pump-app/pump-common/gen/call-command-handler.cpp +++ b/examples/pump-app/pump-common/gen/call-command-handler.cpp @@ -30,6 +30,7 @@ using namespace chip; EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfPumpConfigurationAndControlClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -80,6 +81,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: result = emberAfNetworkCommissioningClusterServerCommandParse(cmd); break; diff --git a/examples/pump-app/pump-common/gen/callback-stub.cpp b/examples/pump-app/pump-common/gen/callback-stub.cpp index c7bd066e1aa958..0e08249f8a4105 100644 --- a/examples/pump-app/pump-common/gen/callback-stub.cpp +++ b/examples/pump-app/pump-common/gen/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) 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; @@ -60,6 +63,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // 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 diff --git a/examples/pump-app/pump-common/gen/callback.h b/examples/pump-app/pump-common/gen/callback.h index 55696dea5bf137..7ad6c01be31dc3 100644 --- a/examples/pump-app/pump-common/gen/callback.h +++ b/examples/pump-app/pump-common/gen/callback.h @@ -56,6 +56,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ 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 @@ -221,6 +229,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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 // diff --git a/examples/pump-app/pump-common/gen/cluster-id.h b/examples/pump-app/pump-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/pump-app/pump-common/gen/cluster-id.h +++ b/examples/pump-app/pump-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/pump-app/pump-common/gen/endpoint_config.h b/examples/pump-app/pump-common/gen/endpoint_config.h index 1e3b13822624da..84422716c63519 100644 --- a/examples/pump-app/pump-common/gen/endpoint_config.h +++ b/examples/pump-app/pump-common/gen/endpoint_config.h @@ -66,6 +66,24 @@ \ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, 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, \ } #else // !BIGENDIAN_CPU @@ -111,11 +129,29 @@ \ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, 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, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (9) +#define GENERATED_DEFAULTS_COUNT (10) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -143,7 +179,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 26 +#define GENERATED_ATTRIBUTE_COUNT 29 #define GENERATED_ATTRIBUTES \ { \ \ @@ -177,6 +213,11 @@ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, 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: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max pressure */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* max speed */ \ @@ -201,7 +242,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 5 +#define GENERATED_CLUSTER_COUNT 6 #define GENERATED_CLUSTERS \ { \ { \ @@ -225,7 +266,10 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(17), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(18), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(18), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: General Diagnostics (server) */ \ + { \ + 0x0200, ZAP_ATTRIBUTE_INDEX(21), 8, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ } @@ -234,17 +278,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 5, 290 }, \ + { ZAP_CLUSTER_INDEX(0), 6, 548 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (65) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (254) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (290) +#define ATTRIBUTE_MAX_SIZE (548) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/examples/pump-app/pump-common/gen/enums.h b/examples/pump-app/pump-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/pump-app/pump-common/gen/enums.h +++ b/examples/pump-app/pump-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/pump-app/pump-common/gen/gen_config.h b/examples/pump-app/pump-common/gen/gen_config.h index 37b9863320974f..08cb949ae251ba 100644 --- a/examples/pump-app/pump-common/gen/gen_config.h +++ b/examples/pump-app/pump-common/gen/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_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_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -47,6 +48,11 @@ #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 diff --git a/examples/pump-app/pump-common/gen/print-cluster.h b/examples/pump-app/pump-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/pump-app/pump-common/gen/print-cluster.h +++ b/examples/pump-app/pump-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index ee35b9ed57895c..8d32596da68081 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1841,6 +1841,88 @@ } ] }, + { + "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": "Pump Configuration and Control", "code": 512, diff --git a/examples/pump-controller-app/pump-controller-common/gen/af-structs.h b/examples/pump-controller-app/pump-controller-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/af-structs.h +++ b/examples/pump-controller-app/pump-controller-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/pump-controller-app/pump-controller-common/gen/attribute-id.h b/examples/pump-controller-app/pump-controller-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/attribute-id.h +++ b/examples/pump-controller-app/pump-controller-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/pump-controller-app/pump-controller-common/gen/cluster-id.h b/examples/pump-controller-app/pump-controller-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/cluster-id.h +++ b/examples/pump-controller-app/pump-controller-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/pump-controller-app/pump-controller-common/gen/enums.h b/examples/pump-controller-app/pump-controller-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/enums.h +++ b/examples/pump-controller-app/pump-controller-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/pump-controller-app/pump-controller-common/gen/print-cluster.h b/examples/pump-controller-app/pump-controller-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/pump-controller-app/pump-controller-common/gen/print-cluster.h +++ b/examples/pump-controller-app/pump-controller-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/af-structs.h +++ b/examples/temperature-measurement-app/esp32/main/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/temperature-measurement-app/esp32/main/gen/attribute-size.cpp b/examples/temperature-measurement-app/esp32/main/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/attribute-size.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp index 655c138066d405..fe763659a461ac 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/call-command-handler.cpp @@ -30,6 +30,7 @@ using namespace chip; EmberAfStatus emberAfBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfTemperatureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfWiFiNetworkDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -80,6 +81,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: result = emberAfNetworkCommissioningClusterServerCommandParse(cmd); break; diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp index aae18cee178d16..4f3292dcd63077 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp +++ b/examples/temperature-measurement-app/esp32/main/gen/callback-stub.cpp @@ -35,6 +35,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) 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; @@ -60,6 +63,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // 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 diff --git a/examples/temperature-measurement-app/esp32/main/gen/callback.h b/examples/temperature-measurement-app/esp32/main/gen/callback.h index 1a3b560d71b046..d8f25428c8ad9b 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/callback.h +++ b/examples/temperature-measurement-app/esp32/main/gen/callback.h @@ -56,6 +56,14 @@ void emberAfBasicClusterInitCallback(chip::EndpointId endpoint); */ 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 @@ -221,6 +229,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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 // diff --git a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h +++ b/examples/temperature-measurement-app/esp32/main/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h b/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h index 08a7f09d1fa1d8..839c7cc9cd18f1 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h +++ b/examples/temperature-measurement-app/esp32/main/gen/endpoint_config.h @@ -67,9 +67,27 @@ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server), big-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -117,15 +135,33 @@ /* 252 - Breadcrumb, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 260 - bssid, */ \ + /* 514 - bssid, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (10) +#define GENERATED_DEFAULTS_COUNT (11) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -153,7 +189,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 26 +#define GENERATED_ATTRIBUTE_COUNT 29 #define GENERATED_ATTRIBUTES \ { \ \ @@ -183,8 +219,13 @@ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 1, 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: 1, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* bssid */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(514) }, /* 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 */ \ @@ -208,7 +249,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 5 +#define GENERATED_CLUSTER_COUNT 6 #define GENERATED_CLUSTERS \ { \ { 0x0028, \ @@ -224,10 +265,13 @@ 0x0031, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(16), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(16), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 1, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(19), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(22), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(25), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } @@ -236,17 +280,17 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 5, 295 }, \ + { ZAP_CLUSTER_INDEX(0), 6, 553 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (65) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (254) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (295) +#define ATTRIBUTE_MAX_SIZE (553) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/examples/temperature-measurement-app/esp32/main/gen/enums.h b/examples/temperature-measurement-app/esp32/main/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/enums.h +++ b/examples/temperature-measurement-app/esp32/main/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/temperature-measurement-app/esp32/main/gen/gen_config.h b/examples/temperature-measurement-app/esp32/main/gen/gen_config.h index 5726e1f862761a..7dca25bf59458c 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/gen_config.h +++ b/examples/temperature-measurement-app/esp32/main/gen/gen_config.h @@ -31,6 +31,7 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_BASIC_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_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -47,6 +48,11 @@ #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 diff --git a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h +++ b/examples/temperature-measurement-app/esp32/main/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index d54b551d8331e6..55aa248a46ff08 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -1516,6 +1516,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/tv-app/tv-common/gen/af-structs.h b/examples/tv-app/tv-common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/tv-app/tv-common/gen/af-structs.h +++ b/examples/tv-app/tv-common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/tv-app/tv-common/gen/attribute-id.h b/examples/tv-app/tv-common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/tv-app/tv-common/gen/attribute-id.h +++ b/examples/tv-app/tv-common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/tv-app/tv-common/gen/attribute-size.cpp b/examples/tv-app/tv-common/gen/attribute-size.cpp index a455aef20e035a..8028b9fc0e24d6 100644 --- a/examples/tv-app/tv-common/gen/attribute-size.cpp +++ b/examples/tv-app/tv-common/gen/attribute-size.cpp @@ -79,6 +79,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 %l 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 = reinterpret_cast(&entry->Name); // CHAR_STRING + if (CHIP_NO_ERROR != + (write ? WriteByteSpan(dest + entryOffset, 34, NameSpan) : ReadByteSpan(src + entryOffset, 34, NameSpan))) + { + ChipLogError(Zcl, "Index %l 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; + } } return entryLength; @@ -98,6 +139,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; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/tv-app/tv-common/gen/call-command-handler.cpp b/examples/tv-app/tv-common/gen/call-command-handler.cpp index 4d6e9908f54428..2d5504408fee13 100644 --- a/examples/tv-app/tv-common/gen/call-command-handler.cpp +++ b/examples/tv-app/tv-common/gen/call-command-handler.cpp @@ -35,6 +35,7 @@ EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); +EmberAfStatus emberAfGeneralDiagnosticsClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfKeypadInputClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLowPowerClusterServerCommandParse(EmberAfClusterCommand * cmd); @@ -108,6 +109,10 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + // No commands are enabled for cluster General Diagnostics + result = status(false, true, cmd->mfgSpecific); + break; case ZCL_KEYPAD_INPUT_CLUSTER_ID: result = emberAfKeypadInputClusterServerCommandParse(cmd); break; diff --git a/examples/tv-app/tv-common/gen/callback-stub.cpp b/examples/tv-app/tv-common/gen/callback-stub.cpp index b90a5e3fe815ea..1da50e6e84968c 100644 --- a/examples/tv-app/tv-common/gen/callback-stub.cpp +++ b/examples/tv-app/tv-common/gen/callback-stub.cpp @@ -50,6 +50,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_KEYPAD_INPUT_CLUSTER_ID: emberAfKeypadInputClusterInitCallback(endpoint); break; @@ -121,6 +124,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfKeypadInputClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/tv-app/tv-common/gen/callback.h b/examples/tv-app/tv-common/gen/callback.h index 900fabcf88ba16..da6bfb5b077149 100644 --- a/examples/tv-app/tv-common/gen/callback.h +++ b/examples/tv-app/tv-common/gen/callback.h @@ -96,6 +96,14 @@ void emberAfContentLaunchClusterInitCallback(chip::EndpointId endpoint); */ 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 Keypad Input Cluster Init * * Cluster Init @@ -671,6 +679,77 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallbac */ 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(EmberOutgoingMessageType type, + 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); + // // Keypad Input Cluster server // diff --git a/examples/tv-app/tv-common/gen/cluster-id.h b/examples/tv-app/tv-common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/tv-app/tv-common/gen/cluster-id.h +++ b/examples/tv-app/tv-common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/tv-app/tv-common/gen/endpoint_config.h b/examples/tv-app/tv-common/gen/endpoint_config.h index ba54eac7833d6b..e1dfa81389647c 100644 --- a/examples/tv-app/tv-common/gen/endpoint_config.h +++ b/examples/tv-app/tv-common/gen/endpoint_config.h @@ -27,146 +27,164 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ \ - /* 0 - bssid, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 0 - 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: WiFi Network Diagnostics (server), big-endian */ \ + \ + /* 254 - bssid, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Wake on LAN (server), big-endian */ \ \ - /* 6 - wake on lan mac address, */ \ + /* 260 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: TV Channel (server), big-endian */ \ \ - /* 38 - tv channel list, */ \ + /* 292 - tv channel list, */ \ 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - tv channel lineup, */ \ + /* 324 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 102 - current tv channel, */ \ + /* 356 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: Target Navigator (server), big-endian */ \ \ - /* 134 - target navigator list, */ \ + /* 388 - target navigator 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, \ \ /* Endpoint: 0, Cluster: Media Playback (server), big-endian */ \ \ - /* 166 - start time, */ \ + /* 420 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 174 - duration, */ \ + /* 428 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 182 - updated at, */ \ + /* 436 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 190 - posistion, */ \ + /* 444 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 198 - playback speed, */ \ + /* 452 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 206 - seek range end, */ \ + /* 460 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 214 - seek range start, */ \ + /* 468 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Media Input (server), big-endian */ \ \ - /* 222 - media input list, */ \ + /* 476 - media input 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, \ \ /* Endpoint: 0, Cluster: Content Launch (server), big-endian */ \ \ - /* 254 - accepts header list, */ \ + /* 508 - accepts header 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, \ \ /* Endpoint: 0, Cluster: Application Launcher (server), big-endian */ \ \ - /* 286 - application launcher list, */ \ + /* 540 - application launcher 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, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 318 - audio output list, */ \ + /* 572 - audio output 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, \ \ /* Endpoint: 2, Cluster: Media Playback (server), big-endian */ \ \ - /* 350 - start time, */ \ + /* 604 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 358 - duration, */ \ + /* 612 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - updated at, */ \ + /* 620 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - posistion, */ \ + /* 628 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - playback speed, */ \ + /* 636 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - seek range end, */ \ + /* 644 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - seek range start, */ \ + /* 652 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Application Basic (server), big-endian */ \ \ - /* 406 - vendor name, */ \ + /* 660 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - application name, */ \ + /* 692 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - application id, */ \ + /* 724 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 502 - vendor name, */ \ + /* 756 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 534 - application name, */ \ + /* 788 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 566 - application id, */ \ + /* 820 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 598 - vendor name, */ \ + /* 852 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 630 - application name, */ \ + /* 884 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 662 - application id, */ \ + /* 916 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -175,153 +193,171 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 0 - 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: WiFi Network Diagnostics (server), little-endian */ \ \ - /* 0 - bssid, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 254 - bssid, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Wake on LAN (server), little-endian */ \ \ - /* 6 - wake on lan mac address, */ \ + /* 260 - wake on lan mac address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: TV Channel (server), little-endian */ \ \ - /* 38 - tv channel list, */ \ + /* 292 - tv channel list, */ \ 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 70 - tv channel lineup, */ \ + /* 324 - tv channel lineup, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 102 - current tv channel, */ \ + /* 356 - current tv channel, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: Target Navigator (server), little-endian */ \ \ - /* 134 - target navigator list, */ \ + /* 388 - target navigator 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, \ \ /* Endpoint: 0, Cluster: Media Playback (server), little-endian */ \ \ - /* 166 - start time, */ \ + /* 420 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 174 - duration, */ \ + /* 428 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 182 - updated at, */ \ + /* 436 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 190 - posistion, */ \ + /* 444 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 198 - playback speed, */ \ + /* 452 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 206 - seek range end, */ \ + /* 460 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 214 - seek range start, */ \ + /* 468 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Media Input (server), little-endian */ \ \ - /* 222 - media input list, */ \ + /* 476 - media input 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, \ \ /* Endpoint: 0, Cluster: Content Launch (server), little-endian */ \ \ - /* 254 - accepts header list, */ \ + /* 508 - accepts header 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, \ \ /* Endpoint: 0, Cluster: Application Launcher (server), little-endian */ \ \ - /* 286 - application launcher list, */ \ + /* 540 - application launcher 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, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 318 - audio output list, */ \ + /* 572 - audio output 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, \ \ /* Endpoint: 2, Cluster: Media Playback (server), little-endian */ \ \ - /* 350 - start time, */ \ + /* 604 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 358 - duration, */ \ + /* 612 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 366 - updated at, */ \ + /* 620 - updated at, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 374 - posistion, */ \ + /* 628 - posistion, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 382 - playback speed, */ \ + /* 636 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 390 - seek range end, */ \ + /* 644 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 398 - seek range start, */ \ + /* 652 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: Application Basic (server), little-endian */ \ \ - /* 406 - vendor name, */ \ + /* 660 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 438 - application name, */ \ + /* 692 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 470 - application id, */ \ + /* 724 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 502 - vendor name, */ \ + /* 756 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 534 - application name, */ \ + /* 788 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 566 - application id, */ \ + /* 820 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 598 - vendor name, */ \ + /* 852 - vendor name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 630 - application name, */ \ + /* 884 - application name, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 662 - application id, */ \ + /* 916 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (33) +#define GENERATED_DEFAULTS_COUNT (34) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -349,7 +385,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 82 +#define GENERATED_ATTRIBUTE_COUNT 85 #define GENERATED_ATTRIBUTES \ { \ \ @@ -360,13 +396,18 @@ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* 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: WiFi Network Diagnostics (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* 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 */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 6, 0, ZAP_LONG_DEFAULTS_INDEX(254) }, /* 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: 0, Cluster: Color Control (server) */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ @@ -378,31 +419,31 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Wake on LAN (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(6) }, /* wake on lan mac address */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(260) }, /* wake on lan mac address */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: TV Channel (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(38) }, /* tv channel list */ \ - { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(70) }, /* tv channel lineup */ \ - { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(102) }, /* current tv channel */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(292) }, /* tv channel list */ \ + { 0x0001, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(324) }, /* tv channel lineup */ \ + { 0x0002, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(356) }, /* current tv channel */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(134) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(388) }, /* target navigator list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(166) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(174) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(182) }, /* updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(190) }, /* posistion */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(198) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(206) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(214) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(420) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(428) }, /* duration */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(436) }, /* updated at */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(444) }, /* posistion */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(452) }, /* playback speed */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(460) }, /* seek range end */ \ + { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(468) }, /* seek range start */ \ \ /* Endpoint: 0, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(222) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(476) }, /* media input list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Low Power (server) */ \ @@ -412,11 +453,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Content Launch (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(254) }, /* accepts header list */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(508) }, /* accepts header list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 0, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(286) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(540) }, /* application launcher list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* catalog vendor id */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* application id */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -429,29 +470,29 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(318) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(OCTET_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(572) }, /* audio output list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(350) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(358) }, /* duration */ \ - { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(366) }, /* updated at */ \ - { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(374) }, /* posistion */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(382) }, /* playback speed */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(390) }, /* seek range end */ \ - { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(398) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(604) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(612) }, /* duration */ \ + { 0x0003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(620) }, /* updated at */ \ + { 0x0004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(628) }, /* posistion */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(636) }, /* playback speed */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(644) }, /* seek range end */ \ + { 0x0007, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(652) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Content Launch (server) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 2, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(406) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(660) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(438) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(692) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(470) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(724) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -460,11 +501,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(502) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(756) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(534) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(788) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(566) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(820) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -473,11 +514,11 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(598) }, /* vendor name */ \ + { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(852) }, /* vendor name */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(630) }, /* application name */ \ + { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(884) }, /* application name */ \ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(662) }, /* application id */ \ + { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(916) }, /* application id */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ @@ -499,7 +540,7 @@ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 23 +#define GENERATED_CLUSTER_COUNT 24 #define GENERATED_CLUSTERS \ { \ { \ @@ -514,76 +555,79 @@ 0x0030, ZAP_ATTRIBUTE_INDEX(2), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: General Commissioning (server) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(3), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(3), 3, 258, ZAP_CLUSTER_MASK(SERVER), NULL \ + }, /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { \ + 0x0036, ZAP_ATTRIBUTE_INDEX(6), 6, 13, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(9), \ + ZAP_ATTRIBUTE_INDEX(12), \ 6, \ 11, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 0, Cluster: Color Control (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(15), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(18), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(17), 4, 98, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(20), 4, 98, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: TV Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(21), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(24), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(23), 8, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(26), 8, 57, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(31), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(34), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(35), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(38), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Content Launch (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(37), 4, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(40), 4, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Application Launcher (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(41), \ + ZAP_ATTRIBUTE_INDEX(44), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/off (server) */ \ { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(43), \ + ZAP_ATTRIBUTE_INDEX(46), \ 1, \ 1, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(44), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(47), 2, 34, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(46), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(49), 9, 59, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Content Launch (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(56), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(59), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(67), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Account Login (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(65), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(68), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(73), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(76), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launch (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(74), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(77), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ } @@ -592,18 +636,18 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 13, 360 }, { ZAP_CLUSTER_INDEX(13), 3, 38 }, { ZAP_CLUSTER_INDEX(16), 4, 168 }, \ - { ZAP_CLUSTER_INDEX(20), 1, 105 }, { ZAP_CLUSTER_INDEX(21), 2, 107 }, \ + { ZAP_CLUSTER_INDEX(0), 14, 618 }, { ZAP_CLUSTER_INDEX(14), 3, 38 }, { ZAP_CLUSTER_INDEX(17), 4, 168 }, \ + { ZAP_CLUSTER_INDEX(21), 1, 105 }, { ZAP_CLUSTER_INDEX(22), 2, 107 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (33) +#define ATTRIBUTE_LARGEST (255) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (778) +#define ATTRIBUTE_MAX_SIZE (1036) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (5) diff --git a/examples/tv-app/tv-common/gen/enums.h b/examples/tv-app/tv-common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/tv-app/tv-common/gen/enums.h +++ b/examples/tv-app/tv-common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/tv-app/tv-common/gen/gen_config.h b/examples/tv-app/tv-common/gen/gen_config.h index 9b096096ee65be..520866ccf60efc 100644 --- a/examples/tv-app/tv-common/gen/gen_config.h +++ b/examples/tv-app/tv-common/gen/gen_config.h @@ -36,6 +36,7 @@ #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -88,6 +89,11 @@ #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 Keypad Input cluster is included #define ZCL_USING_KEYPAD_INPUT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_KEYPAD_INPUT_SERVER diff --git a/examples/tv-app/tv-common/gen/print-cluster.h b/examples/tv-app/tv-common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/tv-app/tv-common/gen/print-cluster.h +++ b/examples/tv-app/tv-common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 02dd8f96b9af25..77775f87611ef8 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -837,6 +837,88 @@ } ] }, + { + "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": "WiFi Network Diagnostics", "code": 54, diff --git a/examples/window-app/common/gen/af-structs.h b/examples/window-app/common/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/examples/window-app/common/gen/af-structs.h +++ b/examples/window-app/common/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/examples/window-app/common/gen/attribute-id.h b/examples/window-app/common/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/examples/window-app/common/gen/attribute-id.h +++ b/examples/window-app/common/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/examples/window-app/common/gen/cluster-id.h b/examples/window-app/common/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/examples/window-app/common/gen/cluster-id.h +++ b/examples/window-app/common/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/examples/window-app/common/gen/enums.h b/examples/window-app/common/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/examples/window-app/common/gen/enums.h +++ b/examples/window-app/common/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/examples/window-app/common/gen/print-cluster.h b/examples/window-app/common/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/examples/window-app/common/gen/print-cluster.h +++ b/examples/window-app/common/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/src/app/zap-templates/templates/app/attribute-size-src.zapt b/src/app/zap-templates/templates/app/attribute-size-src.zapt index 9baa7f28f9ec6a..c8d0a01a09c6be 100644 --- a/src/app/zap-templates/templates/app/attribute-size-src.zapt +++ b/src/app/zap-templates/templates/app/attribute-size-src.zapt @@ -86,7 +86,7 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo {{chipType}} * entry = reinterpret_cast<{{chipType}} *>(write ? src : dest); {{#chip_attribute_list_entryTypes}} {{#if (isString type)}} - chip::ByteSpan * {{name}}Span = &entry->{{name}}; // {{type}} + chip::ByteSpan * {{name}}Span = reinterpret_cast(&entry->{{name}}); // {{type}} if (CHIP_NO_ERROR != (write ? WriteByteSpan(dest + entryOffset, {{size}}, {{name}}Span) : ReadByteSpan(src + entryOffset, {{size}}, {{name}}Span))) { ChipLogError(Zcl, "Index %l is invalid. Not enough remaining space", index); diff --git a/src/app/zap-templates/zcl/custom-types.xml b/src/app/zap-templates/zcl/custom-types.xml index 698c8f508e9af2..9601c2aab78a50 100644 --- a/src/app/zap-templates/zcl/custom-types.xml +++ b/src/app/zap-templates/zcl/custom-types.xml @@ -26,7 +26,14 @@ limitations under the License. - + + + + + + + + @@ -39,10 +46,10 @@ limitations under the License. - - - - + + + + // Change INT16U to new type VendorID #2395 @@ -53,4 +60,12 @@ limitations under the License. + + + + + + + + diff --git a/src/app/zap-templates/zcl/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/general-diagnostics-cluster.xml new file mode 100644 index 00000000000000..15cac0fbceb576 --- /dev/null +++ b/src/app/zap-templates/zcl/general-diagnostics-cluster.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + General + General Diagnostics + 0x0033 + GENERAL_DIAGNOSTICS_CLUSTER + The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. + NetworkInterfaces + RebootCount + UpTime + TotalOperationalHours + BootReasons + ActiveHardwareFaults + ActiveRadioFaults + ActiveNetworkFaults + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 937e67238b4be3..09ca1d0cb9ace6 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -27,6 +27,7 @@ "operational-credentials-cluster.xml", "trusted-root-certificates-cluster.xml", "general-commissioning-cluster.xml", + "general-diagnostics-cluster.xml", "group-key-mgmt-cluster.xml", "ha.xml", "ha-devices.xml", diff --git a/src/app/zap_cluster_list.py b/src/app/zap_cluster_list.py index 9bcecc70b3e79d..cafe388c3d745c 100755 --- a/src/app/zap_cluster_list.py +++ b/src/app/zap_cluster_list.py @@ -24,6 +24,7 @@ 'DEVICE_TEMP_CLUSTER': [], 'DOOR_LOCK_CLUSTER': ['door-lock-server'], 'GENERAL_COMMISSIONING_CLUSTER': ['general-commissioning-server'], + 'GENERAL_DIAGNOSTICS_CLUSTER': [], 'GROUPS_CLUSTER': ['groups-server'], 'GROUP_KEY_MANAGEMENT_CLUSTER': [], 'IAS_ZONE_CLUSTER': ['ias-zone-server'], @@ -73,6 +74,7 @@ 'DESCRIPTOR_CLUSTER': [], 'DOOR_LOCK_CLUSTER': [], 'GENERAL_COMMISSIONING_CLUSTER': [], + 'GENERAL_DIAGNOSTICS_CLUSTER': [], 'GROUPS_CLUSTER': [], 'GROUP_KEY_MANAGEMENT_CLUSTER': [], 'IAS_ZONE_CLUSTER': ['ias-zone-client'], diff --git a/src/controller/python/gen/af-structs.h b/src/controller/python/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/src/controller/python/gen/af-structs.h +++ b/src/controller/python/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/src/controller/python/gen/attribute-id.h b/src/controller/python/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/src/controller/python/gen/attribute-id.h +++ b/src/controller/python/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/src/controller/python/gen/cluster-id.h b/src/controller/python/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/src/controller/python/gen/cluster-id.h +++ b/src/controller/python/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/src/controller/python/gen/enums.h b/src/controller/python/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/src/controller/python/gen/enums.h +++ b/src/controller/python/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/src/controller/python/gen/print-cluster.h b/src/controller/python/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/src/controller/python/gen/print-cluster.h +++ b/src/controller/python/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \ diff --git a/src/darwin/Framework/CHIP/gen/af-structs.h b/src/darwin/Framework/CHIP/gen/af-structs.h index 9eaa7c7c3f7e26..bffc2c0e63c203 100644 --- a/src/darwin/Framework/CHIP/gen/af-structs.h +++ b/src/darwin/Framework/CHIP/gen/af-structs.h @@ -311,6 +311,17 @@ typedef struct _NeighborInfo uint8_t numberRssiMeasurements; } EmberAfNeighborInfo; +// Struct for NetworkInterfaceType +typedef struct _NetworkInterfaceType +{ + uint8_t * Name; + uint8_t FabricConnected; + uint8_t OffPremiseServicesReachableIPv4; + uint8_t OffPremiseServicesReachableIPv6; + uint64_t HardwareAddress; + uint8_t Type; +} EmberAfNetworkInterfaceType; + // Struct for NodeInformation typedef struct _NodeInformation { diff --git a/src/darwin/Framework/CHIP/gen/attribute-id.h b/src/darwin/Framework/CHIP/gen/attribute-id.h index 0bf76e87d967b3..55bb378c56b9e1 100644 --- a/src/darwin/Framework/CHIP/gen/attribute-id.h +++ b/src/darwin/Framework/CHIP/gen/attribute-id.h @@ -421,6 +421,20 @@ // Server attributes +// Attribute ids for cluster: General Diagnostics + +// Client attributes + +// Server attributes +#define ZCL_NETWORK_INTERFACES_ATTRIBUTE_ID (0x0000) +#define ZCL_REBOOT_COUNT_ATTRIBUTE_ID (0x0001) +#define ZCL_UPTIME_ATTRIBUTE_ID (0x0002) +#define ZCL_TOTAL_OPERATIONAL_HOURS_ATTRIBUTE_ID (0x0003) +#define ZCL_BOOT_REASONS_ATTRIBUTE_ID (0x0004) +#define ZCL_ACTIVE_HARDWARE_FAULTS_ATTRIBUTE_ID (0x0005) +#define ZCL_ACTIVE_RADIO_FAULTS_ATTRIBUTE_ID (0x0006) +#define ZCL_ACTIVE_NETWORK_FAULTS_ATTRIBUTE_ID (0x0007) + // Attribute ids for cluster: WiFi Network Diagnostics // Client attributes diff --git a/src/darwin/Framework/CHIP/gen/cluster-id.h b/src/darwin/Framework/CHIP/gen/cluster-id.h index 9890cbb119ec86..99db2385e5cc78 100644 --- a/src/darwin/Framework/CHIP/gen/cluster-id.h +++ b/src/darwin/Framework/CHIP/gen/cluster-id.h @@ -98,6 +98,9 @@ // Definitions for cluster: Network Commissioning #define ZCL_NETWORK_COMMISSIONING_CLUSTER_ID (0x0031) +// Definitions for cluster: General Diagnostics +#define ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID (0x0033) + // Definitions for cluster: WiFi Network Diagnostics #define ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID (0x0036) diff --git a/src/darwin/Framework/CHIP/gen/enums.h b/src/darwin/Framework/CHIP/gen/enums.h index 0bc06eb7476011..d9b8889f60d610 100644 --- a/src/darwin/Framework/CHIP/gen/enums.h +++ b/src/darwin/Framework/CHIP/gen/enums.h @@ -347,6 +347,18 @@ typedef enum EMBER_ZCL_BLOCK_PERIOD_DURATION_TYPE_TIMEBASE_MONTHS = 3, } EmberAfBlockPeriodDurationTypeTimebase; +// Enum for BootReasonType +typedef enum +{ + EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT = 1, + EMBER_ZCL_BOOT_REASON_TYPE_BROWN_OUT_RESET = 2, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET = 3, + EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET = 4, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_UPDATE_COMPLETED = 5, + EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, +} EmberAfBootReasonType; + // Enum for CO2Unit typedef enum { @@ -1471,6 +1483,22 @@ typedef enum EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, } EmberAfGroupKeySecurityPolicy; +// Enum for HardwareFaultType +typedef enum +{ + EMBER_ZCL_HARDWARE_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO = 1, + EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR = 2, + EMBER_ZCL_HARDWARE_FAULT_TYPE_RESETTABLE_OVER_TEMP = 3, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_RESETTABLE_OVER_TEMP = 4, + EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE = 5, + EMBER_ZCL_HARDWARE_FAULT_TYPE_VISUAL_DISPLAY_FAULT = 6, + EMBER_ZCL_HARDWARE_FAULT_TYPE_AUDIO_OUTPUT_FAULT = 7, + EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT = 8, + EMBER_ZCL_HARDWARE_FAULT_TYPE_NON_VOLATILE_MEMORY_ERROR = 9, + EMBER_ZCL_HARDWARE_FAULT_TYPE_TAMPER_DETECTED = 10, +} EmberAfHardwareFaultType; + // Enum for HeatAndCoolingSpecificAlarmGroups typedef enum { @@ -1623,6 +1651,16 @@ typedef enum EMBER_ZCL_IDENTIFY_EFFECT_VARIANT_DEFAULT = 0, } EmberAfIdentifyEffectVariant; +// Enum for InterfaceType +typedef enum +{ + EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_INTERFACE_TYPE_WI_FI = 1, + EMBER_ZCL_INTERFACE_TYPE_ETHERNET = 2, + EMBER_ZCL_INTERFACE_TYPE_CELLULAR = 3, + EMBER_ZCL_INTERFACE_TYPE_THREAD = 4, +} EmberAfInterfaceType; + // Enum for KeyIndex typedef enum { @@ -2123,6 +2161,15 @@ typedef enum EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, } EmberAfNetworkCommissioningError; +// Enum for NetworkFaultType +typedef enum +{ + EMBER_ZCL_NETWORK_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_NETWORK_FAULT_TYPE_HARDWARE_FAILURE = 1, + EMBER_ZCL_NETWORK_FAULT_TYPE_NETWORK_JAMMED = 2, + EMBER_ZCL_NETWORK_FAULT_TYPE_CONNECTION_FAILED = 3, +} EmberAfNetworkFaultType; + // Enum for NotificationScheme typedef enum { @@ -2429,6 +2476,18 @@ typedef enum EMBER_ZCL_PUSH_HISTORICAL_PAYMENT_DATA_YEAR = 3584, } EmberAfPushHistoricalPaymentData; +// Enum for RadioFaultType +typedef enum +{ + EMBER_ZCL_RADIO_FAULT_TYPE_UNSPECIFIED = 0, + EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT = 1, + EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT = 2, + EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT = 3, + EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT = 4, + EMBER_ZCL_RADIO_FAULT_TYPE_BLE_FAULT = 5, + EMBER_ZCL_RADIO_FAULT_TYPE_ETHERNET_FAULT = 6, +} EmberAfRadioFaultType; + // Enum for RegisterTier typedef enum { diff --git a/src/darwin/Framework/CHIP/gen/print-cluster.h b/src/darwin/Framework/CHIP/gen/print-cluster.h index b6d42030acf24e..08e913aa3b6475 100644 --- a/src/darwin/Framework/CHIP/gen/print-cluster.h +++ b/src/darwin/Framework/CHIP/gen/print-cluster.h @@ -180,6 +180,12 @@ #define CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER #endif +#if defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER { ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID, 51, "General Diagnostics" }, +#else +#define CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER +#endif + #if defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER) || defined(ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ { ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID, 54, "WiFi Network Diagnostics" }, @@ -920,6 +926,7 @@ CHIP_PRINTCLUSTER_OTA_CLIENT_CLUSTER \ CHIP_PRINTCLUSTER_GENERAL_COMMISSIONING_CLUSTER \ CHIP_PRINTCLUSTER_NETWORK_COMMISSIONING_CLUSTER \ + CHIP_PRINTCLUSTER_GENERAL_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_WIFI_NETWORK_DIAGNOSTICS_CLUSTER \ CHIP_PRINTCLUSTER_SWITCH_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_CREDENTIALS_CLUSTER \