From a0d7b14cde8f41d5096742bb50044b3408a532d9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 23 Oct 2024 02:24:01 -0400 Subject: [PATCH 01/14] Add a method for validating data-value dictionaries. (#36207) --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 55 ++- .../Framework/CHIP/MTRBaseDevice_Internal.h | 4 +- .../Framework/CHIP/MTRDevice_Internal.h | 7 + .../Framework/CHIPTests/MTRDeviceTests.m | 368 ++++++++++++++++++ 4 files changed, 413 insertions(+), 21 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index a298b296849d51..2f75038eda97a2 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -613,7 +613,9 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue } } -static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) +// writer is allowed to be null to just validate the incoming object without +// actually encoding. +static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::TLV::TLVWriter * writer, chip::TLV::Tag tag) { if (![object isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Unsupported object to encode: %@", [object class]); @@ -631,60 +633,62 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T MTR_LOG_ERROR("Error: Object to encode has corrupt signed integer type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value longLongValue]); + return writer ? writer->Put(tag, [value longLongValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRUnsignedIntegerValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt unsigned integer type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value unsignedLongLongValue]); + return writer ? writer->Put(tag, [value unsignedLongLongValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRBooleanValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt boolean type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, static_cast([value boolValue])); + return writer ? writer->Put(tag, static_cast([value boolValue])) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRFloatValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt float type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value floatValue]); + return writer ? writer->Put(tag, [value floatValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRDoubleValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt double type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, [value doubleValue]); + return writer ? writer->Put(tag, [value doubleValue]) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRNullValueType]) { - return writer.PutNull(tag); + return writer ? writer->PutNull(tag) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRUTF8StringValueType]) { if (![value isKindOfClass:[NSString class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt UTF8 string type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.PutString(tag, AsCharSpan(value)); + return writer ? writer->PutString(tag, AsCharSpan(value)) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTROctetStringValueType]) { if (![value isKindOfClass:[NSData class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt octet string type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - return writer.Put(tag, AsByteSpan(value)); + return writer ? writer->Put(tag, AsByteSpan(value)) : CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRStructureValueType]) { if (![value isKindOfClass:[NSArray class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt structure type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + TLV::TLVType outer = TLV::kTLVType_NotSpecified; + if (writer) { + ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + } for (id element in value) { if (![element isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Structure element to encode has corrupt type: %@", [element class]); @@ -713,7 +717,9 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T ReturnErrorOnFailure( MTREncodeTLVFromDataValueDictionaryInternal(elementValue, writer, tag)); } - ReturnErrorOnFailure(writer.EndContainer(outer)); + if (writer) { + ReturnErrorOnFailure(writer->EndContainer(outer)); + } return CHIP_NO_ERROR; } if ([typeName isEqualToString:MTRArrayValueType]) { @@ -721,8 +727,10 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T MTR_LOG_ERROR("Error: Object to encode has corrupt array type: %@", [value class]); return CHIP_ERROR_INVALID_ARGUMENT; } - TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Array, outer)); + TLV::TLVType outer = TLV::kTLVType_NotSpecified; + if (writer) { + ReturnErrorOnFailure(writer->StartContainer(tag, chip::TLV::kTLVType_Array, outer)); + } for (id element in value) { if (![element isKindOfClass:[NSDictionary class]]) { MTR_LOG_ERROR("Error: Array element to encode has corrupt type: %@", [element class]); @@ -735,14 +743,16 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionaryInternal(id object, chip::T } ReturnErrorOnFailure(MTREncodeTLVFromDataValueDictionaryInternal(elementValue, writer, chip::TLV::AnonymousTag())); } - ReturnErrorOnFailure(writer.EndContainer(outer)); + if (writer) { + ReturnErrorOnFailure(writer->EndContainer(outer)); + } return CHIP_NO_ERROR; } MTR_LOG_ERROR("Error: Unsupported type to encode: %@", typeName); return CHIP_ERROR_INVALID_ARGUMENT; } -static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) +static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVWriter * writer, chip::TLV::Tag tag) { CHIP_ERROR err = MTREncodeTLVFromDataValueDictionaryInternal(object, writer, tag); if (err != CHIP_NO_ERROR) { @@ -761,7 +771,7 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW TLV::TLVWriter writer; writer.Init(buffer); - CHIP_ERROR err = MTREncodeTLVFromDataValueDictionary(value, writer, TLV::AnonymousTag()); + CHIP_ERROR err = MTREncodeTLVFromDataValueDictionary(value, &writer, TLV::AnonymousTag()); if (err != CHIP_NO_ERROR) { if (error) { *error = [MTRError errorForCHIPErrorCode:err]; @@ -772,6 +782,11 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW return AsData(ByteSpan(buffer, writer.GetLengthWritten())); } +BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value) +{ + return MTREncodeTLVFromDataValueDictionary(value, nullptr, TLV::AnonymousTag()) == CHIP_NO_ERROR; +} + // Callback type to pass data value as an NSObject typedef void (*MTRDataValueDictionaryCallback)(void * context, id value); @@ -798,7 +813,7 @@ CHIP_ERROR Decode(chip::TLV::TLVReader & data) CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const { - return MTREncodeTLVFromDataValueDictionary(decodedObj, writer, tag); + return MTREncodeTLVFromDataValueDictionary(decodedObj, &writer, tag); } static constexpr bool kIsFabricScoped = false; @@ -2212,7 +2227,7 @@ + (NSDictionary *)eventReportForHeader:(const chip::app::EventHeader &)header an // Commands never need chained buffers, since they cannot be chunked. writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, writer, TLV::AnonymousTag()); + CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, &writer, TLV::AnonymousTag()); if (errorCode != CHIP_NO_ERROR) { LogStringAndReturnError(@"Unable to encode data-value to TLV", errorCode, error); return System::PacketBufferHandle(); @@ -3082,7 +3097,7 @@ static bool EncodeDataValueToTLV(System::PacketBufferHandle & buffer, Platform:: System::PacketBufferTLVWriter writer; writer.Init(std::move(buffer), /* useChainedBuffers = */ true); - CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, writer, TLV::AnonymousTag()); + CHIP_ERROR errorCode = MTREncodeTLVFromDataValueDictionary(data, &writer, TLV::AnonymousTag()); if (errorCode != CHIP_NO_ERROR) { LogStringAndReturnError(@"Unable to encode data-value to TLV", errorCode, error); return false; diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h index 1482d80634da43..075ee99da20990 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h @@ -18,6 +18,8 @@ #import "MTRBaseDevice.h" #import +#import "MTRDeviceDataValueDictionary.h" + #include #include #include @@ -257,6 +259,6 @@ NSDictionary * _Nullable MTRDecodeDataValueDictionaryFromCHIPTLV // TLV Data with an anonymous tag. This method assumes the encoding of the // value fits in a single UDP MTU; for lists this method might need to be used // on each list item separately. -NSData * _Nullable MTREncodeTLVFromDataValueDictionary(NSDictionary * value, NSError * __autoreleasing * error); +NSData * _Nullable MTREncodeTLVFromDataValueDictionary(MTRDeviceDataValueDictionary value, NSError * __autoreleasing * error); NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index df4a8265538dfe..4414b3c6133b07 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -176,6 +176,13 @@ MTR_DIRECT_MEMBERS - (void)devicePrivateInternalStateChanged:(MTRDevice *)device internalState:(NSDictionary *)state; @end +// Returns whether a data-value dictionary is well-formed (in the sense that all +// the types of the objects inside are as expected, so it's actually a valid +// representation of some TLV). Implemented in MTRBaseDevice.mm because that's +// where the pieces needed to implement it are, but declared here so our tests +// can see it. +MTR_EXTERN MTR_TESTABLE BOOL MTRDataValueDictionaryIsWellFormed(MTRDeviceDataValueDictionary value); + #pragma mark - Constants static NSString * const kDefaultSubscriptionPoolSizeOverrideKey = @"subscriptionPoolSizeOverride"; diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 9d33649057ddb1..3fa4ff45449f89 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -4819,6 +4819,374 @@ - (void)test040_AttributeValueExpectationSatisfaction } } +- (void)test041_AttributeDataValueValidation +{ + __auto_type * testData = @[ + @{ + @"input" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @(-5), + }, + // -5 is a valid signed integer. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @ {}, + }, + // A dictionary is not a valid signed integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + // 7 is a valid unsigned integer. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @("abc"), + }, + // "abc" is not an unsigned integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : @(YES), + }, + // YES is a boolean. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRBooleanValueType, + MTRValueKey : [NSData data], + }, + // NSData is not a boolean integer. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @(8), + }, + // 8 is a valid float. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @(8.5), + }, + // 8.5 is a valid float. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRFloatValueType, + MTRValueKey : @[], + }, + // An array is not a float. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : @(180), + }, + // 180 is a valid double. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : @(9.5), + }, + // 9.5 is a valid double. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRDoubleValueType, + MTRValueKey : [NSDate date], + }, + // A date is not a double. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRNullValueType, + }, + // This is a valid null value. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("def"), + }, + // "def" is a valid string. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : [NSData data], + }, + // NSData is not a string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : [NSData data], + }, + // NSData is an octet string. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : @(7), + }, + // 7 is not an octet string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTROctetStringValueType, + MTRValueKey : @("abc"), + }, + // "abc" is not an octet string. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, + // This is a valid empty structure. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[], + }, + // This is a valid empty structure. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // This is a valid structure, one null field. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(9) + }, + }, + ], + }, + // This is a valid structure with two fields. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @(19), + }, + // 19 is not a structure. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // Field does not have a context tag. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + }, + ], + }, + // Field does not have a value. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @(5), + }, + ], + }, + // Field value is a number, not a data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @[], + }, + ], + }, + // Field value is an array, not a data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(7), + MTRDataKey : @ {}, + }, + ], + }, + // Field value is an invalid data-value + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @("abc"), + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // Tag is not a number. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[], + }, + // This is a valid empty array. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRNullValueType + }, + }, + ], + }, + // This is an array with a single null value in it. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(8), + }, + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(10), + }, + }, + ], + }, + // This is an array with two integers in it. + @"valid" : @(YES), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(8), + }, + ], + }, + // This does not have a proper array-value in the array: missing MTRDataKey. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ @(7) ], + }, + // This does not have a proper array-value in the array: not a dictionary. + @"valid" : @(NO), + }, + @{ + @"input" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ @{} ], + }, + // This does not have a proper array-value in the array: empty + // dictionary, so no MTRDataKey. + @"valid" : @(NO), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual(MTRDataValueDictionaryIsWellFormed(test[@"input"]), [test[@"valid"] boolValue], + "input: %@", test[@"input"]); + } +} + @end @interface MTRDeviceEncoderTests : XCTestCase From 42421c4d7da332d869774d47cc794d33a14824cd Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 23 Oct 2024 14:25:21 +0200 Subject: [PATCH 02/14] Update pigweed to latest master (#36193) * Update pigweed to latest master * Fix matter_yamltests_distribution path after pigweed update * Regen configs * Drop `extern "C"` from main functions * Workaround for NuttX platform linking C++ main as C * Update pigweed --- .../all-clusters-app/nxp/common/main/main.cpp | 2 +- .../contact-sensor-app/nxp/common/main.cpp | 2 +- .../nxp/common/main/main.cpp | 2 +- examples/light-switch-app/genio/src/main.cpp | 2 +- .../linux/main.cpp | 2 +- examples/lighting-app/genio/src/main.cpp | 2 +- examples/lighting-app/linux/main.cpp | 13 +- examples/lighting-app/nxp/common/main.cpp | 2 +- examples/lock-app/genio/src/main.cpp | 2 +- examples/lock-app/nxp/common/main/main.cpp | 2 +- examples/ota-requestor-app/genio/src/main.cpp | 2 +- .../openiotsdk/app/openiotsdk_startup_gcc.cpp | 2 +- examples/shell/genio/src/main.cpp | 2 +- examples/thermostat/genio/src/main.cpp | 2 +- examples/thermostat/nxp/common/main/main.cpp | 2 +- scripts/BUILD.gn | 4 +- scripts/build_python.sh | 28 +--- .../app-templates/endpoint_config.h | 158 +++++++++--------- .../app-templates/endpoint_config.h | 18 +- src/lib/address_resolve/tool.cpp | 2 +- src/test_driver/nrfconnect/main/runner.cpp | 2 +- src/tools/chip-cert/chip-cert.cpp | 2 +- src/tools/spake2p/spake2p.cpp | 2 +- third_party/pigweed/repo | 2 +- third_party/pigweed/update.sh | 4 +- 25 files changed, 121 insertions(+), 142 deletions(-) mode change 100644 => 100755 third_party/pigweed/update.sh diff --git a/examples/all-clusters-app/nxp/common/main/main.cpp b/examples/all-clusters-app/nxp/common/main/main.cpp index b2aadab98ceb8b..26772e9e600659 100644 --- a/examples/all-clusters-app/nxp/common/main/main.cpp +++ b/examples/all-clusters-app/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/examples/contact-sensor-app/nxp/common/main.cpp b/examples/contact-sensor-app/nxp/common/main.cpp index d9672b5402c867..ee193927912eeb 100644 --- a/examples/contact-sensor-app/nxp/common/main.cpp +++ b/examples/contact-sensor-app/nxp/common/main.cpp @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/laundry-washer-app/nxp/common/main/main.cpp b/examples/laundry-washer-app/nxp/common/main/main.cpp index b2aadab98ceb8b..26772e9e600659 100644 --- a/examples/laundry-washer-app/nxp/common/main/main.cpp +++ b/examples/laundry-washer-app/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/examples/light-switch-app/genio/src/main.cpp b/examples/light-switch-app/genio/src/main.cpp index d545409c706913..564233716d1d9a 100644 --- a/examples/light-switch-app/genio/src/main.cpp +++ b/examples/light-switch-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp b/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp index 8e586b5cf56d54..56cafc2e527509 100644 --- a/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp +++ b/examples/lighting-app-data-mode-no-unique-id/linux/main.cpp @@ -95,7 +95,7 @@ void ApplicationShutdown() } } -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) { diff --git a/examples/lighting-app/genio/src/main.cpp b/examples/lighting-app/genio/src/main.cpp index 22f654eb5f2f50..2db77457d2e7b1 100644 --- a/examples/lighting-app/genio/src/main.cpp +++ b/examples/lighting-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 8e586b5cf56d54..46dea03cdebccb 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -95,7 +95,14 @@ void ApplicationShutdown() } } -extern "C" int main(int argc, char * argv[]) +#ifdef __NuttX__ +// NuttX requires the main function to be defined with C-linkage. However, marking +// the main as extern "C" is not strictly conformant with the C++ standard. Since +// clang >= 20 such code triggers -Wmain warning. +extern "C" { +#endif + +int main(int argc, char * argv[]) { if (ChipLinuxAppInit(argc, argv) != 0) { @@ -124,3 +131,7 @@ extern "C" int main(int argc, char * argv[]) return 0; } + +#ifdef __NuttX__ +} +#endif diff --git a/examples/lighting-app/nxp/common/main.cpp b/examples/lighting-app/nxp/common/main.cpp index d9672b5402c867..ee193927912eeb 100644 --- a/examples/lighting-app/nxp/common/main.cpp +++ b/examples/lighting-app/nxp/common/main.cpp @@ -30,7 +30,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/lock-app/genio/src/main.cpp b/examples/lock-app/genio/src/main.cpp index 92b16a39663ee4..36564e13330f93 100644 --- a/examples/lock-app/genio/src/main.cpp +++ b/examples/lock-app/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/lock-app/nxp/common/main/main.cpp b/examples/lock-app/nxp/common/main/main.cpp index 09de048127518b..8565ca01af32e9 100644 --- a/examples/lock-app/nxp/common/main/main.cpp +++ b/examples/lock-app/nxp/common/main/main.cpp @@ -39,7 +39,7 @@ extern "C" void main_task(void const * argument) chip::NXP::App::GetAppTask().Start(); } #else -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); chip::NXP::App::GetAppTask().Start(); diff --git a/examples/ota-requestor-app/genio/src/main.cpp b/examples/ota-requestor-app/genio/src/main.cpp index e3676c5c9eacbd..6c9f4f16c274f4 100644 --- a/examples/ota-requestor-app/genio/src/main.cpp +++ b/examples/ota-requestor-app/genio/src/main.cpp @@ -281,7 +281,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp b/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp index 9add2ca4e53777..88488ff64763da 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_startup_gcc.cpp @@ -57,7 +57,7 @@ alignas(8) static uint8_t malloc_mutex_obj[80]; // C runtime import: constructor initialization and main extern "C" void __libc_init_array(void); -extern "C" int main(void); +int main(void); // IOT SDK serial declarations #define STDIN_FILENO 0 diff --git a/examples/shell/genio/src/main.cpp b/examples/shell/genio/src/main.cpp index 7190fd232a0969..fb4b3e068a0d0c 100644 --- a/examples/shell/genio/src/main.cpp +++ b/examples/shell/genio/src/main.cpp @@ -161,7 +161,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/thermostat/genio/src/main.cpp b/examples/thermostat/genio/src/main.cpp index d545409c706913..564233716d1d9a 100644 --- a/examples/thermostat/genio/src/main.cpp +++ b/examples/thermostat/genio/src/main.cpp @@ -251,7 +251,7 @@ void vStartTask(void * pvParameters) * Main Function ****************************************************************************/ -extern "C" int main(void) +int main(void) { mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/examples/thermostat/nxp/common/main/main.cpp b/examples/thermostat/nxp/common/main/main.cpp index b2aadab98ceb8b..26772e9e600659 100644 --- a/examples/thermostat/nxp/common/main/main.cpp +++ b/examples/thermostat/nxp/common/main/main.cpp @@ -32,7 +32,7 @@ uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; using namespace ::chip::DeviceLayer; -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { TaskHandle_t taskHandle; diff --git a/scripts/BUILD.gn b/scripts/BUILD.gn index 0ebcab979112ca..ea1d49662fcb11 100644 --- a/scripts/BUILD.gn +++ b/scripts/BUILD.gn @@ -20,8 +20,8 @@ import("$dir_pw_build/python_dist.gni") # This target creates a single Python package and wheel for yamltests. It will # merge all Python dependencies Matter. The output is located in: -# out/obj/matter_yamltests_distribution/ <- source files here -# out/obj/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl +# out/obj/scripts/matter_yamltests_distribution/ <- source files here +# out/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-0.0.1-py3-none-any.whl pw_python_distribution("matter_yamltests_distribution") { packages = [ "${chip_root}/scripts/py_matter_yamltests:matter_yamltests" ] generate_setup_cfg = { diff --git a/scripts/build_python.sh b/scripts/build_python.sh index da3fe0cbedf733..7f03815f3fe7e3 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -175,22 +175,6 @@ tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg chip_config_network_layer_ble=$enable_ble chip_enable_ble=$enable_ble chip_crypto=\"boringssl\"" -function ninja_target() { - # Print the ninja target required to build a gn label. - local GN_LABEL="$1" - local NINJA_TARGET="$(gn ls "$OUTPUT_ROOT" --as=output "$GN_LABEL")" - echo "$NINJA_TARGET" -} - -function wheel_output_dir() { - # Print the wheel output directory for a pw_python_package or - # pw_python_distribution. The label must end in "._build_wheel". - local GN_LABEL="$1" - local NINJA_TARGET="$(ninja_target "$GN_LABEL")" - local WHEEL_DIR="$OUTPUT_ROOT"/"$(dirname "$NINJA_TARGET")/$(basename -s .stamp "$NINJA_TARGET")" - echo "$WHEEL_DIR" -} - # Compile Python wheels ninja -C "$OUTPUT_ROOT" python_wheels @@ -200,6 +184,11 @@ WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl) # Add the matter_testing_infrastructure wheel WHEEL+=("$OUTPUT_ROOT"/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl) +if [ "$install_pytest_requirements" = "yes" ]; then + # Add the matter_yamltests_distribution wheel + WHEEL+=("$OUTPUT_ROOT"/obj/scripts/matter_yamltests_distribution._build_wheel/matter_yamltests-*.whl) +fi + if [ -n "$extra_packages" ]; then WHEEL+=("$extra_packages") fi @@ -221,14 +210,7 @@ if [ -n "$install_virtual_env" ]; then "$ENVIRONMENT_ROOT"/bin/python -m pip install --upgrade "${WHEEL[@]}" if [ "$install_pytest_requirements" = "yes" ]; then - YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel" - # Add wheels from pw_python_package or pw_python_distribution templates. - YAMLTEST_WHEEL=( - "$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)" - ) - echo_blue "Installing python test dependencies ..." - "$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${YAMLTEST_WHEEL[@]}" "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/tests/requirements.txt" "$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/src/python_testing/requirements.txt" fi diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 08215244b039aa..ec8cbd60457450 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -606,84 +606,82 @@ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ \ - /* Endpoint: 1, Cluster: On/Off (server) */ \ - { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ - \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ - { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ - \ - /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1F }, /* SpinSpeedCurrent */ \ - \ - /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x2 }, /* SmokeSensitivityLevel */ \ - \ - /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ - { (uint16_t) 0x64, (uint16_t) 0x1, (uint16_t) 0x64 }, /* DefaultOpenLevel */ \ - \ - /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ApproximateEVEfficiency */ \ - \ - /* Endpoint: 1, Cluster: Window Covering (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ - \ - /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ - \ - /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ - { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ - { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ - { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ - { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ - { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ - { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x7F }, /* MinSetpointDeadBand */ \ - { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ - \ - /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* PercentSetting */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* SpeedSetting */ \ - \ - /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* TemperatureDisplayMode */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* KeypadLockout */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* ScheduleProgrammingVisibility */ \ - \ - /* Endpoint: 1, Cluster: Color Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ - { (uint16_t) 0xFA, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ - \ - /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ - { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MinLevel */ \ - { (uint16_t) 0xFE, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MaxLevel */ \ - { (uint16_t) 0xFF, (uint16_t) 0x64, (uint16_t) 0xFFFF }, /* BallastFactorAdjustment */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* LampAlarmMode */ \ - \ - /* Endpoint: 1, Cluster: Unit Testing (server) */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ - { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ - { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ - { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ - { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ - { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ - { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* nullable_range_restricted_int16s */ \ + /* Endpoint: 1, Cluster: On/Off (server) */ \ + { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ + { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ + \ + /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1F }, /* SpinSpeedCurrent */ \ + \ + /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x2 }, /* SmokeSensitivityLevel */ \ + \ + /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ + { (uint16_t) 0x64, (uint16_t) 0x1, (uint16_t) 0x64 }, /* DefaultOpenLevel */ \ + \ + /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFFFE }, /* ApproximateEVEfficiency */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ + { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ + { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ + { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ + { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ + { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ + { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x7F }, /* MinSetpointDeadBand */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ + \ + /* Endpoint: 1, Cluster: Fan Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* PercentSetting */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x64 }, /* SpeedSetting */ \ + \ + /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* TemperatureDisplayMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* KeypadLockout */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* ScheduleProgrammingVisibility */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ + { (uint16_t) 0xFA, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ + \ + /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ + { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MinLevel */ \ + { (uint16_t) 0xFE, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MaxLevel */ \ + { (uint16_t) 0xFF, (uint16_t) 0x64, (uint16_t) 0xFFFF }, /* BallastFactorAdjustment */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* LampAlarmMode */ \ + \ + /* Endpoint: 1, Cluster: Unit Testing (server) */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* range_restricted_int16u */ \ + { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* range_restricted_int16s */ \ + { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* nullable_range_restricted_int8u */ \ + { (uint16_t) -0x14, (uint16_t) -0x28, (uint16_t) 0x32 }, /* nullable_range_restricted_int8s */ \ + { (uint16_t) 0xC8, (uint16_t) 0x64, (uint16_t) 0x3E8 }, /* nullable_range_restricted_int16u */ \ + { (uint16_t) -0x64, (uint16_t) -0x96, (uint16_t) 0xC8 }, /* nullable_range_restricted_int16s */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ - { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ - } /* StartUpOnOff */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 } /* StartUpOnOff */ \ } // This is an array of EmberAfAttributeMetadata structures. @@ -4394,12 +4392,8 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of device types #define FIXED_DEVICE_TYPES \ - { \ - { 0x00000011, 1 }, { 0x00000016, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, \ - { \ - 0x00000019, 1 \ - } \ - } + { { 0x00000011, 1 }, { 0x00000016, 1 }, { 0x00000100, 1 }, { 0x00000011, 1 }, \ + { 0x00000100, 1 }, { 0x00000011, 1 }, { 0x00000019, 1 } } // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS { 0, 2, 4, 6 } diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index fa214e1686690b..6395681cf33469 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -118,14 +118,12 @@ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ - { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ + { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { \ - (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ - } /* StartUpColorTemperatureMireds */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF } /* StartUpColorTemperatureMireds */ \ } // This is an array of EmberAfAttributeMetadata structures. @@ -1233,13 +1231,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define FIXED_PROFILE_IDS { 0x0103, 0x0103 } // Array of device types -#define FIXED_DEVICE_TYPES \ - { \ - { 0x00000016, 1 }, \ - { \ - 0x00000101, 1 \ - } \ - } +#define FIXED_DEVICE_TYPES { { 0x00000016, 1 }, { 0x00000101, 1 } } // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS { 0, 1 } diff --git a/src/lib/address_resolve/tool.cpp b/src/lib/address_resolve/tool.cpp index 53d01b4011806f..042f7c6f891753 100644 --- a/src/lib/address_resolve/tool.cpp +++ b/src/lib/address_resolve/tool.cpp @@ -147,7 +147,7 @@ extern "C" void StopSignalHandler(int signal) } // namespace -extern "C" int main(int argc, const char ** argv) +int main(int argc, const char ** argv) { Platform::MemoryInit(); diff --git a/src/test_driver/nrfconnect/main/runner.cpp b/src/test_driver/nrfconnect/main/runner.cpp index 44fb5bae2a6183..bd719fbd4e5b33 100644 --- a/src/test_driver/nrfconnect/main/runner.cpp +++ b/src/test_driver/nrfconnect/main/runner.cpp @@ -29,7 +29,7 @@ using namespace ::chip::DeviceLayer; LOG_MODULE_REGISTER(runner, CONFIG_MATTER_LOG_LEVEL); -extern "C" int main(void) +int main(void) { VerifyOrDie(settings_subsys_init() == 0); diff --git a/src/tools/chip-cert/chip-cert.cpp b/src/tools/chip-cert/chip-cert.cpp index 571a00421f2569..a06a7341fafc09 100644 --- a/src/tools/chip-cert/chip-cert.cpp +++ b/src/tools/chip-cert/chip-cert.cpp @@ -85,7 +85,7 @@ bool PrintVersion() } // namespace -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { bool res = false; diff --git a/src/tools/spake2p/spake2p.cpp b/src/tools/spake2p/spake2p.cpp index 45f5cc9d7c4323..ce1c0f82c60212 100644 --- a/src/tools/spake2p/spake2p.cpp +++ b/src/tools/spake2p/spake2p.cpp @@ -62,7 +62,7 @@ bool PrintVersion() } // namespace -extern "C" int main(int argc, char * argv[]) +int main(int argc, char * argv[]) { bool res = false; diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index d5fcc90b39ee75..ce0e3e2d1b7eec 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit d5fcc90b39ee7568855390535fa854cea8f33c95 +Subproject commit ce0e3e2d1b7eec7cdf59fbb2ceed2b1cb3edd1ec diff --git a/third_party/pigweed/update.sh b/third_party/pigweed/update.sh old mode 100644 new mode 100755 index c8dd96862d7285..b15e967930577b --- a/third_party/pigweed/update.sh +++ b/third_party/pigweed/update.sh @@ -3,8 +3,8 @@ # Update the submodule. cd "$(dirname "${BASH_SOURCE[0]}")/repo" -git fetch origin master -git checkout origin/master +git fetch origin main +git checkout origin/main # Copy the CIPD manifest but change the Python line so we don't use CIPD # Python on Linux. From 948755d516018c5402c65b8a2f1f0f03dc953263 Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Wed, 23 Oct 2024 12:07:03 -0400 Subject: [PATCH 03/14] Add missing Water Heater device to matter-devices.xml (#36125) * Add missing Water Heater device to matter-devices.xml This PR adds the missing Water Heater device to matter-devices.xml. The description was generated using the Alchemy tool (https://github.com/project-chip/alchemy) with the following command: `alchemy zap --attribute="in-progress" --sdkRoot=./connectedhomeip/ --specRoot=./connectedhomeip-spec/ ./connectedhomeip-spec/src/device_types/WaterHeater.adoc` I manually fixed the device nae from `Matter Water Heater` to `Water Heater`. * zap regen --- .../zcl/data-model/chip/matter-devices.xml | 43 +++++++++++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 1 + .../zap-generated/MTRDeviceTypeMetadata.mm | 1 + .../cluster/logging/EntryToText.cpp | 2 + 4 files changed, 47 insertions(+) diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index f7f5699ef8fccf..ff485bbf6bba81 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2698,4 +2698,47 @@ limitations under the License. + + MA-waterheater + CHIP + Water Heater + 0x0103 + 0x050F + Simple + Endpoint + + + CLIENT_LIST + DEVICE_TYPE_LIST + PARTS_LIST + SERVER_LIST + + + IDENTIFY_TIME + IDENTIFY_TYPE + Identify + + + CONTROL_SEQUENCE_OF_OPERATION + LOCAL_TEMPERATURE + SYSTEM_MODE + SetpointRaiseLower + + + BOOST_STATE + HEATER_TYPES + HEAT_DEMAND + BoostEnded + BoostStarted + Boost + CancelBoost + + + CURRENT_MODE + SUPPORTED_MODES + ChangeToMode + ChangeToModeResponse + + + diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index b1d26e9ce0fb12..da2ce72f59373d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -7625,6 +7625,7 @@ typedef NS_ENUM(uint32_t, MTRDeviceTypeIDType) { MTRDeviceTypeIDTypeHumiditySensorID MTR_NEWLY_AVAILABLE = 0x00000307, MTRDeviceTypeIDTypeEVSEID MTR_NEWLY_AVAILABLE = 0x0000050C, MTRDeviceTypeIDTypeDeviceEnergyManagementID MTR_NEWLY_AVAILABLE = 0x0000050D, + MTRDeviceTypeIDTypeWaterHeaterID MTR_PROVISIONALLY_AVAILABLE = 0x0000050F, MTRDeviceTypeIDTypeElectricalSensorID MTR_NEWLY_AVAILABLE = 0x00000510, MTRDeviceTypeIDTypeControlBridgeID MTR_NEWLY_AVAILABLE = 0x00000840, MTRDeviceTypeIDTypeOnOffSensorID MTR_NEWLY_AVAILABLE = 0x00000850, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index f0530c41a54f00..b4ea67c2ed66fe 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -85,6 +85,7 @@ { 0x00000307, MTRDeviceTypeClass::Simple, "Humidity Sensor" }, { 0x0000050C, MTRDeviceTypeClass::Simple, "EVSE" }, { 0x0000050D, MTRDeviceTypeClass::Simple, "Device Energy Management" }, + { 0x0000050F, MTRDeviceTypeClass::Simple, "Water Heater" }, { 0x00000510, MTRDeviceTypeClass::Utility, "Electrical Sensor" }, { 0x00000840, MTRDeviceTypeClass::Simple, "Control Bridge" }, { 0x00000850, MTRDeviceTypeClass::Simple, "On/Off Sensor" }, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp index 0b5178d3bcb208..7c4c38ae6cec3f 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -6495,6 +6495,8 @@ char const * DeviceTypeIdToText(chip::DeviceTypeId id) return "EVSE"; case 0x0000050D: return "Device Energy Management"; + case 0x0000050F: + return "Water Heater"; case 0x00000510: return "Electrical Sensor"; case 0x00000840: From a7a50045bab885aeb79a6a320a053655575af37a Mon Sep 17 00:00:00 2001 From: Raul Marquez <130402456+raul-marquez-csa@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:07:34 -0700 Subject: [PATCH 04/14] Adds step 9c (#36157) --- .../tests/suites/certification/Test_TC_LVL_2_1.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index 8e9ee05b33e9ff..aa0fbcfddc83bf 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -188,6 +188,16 @@ tests: minValue: MinLevelFeatureMapNotSupportedValue maxValue: MaxLevelFeatureMapNotSupportedValue + - label: "Step 9c: TH reads the OnLevel attribute from the DUT" + PICS: LVL.S.A0011 && !LVL.S.F01 && !LVL.S.A0002 && !LVL.S.A0003 + command: "readAttribute" + attribute: "OnLevel" + response: + constraints: + type: int8u + minValue: 0 + maxValue: 254 + - label: "Step 10: TH reads the OnTransitionTime attribute from the DUT" PICS: LVL.S.A0012 command: "readAttribute" From 614a086b9151cd6b686f07efa9c56fcc1b06f1df Mon Sep 17 00:00:00 2001 From: Sergio Soares Date: Wed, 23 Oct 2024 12:08:35 -0400 Subject: [PATCH 05/14] python_testing: Add Checks for Command IDs (#36018) * python_testing: Add Checks for Command IDs This PR adds checks and unit tests for the command ID ranges defined in Table 79 of the spec. These checks will be used on the various Python tests, for example, TC_DeviceBasicComposition.py. * Restyled by isort * python_testing: Update command id error msg This PR uses the newly added command id check. It updates the error msg to indicate if it's a "Test Vendor" id. * fix merge conflicts * Restyled by isort --------- Co-authored-by: Restyled.io --- .../TC_DeviceBasicComposition.py | 5 +- src/python_testing/TestIdChecks.py | 71 ++++++++++++++++++- .../chip/testing/global_attribute_ids.py | 31 ++++++++ 3 files changed, 102 insertions(+), 5 deletions(-) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 59182fa4e2fcb2..0f227c2c672ea4 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -108,7 +108,8 @@ from chip.clusters.ClusterObjects import ClusterAttributeDescriptor, ClusterObjectFieldDescriptor from chip.interaction_model import InteractionModelError, Status from chip.testing.basic_composition import BasicCompositionTests -from chip.testing.global_attribute_ids import AttributeIdType, ClusterIdType, GlobalAttributeIds, attribute_id_type, cluster_id_type +from chip.testing.global_attribute_ids import (AttributeIdType, ClusterIdType, CommandIdType, GlobalAttributeIds, attribute_id_type, + cluster_id_type, command_id_type) from chip.testing.matter_testing import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, MatterBaseTest, TestStep, async_test_body, default_matter_test_main) from chip.testing.taglist_and_topology_test import (create_device_type_list_for_root, create_device_type_lists, @@ -503,7 +504,7 @@ class RequiredMandatoryAttribute: location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=bad_cmd_id) vendor_id = get_vendor_id(bad_cmd_id) self.record_error(self.get_test_name( - ), location=location, problem=f'Command 0x{bad_cmd_id:08x} with bad prefix 0x{vendor_id:04x} in cluster 0x{cluster_id:08x}', spec_location='Manufacturer Extensible Identifier (MEI)') + ), location=location, problem=f'Command 0x{bad_cmd_id:08x} with bad prefix 0x{vendor_id:04x} in cluster 0x{cluster_id:08x}' + (' (Test Vendor)' if command_id_type(bad_cmd_id) == CommandIdType.kTest else ''), spec_location='Manufacturer Extensible Identifier (MEI)') success = False self.print_step(7, "Validate that none of the MEI global attribute IDs contain values outside of the allowed suffix range") diff --git a/src/python_testing/TestIdChecks.py b/src/python_testing/TestIdChecks.py index eda01ef9556493..c86d4bfe6d0d0b 100644 --- a/src/python_testing/TestIdChecks.py +++ b/src/python_testing/TestIdChecks.py @@ -15,9 +15,9 @@ # limitations under the License. # -from chip.testing.global_attribute_ids import (AttributeIdType, ClusterIdType, DeviceTypeIdType, attribute_id_type, cluster_id_type, - device_type_id_type, is_valid_attribute_id, is_valid_cluster_id, - is_valid_device_type_id) +from chip.testing.global_attribute_ids import (AttributeIdType, ClusterIdType, CommandIdType, DeviceTypeIdType, attribute_id_type, + cluster_id_type, command_id_type, device_type_id_type, is_valid_attribute_id, + is_valid_cluster_id, is_valid_command_id, is_valid_device_type_id) from chip.testing.matter_testing import MatterBaseTest, default_matter_test_main from mobly import asserts @@ -210,6 +210,71 @@ def check_all_bad(id): for id in prefix_bad: check_all_bad(id) + def test_command_ids(self): + standard_global_good = [0x0000_00E0, 0x0000_00FF, 0x0000_00E1, 0x0000_00FE] + standard_global_bad = [0x0000_01E0, 0x0000_0FFF, 0x0000_AAE1, 0x0000_BBFE, 0x0000_FFFF] + scoped_non_global_good = [0x0000_0000, 0x0000_00DF, 0x0000_0001] + scoped_non_global_bad = [0x0000_0F00, 0x0000_01DF, 0x0000_0F01] + manufacturer_good = [0x0001_0000, 0x0001_00FF, 0xFFF0_0000, 0xFFF0_00FF, 0x0001_00FE] + manufacturer_bad = [0x0001_0A00, 0x0001_0BFF, 0x0001_FFFF, 0xFFF0_0C00, 0xFFF0_D0FF, 0x0001_F0FE] + test_good = [0xFFF1_0000, 0xFFF1_00E0, 0xFFF1_00FF, 0xFFF4_0000, 0xFFF4_00E0, 0xFFF4_00FF] + test_bad = [0xFFF1_5000, 0xFFF1_F000, 0xFFF1_FFFF, 0xFFF4_5000, 0xFFF4_F000, 0xFFF4_FFFF] + prefix_bad = [0xFFF5_0000, 0xFFF5_4FFF, 0xFFF5_5000, 0xFFF5_F000, 0xFFF5_FFFF] + + def check_standard_global(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting standard global {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kStandardGlobal, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_scoped_non_global(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting scoped non-global {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kScopedNonGlobal, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_manufacturer(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting manufacturer {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kManufacturer, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=False), msg) + + def check_test(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting test {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kTest, msg) + asserts.assert_true(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=False), msg) + + def check_all_bad(id): + id_type = command_id_type(id) + msg = f"Incorrect command range assessment, expecting invalid {id:08x}, type = {id_type}" + asserts.assert_equal(id_type, CommandIdType.kInvalid, msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=True), msg) + asserts.assert_false(is_valid_command_id(id_type, allow_test=False), msg) + + for id in standard_global_good: + check_standard_global(id) + for id in standard_global_bad: + check_all_bad(id) + for id in scoped_non_global_good: + check_scoped_non_global(id) + for id in scoped_non_global_bad: + check_all_bad(id) + for id in manufacturer_good: + check_manufacturer(id) + for id in manufacturer_bad: + check_all_bad(id) + for id in test_good: + check_test(id) + for id in test_bad: + check_all_bad(id) + for id in prefix_bad: + check_all_bad(id) + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py index e692adfdfb5a10..f9fbd2e2ade835 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/global_attribute_ids.py @@ -61,6 +61,15 @@ class AttributeIdType(Enum): kManufacturer = auto(), kTest = auto(), + +class CommandIdType(Enum): + kInvalid = auto() + kStandardGlobal = auto(), + kScopedNonGlobal = auto(), + kManufacturer = auto(), + kTest = auto(), + + # ID helper classes - this allows us to use the values from the prefix and suffix table directly # because the class handles the non-inclusive range. @@ -92,6 +101,9 @@ def __contains__(self, id: int): CLUSTER_ID_MANUFACTURER_RANGE_SUFFIX = SuffixIdRange(0xFC00, 0xFFFE) ATTRIBUTE_ID_GLOBAL_RANGE_SUFFIX = SuffixIdRange(0xF000, 0xFFFE) ATTRIBUTE_ID_NON_GLOBAL_RANGE_SUFFIX = SuffixIdRange(0x0000, 0x4FFF) +COMMAND_ID_GLOBAL_STANDARD_SUFFIX = SuffixIdRange(0x00E0, 0x00FF) +COMMAND_ID_NON_GLOBAL_SCOPED_SUFFIX = SuffixIdRange(0x0000, 0x00DF) +COMMAND_ID_SUFFIX = SuffixIdRange(0x0000, 0x00FF) def device_type_id_type(id: int) -> DeviceTypeIdType: @@ -145,3 +157,22 @@ def is_valid_attribute_id(id_type: AttributeIdType, allow_test: bool = False): if allow_test: valid.append(AttributeIdType.kTest) return id_type in valid + + +def command_id_type(id: int) -> CommandIdType: + if id in STANDARD_PREFIX and id in COMMAND_ID_GLOBAL_STANDARD_SUFFIX: + return CommandIdType.kStandardGlobal + if id in STANDARD_PREFIX and id in COMMAND_ID_NON_GLOBAL_SCOPED_SUFFIX: + return CommandIdType.kScopedNonGlobal + if id in MANUFACTURER_PREFIX and id in COMMAND_ID_SUFFIX: + return CommandIdType.kManufacturer + if id in TEST_PREFIX and id in COMMAND_ID_SUFFIX: + return CommandIdType.kTest + return CommandIdType.kInvalid + + +def is_valid_command_id(id_type: CommandIdType, allow_test: bool = False): + valid = [CommandIdType.kStandardGlobal, CommandIdType.kScopedNonGlobal, CommandIdType.kManufacturer] + if allow_test: + valid.append(CommandIdType.kTest) + return id_type in valid From c28bcdc20ec97e2b9a7383ec33154a0af70f5957 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 23 Oct 2024 12:08:55 -0400 Subject: [PATCH 06/14] Pything testing: Add more info to error summary (#36216) Get correct line for assert.fail too --- .../chip/testing/matter_testing.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py index 0a40b1688d74cf..053fa575c6452d 100644 --- a/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py +++ b/src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py @@ -919,6 +919,9 @@ class TestStep: expectation: str = "" is_commissioning: bool = False + def __str__(self): + return f'{self.test_plan_number}: {self.description}\tExpected outcome: {self.expectation}' + @dataclass class TestInfo: @@ -1325,7 +1328,7 @@ def extract_error_text() -> tuple[str, str]: if not trace: return no_stack_trace - if isinstance(exception, signals.TestError): + if isinstance(exception, signals.TestError) or isinstance(exception, signals.TestFailure): # Exception gets raised by the mobly framework, so the proximal error is one line back in the stack trace assert_candidates = [idx for idx, line in enumerate(trace) if "asserts" in line and "asserts.py" not in line] if not assert_candidates: @@ -1343,6 +1346,9 @@ def extract_error_text() -> tuple[str, str]: return probable_error.strip(), trace[file_candidates[-1]].strip() probable_error, probable_file = extract_error_text() + test_steps = self.get_defined_test_steps(self.current_test_info.name) + test_step = str(test_steps[self.current_step_index-1] + ) if test_steps is not None else 'UNKNOWN - no test steps provided in test script' logging.error(textwrap.dedent(f""" ****************************************************************** @@ -1353,8 +1359,12 @@ def extract_error_text() -> tuple[str, str]: * {probable_file} * {probable_error} * + * Test step: + * {test_step} + * + * Endpoint: {self.matter_test_config.endpoint} + * ******************************************************************* - """)) def on_pass(self, record): From 0a1867fe61933f42f2dbd2744b631e3f87c16bc9 Mon Sep 17 00:00:00 2001 From: JP Meijers Date: Wed, 23 Oct 2024 18:14:51 +0200 Subject: [PATCH 07/14] Add installation as snap instructions (#36099) * Add installation as snap instructions * Add hyperlink to snap store listing * Fix links to chip tool doc --- .../chip-tool/chip_tool_guide.md | 51 +++++++++++-------- .../light-switch-app/nrfconnect/README.md | 4 +- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/docs/development_controllers/chip-tool/chip_tool_guide.md b/docs/development_controllers/chip-tool/chip_tool_guide.md index 8aac8daa121812..81000368a47f0c 100644 --- a/docs/development_controllers/chip-tool/chip_tool_guide.md +++ b/docs/development_controllers/chip-tool/chip_tool_guide.md @@ -9,33 +9,29 @@ the setup payload or performing discovery actions.
-## Source files +## Installation -You can find source files of the CHIP Tool in the `examples/chip-tool` -directory. - -> **Note:** The CHIP Tool caches the configuration state in the -> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the -> `/tmp` directory can sometimes resolve issues related to stale configuration. +On Linux distributions +[running snapd](https://snapcraft.io/docs/installing-snapd), such as Ubuntu, the +CHIP Tool can be installed using the +[chip-tool snap](https://snapcraft.io/chip-tool). To do this, run: -> **Note:** To make the configuration persistent (since `/tmp` directory might -> be flushed at each reboot) you can change the directory where CHIP Tool caches -> its configuration by using the option `--storage-directory` +``` +sudo snap install chip-tool +``` -
+## Building from source -## Building and running the CHIP Tool +The source files of the CHIP Tool are available in the `examples/chip-tool` +directory. -Before you can use the CHIP Tool, you must compile it from source on Linux -(amd64/aarch64) or macOS. If you want to run it on Raspberry Pi, it must use a -64-bit OS. +The source can be compiled on Linux (amd64/aarch64) or macOS. If you want to run +it on Raspberry Pi, you must use a 64-bit OS. > **Note:** To ensure compatibility, always build the CHIP Tool and the Matter > device from the same revision of the `connectedhomeip` repository. -### Building the CHIP Tool - -To build and run the CHIP Tool: +To build the CHIP Tool: 1. Install all required packages for Matter and prepare the source code and the build system. Read the [Building Matter](../../guides/BUILDING.md) guide for @@ -50,10 +46,16 @@ To build and run the CHIP Tool: In this command, `BUILD_PATH` specifies where the target binaries are to be placed. -### Running the CHIP Tool +## Running the CHIP Tool + +If you installed the CHIP Tool as a snap, the command to run it would be: + +``` +$ chip-tool +``` -To check if the CHIP Tool runs correctly, execute the following command from the -`BUILD_PATH` directory: +If you compiled the CHIP Tool from source, it can be executed with the following +command from the `BUILD_PATH` directory: ``` $ ./chip-tool @@ -68,6 +70,13 @@ more complex command by appending it with sub-commands. Examples of specific commands and their use cases are described in the [Supported commands and options](#supported-commands-and-options) section. +> **Note:** The CHIP Tool caches the configuration state in the +> `/tmp/chip_tool_config.ini` file. Deleting this and other `.ini` files in the +> `/tmp` directory can sometimes resolve issues related to stale configuration. +> To make the configuration persistent you can change the directory where CHIP +> Tool caches its configuration by using the command line option +> `--storage-directory` +
## CHIP Tool modes diff --git a/examples/light-switch-app/nrfconnect/README.md b/examples/light-switch-app/nrfconnect/README.md index 11e53793463570..02f7b500aa6270 100644 --- a/examples/light-switch-app/nrfconnect/README.md +++ b/examples/light-switch-app/nrfconnect/README.md @@ -638,7 +638,7 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool). + [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source). 2. Go to the CHIP Tool build directory. 3. Add an ACL to the development kit that is programmed with the [Lighting Application Example](../../lighting-app/nrfconnect/README.md) by @@ -690,7 +690,7 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-and-running-the-chip-tool). + [CHIP Tool user guide](../../../docs/development_controllers/chip-tool/chip_tool_guide.md#building-from-source). 2. Go to the CHIP Tool build directory. 3. Add the light switch device to the multicast group by running the following From 334c6693564dd9b33c62951c47a78d3676d5c473 Mon Sep 17 00:00:00 2001 From: Ethan Zhou <73028112+ethanzhouyc@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:40:18 -0400 Subject: [PATCH 08/14] Generate Conformance Data with Alchemy (#36186) * generate conformance with Alchemy * add conform to color-control cluster extension --- .../chip/access-control-cluster.xml | 50 +- .../data-model/chip/account-login-cluster.xml | 11 +- .../zcl/data-model/chip/actions-cluster.xml | 33 +- .../administrator-commissioning-cluster.xml | 22 +- .../data-model/chip/air-quality-cluster.xml | 5 +- .../chip/application-basic-cluster.xml | 42 +- .../chip/application-launcher-cluster.xml | 18 +- .../data-model/chip/audio-output-cluster.xml | 16 +- .../chip/ballast-configuration-cluster.xml | 80 +- .../chip/basic-information-cluster.xml | 110 +- .../zcl/data-model/chip/binding-cluster.xml | 7 +- .../data-model/chip/boolean-state-cluster.xml | 8 +- .../boolean-state-configuration-cluster.xml | 81 +- .../zcl/data-model/chip/channel-cluster.xml | 53 +- .../data-model/chip/color-control-cluster.xml | 455 ++++- .../chip/commissioner-control-cluster.xml | 5 + .../concentration-measurement-cluster.xml | 1184 +++++++++---- .../chip/content-app-observer-cluster.xml | 2 + .../chip/content-control-cluster.xml | 86 +- .../chip/content-launch-cluster.xml | 30 +- .../data-model/chip/descriptor-cluster.xml | 29 +- .../chip/device-energy-management-cluster.xml | 95 +- .../device-energy-management-mode-cluster.xml | 12 +- .../chip/diagnostic-logs-cluster.xml | 86 +- .../chip/dishwasher-alarm-cluster.xml | 45 +- .../chip/dishwasher-mode-cluster.xml | 14 +- .../zcl/data-model/chip/door-lock-cluster.xml | 1514 ++++++++++------- .../zcl/data-model/chip/drlc-cluster.xml | 39 +- .../electrical-energy-measurement-cluster.xml | 58 +- .../electrical-power-measurement-cluster.xml | 122 +- .../data-model/chip/energy-evse-cluster.xml | 151 +- .../chip/energy-evse-mode-cluster.xml | 12 +- .../chip/energy-preference-cluster.xml | 35 +- .../ethernet-network-diagnostics-cluster.xml | 73 +- .../data-model/chip/fixed-label-cluster.xml | 5 +- .../chip/flow-measurement-cluster.xml | 20 +- .../chip/general-commissioning-cluster.xml | 71 +- .../chip/general-diagnostics-cluster.xml | 60 +- .../chip/group-key-mgmt-cluster.xml | 26 +- .../zcl/data-model/chip/groups-cluster.xml | 17 +- .../chip/icd-management-cluster.xml | 260 +-- .../zcl/data-model/chip/identify-cluster.xml | 16 +- .../chip/illuminance-measurement-cluster.xml | 41 +- .../data-model/chip/keypad-input-cluster.xml | 2 + .../chip/laundry-dryer-controls-cluster.xml | 16 +- .../chip/laundry-washer-mode-cluster.xml | 14 +- .../data-model/chip/level-control-cluster.xml | 95 +- .../localization-configuration-cluster.xml | 6 +- .../zcl/data-model/chip/low-power-cluster.xml | 1 + .../data-model/chip/media-input-cluster.xml | 16 +- .../chip/media-playback-cluster.xml | 103 +- .../zcl/data-model/chip/messages-cluster.xml | 17 +- .../chip/microwave-oven-control-cluster.xml | 73 +- .../chip/microwave-oven-mode-cluster.xml | 10 +- .../data-model/chip/mode-select-cluster.xml | 34 +- .../chip/network-commissioning-cluster.xml | 261 ++- .../chip/occupancy-sensing-cluster.xml | 228 ++- .../zcl/data-model/chip/onoff-cluster.xml | 53 +- .../chip/operational-credentials-cluster.xml | 40 +- .../chip/operational-state-cluster.xml | 71 +- .../chip/operational-state-oven-cluster.xml | 53 +- .../chip/operational-state-rvc-cluster.xml | 74 +- .../zcl/data-model/chip/oven-mode-cluster.xml | 14 +- .../data-model/chip/power-source-cluster.xml | 234 ++- .../power-source-configuration-cluster.xml | 5 +- .../chip/power-topology-cluster.xml | 14 +- .../chip/pressure-measurement-cluster.xml | 57 +- ...pump-configuration-and-control-cluster.xml | 188 +- .../data-model/chip/refrigerator-alarm.xml | 28 +- ...rature-controlled-cabinet-mode-cluster.xml | 14 +- .../relative-humidity-measurement-cluster.xml | 20 +- .../chip/resource-monitoring-cluster.xml | 78 +- .../chip/rvc-clean-mode-cluster.xml | 12 +- .../data-model/chip/rvc-run-mode-cluster.xml | 12 +- .../zcl/data-model/chip/scene.xml | 34 +- .../data-model/chip/service-area-cluster.xml | 42 +- .../chip/smoke-co-alarm-cluster.xml | 91 +- .../chip/software-diagnostics-cluster.xml | 28 +- .../zcl/data-model/chip/switch-cluster.xml | 45 +- .../chip/target-navigator-cluster.xml | 15 +- .../chip/temperature-control-cluster.xml | 49 +- .../chip/temperature-measurement-cluster.xml | 20 +- .../data-model/chip/thermostat-cluster.xml | 310 +++- ...t-user-interface-configuration-cluster.xml | 11 +- ...hread-border-router-management-cluster.xml | 51 +- .../thread-network-diagnostics-cluster.xml | 408 ++++- .../chip/thread-network-directory-cluster.xml | 109 +- .../chip/time-format-localization-cluster.xml | 21 +- .../chip/time-synchronization-cluster.xml | 118 +- .../chip/unit-localization-cluster.xml | 7 +- .../data-model/chip/user-label-cluster.xml | 1 + ...alve-configuration-and-control-cluster.xml | 71 +- .../data-model/chip/wake-on-lan-cluster.xml | 12 +- .../chip/washer-controls-cluster.xml | 30 +- .../chip/water-heater-management-cluster.xml | 40 +- .../chip/water-heater-mode-cluster.xml | 12 +- .../chip/wifi-network-diagnostics-cluster.xml | 87 +- .../chip/wifi-network-management-cluster.xml | 8 +- .../zcl/data-model/chip/window-covering.xml | 230 ++- 99 files changed, 6759 insertions(+), 2033 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index edf1b65e941ad0..831cc5b49361b0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -113,29 +113,58 @@ limitations under the License. ACL + Extension + + + - SubjectsPerAccessControlEntry - TargetsPerAccessControlEntry - AccessControlEntriesPerFabric - CommissioningARL - ARL - + + SubjectsPerAccessControlEntry + + + + TargetsPerAccessControlEntry + + + + AccessControlEntriesPerFabric + + + + CommissioningARL + + + + + + ARL + + + + + This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. - + + + + Returns the review token for the request, which can be used to correlate with a FabricRestrictionReviewUpdate event. + + + @@ -145,6 +174,7 @@ limitations under the License. + @@ -154,6 +184,9 @@ limitations under the License. + + + @@ -162,6 +195,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index baf74dc3c2e1da..38fcbcaaf9c5e4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -28,31 +28,36 @@ limitations under the License. Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. - + + Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. - + - + + The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. + This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. + This event can be used by the Content App to indicate that the current user has logged out. In response to this event, the Fabric Admin SHALL remove access to this Content App by the specified Node. If no Node is provided, then the Fabric Admin SHALL remove access to all non-Admin Nodes. + diff --git a/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml index acf28b88e46414..bed60efdf50c65 100644 --- a/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml @@ -89,11 +89,20 @@ limitations under the License. 0x0025 ACTIONS_CLUSTER This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. - - ActionList - EndpointLists - SetupURL - + + + ActionList + + + + EndpointLists + + + + SetupURL + + + This command triggers an action (state change) on the involved endpoints. @@ -173,17 +182,19 @@ limitations under the License. This event SHALL be generated when there is a change in the Status of an ActionID. - - + + + This event SHALL be generated when there is some error which prevents the action from its normal planned execution. - - - - + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml index 3532c89b931880..55a8310f0fa7ac 100644 --- a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml @@ -43,10 +43,19 @@ limitations under the License. - WindowStatus - AdminFabricIndex - AdminVendorId - + + WindowStatus + + + + AdminFabricIndex + + + + AdminVendorId + + + This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. @@ -55,17 +64,22 @@ limitations under the License. + This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. + + + This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. + diff --git a/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml index bbc57510e85dce..6b91830856441c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml @@ -41,7 +41,10 @@ limitations under the License. - AirQuality + + AirQuality + + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index e6331f698fd423..ea6be51e9bcb28 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -24,16 +24,38 @@ limitations under the License. true true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. - VendorName - VendorID - ApplicationName - ProductID - Application - Status - ApplicationVersion - - AllowedVendorList - + + VendorName + + + + VendorID + + + + ApplicationName + + + + ProductID + + + + Application + + + + Status + + + + ApplicationVersion + + + + AllowedVendorList + + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index 50b715e138a744..34eb73fde5b351 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -31,29 +31,41 @@ limitations under the License. - CatalogList - CurrentApp - + + CatalogList + + + + + + CurrentApp + + + Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. + Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. + Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. + This command SHALL be generated in response to LaunchApp commands. + diff --git a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml index acaa9deadb6a3b..0de5d0e3301de5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml @@ -31,12 +31,19 @@ limitations under the License. - OutputList - CurrentOutput - + + OutputList + + + + CurrentOutput + + + Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. + @@ -44,6 +51,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml index 32450208914a6d..29ec1cd38108f3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml @@ -41,53 +41,75 @@ limitations under the License. - PhysicalMinLevel - PhysicalMaxLevel - BallastStatus + + PhysicalMinLevel + + + + PhysicalMaxLevel + + + + BallastStatus + + - - MinLevel - + + MinLevel + + - - MaxLevel - + + MaxLevel + + - IntrinsicBallastFactor - + IntrinsicBallastFactor + + - - BallastFactorAdjustment - + + BallastFactorAdjustment + + - LampQuantity + + LampQuantity + + - LampType - + LampType + + - LampManufacturer - + LampManufacturer + + - - LampRatedHours - + + LampRatedHours + + - LampBurnHours - + LampBurnHours + + - LampAlarmMode - + LampAlarmMode + + - - LampBurnHoursTripPoint - + + LampBurnHoursTripPoint + + diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index 7f6320a5880dc9..288c82f950b8ab 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -74,52 +74,118 @@ limitations under the License. which apply to the whole Node. Also allows setting user device information such as location. - DataModelRevision - VendorName - VendorID - ProductName - ProductID - + + DataModelRevision + + + + VendorName + + + + VendorID + + + + ProductName + + + + ProductID + + + NodeLabel + Location + + + + HardwareVersion + + + + HardwareVersionString + + + + SoftwareVersion + + + + SoftwareVersionString + + + + ManufacturingDate + - HardwareVersion - HardwareVersionString - SoftwareVersion - SoftwareVersionString - ManufacturingDate - PartNumber - ProductURL - ProductLabel - SerialNumber - + + PartNumber + + + + ProductURL + + + + ProductLabel + + + + SerialNumber + + + LocalConfigDisabled + + + + Reachable + + + + UniqueID + + + + CapabilityMinima + + + + ProductAppearance + + + + SpecificationVersion + + + + MaxPathsPerInvoke + - Reachable - UniqueID - CapabilityMinima - ProductAppearance - SpecificationVersion - MaxPathsPerInvoke The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. + The ShutDown event SHOULD be emitted by a Node prior to any orderly shutdown sequence on a best-effort basis. + The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. + This event (when supported) SHALL be generated when there is a change in the Reachable attribute. diff --git a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml index 741a5a9372edc0..0b1cbd0c560091 100644 --- a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml @@ -31,9 +31,10 @@ limitations under the License. 0x001e BINDING_CLUSTER The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. - - Binding - + + Binding + + diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml index 0dee692affacee..30a16e16bcc0b0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml @@ -26,11 +26,15 @@ limitations under the License. true true - StateValue - + + StateValue + + + This event SHALL be generated when the StateValue attribute changes. + diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml index 4fb33dd9749a0e..85705e6a03050e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml @@ -58,34 +58,97 @@ limitations under the License. - CurrentSensitivityLevel - SupportedSensitivityLevels - DefaultSensitivityLevel - AlarmsActive - AlarmsSuppressed - AlarmsEnabled - AlarmsSupported - SensorFault - + + CurrentSensitivityLevel + + + + + + SupportedSensitivityLevels + + + + + + DefaultSensitivityLevel + + + + + + AlarmsActive + + + + + + + + + AlarmsSuppressed + + + + + + AlarmsEnabled + + + + + + + + + AlarmsSupported + + + + + + + + + SensorFault + + + This command is used to suppress the specified alarm mode. + + + This command is used to enable or disable the specified alarm mode. + + + + + + This event SHALL be generated when any bits in the AlarmsActive and/or AlarmsSuppressed attributes change. + + + + + + This event SHALL be generated when the device registers or clears a fault. + diff --git a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index 25ec7b7062f97a..c3a08ab084359b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -41,30 +41,57 @@ limitations under the License. - ChannelList - Lineup - CurrentChannel - + + ChannelList + + + + + + Lineup + + + + + + CurrentChannel + + + Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. + + + + + + Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. + This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. + Upon receipt, this SHALL display the active status of the input list on screen. + + + + + + @@ -76,12 +103,18 @@ limitations under the License. + + + This command is a response to the GetProgramGuide command. + + + @@ -90,6 +123,12 @@ limitations under the License. + + + + + + @@ -98,6 +137,12 @@ limitations under the License. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml index 3623ce1ccf925c..a479da36375e4f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml @@ -127,135 +127,401 @@ limitations under the License. - CurrentHue + + CurrentHue + + + + - CurrentSaturation + + CurrentSaturation + + + + - RemainingTime + + RemainingTime + + - CurrentX + + CurrentX + + + + - CurrentY + + CurrentY + + + + - DriftCompensation + + DriftCompensation + + - CompensationText + + CompensationText + + - ColorTemperatureMireds + + ColorTemperatureMireds + + + + - ColorMode + + ColorMode + + - Options + + Options + + - NumberOfPrimaries + + NumberOfPrimaries + + - Primary1X + + Primary1X + + + + + + + + + + - Primary1Y + + Primary1Y + + + + + + + + + + - Primary1Intensity + + Primary1Intensity + + + + + + + + + + - Primary2X + + Primary2X + + + + + + + + + + - Primary2Y + + Primary2Y + + + + + + + + + + - Primary2Intensity + + Primary2Intensity + + + + + + + + + + - Primary3X + + Primary3X + + + + + + + + + + - Primary3Y + + Primary3Y + + + + + + + + + + - Primary3Intensity + + Primary3Intensity + + + + + + + + + + - Primary4X + + Primary4X + + + + + + + + + + - Primary4Y + + Primary4Y + + + + + + + + + + - Primary4Intensity + + Primary4Intensity + + + + + + + + + + - Primary5X + + Primary5X + + + + + + + + + + - Primary5Y + + Primary5Y + + + + + + + + + + - Primary5Intensity + + Primary5Intensity + + + + + + + + + + - Primary6X + + Primary6X + + + + + + + + + + - Primary6Y + + Primary6Y + + + + + + + + + + - Primary6Intensity + + Primary6Intensity + + + + + + + + + + WhitePointX + WhitePointY + ColorPointRX + ColorPointRY + ColorPointRIntensity + ColorPointGX + ColorPointGY + ColorPointGIntensity + ColorPointBX + ColorPointBY + ColorPointBIntensity + - CoupleColorTempToLevelMinMireds - + + CoupleColorTempToLevelMinMireds + + + + + + + + StartUpColorTemperatureMireds + + + + + + @@ -267,6 +533,9 @@ limitations under the License. + + + @@ -277,6 +546,9 @@ limitations under the License. + + + @@ -288,6 +560,9 @@ limitations under the License. + + + @@ -298,6 +573,9 @@ limitations under the License. + + + @@ -308,6 +586,9 @@ limitations under the License. + + + @@ -319,6 +600,9 @@ limitations under the License. + + + @@ -330,6 +614,9 @@ limitations under the License. + + + @@ -341,6 +628,9 @@ limitations under the License. + + + @@ -351,6 +641,9 @@ limitations under the License. + + + @@ -362,6 +655,9 @@ limitations under the License. + + + @@ -372,20 +668,69 @@ limitations under the License. + + + - EnhancedCurrentHue - EnhancedColorMode - ColorLoopActive - ColorLoopDirection - ColorLoopTime - ColorLoopStartEnhancedHue - ColorLoopStoredEnhancedHue - ColorCapabilities - ColorTempPhysicalMinMireds - ColorTempPhysicalMaxMireds + + EnhancedCurrentHue + + + + + + EnhancedColorMode + + + + ColorLoopActive + + + + + + ColorLoopDirection + + + + + + ColorLoopTime + + + + + + ColorLoopStartEnhancedHue + + + + + + ColorLoopStoredEnhancedHue + + + + + + ColorCapabilities + + + + ColorTempPhysicalMinMireds + + + + + + ColorTempPhysicalMaxMireds + + + + @@ -396,6 +741,9 @@ limitations under the License. + + + @@ -406,6 +754,9 @@ limitations under the License. + + + @@ -417,6 +768,9 @@ limitations under the License. + + + @@ -428,6 +782,9 @@ limitations under the License. + + + @@ -441,6 +798,9 @@ limitations under the License. + + + @@ -449,6 +809,13 @@ limitations under the License. + + + + + + + @@ -461,6 +828,9 @@ limitations under the License. + + + @@ -474,6 +844,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml index dcfb1dfa7096b8..33f26e3689e5f4 100644 --- a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml @@ -35,6 +35,7 @@ limitations under the License. SupportedDeviceCategories + @@ -44,6 +45,7 @@ limitations under the License. + @@ -51,6 +53,7 @@ limitations under the License. + @@ -60,6 +63,7 @@ limitations under the License. + @@ -68,6 +72,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml index 4d03c539103970..e2116fc03cc80c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml @@ -58,17 +58,70 @@ limitations under the License. - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -113,17 +166,70 @@ limitations under the License. - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -139,45 +245,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -193,45 +352,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -247,45 +459,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -301,45 +566,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -355,45 +673,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -409,45 +780,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -463,45 +887,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + @@ -517,45 +994,98 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - PeakMeasuredValue - PeakMeasuredValueWindow - AverageMeasuredValue - AverageMeasuredValueWindow - Uncertainty - MeasurementUnit - MeasurementMedium - LevelValue + + MeasuredValue + + + + + + MinMeasuredValue + + + + + + MaxMeasuredValue + + + + + + PeakMeasuredValue + + + + + + PeakMeasuredValueWindow + + + + + + AverageMeasuredValue + + + + + + AverageMeasuredValueWindow + + + + + + Uncertainty + + + + + + MeasurementUnit + + + + + + MeasurementMedium + + + + LevelValue + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml index 6e241c7b5c3cd0..0f5a99b6ba9266 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml @@ -29,6 +29,7 @@ limitations under the License. Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. + @@ -36,6 +37,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml index 06468c114c42dc..e42967b581fac6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml @@ -43,69 +43,139 @@ limitations under the License. - Enabled - OnDemandRatings - OnDemandRatingThreshold - ScheduledContentRatings - ScheduledContentRatingThreshold - ScreenDailyTime - RemainingScreenTime - BlockUnrated + + Enabled + + + + OnDemandRatings + + + + + + OnDemandRatingThreshold + + + + + + ScheduledContentRatings + + + + + + ScheduledContentRatingThreshold + + + + + + ScreenDailyTime + + + + + + RemainingScreenTime + + + + + + BlockUnrated + + + + The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. + + + The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. + + + This command SHALL be generated in response to a ResetPIN command. The data for this command SHALL be as follows: + + + The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. + The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. + The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. + + + The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. + + + The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. + + + The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. + + + The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. + + + The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. + + + This event SHALL be generated when the RemainingScreenTime equals 0. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml index 7058f969799087..31ad15a48b93ac 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml @@ -25,10 +25,20 @@ limitations under the License. true This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - - AcceptHeader - SupportedStreamingProtocols - + + + AcceptHeader + + + + + + SupportedStreamingProtocols + + + + + Upon receipt, this SHALL launch the specified content with optional search criteria. @@ -36,6 +46,9 @@ limitations under the License. + + + @@ -43,12 +56,21 @@ limitations under the License. + + + This command SHALL be generated in response to LaunchContent command. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml index d63dbeb05ca11a..f34d705a2486da 100644 --- a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml @@ -44,11 +44,28 @@ limitations under the License. - - DeviceTypeList - ServerList - ClientList - PartsList - TagList + + + DeviceTypeList + + + + ServerList + + + + ClientList + + + + PartsList + + + + TagList + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml index 3550dd0301be99..250e3546ea8805 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml @@ -74,41 +74,95 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - ESAType - ESACanGenerate - ESAState - AbsMinPower - AbsMaxPower + + ESAType + + + + ESACanGenerate + + + + ESAState + + + + AbsMinPower + + + + AbsMaxPower + + - PowerAdjustmentCapability + + PowerAdjustmentCapability + + + + - Forecast - OptOutState + + Forecast + + + + + + + + + OptOutState + + + + + + + + + + Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. + + + Allows a client to cancel an ongoing PowerAdjustmentRequest operation. + + + Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). + + + Allows a client to temporarily pause an operation and reduce the ESAs energy demand. + + + Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. + + + @@ -116,20 +170,36 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + + + Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. + + + Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. + + + + + + + This event SHALL be generated when the Power Adjustment session is started. + + + @@ -137,15 +207,24 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + + + This event SHALL be generated when the ESA enters the Paused state. + + + This event SHALL be generated when the ESA leaves the Paused state and resumes operation. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml index c3440adebef3f6..470040b5c4f476 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml @@ -59,18 +59,26 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + This command is used to change device modes. + This command is sent by the device on receipt of the ChangeToMode command. + diff --git a/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml index 27162f66e5e6db..4140fd18a0eaec 100644 --- a/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml @@ -15,46 +15,48 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - - - - - - - - - - - - - - Diagnostic Logs - CHIP - The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. - 0x0032 - DIAGNOSTIC_LOGS_CLUSTER - true - true - - Retrieving diagnostic logs from a Node - - - - - - Response to the RetrieveLogsRequest - - - - - - + + + + + + + + + + + + + + + + + + + + + + Diagnostic Logs + CHIP + The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. + 0x0032 + DIAGNOSTIC_LOGS_CLUSTER + true + true + + Retrieving diagnostic logs from a Node + + + + + + + Response to the RetrieveLogsRequest + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml index 7e41a7a1c03f99..a8cf1e166219e2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml @@ -43,27 +43,46 @@ limitations under the License. - Mask - Latch - State - Supported + + Mask + + + + Latch + + + + + + State + + + + Supported + + - Reset alarm - + Reset alarm + + + + - Modify enabled alarms - + Modify enabled alarms + + - Notify - - - - + Notify + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml index 7c7dec635f3b6c..7cc15557f0c5a1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml @@ -57,11 +57,17 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + StartUpMode OnMode - + @@ -69,6 +75,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -77,6 +84,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml index b25cd549d90091..f16bbbf28bbbba 100644 --- a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml @@ -131,659 +131,901 @@ limitations under the License. 3. Everything that depends on a certain feature is optional because we have no way of setting up the dependencies here. Dependencies would be probably resolved in the cluster itself. Those attributes/commands are marked with a special comment. --> + + + + LockState + + + + LockType + + + + ActuatorEnabled + + + + + DoorState + + + + + + + DoorOpenEvents + + + + + + + + + DoorClosedEvents + + + + + + + + + OpenPeriod + + + + + + + + + NumberOfTotalUsersSupported + + + + + + + NumberOfPINUsersSupported + + + + + + + NumberOfRFIDUsersSupported + + + + + + + NumberOfWeekDaySchedulesSupportedPerUser + + + + + + + NumberOfYearDaySchedulesSupportedPerUser + + + + + + + NumberOfHolidaySchedulesSupported + + + + + + + MaxPINCodeLength + + + + + + + MinPINCodeLength + + + + + + + MaxRFIDCodeLength + + + + + + + MinRFIDCodeLength + + + + + + + CredentialRulesSupport + + + + + + + NumberOfCredentialsSupportedPerUser + + + + + + Language + + + + + + LEDSettings + + + + + + AutoRelockTime + + + + + + SoundVolume + + + + + + OperatingMode + + + + + + SupportedOperatingModes + + + + DefaultConfigurationRegister + + + + EnableLocalProgramming + + + + + + EnableOneTouchLocking + + + + + + EnableInsideStatusLED + + + + + + EnablePrivacyModeButton + + + + + + LocalProgrammingFeatures + + + + + + + WrongCodeEntryLimit + + + + + + + + + + + + UserCodeTemporaryDisableTime + + + + + + + + + + + + SendPINOverTheAir + + + + + + + + + + + + + + RequirePINforRemoteOperation + + + + + + + + + + + + + ExpiringUserTimeout + + + + + + + + + AliroReaderVerificationKey + + + + + + + + AliroReaderGroupIdentifier + + + + + + + + AliroReaderGroupSubIdentifier + + + + + + + + AliroExpeditedTransactionSupportedProtocolVersions + + + + + + + + AliroGroupResolvingKey + + + + + + + + AliroSupportedBLEUWBProtocolVersions + + + + + + + + AliroBLEAdvertisingVersion + + + + + + + + NumberOfAliroCredentialIssuerKeysSupported + + + + + + + NumberOfAliroEndpointKeysSupported + + + + + + + This command causes the lock device to lock the door. + + + + + + This command causes the lock device to unlock the door. + + + + + + + This command causes the lock device to unlock the door with a timeout parameter. + + + + + + + + Set a weekly repeating schedule for a specified user. + + + + + + + + + + + + + + + Retrieve the specific weekly schedule for the specific user. + + + + + + + + + + Returns the weekly repeating schedule data for the specified schedule index. + + + + + + + + + + + + + + + Clear the specific weekly schedule or all weekly schedules for the specific user. + + + + + + + + + + Set a time-specific schedule ID for a specified user. + + + + + + + + + + + + Returns the year day schedule data for the specified schedule and user indexes. + + + + + + + + + + Returns the year day schedule data for the specified schedule and user indexes. + + + + + + + + + + + + Clears the specific year day schedule or all year day schedules for the specific user. + + + + + + + + + + Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. + + + + + + + + + + + + Get the holiday schedule for the specified index. + + + + + + + + + Returns the Holiday Schedule Entry for the specified Holiday ID. + + + + + + + + + + + + Clears the holiday schedule or all holiday schedules. + + + + + + + + + Set User into the lock. + + + + + + + + + + + + + + + Retrieve User. + + + + + + + + + Returns the User for the specified UserIndex. + + + + + + + + + + + + + + + + + Clears a User or all Users. + + + + + + + + + Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. + + + + + + + + + + + + + + Returns the status for setting the specified credential. + + + + + + + + + + Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. + + + + + + + + + Returns the status for the specified credential. + + + + + + + + + + + + + Clear one, one type, or all credentials except ProgrammingPIN credential. + + + + + + + + This command causes the lock device to unlock the door without pulling the latch. + + + + + + + + This command communicates an Aliro Reader configuration to the lock. + + + + + + + + + + + This command clears an existing Aliro Reader configuration for the lock. + + + + + - - LockState - LockType - ActuatorEnabled - - DoorState - - - DoorOpenEvents - - - - - - DoorClosedEvents - - - - - - OpenPeriod - - - - - NumberOfTotalUsersSupported - - NumberOfPINUsersSupported - - NumberOfRFIDUsersSupported - - NumberOfWeekDaySchedulesSupportedPerUser - - NumberOfYearDaySchedulesSupportedPerUser - - NumberOfHolidaySchedulesSupported - - MaxPINCodeLength - - MinPINCodeLength - - MaxRFIDCodeLength - - MinRFIDCodeLength - - CredentialRulesSupport - - NumberOfCredentialsSupportedPerUser - - Language - - - - - LEDSettings - - - - - AutoRelockTime - - - - - SoundVolume - - - - - OperatingMode - - - - SupportedOperatingModes - DefaultConfigurationRegister - - EnableLocalProgramming - - - - - EnableOneTouchLocking - - - - - EnableInsideStatusLED - - - - - EnablePrivacyModeButton - - - - - LocalProgrammingFeatures - - - - - - WrongCodeEntryLimit - - - - - - UserCodeTemporaryDisableTime - - - - - - SendPINOverTheAir - - - - - - RequirePINforRemoteOperation - - - - - - - ExpiringUserTimeout - - - - - - AliroReaderVerificationKey - - - - - AliroReaderGroupIdentifier - - - - - AliroReaderGroupSubIdentifier - - - - - AliroExpeditedTransactionSupportedProtocolVersions - - - - - AliroGroupResolvingKey - - - - - AliroSupportedBLEUWBProtocolVersions - - - - - AliroBLEAdvertisingVersion - - - - NumberOfAliroCredentialIssuerKeysSupported - - NumberOfAliroEndpointKeysSupported - - - - This command causes the lock device to lock the door. - - - - - This command causes the lock device to unlock the door. - - - - - - This command causes the lock device to unlock the door with a timeout parameter. - - - - - - - Set a weekly repeating schedule for a specified user. - - - - - - - - - - - - Retrieve the specific weekly schedule for the specific user. - - - - - - - Returns the weekly repeating schedule data for the specified schedule index. - - - - - - - - - - - - Clear the specific weekly schedule or all weekly schedules for the specific user. - - - - - - - Set a time-specific schedule ID for a specified user. - - - - - - - - - Returns the year day schedule data for the specified schedule and user indexes. - - - - - - - Returns the year day schedule data for the specified schedule and user indexes. - - - - - - - - - Clears the specific year day schedule or all year day schedules for the specific user. - - - - - - - Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. - - - - - - - - - Get the holiday schedule for the specified index. - - - - - - Returns the Holiday Schedule Entry for the specified Holiday ID. - - - - - - - - - Clears the holiday schedule or all holiday schedules. - - - - - - Set User into the lock. - - - - - - - - - - - - Retrieve User. - - - - - - Returns the User for the specified UserIndex. - - - - - - - - - - - - - - Clears a User or all Users. - - - - - - Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. - - - - - - - - - - - Returns the status for setting the specified credential. - - - - - - - Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. - - - - - - Returns the status for the specified credential. - - - - - - - - - - Clear one, one type, or all credentials except ProgrammingPIN credential. - - - - - This command causes the lock device to unlock the door without pulling the latch. - - - - - This command communicates an Aliro Reader configuration to the lock. - - - - - - - - This command clears an existing Aliro Reader configuration for the lock. - - - - - - - The door lock cluster provides several alarms which can be sent when there is a critical state on the door lock. - - - - - The door lock server sends out a DoorStateChange event when the door lock door state changes. - - - - The door lock server sends out a LockOperation event when the event is triggered by the various lock operation sources. - - - - - - - - - - The door lock server sends out a LockOperationError event when a lock operation fails for various reasons. - - - - - - - - - - - The door lock server sends out a LockUserChange event when a lock user, schedule, or credential change has occurred. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + The door lock cluster provides several alarms which can be sent when there is a critical state on the door lock. + + + + + + The door lock server sends out a DoorStateChange event when the door lock door state changes. + + + + + + + The door lock server sends out a LockOperation event when the event is triggered by the various lock operation sources. + + + + + + + + + + + The door lock server sends out a LockOperationError event when a lock operation fails for various reasons. + + + + + + + + + + + + The door lock server sends out a LockUserChange event when a lock user, schedule, or credential change has occurred. + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -796,7 +1038,7 @@ limitations under the License. - + @@ -808,7 +1050,7 @@ limitations under the License. - + @@ -824,7 +1066,7 @@ limitations under the License. - + @@ -836,7 +1078,7 @@ limitations under the License. - + @@ -846,7 +1088,7 @@ limitations under the License. - + @@ -858,7 +1100,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml index d64bce1c85b7f6..d7e04ccf464668 100644 --- a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml @@ -199,21 +199,41 @@ limitations under the License. - LoadControlPrograms - NumberOfLoadControlPrograms - Events - ActiveEvents - NumberOfEventsPerProgram - NumberOfTransitions - + + LoadControlPrograms + + + + NumberOfLoadControlPrograms + + + + Events + + + + ActiveEvents + + + + NumberOfEventsPerProgram + + + + NumberOfTransitions + + + DefaultRandomStart + DefaultRandomDuration + @@ -221,18 +241,21 @@ limitations under the License. Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values. + Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID. + On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event. + @@ -240,6 +263,7 @@ limitations under the License. + + diff --git a/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml index eb05052538d2de..3fbd9e984fc2a0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml @@ -42,25 +42,71 @@ limitations under the License. - Accuracy - CumulativeEnergyImported + + Accuracy + + + + CumulativeEnergyImported + + + + + + + - CumulativeEnergyExported + + CumulativeEnergyExported + + + + + + + - PeriodicEnergyImported + + PeriodicEnergyImported + + + + + + + - PeriodicEnergyExported - CumulativeEnergyReset + + PeriodicEnergyExported + + + + + + + + + CumulativeEnergyReset + + + + CumulativeEnergyMeasured + + + PeriodicEnergyMeasured + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml index 7f49a643d1b1f9..18ee20bad30481 100644 --- a/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml @@ -51,40 +51,124 @@ limitations under the License. - PowerMode - NumberOfMeasurementTypes - Accuracy - Ranges - Voltage + + PowerMode + + + + NumberOfMeasurementTypes + + + + Accuracy + + + + Ranges + + + + Voltage + + - ActiveCurrent + + ActiveCurrent + + - ReactiveCurrent - ApparentCurrent + + ReactiveCurrent + + + + + + ApparentCurrent + + + + - ActivePower + + ActivePower + + - ReactivePower + + ReactivePower + + + + - ApparentPower + + ApparentPower + + + + - RMSVoltage + + RMSVoltage + + + + - RMSCurrent + + RMSCurrent + + + + - RMSPower + + RMSPower + + + + - Frequency + + Frequency + + + + - HarmonicCurrents + + HarmonicCurrents + + + + - HarmonicPhases + + HarmonicPhases + + + + - PowerFactor - NeutralCurrent + + PowerFactor + + + + + + NeutralCurrent + + + + MeasurementPeriodRanges + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml index 7a4a40d2e39966..97709d706abf4d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml @@ -128,53 +128,139 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - State - SupplyState - FaultState - ChargingEnabledUntil + + State + + + + SupplyState + + + + FaultState + + + + ChargingEnabledUntil + + - DischargingEnabledUntil - CircuitCapacity - MinimumChargeCurrent - MaximumChargeCurrent + + DischargingEnabledUntil + + + + + + CircuitCapacity + + + + MinimumChargeCurrent + + + + MaximumChargeCurrent + + - MaximumDischargeCurrent + + MaximumDischargeCurrent + + + + UserMaximumChargeCurrent + RandomizationDelayWindow + - NextChargeStartTime + + NextChargeStartTime + + + + - NextChargeTargetTime + + NextChargeTargetTime + + + + - NextChargeRequiredEnergy + + NextChargeRequiredEnergy + + + + - NextChargeTargetSoC + + NextChargeTargetSoC + + + + ApproximateEVEfficiency + + + - StateOfCharge + + StateOfCharge + + + + - BatteryCapacity + + BatteryCapacity + + + + - VehicleID - SessionID - SessionDuration - SessionEnergyCharged + + VehicleID + + + + + + SessionID + + + + SessionDuration + + + + SessionEnergyCharged + + - SessionEnergyDischarged + + SessionEnergyDischarged + + + + Allows a client to disable the EVSE from charging and discharging. + @@ -182,39 +268,57 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. + Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. + + + Allows a client to put the EVSE into a self-diagnostics mode. + Allows a client to set the user specified charging targets. + + + Allows a client to retrieve the current set of charging targets. + + + Allows a client to clear all stored charging targets. + + + The GetTargetsResponse is sent in response to the GetTargets Command. + + + This event SHALL be generated when the EV is plugged in. + @@ -224,6 +328,7 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + @@ -232,6 +337,7 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + @@ -241,6 +347,7 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + @@ -249,11 +356,15 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 + This event SHALL be generated when a RFID card has been read. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml index b28daf8899636c..7c4ddac9f6f09b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml @@ -59,18 +59,26 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + This command is used to change device modes. + This command is sent by the device on receipt of the ChangeToMode command. + diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml index a5e1ea8e950ae1..cf646ab0197be5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml @@ -34,26 +34,47 @@ limitations under the License. - EnergyBalances - + + EnergyBalances + + + + + - + + CurrentEnergyBalance - CurrentEnergyBalance + + + - EnergyPriorities + + EnergyPriorities + + + + - LowPowerModeSensitivities + + LowPowerModeSensitivities + + + + - + CurrentLowPowerModeSensitivity + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml index f2cf3173c68b29..d84f017f5eea00 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml @@ -37,26 +37,69 @@ limitations under the License. The Ethernet Network Diagnostics Cluster provides 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. - + + + + + + + + + + PHYRate - - + + + FullDuplex - - - - PHYRate - FullDuplex - PacketRxCount - PacketTxCount - TxErrCount - CollisionCount - OverrunCount - CarrierDetect - TimeSinceReset + + + PacketRxCount + + + + + + PacketTxCount + + + + + + TxErrCount + + + + + + CollisionCount + + + + + + OverrunCount + + + + + + CarrierDetect + + + + TimeSinceReset + + Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml index 96e420f01902de..5e4b1734efb46e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml @@ -31,6 +31,9 @@ limitations under the License. FIXED_LABEL_CLUSTER The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. - LabelList + + LabelList + + diff --git a/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml index 3e546e968514ea..b5336b50ad6406 100644 --- a/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml @@ -24,10 +24,22 @@ limitations under the License. FLOW_MEASUREMENT_CLUSTER true true - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - Tolerance + + MeasuredValue + + + + MinMeasuredValue + + + + MaxMeasuredValue + + + + Tolerance + + diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 167f7d13e322af..e8877b5c1cc9d9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -56,41 +56,86 @@ limitations under the License. Breadcrumb + - BasicCommissioningInfo - RegulatoryConfig - LocationCapability - SupportsConcurrentConnection - + + BasicCommissioningInfo + + + + RegulatoryConfig + + + + LocationCapability + + + + SupportsConcurrentConnection + + + TCAcceptedVersion + + + + + + TCMinRequiredVersion + + + + + + TCAcknowledgements + + + + + + TCAcknowledgementsRequired + + + + + + TCUpdateDeadline + + + + + + Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock + Success/failure response for ArmFailSafe command + Set the regulatory configuration to be used during commissioning @@ -98,30 +143,46 @@ limitations under the License. + Success/failure response for SetRegulatoryConfig command + Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. + Indicates to client whether CommissioningComplete command succeeded + This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. + + + + + + This command is used to convey the result from SetTCAcknowledgements. + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 26f0e5708dd280..9383517eb95a5b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -92,17 +92,44 @@ limitations under the License. - NetworkInterfaces - RebootCount + + NetworkInterfaces + + + + RebootCount + + - UpTime - TotalOperationalHours - BootReason - ActiveHardwareFaults - ActiveRadioFaults - ActiveNetworkFaults - TestEventTriggersEnabled + + UpTime + + + + TotalOperationalHours + + + + BootReason + + + + ActiveHardwareFaults + + + + ActiveRadioFaults + + + + ActiveNetworkFaults + + + + TestEventTriggersEnabled + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -> -> -> -> -> - - - - - - IdleModeDuration - ActiveModeDuration - ActiveModeThreshold - - RegisteredClients - - - - ICDCounter - - - ClientsSupportedPerFabric - UserActiveModeTriggerHint - UserActiveModeTriggerInstruction - OperatingMode - MaximumCheckInBackOff - - - Register a client to the end device - - - - - - - - - - RegisterClient response command - - - - - Unregister a client from an end device - - - - - - - Request the end device to stay in Active Mode for an additional ActiveModeThreshold - - - - - - StayActiveRequest response command - - - + + General + ICD Management + 0x0046 + ICD_MANAGEMENT_CLUSTER + Allows servers to ensure that listed clients are notified when a server is available for communication. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IdleModeDuration + + + + ActiveModeDuration + + + + ActiveModeThreshold + + + + RegisteredClients + + + + + + + ICDCounter + + + + + + + ClientsSupportedPerFabric + + + + + + UserActiveModeTriggerHint + + + + + + + + + UserActiveModeTriggerInstruction + + + + OperatingMode + + + + + + + + + MaximumCheckInBackOff + + + + + + + Register a client to the end device + + + + + + + + + + + + + RegisterClient response command + + + + + + + + Unregister a client from an end device + + + + + + + + + + Request the end device to stay in Active Mode for an additional ActiveModeThreshold + + + + + + + + + + + + StayActiveRequest response command + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml index b64eb7702f1517..27b94701fc3d07 100644 --- a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml @@ -51,16 +51,23 @@ limitations under the License. true true - - IdentifyTime - IdentifyType - + + + IdentifyTime + + + + IdentifyType + + + Command description for Identify + @@ -69,6 +76,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml index b744964ca0a9aa..22dcca9d5775fe 100644 --- a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml @@ -18,19 +18,34 @@ limitations under the License. - Illuminance Measurement - Measurement & Sensing - Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. - 0x0400 - ILLUMINANCE_MEASUREMENT_CLUSTER - true - true - - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - Tolerance - LightSensorType + Illuminance Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + 0x0400 + ILLUMINANCE_MEASUREMENT_CLUSTER + true + true + + + MeasuredValue + + + + MinMeasuredValue + + + + MaxMeasuredValue + + + + Tolerance + + + + LightSensorType + + diff --git a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml index b43ace5c0c8383..c21a58ca0f0fbf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml @@ -40,11 +40,13 @@ limitations under the License. Upon receipt, this SHALL process a keycode as input to the media device. + This command SHALL be generated in response to a SendKey Request command. + diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml index f126d8836f720c..171eb5cb91ee44 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml @@ -36,9 +36,15 @@ limitations under the License. This cluster provides a way to access options associated with the operation of a laundry dryer device type. - - - SupportedDrynessLevels - SelectedDrynessLevel - + + + + SupportedDrynessLevels + + + + SelectedDrynessLevel + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml index b8afd87d76665c..e3778d2d938b60 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml @@ -58,11 +58,17 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + StartUpMode OnMode - + @@ -70,6 +76,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -78,6 +85,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml index 4d0e67ddbd1b47..8d2326e01fb278 100644 --- a/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml @@ -61,25 +61,77 @@ limitations under the License. - - CurrentLevel - RemainingTime - MinLevel - MaxLevel - CurrentFrequency - MinFrequency - MaxFrequency - - OnOffTransitionTime - OnLevel - OnTransitionTime - OffTransitionTime - DefaultMoveRate - Options - + + CurrentLevel + + + + RemainingTime + + + + + + MinLevel + + + + + + + + MaxLevel + + + + CurrentFrequency + + + + + + MinFrequency + + + + + + MaxFrequency + + + + + + OnOffTransitionTime + + + + OnLevel + + + + OnTransitionTime + + + + OffTransitionTime + + + + DefaultMoveRate + + + + Options + + + StartUpCurrentLevel + + + @@ -90,6 +142,7 @@ limitations under the License. + @@ -100,6 +153,7 @@ limitations under the License. + @@ -111,6 +165,7 @@ limitations under the License. + @@ -119,6 +174,7 @@ limitations under the License. + @@ -129,6 +185,7 @@ limitations under the License. + @@ -139,6 +196,7 @@ limitations under the License. + @@ -150,6 +208,7 @@ limitations under the License. + @@ -158,6 +217,7 @@ limitations under the License. + @@ -166,6 +226,9 @@ limitations under the License. approximation if the exact provided one is not possible. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml index 9bdededd0fcd6e..34e81bbb445d0e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml @@ -31,7 +31,11 @@ limitations under the License. ActiveLocale + + + + SupportedLocales + - SupportedLocales diff --git a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml index c1cc5b38ede202..4b9ea09104994e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml @@ -26,6 +26,7 @@ limitations under the License. This cluster provides an interface for managing low power mode on a device. This command shall put the device into low power mode. + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml index 597b285cc1b5dd..57fdda3bc7cb7f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml @@ -32,20 +32,29 @@ limitations under the License. - InputList - CurrentInput + + InputList + + + + CurrentInput + + Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. + Upon receipt, this SHALL display the active status of the input list on screen. + Upon receipt, this SHALL hide the input list from the screen. + @@ -53,6 +62,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index a77b8fa4befb4c..1c4f2e37c8e42b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -46,87 +46,167 @@ limitations under the License. - CurrentState - StartTime - Duration - SampledPosition - PlaybackSpeed - SeekRangeEnd - SeekRangeStart - ActiveAudioTrack - AvailableAudioTracks - ActiveTextTrack - AvailableTextTracks + + CurrentState + + + + StartTime + + + + + + Duration + + + + + + SampledPosition + + + + + + PlaybackSpeed + + + + + + SeekRangeEnd + + + + + + SeekRangeStart + + + + + + ActiveAudioTrack + + + + + + AvailableAudioTracks + + + + + + ActiveTextTrack + + + + + + AvailableTextTracks + + + + Upon receipt, this SHALL play media. + Upon receipt, this SHALL pause media. + Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. + Upon receipt, this SHALL Start Over with the current media playback item. + Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. + Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. + Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). + + + Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). + + + Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: + Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: + Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: + + + This command SHALL be generated in response to various Playback Request commands. + Upon receipt, the server SHALL set the active Audio Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server will return an error status of INVALID_ARGUMENT. + + + Upon receipt, the server SHALL set the active Text Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server SHALL return an error status of INVALID_ARGUMENT. + + + If a Text Track is active (i.e. being displayed), upon receipt of this command, the server SHALL stop displaying it. + + + @@ -140,6 +220,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml index 741ba801f5c092..901e63703eee1f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml @@ -91,8 +91,14 @@ limitations under the License. - Messages - ActiveMessageIDs + + Messages + + + + ActiveMessageIDs + + Command for requesting messages be presented @@ -104,20 +110,24 @@ limitations under the License. + Command for cancelling message present requests + This event SHALL be generated when the message is confirmed by the user, or when the expiration date of the message is reached. + This event SHALL be generated when the message is presented to the user. + This event SHALL be generated when the message is confirmed by the user, or when the expiration date of the message is reached. @@ -125,6 +135,7 @@ limitations under the License. + - \ No newline at end of file + diff --git a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml index 954bd898b6aa00..fd44e47c2ca767 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml @@ -41,27 +41,74 @@ limitations under the License. - CookTime - MaxCookTime - PowerSetting - MinPower - MaxPower - PowerStep - SupportedWatts - SelectedWattIndex - WattRating - + + CookTime + + + + MaxCookTime + + + + PowerSetting + + + + + + MinPower + + + + + + MaxPower + + + + + + PowerStep + + + + + + SupportedWatts + + + + + + + + + SelectedWattIndex + + + + + + + + + WattRating + + + - Set Cooking Parameters + Set Cooking Parameters + - Add More Cooking Time - + Add More Cooking Time + + diff --git a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml index 856fde36da15ee..393354fb4ca461 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml @@ -55,7 +55,13 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml index 443acb1c955c36..80e0267155496b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml @@ -48,19 +48,39 @@ limitations under the License. Attributes and commands for selecting a mode from a list of supported options. - Description - StandardNamespace - SupportedModes - CurrentMode - StartUpMode - OnMode - + + Description + + + + StandardNamespace + + + + SupportedModes + + + + CurrentMode + + + + StartUpMode + + + + OnMode + + + + On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. + diff --git a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml index 964923be4f2dfa..02fcb28ee2e14b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml @@ -107,120 +107,207 @@ limitations under the License. - - + + + + - + MaxNetworks + - + Networks + + + + ScanMaxTimeSeconds + + + + + + - ScanMaxTimeSeconds - ConnectMaxTimeSeconds - + + ConnectMaxTimeSeconds + + + + + + + + InterfaceEnabled + - + LastNetworkingStatus + - + LastNetworkID + - + LastConnectErrorValue + - + SupportedWiFiBands + + + - + SupportedThreadFeatures + + + - + ThreadVersion + + + - - Detemine the set of networks the device sees as available. - - - - - - Relay the set of networks the device sees as available back to the client. - - - - - - - Add or update the credentials for a given Wi-Fi network. - - - - - - - - - - Add or update the credentials for a given Thread network. - - - - - - Remove the definition of a given network (including its credentials). - - - - - - Response command for various commands that add/remove/modify network credentials. - - - - - - - - Connect to the specified network, using previously-defined credentials. - - - - - - Command that indicates whether we have succcessfully connected to a network. - - - - - - Modify the order in which networks will be presented in the Networks attribute. - - - - - - - Retrieve details about and optionally proof of possession of a network client identity. - - - - - - Command that contains details about a network client identity and optionally a proof of possession. - - - - + + Detemine the set of networks the device sees as available. + + + + + + + + + + + + Relay the set of networks the device sees as available back to the client. + + + + + + + + + + + + + Add or update the credentials for a given Wi-Fi network. + + + + + + + + + + + + + Add or update the credentials for a given Thread network. + + + + + + + + + Remove the definition of a given network (including its credentials). + + + + + + + + + + + + Response command for various commands that add/remove/modify network credentials. + + + + + + + + + + + + + + Connect to the specified network, using previously-defined credentials. + + + + + + + + + + + + Command that indicates whether we have succcessfully connected to a network. + + + + + + + + + + + + Modify the order in which networks will be presented in the Networks attribute. + + + + + + + + + + + + + Retrieve details about and optionally proof of possession of a network client identity. + + + + + + + + + Command that contains details about a network client identity and optionally a proof of possession. + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml index 0141a7542f4d78..90f1a6a9f497a7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml @@ -83,74 +83,288 @@ limitations under the License. - Occupancy - OccupancySensorType - OccupancySensorTypeBitmap + + Occupancy + + + + OccupancySensorType + + + + + + + OccupancySensorTypeBitmap + + + + + - HoldTime - + HoldTime + + - HoldTimeLimits - + + HoldTimeLimits + + + + + PIROccupiedToUnoccupiedDelay + + + + + + + + + + + + + + + + + + + + + + PIRUnoccupiedToOccupiedDelay + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PIRUnoccupiedToOccupiedThreshold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UltrasonicOccupiedToUnoccupiedDelay + + + + + + + + + UltrasonicUnoccupiedToOccupiedDelay + + + + + + + + + + + + + + + + UltrasonicUnoccupiedToOccupiedThreshold + + + + + + + + + + + + + + + + PhysicalContactOccupiedToUnoccupiedDelay + + + + + + + + + PhysicalContactUnoccupiedToOccupiedDelay + + + + + + + + + + + + + + + + PhysicalContactUnoccupiedToOccupiedThreshold + + + + + + + + + + + + + + + + If this event is supported, it SHALL be generated when the Occupancy attribute changes. + diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index 04dcfed83766e8..c1e87fd1ceb37d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -81,37 +81,75 @@ limitations under the License. - - OnOff - GlobalSceneControl - OnTime - OffWaitTime - + + + OnOff + + + + GlobalSceneControl + + + + + + OnTime + + + + + + OffWaitTime + + + + + StartUpOnOff + + + On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. + On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. + + + + + On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. + + + + + The OffWithEffect command allows devices to be turned off using enhanced ways of fading. + + + The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. + + + @@ -119,6 +157,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index 5b06c93e0ab7fd..8be3ce077a2732 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -62,34 +62,54 @@ limitations under the License. NOCs + + + + Fabrics + + + + SupportedFabrics + + + + CommissionedFabrics + + + + TrustedRootCertificates + + + + CurrentFabricIndex + - Fabrics - SupportedFabrics - CommissionedFabrics - TrustedRootCertificates - CurrentFabricIndex Sender is requesting attestation information from the receiver. + An attestation information confirmation from the server. + Sender is requesting a device attestation certificate from the receiver. + A device attestation certificate (DAC) or product attestation intermediate (PAI) certificate from the server. + @@ -97,6 +117,7 @@ limitations under the License. + @@ -104,6 +125,7 @@ limitations under the License. A certificate signing request (CSR) from the server. + @@ -114,6 +136,7 @@ limitations under the License. + @@ -121,31 +144,36 @@ limitations under the License. + - + Response to AddNOC or UpdateNOC commands. + This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. + This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. + This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml index 53b9c73cad6b3e..9bc60ae2f73fef 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml @@ -58,47 +58,94 @@ limitations under the License. true true This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. - - - - PhaseList - CurrentPhase - CountdownTime - OperationalStateList - OperationalState - OperationalError - + + + + + PhaseList + + + + CurrentPhase + + + + CountdownTime + + + + OperationalStateList + + + + OperationalState + + + + OperationalError + + + Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. + + + + + + Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. + + + + + + Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. + Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). + + + + + + This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. + + + + + + + + OperationalError - + + OperationCompletion - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml index fd52204b02fe85..800506d73c6079 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml @@ -53,13 +53,31 @@ limitations under the License. This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. - - PhaseList - CurrentPhase - CountdownTime - OperationalStateList - OperationalState - OperationalError + + + PhaseList + + + + CurrentPhase + + + + CountdownTime + + + + OperationalStateList + + + + OperationalState + + + + OperationalError + + Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. @@ -67,10 +85,17 @@ limitations under the License. Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. + + + + + + Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. + @@ -80,18 +105,28 @@ limitations under the License. This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. + + + + + + + + OperationalError - + + OperationCompletion - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index e3b054fe3fedce..3c762879309e5c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -64,24 +64,48 @@ limitations under the License. true true This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. - - - - PhaseList - CurrentPhase - CountdownTime - OperationalStateList - - - OperationalState - OperationalError + + OperationalState + + + + OperationalError + + Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. + + + + + + @@ -90,27 +114,47 @@ both values from this cluster and from the base cluster. Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). + + + + + + This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. + + + + + + + + On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. + + + + OperationalError - + + - + OperationCompletion - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml index 0faa1b037eb318..8a54783445013f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml @@ -62,11 +62,17 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + StartUpMode OnMode - + @@ -74,6 +80,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -82,6 +89,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml index 5701dc6ec61e65..8bbfe444227f1d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml @@ -43,58 +43,222 @@ limitations under the License. - - Status - Order - Description - - WiredAssessedInputVoltage - WiredAssessedInputFrequency - WiredCurrentType - WiredAssessedCurrent - WiredNominalVoltage - WiredMaximumCurrent - WiredPresent - ActiveWiredFaults - - BatVoltage - BatPercentRemaining - BatTimeRemaining - BatChargeLevel - BatReplacementNeeded - BatReplaceability - BatPresent - ActiveBatFaults - BatReplacementDescription - BatCommonDesignation - BatANSIDesignation - BatIECDesignation - BatApprovedChemistry - BatCapacity - BatQuantity - BatChargeState - BatTimeToFullCharge - BatFunctionalWhileCharging - BatChargingCurrent - ActiveBatChargeFaults - EndpointList + + Status + + + + Order + + + + Description + + + + + WiredAssessedInputVoltage + + + + + + WiredAssessedInputFrequency + + + + + + WiredCurrentType + + + + + + WiredAssessedCurrent + + + + + + WiredNominalVoltage + + + + + + WiredMaximumCurrent + + + + + + WiredPresent + + + + + + ActiveWiredFaults + + + + + + + BatVoltage + + + + + + BatPercentRemaining + + + + + + BatTimeRemaining + + + + + + BatChargeLevel + + + + + + BatReplacementNeeded + + + + + + BatReplaceability + + + + + + BatPresent + + + + + + ActiveBatFaults + + + + + + BatReplacementDescription + + + + + + BatCommonDesignation + + + + + + BatANSIDesignation + + + + + + BatIECDesignation + + + + + + BatApprovedChemistry + + + + + + BatCapacity + + + + + + + + + BatQuantity + + + + + + BatChargeState + + + + + + BatTimeToFullCharge + + + + + + BatFunctionalWhileCharging + + + + + + BatChargingCurrent + + + + + + ActiveBatChargeFaults + + + + + + EndpointList + + + The WiredFaultChange Event SHALL indicate a change in the set of wired faults currently detected by the Node on this wired power source. + + + The BatFaultChange Event SHALL indicate a change in the set of battery faults currently detected by the Node on this battery power source. + + + The BatChargeFaultChange Event SHALL indicate a change in the set of charge faults currently detected by the Node on this battery power source. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml index 04a7cdb121c775..ba97841d3492e0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml @@ -26,6 +26,9 @@ limitations under the License. true true - Sources + + Sources + + diff --git a/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml index 3bca0bd43ee8af..c686115edcb8cb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml @@ -44,7 +44,17 @@ limitations under the License. - AvailableEndpoints - ActiveEndpoints + + AvailableEndpoints + + + + + + ActiveEndpoints + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml index f9487af7f3a9e2..04100e82379f2d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml @@ -31,16 +31,53 @@ limitations under the License. - - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - Tolerance - ScaledValue - MinScaledValue - MaxScaledValue - ScaledTolerance - Scale + + + MeasuredValue + + + + MinMeasuredValue + + + + MaxMeasuredValue + + + + Tolerance + + + + ScaledValue + + + + + + MinScaledValue + + + + + + MaxScaledValue + + + + + + ScaledTolerance + + + + + + Scale + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 74416092e7c7f8..b23ad516515b11 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -49,97 +49,245 @@ limitations under the License. - - MaxPressure - MaxSpeed - MaxFlow - MinConstPressure - MaxConstPressure - MinCompPressure - MaxCompPressure - MinConstSpeed - MaxConstSpeed - MinConstFlow - MaxConstFlow - MinConstTemp - MaxConstTemp - PumpStatus - EffectiveOperationMode - EffectiveControlMode - Capacity - Speed + + + MaxPressure + + + + MaxSpeed + + + + MaxFlow + + + + MinConstPressure + + + + + + + + + + + MaxConstPressure + + + + + + + + + + + MinCompPressure + + + + + + + + + + + MaxCompPressure + + + + + + + + + + + MinConstSpeed + + + + + + + + + + + MaxConstSpeed + + + + + + + + + + + MinConstFlow + + + + + + + + + + + MaxConstFlow + + + + + + + + + + + MinConstTemp + + + + + + + + + + + MaxConstTemp + + + + + + + + + + + PumpStatus + + + + EffectiveOperationMode + + + + EffectiveControlMode + + + + Capacity + + + + Speed + + LifetimeRunningHours + + + + Power + - Power LifetimeEnergyConsumed + OperationMode + ControlMode + SupplyVoltageLow + SupplyVoltageHigh + PowerMissingPhase + SystemPressureLow + SystemPressureHigh + DryRunning + MotorTemperatureHigh + PumpMotorFatalFailure + ElectronicTemperatureHigh + PumpBlocked + SensorFailure + ElectronicNonFatalFailure + ElectronicFatalFailure + GeneralFault + Leakage + AirDetection + TurbineOperation + diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml index 58fa70163f65ea..deeb16b4dae3d7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml @@ -28,17 +28,27 @@ limitations under the License. REFRIGERATOR_ALARM_CLUSTER true true - - Mask - State - Supported + + + Mask + + + + State + + + + Supported + + - Notify - - - - + Notify + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml index e29080ce4a43cb..a4fe78bc225d65 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml @@ -56,11 +56,17 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + StartUpMode OnMode - + @@ -68,6 +74,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -76,6 +83,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml index e309b75dcc46bd..7f8157572a4270 100644 --- a/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml @@ -25,9 +25,21 @@ limitations under the License. true true - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - Tolerance + + MeasuredValue + + + + MinMeasuredValue + + + + MaxMeasuredValue + + + + Tolerance + + diff --git a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml index 66de9ee66cbebd..25e586226f0d82 100644 --- a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml @@ -38,16 +38,41 @@ limitations under the License. - Condition - DegradationDirection - ChangeIndication - InPlaceIndicator - LastChangedTime - ReplacementProductList - + + Condition + + + + + + DegradationDirection + + + + + + ChangeIndication + + + + InPlaceIndicator + + + + LastChangedTime + + + + ReplacementProductList + + + + + Reset the condition of the replaceable to the non degraded state + @@ -73,16 +98,41 @@ limitations under the License. - Condition - DegradationDirection - ChangeIndication - InPlaceIndicator - LastChangedTime - ReplacementProductList - + + Condition + + + + + + DegradationDirection + + + + + + ChangeIndication + + + + InPlaceIndicator + + + + LastChangedTime + + + + ReplacementProductList + + + + + Reset the condition of the replaceable to the non degraded state + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index 65c2f17a3e8e75..a1fe4809ee1e17 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -67,8 +67,14 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + @@ -78,6 +84,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -86,6 +93,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index ce835576396bb8..6cd765db7fab84 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -73,8 +73,14 @@ limitations under the License. - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + @@ -84,6 +90,7 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + @@ -92,6 +99,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index b6315bdc1287c1..dcc929fa47e872 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -80,10 +80,19 @@ limitations under the License. - - LastConfiguredBy - SceneTableSize - FabricSceneInfo + + LastConfiguredBy + + + + SceneTableSize + + + + FabricSceneInfo + + + Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeID": VALUE, "Value*": VALUE}]}' @@ -94,6 +103,7 @@ limitations under the License. + @@ -102,6 +112,7 @@ limitations under the License. + @@ -111,6 +122,7 @@ limitations under the License. + @@ -119,6 +131,7 @@ limitations under the License. + @@ -128,6 +141,7 @@ limitations under the License. + @@ -137,6 +151,7 @@ limitations under the License. + @@ -144,6 +159,7 @@ limitations under the License. Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group + @@ -155,6 +171,7 @@ limitations under the License. + @@ -164,6 +181,7 @@ limitations under the License. + @@ -176,6 +194,7 @@ limitations under the License. + @@ -185,6 +204,7 @@ limitations under the License. + @@ -193,6 +213,7 @@ limitations under the License. + @@ -202,6 +223,7 @@ limitations under the License. + @@ -212,6 +234,7 @@ limitations under the License. + @@ -221,6 +244,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml index 8c2ba832c85604..c442136d46aa0a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml @@ -96,19 +96,43 @@ limitations under the License. - SupportedAreas - SupportedMaps - SelectedAreas - CurrentArea - EstimatedEndTime - Progress - + + SupportedAreas + + + + SupportedMaps + + + + + + SelectedAreas + + + + CurrentArea + + + EstimatedEndTime + + + + + + Progress + + + + + Command used to select a set of device areas, where the device is to operate. + @@ -117,6 +141,7 @@ limitations under the License. + @@ -132,6 +157,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml index 31ae0bba9e7d99..a0543e04373dd5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml @@ -46,66 +46,131 @@ limitations under the License. - ExpressedState - SmokeState - COState - BatteryAlert - DeviceMuted - TestInProgress - HardwareFaultAlert - EndOfServiceAlert - InterconnectSmokeAlarm - InterconnectCOAlarm - ContaminationState + + ExpressedState + + + + SmokeState + + + + + + COState + + + + + + BatteryAlert + + + + DeviceMuted + + + + TestInProgress + + + + HardwareFaultAlert + + + + EndOfServiceAlert + + + + InterconnectSmokeAlarm + + + + InterconnectCOAlarm + + + + ContaminationState + + + + SmokeSensitivityLevel + + + - ExpiryDate - + + ExpiryDate + + + This command SHALL initiate a device self-test. + This event SHALL be generated when SmokeState attribute changes to either Warning or Critical state. + + + This event SHALL be generated when COState attribute changes to either Warning or Critical state. + + + This event SHALL be generated when BatteryAlert attribute changes to either Warning or Critical state. + This event SHALL be generated when the device detects a hardware fault that leads to setting HardwareFaultAlert to True. + This event SHALL be generated when the EndOfServiceAlert is set to Expired. + This event SHALL be generated when the SelfTest completes, and the attribute TestInProgress changes to False. + This event SHALL be generated when the DeviceMuted attribute changes to Muted. + This event SHALL be generated when DeviceMuted attribute changes to NotMuted. + This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. + + + This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. + + + This event SHALL be generated when ExpressedState attribute returns to Normal state. + diff --git a/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml index 3ac2ba42e8e22e..d0973998fa98d6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml @@ -37,20 +37,38 @@ limitations under the License. - ThreadMetrics - CurrentHeapFree - CurrentHeapUsed - CurrentHeapHighWatermark + + ThreadMetrics + + + + CurrentHeapFree + + + + CurrentHeapUsed + + + + CurrentHeapHighWatermark + + + + Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. + + + Indicate the last software fault that has taken place on the Node. - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml index 176163fae7fce6..90f61cdedcfbc8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml @@ -78,38 +78,75 @@ Interactions with the switch device are exposed as attributes (for the latching - NumberOfPositions - CurrentPosition - MultiPressMax + + NumberOfPositions + + + + CurrentPosition + + + + MultiPressMax + + + + SwitchLatched + + + InitialPress + + + LongPress + + + ShortRelease + + + LongRelease + + + MultiPressOngoing + + + + + + + + MultiPressComplete - + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index bc665905df1eb2..c7d516bcdc7416 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -25,19 +25,27 @@ limitations under the License. true This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. - TargetList - CurrentTarget - + + TargetList + + + + CurrentTarget + + + Upon receipt, this SHALL navigation the UX to the target identified. + This command SHALL be generated in response to NavigateTarget commands. + @@ -45,6 +53,7 @@ limitations under the License. + diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml index da0c0bcee983bb..2c7c173c6af8ff 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml @@ -40,17 +40,48 @@ limitations under the License. - TemperatureSetpoint - MinTemperature - MaxTemperature - Step - SelectedTemperatureLevel - SupportedTemperatureLevels + + TemperatureSetpoint + + + + + + MinTemperature + + + + + + MaxTemperature + + + + + + Step + + + + + + SelectedTemperatureLevel + + + + + + SupportedTemperatureLevels + + + + - Set Temperature - - + Set Temperature + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml index d141743fafde56..45317b7b433894 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml @@ -24,9 +24,21 @@ limitations under the License. TEMPERATURE_MEASUREMENT_CLUSTER true true - MeasuredValue - MinMeasuredValue - MaxMeasuredValue - Tolerance + + MeasuredValue + + + + MinMeasuredValue + + + + MaxMeasuredValue + + + + Tolerance + + diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 6f75aa45e985f6..9a409b7a89c1bd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -312,146 +312,368 @@ limitations under the License. - LocalTemperature - OutdoorTemperature - Occupancy - AbsMinHeatSetpointLimit - AbsMaxHeatSetpointLimit - AbsMinCoolSetpointLimit - AbsMaxCoolSetpointLimit - PICoolingDemand - PIHeatingDemand + + LocalTemperature + + + + OutdoorTemperature + + + + Occupancy + + + + + + AbsMinHeatSetpointLimit + + + + + + AbsMaxHeatSetpointLimit + + + + + + AbsMinCoolSetpointLimit + + + + + + AbsMaxCoolSetpointLimit + + + + + + PICoolingDemand + + + + + + PIHeatingDemand + + + + HVACSystemTypeConfiguration + LocalTemperatureCalibration + + + + + + + + OccupiedCoolingSetpoint + + + + + + OccupiedHeatingSetpoint + + + + + + UnoccupiedCoolingSetpoint + + + + + + + + + UnoccupiedHeatingSetpoint + + + + + + - OccupiedCoolingSetpoint - OccupiedHeatingSetpoint - UnoccupiedCoolingSetpoint - UnoccupiedHeatingSetpoint MinHeatSetpointLimit + + + MaxHeatSetpointLimit + + + MinCoolSetpointLimit + + + MaxCoolSetpointLimit + + + MinSetpointDeadBand + + + RemoteSensing + ControlSequenceOfOperation + SystemMode + + + + ThermostatRunningMode + + + + + + StartOfWeek + + + + + + NumberOfWeeklyTransitions + + + + + + NumberOfDailyTransitions + + + - ThermostatRunningMode - StartOfWeek - NumberOfWeeklyTransitions - NumberOfDailyTransitions TemperatureSetpointHold + TemperatureSetpointHoldDuration + ThermostatProgrammingOperationMode + + + + ThermostatRunningState + + + + SetpointChangeSource + + + + SetpointChangeAmount + + + + SetpointChangeSourceTimestamp + - ThermostatRunningState - SetpointChangeSource - SetpointChangeAmount - SetpointChangeSourceTimestamp OccupiedSetback + + + + + + OccupiedSetbackMin + + + + + + OccupiedSetbackMax + + + - OccupiedSetbackMin - OccupiedSetbackMax UnoccupiedSetback + + + + + + + + + UnoccupiedSetbackMin + + + + + + + + + UnoccupiedSetbackMax + + + + + + - UnoccupiedSetbackMin - UnoccupiedSetbackMax EmergencyHeatDelta + ACType + ACCapacity + ACRefrigerantType + ACCompressorType + ACErrorCode + ACLouverPosition + + + + ACCoilTemperature + - ACCoilTemperature ACCapacityformat + + + + PresetTypes + + + + + + ScheduleTypes + + + + + + NumberOfPresets + + + + + + NumberOfSchedules + + + + + + NumberOfScheduleTransitions + + + + + + NumberOfScheduleTransitionPerDay + + + + + + ActivePresetHandle + + + + + + ActiveScheduleHandle + + + - PresetTypes - ScheduleTypes - NumberOfPresets - NumberOfSchedules - NumberOfScheduleTransitions - NumberOfScheduleTransitionPerDay - ActivePresetHandle - ActiveScheduleHandle Presets + + + Schedules + + + + + + SetpointHoldExpiryTimestamp + - SetpointHoldExpiryTimestamp Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. + @@ -461,27 +683,42 @@ limitations under the License. + + + The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. + + + This command is used to clear the weekly schedule. + + + Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. + + + ID + + + @@ -491,6 +728,9 @@ limitations under the License. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml index cd3491cc079024..a95a9a31f32d9e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml @@ -29,18 +29,23 @@ limitations under the License. - TemperatureDisplayMode - - + + TemperatureDisplayMode + + + + KeypadLockout + ScheduleProgrammingVisibility + diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml index d05ce70c34aca3..84132e495cf4c0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml @@ -33,31 +33,52 @@ limitations under the License. - BorderRouterName - - BorderAgentID - - ThreadVersion - - InterfaceEnabled - - ActiveDatasetTimestamp - - PendingDatasetTimestamp - + + BorderRouterName + + + + + BorderAgentID + + + + + ThreadVersion + + + + + InterfaceEnabled + + + + + ActiveDatasetTimestamp + + + + + PendingDatasetTimestamp + + + Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session + Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session + - + Generated response to GetActiveDatasetRequest or GetPendingDatasetRequest commands. + @@ -65,12 +86,16 @@ limitations under the License. + Command set or update the pending Dataset of the Thread network to which the Border Router is connected. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml index 77ec8699615156..8804d64e30c7c1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml @@ -107,82 +107,362 @@ limitations under the License. - - Channel - RoutingRole - NetworkName - PanId - ExtendedPanId - MeshLocalPrefix - OverrunCount - NeighborTable - RouteTable - PartitionId - Weighting - DataVersion - StableDataVersion - LeaderRouterId - DetachedRoleCount - ChildRoleCount - RouterRoleCount - LeaderRoleCount - AttachAttemptCount - PartitionIdChangeCount - BetterPartitionAttachAttemptCount - ParentChangeCount - TxTotalCount - TxUnicastCount - TxBroadcastCount - TxAckRequestedCount - TxAckedCount - TxNoAckRequestedCount - TxDataCount - TxDataPollCount - TxBeaconCount - TxBeaconRequestCount - TxOtherCount - TxRetryCount - TxDirectMaxRetryExpiryCount - TxIndirectMaxRetryExpiryCount - TxErrCcaCount - TxErrAbortCount - TxErrBusyChannelCount - RxTotalCount - RxUnicastCount - RxBroadcastCount - RxDataCount - RxDataPollCount - RxBeaconCount - RxBeaconRequestCount - RxOtherCount - RxAddressFilteredCount - RxDestAddrFilteredCount - RxDuplicatedCount - RxErrNoFrameCount - RxErrUnknownNeighborCount - RxErrInvalidSrcAddrCount - RxErrSecCount - RxErrFcsCount - RxErrOtherCount - ActiveTimestamp - PendingTimestamp - Delay - SecurityPolicy - ChannelPage0Mask - OperationalDatasetComponents - ActiveNetworkFaultsList + + + Channel + + + + RoutingRole + + + + NetworkName + + + + PanId + + + + ExtendedPanId + + + + MeshLocalPrefix + + + + OverrunCount + + + + + + NeighborTable + + + + RouteTable + + + + PartitionId + + + + Weighting + + + + DataVersion + + + + StableDataVersion + + + + LeaderRouterId + + + + DetachedRoleCount + + + + + + ChildRoleCount + + + + + + RouterRoleCount + + + + + + LeaderRoleCount + + + + + + AttachAttemptCount + + + + + + PartitionIdChangeCount + + + + + + BetterPartitionAttachAttemptCount + + + + + + ParentChangeCount + + + + + + TxTotalCount + + + + + + TxUnicastCount + + + + + + TxBroadcastCount + + + + + + TxAckRequestedCount + + + + + + TxAckedCount + + + + + + TxNoAckRequestedCount + + + + + + TxDataCount + + + + + + TxDataPollCount + + + + + + TxBeaconCount + + + + + + TxBeaconRequestCount + + + + + + TxOtherCount + + + + + + TxRetryCount + + + + + + TxDirectMaxRetryExpiryCount + + + + + + TxIndirectMaxRetryExpiryCount + + + + + + TxErrCcaCount + + + + + + TxErrAbortCount + + + + + + TxErrBusyChannelCount + + + + + + RxTotalCount + + + + + + RxUnicastCount + + + + + + RxBroadcastCount + + + + + + RxDataCount + + + + + + RxDataPollCount + + + + + + RxBeaconCount + + + + + + RxBeaconRequestCount + + + + + + RxOtherCount + + + + + + RxAddressFilteredCount + + + + + + RxDestAddrFilteredCount + + + + + + RxDuplicatedCount + + + + + + RxErrNoFrameCount + + + + + + RxErrUnknownNeighborCount + + + + + + RxErrInvalidSrcAddrCount + + + + + + RxErrSecCount + + + + + + RxErrFcsCount + + + + + + RxErrOtherCount + + + + + + ActiveTimestamp + + + + PendingTimestamp + + + + Delay + + + + SecurityPolicy + + + + ChannelPage0Mask + + + + OperationalDatasetComponents + + + + ActiveNetworkFaultsList + + Reception of this command SHALL reset the OverrunCount attributes to 0 + + + Indicate that a Node’s connection status to a Thread network has changed + Indicate a change in the set of network faults currently detected by the Node + diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml index 3a6445b15bbad3..8f997cebc46d2f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml @@ -15,58 +15,67 @@ See the License for the specific language governing permissions and limitations under the License. --> - + + + + + + + + + - - - - - - - + + Network Infrastructure + Thread Network Directory + 0x0453 + THREAD_NETWORK_DIRECTORY_CLUSTER + Manages the names and credentials of Thread networks visible to the user. - - Network Infrastructure - Thread Network Directory - 0x0453 - THREAD_NETWORK_DIRECTORY_CLUSTER - Manages the names and credentials of Thread networks visible to the user. + true + true - true - true + + + + + PreferredExtendedPanID + + + + + + ThreadNetworks + + + + + ThreadNetworkTableSize + + - - - - - PreferredExtendedPanID - - - - - ThreadNetworks - - - ThreadNetworkTableSize - - - Adds an entry to the ThreadNetworks list. - - - - - Removes an entry from the ThreadNetworks list. - - - - - Retrieves a Thread Operational Dataset from the ThreadNetworks list. - - - - - This is the response to a GetOperationalDataset request. - - - + + Adds an entry to the ThreadNetworks list. + + + + + + Removes an entry from the ThreadNetworks list. + + + + + + Retrieves a Thread Operational Dataset from the ThreadNetworks list. + + + + + + This is the response to a GetOperationalDataset request. + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml index 6ade7abe2e446c..bfc2222ef35a4a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml @@ -58,14 +58,23 @@ limitations under the License. - - HourFormat - + + HourFormat + + - ActiveCalendarType - + ActiveCalendarType + + + + + + + SupportedCalendarTypes + + + - SupportedCalendarTypes diff --git a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml index 9336a6a944735e..201f71a201e523 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml @@ -114,78 +114,166 @@ limitations under the License. - UTCTime - Granularity - TimeSource - TrustedTimeSource - DefaultNTP - TimeZone - DSTOffset - LocalTime - TimeZoneDatabase - NTPServerAvailable - TimeZoneListMaxSize - DSTOffsetListMaxSize - SupportsDNSResolve - + + UTCTime + + + + Granularity + + + + TimeSource + + + + TrustedTimeSource + + + + + + DefaultNTP + + + + + + TimeZone + + + + + + DSTOffset + + + + + + LocalTime + + + + + + TimeZoneDatabase + + + + + + NTPServerAvailable + + + + + + TimeZoneListMaxSize + + + + + + DSTOffsetListMaxSize + + + + + + SupportsDNSResolve + + + + + This command MAY be issued by Administrator to set the time. + This command SHALL set TrustedTimeSource. + + + This command SHALL set TimeZone. + + + Response to SetTimeZone. + + + This command SHALL set DSTOffset. + + + This command is used to set DefaultNTP. + + + This event SHALL be generated when the server stops applying the current DSTOffset and there are no entries in the list with a larger ValidStarting time. + + + This event SHALL be generated when the server starts or stops applying a DST offset. - + + + + This event SHALL be generated when the server changes its time zone offset or name. + + + This event SHALL be generated if the node has attempted to update its time, but was unable to find a good time from any source. + This event SHALL be generated if the node attempts to update its time and finds that the TrustedTimeSource is null, or the specified peer cannot be reached. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml index fb6238add46a4f..0deb6225eedab9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml @@ -43,8 +43,11 @@ limitations under the License. - TemperatureUnit - + TemperatureUnit + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml index 24260b78307bd3..14ffa15b70bd11 100644 --- a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml @@ -27,6 +27,7 @@ limitations under the License. LabelList + diff --git a/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml index 80c1cdb60c8ccc..052a08108a69da 100644 --- a/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml @@ -59,39 +59,86 @@ limitations under the License. - OpenDuration + + OpenDuration + + - DefaultOpenDuration - AutoCloseTime - RemainingDuration - CurrentState - TargetState - CurrentLevel - TargetLevel - DefaultOpenLevel - ValveFault - LevelStep - + + DefaultOpenDuration + + + + AutoCloseTime + + + + + + RemainingDuration + + + + CurrentState + + + + TargetState + + + + CurrentLevel + + + + + + TargetLevel + + + + + + DefaultOpenLevel + + + + + + ValveFault + + + + LevelStep + + + + + This command is used to set the valve to its open position. + This command is used to set the valve to its closed position. + This event SHALL be generated when the valve state changed. + This event SHALL be generated when the valve registers or clears a fault. + diff --git a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml index 90bd18b5b7baaa..50c88a02726515 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml @@ -27,8 +27,14 @@ limitations under the License. - - MACAddress - LinkLocalAddress + + + MACAddress + + + + LinkLocalAddress + + diff --git a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml index 2dc01920ae3e37..663f13dfcc1271 100644 --- a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml @@ -45,11 +45,31 @@ limitations under the License. - - SpinSpeeds - SpinSpeedCurrent - NumberOfRinses - SupportedRinses + + + SpinSpeeds + + + + + + SpinSpeedCurrent + + + + + + NumberOfRinses + + + + + + SupportedRinses + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml index beeaf277b77d2e..6e5c56e21f9670 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml @@ -64,30 +64,58 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 true - HeaterTypes - HeatDemand - TankVolume - EstimatedHeatRequired - TankPercentage - BoostState + + HeaterTypes + + + + HeatDemand + + + + TankVolume + + + + + + EstimatedHeatRequired + + + + + + TankPercentage + + + + + + BoostState + + Allows a client to request that the water heater is put into a Boost state. + Allows a client to cancel an ongoing Boost operation. + This event SHALL be generated whenever a Boost command is accepted. + This event SHALL be generated whenever the BoostState transitions from Active to Inactive. + diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml index d9211e808467fb..89d8b78436337c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml @@ -58,18 +58,26 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - SupportedModes - CurrentMode + + SupportedModes + + + + CurrentMode + + This command is used to change device modes. + This command is sent by the device on receipt of the ChangeToMode command. + diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml index 7fb35aab255ed7..f2a68e977bf965 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml @@ -63,35 +63,94 @@ limitations under the License. - - BSSID - SecurityType - WiFiVersion - ChannelNumber - RSSI - BeaconLostCount - BeaconRxCount - PacketMulticastRxCount - PacketMulticastTxCount - PacketUnicastRxCount - PacketUnicastTxCount - CurrentMaxRate - OverrunCount + + + BSSID + + + + SecurityType + + + + WiFiVersion + + + + ChannelNumber + + + + RSSI + + + + BeaconLostCount + + + + + + BeaconRxCount + + + + + + PacketMulticastRxCount + + + + + + PacketMulticastTxCount + + + + + + PacketUnicastRxCount + + + + + + PacketUnicastTxCount + + + + + + CurrentMaxRate + + + + OverrunCount + + + + Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 + + + Indicate that a Node’s Wi-Fi connection has been disconnected as a result of de-authenticated or dis-association and indicates the reason. + Indicate that a Node has failed to connect, or reconnect, to a Wi-Fi access point. + Indicate that a Node’s connection status to a Wi-Fi network has changed. + diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml index 8c8b4d40c3abdd..c5246f6acddfc2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml @@ -30,19 +30,25 @@ limitations under the License. - SSID + + SSID + + PassphraseSurrogate + Request the current WPA-Personal passphrase or PSK associated with the managed Wi-Fi network. + This is the response to a NetworkPassphraseRequest. + diff --git a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml index 0e1c97a4d45040..1363b5c8aa4c9d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml +++ b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml @@ -57,45 +57,186 @@ limitations under the License. - Type + + Type + + - PhysicalClosedLimitLift + + PhysicalClosedLimitLift + + + + + + + + - PhysicalClosedLimitTilt + + PhysicalClosedLimitTilt + + + + + + + + - CurrentPositionLift + + CurrentPositionLift + + + + + + + + - CurrentPositionTilt + + CurrentPositionTilt + + + + + + + + - NumberOfActuationsLift + + NumberOfActuationsLift + + + + - NumberOfActuationsTilt + + NumberOfActuationsTilt + + + + - ConfigStatus + + ConfigStatus + + - CurrentPositionLiftPercentage + + CurrentPositionLiftPercentage + + + + + + + - CurrentPositionTiltPercentage + + CurrentPositionTiltPercentage + + + + + + + - OperationalStatus + + OperationalStatus + + - TargetPositionLiftPercent100ths + + TargetPositionLiftPercent100ths + + + + + + + - TargetPositionTiltPercent100ths + + TargetPositionTiltPercent100ths + + + + + + + - EndProductType + + EndProductType + + - CurrentPositionLiftPercent100ths + + CurrentPositionLiftPercent100ths + + + + + + + - CurrentPositionTiltPercent100ths - + + CurrentPositionTiltPercent100ths + + + + + + + - InstalledOpenLimitLift - InstalledClosedLimitLift + + InstalledOpenLimitLift + + + + + + + + + + InstalledClosedLimitLift + + + + + + + + - InstalledOpenLimitTilt - InstalledClosedLimitTilt + + InstalledOpenLimitTilt + + + + + + + + + + InstalledClosedLimitTilt + + + + + + + + @@ -104,44 +245,85 @@ limitations under the License. Mode - + + - SafetyStatus - + + SafetyStatus + + + Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt + Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt + Stop any adjusting of window covering + Go to lift value specified + + + + + + Go to lift percentage specified + + + + + + + + + + + Go to tilt value specified + + + + + + Go to tilt percentage specified + + + + + + + + + + + From b99a978ee420afa7e503e50319d8605c8d6ad93a Mon Sep 17 00:00:00 2001 From: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:49:23 -0400 Subject: [PATCH 09/14] [Silabs] Bump Simplicity SDK to 2024.6.2 (#36213) --- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/release_artifacts.yaml | 2 +- .gitmodules | 2 +- integrations/cloudbuild/smoke-test.yaml | 14 +++++++------- third_party/openthread/platforms/efr32/BUILD.gn | 4 +++- third_party/silabs/BUILD.gn | 4 +++- third_party/silabs/lwip.gni | 4 +--- third_party/silabs/matter_support | 2 +- third_party/silabs/simplicity_sdk | 2 +- 9 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index d9df0bca21637f..b0b4fef50e15df 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:84 + image: ghcr.io/project-chip/chip-build-efr32:85 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index af90dc316d0f4a..54997b6efa9b39 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:84 + image: ghcr.io/project-chip/chip-build-efr32:85 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitmodules b/.gitmodules index 3f50d3079d4e03..c2b9a95a5e0345 100644 --- a/.gitmodules +++ b/.gitmodules @@ -213,7 +213,7 @@ [submodule "third_party/silabs/simplicity_sdk"] path = third_party/silabs/simplicity_sdk url = https://github.com/SiliconLabs/simplicity_sdk.git - branch = v2024.6.1-0 + branch = v2024.6.2 platforms = silabs [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] path = third_party/silabs/wiseconnect-wifi-bt-sdk diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 24a3029d2fe2f8..824b79d6ce1a22 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:84" + - name: "ghcr.io/project-chip/chip-build-vscode:85" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/third_party/openthread/platforms/efr32/BUILD.gn b/third_party/openthread/platforms/efr32/BUILD.gn index 69e55a5d76151d..e270db2ae8757f 100644 --- a/third_party/openthread/platforms/efr32/BUILD.gn +++ b/third_party/openthread/platforms/efr32/BUILD.gn @@ -65,7 +65,6 @@ source_set("libopenthread-efr32") { "${sl_ot_efr32_root}/flash.c", "${sl_ot_efr32_root}/ieee802154-packet-utils.cpp", "${sl_ot_efr32_root}/misc.c", - "${sl_ot_efr32_root}/radio.c", "${sl_ot_efr32_root}/radio_coex.c", "${sl_ot_efr32_root}/radio_extension.c", "${sl_ot_efr32_root}/radio_power_manager.c", @@ -73,6 +72,9 @@ source_set("libopenthread-efr32") { "${sl_ot_efr32_root}/sleep.c", "${sl_ot_efr32_root}/soft_source_match_table.c", "${sl_ot_efr32_root}/system.c", + + # Temporary file until the files in the SI SDK is fixed + "${sdk_support_root}/protocol/openthread/platform-abstraction/efr32/radio.c", ] include_dirs = [ "${openthread_root}/examples/platforms/utils" ] diff --git a/third_party/silabs/BUILD.gn b/third_party/silabs/BUILD.gn index e08c7cd0bd11bd..16e0ba68c4607a 100644 --- a/third_party/silabs/BUILD.gn +++ b/third_party/silabs/BUILD.gn @@ -206,7 +206,9 @@ if (wifi_soc != true) { # CCP board "${openthread_root}/src/core/mac/mac_frame.cpp", "${openthread_root}/src/core/mac/sub_mac.cpp", "${openthread_root}/src/core/thread/mle.cpp", - "${sl_ot_platform_abstraction}/efr32/radio.c", + + # Temporary file until the files in the SI SDK is fixed + "${sdk_support_root}/protocol/openthread/platform-abstraction/efr32/radio.c", ] include_dirs = [ "${sl_ot_platform_abstraction}/include" ] diff --git a/third_party/silabs/lwip.gni b/third_party/silabs/lwip.gni index b0b6a0db0d2c9f..9a35e7c45f7a61 100644 --- a/third_party/silabs/lwip.gni +++ b/third_party/silabs/lwip.gni @@ -169,10 +169,8 @@ template("lwip_target") { "${_lwip_root}/src/core/ipv6/ip6.c", "${_lwip_root}/src/core/ipv6/ip6_addr.c", "${_lwip_root}/src/core/ipv6/ip6_frag.c", + "${_lwip_root}/src/core/ipv6/mld6.c", "${_lwip_root}/src/core/ipv6/nd6.c", - - # TODO: When updating to next Si SDK version, revert change. - "${sdk_support_root}/src/core/ipv6/mld6.c", ] } diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 8dd7b9bb5f8577..bf647de36d841e 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 8dd7b9bb5f8577834140bcc54f7497ae3f4b9bd0 +Subproject commit bf647de36d841e62fdac5d37c0cdfc5ebf9200bc diff --git a/third_party/silabs/simplicity_sdk b/third_party/silabs/simplicity_sdk index aa5ce2e835dfdc..36e12f01947c2b 160000 --- a/third_party/silabs/simplicity_sdk +++ b/third_party/silabs/simplicity_sdk @@ -1 +1 @@ -Subproject commit aa5ce2e835dfdce8c20fb828f27d3a261946f946 +Subproject commit 36e12f01947c2bed82922015e87b926df0745bc2 From 7026061c166cee2a1969fbefe5e1bbc6f250af31 Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Wed, 23 Oct 2024 22:32:42 +0530 Subject: [PATCH 10/14] [Silabs] Fixing the BLE Advertisement for the NCP and 917SoC devices (#36189) * ble fixes for the pointer * removing the global structure * addressing the review comments * removing the static keyword * modifying the assignment * restyling the PR * addressing review comments * restyling the PR * removing the TODOs * addressing the review comment * restyling the PR --- src/platform/silabs/BLEManagerImpl.h | 12 +- src/platform/silabs/rs911x/BLEManagerImpl.cpp | 156 ++++++++++++------ .../silabs/rs911x/wfx_sl_ble_init.cpp | 112 ++----------- src/platform/silabs/rs911x/wfx_sl_ble_init.h | 5 +- 4 files changed, 132 insertions(+), 153 deletions(-) diff --git a/src/platform/silabs/BLEManagerImpl.h b/src/platform/silabs/BLEManagerImpl.h index 6d901db16e95db..9380accce38e55 100644 --- a/src/platform/silabs/BLEManagerImpl.h +++ b/src/platform/silabs/BLEManagerImpl.h @@ -58,12 +58,12 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #if (SLI_SI91X_ENABLE_BLE || RSI_BLE_ENABLE) // Used for posting the event in the BLE queue void BlePostEvent(SilabsBleWrapper::BleEvent_t * event); - void HandleConnectEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt); - void UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleConnectEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void HandleConnectionCloseEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void HandleWriteEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt); + void UpdateMtu(const SilabsBleWrapper::sl_wfx_msg_t & evt); void HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId); - void HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleTXCharCCCDWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt); void HandleSoftTimerEvent(void); int32_t SendBLEAdvertisementCommand(void); #else @@ -194,7 +194,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla #endif #if (SLI_SI91X_ENABLE_BLE || RSI_BLE_ENABLE) - void HandleRXCharWrite(SilabsBleWrapper::sl_wfx_msg_t * evt); + void HandleRXCharWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt); #else void HandleRXCharWrite(volatile sl_bt_msg_t * evt); #endif diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 44b2a17199b330..176f396f44cd1f 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -57,24 +57,7 @@ extern "C" { #define BLE_TIMEOUT_MS 400 #define BLE_SEND_INDICATION_TIMER_PERIOD_MS (5000) -// Used to send the Indication Confirmation -uint8_t dev_address[RSI_DEV_ADDR_LEN]; -uint16_t ble_measurement_hndl; - osSemaphoreId_t sl_rs_ble_init_sem; -osTimerId_t sbleAdvTimeoutTimer; - -static osThreadId_t sBleThread; -constexpr uint32_t kBleTaskSize = 2048; -static uint8_t bleStack[kBleTaskSize]; -static osThread_t sBleTaskControlBlock; -constexpr osThreadAttr_t kBleTaskAttr = { .name = "rsi_ble", - .attr_bits = osThreadDetached, - .cb_mem = &sBleTaskControlBlock, - .cb_size = osThreadCbSize, - .stack_mem = bleStack, - .stack_size = kBleTaskSize, - .priority = osPriorityHigh }; using namespace ::chip; using namespace ::chip::Ble; @@ -111,6 +94,84 @@ const uint8_t UUID_CHIPoBLEService[] = { 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00 0x00, 0x10, 0x00, 0x00, 0xF6, 0xFF, 0x00, 0x00 }; const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; +// Used to send the Indication Confirmation +uint8_t dev_address[RSI_DEV_ADDR_LEN]; +uint16_t rsi_ble_measurement_hndl; +uint16_t rsi_ble_gatt_server_client_config_hndl; + +osTimerId_t sbleAdvTimeoutTimer; + +osThreadId_t sBleThread; +constexpr uint32_t kBleTaskSize = 2560; +uint8_t bleStack[kBleTaskSize]; +osThread_t sBleTaskControlBlock; +constexpr osThreadAttr_t kBleTaskAttr = { .name = "rsi_ble", + .attr_bits = osThreadDetached, + .cb_mem = &sBleTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = bleStack, + .stack_size = kBleTaskSize, + .priority = osPriorityHigh }; + +void rsi_ble_add_matter_service(void) +{ + constexpr uuid_t custom_service = { .size = RSI_BLE_MATTER_CUSTOM_SERVICE_SIZE, + .val = { .val16 = RSI_BLE_MATTER_CUSTOM_SERVICE_VALUE_16 } }; + uint8_t data[RSI_BLE_MATTER_CUSTOM_SERVICE_DATA_LENGTH] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; + + constexpr uuid_t custom_characteristic_RX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE, + .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED }, + .val = { .val128 = { + .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1 }, + .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2 }, + .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3 }, + .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4 } } } }; + + rsi_ble_resp_add_serv_t new_serv_resp = { 0 }; + rsi_ble_add_service(custom_service, &new_serv_resp); + + // Adding custom characteristic declaration to the custom service + SilabsBleWrapper::rsi_ble_add_char_serv_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_ATTRIBUTE_HANDLE_LOCATION, + RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX); + + // Adding characteristic value attribute to the service + SilabsBleWrapper::rsi_ble_add_char_val_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, + custom_characteristic_RX, + RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response + data, sizeof(data), ATT_REC_IN_HOST); + + constexpr uuid_t custom_characteristic_TX = { .size = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_SIZE, + .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_RESERVED }, + .val = { .val128 = { + .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1 }, + .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2 }, + .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3 }, + .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4 } } } }; + + // Adding custom characteristic declaration to the custom service + SilabsBleWrapper::rsi_ble_add_char_serv_att( + new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_ATTRIBUTE_HANDLE_LOCATION, + RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | + RSI_BLE_ATT_PROPERTY_NOTIFY | RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION, custom_characteristic_TX); + + // Adding characteristic value attribute to the service + rsi_ble_measurement_hndl = new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION; + + // Adding characteristic value attribute to the service + rsi_ble_gatt_server_client_config_hndl = + new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_GATT_SERVER_CLIENT_HANDLE_LOCATION; + + SilabsBleWrapper::rsi_ble_add_char_val_att(new_serv_resp.serv_handler, rsi_ble_measurement_hndl, custom_characteristic_TX, + RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | + RSI_BLE_ATT_PROPERTY_READ | RSI_BLE_ATT_PROPERTY_NOTIFY | + RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response + data, sizeof(data), ATT_REC_MAINTAIN_IN_HOST); +} + } // namespace BLEManagerImpl BLEManagerImpl::sInstance; @@ -120,15 +181,14 @@ void BLEManagerImpl::ProcessEvent(SilabsBleWrapper::BleEvent_t inEvent) switch (inEvent.eventType) { case SilabsBleWrapper::BleEventType::RSI_BLE_CONN_EVENT: { - BLEMgrImpl().HandleConnectEvent((inEvent.eventData)); + BLEMgrImpl().HandleConnectEvent(inEvent.eventData); // Requests the connection parameters change with the remote device - rsi_ble_conn_params_update(inEvent.eventData->resp_enh_conn.dev_addr, BLE_MIN_CONNECTION_INTERVAL_MS, + rsi_ble_conn_params_update(inEvent.eventData.resp_enh_conn.dev_addr, BLE_MIN_CONNECTION_INTERVAL_MS, BLE_MAX_CONNECTION_INTERVAL_MS, BLE_SLAVE_LATENCY_MS, BLE_TIMEOUT_MS); - rsi_ble_set_data_len(inEvent.eventData->resp_enh_conn.dev_addr, RSI_BLE_TX_OCTETS, RSI_BLE_TX_TIME); + rsi_ble_set_data_len(inEvent.eventData.resp_enh_conn.dev_addr, RSI_BLE_TX_OCTETS, RSI_BLE_TX_TIME); // Used to send the Indication confirmation - memcpy(dev_address, inEvent.eventData->resp_enh_conn.dev_addr, RSI_DEV_ADDR_LEN); - ble_measurement_hndl = inEvent.eventData->rsi_ble_measurement_hndl; + memcpy(dev_address, inEvent.eventData.resp_enh_conn.dev_addr, RSI_DEV_ADDR_LEN); } break; case SilabsBleWrapper::BleEventType::RSI_BLE_DISCONN_EVENT: { @@ -143,7 +203,7 @@ void BLEManagerImpl::ProcessEvent(SilabsBleWrapper::BleEvent_t inEvent) break; case SilabsBleWrapper::BleEventType::RSI_BLE_EVENT_GATT_RD: { #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - if (inEvent.eventData->rsi_ble_read_req->type == 0) + if (inEvent.eventData.rsi_ble_read_req->type == 0) { BLEMgrImpl().HandleC3ReadRequest(inEvent.eventData); } @@ -220,10 +280,10 @@ void BLEManagerImpl::sl_ble_init() SilabsBleWrapper::rsi_ble_on_event_indication_confirmation, NULL); // Exchange of GATT info with BLE stack - SilabsBleWrapper::rsi_ble_add_matter_service(); + rsi_ble_add_matter_service(); rsi_ble_set_random_address_with_value(randomAddrBLE); - sInstance.sBleEventQueue = osMessageQueueNew(WFX_QUEUE_SIZE, sizeof(WfxEvent_t), NULL); + sInstance.sBleEventQueue = osMessageQueueNew(WFX_QUEUE_SIZE, sizeof(SilabsBleWrapper::BleEvent_t), NULL); VerifyOrDie(sInstance.sBleEventQueue != nullptr); chip::DeviceLayer::Internal::BLEMgrImpl().HandleBootEvent(); @@ -440,7 +500,7 @@ CHIP_ERROR BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const Chi PacketBufferHandle data) { int32_t status = 0; - status = rsi_ble_indicate_value(dev_address, ble_measurement_hndl, data->DataLength(), data->Start()); + status = rsi_ble_indicate_value(dev_address, rsi_ble_measurement_hndl, data->DataLength(), data->Start()); if (status != RSI_SUCCESS) { ChipLogProgress(DeviceLayer, "indication failed with error code %lx ", status); @@ -734,9 +794,9 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return err; } -void BLEManagerImpl::UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::UpdateMtu(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - CHIPoBLEConState * bleConnState = GetConnectionState(evt->connectionHandle); + CHIPoBLEConState * bleConnState = GetConnectionState(evt.connectionHandle); if (bleConnState != NULL) { // bleConnState->MTU is a 10-bit field inside a uint16_t. We're @@ -748,10 +808,10 @@ void BLEManagerImpl::UpdateMtu(SilabsBleWrapper::sl_wfx_msg_t * evt) // TODO: https://github.com/project-chip/connectedhomeip/issues/2569 // tracks making this safe with a check or explaining why no check // is needed. - ChipLogProgress(DeviceLayer, "DriveBLEState UpdateMtu %d", evt->rsi_ble_mtu.mtu_size); + ChipLogProgress(DeviceLayer, "DriveBLEState UpdateMtu %d", evt.rsi_ble_mtu.mtu_size); #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" - bleConnState->mtu = evt->rsi_ble_mtu.mtu_size; + bleConnState->mtu = evt.rsi_ble_mtu.mtu_size; #pragma GCC diagnostic pop ; } @@ -763,14 +823,13 @@ void BLEManagerImpl::HandleBootEvent(void) PlatformMgr().ScheduleWork(DriveBLEState, 0); } -void BLEManagerImpl::HandleConnectEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleConnectEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - AddConnection(evt->connectionHandle, evt->bondingHandle); + AddConnection(evt.connectionHandle, evt.bondingHandle); PlatformMgr().ScheduleWork(DriveBLEState, 0); } -// TODO:: Implementation need to be done. -void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleConnectionCloseEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { uint8_t connHandle = 1; @@ -780,7 +839,7 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * event.Type = DeviceEventType::kCHIPoBLEConnectionError; event.CHIPoBLEConnectionError.ConId = connHandle; - switch (evt->reason) + switch (evt.reason) { case RSI_BT_CTRL_REMOTE_USER_TERMINATED: @@ -792,7 +851,7 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * event.CHIPoBLEConnectionError.Reason = BLE_ERROR_CHIPOBLE_PROTOCOL_ABORT; } - ChipLogProgress(DeviceLayer, "BLE GATT connection closed (con %u, reason %x)", connHandle, evt->reason); + ChipLogProgress(DeviceLayer, "BLE GATT connection closed (con %u, reason %x)", connHandle, evt.reason); PlatformMgr().PostEventOrDie(&event); @@ -804,11 +863,11 @@ void BLEManagerImpl::HandleConnectionCloseEvent(SilabsBleWrapper::sl_wfx_msg_t * } } -void BLEManagerImpl::HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleWriteEvent(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - ChipLogProgress(DeviceLayer, "Char Write Req, packet type %d", evt->rsi_ble_write.pkt_type); + ChipLogProgress(DeviceLayer, "Char Write Req, packet type %d", evt.rsi_ble_write.pkt_type); - if (evt->rsi_ble_write.handle[0] == (uint8_t) evt->rsi_ble_gatt_server_client_config_hndl) // TODO:: compare the handle exactly + if (evt.rsi_ble_write.handle[0] == (uint8_t) rsi_ble_gatt_server_client_config_hndl) // TODO:: compare the handle exactly { HandleTXCharCCCDWrite(evt); } @@ -818,23 +877,22 @@ void BLEManagerImpl::HandleWriteEvent(SilabsBleWrapper::sl_wfx_msg_t * evt) } } -// TODO:: Need to implement this -void BLEManagerImpl::HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleTXCharCCCDWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt) { CHIP_ERROR err = CHIP_NO_ERROR; bool isIndicationEnabled = false; ChipDeviceEvent event; CHIPoBLEConState * bleConnState; - bleConnState = GetConnectionState(evt->connectionHandle); + bleConnState = GetConnectionState(evt.connectionHandle); VerifyOrExit(bleConnState != NULL, err = CHIP_ERROR_NO_MEMORY); // Determine if the client is enabling or disabling notification/indication. - if (evt->rsi_ble_write.att_value[0] != 0) + if (evt.rsi_ble_write.att_value[0] != 0) { isIndicationEnabled = true; } - ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt->rsi_ble_write.att_value[0]); + ChipLogProgress(DeviceLayer, "HandleTXcharCCCDWrite - Config Flags value : %d", evt.rsi_ble_write.att_value[0]); ChipLogProgress(DeviceLayer, "CHIPoBLE %s received", isIndicationEnabled ? "subscribe" : "unsubscribe"); if (isIndicationEnabled) @@ -864,13 +922,13 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) } } -void BLEManagerImpl::HandleRXCharWrite(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleRXCharWrite(const SilabsBleWrapper::sl_wfx_msg_t & evt) { uint8_t conId = 1; CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferHandle buf; - uint16_t writeLen = evt->rsi_ble_write.length; - uint8_t * data = (uint8_t *) evt->rsi_ble_write.att_value; + uint16_t writeLen = evt.rsi_ble_write.length; + uint8_t * data = (uint8_t *) evt.rsi_ble_write.att_value; // Copy the data to a packet buffer. buf = System::PacketBufferHandle::NewWithData(data, writeLen, 0, 0); @@ -997,9 +1055,9 @@ CHIP_ERROR BLEManagerImpl::EncodeAdditionalDataTlv() return err; } -void BLEManagerImpl::HandleC3ReadRequest(SilabsBleWrapper::sl_wfx_msg_t * evt) +void BLEManagerImpl::HandleC3ReadRequest(const SilabsBleWrapper::sl_wfx_msg_t & evt) { - sl_status_t ret = rsi_ble_gatt_read_response(evt->rsi_ble_read_req->dev_addr, GATT_READ_RESP, evt->rsi_ble_read_req->handle, + sl_status_t ret = rsi_ble_gatt_read_response(evt.rsi_ble_read_req->dev_addr, GATT_READ_RESP, evt.rsi_ble_read_req->handle, GATT_READ_ZERO_OFFSET, sInstance.c3AdditionalDataBufferHandle->DataLength(), sInstance.c3AdditionalDataBufferHandle->Start()); if (ret != SL_STATUS_OK) diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp b/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp index c1af13e2cd807c..971852592c3e2e 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.cpp @@ -26,9 +26,6 @@ using namespace chip::DeviceLayer::Internal; -// Global Variables -SilabsBleWrapper::BleEvent_t bleEvent; - /*==============================================*/ /** * @fn rsi_ble_on_mtu_event @@ -40,8 +37,9 @@ SilabsBleWrapper::BleEvent_t bleEvent; */ void SilabsBleWrapper::rsi_ble_on_mtu_event(rsi_ble_event_mtu_t * rsi_ble_mtu) { - bleEvent.eventType = BleEventType::RSI_BLE_MTU_EVENT; - memcpy(&bleEvent.eventData->rsi_ble_mtu, rsi_ble_mtu, sizeof(rsi_ble_event_mtu_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_MTU_EVENT, + .eventData = { .connectionHandle = 1, .rsi_ble_mtu = *rsi_ble_mtu } }; + BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -57,9 +55,9 @@ void SilabsBleWrapper::rsi_ble_on_mtu_event(rsi_ble_event_mtu_t * rsi_ble_mtu) */ void SilabsBleWrapper::rsi_ble_on_gatt_write_event(uint16_t event_id, rsi_ble_event_write_t * rsi_ble_write) { - bleEvent.eventType = BleEventType::RSI_BLE_GATT_WRITE_EVENT; - bleEvent.eventData->event_id = event_id; - memcpy(&bleEvent.eventData->rsi_ble_write, rsi_ble_write, sizeof(rsi_ble_event_write_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_GATT_WRITE_EVENT, + .eventData = { + .connectionHandle = 1, .event_id = event_id, .rsi_ble_write = *rsi_ble_write } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -74,10 +72,12 @@ void SilabsBleWrapper::rsi_ble_on_gatt_write_event(uint16_t event_id, rsi_ble_ev */ void SilabsBleWrapper::rsi_ble_on_enhance_conn_status_event(rsi_ble_event_enhance_conn_status_t * resp_enh_conn) { - bleEvent.eventType = BleEventType::RSI_BLE_CONN_EVENT; - bleEvent.eventData->connectionHandle = 1; - bleEvent.eventData->bondingHandle = 255; - memcpy(bleEvent.eventData->resp_enh_conn.dev_addr, resp_enh_conn->dev_addr, RSI_DEV_ADDR_LEN); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_CONN_EVENT, + .eventData = { + .connectionHandle = 1, + .bondingHandle = 255, + } }; + memcpy(bleEvent.eventData.resp_enh_conn.dev_addr, resp_enh_conn->dev_addr, RSI_DEV_ADDR_LEN); BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -93,8 +93,7 @@ void SilabsBleWrapper::rsi_ble_on_enhance_conn_status_event(rsi_ble_event_enhanc */ void SilabsBleWrapper::rsi_ble_on_disconnect_event(rsi_ble_event_disconnect_t * resp_disconnect, uint16_t reason) { - bleEvent.eventType = BleEventType::RSI_BLE_DISCONN_EVENT; - bleEvent.eventData->reason = reason; + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_DISCONN_EVENT, .eventData = { .reason = reason } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -110,9 +109,9 @@ void SilabsBleWrapper::rsi_ble_on_disconnect_event(rsi_ble_event_disconnect_t * void SilabsBleWrapper::rsi_ble_on_event_indication_confirmation(uint16_t resp_status, rsi_ble_set_att_resp_t * rsi_ble_event_set_att_rsp) { - bleEvent.eventType = BleEventType::RSI_BLE_GATT_INDICATION_CONFIRMATION; - bleEvent.eventData->resp_status = resp_status; - memcpy(&bleEvent.eventData->rsi_ble_event_set_att_rsp, rsi_ble_event_set_att_rsp, sizeof(rsi_ble_set_att_resp_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_GATT_INDICATION_CONFIRMATION, + .eventData = { .resp_status = resp_status, + .rsi_ble_event_set_att_rsp = *rsi_ble_event_set_att_rsp } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -128,9 +127,8 @@ void SilabsBleWrapper::rsi_ble_on_event_indication_confirmation(uint16_t resp_st */ void SilabsBleWrapper::rsi_ble_on_read_req_event(uint16_t event_id, rsi_ble_read_req_t * rsi_ble_read_req) { - bleEvent.eventType = BleEventType::RSI_BLE_EVENT_GATT_RD; - bleEvent.eventData->event_id = event_id; - memcpy(&bleEvent.eventData->rsi_ble_read_req, rsi_ble_read_req, sizeof(rsi_ble_read_req_t)); + SilabsBleWrapper::BleEvent_t bleEvent = { .eventType = BleEventType::RSI_BLE_EVENT_GATT_RD, + .eventData = { .event_id = event_id, .rsi_ble_read_req = rsi_ble_read_req } }; BLEMgrImpl().BlePostEvent(&bleEvent); } @@ -282,77 +280,3 @@ void SilabsBleWrapper::rsi_ble_add_char_val_att(void * serv_handler, uint16_t ha return; } - -/*==============================================*/ -/** - * @fn rsi_ble_add_matter_service - * @brief this function is used to add service for matter - * @return status (uint32_t) 0 for success. - * @section description - * This function is used at application to create new service. - */ - -uint32_t SilabsBleWrapper::rsi_ble_add_matter_service(void) -{ - uuid_t custom_service = { RSI_BLE_MATTER_CUSTOM_SERVICE_UUID }; - custom_service.size = RSI_BLE_MATTER_CUSTOM_SERVICE_SIZE; - custom_service.val.val16 = RSI_BLE_MATTER_CUSTOM_SERVICE_VALUE_16; - uint8_t data[RSI_BLE_MATTER_CUSTOM_SERVICE_DATA_LENGTH] = { RSI_BLE_MATTER_CUSTOM_SERVICE_DATA }; - - static const uuid_t custom_characteristic_RX = { - .size = RSI_BLE_CUSTOM_CHARACTERISTIC_RX_SIZE, - .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_RESERVED }, - .val = { .val128 = { .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_1 }, - .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_2 }, - .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_3 }, - .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_RX_VALUE_128_DATA_4 } } } - }; - - rsi_ble_resp_add_serv_t new_serv_resp = { 0 }; - rsi_ble_add_service(custom_service, &new_serv_resp); - - // Adding custom characteristic declaration to the custom service - rsi_ble_add_char_serv_att( - new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_ATTRIBUTE_HANDLE_LOCATION, - RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX); - - // Adding characteristic value attribute to the service - rsi_ble_add_char_val_att(new_serv_resp.serv_handler, - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_RX_VALUE_HANDLE_LOCATION, custom_characteristic_RX, - RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ, // Set read, write, write without response - data, sizeof(data), ATT_REC_IN_HOST); - - static const uuid_t custom_characteristic_TX = { - .size = RSI_BLE_CUSTOM_CHARACTERISTIC_TX_SIZE, - .reserved = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_RESERVED }, - .val = { .val128 = { .data1 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_1 }, - .data2 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_2 }, - .data3 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_3 }, - .data4 = { RSI_BLE_CUSTOM_CHARACTERISTIC_TX_VALUE_128_DATA_4 } } } - }; - - // Adding custom characteristic declaration to the custom service - rsi_ble_add_char_serv_att( - new_serv_resp.serv_handler, new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_ATTRIBUTE_HANDLE_LOCATION, - RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | - RSI_BLE_ATT_PROPERTY_NOTIFY | RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION, custom_characteristic_TX); - - // Adding characteristic value attribute to the service - bleEvent.eventData->rsi_ble_measurement_hndl = - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_MEASUREMENT_HANDLE_LOCATION; - - // Adding characteristic value attribute to the service - bleEvent.eventData->rsi_ble_gatt_server_client_config_hndl = - new_serv_resp.start_handle + RSI_BLE_CHARACTERISTIC_TX_GATT_SERVER_CLIENT_HANDLE_LOCATION; - - rsi_ble_add_char_val_att(new_serv_resp.serv_handler, bleEvent.eventData->rsi_ble_measurement_hndl, custom_characteristic_TX, - RSI_BLE_ATT_PROPERTY_WRITE_NO_RESPONSE | RSI_BLE_ATT_PROPERTY_WRITE | RSI_BLE_ATT_PROPERTY_READ | - RSI_BLE_ATT_PROPERTY_NOTIFY | - RSI_BLE_ATT_PROPERTY_INDICATE, // Set read, write, write without response - data, sizeof(data), ATT_REC_MAINTAIN_IN_HOST); - - memset(&data, 0, sizeof(data)); - return 0; -} diff --git a/src/platform/silabs/rs911x/wfx_sl_ble_init.h b/src/platform/silabs/rs911x/wfx_sl_ble_init.h index 1e770de0727100..54351674ef121e 100644 --- a/src/platform/silabs/rs911x/wfx_sl_ble_init.h +++ b/src/platform/silabs/rs911x/wfx_sl_ble_init.h @@ -104,15 +104,13 @@ class SilabsBleWrapper rsi_ble_event_disconnect_t * resp_disconnect; rsi_ble_read_req_t * rsi_ble_read_req; rsi_ble_set_att_resp_t rsi_ble_event_set_att_rsp; - uint16_t rsi_ble_measurement_hndl; - uint16_t rsi_ble_gatt_server_client_config_hndl; uint16_t subscribed; }; struct BleEvent_t { BleEventType eventType; - sl_wfx_msg_t * eventData; + sl_wfx_msg_t eventData; }; // ALL Ble functions @@ -129,7 +127,6 @@ class SilabsBleWrapper uuid_t att_val_uuid); static void rsi_ble_add_char_val_att(void * serv_handler, uint16_t handle, uuid_t att_type_uuid, uint8_t val_prop, uint8_t * data, uint8_t data_len, uint8_t auth_read); - static uint32_t rsi_ble_add_matter_service(void); }; } // namespace Internal From a4a911c70bc3258077ce8a584ff55856d3e21dc5 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 23 Oct 2024 13:35:15 -0400 Subject: [PATCH 11/14] Revert "Generate Conformance Data with Alchemy (#36186)" (#36220) This reverts commit 334c6693564dd9b33c62951c47a78d3676d5c473. --- .../chip/access-control-cluster.xml | 50 +- .../data-model/chip/account-login-cluster.xml | 11 +- .../zcl/data-model/chip/actions-cluster.xml | 33 +- .../administrator-commissioning-cluster.xml | 22 +- .../data-model/chip/air-quality-cluster.xml | 5 +- .../chip/application-basic-cluster.xml | 42 +- .../chip/application-launcher-cluster.xml | 18 +- .../data-model/chip/audio-output-cluster.xml | 16 +- .../chip/ballast-configuration-cluster.xml | 80 +- .../chip/basic-information-cluster.xml | 110 +- .../zcl/data-model/chip/binding-cluster.xml | 7 +- .../data-model/chip/boolean-state-cluster.xml | 8 +- .../boolean-state-configuration-cluster.xml | 81 +- .../zcl/data-model/chip/channel-cluster.xml | 53 +- .../data-model/chip/color-control-cluster.xml | 455 +---- .../chip/commissioner-control-cluster.xml | 5 - .../concentration-measurement-cluster.xml | 1184 ++++--------- .../chip/content-app-observer-cluster.xml | 2 - .../chip/content-control-cluster.xml | 86 +- .../chip/content-launch-cluster.xml | 30 +- .../data-model/chip/descriptor-cluster.xml | 29 +- .../chip/device-energy-management-cluster.xml | 95 +- .../device-energy-management-mode-cluster.xml | 12 +- .../chip/diagnostic-logs-cluster.xml | 86 +- .../chip/dishwasher-alarm-cluster.xml | 45 +- .../chip/dishwasher-mode-cluster.xml | 14 +- .../zcl/data-model/chip/door-lock-cluster.xml | 1514 +++++++---------- .../zcl/data-model/chip/drlc-cluster.xml | 39 +- .../electrical-energy-measurement-cluster.xml | 58 +- .../electrical-power-measurement-cluster.xml | 122 +- .../data-model/chip/energy-evse-cluster.xml | 151 +- .../chip/energy-evse-mode-cluster.xml | 12 +- .../chip/energy-preference-cluster.xml | 35 +- .../ethernet-network-diagnostics-cluster.xml | 73 +- .../data-model/chip/fixed-label-cluster.xml | 5 +- .../chip/flow-measurement-cluster.xml | 20 +- .../chip/general-commissioning-cluster.xml | 71 +- .../chip/general-diagnostics-cluster.xml | 60 +- .../chip/group-key-mgmt-cluster.xml | 26 +- .../zcl/data-model/chip/groups-cluster.xml | 17 +- .../chip/icd-management-cluster.xml | 260 ++- .../zcl/data-model/chip/identify-cluster.xml | 16 +- .../chip/illuminance-measurement-cluster.xml | 41 +- .../data-model/chip/keypad-input-cluster.xml | 2 - .../chip/laundry-dryer-controls-cluster.xml | 16 +- .../chip/laundry-washer-mode-cluster.xml | 14 +- .../data-model/chip/level-control-cluster.xml | 95 +- .../localization-configuration-cluster.xml | 6 +- .../zcl/data-model/chip/low-power-cluster.xml | 1 - .../data-model/chip/media-input-cluster.xml | 16 +- .../chip/media-playback-cluster.xml | 103 +- .../zcl/data-model/chip/messages-cluster.xml | 17 +- .../chip/microwave-oven-control-cluster.xml | 73 +- .../chip/microwave-oven-mode-cluster.xml | 10 +- .../data-model/chip/mode-select-cluster.xml | 34 +- .../chip/network-commissioning-cluster.xml | 261 +-- .../chip/occupancy-sensing-cluster.xml | 228 +-- .../zcl/data-model/chip/onoff-cluster.xml | 53 +- .../chip/operational-credentials-cluster.xml | 40 +- .../chip/operational-state-cluster.xml | 71 +- .../chip/operational-state-oven-cluster.xml | 53 +- .../chip/operational-state-rvc-cluster.xml | 74 +- .../zcl/data-model/chip/oven-mode-cluster.xml | 14 +- .../data-model/chip/power-source-cluster.xml | 234 +-- .../power-source-configuration-cluster.xml | 5 +- .../chip/power-topology-cluster.xml | 14 +- .../chip/pressure-measurement-cluster.xml | 57 +- ...pump-configuration-and-control-cluster.xml | 188 +- .../data-model/chip/refrigerator-alarm.xml | 28 +- ...rature-controlled-cabinet-mode-cluster.xml | 14 +- .../relative-humidity-measurement-cluster.xml | 20 +- .../chip/resource-monitoring-cluster.xml | 78 +- .../chip/rvc-clean-mode-cluster.xml | 12 +- .../data-model/chip/rvc-run-mode-cluster.xml | 12 +- .../zcl/data-model/chip/scene.xml | 34 +- .../data-model/chip/service-area-cluster.xml | 42 +- .../chip/smoke-co-alarm-cluster.xml | 91 +- .../chip/software-diagnostics-cluster.xml | 28 +- .../zcl/data-model/chip/switch-cluster.xml | 45 +- .../chip/target-navigator-cluster.xml | 15 +- .../chip/temperature-control-cluster.xml | 49 +- .../chip/temperature-measurement-cluster.xml | 20 +- .../data-model/chip/thermostat-cluster.xml | 310 +--- ...t-user-interface-configuration-cluster.xml | 11 +- ...hread-border-router-management-cluster.xml | 51 +- .../thread-network-diagnostics-cluster.xml | 408 +---- .../chip/thread-network-directory-cluster.xml | 109 +- .../chip/time-format-localization-cluster.xml | 21 +- .../chip/time-synchronization-cluster.xml | 118 +- .../chip/unit-localization-cluster.xml | 7 +- .../data-model/chip/user-label-cluster.xml | 1 - ...alve-configuration-and-control-cluster.xml | 71 +- .../data-model/chip/wake-on-lan-cluster.xml | 12 +- .../chip/washer-controls-cluster.xml | 30 +- .../chip/water-heater-management-cluster.xml | 40 +- .../chip/water-heater-mode-cluster.xml | 12 +- .../chip/wifi-network-diagnostics-cluster.xml | 87 +- .../chip/wifi-network-management-cluster.xml | 8 +- .../zcl/data-model/chip/window-covering.xml | 230 +-- 99 files changed, 2033 insertions(+), 6759 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index 831cc5b49361b0..edf1b65e941ad0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -113,58 +113,29 @@ limitations under the License. ACL - Extension - - - - - SubjectsPerAccessControlEntry - - - - TargetsPerAccessControlEntry - - - - AccessControlEntriesPerFabric - - - - CommissioningARL - - - - - - ARL - - - - - + SubjectsPerAccessControlEntry + TargetsPerAccessControlEntry + AccessControlEntriesPerFabric + CommissioningARL + ARL + This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. - - - - + Returns the review token for the request, which can be used to correlate with a FabricRestrictionReviewUpdate event. - - - @@ -174,7 +145,6 @@ limitations under the License. - @@ -184,9 +154,6 @@ limitations under the License. - - - @@ -195,9 +162,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index 38fcbcaaf9c5e4..baf74dc3c2e1da 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -28,36 +28,31 @@ limitations under the License. Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. - + - Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. - + - - + The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. - This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. - This event can be used by the Content App to indicate that the current user has logged out. In response to this event, the Fabric Admin SHALL remove access to this Content App by the specified Node. If no Node is provided, then the Fabric Admin SHALL remove access to all non-Admin Nodes. - diff --git a/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml index bed60efdf50c65..acf28b88e46414 100644 --- a/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml @@ -89,20 +89,11 @@ limitations under the License. 0x0025 ACTIONS_CLUSTER This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. - - - ActionList - - - - EndpointLists - - - - SetupURL - - - + + ActionList + EndpointLists + SetupURL + This command triggers an action (state change) on the involved endpoints. @@ -182,19 +173,17 @@ limitations under the License. This event SHALL be generated when there is a change in the Status of an ActionID. - - + + - This event SHALL be generated when there is some error which prevents the action from its normal planned execution. - - - - - + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml index 55a8310f0fa7ac..3532c89b931880 100644 --- a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml @@ -43,19 +43,10 @@ limitations under the License. - - WindowStatus - - - - AdminFabricIndex - - - - AdminVendorId - - - + WindowStatus + AdminFabricIndex + AdminVendorId + This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. @@ -64,22 +55,17 @@ limitations under the License. - This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. - - - This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. - diff --git a/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml index 6b91830856441c..bbc57510e85dce 100644 --- a/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml @@ -41,10 +41,7 @@ limitations under the License. - - AirQuality - - + AirQuality diff --git a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml index ea6be51e9bcb28..e6331f698fd423 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml @@ -24,38 +24,16 @@ limitations under the License. true true This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. - - VendorName - - - - VendorID - - - - ApplicationName - - - - ProductID - - - - Application - - - - Status - - - - ApplicationVersion - - - - AllowedVendorList - - + VendorName + VendorID + ApplicationName + ProductID + Application + Status + ApplicationVersion + + AllowedVendorList + diff --git a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml index 34eb73fde5b351..50b715e138a744 100644 --- a/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml @@ -31,41 +31,29 @@ limitations under the License. - - CatalogList - - - - - - CurrentApp - - - + CatalogList + CurrentApp + Upon receipt, this SHALL launch the specified app with optional data. The TV Device SHALL launch and bring to foreground the identified application in the command if the application is not already launched and in foreground. The TV Device SHALL update state attribute on the Application Basic cluster of the Endpoint corresponding to the launched application. This command returns a Launch Response. - Upon receipt on a Video Player endpoint this SHALL stop the specified application if it is running. - Upon receipt on a Video Player endpoint this SHALL hide the specified application if it is running and visible. - This command SHALL be generated in response to LaunchApp commands. - diff --git a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml index 0de5d0e3301de5..acaa9deadb6a3b 100644 --- a/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml @@ -31,19 +31,12 @@ limitations under the License. - - OutputList - - - - CurrentOutput - - - + OutputList + CurrentOutput + Upon receipt, this SHALL change the output on the media device to the output at a specific index in the Output List. - @@ -51,9 +44,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml index 29ec1cd38108f3..32450208914a6d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ballast-configuration-cluster.xml @@ -41,75 +41,53 @@ limitations under the License. - - PhysicalMinLevel - - - - PhysicalMaxLevel - - - - BallastStatus - - + PhysicalMinLevel + PhysicalMaxLevel + BallastStatus - - MinLevel - - + + MinLevel + - - MaxLevel - - + + MaxLevel + - IntrinsicBallastFactor - - + IntrinsicBallastFactor + - - BallastFactorAdjustment - - + + BallastFactorAdjustment + - - LampQuantity - - + LampQuantity - LampType - - + LampType + - LampManufacturer - - + LampManufacturer + - - LampRatedHours - - + + LampRatedHours + - LampBurnHours - - + LampBurnHours + - LampAlarmMode - - + LampAlarmMode + - - LampBurnHoursTripPoint - - + + LampBurnHoursTripPoint + diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index 288c82f950b8ab..7f6320a5880dc9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -74,118 +74,52 @@ limitations under the License. which apply to the whole Node. Also allows setting user device information such as location. - - DataModelRevision - - - - VendorName - - - - VendorID - - - - ProductName - - - - ProductID - - - + DataModelRevision + VendorName + VendorID + ProductName + ProductID + NodeLabel - Location - - - - HardwareVersion - - - - HardwareVersionString - - - - SoftwareVersion - - - - SoftwareVersionString - - - - ManufacturingDate - - - PartNumber - - - - ProductURL - - - - ProductLabel - - - - SerialNumber - - - + HardwareVersion + HardwareVersionString + SoftwareVersion + SoftwareVersionString + ManufacturingDate + PartNumber + ProductURL + ProductLabel + SerialNumber + LocalConfigDisabled - - - - Reachable - - - - UniqueID - - - - CapabilityMinima - - - - ProductAppearance - - - - SpecificationVersion - - - - MaxPathsPerInvoke - + Reachable + UniqueID + CapabilityMinima + ProductAppearance + SpecificationVersion + MaxPathsPerInvoke The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. - The ShutDown event SHOULD be emitted by a Node prior to any orderly shutdown sequence on a best-effort basis. - The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. - This event (when supported) SHALL be generated when there is a change in the Reachable attribute. diff --git a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml index 0b1cbd0c560091..741a5a9372edc0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/binding-cluster.xml @@ -31,10 +31,9 @@ limitations under the License. 0x001e BINDING_CLUSTER The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. - - Binding - - + + Binding + diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml index 30a16e16bcc0b0..0dee692affacee 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-cluster.xml @@ -26,15 +26,11 @@ limitations under the License. true true - - StateValue - - - + StateValue + This event SHALL be generated when the StateValue attribute changes. - diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml index 85705e6a03050e..4fb33dd9749a0e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml @@ -58,97 +58,34 @@ limitations under the License. - - CurrentSensitivityLevel - - - - - - SupportedSensitivityLevels - - - - - - DefaultSensitivityLevel - - - - - - AlarmsActive - - - - - - - - - AlarmsSuppressed - - - - - - AlarmsEnabled - - - - - - - - - AlarmsSupported - - - - - - - - - SensorFault - - - + CurrentSensitivityLevel + SupportedSensitivityLevels + DefaultSensitivityLevel + AlarmsActive + AlarmsSuppressed + AlarmsEnabled + AlarmsSupported + SensorFault + This command is used to suppress the specified alarm mode. - - - This command is used to enable or disable the specified alarm mode. - - - - - - This event SHALL be generated when any bits in the AlarmsActive and/or AlarmsSuppressed attributes change. - - - - - - This event SHALL be generated when the device registers or clears a fault. - diff --git a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml index c3a08ab084359b..25ec7b7062f97a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml @@ -41,57 +41,30 @@ limitations under the License. - - ChannelList - - - - - - Lineup - - - - - - CurrentChannel - - - + ChannelList + Lineup + CurrentChannel + Change the channel on the media player to the channel case-insensitive exact matching the value passed as an argument. - - - - - - Change the channel on the media plaeyer to the channel with the given Number in the ChannelList attribute. - This command provides channel up and channel down functionality, but allows channel index jumps of size Count. When the value of the increase or decrease is larger than the number of channels remaining in the given direction, then the behavior SHALL be to return to the beginning (or end) of the channel list and continue. For example, if the current channel is at index 0 and count value of -1 is given, then the current channel should change to the last channel. - Upon receipt, this SHALL display the active status of the input list on screen. - - - - - - @@ -103,18 +76,12 @@ limitations under the License. - - - This command is a response to the GetProgramGuide command. - - - @@ -123,12 +90,6 @@ limitations under the License. - - - - - - @@ -137,12 +98,6 @@ limitations under the License. - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml index a479da36375e4f..3623ce1ccf925c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml @@ -127,401 +127,135 @@ limitations under the License. - - CurrentHue - - - - + CurrentHue - - CurrentSaturation - - - - + CurrentSaturation - - RemainingTime - - + RemainingTime - - CurrentX - - - - + CurrentX - - CurrentY - - - - + CurrentY - - DriftCompensation - - + DriftCompensation - - CompensationText - - + CompensationText - - ColorTemperatureMireds - - - - + ColorTemperatureMireds - - ColorMode - - + ColorMode - - Options - - + Options - - NumberOfPrimaries - - + NumberOfPrimaries - - Primary1X - - - - - - - - - - + Primary1X - - Primary1Y - - - - - - - - - - + Primary1Y - - Primary1Intensity - - - - - - - - - - + Primary1Intensity - - Primary2X - - - - - - - - - - + Primary2X - - Primary2Y - - - - - - - - - - + Primary2Y - - Primary2Intensity - - - - - - - - - - + Primary2Intensity - - Primary3X - - - - - - - - - - + Primary3X - - Primary3Y - - - - - - - - - - + Primary3Y - - Primary3Intensity - - - - - - - - - - + Primary3Intensity - - Primary4X - - - - - - - - - - + Primary4X - - Primary4Y - - - - - - - - - - + Primary4Y - - Primary4Intensity - - - - - - - - - - + Primary4Intensity - - Primary5X - - - - - - - - - - + Primary5X - - Primary5Y - - - - - - - - - - + Primary5Y - - Primary5Intensity - - - - - - - - - - + Primary5Intensity - - Primary6X - - - - - - - - - - + Primary6X - - Primary6Y - - - - - - - - - - + Primary6Y - - Primary6Intensity - - - - - - - - - - + Primary6Intensity WhitePointX - WhitePointY - ColorPointRX - ColorPointRY - ColorPointRIntensity - ColorPointGX - ColorPointGY - ColorPointGIntensity - ColorPointBX - ColorPointBY - ColorPointBIntensity - - - CoupleColorTempToLevelMinMireds - - - - - - - - + CoupleColorTempToLevelMinMireds + StartUpColorTemperatureMireds - - - - - - @@ -533,9 +267,6 @@ limitations under the License. - - - @@ -546,9 +277,6 @@ limitations under the License. - - - @@ -560,9 +288,6 @@ limitations under the License. - - - @@ -573,9 +298,6 @@ limitations under the License. - - - @@ -586,9 +308,6 @@ limitations under the License. - - - @@ -600,9 +319,6 @@ limitations under the License. - - - @@ -614,9 +330,6 @@ limitations under the License. - - - @@ -628,9 +341,6 @@ limitations under the License. - - - @@ -641,9 +351,6 @@ limitations under the License. - - - @@ -655,9 +362,6 @@ limitations under the License. - - - @@ -668,69 +372,20 @@ limitations under the License. - - - - - EnhancedCurrentHue - - - - - - EnhancedColorMode - - - - ColorLoopActive - - - - - - ColorLoopDirection - - - - - - ColorLoopTime - - - - - - ColorLoopStartEnhancedHue - - - - - - ColorLoopStoredEnhancedHue - - - - - - ColorCapabilities - - - - ColorTempPhysicalMinMireds - - - - - - ColorTempPhysicalMaxMireds - - - - + EnhancedCurrentHue + EnhancedColorMode + ColorLoopActive + ColorLoopDirection + ColorLoopTime + ColorLoopStartEnhancedHue + ColorLoopStoredEnhancedHue + ColorCapabilities + ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds @@ -741,9 +396,6 @@ limitations under the License. - - - @@ -754,9 +406,6 @@ limitations under the License. - - - @@ -768,9 +417,6 @@ limitations under the License. - - - @@ -782,9 +428,6 @@ limitations under the License. - - - @@ -798,9 +441,6 @@ limitations under the License. - - - @@ -809,13 +449,6 @@ limitations under the License. - - - - - - - @@ -828,9 +461,6 @@ limitations under the License. - - - @@ -844,9 +474,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml index 33f26e3689e5f4..dcfb1dfa7096b8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml @@ -35,7 +35,6 @@ limitations under the License. SupportedDeviceCategories - @@ -45,7 +44,6 @@ limitations under the License. - @@ -53,7 +51,6 @@ limitations under the License. - @@ -63,7 +60,6 @@ limitations under the License. - @@ -72,7 +68,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml index e2116fc03cc80c..4d03c539103970 100644 --- a/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml @@ -58,70 +58,17 @@ limitations under the License. - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -166,70 +113,17 @@ limitations under the License. - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -245,98 +139,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -352,98 +193,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -459,98 +247,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -566,98 +301,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -673,98 +355,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -780,98 +409,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -887,98 +463,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue @@ -994,98 +517,45 @@ limitations under the License. - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - MeasuredValue - - - - - - MinMeasuredValue - - - - - - MaxMeasuredValue - - - - - - PeakMeasuredValue - - - - - - PeakMeasuredValueWindow - - - - - - AverageMeasuredValue - - - - - - AverageMeasuredValueWindow - - - - - - Uncertainty - - - - - - MeasurementUnit - - - - - - MeasurementMedium - - - - LevelValue - - - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + PeakMeasuredValue + PeakMeasuredValueWindow + AverageMeasuredValue + AverageMeasuredValueWindow + Uncertainty + MeasurementUnit + MeasurementMedium + LevelValue diff --git a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml index 0f5a99b6ba9266..6e241c7b5c3cd0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml @@ -29,7 +29,6 @@ limitations under the License. Upon receipt, the data field MAY be parsed and interpreted. Message encoding is specific to the Content App. A Content App MAY when possible read attributes from the Basic Information Cluster on the Observer and use this to determine the Message encoding. - @@ -37,7 +36,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml index e42967b581fac6..06468c114c42dc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-control-cluster.xml @@ -43,139 +43,69 @@ limitations under the License. - - Enabled - - - - OnDemandRatings - - - - - - OnDemandRatingThreshold - - - - - - ScheduledContentRatings - - - - - - ScheduledContentRatingThreshold - - - - - - ScreenDailyTime - - - - - - RemainingScreenTime - - - - - - BlockUnrated - - - - + Enabled + OnDemandRatings + OnDemandRatingThreshold + ScheduledContentRatings + ScheduledContentRatingThreshold + ScreenDailyTime + RemainingScreenTime + BlockUnrated The purpose of this command is to update the PIN used for protecting configuration of the content control settings. Upon success, the old PIN SHALL no longer work. The PIN is used to ensure that only the Node (or User) with the PIN code can make changes to the Content Control settings, for example, turn off Content Controls or modify the ScreenDailyTime. The PIN is composed of a numeric string of up to 6 human readable characters (displayable) . Upon receipt of this command, the media device SHALL check if the OldPIN field of this command is the same as the current PIN. If the PINs are the same, then the PIN code SHALL be set to NewPIN. Otherwise a response with InvalidPINCode error status SHALL be returned. The media device MAY provide a default PIN to the User via an out of band mechanism. For security reasons, it is recommended that a client encourage the user to update the PIN from its default value when performing configuration of the Content Control settings exposed by this cluster. The ResetPIN command can also be used to obtain the default PIN. - - - The purpose of this command is to reset the PIN. If this command is executed successfully, a ResetPINResponse command with a new PIN SHALL be returned. - - - This command SHALL be generated in response to a ResetPIN command. The data for this command SHALL be as follows: - - - The purpose of this command is to turn on the Content Control feature on a media device. On receipt of the Enable command, the media device SHALL set the Enabled attribute to TRUE. - The purpose of this command is to turn off the Content Control feature on a media device. On receipt of the Disable command, the media device SHALL set the Enabled attribute to FALSE. - The purpose of this command is to add the extra screen time for the user. If a client with Operate privilege invokes this command, the media device SHALL check whether the PINCode passed in the command matches the current PINCode value. If these match, then the RemainingScreenTime attribute SHALL be increased by the specified BonusTime value. If the PINs do not match, then a response with InvalidPINCode error status SHALL be returned, and no changes SHALL be made to RemainingScreenTime. If a client with Manage privilege or greater invokes this command, the media device SHALL ignore the PINCode field and directly increase the RemainingScreenTime attribute by the specified BonusTime value. A server that does not support the PM feature SHALL respond with InvalidPINCode to clients that only have Operate privilege unless: It has been provided with the PIN value to expect via an out of band mechanism, and The client has provided a PINCode that matches the expected PIN value. - - - The purpose of this command is to set the ScreenDailyTime attribute. On receipt of the SetScreenDailyTime command, the media device SHALL set the ScreenDailyTime attribute to the ScreenTime value. - - - The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the BlockUnratedContent command, the media device SHALL set the BlockUnrated attribute to TRUE. - - - The purpose of this command is to specify whether programs with no Content rating must be blocked by this media device. On receipt of the UnblockUnratedContent command, the media device SHALL set the BlockUnrated attribute to FALSE. - - - The purpose of this command is to set the OnDemandRatingThreshold attribute. On receipt of the SetOnDemandRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the OnDemandRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. - - - The purpose of this command is to set ScheduledContentRatingThreshold attribute. On receipt of the SetScheduledContentRatingThreshold command, the media device SHALL check if the Rating field is one of values present in the ScheduledContentRatings attribute. If not, then a response with InvalidRating error status SHALL be returned. - - - This event SHALL be generated when the RemainingScreenTime equals 0. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml index 31ad15a48b93ac..7058f969799087 100644 --- a/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml @@ -25,20 +25,10 @@ limitations under the License. true This cluster provides an interface for launching content on a media player device such as a TV or Speaker. - - - AcceptHeader - - - - - - SupportedStreamingProtocols - - - - - + + AcceptHeader + SupportedStreamingProtocols + Upon receipt, this SHALL launch the specified content with optional search criteria. @@ -46,9 +36,6 @@ limitations under the License. - - - @@ -56,21 +43,12 @@ limitations under the License. - - - This command SHALL be generated in response to LaunchContent command. - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml index f34d705a2486da..d63dbeb05ca11a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml @@ -44,28 +44,11 @@ limitations under the License. - - - DeviceTypeList - - - - ServerList - - - - ClientList - - - - PartsList - - - - TagList - - - - + + DeviceTypeList + ServerList + ClientList + PartsList + TagList diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml index 250e3546ea8805..3550dd0301be99 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-cluster.xml @@ -74,95 +74,41 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - ESAType - - - - ESACanGenerate - - - - ESAState - - - - AbsMinPower - - - - AbsMaxPower - - + ESAType + ESACanGenerate + ESAState + AbsMinPower + AbsMaxPower - - PowerAdjustmentCapability - - - - + PowerAdjustmentCapability - - Forecast - - - - - - - - - OptOutState - - - - - - - - - - + Forecast + OptOutState Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. - - - Allows a client to cancel an ongoing PowerAdjustmentRequest operation. - - - Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). - - - Allows a client to temporarily pause an operation and reduce the ESAs energy demand. - - - Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. - - - @@ -170,36 +116,20 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - - Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. - - - Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command. - - - - - - - This event SHALL be generated when the Power Adjustment session is started. - - - @@ -207,24 +137,15 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - - This event SHALL be generated when the ESA enters the Paused state. - - - This event SHALL be generated when the ESA leaves the Paused state and resumes operation. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml index 470040b5c4f476..c3440adebef3f6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml @@ -59,26 +59,18 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode This command is used to change device modes. - This command is sent by the device on receipt of the ChangeToMode command. - diff --git a/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml index 4140fd18a0eaec..27162f66e5e6db 100644 --- a/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml @@ -15,48 +15,46 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - - - - - - - - - - - - - - Diagnostic Logs - CHIP - The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. - 0x0032 - DIAGNOSTIC_LOGS_CLUSTER - true - true - - Retrieving diagnostic logs from a Node - - - - - - - Response to the RetrieveLogsRequest - - - - - - - + + + + + + + + + + + + + + + + + + + + + + Diagnostic Logs + CHIP + The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. + 0x0032 + DIAGNOSTIC_LOGS_CLUSTER + true + true + + Retrieving diagnostic logs from a Node + + + + + + Response to the RetrieveLogsRequest + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml index a8cf1e166219e2..7e41a7a1c03f99 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml @@ -43,46 +43,27 @@ limitations under the License. - - Mask - - - - Latch - - - - - - State - - - - Supported - - + Mask + Latch + State + Supported - Reset alarm - - - - + Reset alarm + - Modify enabled alarms - - + Modify enabled alarms + - Notify - - - - - + Notify + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml index 7cc15557f0c5a1..7c7dec635f3b6c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml @@ -57,17 +57,11 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode StartUpMode OnMode - + @@ -75,7 +69,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -84,7 +77,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml index f16bbbf28bbbba..b25cd549d90091 100644 --- a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml @@ -131,901 +131,659 @@ limitations under the License. 3. Everything that depends on a certain feature is optional because we have no way of setting up the dependencies here. Dependencies would be probably resolved in the cluster itself. Those attributes/commands are marked with a special comment. --> - - - - LockState - - - - LockType - - - - ActuatorEnabled - - - - - DoorState - - - - - - - DoorOpenEvents - - - - - - - - - DoorClosedEvents - - - - - - - - - OpenPeriod - - - - - - - - - NumberOfTotalUsersSupported - - - - - - - NumberOfPINUsersSupported - - - - - - - NumberOfRFIDUsersSupported - - - - - - - NumberOfWeekDaySchedulesSupportedPerUser - - - - - - - NumberOfYearDaySchedulesSupportedPerUser - - - - - - - NumberOfHolidaySchedulesSupported - - - - - - - MaxPINCodeLength - - - - - - - MinPINCodeLength - - - - - - - MaxRFIDCodeLength - - - - - - - MinRFIDCodeLength - - - - - - - CredentialRulesSupport - - - - - - - NumberOfCredentialsSupportedPerUser - - - - - - Language - - - - - - LEDSettings - - - - - - AutoRelockTime - - - - - - SoundVolume - - - - - - OperatingMode - - - - - - SupportedOperatingModes - - - - DefaultConfigurationRegister - - - - EnableLocalProgramming - - - - - - EnableOneTouchLocking - - - - - - EnableInsideStatusLED - - - - - - EnablePrivacyModeButton - - - - - - LocalProgrammingFeatures - - - - - - - WrongCodeEntryLimit - - - - - - - - - - - - UserCodeTemporaryDisableTime - - - - - - - - - - - - SendPINOverTheAir - - - - - - - - - - - - - - RequirePINforRemoteOperation - - - - - - - - - - - - - ExpiringUserTimeout - - - - - - - - - AliroReaderVerificationKey - - - - - - - - AliroReaderGroupIdentifier - - - - - - - - AliroReaderGroupSubIdentifier - - - - - - - - AliroExpeditedTransactionSupportedProtocolVersions - - - - - - - - AliroGroupResolvingKey - - - - - - - - AliroSupportedBLEUWBProtocolVersions - - - - - - - - AliroBLEAdvertisingVersion - - - - - - - - NumberOfAliroCredentialIssuerKeysSupported - - - - - - - NumberOfAliroEndpointKeysSupported - - - - - - - This command causes the lock device to lock the door. - - - - - - This command causes the lock device to unlock the door. - - - - - - - This command causes the lock device to unlock the door with a timeout parameter. - - - - - - - - Set a weekly repeating schedule for a specified user. - - - - - - - - - - - - - - - Retrieve the specific weekly schedule for the specific user. - - - - - - - - - - Returns the weekly repeating schedule data for the specified schedule index. - - - - - - - - - - - - - - - Clear the specific weekly schedule or all weekly schedules for the specific user. - - - - - - - - - - Set a time-specific schedule ID for a specified user. - - - - - - - - - - - - Returns the year day schedule data for the specified schedule and user indexes. - - - - - - - - - - Returns the year day schedule data for the specified schedule and user indexes. - - - - - - - - - - - - Clears the specific year day schedule or all year day schedules for the specific user. - - - - - - - - - - Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. - - - - - - - - - - - - Get the holiday schedule for the specified index. - - - - - - - - - Returns the Holiday Schedule Entry for the specified Holiday ID. - - - - - - - - - - - - Clears the holiday schedule or all holiday schedules. - - - - - - - - - Set User into the lock. - - - - - - - - - - - - - - - Retrieve User. - - - - - - - - - Returns the User for the specified UserIndex. - - - - - - - - - - - - - - - - - Clears a User or all Users. - - - - - - - - - Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. - - - - - - - - - - - - - - Returns the status for setting the specified credential. - - - - - - - - - - Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. - - - - - - - - - Returns the status for the specified credential. - - - - - - - - - - - - - Clear one, one type, or all credentials except ProgrammingPIN credential. - - - - - - - - This command causes the lock device to unlock the door without pulling the latch. - - - - - - - - This command communicates an Aliro Reader configuration to the lock. - - - - - - - - - - - This command clears an existing Aliro Reader configuration for the lock. - - - - - + + LockState + LockType + ActuatorEnabled + + DoorState + + + DoorOpenEvents + + + + + + DoorClosedEvents + + + + + + OpenPeriod + + + + + NumberOfTotalUsersSupported + + NumberOfPINUsersSupported + + NumberOfRFIDUsersSupported + + NumberOfWeekDaySchedulesSupportedPerUser + + NumberOfYearDaySchedulesSupportedPerUser + + NumberOfHolidaySchedulesSupported + + MaxPINCodeLength + + MinPINCodeLength + + MaxRFIDCodeLength + + MinRFIDCodeLength + + CredentialRulesSupport + + NumberOfCredentialsSupportedPerUser + + Language + + + + + LEDSettings + + + + + AutoRelockTime + + + + + SoundVolume + + + + + OperatingMode + + + + SupportedOperatingModes + DefaultConfigurationRegister + + EnableLocalProgramming + + + + + EnableOneTouchLocking + + + + + EnableInsideStatusLED + + + + + EnablePrivacyModeButton + + + + + LocalProgrammingFeatures + + + + + + WrongCodeEntryLimit + + + + + + UserCodeTemporaryDisableTime + + + + + + SendPINOverTheAir + + + + + + RequirePINforRemoteOperation + + + + + + + ExpiringUserTimeout + + + + + + AliroReaderVerificationKey + + + + + AliroReaderGroupIdentifier + + + + + AliroReaderGroupSubIdentifier + + + + + AliroExpeditedTransactionSupportedProtocolVersions + + + + + AliroGroupResolvingKey + + + + + AliroSupportedBLEUWBProtocolVersions + + + + + AliroBLEAdvertisingVersion + + + + NumberOfAliroCredentialIssuerKeysSupported + + NumberOfAliroEndpointKeysSupported + + + + This command causes the lock device to lock the door. + + + + + This command causes the lock device to unlock the door. + + + + + + This command causes the lock device to unlock the door with a timeout parameter. + + + + + + + Set a weekly repeating schedule for a specified user. + + + + + + + + + + + + Retrieve the specific weekly schedule for the specific user. + + + + + + + Returns the weekly repeating schedule data for the specified schedule index. + + + + + + + + + + + + Clear the specific weekly schedule or all weekly schedules for the specific user. + + + + + + + Set a time-specific schedule ID for a specified user. + + + + + + + + + Returns the year day schedule data for the specified schedule and user indexes. + + + + + + + Returns the year day schedule data for the specified schedule and user indexes. + + + + + + + + + Clears the specific year day schedule or all year day schedules for the specific user. + + + + + + + Set the holiday Schedule by specifying local start time and local end time with respect to any Lock Operating Mode. + + + + + + + + + Get the holiday schedule for the specified index. + + + + + + Returns the Holiday Schedule Entry for the specified Holiday ID. + + + + + + + + + Clears the holiday schedule or all holiday schedules. + + + + + + Set User into the lock. + + + + + + + + + + + + Retrieve User. + + + + + + Returns the User for the specified UserIndex. + + + + + + + + + + + + + + Clears a User or all Users. + + + + + + Set a credential (e.g. PIN, RFID, Fingerprint, etc.) into the lock for a new user, existing user, or ProgrammingUser. + + + + + + + + + + + Returns the status for setting the specified credential. + + + + + + + Retrieve the status of a particular credential (e.g. PIN, RFID, Fingerprint, etc.) by index. + + + + + + Returns the status for the specified credential. + + + + + + + + + + Clear one, one type, or all credentials except ProgrammingPIN credential. + + + + + This command causes the lock device to unlock the door without pulling the latch. + + + + + This command communicates an Aliro Reader configuration to the lock. + + + + + + + + This command clears an existing Aliro Reader configuration for the lock. + + + + + + + The door lock cluster provides several alarms which can be sent when there is a critical state on the door lock. + + + + + The door lock server sends out a DoorStateChange event when the door lock door state changes. + + + + The door lock server sends out a LockOperation event when the event is triggered by the various lock operation sources. + + + + + + + + + + The door lock server sends out a LockOperationError event when a lock operation fails for various reasons. + + + + + + + + + + + The door lock server sends out a LockUserChange event when a lock user, schedule, or credential change has occurred. + + + + + + + + + + + + + + + + + + + + + + + - - - The door lock cluster provides several alarms which can be sent when there is a critical state on the door lock. - - - - - - The door lock server sends out a DoorStateChange event when the door lock door state changes. - - - - - - - The door lock server sends out a LockOperation event when the event is triggered by the various lock operation sources. - - - - - - - - - - - The door lock server sends out a LockOperationError event when a lock operation fails for various reasons. - - - - - - - - - - - - The door lock server sends out a LockUserChange event when a lock user, schedule, or credential change has occurred. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + - + @@ -1038,7 +796,7 @@ limitations under the License. - + @@ -1050,7 +808,7 @@ limitations under the License. - + @@ -1066,7 +824,7 @@ limitations under the License. - + @@ -1078,7 +836,7 @@ limitations under the License. - + @@ -1088,7 +846,7 @@ limitations under the License. - + @@ -1100,7 +858,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml index d7e04ccf464668..d64bce1c85b7f6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml @@ -199,41 +199,21 @@ limitations under the License. - - LoadControlPrograms - - - - NumberOfLoadControlPrograms - - - - Events - - - - ActiveEvents - - - - NumberOfEventsPerProgram - - - - NumberOfTransitions - - - + LoadControlPrograms + NumberOfLoadControlPrograms + Events + ActiveEvents + NumberOfEventsPerProgram + NumberOfTransitions + DefaultRandomStart - DefaultRandomDuration - @@ -241,21 +221,18 @@ limitations under the License. Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values. - Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID. - On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event. - @@ -263,7 +240,6 @@ limitations under the License. - - diff --git a/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml index 3fbd9e984fc2a0..eb05052538d2de 100644 --- a/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml @@ -42,71 +42,25 @@ limitations under the License. - - Accuracy - - - - CumulativeEnergyImported - - - - - - - + Accuracy + CumulativeEnergyImported - - CumulativeEnergyExported - - - - - - - + CumulativeEnergyExported - - PeriodicEnergyImported - - - - - - - + PeriodicEnergyImported - - PeriodicEnergyExported - - - - - - - - - CumulativeEnergyReset - - - - + PeriodicEnergyExported + CumulativeEnergyReset CumulativeEnergyMeasured - - - PeriodicEnergyMeasured - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml index 18ee20bad30481..7f49a643d1b1f9 100644 --- a/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml @@ -51,124 +51,40 @@ limitations under the License. - - PowerMode - - - - NumberOfMeasurementTypes - - - - Accuracy - - - - Ranges - - - - Voltage - - + PowerMode + NumberOfMeasurementTypes + Accuracy + Ranges + Voltage - - ActiveCurrent - - + ActiveCurrent - - ReactiveCurrent - - - - - - ApparentCurrent - - - - + ReactiveCurrent + ApparentCurrent - - ActivePower - - + ActivePower - - ReactivePower - - - - + ReactivePower - - ApparentPower - - - - + ApparentPower - - RMSVoltage - - - - + RMSVoltage - - RMSCurrent - - - - + RMSCurrent - - RMSPower - - - - + RMSPower - - Frequency - - - - + Frequency - - HarmonicCurrents - - - - + HarmonicCurrents - - HarmonicPhases - - - - + HarmonicPhases - - PowerFactor - - - - - - NeutralCurrent - - - - + PowerFactor + NeutralCurrent MeasurementPeriodRanges - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml index 97709d706abf4d..7a4a40d2e39966 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml @@ -128,139 +128,53 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - State - - - - SupplyState - - - - FaultState - - - - ChargingEnabledUntil - - + State + SupplyState + FaultState + ChargingEnabledUntil - - DischargingEnabledUntil - - - - - - CircuitCapacity - - - - MinimumChargeCurrent - - - - MaximumChargeCurrent - - + DischargingEnabledUntil + CircuitCapacity + MinimumChargeCurrent + MaximumChargeCurrent - - MaximumDischargeCurrent - - - - + MaximumDischargeCurrent UserMaximumChargeCurrent - RandomizationDelayWindow - - - NextChargeStartTime - - - - + NextChargeStartTime - - NextChargeTargetTime - - - - + NextChargeTargetTime - - NextChargeRequiredEnergy - - - - + NextChargeRequiredEnergy - - NextChargeTargetSoC - - - - + NextChargeTargetSoC ApproximateEVEfficiency - - - - - StateOfCharge - - - - + StateOfCharge - - BatteryCapacity - - - - + BatteryCapacity - - VehicleID - - - - - - SessionID - - - - SessionDuration - - - - SessionEnergyCharged - - + VehicleID + SessionID + SessionDuration + SessionEnergyCharged - - SessionEnergyDischarged - - - - + SessionEnergyDischarged Allows a client to disable the EVSE from charging and discharging. - @@ -268,57 +182,39 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 This command allows a client to enable the EVSE to charge an EV, and to provide or update the maximum and minimum charge current. - Upon receipt, this SHALL allow a client to enable the discharge of an EV, and to provide or update the maximum discharge current. - - - Allows a client to put the EVSE into a self-diagnostics mode. - Allows a client to set the user specified charging targets. - - - Allows a client to retrieve the current set of charging targets. - - - Allows a client to clear all stored charging targets. - - - The GetTargetsResponse is sent in response to the GetTargets Command. - - - This event SHALL be generated when the EV is plugged in. - @@ -328,7 +224,6 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - @@ -337,7 +232,6 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - @@ -347,7 +241,6 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - @@ -356,15 +249,11 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - This event SHALL be generated when a RFID card has been read. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml index 7c4ddac9f6f09b..b28daf8899636c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml @@ -59,26 +59,18 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode This command is used to change device modes. - This command is sent by the device on receipt of the ChangeToMode command. - diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml index cf646ab0197be5..a5e1ea8e950ae1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-preference-cluster.xml @@ -34,47 +34,26 @@ limitations under the License. - - EnergyBalances - - - - - + EnergyBalances + - - CurrentEnergyBalance + - - - + CurrentEnergyBalance - - EnergyPriorities - - - - + EnergyPriorities - - LowPowerModeSensitivities - - - - + LowPowerModeSensitivities - + CurrentLowPowerModeSensitivity - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml index d84f017f5eea00..f2cf3173c68b29 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml @@ -37,69 +37,26 @@ limitations under the License. The Ethernet Network Diagnostics Cluster provides 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. - - - - - - - - - - PHYRate + - - - FullDuplex + + - - - PacketRxCount - - - - - - PacketTxCount - - - - - - TxErrCount - - - - - - CollisionCount - - - - - - OverrunCount - - - - - - CarrierDetect - - - - TimeSinceReset - - + + + + PHYRate + FullDuplex + PacketRxCount + PacketTxCount + TxErrCount + CollisionCount + OverrunCount + CarrierDetect + TimeSinceReset Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml index 5e4b1734efb46e..96e420f01902de 100644 --- a/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/fixed-label-cluster.xml @@ -31,9 +31,6 @@ limitations under the License. FIXED_LABEL_CLUSTER The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only labels. - - LabelList - - + LabelList diff --git a/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml index b5336b50ad6406..3e546e968514ea 100644 --- a/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/flow-measurement-cluster.xml @@ -24,22 +24,10 @@ limitations under the License. FLOW_MEASUREMENT_CLUSTER true true - - MeasuredValue - - - - MinMeasuredValue - - - - MaxMeasuredValue - - - - Tolerance - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + Tolerance diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index e8877b5c1cc9d9..167f7d13e322af 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -56,86 +56,41 @@ limitations under the License. Breadcrumb - - - BasicCommissioningInfo - - - - RegulatoryConfig - - - - LocationCapability - - - - SupportsConcurrentConnection - - - + BasicCommissioningInfo + RegulatoryConfig + LocationCapability + SupportsConcurrentConnection + TCAcceptedVersion - - - - - - TCMinRequiredVersion - - - - - - TCAcknowledgements - - - - - - TCAcknowledgementsRequired - - - - - - TCUpdateDeadline - - - - - - Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock - Success/failure response for ArmFailSafe command - Set the regulatory configuration to be used during commissioning @@ -143,46 +98,30 @@ limitations under the License. - Success/failure response for SetRegulatoryConfig command - Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. - Indicates to client whether CommissioningComplete command succeeded - This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. - - - - - - This command is used to convey the result from SetTCAcknowledgements. - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 9383517eb95a5b..26f0e5708dd280 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -92,44 +92,17 @@ limitations under the License. - - NetworkInterfaces - - - - RebootCount - - + NetworkInterfaces + RebootCount - - UpTime - - - - TotalOperationalHours - - - - BootReason - - - - ActiveHardwareFaults - - - - ActiveRadioFaults - - - - ActiveNetworkFaults - - - - TestEventTriggersEnabled - - + UpTime + TotalOperationalHours + BootReason + ActiveHardwareFaults + ActiveRadioFaults + ActiveNetworkFaults + TestEventTriggersEnabled - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IdleModeDuration - - - - ActiveModeDuration - - - - ActiveModeThreshold - - - - RegisteredClients - - - - - - - ICDCounter - - - - - - - ClientsSupportedPerFabric - - - - - - UserActiveModeTriggerHint - - - - - - - - - UserActiveModeTriggerInstruction - - - - OperatingMode - - - - - - - - - MaximumCheckInBackOff - - - - - - - Register a client to the end device - - - - - - - - - - - - - RegisterClient response command - - - - - - - - Unregister a client from an end device - - - - - - - - - - Request the end device to stay in Active Mode for an additional ActiveModeThreshold - - - - - - - - - - - - StayActiveRequest response command - - - - - - - - - + + General + ICD Management + 0x0046 + ICD_MANAGEMENT_CLUSTER + Allows servers to ensure that listed clients are notified when a server is available for communication. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +> +> +> +> +> + + + + + + IdleModeDuration + ActiveModeDuration + ActiveModeThreshold + + RegisteredClients + + + + ICDCounter + + + ClientsSupportedPerFabric + UserActiveModeTriggerHint + UserActiveModeTriggerInstruction + OperatingMode + MaximumCheckInBackOff + + + Register a client to the end device + + + + + + + + + + RegisterClient response command + + + + + Unregister a client from an end device + + + + + + + Request the end device to stay in Active Mode for an additional ActiveModeThreshold + + + + + + StayActiveRequest response command + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml index 27b94701fc3d07..b64eb7702f1517 100644 --- a/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml @@ -51,23 +51,16 @@ limitations under the License. true true - - - IdentifyTime - - - - IdentifyType - - - + + IdentifyTime + IdentifyType + Command description for Identify - @@ -76,7 +69,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml index 22dcca9d5775fe..b744964ca0a9aa 100644 --- a/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/illuminance-measurement-cluster.xml @@ -18,34 +18,19 @@ limitations under the License. - Illuminance Measurement - Measurement & Sensing - Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. - 0x0400 - ILLUMINANCE_MEASUREMENT_CLUSTER - true - true - - - MeasuredValue - - - - MinMeasuredValue - - - - MaxMeasuredValue - - - - Tolerance - - - - LightSensorType - - + Illuminance Measurement + Measurement & Sensing + Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. + 0x0400 + ILLUMINANCE_MEASUREMENT_CLUSTER + true + true + + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + Tolerance + LightSensorType diff --git a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml index c21a58ca0f0fbf..b43ace5c0c8383 100644 --- a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml @@ -40,13 +40,11 @@ limitations under the License. Upon receipt, this SHALL process a keycode as input to the media device. - This command SHALL be generated in response to a SendKey Request command. - diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml index 171eb5cb91ee44..f126d8836f720c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-dryer-controls-cluster.xml @@ -36,15 +36,9 @@ limitations under the License. This cluster provides a way to access options associated with the operation of a laundry dryer device type. - - - - SupportedDrynessLevels - - - - SelectedDrynessLevel - - - + + + SupportedDrynessLevels + SelectedDrynessLevel + diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml index e3778d2d938b60..b8afd87d76665c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml @@ -58,17 +58,11 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode StartUpMode OnMode - + @@ -76,7 +70,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -85,7 +78,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml index 8d2326e01fb278..4d0e67ddbd1b47 100644 --- a/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml @@ -61,77 +61,25 @@ limitations under the License. - - CurrentLevel - - - - RemainingTime - - - - - - MinLevel - - - - - - - - MaxLevel - - - - CurrentFrequency - - - - - - MinFrequency - - - - - - MaxFrequency - - - - - - OnOffTransitionTime - - - - OnLevel - - - - OnTransitionTime - - - - OffTransitionTime - - - - DefaultMoveRate - - - - Options - - - + + CurrentLevel + RemainingTime + MinLevel + MaxLevel + CurrentFrequency + MinFrequency + MaxFrequency + + OnOffTransitionTime + OnLevel + OnTransitionTime + OffTransitionTime + DefaultMoveRate + Options + StartUpCurrentLevel - - - @@ -142,7 +90,6 @@ limitations under the License. - @@ -153,7 +100,6 @@ limitations under the License. - @@ -165,7 +111,6 @@ limitations under the License. - @@ -174,7 +119,6 @@ limitations under the License. - @@ -185,7 +129,6 @@ limitations under the License. - @@ -196,7 +139,6 @@ limitations under the License. - @@ -208,7 +150,6 @@ limitations under the License. - @@ -217,7 +158,6 @@ limitations under the License. - @@ -226,9 +166,6 @@ limitations under the License. approximation if the exact provided one is not possible. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml index 34e81bbb445d0e..9bdededd0fcd6e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/localization-configuration-cluster.xml @@ -31,11 +31,7 @@ limitations under the License. ActiveLocale - - - - SupportedLocales - + SupportedLocales diff --git a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml index 4b9ea09104994e..c1cc5b38ede202 100644 --- a/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/low-power-cluster.xml @@ -26,7 +26,6 @@ limitations under the License. This cluster provides an interface for managing low power mode on a device. This command shall put the device into low power mode. - diff --git a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml index 57fdda3bc7cb7f..597b285cc1b5dd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-input-cluster.xml @@ -32,29 +32,20 @@ limitations under the License. - - InputList - - - - CurrentInput - - + InputList + CurrentInput Upon receipt, this SHALL change the input on the media device to the input at a specific index in the Input List. - Upon receipt, this SHALL display the active status of the input list on screen. - Upon receipt, this SHALL hide the input list from the screen. - @@ -62,9 +53,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml index 1c4f2e37c8e42b..a77b8fa4befb4c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/media-playback-cluster.xml @@ -46,167 +46,87 @@ limitations under the License. - - CurrentState - - - - StartTime - - - - - - Duration - - - - - - SampledPosition - - - - - - PlaybackSpeed - - - - - - SeekRangeEnd - - - - - - SeekRangeStart - - - - - - ActiveAudioTrack - - - - - - AvailableAudioTracks - - - - - - ActiveTextTrack - - - - - - AvailableTextTracks - - - - + CurrentState + StartTime + Duration + SampledPosition + PlaybackSpeed + SeekRangeEnd + SeekRangeStart + ActiveAudioTrack + AvailableAudioTracks + ActiveTextTrack + AvailableTextTracks Upon receipt, this SHALL play media. - Upon receipt, this SHALL pause media. - Upon receipt, this SHALL stop media. User experience is context-specific. This will often navigate the user back to the location where media was originally launched. - Upon receipt, this SHALL Start Over with the current media playback item. - Upon receipt, this SHALL cause the handler to be invoked for "Previous". User experience is context-specific. This will often Go back to the previous media playback item. - Upon receipt, this SHALL cause the handler to be invoked for "Next". User experience is context-specific. This will often Go forward to the next media playback item. - Upon receipt, this SHALL Rewind through media. Different Rewind speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). - - - Upon receipt, this SHALL Advance through media. Different FF speeds can be used on the TV based upon the number of sequential calls to this function. This is to avoid needing to define every speed now (multiple fast, slow motion, etc). - - - Upon receipt, this SHALL Skip forward in the media by the given number of seconds, using the data as follows: - Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: - Upon receipt, this SHALL Skip backward in the media by the given number of seconds, using the data as follows: - - - This command SHALL be generated in response to various Playback Request commands. - Upon receipt, the server SHALL set the active Audio Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server will return an error status of INVALID_ARGUMENT. - - - Upon receipt, the server SHALL set the active Text Track to the one identified by the TrackID in the Track catalog for the streaming media. If the TrackID does not exist in the Track catalog, OR does not correspond to the streaming media OR no media is being streamed at the time of receipt of this command, the server SHALL return an error status of INVALID_ARGUMENT. - - - If a Text Track is active (i.e. being displayed), upon receipt of this command, the server SHALL stop displaying it. - - - @@ -220,7 +140,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml index 901e63703eee1f..741ba801f5c092 100644 --- a/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/messages-cluster.xml @@ -91,14 +91,8 @@ limitations under the License. - - Messages - - - - ActiveMessageIDs - - + Messages + ActiveMessageIDs Command for requesting messages be presented @@ -110,24 +104,20 @@ limitations under the License. - Command for cancelling message present requests - This event SHALL be generated when the message is confirmed by the user, or when the expiration date of the message is reached. - This event SHALL be generated when the message is presented to the user. - This event SHALL be generated when the message is confirmed by the user, or when the expiration date of the message is reached. @@ -135,7 +125,6 @@ limitations under the License. - - + \ No newline at end of file diff --git a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml index fd44e47c2ca767..954bd898b6aa00 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml @@ -41,74 +41,27 @@ limitations under the License. - - CookTime - - - - MaxCookTime - - - - PowerSetting - - - - - - MinPower - - - - - - MaxPower - - - - - - PowerStep - - - - - - SupportedWatts - - - - - - - - - SelectedWattIndex - - - - - - - - - WattRating - - - + CookTime + MaxCookTime + PowerSetting + MinPower + MaxPower + PowerStep + SupportedWatts + SelectedWattIndex + WattRating + - Set Cooking Parameters + Set Cooking Parameters - - Add More Cooking Time - - + Add More Cooking Time + diff --git a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml index 393354fb4ca461..856fde36da15ee 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml @@ -55,13 +55,7 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml index 80e0267155496b..443acb1c955c36 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-select-cluster.xml @@ -48,39 +48,19 @@ limitations under the License. Attributes and commands for selecting a mode from a list of supported options. - - Description - - - - StandardNamespace - - - - SupportedModes - - - - CurrentMode - - - - StartUpMode - - - - OnMode - - - - + Description + StandardNamespace + SupportedModes + CurrentMode + StartUpMode + OnMode + On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. - diff --git a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml index 02fcb28ee2e14b..964923be4f2dfa 100644 --- a/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/network-commissioning-cluster.xml @@ -107,207 +107,120 @@ limitations under the License. - - - - + + - + MaxNetworks - - + Networks - - - - ScanMaxTimeSeconds - - - - - - - - ConnectMaxTimeSeconds - - - - - - - - + ScanMaxTimeSeconds + ConnectMaxTimeSeconds + InterfaceEnabled - - + LastNetworkingStatus - - + LastNetworkID - - + LastConnectErrorValue - - + SupportedWiFiBands - - - - + SupportedThreadFeatures - - - - + ThreadVersion - - - - - Detemine the set of networks the device sees as available. - - - - - - - - - - - - Relay the set of networks the device sees as available back to the client. - - - - - - - - - - - - - Add or update the credentials for a given Wi-Fi network. - - - - - - - - - - - - - Add or update the credentials for a given Thread network. - - - - - - - - - Remove the definition of a given network (including its credentials). - - - - - - - - - - - - Response command for various commands that add/remove/modify network credentials. - - - - - - - - - - - - - - Connect to the specified network, using previously-defined credentials. - - - - - - - - - - - - Command that indicates whether we have succcessfully connected to a network. - - - - - - - - - - - - Modify the order in which networks will be presented in the Networks attribute. - - - - - - - - - - - - - Retrieve details about and optionally proof of possession of a network client identity. - - - - - - - - - Command that contains details about a network client identity and optionally a proof of possession. - - - - - - - + + Detemine the set of networks the device sees as available. + + + + + + Relay the set of networks the device sees as available back to the client. + + + + + + + Add or update the credentials for a given Wi-Fi network. + + + + + + + + + + Add or update the credentials for a given Thread network. + + + + + + Remove the definition of a given network (including its credentials). + + + + + + Response command for various commands that add/remove/modify network credentials. + + + + + + + + Connect to the specified network, using previously-defined credentials. + + + + + + Command that indicates whether we have succcessfully connected to a network. + + + + + + Modify the order in which networks will be presented in the Networks attribute. + + + + + + + Retrieve details about and optionally proof of possession of a network client identity. + + + + + + Command that contains details about a network client identity and optionally a proof of possession. + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml index 90f1a6a9f497a7..0141a7542f4d78 100644 --- a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml @@ -83,288 +83,74 @@ limitations under the License. - - Occupancy - - - - OccupancySensorType - - - - - - - OccupancySensorTypeBitmap - - - - - + Occupancy + OccupancySensorType + OccupancySensorTypeBitmap - HoldTime - - + HoldTime + - - HoldTimeLimits - - - - - + HoldTimeLimits + PIROccupiedToUnoccupiedDelay - - - - - - - - - - - - - - - - - - - - - - PIRUnoccupiedToOccupiedDelay - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PIRUnoccupiedToOccupiedThreshold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UltrasonicOccupiedToUnoccupiedDelay - - - - - - - - - UltrasonicUnoccupiedToOccupiedDelay - - - - - - - - - - - - - - - - UltrasonicUnoccupiedToOccupiedThreshold - - - - - - - - - - - - - - - - PhysicalContactOccupiedToUnoccupiedDelay - - - - - - - - - PhysicalContactUnoccupiedToOccupiedDelay - - - - - - - - - - - - - - - - PhysicalContactUnoccupiedToOccupiedThreshold - - - - - - - - - - - - - - - - If this event is supported, it SHALL be generated when the Occupancy attribute changes. - diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index c1e87fd1ceb37d..04dcfed83766e8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -81,75 +81,37 @@ limitations under the License. - - - OnOff - - - - GlobalSceneControl - - - - - - OnTime - - - - - - OffWaitTime - - - - - + + OnOff + GlobalSceneControl + OnTime + OffWaitTime + StartUpOnOff - - - On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. - On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. - - - - - On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. - - - - - The OffWithEffect command allows devices to be turned off using enhanced ways of fading. - - - The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. - - - @@ -157,9 +119,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index 8be3ce077a2732..5b06c93e0ab7fd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -62,54 +62,34 @@ limitations under the License. NOCs - - - - Fabrics - - - - SupportedFabrics - - - - CommissionedFabrics - - - - TrustedRootCertificates - - - - CurrentFabricIndex - + Fabrics + SupportedFabrics + CommissionedFabrics + TrustedRootCertificates + CurrentFabricIndex Sender is requesting attestation information from the receiver. - An attestation information confirmation from the server. - Sender is requesting a device attestation certificate from the receiver. - A device attestation certificate (DAC) or product attestation intermediate (PAI) certificate from the server. - @@ -117,7 +97,6 @@ limitations under the License. - @@ -125,7 +104,6 @@ limitations under the License. A certificate signing request (CSR) from the server. - @@ -136,7 +114,6 @@ limitations under the License. - @@ -144,36 +121,31 @@ limitations under the License. - - + Response to AddNOC or UpdateNOC commands. - This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. - This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. - This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. - diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml index 9bc60ae2f73fef..53b9c73cad6b3e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml @@ -58,94 +58,47 @@ limitations under the License. true true This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. - - - - - PhaseList - - - - CurrentPhase - - - - CountdownTime - - - - OperationalStateList - - - - OperationalState - - - - OperationalError - - - + + + + PhaseList + CurrentPhase + CountdownTime + OperationalStateList + OperationalState + OperationalError + Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. - - - - - - Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. - - - - - - Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. - Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). - - - - - - This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. - - - - - - - - OperationalError - - + OperationCompletion - - + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml index 800506d73c6079..fd52204b02fe85 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml @@ -53,31 +53,13 @@ limitations under the License. This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. - - - PhaseList - - - - CurrentPhase - - - - CountdownTime - - - - OperationalStateList - - - - OperationalState - - - - OperationalError - - + + PhaseList + CurrentPhase + CountdownTime + OperationalStateList + OperationalState + OperationalError Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. @@ -85,17 +67,10 @@ limitations under the License. Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. - - - - - - Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. - @@ -105,28 +80,18 @@ limitations under the License. This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. - - - - - - - - OperationalError - - + OperationCompletion - - + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index 3c762879309e5c..e3b054fe3fedce 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -64,48 +64,24 @@ limitations under the License. true true This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. - - - - - PhaseList - - - - CurrentPhase - - - - CountdownTime - - - - OperationalStateList - - - - - - OperationalState - - - - OperationalError - - + OperationalState + OperationalError Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. - - - - - - @@ -114,47 +90,27 @@ both values from this cluster and from the base cluster. Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). - - - - - - This command SHALL be generated in response to any of the Start, Stop, Pause, or Resume commands. - - - - - - - - On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. - - - - OperationalError - - + - + OperationCompletion - - - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml index 8a54783445013f..0faa1b037eb318 100644 --- a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml @@ -62,17 +62,11 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode StartUpMode OnMode - + @@ -80,7 +74,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -89,7 +82,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml index 8bbfe444227f1d..5701dc6ec61e65 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml @@ -43,222 +43,58 @@ limitations under the License. - - - Status - - - - Order - - - - Description - - - - - WiredAssessedInputVoltage - - - - - - WiredAssessedInputFrequency - - - - - - WiredCurrentType - - - - - - WiredAssessedCurrent - - - - - - WiredNominalVoltage - - - - - - WiredMaximumCurrent - - - - - - WiredPresent - - - - - - ActiveWiredFaults - - - - - - - BatVoltage - - - - - - BatPercentRemaining - - - - - - BatTimeRemaining - - - - - - BatChargeLevel - - - - - - BatReplacementNeeded - - - - - - BatReplaceability - - - - - - BatPresent - - - - - - ActiveBatFaults - - - - - - BatReplacementDescription - - - - - - BatCommonDesignation - - - - - - BatANSIDesignation - - - - - - BatIECDesignation - - - - - - BatApprovedChemistry - - - - - - BatCapacity - - - - - - - - - BatQuantity - - - - - - BatChargeState - - - - - - BatTimeToFullCharge - - - - - - BatFunctionalWhileCharging - - - - - - BatChargingCurrent - - - - - - ActiveBatChargeFaults - - - - - - EndpointList - - + Status + Order + Description + + WiredAssessedInputVoltage + WiredAssessedInputFrequency + WiredCurrentType + WiredAssessedCurrent + WiredNominalVoltage + WiredMaximumCurrent + WiredPresent + ActiveWiredFaults + + BatVoltage + BatPercentRemaining + BatTimeRemaining + BatChargeLevel + BatReplacementNeeded + BatReplaceability + BatPresent + ActiveBatFaults + BatReplacementDescription + BatCommonDesignation + BatANSIDesignation + BatIECDesignation + BatApprovedChemistry + BatCapacity + BatQuantity + BatChargeState + BatTimeToFullCharge + BatFunctionalWhileCharging + BatChargingCurrent + ActiveBatChargeFaults + EndpointList + The WiredFaultChange Event SHALL indicate a change in the set of wired faults currently detected by the Node on this wired power source. - - - The BatFaultChange Event SHALL indicate a change in the set of battery faults currently detected by the Node on this battery power source. - - - The BatChargeFaultChange Event SHALL indicate a change in the set of charge faults currently detected by the Node on this battery power source. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml index ba97841d3492e0..04a7cdb121c775 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml @@ -26,9 +26,6 @@ limitations under the License. true true - - Sources - - + Sources diff --git a/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml index c686115edcb8cb..3bca0bd43ee8af 100644 --- a/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml @@ -44,17 +44,7 @@ limitations under the License. - - AvailableEndpoints - - - - - - ActiveEndpoints - - - - + AvailableEndpoints + ActiveEndpoints diff --git a/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml index 04100e82379f2d..f9487af7f3a9e2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml @@ -31,53 +31,16 @@ limitations under the License. - - - MeasuredValue - - - - MinMeasuredValue - - - - MaxMeasuredValue - - - - Tolerance - - - - ScaledValue - - - - - - MinScaledValue - - - - - - MaxScaledValue - - - - - - ScaledTolerance - - - - - - Scale - - - - + + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + Tolerance + ScaledValue + MinScaledValue + MaxScaledValue + ScaledTolerance + Scale diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index b23ad516515b11..74416092e7c7f8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -49,245 +49,97 @@ limitations under the License. - - - MaxPressure - - - - MaxSpeed - - - - MaxFlow - - - - MinConstPressure - - - - - - - - - - - MaxConstPressure - - - - - - - - - - - MinCompPressure - - - - - - - - - - - MaxCompPressure - - - - - - - - - - - MinConstSpeed - - - - - - - - - - - MaxConstSpeed - - - - - - - - - - - MinConstFlow - - - - - - - - - - - MaxConstFlow - - - - - - - - - - - MinConstTemp - - - - - - - - - - - MaxConstTemp - - - - - - - - - - - PumpStatus - - - - EffectiveOperationMode - - - - EffectiveControlMode - - - - Capacity - - - - Speed - - + + MaxPressure + MaxSpeed + MaxFlow + MinConstPressure + MaxConstPressure + MinCompPressure + MaxCompPressure + MinConstSpeed + MaxConstSpeed + MinConstFlow + MaxConstFlow + MinConstTemp + MaxConstTemp + PumpStatus + EffectiveOperationMode + EffectiveControlMode + Capacity + Speed LifetimeRunningHours - - - - Power - + Power LifetimeEnergyConsumed - OperationMode - ControlMode - SupplyVoltageLow - SupplyVoltageHigh - PowerMissingPhase - SystemPressureLow - SystemPressureHigh - DryRunning - MotorTemperatureHigh - PumpMotorFatalFailure - ElectronicTemperatureHigh - PumpBlocked - SensorFailure - ElectronicNonFatalFailure - ElectronicFatalFailure - GeneralFault - Leakage - AirDetection - TurbineOperation - diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml index deeb16b4dae3d7..58fa70163f65ea 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml @@ -28,27 +28,17 @@ limitations under the License. REFRIGERATOR_ALARM_CLUSTER true true - - - Mask - - - - State - - - - Supported - - + + Mask + State + Supported - Notify - - - - - + Notify + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml index a4fe78bc225d65..e29080ce4a43cb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml @@ -56,17 +56,11 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode StartUpMode OnMode - + @@ -74,7 +68,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -83,7 +76,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml index 7f8157572a4270..e309b75dcc46bd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml @@ -25,21 +25,9 @@ limitations under the License. true true - - MeasuredValue - - - - MinMeasuredValue - - - - MaxMeasuredValue - - - - Tolerance - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + Tolerance diff --git a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml index 25e586226f0d82..66de9ee66cbebd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml @@ -38,41 +38,16 @@ limitations under the License. - - Condition - - - - - - DegradationDirection - - - - - - ChangeIndication - - - - InPlaceIndicator - - - - LastChangedTime - - - - ReplacementProductList - - - - - + Condition + DegradationDirection + ChangeIndication + InPlaceIndicator + LastChangedTime + ReplacementProductList + Reset the condition of the replaceable to the non degraded state - @@ -98,41 +73,16 @@ limitations under the License. - - Condition - - - - - - DegradationDirection - - - - - - ChangeIndication - - - - InPlaceIndicator - - - - LastChangedTime - - - - ReplacementProductList - - - - - + Condition + DegradationDirection + ChangeIndication + InPlaceIndicator + LastChangedTime + ReplacementProductList + Reset the condition of the replaceable to the non degraded state - diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index a1fe4809ee1e17..65c2f17a3e8e75 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -67,14 +67,8 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode @@ -84,7 +78,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -93,7 +86,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index 6cd765db7fab84..ce835576396bb8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -73,14 +73,8 @@ limitations under the License. - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode @@ -90,7 +84,6 @@ limitations under the License. On receipt of this command the device SHALL respond with a ChangeToModeResponse command. - @@ -99,7 +92,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/scene.xml b/src/app/zap-templates/zcl/data-model/chip/scene.xml index dcc929fa47e872..b6315bdc1287c1 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -80,19 +80,10 @@ limitations under the License. - - LastConfiguredBy - - - - SceneTableSize - - - - FabricSceneInfo - - - + + LastConfiguredBy + SceneTableSize + FabricSceneInfo Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeID": VALUE, "Value*": VALUE}]}' @@ -103,7 +94,6 @@ limitations under the License. - @@ -112,7 +102,6 @@ limitations under the License. - @@ -122,7 +111,6 @@ limitations under the License. - @@ -131,7 +119,6 @@ limitations under the License. - @@ -141,7 +128,6 @@ limitations under the License. - @@ -151,7 +137,6 @@ limitations under the License. - @@ -159,7 +144,6 @@ limitations under the License. Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group - @@ -171,7 +155,6 @@ limitations under the License. - @@ -181,7 +164,6 @@ limitations under the License. - @@ -194,7 +176,6 @@ limitations under the License. - @@ -204,7 +185,6 @@ limitations under the License. - @@ -213,7 +193,6 @@ limitations under the License. - @@ -223,7 +202,6 @@ limitations under the License. - @@ -234,7 +212,6 @@ limitations under the License. - @@ -244,9 +221,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml index c442136d46aa0a..8c2ba832c85604 100644 --- a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml @@ -96,43 +96,19 @@ limitations under the License. - - SupportedAreas - - - - SupportedMaps - - - - - - SelectedAreas - - - - CurrentArea - - - EstimatedEndTime - - - - - - Progress - - - - - + SupportedAreas + SupportedMaps + SelectedAreas + CurrentArea + EstimatedEndTime + Progress + Command used to select a set of device areas, where the device is to operate. - @@ -141,7 +117,6 @@ limitations under the License. - @@ -157,9 +132,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml index a0543e04373dd5..31ae0bba9e7d99 100644 --- a/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/smoke-co-alarm-cluster.xml @@ -46,131 +46,66 @@ limitations under the License. - - ExpressedState - - - - SmokeState - - - - - - COState - - - - - - BatteryAlert - - - - DeviceMuted - - - - TestInProgress - - - - HardwareFaultAlert - - - - EndOfServiceAlert - - - - InterconnectSmokeAlarm - - - - InterconnectCOAlarm - - - - ContaminationState - - - - + ExpressedState + SmokeState + COState + BatteryAlert + DeviceMuted + TestInProgress + HardwareFaultAlert + EndOfServiceAlert + InterconnectSmokeAlarm + InterconnectCOAlarm + ContaminationState SmokeSensitivityLevel - - - - - - ExpiryDate - - + ExpiryDate + This command SHALL initiate a device self-test. - This event SHALL be generated when SmokeState attribute changes to either Warning or Critical state. - - - This event SHALL be generated when COState attribute changes to either Warning or Critical state. - - - This event SHALL be generated when BatteryAlert attribute changes to either Warning or Critical state. - This event SHALL be generated when the device detects a hardware fault that leads to setting HardwareFaultAlert to True. - This event SHALL be generated when the EndOfServiceAlert is set to Expired. - This event SHALL be generated when the SelfTest completes, and the attribute TestInProgress changes to False. - This event SHALL be generated when the DeviceMuted attribute changes to Muted. - This event SHALL be generated when DeviceMuted attribute changes to NotMuted. - This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. - - - This event SHALL be generated when the device hosting the server receives a smoke alarm from an interconnected sensor. - - - This event SHALL be generated when ExpressedState attribute returns to Normal state. - diff --git a/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml index d0973998fa98d6..3ac2ba42e8e22e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml @@ -37,38 +37,20 @@ limitations under the License. - - ThreadMetrics - - - - CurrentHeapFree - - - - CurrentHeapUsed - - - - CurrentHeapHighWatermark - - - - + ThreadMetrics + CurrentHeapFree + CurrentHeapUsed + CurrentHeapHighWatermark Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. - - - Indicate the last software fault that has taken place on the Node. - - + diff --git a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml index 90f61cdedcfbc8..176163fae7fce6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml @@ -78,75 +78,38 @@ Interactions with the switch device are exposed as attributes (for the latching - - NumberOfPositions - - - - CurrentPosition - - - - MultiPressMax - - - - + NumberOfPositions + CurrentPosition + MultiPressMax SwitchLatched - - - InitialPress - - - LongPress - - - ShortRelease - - - LongRelease - - - MultiPressOngoing - - - - - - - - MultiPressComplete - - - - + diff --git a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml index c7d516bcdc7416..bc665905df1eb2 100644 --- a/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml @@ -25,27 +25,19 @@ limitations under the License. true This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. - - TargetList - - - - CurrentTarget - - - + TargetList + CurrentTarget + Upon receipt, this SHALL navigation the UX to the target identified. - This command SHALL be generated in response to NavigateTarget commands. - @@ -53,7 +45,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml index 2c7c173c6af8ff..da0c0bcee983bb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml @@ -40,48 +40,17 @@ limitations under the License. - - TemperatureSetpoint - - - - - - MinTemperature - - - - - - MaxTemperature - - - - - - Step - - - - - - SelectedTemperatureLevel - - - - - - SupportedTemperatureLevels - - - - + TemperatureSetpoint + MinTemperature + MaxTemperature + Step + SelectedTemperatureLevel + SupportedTemperatureLevels - Set Temperature - - - + Set Temperature + + diff --git a/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml index 45317b7b433894..d141743fafde56 100644 --- a/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml @@ -24,21 +24,9 @@ limitations under the License. TEMPERATURE_MEASUREMENT_CLUSTER true true - - MeasuredValue - - - - MinMeasuredValue - - - - MaxMeasuredValue - - - - Tolerance - - + MeasuredValue + MinMeasuredValue + MaxMeasuredValue + Tolerance diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 9a409b7a89c1bd..6f75aa45e985f6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -312,368 +312,146 @@ limitations under the License. - - LocalTemperature - - - - OutdoorTemperature - - - - Occupancy - - - - - - AbsMinHeatSetpointLimit - - - - - - AbsMaxHeatSetpointLimit - - - - - - AbsMinCoolSetpointLimit - - - - - - AbsMaxCoolSetpointLimit - - - - - - PICoolingDemand - - - - - - PIHeatingDemand - - - - + LocalTemperature + OutdoorTemperature + Occupancy + AbsMinHeatSetpointLimit + AbsMaxHeatSetpointLimit + AbsMinCoolSetpointLimit + AbsMaxCoolSetpointLimit + PICoolingDemand + PIHeatingDemand HVACSystemTypeConfiguration - LocalTemperatureCalibration - - - - - - - - OccupiedCoolingSetpoint - - - - - - OccupiedHeatingSetpoint - - - - - - UnoccupiedCoolingSetpoint - - - - - - - - - UnoccupiedHeatingSetpoint - - - - - - + OccupiedCoolingSetpoint + OccupiedHeatingSetpoint + UnoccupiedCoolingSetpoint + UnoccupiedHeatingSetpoint MinHeatSetpointLimit - - - MaxHeatSetpointLimit - - - MinCoolSetpointLimit - - - MaxCoolSetpointLimit - - - MinSetpointDeadBand - - - RemoteSensing - ControlSequenceOfOperation - SystemMode - - - - ThermostatRunningMode - - - - - - StartOfWeek - - - - - - NumberOfWeeklyTransitions - - - - - - NumberOfDailyTransitions - - - + ThermostatRunningMode + StartOfWeek + NumberOfWeeklyTransitions + NumberOfDailyTransitions TemperatureSetpointHold - TemperatureSetpointHoldDuration - ThermostatProgrammingOperationMode - - - - ThermostatRunningState - - - - SetpointChangeSource - - - - SetpointChangeAmount - - - - SetpointChangeSourceTimestamp - + ThermostatRunningState + SetpointChangeSource + SetpointChangeAmount + SetpointChangeSourceTimestamp OccupiedSetback - - - - - - OccupiedSetbackMin - - - - - - OccupiedSetbackMax - - - + OccupiedSetbackMin + OccupiedSetbackMax UnoccupiedSetback - - - - - - - - - UnoccupiedSetbackMin - - - - - - - - - UnoccupiedSetbackMax - - - - - - + UnoccupiedSetbackMin + UnoccupiedSetbackMax EmergencyHeatDelta - ACType - ACCapacity - ACRefrigerantType - ACCompressorType - ACErrorCode - ACLouverPosition - - - - ACCoilTemperature - + ACCoilTemperature ACCapacityformat - - - - PresetTypes - - - - - - ScheduleTypes - - - - - - NumberOfPresets - - - - - - NumberOfSchedules - - - - - - NumberOfScheduleTransitions - - - - - - NumberOfScheduleTransitionPerDay - - - - - - ActivePresetHandle - - - - - - ActiveScheduleHandle - - - + PresetTypes + ScheduleTypes + NumberOfPresets + NumberOfSchedules + NumberOfScheduleTransitions + NumberOfScheduleTransitionPerDay + ActivePresetHandle + ActiveScheduleHandle Presets - - - Schedules - - - - - - SetpointHoldExpiryTimestamp - + SetpointHoldExpiryTimestamp Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. - @@ -683,42 +461,27 @@ limitations under the License. - - - The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. - - - This command is used to clear the weekly schedule. - - - Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. - - - ID - - - @@ -728,9 +491,6 @@ limitations under the License. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml index a95a9a31f32d9e..cd3491cc079024 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml @@ -29,23 +29,18 @@ limitations under the License. - - TemperatureDisplayMode - - - - + TemperatureDisplayMode + + KeypadLockout - ScheduleProgrammingVisibility - diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml index 84132e495cf4c0..d05ce70c34aca3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-border-router-management-cluster.xml @@ -33,52 +33,31 @@ limitations under the License. - - BorderRouterName - - - - - BorderAgentID - - - - - ThreadVersion - - - - - InterfaceEnabled - - - - - ActiveDatasetTimestamp - - - - - PendingDatasetTimestamp - - - + BorderRouterName + + BorderAgentID + + ThreadVersion + + InterfaceEnabled + + ActiveDatasetTimestamp + + PendingDatasetTimestamp + Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session - Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session - - + Generated response to GetActiveDatasetRequest or GetPendingDatasetRequest commands. - @@ -86,16 +65,12 @@ limitations under the License. - Command set or update the pending Dataset of the Thread network to which the Border Router is connected. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml index 8804d64e30c7c1..77ec8699615156 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml @@ -107,362 +107,82 @@ limitations under the License. - - - Channel - - - - RoutingRole - - - - NetworkName - - - - PanId - - - - ExtendedPanId - - - - MeshLocalPrefix - - - - OverrunCount - - - - - - NeighborTable - - - - RouteTable - - - - PartitionId - - - - Weighting - - - - DataVersion - - - - StableDataVersion - - - - LeaderRouterId - - - - DetachedRoleCount - - - - - - ChildRoleCount - - - - - - RouterRoleCount - - - - - - LeaderRoleCount - - - - - - AttachAttemptCount - - - - - - PartitionIdChangeCount - - - - - - BetterPartitionAttachAttemptCount - - - - - - ParentChangeCount - - - - - - TxTotalCount - - - - - - TxUnicastCount - - - - - - TxBroadcastCount - - - - - - TxAckRequestedCount - - - - - - TxAckedCount - - - - - - TxNoAckRequestedCount - - - - - - TxDataCount - - - - - - TxDataPollCount - - - - - - TxBeaconCount - - - - - - TxBeaconRequestCount - - - - - - TxOtherCount - - - - - - TxRetryCount - - - - - - TxDirectMaxRetryExpiryCount - - - - - - TxIndirectMaxRetryExpiryCount - - - - - - TxErrCcaCount - - - - - - TxErrAbortCount - - - - - - TxErrBusyChannelCount - - - - - - RxTotalCount - - - - - - RxUnicastCount - - - - - - RxBroadcastCount - - - - - - RxDataCount - - - - - - RxDataPollCount - - - - - - RxBeaconCount - - - - - - RxBeaconRequestCount - - - - - - RxOtherCount - - - - - - RxAddressFilteredCount - - - - - - RxDestAddrFilteredCount - - - - - - RxDuplicatedCount - - - - - - RxErrNoFrameCount - - - - - - RxErrUnknownNeighborCount - - - - - - RxErrInvalidSrcAddrCount - - - - - - RxErrSecCount - - - - - - RxErrFcsCount - - - - - - RxErrOtherCount - - - - - - ActiveTimestamp - - - - PendingTimestamp - - - - Delay - - - - SecurityPolicy - - - - ChannelPage0Mask - - - - OperationalDatasetComponents - - - - ActiveNetworkFaultsList - - + + Channel + RoutingRole + NetworkName + PanId + ExtendedPanId + MeshLocalPrefix + OverrunCount + NeighborTable + RouteTable + PartitionId + Weighting + DataVersion + StableDataVersion + LeaderRouterId + DetachedRoleCount + ChildRoleCount + RouterRoleCount + LeaderRoleCount + AttachAttemptCount + PartitionIdChangeCount + BetterPartitionAttachAttemptCount + ParentChangeCount + TxTotalCount + TxUnicastCount + TxBroadcastCount + TxAckRequestedCount + TxAckedCount + TxNoAckRequestedCount + TxDataCount + TxDataPollCount + TxBeaconCount + TxBeaconRequestCount + TxOtherCount + TxRetryCount + TxDirectMaxRetryExpiryCount + TxIndirectMaxRetryExpiryCount + TxErrCcaCount + TxErrAbortCount + TxErrBusyChannelCount + RxTotalCount + RxUnicastCount + RxBroadcastCount + RxDataCount + RxDataPollCount + RxBeaconCount + RxBeaconRequestCount + RxOtherCount + RxAddressFilteredCount + RxDestAddrFilteredCount + RxDuplicatedCount + RxErrNoFrameCount + RxErrUnknownNeighborCount + RxErrInvalidSrcAddrCount + RxErrSecCount + RxErrFcsCount + RxErrOtherCount + ActiveTimestamp + PendingTimestamp + Delay + SecurityPolicy + ChannelPage0Mask + OperationalDatasetComponents + ActiveNetworkFaultsList Reception of this command SHALL reset the OverrunCount attributes to 0 - - - Indicate that a Node’s connection status to a Thread network has changed - Indicate a change in the set of network faults currently detected by the Node - diff --git a/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml index 8f997cebc46d2f..3a6445b15bbad3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thread-network-directory-cluster.xml @@ -15,67 +15,58 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - - - - - + - - Network Infrastructure - Thread Network Directory - 0x0453 - THREAD_NETWORK_DIRECTORY_CLUSTER - Manages the names and credentials of Thread networks visible to the user. + + + + + + + - true - true + + Network Infrastructure + Thread Network Directory + 0x0453 + THREAD_NETWORK_DIRECTORY_CLUSTER + Manages the names and credentials of Thread networks visible to the user. - - - - - PreferredExtendedPanID - - - - - - ThreadNetworks - - - - - ThreadNetworkTableSize - - + true + true - - Adds an entry to the ThreadNetworks list. - - - - - - Removes an entry from the ThreadNetworks list. - - - - - - Retrieves a Thread Operational Dataset from the ThreadNetworks list. - - - - - - This is the response to a GetOperationalDataset request. - - - - + + + + + PreferredExtendedPanID + + + + + ThreadNetworks + + + ThreadNetworkTableSize + + + Adds an entry to the ThreadNetworks list. + + + + + Removes an entry from the ThreadNetworks list. + + + + + Retrieves a Thread Operational Dataset from the ThreadNetworks list. + + + + + This is the response to a GetOperationalDataset request. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml index bfc2222ef35a4a..6ade7abe2e446c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml @@ -58,23 +58,14 @@ limitations under the License. - - HourFormat - - + + HourFormat + - ActiveCalendarType - - - - - - - SupportedCalendarTypes - - - + ActiveCalendarType + + SupportedCalendarTypes diff --git a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml index 201f71a201e523..9336a6a944735e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml @@ -114,166 +114,78 @@ limitations under the License. - - UTCTime - - - - Granularity - - - - TimeSource - - - - TrustedTimeSource - - - - - - DefaultNTP - - - - - - TimeZone - - - - - - DSTOffset - - - - - - LocalTime - - - - - - TimeZoneDatabase - - - - - - NTPServerAvailable - - - - - - TimeZoneListMaxSize - - - - - - DSTOffsetListMaxSize - - - - - - SupportsDNSResolve - - - - - + UTCTime + Granularity + TimeSource + TrustedTimeSource + DefaultNTP + TimeZone + DSTOffset + LocalTime + TimeZoneDatabase + NTPServerAvailable + TimeZoneListMaxSize + DSTOffsetListMaxSize + SupportsDNSResolve + This command MAY be issued by Administrator to set the time. - This command SHALL set TrustedTimeSource. - - - This command SHALL set TimeZone. - - - Response to SetTimeZone. - - - This command SHALL set DSTOffset. - - - This command is used to set DefaultNTP. - - - This event SHALL be generated when the server stops applying the current DSTOffset and there are no entries in the list with a larger ValidStarting time. - - - This event SHALL be generated when the server starts or stops applying a DST offset. - - - - + This event SHALL be generated when the server changes its time zone offset or name. - - - This event SHALL be generated if the node has attempted to update its time, but was unable to find a good time from any source. - This event SHALL be generated if the node attempts to update its time and finds that the TrustedTimeSource is null, or the specified peer cannot be reached. - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml index 0deb6225eedab9..fb6238add46a4f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml @@ -43,11 +43,8 @@ limitations under the License. - TemperatureUnit - - - - + TemperatureUnit + diff --git a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml index 14ffa15b70bd11..24260b78307bd3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml @@ -27,7 +27,6 @@ limitations under the License. LabelList - diff --git a/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml index 052a08108a69da..80c1cdb60c8ccc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml @@ -59,86 +59,39 @@ limitations under the License. - - OpenDuration - - + OpenDuration - - DefaultOpenDuration - - - - AutoCloseTime - - - - - - RemainingDuration - - - - CurrentState - - - - TargetState - - - - CurrentLevel - - - - - - TargetLevel - - - - - - DefaultOpenLevel - - - - - - ValveFault - - - - LevelStep - - - - - + DefaultOpenDuration + AutoCloseTime + RemainingDuration + CurrentState + TargetState + CurrentLevel + TargetLevel + DefaultOpenLevel + ValveFault + LevelStep + This command is used to set the valve to its open position. - This command is used to set the valve to its closed position. - This event SHALL be generated when the valve state changed. - This event SHALL be generated when the valve registers or clears a fault. - diff --git a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml index 50c88a02726515..90bd18b5b7baaa 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml @@ -27,14 +27,8 @@ limitations under the License. - - - MACAddress - - - - LinkLocalAddress - - + + MACAddress + LinkLocalAddress diff --git a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml index 663f13dfcc1271..2dc01920ae3e37 100644 --- a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml @@ -45,31 +45,11 @@ limitations under the License. - - - SpinSpeeds - - - - - - SpinSpeedCurrent - - - - - - NumberOfRinses - - - - - - SupportedRinses - - - - + + SpinSpeeds + SpinSpeedCurrent + NumberOfRinses + SupportedRinses diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml index 6e5c56e21f9670..beeaf277b77d2e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml @@ -64,58 +64,30 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 true - - HeaterTypes - - - - HeatDemand - - - - TankVolume - - - - - - EstimatedHeatRequired - - - - - - TankPercentage - - - - - - BoostState - - + HeaterTypes + HeatDemand + TankVolume + EstimatedHeatRequired + TankPercentage + BoostState Allows a client to request that the water heater is put into a Boost state. - Allows a client to cancel an ongoing Boost operation. - This event SHALL be generated whenever a Boost command is accepted. - This event SHALL be generated whenever the BoostState transitions from Active to Inactive. - diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml index 89d8b78436337c..d9211e808467fb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml @@ -58,26 +58,18 @@ Git: 1.4-prerelease-ipr-69-ge15ff5700 - - SupportedModes - - - - CurrentMode - - + SupportedModes + CurrentMode This command is used to change device modes. - This command is sent by the device on receipt of the ChangeToMode command. - diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml index f2a68e977bf965..7fb35aab255ed7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml @@ -63,94 +63,35 @@ limitations under the License. - - - BSSID - - - - SecurityType - - - - WiFiVersion - - - - ChannelNumber - - - - RSSI - - - - BeaconLostCount - - - - - - BeaconRxCount - - - - - - PacketMulticastRxCount - - - - - - PacketMulticastTxCount - - - - - - PacketUnicastRxCount - - - - - - PacketUnicastTxCount - - - - - - CurrentMaxRate - - - - OverrunCount - - - - + + BSSID + SecurityType + WiFiVersion + ChannelNumber + RSSI + BeaconLostCount + BeaconRxCount + PacketMulticastRxCount + PacketMulticastTxCount + PacketUnicastRxCount + PacketUnicastTxCount + CurrentMaxRate + OverrunCount Reception of this command SHALL reset the Breacon and Packet related count attributes to 0 - - - Indicate that a Node’s Wi-Fi connection has been disconnected as a result of de-authenticated or dis-association and indicates the reason. - Indicate that a Node has failed to connect, or reconnect, to a Wi-Fi access point. - Indicate that a Node’s connection status to a Wi-Fi network has changed. - diff --git a/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml index c5246f6acddfc2..8c8b4d40c3abdd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml @@ -30,25 +30,19 @@ limitations under the License. - - SSID - - + SSID PassphraseSurrogate - Request the current WPA-Personal passphrase or PSK associated with the managed Wi-Fi network. - This is the response to a NetworkPassphraseRequest. - diff --git a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml index 1363b5c8aa4c9d..0e1c97a4d45040 100644 --- a/src/app/zap-templates/zcl/data-model/chip/window-covering.xml +++ b/src/app/zap-templates/zcl/data-model/chip/window-covering.xml @@ -57,186 +57,45 @@ limitations under the License. - - Type - - + Type - - PhysicalClosedLimitLift - - - - - - - - + PhysicalClosedLimitLift - - PhysicalClosedLimitTilt - - - - - - - - + PhysicalClosedLimitTilt - - CurrentPositionLift - - - - - - - - + CurrentPositionLift - - CurrentPositionTilt - - - - - - - - + CurrentPositionTilt - - NumberOfActuationsLift - - - - + NumberOfActuationsLift - - NumberOfActuationsTilt - - - - + NumberOfActuationsTilt - - ConfigStatus - - + ConfigStatus - - CurrentPositionLiftPercentage - - - - - - - + CurrentPositionLiftPercentage - - CurrentPositionTiltPercentage - - - - - - - + CurrentPositionTiltPercentage - - OperationalStatus - - + OperationalStatus - - TargetPositionLiftPercent100ths - - - - - - - + TargetPositionLiftPercent100ths - - TargetPositionTiltPercent100ths - - - - - - - + TargetPositionTiltPercent100ths - - EndProductType - - + EndProductType - - CurrentPositionLiftPercent100ths - - - - - - - + CurrentPositionLiftPercent100ths - - CurrentPositionTiltPercent100ths - - - - - - - + CurrentPositionTiltPercent100ths + - - InstalledOpenLimitLift - - - - - - - - - - InstalledClosedLimitLift - - - - - - - - + InstalledOpenLimitLift + InstalledClosedLimitLift - - InstalledOpenLimitTilt - - - - - - - - - - InstalledClosedLimitTilt - - - - - - - - + InstalledOpenLimitTilt + InstalledClosedLimitTilt @@ -245,85 +104,44 @@ limitations under the License. Mode - - + - - SafetyStatus - - - + SafetyStatus + Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt - Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt - Stop any adjusting of window covering - Go to lift value specified - - - - - - Go to lift percentage specified - - - - - - - - - - - Go to tilt value specified - - - - - - Go to tilt percentage specified - - - - - - - - - - - From f5a0b6f81c42f42b954d66079f709be087e34c9d Mon Sep 17 00:00:00 2001 From: Hasty Granbery Date: Wed, 23 Oct 2024 11:40:35 -0700 Subject: [PATCH 12/14] [HVAC] Add check for per-preset-scenario limit (#35310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [HVAC] Check if number of preset scenarios exceeds maximum number of scenarios * [NXP][Zephyr] Provide AP band in connection request parameters (#35181) Signed-off-by: Axel Le Bourhis * Plumbing for CADMIN attribute updates from fabric-admin to fabric-bridge (#35222) * Fix TC_BRBINFO_4_1 for execution on TH (#35257) * [Fabric-Admin] Move DeviceSynchronization from pairing command to device_manager (#35260) * Move DeviceSynchronization from pairing command to device_manager * Restyled by gn --------- Co-authored-by: Restyled.io * Add command-line argument to allow userprompt at start of ECOINFO_2_1 (#35234) --------- Co-authored-by: Restyled.io Co-authored-by: saurabhst * Testing fixes for TC_SWTCH from TE2 (#34984) * Testing fixes for TC_SWTCH from TE2 - all-clusters-app was not generating button position changes in some cases. This was not detected in some situations since the test cases don't always test for this. - Prompts are missing endpoint ID which makes it hard when running per-endpoint tests to know where it applies. - Some partials could fail on decode errors, causing test errors instead of fails. This PR: - Adds correct generation of positions on press/release. - Adds a way to claim endpoint tested in user prompts - Fixes failing on decode errors in partials Testing done: - TC_SWTCH still passes - Manually validated button position in multi-press test/simulation (update to TC_SWTCH needs test plan changes). Issue is in all-clusters-app for CI only. See https://github.com/CHIP-Specifications/chip-test-plans/issues/4493 * Restyled by autopep8 * Update prompt support --------- Co-authored-by: Restyled.io * Add test cases for testing additional Presets write and commit constr… (#35141) * Add test cases for testing additional Presets write and commit constraints - Add a test for adding a preset with a preset scenario not present in PresetTypes - Add a test for testing addition of presets such that the total number of presets added is greater than the total number of presets supported * Add rollback after test step 18 * Modify the number of presets supported test case to read the number of presets supported and build a preset list whose size exceeds that to test * Modify the number of presets supported test case to read the number of presets supported and build a preset list whose size exceeds that to test * Update thermostat-delegate-impl.h * Address review comments * Add support to check for numberOfPresets supported for each preset type and build the presets list with multiple presets of each type * Restyled by autopep8 * Fix log line formatting * Update src/python_testing/TC_TSTAT_4_2.py Co-authored-by: Boris Zbarsky * Fix test step 17 to find a preset scenario in PresetScenarioEnum that is not present in PresetTypes to run the test - Fix test step 18 to build a presets list that exceeds the number of presets supported correctly * Restyled by autopep8 * Fix lint errors * Add a while loop to add more presets until max is reached --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky * Allow TestAccessControl to run with ARL (#35262) * Allow TestAccessControl to run with ARL Since RequestType is required, set each test data entry to some value that will pass AccessRestrictionProvider checks (since the focus is on AccessControl for these tests). * Copy the test data's request path and optionally add RequestType * Make zap_downloadl.py create a usable zap.app on Mac (#35242) Use the unzip utility on Mac for unzipping instead of zipfile. In addition to not supporting file modes (which the script already works around) the zipfile module also doesn't support symlinks. The embedded frameworks inside zap.app rely on symlinks for the application to work. * TBRM Tests scripts consistency with te2 fixes (#35153) * Add files via upload Add yaml test script for TBRM * Update TEST_TC_TBRM_2.2.yaml * Update TEST_TC_TBRM_2.3.yaml * Update TEST_TC_TBRM_2.4.yaml * Test script consitancy wit test plan after TE2 * Test script consitancy wit test plan after TE2 * Update src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> * Update src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> * Restyled by whitespace * Restyled by prettier-yaml * Test_TC_TBRM_2_4. synchronisation with TC-THNETDIR-2.3 according test Plan * Restyled by whitespace * Test tweaks to get CI to pass - Use pairing payload matching the other parameters - Check response of ArmFailSafe commands - Fix bad merge in commissioner_commands.py * Restyled by prettier-yaml --------- Co-authored-by: StephaneGUELEC <94045077+StephaneGUELEC@users.noreply.github.com> Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Co-authored-by: Restyled.io Co-authored-by: Karsten Sperling * [HVAC] Alter Thermostat Preset tests to not rely on knowledge of the server's initial state * Pick midpoint setpoints for new presets * Lint fixes * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Fixes from code review * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Fix remaining places with hard-coded setpoints * Don't abort test if there are no built-in presets * Remove unneeded length check * Fix max number of preset types * Add test for individual preset scenario limits * Fix lint issue * Return invalid in state if we're unable to iterate over the preset types for some reason * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Remove unneeded active preset setting * Restyled patch * Suggestions from code review --------- Signed-off-by: Axel Le Bourhis Co-authored-by: Axel Le Bourhis <45206070+axelnxp@users.noreply.github.com> Co-authored-by: Terence Hampson Co-authored-by: Yufeng Wang Co-authored-by: Restyled.io Co-authored-by: saurabhst Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Co-authored-by: Boris Zbarsky Co-authored-by: Thomas Lea <35579828+tleacmcsa@users.noreply.github.com> Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Co-authored-by: marchemi <56955785+marchemi@users.noreply.github.com> Co-authored-by: StephaneGUELEC <94045077+StephaneGUELEC@users.noreply.github.com> Co-authored-by: Karsten Sperling --- .../thermostat-server-presets.cpp | 109 +++++++++--------- src/python_testing/TC_TSTAT_4_2.py | 28 ++++- 2 files changed, 78 insertions(+), 59 deletions(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp index 9413513fd0cedd..1dede071619962 100644 --- a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp @@ -152,69 +152,36 @@ bool GetMatchingPresetInPresets(Delegate * delegate, const DataModel::NullableGetPendingPresetAtIndex(i, pendingPreset); - + PresetTypeStruct::Type presetType; + auto err = delegate->GetPresetTypeAtIndex(i, presetType); if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) { - break; + // We exhausted the list trying to find the preset scenario + return CHIP_NO_ERROR; } if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "CountNumberOfPendingPresets: GetPendingPresetAtIndex failed with error %" CHIP_ERROR_FORMAT, - err.Format()); - return 0; + return err; } - numberOfPendingPresets++; - } - - return numberOfPendingPresets; -} - -/** - * @brief Checks if the presetScenario is present in the PresetTypes attribute. - * - * @param[in] delegate The delegate to use. - * @param[in] presetScenario The presetScenario to match with. - * - * @return true if the presetScenario is found, false otherwise. - */ -bool PresetScenarioExistsInPresetTypes(Delegate * delegate, PresetScenarioEnum presetScenario) -{ - VerifyOrReturnValue(delegate != nullptr, false); - - for (uint8_t i = 0; true; i++) - { - PresetTypeStruct::Type presetType; - auto err = delegate->GetPresetTypeAtIndex(i, presetType); - if (err != CHIP_NO_ERROR) - { - return false; - } - if (presetType.presetScenario == presetScenario) { - return true; + count = presetType.numberOfPresets; + return CHIP_NO_ERROR; } } - return false; + return CHIP_NO_ERROR; } /** @@ -410,8 +377,16 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele } } - if (!PresetScenarioExistsInPresetTypes(delegate, preset.GetPresetScenario())) + size_t maximumPresetCount = delegate->GetNumberOfPresets(); + size_t maximumPresetScenarioCount = 0; + if (MaximumPresetScenarioCount(delegate, preset.GetPresetScenario(), maximumPresetScenarioCount) != CHIP_NO_ERROR) { + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + + if (maximumPresetScenarioCount == 0) + { + // This is not a supported preset scenario return CHIP_IM_GLOBAL_STATUS(ConstraintError); } @@ -423,16 +398,42 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele // Before adding this preset to the pending presets, if the expected length of the pending presets' list // exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet. - uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate); + // We're going to append this preset, so let's assume a count as though it had already been inserted + size_t presetCount = 1; + size_t presetScenarioCount = 1; + for (uint8_t i = 0; true; i++) + { + PresetStructWithOwnedMembers otherPreset; + CHIP_ERROR err = delegate->GetPendingPresetAtIndex(i, otherPreset); + + if (err == CHIP_ERROR_PROVIDER_LIST_EXHAUSTED) + { + break; + } + if (err != CHIP_NO_ERROR) + { + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + presetCount++; + if (preset.GetPresetScenario() == otherPreset.GetPresetScenario()) + { + presetScenarioCount++; + } + } - // We will be adding one more preset, so reject if the length is already at max. - if (numberOfPendingPresets >= delegate->GetNumberOfPresets()) + if (presetCount > maximumPresetCount) { + ChipLogError(Zcl, "Preset count exceeded %u: %u ", static_cast(maximumPresetCount), + static_cast(presetCount)); return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); } - // TODO #34556 : Check if the number of presets for each presetScenario exceeds the max number of presets supported for that - // scenario. We plan to support only one preset for each presetScenario for our use cases so defer this for re-evaluation. + if (presetScenarioCount > maximumPresetScenarioCount) + { + ChipLogError(Zcl, "Preset scenario count exceeded %u: %u ", static_cast(maximumPresetScenarioCount), + static_cast(presetScenarioCount)); + return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); + } return delegate->AppendToPendingPresetList(preset); } diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index 6dad144f3050c4..85ff487a9dc639 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -37,6 +37,7 @@ import copy import logging import random +from collections import namedtuple import chip.clusters as Clusters from chip import ChipDeviceCtrl # Needed before chip.FabricAdmin @@ -418,11 +419,6 @@ async def test_TC_TSTAT_4_2(self): logger.info( "Couldn't run test step 4 since there were no built-in presets") - # Send the SetActivePresetRequest command - await self.send_set_active_preset_handle_request_command(value=b'\x03') - - activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) - self.step("5") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): @@ -714,6 +710,28 @@ async def test_TC_TSTAT_4_2(self): self.step("18") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): + ScenarioHeadroom = namedtuple("ScenarioHeadroom", "presetScenario remaining") + # Generate list of tuples of scenarios and number of remaining presets per scenario allowed + presetScenarioHeadrooms = list(ScenarioHeadroom(presetType.presetScenario, + presetType.numberOfPresets - presetScenarioCounts.get(presetType.presetScenario, 0)) for presetType in presetTypes) + + if presetScenarioHeadrooms: + # Find the preset scenario with the smallest number of remaining allowed presets + presetScenarioHeadrooms = sorted(presetScenarioHeadrooms, key=lambda psh: psh.remaining) + presetScenarioHeadroom = presetScenarioHeadrooms[0] + + # Add one more preset than is allowed by the preset type + test_presets = copy.deepcopy(current_presets) + test_presets.extend([cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=presetScenarioHeadroom.presetScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)] * (presetScenarioHeadroom.remaining + 1)) + + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ResourceExhausted) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + # Calculate the length of the Presets list that could be created using the preset scenarios in PresetTypes and numberOfPresets supported for each scenario. totalExpectedPresetsLength = sum(presetType.numberOfPresets for presetType in presetTypes) From 8933398eda4f3ab3b4d9d9e6b85a0d5a121c1a7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:48:29 +0000 Subject: [PATCH 13/14] Bump third_party/openthread/repo from `2aeb8b8` to `287dbfa` (#36012) Bumps [third_party/openthread/repo](https://github.com/openthread/openthread) from `2aeb8b8` to `287dbfa`. - [Release notes](https://github.com/openthread/openthread/releases) - [Commits](https://github.com/openthread/openthread/compare/2aeb8b833ba760ec29d5f340dd1ce7bcb61c5d56...287dbfa25130ead5010877e934effbb0a2534265) --- updated-dependencies: - dependency-name: third_party/openthread/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin --- third_party/openthread/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 2aeb8b833ba760..287dbfa25130ea 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 2aeb8b833ba760ec29d5f340dd1ce7bcb61c5d56 +Subproject commit 287dbfa25130ead5010877e934effbb0a2534265 From 197f698bb873eab5cd70703d8855abd62367709d Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 23 Oct 2024 16:38:42 -0400 Subject: [PATCH 14/14] Add a BigEndian::Reader to be the equivalent for LittleEndian::Reader (#36195) * Add a big endian reader since we seem to potentially want this * Minor re-arrange * Fix includes * Restyled by clang-format * make some compilers happy * Update src/lib/support/BufferReader.h Co-authored-by: Boris Zbarsky --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- src/lib/support/BufferReader.cpp | 91 +++++--- src/lib/support/BufferReader.h | 245 +++++++++++++++------ src/lib/support/tests/TestBufferReader.cpp | 49 +++-- 3 files changed, 276 insertions(+), 109 deletions(-) diff --git a/src/lib/support/BufferReader.cpp b/src/lib/support/BufferReader.cpp index 02bce8f3fe0615..cbd13f1ed172dc 100644 --- a/src/lib/support/BufferReader.cpp +++ b/src/lib/support/BufferReader.cpp @@ -18,12 +18,29 @@ #include "BufferReader.h" #include +#include +#include #include #include namespace chip { namespace Encoding { + +BufferReader & BufferReader::ReadBytes(uint8_t * dest, size_t size) +{ + static_assert(CHAR_BIT == 8, "Our various sizeof checks rely on bytes and octets being the same thing"); + + if (EnsureAvailable(size)) + { + memcpy(dest, mReadPtr, size); + mReadPtr += size; + mAvailable -= size; + } + + return *this; +} + namespace LittleEndian { namespace { @@ -58,37 +75,12 @@ void Reader::RawReadLowLevelBeCareful(T * retval) constexpr size_t data_size = sizeof(T); - if (mAvailable < data_size) - { - mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; - // Ensure that future reads all fail. - mAvailable = 0; - return; - } - - ReadHelper(mReadPtr, retval); - mReadPtr += data_size; - - mAvailable = static_cast(mAvailable - data_size); -} - -Reader & Reader::ReadBytes(uint8_t * dest, size_t size) -{ - static_assert(CHAR_BIT == 8, "Our various sizeof checks rely on bytes and octets being the same thing"); - - if ((size > UINT16_MAX) || (mAvailable < size)) + if (EnsureAvailable(data_size)) { - mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; - // Ensure that future reads all fail. - mAvailable = 0; - return *this; + ReadHelper(mReadPtr, retval); + mReadPtr += data_size; + mAvailable -= data_size; } - - memcpy(dest, mReadPtr, size); - - mReadPtr += size; - mAvailable = static_cast(mAvailable - size); - return *this; } // Explicit Read instantiations for the data types we want to support. @@ -104,5 +96,46 @@ template void Reader::RawReadLowLevelBeCareful(uint32_t *); template void Reader::RawReadLowLevelBeCareful(uint64_t *); } // namespace LittleEndian + +namespace BigEndian { + +Reader & Reader::Read16(uint16_t * dest) +{ + if (!EnsureAvailable(sizeof(uint16_t))) + { + return *this; + } + + static_assert(sizeof(*dest) == 2); + + *dest = static_cast((mReadPtr[0] << 8) + mReadPtr[1]); + mReadPtr += 2; + mAvailable -= 2; + return *this; +} + +Reader & Reader::Read32(uint32_t * dest) +{ + if (!EnsureAvailable(sizeof(uint32_t))) + { + return *this; + } + + static_assert(sizeof(*dest) == 4); + + *dest = 0; + for (unsigned i = 0; i < sizeof(uint32_t); i++) + { + *dest <<= 8; + *dest += mReadPtr[i]; + } + + mReadPtr += sizeof(uint32_t); + mAvailable -= sizeof(uint32_t); + return *this; +} + +} // namespace BigEndian + } // namespace Encoding } // namespace chip diff --git a/src/lib/support/BufferReader.h b/src/lib/support/BufferReader.h index ac9c7145359335..725ca8e23ea915 100644 --- a/src/lib/support/BufferReader.h +++ b/src/lib/support/BufferReader.h @@ -31,26 +31,11 @@ namespace chip { namespace Encoding { -namespace LittleEndian { -/** - * @class Reader - * - * Simple reader for reading little-endian things out of buffers. - */ -class Reader +class BufferReader { public: - /** - * Create a buffer reader from a given buffer and length. - * - * @param buffer The octet buffer from which to read. The caller must ensure - * (most simply by allocating the reader on the stack) that - * the buffer outlives the reader. If `buffer` is nullptr, - * length is automatically overridden to zero, to avoid accesses. - * @param buf_len The number of octets in the buffer. - */ - Reader(const uint8_t * buffer, size_t buf_len) : mBufStart(buffer), mReadPtr(buffer), mAvailable(buf_len) + BufferReader(const uint8_t * buffer, size_t buf_len) : mBufStart(buffer), mReadPtr(buffer), mAvailable(buf_len) { if (mBufStart == nullptr) { @@ -58,15 +43,6 @@ class Reader } } - /** - * Create a buffer reader from a given byte span. - * - * @param buffer The octet buffer byte span from which to read. The caller must ensure - * that the buffer outlives the reader. The buffer's ByteSpan .data() pointer - * is is nullptr, length is automatically overridden to zero, to avoid accesses. - */ - Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} - /** * Number of octets we have read so far. */ @@ -95,6 +71,121 @@ class Reader */ bool IsSuccess() const { return StatusCode() == CHIP_NO_ERROR; } + /** + * Read a byte string from the BufferReader + * + * @param [out] dest Where the bytes read + * @param [in] size How many bytes to read + * + * @note The read can put the reader in a failed-status state if there are + * not enough octets available. Callers must either continue to do + * more reads on the return value or check its status to see whether + * the sequence of reads that has been performed succeeded. + */ + CHECK_RETURN_VALUE + BufferReader & ReadBytes(uint8_t * dest, size_t size); + + /** + * Access bytes of size length, useful for in-place processing of strings + * + * data_ptr MUST NOT be null and will contain the data pointer with `len` bytes available + * if this call is successful + * + * If len is greater than the number of available bytes, the object enters in a failed status. + */ + CHECK_RETURN_VALUE + BufferReader & ZeroCopyProcessBytes(size_t len, const uint8_t ** data_ptr) + { + if (len > mAvailable) + { + *data_ptr = nullptr; + mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; + // Ensure that future reads all fail. + mAvailable = 0; + } + else + { + *data_ptr = mReadPtr; + mReadPtr += len; + mAvailable -= len; + } + return *this; + } + + /** + * Advance the Reader forward by the specified number of octets. + * + * @param len The number of octets to skip. + * + * @note If the len argument is greater than the number of available octets + * remaining, the Reader will advance to the end of the buffer + * without entering a failed-status state. + */ + BufferReader & Skip(size_t len) + { + len = std::min(len, mAvailable); + mReadPtr += len; + mAvailable = static_cast(mAvailable - len); + return *this; + } + +protected: + /// Our buffer start. + const uint8_t * const mBufStart; + + /// Our current read point. + const uint8_t * mReadPtr; + + /// The number of octets we can still read starting at mReadPtr. + size_t mAvailable; + + /// Our current status. + CHIP_ERROR mStatus = CHIP_NO_ERROR; + + /// Make sure we have at least the given number of bytes available (does not consume them) + bool EnsureAvailable(size_t size) + { + if (mAvailable < size) + { + mStatus = CHIP_ERROR_BUFFER_TOO_SMALL; + // Ensure that future reads all fail. + mAvailable = 0; + return false; + } + return true; + } +}; + +namespace LittleEndian { + +/** + * @class Reader + * + * Simple reader for reading little-endian things out of buffers. + */ +class Reader : public BufferReader +{ +public: + /** + * Create a buffer reader from a given buffer and length. + * + * @param buffer The octet buffer from which to read. The caller must ensure + * (most simply by allocating the reader on the stack) that + * the buffer outlives the reader. If `buffer` is nullptr, + * length is automatically overridden to zero, to avoid accesses. + * @param buf_len The number of octets in the buffer. + */ + Reader(const uint8_t * buffer, size_t buf_len) : BufferReader(buffer, buf_len) {} + + /** + * Create a buffer reader from a given byte span. + * + * @param buffer The octet buffer byte span from which to read. The caller must ensure + * that the buffer outlives the reader. The buffer's ByteSpan .data() pointer + * is is nullptr, length is automatically overridden to zero, to avoid accesses. + */ + Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} + /** * Read a bool, assuming single byte storage. * @@ -267,20 +358,6 @@ class Reader return *this; } - /** - * Read a byte string from the BufferReader - * - * @param [out] dest Where the bytes read - * @param [in] size How many bytes to read - * - * @note The read can put the reader in a failed-status state if there are - * not enough octets available. Callers must either continue to do - * more reads on the return value or check its status to see whether - * the sequence of reads that has been performed succeeded. - */ - CHECK_RETURN_VALUE - Reader & ReadBytes(uint8_t * dest, size_t size); - /** * Helper for our various APIs so we don't have to write out various logic * multiple times. This is public so that consumers that want to read into @@ -290,46 +367,80 @@ class Reader */ template void RawReadLowLevelBeCareful(T * retval); +}; + +} // namespace LittleEndian +namespace BigEndian { + +/** + * @class Reader + * + * Simple reader for reading big-endian things out of buffers. + */ +class Reader : public BufferReader +{ +public: /** - * Advance the Reader forward by the specified number of octets. - * - * @param len The number of octets to skip. + * Create a buffer reader from a given buffer and length. * - * @note If the len argument is greater than the number of available octets - * remaining, the Reader will advance to the end of the buffer - * without entering a failed-status state. + * @param buffer The octet buffer from which to read. The caller must ensure + * (most simply by allocating the reader on the stack) that + * the buffer outlives the reader. If `buffer` is nullptr, + * length is automatically overridden to zero, to avoid accesses. + * @param buf_len The number of octets in the buffer. */ - Reader & Skip(size_t len) - { - len = std::min(len, mAvailable); - mReadPtr += len; - mAvailable = static_cast(mAvailable - len); - return *this; - } + Reader(const uint8_t * buffer, size_t buf_len) : BufferReader(buffer, buf_len) {} -private: /** - * Our buffer start. + * Create a buffer reader from a given byte span. + * + * @param buffer The octet buffer byte span from which to read. The caller must ensure + * that the buffer outlives the reader. If the buffer's ByteSpan .data() pointer + * is nullptr, length is automatically overridden to zero, to avoid accesses. */ - const uint8_t * const mBufStart; + Reader(const ByteSpan & buffer) : Reader(buffer.data(), buffer.size()) {} /** - * Our current read point. + * Read a single 8-bit unsigned integer. + * + * @param [out] dest Where the 8-bit integer goes. + * + * @note The read can put the reader in a failed-status state if there are + * not enough octets available. Callers must either continue to do + * more reads on the return value or check its status to see whether + * the sequence of reads that has been performed succeeded. */ - const uint8_t * mReadPtr; + CHECK_RETURN_VALUE + Reader & Read8(uint8_t * dest) + { + (void) ReadBytes(dest, 1); + return *this; + } - /** - * The number of octets we can still read starting at mReadPtr. - */ - size_t mAvailable; + CHECK_RETURN_VALUE + Reader & ReadChar(char * dest) + { + (void) ReadBytes(reinterpret_cast(dest), 1); + return *this; + } - /** - * Our current status. - */ - CHIP_ERROR mStatus = CHIP_NO_ERROR; + CHECK_RETURN_VALUE + Reader & ReadBool(char * dest) + { + (void) ReadBytes(reinterpret_cast(dest), 1); + return *this; + } + + /// NOTE: only a subset of reads are supported here, more can be added if used/needed + CHECK_RETURN_VALUE + Reader & Read16(uint16_t * dest); + + CHECK_RETURN_VALUE + Reader & Read32(uint32_t * dest); }; -} // namespace LittleEndian +} // namespace BigEndian + } // namespace Encoding } // namespace chip diff --git a/src/lib/support/tests/TestBufferReader.cpp b/src/lib/support/tests/TestBufferReader.cpp index 97db9cf09737b9..ee100e1506bada 100644 --- a/src/lib/support/tests/TestBufferReader.cpp +++ b/src/lib/support/tests/TestBufferReader.cpp @@ -30,21 +30,21 @@ #include using namespace chip; -using namespace chip::Encoding::LittleEndian; +using namespace chip::Encoding; static const uint8_t test_buffer[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 }; -struct TestReader : public Reader +struct LittleEndianTestReader : public LittleEndian::Reader { - TestReader() : Reader(test_buffer, std::extent::value) {} + LittleEndianTestReader() : LittleEndian::Reader(test_buffer, std::extent::value) {} }; -struct TestSpanReader : public Reader +struct LittleEndianTestSpanReader : public LittleEndian::Reader { - TestSpanReader() : Reader(ByteSpan{ test_buffer, std::extent::value }) {} + LittleEndianTestSpanReader() : LittleEndian::Reader(ByteSpan{ test_buffer, std::extent::value }) {} }; -static void TestBufferReader_BasicImpl(Reader & reader) +static void TestBufferReader_BasicImpl(LittleEndian::Reader & reader) { uint8_t first; uint16_t second; @@ -75,21 +75,21 @@ static void TestBufferReader_BasicImpl(Reader & reader) TEST(TestBufferReader, TestBufferReader_Basic) { - TestReader reader; + LittleEndianTestReader reader; TestBufferReader_BasicImpl(reader); } TEST(TestBufferReader, TestBufferReader_BasicSpan) { - TestSpanReader reader; + LittleEndianTestSpanReader reader; TestBufferReader_BasicImpl(reader); } TEST(TestBufferReader, TestBufferReader_Saturation) { - TestReader reader; + LittleEndianTestReader reader; uint64_t temp; // Read some bytes out so we can get to the end of the buffer. CHIP_ERROR err = reader.Read64(&temp).StatusCode(); @@ -113,12 +113,13 @@ TEST(TestBufferReader, TestBufferReader_Saturation) TEST(TestBufferReader, TestBufferReader_Skip) { - TestReader reader; + LittleEndianTestReader reader; uint8_t temp = 0; uint16_t firstSkipLen = 2; // Verify Skip() advances the start pointer the correct amount. - CHIP_ERROR err = reader.Skip(firstSkipLen).Read8(&temp).StatusCode(); + reader.Skip(firstSkipLen); + CHIP_ERROR err = reader.Read8(&temp).StatusCode(); EXPECT_EQ(err, CHIP_NO_ERROR); EXPECT_EQ(temp, test_buffer[firstSkipLen]); EXPECT_EQ(reader.OctetsRead(), (firstSkipLen + 1u)); @@ -175,7 +176,8 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) uint32_t val1 = 0; uint32_t val2 = 0; - EXPECT_TRUE(reader.Skip(1).Read32(&val1).Read32(&val2).IsSuccess()); + reader.Skip(1); + EXPECT_TRUE(reader.Read32(&val1).Read32(&val2).IsSuccess()); EXPECT_EQ(reader.Remaining(), 1u); EXPECT_EQ(val1, static_cast(0xfffffffeUL)); EXPECT_EQ(val2, static_cast(0xffffffffUL)); @@ -227,7 +229,8 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) int32_t val1 = 0; int32_t val2 = 0; - EXPECT_TRUE(reader.Skip(1).ReadSigned32(&val1).ReadSigned32(&val2).IsSuccess()); + reader.Skip(1); + EXPECT_TRUE(reader.ReadSigned32(&val1).ReadSigned32(&val2).IsSuccess()); EXPECT_EQ(reader.Remaining(), 1u); EXPECT_EQ(val1, static_cast(-2L)); EXPECT_EQ(val2, static_cast(-1L)); @@ -272,3 +275,23 @@ TEST(TestBufferReader, TestBufferReader_LittleEndianScalars) EXPECT_EQ(val3, '\xff'); } } + +TEST(TestBigEndianBufferReader, GenericTests) +{ + uint8_t test_buf[] = { 0x12, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xBC, 1, 2, 3 }; + + chip::Encoding::BigEndian::Reader reader{ ByteSpan{ test_buf } }; + + uint16_t v1; + uint32_t v2; + uint8_t v3; + + EXPECT_TRUE(reader.Read16(&v1).Read32(&v2).Read8(&v3).IsSuccess()); + EXPECT_EQ(reader.Remaining(), 3u); + EXPECT_EQ(v1, 0x1223u); + EXPECT_EQ(v2, 0x456789ABu); + EXPECT_EQ(v3, 0xBCu); + + // Insufficient buffer after that + EXPECT_FALSE(reader.Read32(&v2).IsSuccess()); +}