From f32d00599fcd6103734329731e60b95702944d54 Mon Sep 17 00:00:00 2001 From: bhmanda-silabs <107180296+bhmanda-silabs@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:39:16 +0530 Subject: [PATCH 1/7] [Silabs] Update WiseConnect-wifi-bt-sdk to 2.10.3 for RS9116 (#36117) * Updated wiseconnect pointer to 2.10.3 and added changes for wpa_wpa2_mixed security type for rs9116 board * updated example-efr32.yaml and release_artifacts.yaml with docker build version * Updated docker version in release_artifacts,smoke_test.yaml and .gitmodules with 2.10.3 --- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/release_artifacts.yaml | 2 +- .gitmodules | 2 +- examples/platform/silabs/efr32/rs911x/rsi_if.cpp | 4 ++++ integrations/cloudbuild/smoke-test.yaml | 14 +++++++------- src/platform/silabs/wifi/wfx_host_events.h | 13 +++++++------ third_party/silabs/wiseconnect-wifi-bt-sdk | 2 +- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 9a483ab5ec4c9e..d9df0bca21637f 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:83 + image: ghcr.io/project-chip/chip-build-efr32:84 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 45ef34c5ee5aae..af90dc316d0f4a 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:83 + image: ghcr.io/project-chip/chip-build-efr32:84 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitmodules b/.gitmodules index c26ee8f792c1c3..3f50d3079d4e03 100644 --- a/.gitmodules +++ b/.gitmodules @@ -218,7 +218,7 @@ [submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] path = third_party/silabs/wiseconnect-wifi-bt-sdk url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git - branch = 2.10.0 + branch = 2.10.3 platforms = silabs [submodule "third_party/silabs/wifi_sdk"] path = third_party/silabs/wifi_sdk diff --git a/examples/platform/silabs/efr32/rs911x/rsi_if.cpp b/examples/platform/silabs/efr32/rs911x/rsi_if.cpp index 4e9c40974c40e1..78d13498efa5ab 100644 --- a/examples/platform/silabs/efr32/rs911x/rsi_if.cpp +++ b/examples/platform/silabs/efr32/rs911x/rsi_if.cpp @@ -506,6 +506,9 @@ static void wfx_rsi_save_ap_info(void) // translation case SME_WPA2_ENTERPRISE: wfx_rsi.sec.security = WFX_SEC_WPA2; break; + case SME_WPA_WPA2_MIXED_MODE: + wfx_rsi.sec.security = WFX_SEC_WPA_WPA2_MIXED; + break; case SME_WEP: wfx_rsi.sec.security = WFX_SEC_WEP; break; @@ -551,6 +554,7 @@ static void wfx_rsi_do_join(void) break; case WFX_SEC_WPA: case WFX_SEC_WPA2: + case WFX_SEC_WPA_WPA2_MIXED: connect_security_mode = RSI_WPA_WPA2_MIXED; break; #if WIFI_ENABLE_SECURITY_WPA3_TRANSITION diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index b8c44cfa30c565..24a3029d2fe2f8 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:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" 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:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" # 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:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" 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:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:83" + - name: "ghcr.io/project-chip/chip-build-vscode:84" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/platform/silabs/wifi/wfx_host_events.h b/src/platform/silabs/wifi/wfx_host_events.h index de1759951c86a1..3bd973467bf915 100644 --- a/src/platform/silabs/wifi/wfx_host_events.h +++ b/src/platform/silabs/wifi/wfx_host_events.h @@ -147,12 +147,13 @@ typedef enum /* Note that these are same as RSI_security */ typedef enum { - WFX_SEC_UNSPECIFIED = 0, - WFX_SEC_NONE = 1, - WFX_SEC_WEP = 2, - WFX_SEC_WPA = 3, - WFX_SEC_WPA2 = 4, - WFX_SEC_WPA3 = 5, + WFX_SEC_UNSPECIFIED = 0, + WFX_SEC_NONE = 1, + WFX_SEC_WEP = 2, + WFX_SEC_WPA = 3, + WFX_SEC_WPA2 = 4, + WFX_SEC_WPA3 = 5, + WFX_SEC_WPA_WPA2_MIXED = 6, } wfx_sec_t; typedef struct diff --git a/third_party/silabs/wiseconnect-wifi-bt-sdk b/third_party/silabs/wiseconnect-wifi-bt-sdk index f94b83d050fe62..b6d6cb552beb4e 160000 --- a/third_party/silabs/wiseconnect-wifi-bt-sdk +++ b/third_party/silabs/wiseconnect-wifi-bt-sdk @@ -1 +1 @@ -Subproject commit f94b83d050fe6200c5ec2dacfafa2edc92ad5ef3 +Subproject commit b6d6cb552beb4ecb6e690e0db4c9d374f8ba1b15 From e36bde7fea73abc8503cbb57a71ee05f22388ebe Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 22 Oct 2024 17:57:32 -0400 Subject: [PATCH 2/7] Add an MTRDevice method for checking whether a data-value satisfies some expectation. (#36151) --- src/darwin/Framework/CHIP/MTRDevice.mm | 162 ++++++++ .../CHIP/MTRDeviceDataValueDictionary.h | 3 + .../Framework/CHIP/MTRDevice_Concrete.mm | 22 +- .../Framework/CHIP/MTRDevice_Internal.h | 5 + .../Framework/CHIPTests/MTRDeviceTests.m | 352 ++++++++++++++++++ .../TestHelpers/MTRTestDeclarations.h | 1 - 6 files changed, 525 insertions(+), 20 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index e0154fdb8934e6..8e379980578f58 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -539,6 +539,8 @@ - (BOOL)deviceCachePrimed return NO; } +#pragma mark - Suspend/resume management + - (void)controllerSuspended { // Nothing to do for now. @@ -549,6 +551,166 @@ - (void)controllerResumed // Nothing to do for now. } +#pragma mark - Value comparisons + +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)one isEqualToDataValue:(MTRDeviceDataValueDictionary)theOther +{ + // Sanity check for nil cases + if (!one && !theOther) { + MTR_LOG_ERROR("%@ attribute data-value comparison does not expect comparing two nil dictionaries", self); + return YES; + } + if (!one || !theOther) { + // Comparing against nil is expected, and should return NO quietly + return NO; + } + + // Attribute data-value dictionaries are equal if type and value are equal, and specifically, this should return true if values are both nil + return [one[MTRTypeKey] isEqual:theOther[MTRTypeKey]] && ((one[MTRValueKey] == theOther[MTRValueKey]) || [one[MTRValueKey] isEqual:theOther[MTRValueKey]]); +} + +// _attributeDataValue:satisfiesExpectedDataValue: checks whether the newly +// received attribute data value satisfies the expectation we have. +// +// For now, a value is considered to satisfy the expectation if it's equal to +// the expected value, though we allow the fields of structs to be in a +// different order than expected: while in theory the spec does require a +// specific ordering for struct fields, in practice we should not force certain +// API consumers to deal with knowing what that ordering is. +// +// Things to consider for future: +// +// 1) Should a value that has _extra_ fields in a struct compared to the expected +// value be considered as satisfying the expectation? Arguably, yes. +// +// 2) Should lists actually enforce order (as now), or should they allow +// reordering entries? +// +// 3) For fabric-scoped lists, should we have a way to check for just "our +// fabric's" entries? +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)observed satisfiesValueExpectation:(MTRDeviceDataValueDictionary)expected +{ + // Sanity check for nil cases (which really should not happen!) + if (!observed && !expected) { + MTR_LOG_ERROR("%@ observed to expected attribute data-value comparison does not expect comparing two nil dictionaries", self); + return YES; + } + + if (!observed || !expected) { + // Again, not expected here. But clearly the expectation is not really + // satisfied, in some sense. + MTR_LOG_ERROR("@ observed to expected attribute data-value comparison does not expect a nil %s", observed ? "expected" : "observed"); + return NO; + } + + if (![observed[MTRTypeKey] isEqual:expected[MTRTypeKey]]) { + // Different types, does not satisfy expectation. + return NO; + } + + if ([MTRArrayValueType isEqual:expected[MTRTypeKey]]) { + // For array-values, check that sizes are same and entries satisfy expectations. + if (![observed[MTRValueKey] isKindOfClass:NSArray.class] || ![expected[MTRValueKey] isKindOfClass:NSArray.class]) { + // Malformed data, just claim expectation is not satisfied. + MTR_LOG_ERROR("%@ at least one of observed and expected value is not an NSArrray: %@, %@", self, observed, expected); + return NO; + } + + NSArray *> * observedArray = observed[MTRValueKey]; + NSArray *> * expectedArray = expected[MTRValueKey]; + + if (observedArray.count != expectedArray.count) { + return NO; + } + + for (NSUInteger i = 0; i < observedArray.count; ++i) { + NSDictionary * observedEntry = observedArray[i]; + NSDictionary * expectedEntry = expectedArray[i]; + + if (![observedEntry isKindOfClass:NSDictionary.class] || ![expectedEntry isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ expected or observed array-value contains entries that are not NSDictionary: %@, %@", self, observedEntry, expectedEntry); + return NO; + } + + if (![self _attributeDataValue:observedEntry[MTRDataKey] satisfiesValueExpectation:expectedEntry[MTRDataKey]]) { + return NO; + } + } + + return YES; + } + + if (![MTRStructureValueType isEqual:expected[MTRTypeKey]]) { + // For everything except arrays and structs, expectation is satisfied + // exactly when the values are equal. + return [self _attributeDataValue:observed isEqualToDataValue:expected]; + } + + // Now we have two structure-values. Make sure they have the same number of fields + // in them. + if (![observed[MTRValueKey] isKindOfClass:NSArray.class] || ![expected[MTRValueKey] isKindOfClass:NSArray.class]) { + // Malformed data, just claim not equivalent. + MTR_LOG_ERROR("%@ at least one of observed and expected value is not an NSArrray: %@, %@", self, observed, expected); + return NO; + } + + NSArray *> * observedArray = observed[MTRValueKey]; + NSArray *> * expectedArray = expected[MTRValueKey]; + + if (observedArray.count != expectedArray.count) { + return NO; + } + + for (NSDictionary * expectedField in expectedArray) { + if (![expectedField[MTRContextTagKey] isKindOfClass:NSNumber.class] || ![expectedField[MTRDataKey] isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ expected structure-value contains invalid field %@", self, expectedField); + return NO; + } + + NSNumber * expectedContextTag = expectedField[MTRContextTagKey]; + + // Make sure it's present in the other array. In practice, these are + // pretty small arrays, so the O(N^2) behavior here is ok. + BOOL found = NO; + for (NSDictionary * observedField in observedArray) { + if (![observedField[MTRContextTagKey] isKindOfClass:NSNumber.class] || ![observedField[MTRDataKey] isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ observed structure-value contains invalid field %@", self, observedField); + return NO; + } + + NSNumber * observedContextTag = observedField[MTRContextTagKey]; + if ([expectedContextTag isEqual:observedContextTag]) { + found = YES; + + // Compare the data. + if (![self _attributeDataValue:observedField[MTRDataKey] satisfiesValueExpectation:expectedField[MTRDataKey]]) { + return NO; + } + + // Found a match for the context tag, stop looking. + break; + } + } + + if (!found) { + // Context tag present in expected but not observed. + return NO; + } + } + + // All entries in the first field array matched entries in the second field + // array. Since the lengths are equal, the two arrays must match, as long + // as all the context tags listed are distinct. If someone produces invalid + // TLV with the same context tag set in it multiple times, this method could + // claim two structure-values are equivalent when the first has two fields + // with context tag N and the second has a field with context tag N and + // another field with context tag M. That should be ok, in practice, but if + // we discover it's not we will need a better algorithm here. It's not + // clear what "equivalent" should mean for such malformed TLV, expecially if + // the same context tag maps to different values in one of the structs. + return YES; +} + @end /* BEGIN DRAGONS: Note methods here cannot be renamed, and are used by private callers, do not rename, remove or modify behavior here */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h b/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h index 34e46b7ccd7ef3..53a6b2e6f914b7 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h +++ b/src/darwin/Framework/CHIP/MTRDeviceDataValueDictionary.h @@ -18,6 +18,9 @@ NS_ASSUME_NONNULL_BEGIN +/** + * A data-value as defined in MTRBaseDevice.h. + */ typedef NSDictionary * MTRDeviceDataValueDictionary; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 7276a5b5342eb1..2423e4e8769c45 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -3307,22 +3307,6 @@ - (void)_performScheduledExpirationCheck return nil; } -- (BOOL)_attributeDataValue:(NSDictionary *)one isEqualToDataValue:(NSDictionary *)theOther -{ - // Sanity check for nil cases - if (!one && !theOther) { - MTR_LOG_ERROR("%@ attribute data-value comparison does not expect comparing two nil dictionaries", self); - return YES; - } - if (!one || !theOther) { - // Comparing against nil is expected, and should return NO quietly - return NO; - } - - // Attribute data-value dictionaries are equal if type and value are equal, and specifically, this should return true if values are both nil - return [one[MTRTypeKey] isEqual:theOther[MTRTypeKey]] && ((one[MTRValueKey] == theOther[MTRValueKey]) || [one[MTRValueKey] isEqual:theOther[MTRValueKey]]); -} - // Utility to return data value dictionary without data version - (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue { @@ -3538,9 +3522,9 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray * attributeResponseValue in reportedAttributeValues) { MTRAttributePath * attributePath = attributeResponseValue[MTRAttributePathKey]; - NSDictionary * attributeDataValue = attributeResponseValue[MTRDataKey]; - NSError * attributeError = attributeResponseValue[MTRErrorKey]; - NSDictionary * previousValue; + MTRDeviceDataValueDictionary _Nullable attributeDataValue = attributeResponseValue[MTRDataKey]; + NSError * _Nullable attributeError = attributeResponseValue[MTRErrorKey]; + MTRDeviceDataValueDictionary _Nullable previousValue; // sanity check either data value or error must exist if (!attributeDataValue && !attributeError) { diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index f954979f131084..df4a8265538dfe 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -22,6 +22,7 @@ #import "MTRAsyncWorkQueue.h" #import "MTRDefines_Internal.h" +#import "MTRDeviceDataValueDictionary.h" #import "MTRDeviceStorageBehaviorConfiguration_Internal.h" NS_ASSUME_NONNULL_BEGIN @@ -164,6 +165,10 @@ MTR_DIRECT_MEMBERS - (void)controllerSuspended; - (void)controllerResumed; +// Methods for comparing attribute data values. +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)one isEqualToDataValue:(MTRDeviceDataValueDictionary)theOther; +- (BOOL)_attributeDataValue:(MTRDeviceDataValueDictionary)observed satisfiesValueExpectation:(MTRDeviceDataValueDictionary)expected; + @end #pragma mark - MTRDevice internal state monitoring diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 5fb3549a49216a..9d33649057ddb1 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -4467,6 +4467,358 @@ - (void)test039_GetAllAttributesReport } } +- (void)test040_AttributeValueExpectationSatisfaction +{ + __auto_type * device = [MTRDevice deviceWithNodeID:kDeviceId deviceController:sController]; + + __auto_type * testData = @[ + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7) + }, + // Equal unsigned integer should satisfy expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(9), + }, + // Unequal unsigned integer should not satisfy expectation + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + }, + @"observed" : @ { + MTRTypeKey : MTRSignedIntegerValueType, + MTRValueKey : @(7), + }, + // A signed integer does not satisfy expectation for an unsigned integer. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRNullValueType, + }, + @"observed" : @ { + MTRTypeKey : MTRNullValueType, + }, + // Null satisfies expectation for null. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + } + }, + ], + }, + // A longer list does not satisfy expectation for a shorter array. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(7), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + // A shorter list does not satisfy expectation for a longer array. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + // An observed array identical to an expected one satisfies the expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + } + }, + @{ + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(5), + } + }, + ], + }, + // An array with entries in a different order does not satisfy the expectation. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + // A struct that has the same fields in the same order satisfiess the + // expectation. + @"expectedComparison" : @(YES), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abcd"), + }, + }, + ], + }, + // A struct that has different fields in the same order does not + // satisfy the expectation. + @"expectedComparison" : @(NO), + }, + @{ + @"expected" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + ], + }, + @"observed" : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUTF8StringValueType, + MTRValueKey : @("abc"), + }, + }, + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(6), + }, + }, + ], + }, + // A struct that has the same fields in a different order satisfies + // the expectation. + @"expectedComparison" : @(YES), + }, + ]; + + for (NSDictionary * test in testData) { + XCTAssertEqual([device _attributeDataValue:test[@"observed"] satisfiesValueExpectation:test[@"expected"]], [test[@"expectedComparison"] boolValue], + "observed: %@, expected: %@", test[@"observed"], test[@"expected"]); + } +} + @end @interface MTRDeviceEncoderTests : XCTestCase diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h index 74a7dc280b1216..b00507d665a9f0 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h @@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_BEGIN @end @interface MTRDevice (Test) -- (BOOL)_attributeDataValue:(NSDictionary *)one isEqualToDataValue:(NSDictionary *)theOther; - (NSMutableArray *)arrayOfNumbersFromAttributeValue:(MTRDeviceDataValueDictionary)dataDictionary; - (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration; @end From ccaa0ed1409460709cb8b49238db273ef3cee922 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 22 Oct 2024 16:39:55 -0700 Subject: [PATCH 3/7] Add fabric-sync ad vscode debug target (#36197) --- .vscode/launch.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 898defc9c60fe1..fc821c76eb802c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -419,6 +419,14 @@ "cwd": "${workspaceFolder}" }, + { + "name": "Fabric Sync (Linux)", + "type": "lldb", + "request": "launch", + "program": "${workspaceFolder}/out/debug/standalone/fabric-sync", + "cwd": "${workspaceFolder}" + }, + { "name": "OTA Requestor App (Linux)", "type": "lldb", From b1277405bc754b6c17a1c4f4be03d7433d0470d1 Mon Sep 17 00:00:00 2001 From: Pradip De Date: Tue, 22 Oct 2024 18:04:14 -0700 Subject: [PATCH 4/7] Camera AVStreamMgmt xml updates (#36133) * Incorporate Spec modifications into the Camera AVStreamManagement Cluster xml. Name changes to Max content buffer size and On screen display names. Adjust constraints for Min and Max fragment len. * Corresponding ZAP Autogen code changes. --- .../camera-av-stream-management-cluster.xml | 22 +++++------ .../data_model/controller-clusters.matter | 4 +- .../chip/devicecontroller/ChipClusters.java | 14 +++---- .../devicecontroller/ClusterIDMapping.java | 2 +- .../devicecontroller/ClusterReadMapping.java | 10 ++--- .../CameraAvStreamManagementCluster.kt | 8 ++-- .../CHIPAttributeTLVValueDecoder.cpp | 4 +- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 6 +-- .../MTRAttributeSpecifiedCheck.mm | 2 +- .../MTRAttributeTLVValueDecoder.mm | 4 +- .../CHIP/zap-generated/MTRBaseClusters.h | 6 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 12 +++--- .../CHIP/zap-generated/MTRClusterConstants.h | 2 +- .../CHIP/zap-generated/MTRClusterNames.mm | 4 +- .../CHIP/zap-generated/MTRClusters.h | 2 +- .../CHIP/zap-generated/MTRClusters.mm | 4 +- .../zap-generated/attributes/Accessors.cpp | 4 +- .../zap-generated/attributes/Accessors.h | 4 +- .../zap-generated/cluster-objects.cpp | 4 +- .../zap-generated/cluster-objects.h | 8 ++-- .../app-common/zap-generated/ids/Attributes.h | 4 +- .../zap-generated/cluster/Commands.h | 10 ++--- .../cluster/logging/DataModelLogger.cpp | 4 +- .../cluster/logging/EntryToText.cpp | 4 +- .../zap-generated/cluster/Commands.h | 38 +++++++++---------- 26 files changed, 94 insertions(+), 94 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml index 463aa6af03f865..5cbf1d28ec89d3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. XML generated by Alchemy; DO NOT EDIT. Source: src/app_clusters/CameraAVStreamManagement.adoc Parameters: in-progress -Git: 0.9-fall2024-387-gfd3062545 +Git: 0.9-fall2024-411-g9835b5cd7 --> @@ -127,8 +127,8 @@ Git: 0.9-fall2024-387-gfd3062545 - - + + @@ -143,8 +143,8 @@ Git: 0.9-fall2024-387-gfd3062545 - - + + Camera AV Stream Management 0x0551 CAMERA_AV_STREAM_MANAGEMENT_CLUSTER @@ -172,7 +172,7 @@ Git: 0.9-fall2024-387-gfd3062545 - + @@ -187,7 +187,7 @@ Git: 0.9-fall2024-387-gfd3062545 NightVisionCapable MinViewport RateDistortionTradeOffPoints - MaxPreRollBufferSize + MaxContentBufferSize MicrophoneCapabilities SpeakerCapabilities TwoWayTalkSupport @@ -345,8 +345,8 @@ Git: 0.9-fall2024-387-gfd3062545 - - + + @@ -447,8 +447,8 @@ Git: 0.9-fall2024-387-gfd3062545 - - + + This event SHALL be generated when there is a modification in the corresponding video stream. diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d663a5f018a217..24c7e00c623b53 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -9527,7 +9527,7 @@ provisional cluster ZoneManagement = 1360 { } /** The Camera AV Stream Management cluster is used to allow clients to manage, control, and configure various audio, video, and snapshot streams on a camera. */ -cluster CameraAvStreamManagement = 1361 { +provisional cluster CameraAvStreamManagement = 1361 { revision 1; enum AudioCodecEnum : enum8 { @@ -9695,7 +9695,7 @@ cluster CameraAvStreamManagement = 1361 { readonly attribute optional boolean nightVisionCapable = 3; readonly attribute optional VideoResolutionStruct minViewport = 4; readonly attribute optional RateDistortionTradeOffPointsStruct rateDistortionTradeOffPoints[] = 5; - readonly attribute optional int32u maxPreRollBufferSize = 6; + readonly attribute optional int32u maxContentBufferSize = 6; readonly attribute optional AudioCapabilitiesStruct microphoneCapabilities = 7; readonly attribute optional AudioCapabilitiesStruct speakerCapabilities = 8; readonly attribute optional TwoWayTalkSupportTypeEnum twoWayTalkSupport = 9; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index dff134bddd1a18..06b8dd8ff0b54c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -59730,7 +59730,7 @@ public static class CameraAvStreamManagementCluster extends BaseChipCluster { private static final long NIGHT_VISION_CAPABLE_ATTRIBUTE_ID = 3L; private static final long MIN_VIEWPORT_ATTRIBUTE_ID = 4L; private static final long RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID = 5L; - private static final long MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID = 6L; + private static final long MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID = 6L; private static final long MICROPHONE_CAPABILITIES_ATTRIBUTE_ID = 7L; private static final long SPEAKER_CAPABILITIES_ATTRIBUTE_ID = 8L; private static final long TWO_WAY_TALK_SUPPORT_ATTRIBUTE_ID = 9L; @@ -60418,9 +60418,9 @@ public void onSuccess(byte[] tlv) { }, RATE_DISTORTION_TRADE_OFF_POINTS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxPreRollBufferSizeAttribute( + public void readMaxContentBufferSizeAttribute( LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -60428,12 +60428,12 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID, true); + }, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, true); } - public void subscribeMaxPreRollBufferSizeAttribute( + public void subscribeMaxContentBufferSizeAttribute( LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -60441,7 +60441,7 @@ public void onSuccess(byte[] tlv) { Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_PRE_ROLL_BUFFER_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_CONTENT_BUFFER_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readMicrophoneCapabilitiesAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index a43df66e40bf0a..354f49ed6caa5d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -17079,7 +17079,7 @@ public enum Attribute { NightVisionCapable(3L), MinViewport(4L), RateDistortionTradeOffPoints(5L), - MaxPreRollBufferSize(6L), + MaxContentBufferSize(6L), MicrophoneCapabilities(7L), SpeakerCapabilities(8L), TwoWayTalkSupport(9L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 9abbcd879c5503..843114b4374f58 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -18340,17 +18340,17 @@ private static Map readCameraAvStreamManagementInteract readCameraAvStreamManagementRateDistortionTradeOffPointsCommandParams ); result.put("readRateDistortionTradeOffPointsAttribute", readCameraAvStreamManagementRateDistortionTradeOffPointsAttributeInteractionInfo); - Map readCameraAvStreamManagementMaxPreRollBufferSizeCommandParams = new LinkedHashMap(); - InteractionInfo readCameraAvStreamManagementMaxPreRollBufferSizeAttributeInteractionInfo = new InteractionInfo( + Map readCameraAvStreamManagementMaxContentBufferSizeCommandParams = new LinkedHashMap(); + InteractionInfo readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxPreRollBufferSizeAttribute( + ((ChipClusters.CameraAvStreamManagementCluster) cluster).readMaxContentBufferSizeAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readCameraAvStreamManagementMaxPreRollBufferSizeCommandParams + readCameraAvStreamManagementMaxContentBufferSizeCommandParams ); - result.put("readMaxPreRollBufferSizeAttribute", readCameraAvStreamManagementMaxPreRollBufferSizeAttributeInteractionInfo); + result.put("readMaxContentBufferSizeAttribute", readCameraAvStreamManagementMaxContentBufferSizeAttributeInteractionInfo); Map readCameraAvStreamManagementTwoWayTalkSupportCommandParams = new LinkedHashMap(); InteractionInfo readCameraAvStreamManagementTwoWayTalkSupportAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt index c9f6d50d065f8f..c0993403079dbf 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CameraAvStreamManagementCluster.kt @@ -1327,7 +1327,7 @@ class CameraAvStreamManagementCluster( } } - suspend fun readMaxPreRollBufferSizeAttribute(): UInt? { + suspend fun readMaxContentBufferSizeAttribute(): UInt? { val ATTRIBUTE_ID: UInt = 6u val attributePath = @@ -1349,7 +1349,7 @@ class CameraAvStreamManagementCluster( it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Maxprerollbuffersize attribute not found in response" } + requireNotNull(attributeData) { "Maxcontentbuffersize attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -1363,7 +1363,7 @@ class CameraAvStreamManagementCluster( return decodedValue } - suspend fun subscribeMaxPreRollBufferSizeAttribute( + suspend fun subscribeMaxContentBufferSizeAttribute( minInterval: Int, maxInterval: Int, ): Flow { @@ -1399,7 +1399,7 @@ class CameraAvStreamManagementCluster( .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } requireNotNull(attributeData) { - "Maxprerollbuffersize attribute not found in Node State update" + "Maxcontentbuffersize attribute not found in Node State update" } // Decode the TLV data into the appropriate type diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index c49674fbbefe7e..c8247c5d4d31a8 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -40112,8 +40112,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::MaxPreRollBufferSize::Id: { - using TypeInfo = Attributes::MaxPreRollBufferSize::TypeInfo; + case Attributes::MaxContentBufferSize::Id: { + using TypeInfo = Attributes::MaxContentBufferSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 395506b33bb843..08f8182e6b6886 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -12543,7 +12543,7 @@ class ChipClusters: "reportable": True, }, 0x00000006: { - "attributeName": "MaxPreRollBufferSize", + "attributeName": "MaxContentBufferSize", "attributeId": 0x00000006, "type": "int", "reportable": True, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0cdc2a54549cce..b7b73282715a22 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -44779,7 +44779,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="nightVisionCapable", Tag=0x00000003, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="minViewport", Tag=0x00000004, Type=typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct]), ClusterObjectFieldDescriptor(Label="rateDistortionTradeOffPoints", Tag=0x00000005, Type=typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]]), - ClusterObjectFieldDescriptor(Label="maxPreRollBufferSize", Tag=0x00000006, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="maxContentBufferSize", Tag=0x00000006, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="microphoneCapabilities", Tag=0x00000007, Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]), ClusterObjectFieldDescriptor(Label="speakerCapabilities", Tag=0x00000008, Type=typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct]), ClusterObjectFieldDescriptor(Label="twoWayTalkSupport", Tag=0x00000009, Type=typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum]), @@ -44833,7 +44833,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: nightVisionCapable: typing.Optional[bool] = None minViewport: typing.Optional[CameraAvStreamManagement.Structs.VideoResolutionStruct] = None rateDistortionTradeOffPoints: typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]] = None - maxPreRollBufferSize: typing.Optional[uint] = None + maxContentBufferSize: typing.Optional[uint] = None microphoneCapabilities: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None speakerCapabilities: typing.Optional[CameraAvStreamManagement.Structs.AudioCapabilitiesStruct] = None twoWayTalkSupport: typing.Optional[CameraAvStreamManagement.Enums.TwoWayTalkSupportTypeEnum] = None @@ -45561,7 +45561,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: typing.Optional[typing.List[CameraAvStreamManagement.Structs.RateDistortionTradeOffPointsStruct]] = None @dataclass - class MaxPreRollBufferSize(ClusterAttributeDescriptor): + class MaxContentBufferSize(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000551 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 5495d6a9d7a0ca..43e0528c252c14 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -5613,7 +5613,7 @@ static BOOL AttributeIsSpecifiedInCameraAVStreamManagementCluster(AttributeId aA case Attributes::RateDistortionTradeOffPoints::Id: { return YES; } - case Attributes::MaxPreRollBufferSize::Id: { + case Attributes::MaxContentBufferSize::Id: { return YES; } case Attributes::MicrophoneCapabilities::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index b894c30f6cfc8e..16f882fe473a43 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -16999,8 +16999,8 @@ static id _Nullable DecodeAttributeValueForCameraAVStreamManagementCluster(Attri } return value; } - case Attributes::MaxPreRollBufferSize::Id: { - using TypeInfo = Attributes::MaxPreRollBufferSize::TypeInfo; + case Attributes::MaxContentBufferSize::Id: { + using TypeInfo = Attributes::MaxContentBufferSize::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index d3f7ba442b3c80..9c1755c5414f8f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -14260,11 +14260,11 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeRateDistortionTradeOffPointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeMaxPreRollBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeMaxPreRollBufferSizeWithParams:(MTRSubscribeParams *)params +- (void)readAttributeMaxContentBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxContentBufferSizeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMaxPreRollBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxContentBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeMicrophoneCapabilitiesWithCompletion:(void (^)(MTRCameraAVStreamManagementClusterAudioCapabilitiesStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeMicrophoneCapabilitiesWithParams:(MTRSubscribeParams *)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index eb2a2f5687c1f5..3c347c4472e132 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -98643,9 +98643,9 @@ + (void)readAttributeRateDistortionTradeOffPointsWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeMaxPreRollBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxContentBufferSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::TypeInfo; + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98654,11 +98654,11 @@ - (void)readAttributeMaxPreRollBufferSizeWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeMaxPreRollBufferSizeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMaxContentBufferSizeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::TypeInfo; + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98668,9 +98668,9 @@ - (void)subscribeAttributeMaxPreRollBufferSizeWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxPreRollBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxContentBufferSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::TypeInfo; + using TypeInfo = CameraAvStreamManagement::Attributes::MaxContentBufferSize::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 7ee2c7d88af1c0..b1d26e9ce0fb12 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -4641,7 +4641,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeNightVisionCapableID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMinViewportID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRateDistortionTradeOffPointsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxPreRollBufferSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneCapabilitiesID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeSpeakerCapabilitiesID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeTwoWayTalkSupportID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 08373371a7c5e2..ef41bc6487b379 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -7751,8 +7751,8 @@ result = @"RateDistortionTradeOffPoints"; break; - case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxPreRollBufferSizeID: - result = @"MaxPreRollBufferSize"; + case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID: + result = @"MaxContentBufferSize"; break; case MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMicrophoneCapabilitiesID: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index d9ca769e250aaa..111cab13f8af49 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -6660,7 +6660,7 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeRateDistortionTradeOffPointsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeMaxPreRollBufferSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxContentBufferSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMicrophoneCapabilitiesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 0923caca7cead0..b473aed7020e46 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -19454,9 +19454,9 @@ - (void)setImageFlipVerticalWithParams:(MTRCameraAVStreamManagementClusterSetIma return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeRateDistortionTradeOffPointsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxPreRollBufferSizeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxContentBufferSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxPreRollBufferSizeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCameraAVStreamManagementID) attributeID:@(MTRAttributeIDTypeClusterCameraAVStreamManagementAttributeMaxContentBufferSizeID) params:params]; } - (NSDictionary * _Nullable)readAttributeMicrophoneCapabilitiesWithParams:(MTRReadParams * _Nullable)params diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 382c808a78cc62..762cedbf1b5aa3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -37056,7 +37056,7 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) } // namespace NightVisionCapable -namespace MaxPreRollBufferSize { +namespace MaxContentBufferSize { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { @@ -37101,7 +37101,7 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) return emberAfWriteAttribute(endpoint, Clusters::CameraAvStreamManagement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -} // namespace MaxPreRollBufferSize +} // namespace MaxContentBufferSize namespace TwoWayTalkSupport { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index e0a965b732a743..98aebd50964980 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -5620,11 +5620,11 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace NightVisionCapable -namespace MaxPreRollBufferSize { +namespace MaxContentBufferSize { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace MaxPreRollBufferSize +} // namespace MaxContentBufferSize namespace TwoWayTalkSupport { Protocols::InteractionModel::Status diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 7e9752db4a888c..111324e9cb51ae 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -30138,8 +30138,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, minViewport); case Attributes::RateDistortionTradeOffPoints::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, rateDistortionTradeOffPoints); - case Attributes::MaxPreRollBufferSize::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, maxPreRollBufferSize); + case Attributes::MaxContentBufferSize::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxContentBufferSize); case Attributes::MicrophoneCapabilities::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, microphoneCapabilities); case Attributes::SpeakerCapabilities::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 4ec96663f8becd..d7f69cc3818e3e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -41980,7 +41980,7 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace RateDistortionTradeOffPoints -namespace MaxPreRollBufferSize { +namespace MaxContentBufferSize { struct TypeInfo { using Type = uint32_t; @@ -41988,10 +41988,10 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::CameraAvStreamManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPreRollBufferSize::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxContentBufferSize::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxPreRollBufferSize +} // namespace MaxContentBufferSize namespace MicrophoneCapabilities { struct TypeInfo { @@ -42529,7 +42529,7 @@ struct TypeInfo Attributes::NightVisionCapable::TypeInfo::DecodableType nightVisionCapable = static_cast(0); Attributes::MinViewport::TypeInfo::DecodableType minViewport; Attributes::RateDistortionTradeOffPoints::TypeInfo::DecodableType rateDistortionTradeOffPoints; - Attributes::MaxPreRollBufferSize::TypeInfo::DecodableType maxPreRollBufferSize = static_cast(0); + Attributes::MaxContentBufferSize::TypeInfo::DecodableType maxContentBufferSize = static_cast(0); Attributes::MicrophoneCapabilities::TypeInfo::DecodableType microphoneCapabilities; Attributes::SpeakerCapabilities::TypeInfo::DecodableType speakerCapabilities; Attributes::TwoWayTalkSupport::TypeInfo::DecodableType twoWayTalkSupport = diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 8ee5cb21be8e31..e9375f5dad786a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -6890,9 +6890,9 @@ namespace RateDistortionTradeOffPoints { static constexpr AttributeId Id = 0x00000005; } // namespace RateDistortionTradeOffPoints -namespace MaxPreRollBufferSize { +namespace MaxContentBufferSize { static constexpr AttributeId Id = 0x00000006; -} // namespace MaxPreRollBufferSize +} // namespace MaxContentBufferSize namespace MicrophoneCapabilities { static constexpr AttributeId Id = 0x00000007; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index afcc2abd01d6fb..4ee3c3e1f98afa 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -13732,7 +13732,7 @@ class ZoneManagementRemoveZone : public ClusterCommand | * NightVisionCapable | 0x0003 | | * MinViewport | 0x0004 | | * RateDistortionTradeOffPoints | 0x0005 | -| * MaxPreRollBufferSize | 0x0006 | +| * MaxContentBufferSize | 0x0006 | | * MicrophoneCapabilities | 0x0007 | | * SpeakerCapabilities | 0x0008 | | * TwoWayTalkSupport | 0x0009 | @@ -26925,7 +26925,7 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu make_unique(Id, "min-viewport", Attributes::MinViewport::Id, credsIssuerConfig), // make_unique(Id, "rate-distortion-trade-off-points", Attributes::RateDistortionTradeOffPoints::Id, credsIssuerConfig), // - make_unique(Id, "max-pre-roll-buffer-size", Attributes::MaxPreRollBufferSize::Id, credsIssuerConfig), // + make_unique(Id, "max-content-buffer-size", Attributes::MaxContentBufferSize::Id, credsIssuerConfig), // make_unique(Id, "microphone-capabilities", Attributes::MicrophoneCapabilities::Id, credsIssuerConfig), // make_unique(Id, "speaker-capabilities", Attributes::SpeakerCapabilities::Id, credsIssuerConfig), // make_unique(Id, "two-way-talk-support", Attributes::TwoWayTalkSupport::Id, credsIssuerConfig), // @@ -26993,7 +26993,7 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu const chip::app::Clusters::CameraAvStreamManagement::Structs::RateDistortionTradeOffPointsStruct::Type>>>( Id, "rate-distortion-trade-off-points", Attributes::RateDistortionTradeOffPoints::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "max-pre-roll-buffer-size", 0, UINT32_MAX, Attributes::MaxPreRollBufferSize::Id, + make_unique>(Id, "max-content-buffer-size", 0, UINT32_MAX, Attributes::MaxContentBufferSize::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>( Id, "microphone-capabilities", Attributes::MicrophoneCapabilities::Id, WriteCommandType::kForceWrite, @@ -27114,8 +27114,8 @@ void registerClusterCameraAvStreamManagement(Commands & commands, CredentialIssu make_unique(Id, "night-vision-capable", Attributes::NightVisionCapable::Id, credsIssuerConfig), // make_unique(Id, "min-viewport", Attributes::MinViewport::Id, credsIssuerConfig), // make_unique(Id, "rate-distortion-trade-off-points", Attributes::RateDistortionTradeOffPoints::Id, - credsIssuerConfig), // - make_unique(Id, "max-pre-roll-buffer-size", Attributes::MaxPreRollBufferSize::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "max-content-buffer-size", Attributes::MaxContentBufferSize::Id, credsIssuerConfig), // make_unique(Id, "microphone-capabilities", Attributes::MicrophoneCapabilities::Id, credsIssuerConfig), // make_unique(Id, "speaker-capabilities", Attributes::SpeakerCapabilities::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 8a0e26cbca4bc1..ac4e3adbbbebc3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -18513,10 +18513,10 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RateDistortionTradeOffPoints", 1, value); } - case CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::Id: { + case CameraAvStreamManagement::Attributes::MaxContentBufferSize::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxPreRollBufferSize", 1, value); + return DataModelLogger::LogValue("MaxContentBufferSize", 1, value); } case CameraAvStreamManagement::Attributes::MicrophoneCapabilities::Id: { chip::app::Clusters::CameraAvStreamManagement::Structs::AudioCapabilitiesStruct::DecodableType value; 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 a5739f1228aad6..0b5178d3bcb208 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -4181,8 +4181,8 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "MinViewport"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::RateDistortionTradeOffPoints::Id: return "RateDistortionTradeOffPoints"; - case chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::Id: - return "MaxPreRollBufferSize"; + case chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxContentBufferSize::Id: + return "MaxContentBufferSize"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::MicrophoneCapabilities::Id: return "MicrophoneCapabilities"; case chip::app::Clusters::CameraAvStreamManagement::Attributes::SpeakerCapabilities::Id: diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 4dc01523ea8db8..bf6bff38ba079b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -150650,7 +150650,7 @@ class SubscribeAttributeZoneManagementClusterRevision : public SubscribeAttribut | * NightVisionCapable | 0x0003 | | * MinViewport | 0x0004 | | * RateDistortionTradeOffPoints | 0x0005 | -| * MaxPreRollBufferSize | 0x0006 | +| * MaxContentBufferSize | 0x0006 | | * MicrophoneCapabilities | 0x0007 | | * SpeakerCapabilities | 0x0008 | | * TwoWayTalkSupport | 0x0009 | @@ -152134,34 +152134,34 @@ class SubscribeAttributeCameraAvStreamManagementRateDistortionTradeOffPoints : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxPreRollBufferSize + * Attribute MaxContentBufferSize */ -class ReadCameraAvStreamManagementMaxPreRollBufferSize : public ReadAttribute { +class ReadCameraAvStreamManagementMaxContentBufferSize : public ReadAttribute { public: - ReadCameraAvStreamManagementMaxPreRollBufferSize() - : ReadAttribute("max-pre-roll-buffer-size") + ReadCameraAvStreamManagementMaxContentBufferSize() + : ReadAttribute("max-content-buffer-size") { } - ~ReadCameraAvStreamManagementMaxPreRollBufferSize() + ~ReadCameraAvStreamManagementMaxContentBufferSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvStreamManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxContentBufferSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBaseClusterCameraAVStreamManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPreRollBufferSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CameraAVStreamManagement.MaxPreRollBufferSize response %@", [value description]); + [cluster readAttributeMaxContentBufferSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CameraAVStreamManagement.MaxContentBufferSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CameraAVStreamManagement MaxPreRollBufferSize read Error", error); + LogNSError("CameraAVStreamManagement MaxContentBufferSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152170,21 +152170,21 @@ class ReadCameraAvStreamManagementMaxPreRollBufferSize : public ReadAttribute { } }; -class SubscribeAttributeCameraAvStreamManagementMaxPreRollBufferSize : public SubscribeAttribute { +class SubscribeAttributeCameraAvStreamManagementMaxContentBufferSize : public SubscribeAttribute { public: - SubscribeAttributeCameraAvStreamManagementMaxPreRollBufferSize() - : SubscribeAttribute("max-pre-roll-buffer-size") + SubscribeAttributeCameraAvStreamManagementMaxContentBufferSize() + : SubscribeAttribute("max-content-buffer-size") { } - ~SubscribeAttributeCameraAvStreamManagementMaxPreRollBufferSize() + ~SubscribeAttributeCameraAvStreamManagementMaxContentBufferSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::CameraAvStreamManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxPreRollBufferSize::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CameraAvStreamManagement::Attributes::MaxContentBufferSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @@ -152199,10 +152199,10 @@ class SubscribeAttributeCameraAvStreamManagementMaxPreRollBufferSize : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPreRollBufferSizeWithParams:params + [cluster subscribeAttributeMaxContentBufferSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CameraAVStreamManagement.MaxPreRollBufferSize response %@", [value description]); + NSLog(@"CameraAVStreamManagement.MaxContentBufferSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -181984,8 +181984,8 @@ void registerClusterCameraAvStreamManagement(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // From 631ad4376d50f947ad4cd0d296b2adfd9f718371 Mon Sep 17 00:00:00 2001 From: Raul Marquez <130402456+raul-marquez-csa@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:51:46 -0700 Subject: [PATCH 5/7] Removes test case scripts (#36185) --- .../certification/Test_TC_DISHM_3_1.yaml | 219 ------ .../certification/Test_TC_DISHM_3_2.yaml | 237 ------ .../certification/Test_TC_DISHM_3_3.yaml | 274 ------- .../suites/certification/Test_TC_LWM_3_1.yaml | 134 ---- .../suites/certification/Test_TC_LWM_3_2.yaml | 172 ----- .../suites/certification/Test_TC_LWM_3_3.yaml | 189 ----- .../suites/certification/Test_TC_MOD_1_3.yaml | 722 ------------------ .../certification/Test_TC_OTCCM_3_1.yaml | 131 ---- .../certification/Test_TC_OTCCM_3_2.yaml | 171 ----- .../certification/Test_TC_OTCCM_3_3.yaml | 187 ----- .../certification/Test_TC_TCCM_3_1.yaml | 127 --- .../certification/Test_TC_TCCM_3_2.yaml | 176 ----- .../certification/Test_TC_TCCM_3_3.yaml | 195 ----- 13 files changed, 2934 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml delete mode 100644 src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml deleted file mode 100644 index 5b3cbf40b3b5d5..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_1.yaml +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.4.1. [TC-DISHM-3.1] On Mode functionality with DUT as Server - -PICS: - - DISHM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Precondition" - verification: | - 1 Dishwasher Mode and OnOff clusters are available on the same endpoint - - 2 The OnMode attribute is set to a non-NULL value from the mode values indicated by the SupportedModes attribute. - - Read the SupportedModes attribute, select a value from SupportedModes and save the value as OnMode_value - - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify the list of SupportedModes and below is the sample log provided for the raspi platform: - - [1692170674.471882][3058:3061] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 2502960191 - [1692170674.472010][3058:3061] CHIP:TOO: SupportedModes: 3 entries - [1692170674.472081][3058:3061] CHIP:TOO: [1]: { - [1692170674.472110][3058:3061] CHIP:TOO: Label: Normal - [1692170674.472135][3058:3061] CHIP:TOO: Mode: 0 - [1692170674.472163][3058:3061] CHIP:TOO: ModeTags: 1 entries - [1692170674.472223][3058:3061] CHIP:TOO: [1]: { - [1692170674.472252][3058:3061] CHIP:TOO: Value: 16384 - [1692170674.472288][3058:3061] CHIP:TOO: } - [1692170674.472314][3058:3061] CHIP:TOO: } - [1692170674.472385][3058:3061] CHIP:TOO: [2]: { - [1692170674.472411][3058:3061] CHIP:TOO: Label: Heavy - [1692170674.472435][3058:3061] CHIP:TOO: Mode: 1 - [1692170674.472475][3058:3061] CHIP:TOO: ModeTags: 2 entries - [1692170674.472506][3058:3061] CHIP:TOO: [1]: { - [1692170674.472542][3058:3061] CHIP:TOO: Value: 7 - [1692170674.472567][3058:3061] CHIP:TOO: } - [1692170674.472595][3058:3061] CHIP:TOO: [2]: { - [1692170674.472632][3058:3061] CHIP:TOO: Value: 16385 - [1692170674.472658][3058:3061] CHIP:TOO: } - [1692170674.472683][3058:3061] CHIP:TOO: } - [1692170674.472730][3058:3061] CHIP:TOO: [3]: { - [1692170674.472755][3058:3061] CHIP:TOO: Label: Light - [1692170674.472778][3058:3061] CHIP:TOO: Mode: 2 - [1692170674.472820][3058:3061] CHIP:TOO: ModeTags: 3 entries - [1692170674.472851][3058:3061] CHIP:TOO: [1]: { - [1692170674.472886][3058:3061] CHIP:TOO: Value: 16386 - [1692170674.472910][3058:3061] CHIP:TOO: } - [1692170674.472938][3058:3061] CHIP:TOO: [2]: { - [1692170674.472973][3058:3061] CHIP:TOO: Value: 8 - [1692170674.472996][3058:3061] CHIP:TOO: } - [1692170674.473024][3058:3061] CHIP:TOO: [3]: { - [1692170674.473048][3058:3061] CHIP:TOO: Value: 2 - [1692170674.473071][3058:3061] CHIP:TOO: } - [1692170674.473095][3058:3061] CHIP:TOO: } - - Set the OnMode attribute value to OnMode_value - - ./chip-tool dishwashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify DUT responds with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1692170913.264454][3071:3073] CHIP:DMG: StatusIB = - [1692170913.264489][3071:3073] CHIP:DMG: { - [1692170913.264522][3071:3073] CHIP:DMG: status = 0x00 (SUCCESS), - [1692170913.264557][3071:3073] CHIP:DMG: }, - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an Integer - Save the value as on_mode_dut and below is the sample log provided for the raspi platform, here OnMode value is 0 - - [1690188734.934221][15978:15980] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 74242734 - [1690188734.934259][15978:15980] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute is an integer. - Save the value as old_current_mode_dut and below is the sample log provided for the raspi platform, Here CurrentMode value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 4. Else proceed to step 6. - - [1690188747.957507][15982:15984] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242734 - [1690188747.957564][15982:15984] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from on_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690188771.532158][15986:15988] CHIP:DMG: } - [1690188771.532258][15986:15988] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242734 - [1690188771.532287][15986:15988] CHIP:TOO: SupportedModes: 3 entries - [1690188771.532305][15986:15988] CHIP:TOO: [1]: { - [1690188771.532309][15986:15988] CHIP:TOO: Label: Normal - [1690188771.532316][15986:15988] CHIP:TOO: Mode: 0 - [1690188771.532321][15986:15988] CHIP:TOO: ModeTags: 1 entries - [1690188771.532327][15986:15988] CHIP:TOO: [1]: { - [1690188771.532331][15986:15988] CHIP:TOO: Value: 16384 - [1690188771.532334][15986:15988] CHIP:TOO: } - [1690188771.532338][15986:15988] CHIP:TOO: } - [1690188771.532345][15986:15988] CHIP:TOO: [2]: { - [1690188771.532348][15986:15988] CHIP:TOO: Label: Heavy - [1690188771.532352][15986:15988] CHIP:TOO: Mode: 1 - [1690188771.532358][15986:15988] CHIP:TOO: ModeTags: 2 entries - [1690188771.532363][15986:15988] CHIP:TOO: [1]: { - [1690188771.532366][15986:15988] CHIP:TOO: Value: 7 - [1690188771.532368][15986:15988] CHIP:TOO: } - [1690188771.532372][15986:15988] CHIP:TOO: [2]: { - [1690188771.532374][15986:15988] CHIP:TOO: Value: 16385 - [1690188771.532376][15986:15988] CHIP:TOO: } - [1690188771.532379][15986:15988] CHIP:TOO: } - [1690188771.532386][15986:15988] CHIP:TOO: [3]: { - [1690188771.532388][15986:15988] CHIP:TOO: Label: Light - [1690188771.532390][15986:15988] CHIP:TOO: Mode: 2 - [1690188771.532395][15986:15988] CHIP:TOO: ModeTags: 3 entries - [1690188771.532398][15986:15988] CHIP:TOO: [1]: { - [1690188771.532401][15986:15988] CHIP:TOO: Value: 16386 - [1690188771.532403][15986:15988] CHIP:TOO: } - [1690188771.532406][15986:15988] CHIP:TOO: [2]: { - [1690188771.532409][15986:15988] CHIP:TOO: Value: 8 - [1690188771.532411][15986:15988] CHIP:TOO: } - [1690188771.532414][15986:15988] CHIP:TOO: [3]: { - [1690188771.532417][15986:15988] CHIP:TOO: Value: 2 - [1690188771.532419][15986:15988] CHIP:TOO: } - [1690188771.532421][15986:15988] CHIP:TOO: } - disabled: true - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690198333.074192][17405:17407] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 - [1690198333.074208][17405:17407] CHIP:TOO: ChangeToModeResponse: { - [1690198333.074213][17405:17407] CHIP:TOO: status: 0 - [1690198333.074216][17405:17407] CHIP:TOO: } - disabled: true - - - label: "Step 6: TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff off 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931101.118659][20709:20711] CHIP:DMG: { - [1684931101.118663][20709:20711] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931101.118665][20709:20711] CHIP:DMG: }, - disabled: true - - - label: "Step 7: TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - verification: | - ./chip-tool onoff on 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1684931217.055517][20729:20731] CHIP:DMG: { - [1684931217.055520][20729:20731] CHIP:DMG: status = 0x00 (SUCCESS), - [1684931217.055523][20729:20731] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and equal to on_mode_dut, below is the sample log provided for the raspi platform, here CurrentMode attribute value is 0 - - [1690188859.713934][16004:16006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 74242736 - [1690188859.713980][16004:16006] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml deleted file mode 100644 index c53124e903fb7a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_2.yaml +++ /dev/null @@ -1,237 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 263.4.2. [TC-DISHM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - DISHM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Preconditions" - verification: | - !DISHM.S.F00 | OnOff cluster’s StartUpOnOff attribute is NULL | StartUpOnOff is 0 | OnMode is NULL - disabled: true - - - label: "Note" - verification: | - To Execute the TC-DISHM-3.2 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer or null - - Save the value as startup_mode_dut and below is the sample log provided for the raspi platform, Here StartUpMode value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 - [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 - [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries - [1690188996.754248][16022:16024] CHIP:TOO: [1]: { - [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal - [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 - [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries - [1690188996.754302][16022:16024] CHIP:TOO: [1]: { - [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 - [1690188996.754325][16022:16024] CHIP:TOO: } - [1690188996.754336][16022:16024] CHIP:TOO: } - [1690188996.754360][16022:16024] CHIP:TOO: [2]: { - [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy - [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 - [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries - [1690188996.754407][16022:16024] CHIP:TOO: [1]: { - [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 - [1690188996.754425][16022:16024] CHIP:TOO: } - [1690188996.754439][16022:16024] CHIP:TOO: [2]: { - [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 - [1690188996.754459][16022:16024] CHIP:TOO: } - [1690188996.754469][16022:16024] CHIP:TOO: } - [1690188996.754493][16022:16024] CHIP:TOO: [3]: { - [1690188996.754501][16022:16024] CHIP:TOO: Label: Light - [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 - [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries - [1690188996.754564][16022:16024] CHIP:TOO: [1]: { - [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 - [1690188996.754583][16022:16024] CHIP:TOO: } - [1690188996.754597][16022:16024] CHIP:TOO: [2]: { - [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 - [1690188996.754615][16022:16024] CHIP:TOO: } - [1690188996.754629][16022:16024] CHIP:TOO: [3]: { - [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 - [1690188996.754646][16022:16024] CHIP:TOO: } - [1690188996.754654][16022:16024] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690188912.259778][16011:16013] CHIP:DMG: { - [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188912.259800][16011:16013] CHIP:DMG: }, - [1690188912.259813][16011:16013] CHIP:DMG: - - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . - - [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 - [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value - - Save the value as old_current_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_current_mode_dut proceed to step 6. Else proceed to step 8. - - [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 - [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690188996.754102][16022:16024] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 74242738 - [1690188996.754208][16022:16024] CHIP:TOO: SupportedModes: 3 entries - [1690188996.754248][16022:16024] CHIP:TOO: [1]: { - [1690188996.754258][16022:16024] CHIP:TOO: Label: Normal - [1690188996.754270][16022:16024] CHIP:TOO: Mode: 0 - [1690188996.754285][16022:16024] CHIP:TOO: ModeTags: 1 entries - [1690188996.754302][16022:16024] CHIP:TOO: [1]: { - [1690188996.754314][16022:16024] CHIP:TOO: Value: 16384 - [1690188996.754325][16022:16024] CHIP:TOO: } - [1690188996.754336][16022:16024] CHIP:TOO: } - [1690188996.754360][16022:16024] CHIP:TOO: [2]: { - [1690188996.754369][16022:16024] CHIP:TOO: Label: Heavy - [1690188996.754378][16022:16024] CHIP:TOO: Mode: 1 - [1690188996.754393][16022:16024] CHIP:TOO: ModeTags: 2 entries - [1690188996.754407][16022:16024] CHIP:TOO: [1]: { - [1690188996.754416][16022:16024] CHIP:TOO: Value: 7 - [1690188996.754425][16022:16024] CHIP:TOO: } - [1690188996.754439][16022:16024] CHIP:TOO: [2]: { - [1690188996.754450][16022:16024] CHIP:TOO: Value: 16385 - [1690188996.754459][16022:16024] CHIP:TOO: } - [1690188996.754469][16022:16024] CHIP:TOO: } - [1690188996.754493][16022:16024] CHIP:TOO: [3]: { - [1690188996.754501][16022:16024] CHIP:TOO: Label: Light - [1690188996.754511][16022:16024] CHIP:TOO: Mode: 2 - [1690188996.754548][16022:16024] CHIP:TOO: ModeTags: 3 entries - [1690188996.754564][16022:16024] CHIP:TOO: [1]: { - [1690188996.754574][16022:16024] CHIP:TOO: Value: 16386 - [1690188996.754583][16022:16024] CHIP:TOO: } - [1690188996.754597][16022:16024] CHIP:TOO: [2]: { - [1690188996.754606][16022:16024] CHIP:TOO: Value: 8 - [1690188996.754615][16022:16024] CHIP:TOO: } - [1690188996.754629][16022:16024] CHIP:TOO: [3]: { - [1690188996.754638][16022:16024] CHIP:TOO: Value: 2 - [1690188996.754646][16022:16024] CHIP:TOO: } - [1690188996.754654][16022:16024] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: DISHM.S.C00.Rsp - verification: | - ./chip-tool dishwashermode change-to-mode 2 1 1 - - Verify on TH(chip-tool) log, DUT responds contains a ChangeToModeResponse command with a SUCCESS (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690265961.529808][30174:30176] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Command 0x0000_0001 - [1690265961.529857][30174:30176] CHIP:TOO: ChangeToModeResponse: { - [1690265961.529880][30174:30176] CHIP:TOO: status: 0 - [1690265961.529891][30174:30176] CHIP:TOO: } - disabled: true - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify StartUpMode attribute value is an integer. - - Save the value as new_start_up_mode_dut and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode value is 0 - - [1690188941.380388][16015:16017] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 74242738 - [1690188941.380430][16015:16017] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_start_up_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 0 - - [1690189040.789208][16040:16042] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 1012425326 - [1690189040.789223][16040:16042] CHIP:TOO: CurrentMode: 0 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml deleted file mode 100644 index c9e788d45a6eef..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_DISHM_3_3.yaml +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 189.3.3.[TC-DISHM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - DISHM.S.A0002 - - DISHM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - To Execute the TC-DISH-3.3 test case using reboot in raspi device we followed the below suggested way: - - To run a reboot test case on raspi, run the app with --KVS flag with a file in local directory and pass that file to the command to launch the app. Steps - - step-1: create a file using touch command , something like touch mytest.txt - step-2: chmod 777 mytest.txt - step-3: launch the app ./chip-all-clusters-app --KVS ./mytest.txt - - if you launch the app with the above commands and provision the app, even when you reboot the app with 'sudo reboot' , next time you launch the app with 'sudo ./out/all-clusters-app/chip-all-clusters-app --KVS ./mytest.txt' , you can run read/write attribs and commands without reprovisioning the device. - disabled: true - - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - verification: | - - disabled: true - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is an integer or Null - - Save the value as startup_mode_dut, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is null - - NOTE: if startup_mode_dut is null proceed to step 3. Else save startup_mode_dut as new_start_up_mode_th and proceed to step 5. - - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: null - disabled: true - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut and save the value as new_start_up_mode_th, below is the sample log provided for the raspi platform: - - [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 - [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries - [1690189296.612139][16077:16079] CHIP:TOO: [1]: { - [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal - [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 - [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries - [1690189296.612214][16077:16079] CHIP:TOO: [1]: { - [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 - [1690189296.612234][16077:16079] CHIP:TOO: } - [1690189296.612243][16077:16079] CHIP:TOO: } - [1690189296.612264][16077:16079] CHIP:TOO: [2]: { - [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy - [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 - [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries - [1690189296.612309][16077:16079] CHIP:TOO: [1]: { - [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 - [1690189296.612327][16077:16079] CHIP:TOO: } - [1690189296.612339][16077:16079] CHIP:TOO: [2]: { - [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 - [1690189296.612356][16077:16079] CHIP:TOO: } - [1690189296.612365][16077:16079] CHIP:TOO: } - [1690189296.612384][16077:16079] CHIP:TOO: [3]: { - [1690189296.612392][16077:16079] CHIP:TOO: Label: Light - [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 - [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries - [1690189296.612425][16077:16079] CHIP:TOO: [1]: { - [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 - [1690189296.612443][16077:16079] CHIP:TOO: } - [1690189296.612456][16077:16079] CHIP:TOO: [2]: { - [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 - [1690189296.612473][16077:16079] CHIP:TOO: } - [1690189296.612485][16077:16079] CHIP:TOO: [3]: { - [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 - [1690189296.612502][16077:16079] CHIP:TOO: } - [1690189296.612511][16077:16079] CHIP:TOO: } - disabled: true - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode write start-up-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690188912.259766][16011:16013] CHIP:DMG: StatusIB = - [1690188912.259778][16011:16013] CHIP:DMG: { - [1690188912.259790][16011:16013] CHIP:DMG: status = 0x00 (SUCCESS), - [1690188912.259800][16011:16013] CHIP:DMG: }, - [1690188912.259813][16011:16013] CHIP:DMG: - - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is 0 and below is the sample log provided for the raspi platform . - - [1692171314.157274][3112:3114] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0002 DataVersion: 2502960195 - [1692171314.157331][3112:3114] CHIP:TOO: StartUpMode: 0 - disabled: true - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && DISHM.S.A0002 - verification: | - As default value of OnMode attribute is NULL. Set the OnMode to any mode value listed in the SupportedModes entries. - - ./chip-tool dishwashermode write on-mode 0 1 1 - - On TH(chip-tool) log, Verify that DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690189187.414225][16062:16064] CHIP:DMG: StatusIB = - [1690189187.414237][16062:16064] CHIP:DMG: { - [1690189187.414249][16062:16064] CHIP:DMG: status = 0x00 (SUCCESS), - [1690189187.414260][16062:16064] CHIP:DMG: }, - - - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer value - - Save the value as old_on_mode_dut, below is the sample log provided for the raspi platform, here OnMode attribute value is 0 - - NOTE: If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. Else proceed to step 8. - - [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 - [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 0 - disabled: true - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: DISHM.S.A0000 && DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read supported-modes 1 1 - - On TH(chip-tool) log, Verify DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has two or more entries - - Save the Mode field values as supported_modes_dut - - Select a value from supported_modes_dut different from startup_mode_dut. Save the value as new_mode_th, below is the sample log provided for the raspi platform: - - [1690189296.612007][16077:16079] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1012425327 - [1690189296.612104][16077:16079] CHIP:TOO: SupportedModes: 3 entries - [1690189296.612139][16077:16079] CHIP:TOO: [1]: { - [1690189296.612149][16077:16079] CHIP:TOO: Label: Normal - [1690189296.612168][16077:16079] CHIP:TOO: Mode: 0 - [1690189296.612189][16077:16079] CHIP:TOO: ModeTags: 1 entries - [1690189296.612214][16077:16079] CHIP:TOO: [1]: { - [1690189296.612224][16077:16079] CHIP:TOO: Value: 16384 - [1690189296.612234][16077:16079] CHIP:TOO: } - [1690189296.612243][16077:16079] CHIP:TOO: } - [1690189296.612264][16077:16079] CHIP:TOO: [2]: { - [1690189296.612273][16077:16079] CHIP:TOO: Label: Heavy - [1690189296.612282][16077:16079] CHIP:TOO: Mode: 1 - [1690189296.612296][16077:16079] CHIP:TOO: ModeTags: 2 entries - [1690189296.612309][16077:16079] CHIP:TOO: [1]: { - [1690189296.612318][16077:16079] CHIP:TOO: Value: 7 - [1690189296.612327][16077:16079] CHIP:TOO: } - [1690189296.612339][16077:16079] CHIP:TOO: [2]: { - [1690189296.612348][16077:16079] CHIP:TOO: Value: 16385 - [1690189296.612356][16077:16079] CHIP:TOO: } - [1690189296.612365][16077:16079] CHIP:TOO: } - [1690189296.612384][16077:16079] CHIP:TOO: [3]: { - [1690189296.612392][16077:16079] CHIP:TOO: Label: Light - [1690189296.612398][16077:16079] CHIP:TOO: Mode: 2 - [1690189296.612413][16077:16079] CHIP:TOO: ModeTags: 3 entries - [1690189296.612425][16077:16079] CHIP:TOO: [1]: { - [1690189296.612433][16077:16079] CHIP:TOO: Value: 16386 - [1690189296.612443][16077:16079] CHIP:TOO: } - [1690189296.612456][16077:16079] CHIP:TOO: [2]: { - [1690189296.612465][16077:16079] CHIP:TOO: Value: 8 - [1690189296.612473][16077:16079] CHIP:TOO: } - [1690189296.612485][16077:16079] CHIP:TOO: [3]: { - [1690189296.612494][16077:16079] CHIP:TOO: Value: 2 - [1690189296.612502][16077:16079] CHIP:TOO: } - [1690189296.612511][16077:16079] CHIP:TOO: } - disabled: true - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: DISHM.S.A0003 - verification: | - ./chip-tool dishwashermode write on-mode 2 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1690189470.746137][16086:16088] CHIP:DMG: { - [1690189470.746140][16086:16088] CHIP:DMG: status = 0x00 (SUCCESS), - [1690189470.746142][16086:16088] CHIP:DMG: }, - disabled: true - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: DISHM.S.A0003 && MOD.S.F00 - verification: | - ./chip-tool dishwashermode read on-mode 1 1 - - On TH(chip-tool), Verify that OnMode attribute value is an integer - - Save the value as new_on_mode_dut and is equal to new_mode_th and below is the sample log provided for the raspi platform, here OnMode attribute value is 2 - - [1690189501.554415][16104:16106] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0003 DataVersion: 1012425329 - [1690189501.554429][16104:16106] CHIP:TOO: OnMode: 2 - disabled: true - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - verification: | - ./chip-tool onoff write start-up-on-off 1 1 1 - - On TH(chip-tool) log, Verify DUT responds with a successful (value 0x00) status response and below is the sample log provided for the raspi platform: - - [1651101661960] [90832:7598169] CHIP: [DMG] { - [1651101661960] [90832:7598169] CHIP: [DMG] status = 0x00 (SUCCESS), - [1651101661960] [90832:7598169] CHIP: [DMG] }, - disabled: true - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - disabled: true - - - label: "Step 11: TH reads from the DUT the StartUpMode attribute." - PICS: DISHM.S.A0002 - verification: | - ./chip-tool dishwashermode read start-up-mode 1 1 - - On TH(chip-tool), Verify that StartUpMode attribute value is an integer and is equal to new_start_up_mode_th, below is the sample log provided for the raspi platform, Here StartUpMode attribute value is 0 - - [1651099663211] [82177:7560652] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0004 DataVersion: 2609052118 - [1651099663212] [82177:7560652] CHIP: [TOO] StartUpMode: 0 - disabled: true - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: DISHM.S.A0001 - verification: | - ./chip-tool dishwashermode read current-mode 1 1 - - On TH(chip-tool), Verify that CurrentMode attribute value is an integer value and is equal to new_on_mode_dut, below is the sample log provided for the raspi platform, Here CurrentMode attribute value is 2 - - [1690189536.790233][16118:16120] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0001 DataVersion: 4080703118 - [1690189536.790280][16118:16120] CHIP:TOO: CurrentMode: 2 - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml deleted file mode 100644 index 2bafddfa303f64..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_1.yaml +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 183.3.1. [TC-LWM-3.1] On Mode functionality with DUT as Server - -PICS: - - LWM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - ConfigureOnMode: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 2 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To - execute this test case set onmode to any integer value because as - default it value has null." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: ConfigureOnMode - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: - "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. - Else proceed to step 6." - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: IsExpectedValue - PICS: LWM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6:TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7:TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml deleted file mode 100644 index fe8ff87e214e18..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_2.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 183.3.2. [TC-LWM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - LWM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: LWM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_current_mode_dut proceed - to step 6. Else proceed to step 8." - PICS: LWM.S.A0001 && LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: LWM.S.C00.Rsp - runIf: Step5_IsExpectedValue - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - constraints: - anyOf: [startup_mode_dut, new_start_up_mode_th] - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml deleted file mode 100644 index bf97f17f286154..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LWM_3_3.yaml +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 183.3.3. [TC-LWM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - LWM.S.A0002 - - LWM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Laundry Washer Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: LWM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: LWM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && LWM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_on_mode_dut proceed to - step 6. Else proceed to step 8." - PICS: LWM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: old_on_mode_dut - - name: "Value2" - value: startup_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: LWM.S.A0000 && LWM.S.A0002 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: LWM.S.A0003 - runIf: Step5_IsExpectedValue - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: LWM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 11: TH reads from the DUT the StartUpMode attribute." - PICS: LWM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - constraints: - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: LWM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml deleted file mode 100644 index 51f389b6afaffc..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ /dev/null @@ -1,722 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 81.1.3. [TC-MOD-1.3] Attributes with client as DUT - -PICS: - - MOD.C - - MOD.C.AM-READ - - MOD.C.AO-READ - - MOD.C.AM-WRITE - - MOD.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT reads all supported mandatory attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AM-READ - verification: | - ./chip-tool modeselect read supported-modes 1 1 - - Verify the "SupportedModes response" on the TH (all-cluster-app) log: - - [1666940683.282921][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940683.282923][9718:9718] CHIP:DMG: { - [1666940683.282925][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940683.282928][9718:9718] CHIP:DMG: [ - [1666940683.282929][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.282933][9718:9718] CHIP:DMG: { - [1666940683.282935][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.282937][9718:9718] CHIP:DMG: { - [1666940683.282939][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.282941][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.282944][9718:9718] CHIP:DMG: { - [1666940683.282946][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.282948][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.282950][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.282952][9718:9718] CHIP:DMG: } - [1666940683.282955][9718:9718] CHIP:DMG: - [1666940683.282957][9718:9718] CHIP:DMG: Data = [ - [1666940683.282959][9718:9718] CHIP:DMG: - [1666940683.282962][9718:9718] CHIP:DMG: ], - [1666940683.282964][9718:9718] CHIP:DMG: }, - [1666940683.282966][9718:9718] CHIP:DMG: - [1666940683.282968][9718:9718] CHIP:DMG: }, - [1666940683.282972][9718:9718] CHIP:DMG: - [1666940683.282974][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.282978][9718:9718] CHIP:DMG: { - [1666940683.282980][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.282982][9718:9718] CHIP:DMG: { - [1666940683.282984][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.282986][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.282988][9718:9718] CHIP:DMG: { - [1666940683.282990][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.282992][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.282995][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.282997][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.282999][9718:9718] CHIP:DMG: } - [1666940683.283001][9718:9718] CHIP:DMG: - [1666940683.283003][9718:9718] CHIP:DMG: Data = - [1666940683.283005][9718:9718] CHIP:DMG: { - [1666940683.283008][9718:9718] CHIP:DMG: 0x0 = "Black" (5 chars), - [1666940683.283011][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283013][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283015][9718:9718] CHIP:DMG: - [1666940683.283020][9718:9718] CHIP:DMG: { - [1666940683.283022][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283025][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283027][9718:9718] CHIP:DMG: }, - [1666940683.283030][9718:9718] CHIP:DMG: ], - [1666940683.283032][9718:9718] CHIP:DMG: }, - [1666940683.283034][9718:9718] CHIP:DMG: }, - [1666940683.283037][9718:9718] CHIP:DMG: - [1666940683.283039][9718:9718] CHIP:DMG: }, - [1666940683.283044][9718:9718] CHIP:DMG: - [1666940683.283046][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.283049][9718:9718] CHIP:DMG: { - [1666940683.283051][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.283053][9718:9718] CHIP:DMG: { - [1666940683.283055][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.283057][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.283059][9718:9718] CHIP:DMG: { - [1666940683.283061][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.283064][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.283066][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.283068][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.283070][9718:9718] CHIP:DMG: } - [1666940683.283072][9718:9718] CHIP:DMG: - [1666940683.283074][9718:9718] CHIP:DMG: Data = - [1666940683.283076][9718:9718] CHIP:DMG: { - [1666940683.283079][9718:9718] CHIP:DMG: 0x0 = "Cappuccino" (10 chars), - [1666940683.283081][9718:9718] CHIP:DMG: 0x1 = 4, - [1666940683.283084][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283086][9718:9718] CHIP:DMG: - [1666940683.283088][9718:9718] CHIP:DMG: { - [1666940683.283091][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283093][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283095][9718:9718] CHIP:DMG: }, - [1666940683.283098][9718:9718] CHIP:DMG: ], - [1666940683.283100][9718:9718] CHIP:DMG: }, - [1666940683.283102][9718:9718] CHIP:DMG: }, - [1666940683.283105][9718:9718] CHIP:DMG: - [1666940683.283107][9718:9718] CHIP:DMG: }, - [1666940683.283112][9718:9718] CHIP:DMG: - [1666940683.283114][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940683.283117][9718:9718] CHIP:DMG: { - [1666940683.283119][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940683.283121][9718:9718] CHIP:DMG: { - [1666940683.283123][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940683.283125][9718:9718] CHIP:DMG: AttributePathIB = - [1666940683.283128][9718:9718] CHIP:DMG: { - [1666940683.283130][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940683.283132][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940683.283134][9718:9718] CHIP:DMG: Attribute = 0x0000_0002, - [1666940683.283136][9718:9718] CHIP:DMG: ListIndex = Null, - [1666940683.283138][9718:9718] CHIP:DMG: } - [1666940683.283141][9718:9718] CHIP:DMG: - [1666940683.283143][9718:9718] CHIP:DMG: Data = - [1666940683.283145][9718:9718] CHIP:DMG: { - [1666940683.283148][9718:9718] CHIP:DMG: 0x0 = "Espresso" (8 chars), - [1666940683.283150][9718:9718] CHIP:DMG: 0x1 = 7, - [1666940683.283152][9718:9718] CHIP:DMG: 0x2 = [ - [1666940683.283154][9718:9718] CHIP:DMG: - [1666940683.283157][9718:9718] CHIP:DMG: { - [1666940683.283159][9718:9718] CHIP:DMG: 0x0 = 0, - [1666940683.283161][9718:9718] CHIP:DMG: 0x1 = 0, - [1666940683.283164][9718:9718] CHIP:DMG: }, - [1666940683.283167][9718:9718] CHIP:DMG: ], - [1666940683.283169][9718:9718] CHIP:DMG: }, - [1666940683.283171][9718:9718] CHIP:DMG: }, - [1666940683.283174][9718:9718] CHIP:DMG: - [1666940683.283176][9718:9718] CHIP:DMG: }, - [1666940683.283179][9718:9718] CHIP:DMG: - [1666940683.283181][9718:9718] CHIP:DMG: ], - [1666940683.283188][9718:9718] CHIP:DMG: - [1666940683.283190][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940683.283192][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - - ./chip-tool modeselect read current-mode 1 1 - - Verify the "CurrentMode response" on the TH (all-cluster-app) log: - - [1666940720.150375][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940720.150377][9718:9718] CHIP:DMG: { - [1666940720.150379][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940720.150382][9718:9718] CHIP:DMG: [ - [1666940720.150384][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940720.150387][9718:9718] CHIP:DMG: { - [1666940720.150389][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940720.150391][9718:9718] CHIP:DMG: { - [1666940720.150394][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940720.150396][9718:9718] CHIP:DMG: AttributePathIB = - [1666940720.150399][9718:9718] CHIP:DMG: { - [1666940720.150402][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940720.150404][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940720.150406][9718:9718] CHIP:DMG: Attribute = 0x0000_0003, - [1666940720.150408][9718:9718] CHIP:DMG: } - [1666940720.150411][9718:9718] CHIP:DMG: - [1666940720.150414][9718:9718] CHIP:DMG: Data = 0, - [1666940720.150416][9718:9718] CHIP:DMG: }, - [1666940720.150419][9718:9718] CHIP:DMG: - [1666940720.150421][9718:9718] CHIP:DMG: }, - [1666940720.150424][9718:9718] CHIP:DMG: - [1666940720.150426][9718:9718] CHIP:DMG: ], - [1666940720.150429][9718:9718] CHIP:DMG: - [1666940720.150431][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940720.150433][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read standard-namespace 1 1 - - Verify the "StandardNamespace response" on the TH (all-cluster-app) log: - - 1668497274.561088][9289:9289] CHIP:DMG: ReportDataMessage = - [1668497274.561091][9289:9289] CHIP:DMG: { - [1668497274.561094][9289:9289] CHIP:DMG: AttributeReportIBs = - [1668497274.561100][9289:9289] CHIP:DMG: [ - [1668497274.561103][9289:9289] CHIP:DMG: AttributeReportIB = - [1668497274.561108][9289:9289] CHIP:DMG: { - [1668497274.561111][9289:9289] CHIP:DMG: AttributeDataIB = - [1668497274.561115][9289:9289] CHIP:DMG: { - [1668497274.561119][9289:9289] CHIP:DMG: DataVersion = 0x6c775d5f, - [1668497274.561123][9289:9289] CHIP:DMG: AttributePathIB = - [1668497274.561126][9289:9289] CHIP:DMG: { - [1668497274.561129][9289:9289] CHIP:DMG: Endpoint = 0x1, - [1668497274.561133][9289:9289] CHIP:DMG: Cluster = 0x50, - [1668497274.561137][9289:9289] CHIP:DMG: Attribute = 0x0000_0001, - [1668497274.561142][9289:9289] CHIP:DMG: } - [1668497274.561147][9289:9289] CHIP:DMG: - [1668497274.561153][9289:9289] CHIP:DMG: Data = 0, - [1668497274.561157][9289:9289] CHIP:DMG: }, - [1668497274.561162][9289:9289] CHIP:DMG: - [1668497274.561165][9289:9289] CHIP:DMG: }, - [1668497274.561169][9289:9289] CHIP:DMG: - [1668497274.561172][9289:9289] CHIP:DMG: ], - [1668497274.561177][9289:9289] CHIP:DMG: - [1668497274.561180][9289:9289] CHIP:DMG: SuppressResponse = true, - [1668497274.561183][9289:9289] CHIP:DMG: InteractionModelRevision = 1 - [1668497274.561185][9289:9289] CHIP:DMG: } - - ./chip-tool modeselect read description 1 1 - - Verify the "Description response" on the TH (all-cluster-app) log: - - [1668497391.858312][9289:9289] CHIP:DMG: ReportDataMessage = - [1668497391.858315][9289:9289] CHIP:DMG: { - [1668497391.858318][9289:9289] CHIP:DMG: AttributeReportIBs = - [1668497391.858324][9289:9289] CHIP:DMG: [ - [1668497391.858327][9289:9289] CHIP:DMG: AttributeReportIB = - [1668497391.858331][9289:9289] CHIP:DMG: { - [1668497391.858334][9289:9289] CHIP:DMG: AttributeDataIB = - [1668497391.858338][9289:9289] CHIP:DMG: { - [1668497391.858342][9289:9289] CHIP:DMG: DataVersion = 0x6c775d5f, - [1668497391.858345][9289:9289] CHIP:DMG: AttributePathIB = - [1668497391.858348][9289:9289] CHIP:DMG: { - [1668497391.858352][9289:9289] CHIP:DMG: Endpoint = 0x1, - [1668497391.858355][9289:9289] CHIP:DMG: Cluster = 0x50, - [1668497391.858359][9289:9289] CHIP:DMG: Attribute = 0x0000_0000, - [1668497391.858363][9289:9289] CHIP:DMG: } - [1668497391.858368][9289:9289] CHIP:DMG: - [1668497391.858372][9289:9289] CHIP:DMG: Data = "Coffee" (6 chars), - [1668497391.858375][9289:9289] CHIP:DMG: }, - [1668497391.858380][9289:9289] CHIP:DMG: - [1668497391.858383][9289:9289] CHIP:DMG: }, - [1668497391.858387][9289:9289] CHIP:DMG: - [1668497391.858390][9289:9289] CHIP:DMG: ], - [1668497391.858395][9289:9289] CHIP:DMG: - [1668497391.858398][9289:9289] CHIP:DMG: SuppressResponse = true, - [1668497391.858403][9289:9289] CHIP:DMG: InteractionModelRevision = 1 - [1668497391.858406][9289:9289] CHIP:DMG: } - disabled: true - - - label: - "Step 2: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AO-READ - verification: | - ./chip-tool modeselect read on-mode 1 1 - - Verify the "OnMode response" on the TH (all-cluster-app) log: - - [1666940828.515256][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940828.515259][9718:9718] CHIP:DMG: { - [1666940828.515261][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940828.515265][9718:9718] CHIP:DMG: [ - [1666940828.515267][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940828.515272][9718:9718] CHIP:DMG: { - [1666940828.515275][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940828.515277][9718:9718] CHIP:DMG: { - [1666940828.515280][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940828.515282][9718:9718] CHIP:DMG: AttributePathIB = - [1666940828.515285][9718:9718] CHIP:DMG: { - [1666940828.515288][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940828.515290][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940828.515293][9718:9718] CHIP:DMG: Attribute = 0x0000_0005, - [1666940828.515295][9718:9718] CHIP:DMG: } - [1666940828.515298][9718:9718] CHIP:DMG: - [1666940828.515301][9718:9718] CHIP:DMG: Data = NULL - [1666940828.515304][9718:9718] CHIP:DMG: }, - [1666940828.515307][9718:9718] CHIP:DMG: - [1666940828.515309][9718:9718] CHIP:DMG: }, - [1666940828.515312][9718:9718] CHIP:DMG: - [1666940828.515314][9718:9718] CHIP:DMG: ], - [1666940828.515317][9718:9718] CHIP:DMG: - [1666940828.515320][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940828.515322][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read start-up-mode 1 1 - - Verify the "StartUpMode response" on the TH (all-cluster-app) log: - - [1666940848.925393][9718:9718] CHIP:DMG: ReportDataMessage = - [1666940848.925396][9718:9718] CHIP:DMG: { - [1666940848.925397][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666940848.925401][9718:9718] CHIP:DMG: [ - [1666940848.925403][9718:9718] CHIP:DMG: AttributeReportIB = - [1666940848.925407][9718:9718] CHIP:DMG: { - [1666940848.925410][9718:9718] CHIP:DMG: AttributeDataIB = - [1666940848.925414][9718:9718] CHIP:DMG: { - [1666940848.925416][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666940848.925418][9718:9718] CHIP:DMG: AttributePathIB = - [1666940848.925421][9718:9718] CHIP:DMG: { - [1666940848.925423][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666940848.925428][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666940848.925431][9718:9718] CHIP:DMG: Attribute = 0x0000_0004, - [1666940848.925433][9718:9718] CHIP:DMG: } - [1666940848.925436][9718:9718] CHIP:DMG: - [1666940848.925438][9718:9718] CHIP:DMG: Data = 0, - [1666940848.925440][9718:9718] CHIP:DMG: }, - [1666940848.925443][9718:9718] CHIP:DMG: - [1666940848.925445][9718:9718] CHIP:DMG: }, - [1666940848.925448][9718:9718] CHIP:DMG: - [1666940848.925450][9718:9718] CHIP:DMG: ], - [1666940848.925454][9718:9718] CHIP:DMG: - [1666940848.925456][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666940848.925458][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - disabled: true - - - label: - "Step 3: DUT writes a suitable value to all supported mandatory - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AM-WRITE - verification: | - This cluster doesn't have any writable attributes - disabled: true - - - label: - "Step 4: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AO-WRITE - verification: | - ./chip-tool modeselect write on-mode 0 1 1 - - Verify the "WriteRequestMessage" on TH(all-cluster-app) log: - - WriteRequestMessage = - [1673335946.283857][10561:10561] CHIP:DMG: { - [1673335946.283866][10561:10561] CHIP:DMG: suppressResponse = false, - [1673335946.283878][10561:10561] CHIP:DMG: timedRequest = false, - [1673335946.283887][10561:10561] CHIP:DMG: AttributeDataIBs = - [1673335946.283905][10561:10561] CHIP:DMG: [ - [1673335946.283914][10561:10561] CHIP:DMG: AttributeDataIB = - [1673335946.283926][10561:10561] CHIP:DMG: { - [1673335946.283935][10561:10561] CHIP:DMG: AttributePathIB = - [1673335946.283947][10561:10561] CHIP:DMG: { - [1673335946.283959][10561:10561] CHIP:DMG: Endpoint = 0x1, - [1673335946.283971][10561:10561] CHIP:DMG: Cluster = 0x50, - [1673335946.283983][10561:10561] CHIP:DMG: Attribute = 0x0000_0005, - [1673335946.283994][10561:10561] CHIP:DMG: } - [1673335946.284008][10561:10561] CHIP:DMG: - [1673335946.284022][10561:10561] CHIP:DMG: Data = 0, - [1673335946.284032][10561:10561] CHIP:DMG: }, - [1673335946.284046][10561:10561] CHIP:DMG: - [1673335946.284055][10561:10561] CHIP:DMG: ], - [1673335946.284070][10561:10561] CHIP:DMG: - [1673335946.284081][10561:10561] CHIP:DMG: moreChunkedMessages = false, - [1673335946.284091][10561:10561] CHIP:DMG: InteractionModelRevision = 1 - [1673335946.284099][10561:10561] CHIP:DMG: }, - - ./chip-tool modeselect write start-up-mode 0 1 1 - - Verify the "WriteRequestMessage" on TH(all-cluster-app) log: - - WriteRequestMessage = - [1673336054.600463][10561:10561] CHIP:DMG: { - [1673336054.600470][10561:10561] CHIP:DMG: suppressResponse = false, - [1673336054.600479][10561:10561] CHIP:DMG: timedRequest = false, - [1673336054.600486][10561:10561] CHIP:DMG: AttributeDataIBs = - [1673336054.600501][10561:10561] CHIP:DMG: [ - [1673336054.600509][10561:10561] CHIP:DMG: AttributeDataIB = - [1673336054.600521][10561:10561] CHIP:DMG: { - [1673336054.600531][10561:10561] CHIP:DMG: AttributePathIB = - [1673336054.600544][10561:10561] CHIP:DMG: { - [1673336054.600557][10561:10561] CHIP:DMG: Endpoint = 0x1, - [1673336054.600569][10561:10561] CHIP:DMG: Cluster = 0x50, - [1673336054.600582][10561:10561] CHIP:DMG: Attribute = 0x0000_0004, - [1673336054.600593][10561:10561] CHIP:DMG: } - [1673336054.600608][10561:10561] CHIP:DMG: - [1673336054.600621][10561:10561] CHIP:DMG: Data = 0, - [1673336054.600631][10561:10561] CHIP:DMG: }, - [1673336054.600646][10561:10561] CHIP:DMG: - [1673336054.600656][10561:10561] CHIP:DMG: ], - [1673336054.600673][10561:10561] CHIP:DMG: - [1673336054.600683][10561:10561] CHIP:DMG: moreChunkedMessages = false, - [1673336054.600695][10561:10561] CHIP:DMG: InteractionModelRevision = 1 - [1673336054.600704][10561:10561] CHIP:DMG: }, - disabled: true - - - label: - "Step 5: Configure TH such that it implements mandatory and none of - the optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again" - verification: | - ./chip-tool modeselect read attribute-list 1 1 - - Verify the "AttributeList response" on the TH (all-cluster-minimal-app) log: - - [1689750639.773775][3545:3547] CHIP:DMG: ReportDataMessage = - [1689750639.773815][3545:3547] CHIP:DMG: { - [1689750639.773846][3545:3547] CHIP:DMG: AttributeReportIBs = - [1689750639.773896][3545:3547] CHIP:DMG: [ - [1689750639.773928][3545:3547] CHIP:DMG: AttributeReportIB = - [1689750639.773980][3545:3547] CHIP:DMG: { - [1689750639.774014][3545:3547] CHIP:DMG: AttributeDataIB = - [1689750639.774052][3545:3547] CHIP:DMG: { - [1689750639.774093][3545:3547] CHIP:DMG: DataVersion = 0x346e22fd, - [1689750639.774132][3545:3547] CHIP:DMG: AttributePathIB = - [1689750639.774174][3545:3547] CHIP:DMG: { - [1689750639.774217][3545:3547] CHIP:DMG: Endpoint = 0x1, - [1689750639.774261][3545:3547] CHIP:DMG: Cluster = 0x50, - [1689750639.774304][3545:3547] CHIP:DMG: Attribute = 0x0000_FFFB, - [1689750639.774347][3545:3547] CHIP:DMG: } - [1689750639.774390][3545:3547] CHIP:DMG: - [1689750639.774430][3545:3547] CHIP:DMG: Data = [ - [1689750639.774515][3545:3547] CHIP:DMG: 0, 1, 2, 3, 65528, 65529, 65530, 65531, 65532, 65533, - [1689750639.774565][3545:3547] CHIP:DMG: ], - [1689750639.774604][3545:3547] CHIP:DMG: }, - [1689750639.774652][3545:3547] CHIP:DMG: - [1689750639.774685][3545:3547] CHIP:DMG: }, - [1689750639.774731][3545:3547] CHIP:DMG: - [1689750639.774761][3545:3547] CHIP:DMG: ], - [1689750639.774804][3545:3547] CHIP:DMG: - [1689750639.774835][3545:3547] CHIP:DMG: SuppressResponse = true, - [1689750639.774867][3545:3547] CHIP:DMG: InteractionModelRevision = 1 - [1689750639.774896][3545:3547] CHIP:DMG: } - - - ./chip-tool modeselect read feature-map 1 1 - - Verify the " FeatureMap " on the TH (all-cluster-minimal-app) log: - - [1666943338.908026][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943338.908028][12769:12769] CHIP:DMG: { - [1666943338.908031][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943338.908035][12769:12769] CHIP:DMG: [ - [1666943338.908038][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943338.908042][12769:12769] CHIP:DMG: { - [1666943338.908045][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943338.908048][12769:12769] CHIP:DMG: { - [1666943338.908051][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943338.908054][12769:12769] CHIP:DMG: AttributePathIB = - [1666943338.908057][12769:12769] CHIP:DMG: { - [1666943338.908060][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943338.908064][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943338.908067][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943338.908070][12769:12769] CHIP:DMG: } - [1666943338.908074][12769:12769] CHIP:DMG: - [1666943338.908077][12769:12769] CHIP:DMG: Data = 0, - [1666943338.908080][12769:12769] CHIP:DMG: }, - [1666943338.908084][12769:12769] CHIP:DMG: - [1666943338.908086][12769:12769] CHIP:DMG: }, - [1666943338.908090][12769:12769] CHIP:DMG: - [1666943338.908092][12769:12769] CHIP:DMG: ], - [1666943338.908096][12769:12769] CHIP:DMG: - [1666943338.908099][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943338.908102][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943338.908104][12769:12769] CHIP:DMG: } - - - ./chip-tool modeselect read supported-modes 1 1 - - Verify the "SupportedModes response" on the TH (all-cluster-minimal-app) log: - - 1666943362.813636][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943362.813638][12769:12769] CHIP:DMG: { - [1666943362.813640][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943362.813643][12769:12769] CHIP:DMG: [ - [1666943362.813645][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813650][12769:12769] CHIP:DMG: { - [1666943362.813652][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813655][12769:12769] CHIP:DMG: { - [1666943362.813657][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813659][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813662][12769:12769] CHIP:DMG: { - [1666943362.813664][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813666][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813669][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813671][12769:12769] CHIP:DMG: } - [1666943362.813674][12769:12769] CHIP:DMG: - [1666943362.813676][12769:12769] CHIP:DMG: Data = [ - [1666943362.813679][12769:12769] CHIP:DMG: - [1666943362.813681][12769:12769] CHIP:DMG: ], - [1666943362.813683][12769:12769] CHIP:DMG: }, - [1666943362.813686][12769:12769] CHIP:DMG: - [1666943362.813688][12769:12769] CHIP:DMG: }, - [1666943362.813692][12769:12769] CHIP:DMG: - [1666943362.813694][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813699][12769:12769] CHIP:DMG: { - [1666943362.813701][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813703][12769:12769] CHIP:DMG: { - [1666943362.813705][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813707][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813709][12769:12769] CHIP:DMG: { - [1666943362.813711][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813714][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813716][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813719][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813721][12769:12769] CHIP:DMG: } - [1666943362.813725][12769:12769] CHIP:DMG: - [1666943362.813727][12769:12769] CHIP:DMG: Data = - [1666943362.813729][12769:12769] CHIP:DMG: { - [1666943362.813732][12769:12769] CHIP:DMG: 0x0 = "Black" (5 chars), - [1666943362.813735][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813737][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813740][12769:12769] CHIP:DMG: - [1666943362.813742][12769:12769] CHIP:DMG: { - [1666943362.813745][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813748][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813750][12769:12769] CHIP:DMG: }, - [1666943362.813752][12769:12769] CHIP:DMG: ], - [1666943362.813755][12769:12769] CHIP:DMG: }, - [1666943362.813756][12769:12769] CHIP:DMG: }, - [1666943362.813760][12769:12769] CHIP:DMG: - [1666943362.813762][12769:12769] CHIP:DMG: }, - [1666943362.813768][12769:12769] CHIP:DMG: - [1666943362.813770][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813775][12769:12769] CHIP:DMG: { - [1666943362.813776][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813779][12769:12769] CHIP:DMG: { - [1666943362.813781][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813783][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813786][12769:12769] CHIP:DMG: { - [1666943362.813788][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813790][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813793][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813795][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813797][12769:12769] CHIP:DMG: } - [1666943362.813801][12769:12769] CHIP:DMG: - [1666943362.813803][12769:12769] CHIP:DMG: Data = - [1666943362.813805][12769:12769] CHIP:DMG: { - [1666943362.813807][12769:12769] CHIP:DMG: 0x0 = "Cappuccino" (10 chars), - [1666943362.813810][12769:12769] CHIP:DMG: 0x1 = 4, - [1666943362.813812][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813814][12769:12769] CHIP:DMG: - [1666943362.813817][12769:12769] CHIP:DMG: { - [1666943362.813820][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813823][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813826][12769:12769] CHIP:DMG: }, - [1666943362.813828][12769:12769] CHIP:DMG: ], - [1666943362.813830][12769:12769] CHIP:DMG: }, - [1666943362.813832][12769:12769] CHIP:DMG: }, - [1666943362.813836][12769:12769] CHIP:DMG: - [1666943362.813838][12769:12769] CHIP:DMG: }, - [1666943362.813844][12769:12769] CHIP:DMG: - [1666943362.813846][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943362.813850][12769:12769] CHIP:DMG: { - [1666943362.813852][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943362.813855][12769:12769] CHIP:DMG: { - [1666943362.813857][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943362.813860][12769:12769] CHIP:DMG: AttributePathIB = - [1666943362.813862][12769:12769] CHIP:DMG: { - [1666943362.813864][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943362.813866][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943362.813869][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, - [1666943362.813871][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943362.813873][12769:12769] CHIP:DMG: } - [1666943362.813876][12769:12769] CHIP:DMG: - [1666943362.813878][12769:12769] CHIP:DMG: Data = - [1666943362.813881][12769:12769] CHIP:DMG: { - [1666943362.813883][12769:12769] CHIP:DMG: 0x0 = "Espresso" (8 chars), - [1666943362.813886][12769:12769] CHIP:DMG: 0x1 = 7, - [1666943362.813888][12769:12769] CHIP:DMG: 0x2 = [ - [1666943362.813890][12769:12769] CHIP:DMG: - [1666943362.813893][12769:12769] CHIP:DMG: { - [1666943362.813895][12769:12769] CHIP:DMG: 0x0 = 0, - [1666943362.813898][12769:12769] CHIP:DMG: 0x1 = 0, - [1666943362.813900][12769:12769] CHIP:DMG: }, - [1666943362.813903][12769:12769] CHIP:DMG: ], - [1666943362.813905][12769:12769] CHIP:DMG: }, - [1666943362.813907][12769:12769] CHIP:DMG: }, - [1666943362.813911][12769:12769] CHIP:DMG: - [1666943362.813913][12769:12769] CHIP:DMG: }, - [1666943362.813917][12769:12769] CHIP:DMG: - [1666943362.813918][12769:12769] CHIP:DMG: ], - [1666943362.813926][12769:12769] CHIP:DMG: - [1666943362.813928][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943362.813931][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943362.813934][12769:12769] CHIP:DMG: } - [1666943362.813936][12769:12769] CHIP:DMG: - - - ./chip-tool modeselect read current-mode 1 1 - - Verify the "CurrentMode response" on the TH (all-cluster-minimal-app) log: - - 1666943427.104790][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943427.104798][12769:12769] CHIP:DMG: { - [1666943427.104804][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943427.104814][12769:12769] CHIP:DMG: [ - [1666943427.104820][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943427.104838][12769:12769] CHIP:DMG: { - [1666943427.104846][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943427.104858][12769:12769] CHIP:DMG: { - [1666943427.104869][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943427.104880][12769:12769] CHIP:DMG: AttributePathIB = - [1666943427.104891][12769:12769] CHIP:DMG: { - [1666943427.104904][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943427.104916][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943427.104931][12769:12769] CHIP:DMG: Attribute = 0x0000_0003, - [1666943427.104939][12769:12769] CHIP:DMG: } - [1666943427.104948][12769:12769] CHIP:DMG: - [1666943427.104956][12769:12769] CHIP:DMG: Data = 0, - [1666943427.104963][12769:12769] CHIP:DMG: }, - [1666943427.104974][12769:12769] CHIP:DMG: - [1666943427.104981][12769:12769] CHIP:DMG: }, - [1666943427.104991][12769:12769] CHIP:DMG: - [1666943427.105001][12769:12769] CHIP:DMG: ], - [1666943427.105017][12769:12769] CHIP:DMG: - [1666943427.105027][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943427.105037][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943427.105045][12769:12769] CHIP:DMG: } - - - ./chip-tool modeselect read standard-namespace 1 1 - - Verify the "StandardNamespace response" on the TH (all-cluster-minimal-app) log: - - [1666943453.966995][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943453.966997][12769:12769] CHIP:DMG: { - [1666943453.966999][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943453.967003][12769:12769] CHIP:DMG: [ - [1666943453.967005][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943453.967008][12769:12769] CHIP:DMG: { - [1666943453.967010][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943453.967014][12769:12769] CHIP:DMG: { - [1666943453.967017][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943453.967019][12769:12769] CHIP:DMG: AttributePathIB = - [1666943453.967021][12769:12769] CHIP:DMG: { - [1666943453.967025][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943453.967027][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943453.967029][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666943453.967033][12769:12769] CHIP:DMG: } - [1666943453.967035][12769:12769] CHIP:DMG: - [1666943453.967038][12769:12769] CHIP:DMG: Data = 0, - [1666943453.967040][12769:12769] CHIP:DMG: }, - [1666943453.967043][12769:12769] CHIP:DMG: - [1666943453.967045][12769:12769] CHIP:DMG: }, - [1666943453.967047][12769:12769] CHIP:DMG: - [1666943453.967050][12769:12769] CHIP:DMG: ], - [1666943453.967053][12769:12769] CHIP:DMG: - [1666943453.967055][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943453.967057][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool modeselect read description 1 1 - - Verify the "Description response" on the TH (all-cluster-minimal-app) log: - - [1666941093.845092][9718:9718] CHIP:DMG: ReportDataMessage = - [1666941093.845094][9718:9718] CHIP:DMG: { - [1666941093.845096][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666941093.845099][9718:9718] CHIP:DMG: [ - [1666941093.845101][9718:9718] CHIP:DMG: AttributeReportIB = - [1666941093.845105][9718:9718] CHIP:DMG: { - [1666941093.845107][9718:9718] CHIP:DMG: AttributeDataIB = - [1666941093.845110][9718:9718] CHIP:DMG: { - [1666941093.845112][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666941093.845115][9718:9718] CHIP:DMG: AttributePathIB = - [1666941093.845117][9718:9718] CHIP:DMG: { - [1666941093.845119][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666941093.845122][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666941093.845124][9718:9718] CHIP:DMG: Attribute = 0x0000_0000, - [1666941093.845126][9718:9718] CHIP:DMG: } - [1666941093.845129][9718:9718] CHIP:DMG: - [1666941093.845132][9718:9718] CHIP:DMG: Data = "Coffee" (6 chars), - [1666941093.845134][9718:9718] CHIP:DMG: }, - [1666941093.845137][9718:9718] CHIP:DMG: - [1666941093.845139][9718:9718] CHIP:DMG: }, - [1666941093.845142][9718:9718] CHIP:DMG: - [1666941093.845144][9718:9718] CHIP:DMG: ], - [1666941093.845147][9718:9718] CHIP:DMG: - [1666941093.845149][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666941093.845152][9718:9718] CHIP:DMG: InteractionModelRevision = 1 - disabled: true - - - label: - "Step 6: DUT reads all supported optional attributes from TH one at a - time in a manufacturer specific order" - PICS: MOD.C.AO-READ - verification: | - ./chip-tool modeselect read on-mode 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929635.593547][20278:20280] CHIP:DMG: StatusIB = - [1684929635.593551][20278:20280] CHIP:DMG: { - [1684929635.593555][20278:20280] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929635.593558][20278:20280] CHIP:DMG: }, - - - ./chip-tool modeselect read start-up-mode 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929665.428885][20285:20287] CHIP:DMG: StatusIB = - [1684929665.428891][20285:20287] CHIP:DMG: { - [1684929665.428895][20285:20287] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929665.428900][20285:20287] CHIP:DMG: }, - disabled: true - - - label: - "Step 7: DUT writes a suitable value to all supported optional - attributes on the TH one at a time in a manufacturer specific order" - PICS: MOD.C.AO-WRITE - verification: | - ./chip-tool modeselect write on-mode 0 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929889.679386][20348:20350] CHIP:DMG: StatusIB = - [1684929889.679389][20348:20350] CHIP:DMG: { - [1684929889.679392][20348:20350] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929889.679395][20348:20350] CHIP:DMG: }, - [1684929889.679398][20348:20350] CHIP:DMG: - - - ./chip-tool modeselect write start-up-mode 0 1 1 - - Verify status response as UNSUPPORTED_ATTRIBUTE on the TH (all-cluster-minimal-app) log: - - [1684929889.679386][20348:20350] CHIP:DMG: StatusIB = - [1684929889.679389][20348:20350] CHIP:DMG: { - [1684929889.679392][20348:20350] CHIP:DMG: status = 0x86 (UNSUPPORTED_ATTRIBUTE), - [1684929889.679395][20348:20350] CHIP:DMG: }, - [1684929889.679398][20348:20350] CHIP:DMG: - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml deleted file mode 100644 index 3d886d15ab6253..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_1.yaml +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.4 [TC-OTCCM-3.1] On Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - ConfigureOnMode: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 2 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Precondition: TH writes from the DUT the OnMode attribute.NOTE: To - execute this test case set onmode to any integer value because as - default it value has null." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: ConfigureOnMode - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - constraints: - type: int8u - - - label: "Step 3: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - - - label: - "If on_mode_dut is equal to old_current_mode_dut proceed to step 4. - Else proceed to step 6." - PICS: OTCCM.S.A0001 && MOD.S.F00 && OTCCM.S.A0003 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: IsExpectedValue - PICS: OTCCM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6:TH sends a Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7:TH sends a On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml deleted file mode 100644 index e1220de758e875..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_2.yaml +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 3.5 [TC-OTCCM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - new_start-up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: OTCCM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_current_mode_dut proceed - to step 6. Else proceed to step 8." - PICS: OTCCM.S.A0001 && OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: OTCCM.S.A0000 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - PICS: OTCCM.S.C00.Rsp - runIf: Step5_IsExpectedValue - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 8: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - value: new_start_up_mode_th - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml deleted file mode 100644 index 27184569f51b5a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OTCCM_3_3.yaml +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 3.6 [TC-OTCCM-3.3] On Mode and Startup Mode functionality with DUT as Server - -PICS: - - OTCCM.S.A0002 - - OTCCM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Oven Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - - - label: - "Step 2: If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: OTCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4: TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - PICS: OTCCM.S.A0002 - runIf: IsExpectedValue - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && OTCCM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - - - label: - "Step 5: If startup_mode_dut is equal to old_on_mode_dut proceed to - step 6. Else proceed to step 8." - PICS: OTCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: old_on_mode_dut - - name: "Value2" - value: startup_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - PICS: OTCCM.S.A0000 && OTCCM.S.A0002 - runIf: Step5_IsExpectedValue - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH writes to the DUT the OnMode attribute with the - new_mode_th value" - PICS: OTCCM.S.A0003 - runIf: Step5_IsExpectedValue - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: OTCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - - - label: - "Step 9: TH writes to the DUT the StartUpOnOff attribute with the - value 1." - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device" - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 11: TH reads from the DUT the StartUpMode attribute." - PICS: OTCCM.S.A0002 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "StartUpMode" - response: - value: new_start_up_mode_th - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: OTCCM.S.A0001 && PICS_USER_PROMPT - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml deleted file mode 100644 index 178357027408c7..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_1.yaml +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 219.3.1. [TC-TCCM-3.1] On Mode functionality with DUT as Server - -PICS: - - TCCM.S.A0003 - - MOD.S.F00 - - OO.S.C00.Rsp - - OO.S.C01.Rsp - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - #Configure newmode value - new_mode_th: - type: int8u - defaultValue: 2 - nonNull_OnMode_value: - type: int8u - defaultValue: 0 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Preconditions: The OnMode attribute is set to a non-NULL value from - the mode values indicated by the SupportedModes attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: nonNull_OnMode_value - - - label: "Step 2: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: on_mode_dut - - - label: "Step 3a: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - - - label: - "Step 3b: If the OnMode and CurrentMode attributes have the same - value, proceed to step 4, Otherwise proceed to step 6" - PICS: TCCM.S.A0003 && TCCM.S.A0001 && MOD.S.F00 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: on_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 4:TH reads the SupportedModes attribute from the DUT" - runIf: IsExpectedValue - PICS: TCCM.S.A0000 && MOD.S.F00 - command: "readAttribute" - attribute: "SupportedModes" - response: - constraints: - type: list - minLength: 2 - - - label: - "Step 5: Select a value from supported_modes_dut different from - on_mode_dut. Save the value as new_mode_th. TH sends a ChangeToMode - command to the DUT with NewMode set to new_mode_th" - runIf: IsExpectedValue - PICS: TCCM.S.C00.Rsp && MOD.S.F00 - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - response: - values: - - name: "Status" - value: 0x00 - - - label: "Step 6: TH sends an Off command to the DUT" - PICS: OO.S.C00.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "Off" - - - label: "Step 7: TH sends an On command to the DUT" - PICS: OO.S.C01.Rsp && MOD.S.F00 - cluster: "On/Off" - command: "On" - - - label: "Step 8: TH reads the CurrentMode attribute from the DUT" - PICS: TCCM.S.A0001 && MOD.S.F00 - command: "readAttribute" - attribute: "CurrentMode" - response: - value: on_mode_dut diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml deleted file mode 100644 index b89db6a41925c2..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_2.yaml +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 219.3.2. [TC-TCCM-3.2] Startup Mode functionality with DUT as Server - -PICS: - - TCCM.S.A0002 - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5" - PICS: TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4:TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - runIf: IsExpectedValue - PICS: TCCM.S.A0002 - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 - command: "readAttribute" - attribute: "CurrentMode" - response: - saveAs: old_current_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is equal to old_current_mode_dut proceed to step - 6. Else proceed to step 8" - PICS: TCCM.S.A0002 && TCCM.S.A0001 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_current_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads from the DUT the SupportedModes attribute." - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: Step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7: TH sends a ChangeToMode command to the DUT with NewMode set - to new_mode_th" - runIf: Step5_IsExpectedValue - PICS: DISHM.S.C00.Rsp - command: "ChangeToMode" - arguments: - values: - - name: "NewMode" - value: new_mode_th - - - label: "Step 8: Physically power cycle the device." - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 9: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: new_start_up_mode_dut - constraints: - type: int8u - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 10: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_start_up_mode_dut - constraints: - type: int8u diff --git a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml b/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml deleted file mode 100644 index 64d8b3f7d637e9..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TCCM_3_3.yaml +++ /dev/null @@ -1,195 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 219.3.3. [TC-TCCM-3.3] On Mode and Startup Mode functionality with DUT as - Server - -PICS: - - TCCM.S.A0002 - - TCCM.S.A0003 - - MOD.S.F00 - - OO.S.A4003 - -config: - nodeId: 0x12344321 - cluster: "Refrigerator And Temperature Controlled Cabinet Mode" - endpoint: 1 - - new_start_up_mode_th: - type: int8u - defaultValue: 0 - new_mode_th: - type: int8u - defaultValue: 1 - -tests: - - label: - "Step 1: Commission DUT to TH (can be skipped if done in a preceding - test)." - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads from the DUT the SupportedModes attribute." - PICS: TCCM.S.A0002 - command: "readAttribute" - attribute: "StartUpMode" - response: - saveAs: startup_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is null proceed to step 3. Else save - startup_mode_dut as new_start_up_mode_th and proceed to step 5" - PICS: TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: null - response: - - values: - - name: "Equals" - saveAs: IsExpectedValue - - - label: "Step 3: TH reads from the DUT the SupportedModes attribute." - runIf: IsExpectedValue - PICS: TCCM.S.A0000 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 4:TH writes to the DUT the StartUpMode attribute with the - new_start_up_mode_th value" - runIf: IsExpectedValue - PICS: TCCM.S.A0002 - command: "writeAttribute" - attribute: "StartUpMode" - arguments: - value: new_start_up_mode_th - - - label: "Step 5: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && TCCM.S.A0002 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: old_on_mode_dut - constraints: - type: int8u - - - label: - "If startup_mode_dut is equal to old_on_mode_dut proceed to step 6. - Else proceed to step 8." - PICS: TCCM.S.A0003 && TCCM.S.A0002 - cluster: "EqualityCommands" - command: "UnsignedNumberEquals" - arguments: - values: - - name: "Value1" - value: startup_mode_dut - - name: "Value2" - value: old_on_mode_dut - response: - - values: - - name: "Equals" - saveAs: Step5_IsExpectedValue - - - label: "Step 6: TH reads the SupportedModes attribute from the DUT" - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0000 && TCCM.S.A0002 - command: "readAttribute" - attribute: "SupportedModes" - response: - saveAs: step6_supported_modes_dut - constraints: - type: list - minLength: 2 - - - label: - "Step 7:TH writes to the DUT the OnMode attribute with the new_mode_th - value" - runIf: Step5_IsExpectedValue - PICS: TCCM.S.A0003 - command: "writeAttribute" - attribute: "OnMode" - arguments: - value: new_mode_th - - - label: "Step 8: TH reads from the DUT the OnMode attribute." - PICS: TCCM.S.A0003 && MOD.S.F00 - command: "readAttribute" - attribute: "OnMode" - response: - saveAs: new_on_mode_dut - constraints: - anyOf: [new_mode_th, old_on_mode_dut] - - - label: - "Step 9:TH writes to the DUT the StartUpOnOff attribute with the value - 1" - PICS: OO.S.A4003 - cluster: "On/Off" - command: "writeAttribute" - attribute: "StartUpOnOff" - arguments: - value: 1 - - - label: "Step 10: Physically power cycle the device." - verification: | - Physically power cycle the device. - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 11: TH reads from the DUT the StartUpMode attribute." - PICS: TCCM.S.A0002 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "StartUpMode" - response: - constraints: - anyOf: [new_start_up_mode_th, startup_mode_dut] - - - label: "Step 12: TH reads from the DUT the CurrentMode attribute." - PICS: TCCM.S.A0001 && PICS_SKIP_SAMPLE_APP - command: "readAttribute" - attribute: "CurrentMode" - response: - value: new_on_mode_dut From a0d7b14cde8f41d5096742bb50044b3408a532d9 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 23 Oct 2024 02:24:01 -0400 Subject: [PATCH 6/7] 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 7/7] 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.