From 185224100ffa53524d50b48551257797ff43b58c Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 7 Dec 2022 21:42:26 +0100 Subject: [PATCH] Replace some deprecated EMBER_ZCL_STATUS by their non deprecated counterparts (#23883) * Remove EMBER_ZCL_STATUS_NOT_AUTHORIZED * Remove EMBER_ZCL_STATUS_INVALID_FIELD * Remove EMBER_ZCL_STATUS_INVALID_VALUE * Remove EMBER_ZCL_STATUS_READ_ONLY * Remove EMBER_ZCL_STATUS_INSUFFICIENT_SPACE --- .../rpc_services/internal/StatusUtils.h | 2 +- .../include/level-control/LevelControl.cpp | 2 +- .../account-login-server.cpp | 2 +- .../barrier-control-server.cpp | 2 +- .../color-control-server.cpp | 2 +- .../clusters/groups-server/groups-server.cpp | 2 +- .../ias-zone-server/ias-zone-server.cpp | 4 +- .../clusters/level-control/level-control.cpp | 4 +- src/app/clusters/scenes/scenes.cpp | 18 +-- .../window-covering-server.cpp | 4 +- src/app/tests/suites/DL_Schedules.yaml | 62 ++++----- src/app/tests/suites/TestCluster.yaml | 2 +- src/app/util/af-enums.h | 5 - src/app/util/attribute-storage.cpp | 16 +-- src/app/util/attribute-table.cpp | 12 +- src/app/util/generic-callbacks.h | 2 +- .../chip-tool/zap-generated/test/Commands.h | 64 ++++----- .../zap-generated/test/Commands.h | 128 +++++++++--------- 18 files changed, 164 insertions(+), 169 deletions(-) diff --git a/examples/common/pigweed/rpc_services/internal/StatusUtils.h b/examples/common/pigweed/rpc_services/internal/StatusUtils.h index 0eaab65d6706a0..444759f818efa2 100644 --- a/examples/common/pigweed/rpc_services/internal/StatusUtils.h +++ b/examples/common/pigweed/rpc_services/internal/StatusUtils.h @@ -43,7 +43,7 @@ constexpr pw::Status EmberStatusToPwStatus(EmberAfStatus ember_status) return pw::OkStatus(); case EMBER_ZCL_STATUS_NOT_FOUND: return pw::Status::NotFound(); - case EMBER_ZCL_STATUS_NOT_AUTHORIZED: + case EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS: return pw::Status::PermissionDenied(); default: return pw::Status::Unknown(); diff --git a/examples/tv-app/linux/include/level-control/LevelControl.cpp b/examples/tv-app/linux/include/level-control/LevelControl.cpp index 6390707e97418e..3147396e008b53 100644 --- a/examples/tv-app/linux/include/level-control/LevelControl.cpp +++ b/examples/tv-app/linux/include/level-control/LevelControl.cpp @@ -89,7 +89,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, } break; default: - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; goto send_default_response; } diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index b269f028014335..da53ea15e87315 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -145,7 +145,7 @@ bool emberAfAccountLoginClusterLoginCallback(app::CommandHandler * command, cons if (!delegate->HandleLogin(tempAccountIdentifier, setupPin)) { - status = EMBER_ZCL_STATUS_NOT_AUTHORIZED; + status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS; } exit: diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp index bb7d65d29a0aa9..e310d7ba541061 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -286,7 +286,7 @@ bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( percentOpen != EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_CLOSED && percentOpen != EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_OPEN)) { - status = EMBER_ZCL_STATUS_INVALID_VALUE; + status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } else { diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 486126fb9ddab6..8d6230e6ede743 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -2207,7 +2207,7 @@ bool ColorControlServer::moveColorTempCommand(const app::ConcreteCommandPath & c if (rate == 0) { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_FIELD); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_COMMAND); return true; } diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp index 523fea8a76d4d5..588220e0dc371f 100644 --- a/src/app/clusters/groups-server/groups-server.cpp +++ b/src/app/clusters/groups-server/groups-server.cpp @@ -160,7 +160,7 @@ bool emberAfGroupsClusterViewGroupCallback(app::CommandHandler * commandObj, con CHIP_ERROR err = CHIP_NO_ERROR; EmberAfStatus status = EMBER_ZCL_STATUS_NOT_FOUND; - VerifyOrExit(IsFabricGroupId(groupId), status = EMBER_ZCL_STATUS_INVALID_VALUE); + VerifyOrExit(IsFabricGroupId(groupId), status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR); VerifyOrExit(nullptr != provider, status = EMBER_ZCL_STATUS_FAILURE); VerifyOrExit(provider->HasEndpoint(fabricIndex, groupId, commandPath.mEndpointId), status = EMBER_ZCL_STATUS_NOT_FOUND); diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index b9eed2bb889d52..3b08d92d45d977 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -268,12 +268,12 @@ EmberAfStatus emberAfPluginIasZoneClusterSetEnrollmentMethod(EndpointId endpoint if (emberAfIasZoneClusterAmIEnrolled(endpoint)) { emberAfIasZoneClusterPrintln("Error: Already enrolled"); - status = EMBER_ZCL_STATUS_NOT_AUTHORIZED; + status = EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS; } else if (!isValidEnrollmentMode(method)) { emberAfIasZoneClusterPrintln("Invalid IAS Zone Server Enrollment Mode: %d", method); - status = EMBER_ZCL_STATUS_INVALID_VALUE; + status = EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } else { diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 723cc3a1edaf33..c97fad07a2fae3 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -830,7 +830,7 @@ static void moveHandler(EndpointId endpoint, CommandId commandId, uint8_t moveMo difference = static_cast(currentLevel.Value() - state->minLevel); break; default: - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; goto send_default_response; } @@ -972,7 +972,7 @@ static void stepHandler(EndpointId endpoint, CommandId commandId, uint8_t stepMo } break; default: - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; goto send_default_response; } diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index 58369e8eb11837..ed039229b4e57a 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -234,7 +234,7 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c if (!isEndpointInGroup(fabricIndex, emberAfCurrentEndpoint(), groupId)) { - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; } else { @@ -284,7 +284,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb auto fabricIndex = commandObj->GetAccessingFabricIndex(); auto & groupId = commandData.groupId; - EmberAfStatus status = EMBER_ZCL_STATUS_INVALID_FIELD; + EmberAfStatus status = EMBER_ZCL_STATUS_INVALID_COMMAND; CHIP_ERROR err = CHIP_NO_ERROR; emberAfScenesClusterPrintln("RX: RemoveAllScenes 0x%2x", groupId); @@ -417,7 +417,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * comman if (!isEndpointInGroup(fabricIndex, emberAfCurrentEndpoint(), groupId)) { - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; } if (status == EMBER_ZCL_STATUS_SUCCESS) @@ -471,7 +471,7 @@ EmberAfStatus emberAfScenesClusterStoreCurrentSceneCallback(chip::FabricIndex fa if (!isEndpointInGroup(fabricIndex, endpoint, groupId)) { - return EMBER_ZCL_STATUS_INVALID_FIELD; + return EMBER_ZCL_STATUS_INVALID_COMMAND; } for (i = 0; i < MATTER_SCENES_TABLE_SIZE; i++) @@ -491,7 +491,7 @@ EmberAfStatus emberAfScenesClusterStoreCurrentSceneCallback(chip::FabricIndex fa // If the target index is still zero, the table is full. if (index == EMBER_AF_SCENE_TABLE_NULL_INDEX) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfPluginScenesServerRetrieveSceneEntry(entry, index); @@ -589,7 +589,7 @@ EmberAfStatus emberAfScenesClusterRecallSavedSceneCallback(chip::FabricIndex fab { if (!isEndpointInGroup(fabricIndex, endpoint, groupId)) { - return EMBER_ZCL_STATUS_INVALID_FIELD; + return EMBER_ZCL_STATUS_INVALID_COMMAND; } uint8_t i; @@ -737,7 +737,7 @@ bool emberAfPluginScenesServerParseAddScene( // Add Scene commands can only reference groups to which we belong. if (!isEndpointInGroup(fabricIndex, endpoint, groupId)) { - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; goto kickout; } @@ -758,7 +758,7 @@ bool emberAfPluginScenesServerParseAddScene( // If the target index is still zero, the table is full. if (index == EMBER_AF_SCENE_TABLE_NULL_INDEX) { - status = EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + status = EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; goto kickout; } @@ -1070,7 +1070,7 @@ bool emberAfPluginScenesServerParseViewScene(app::CommandHandler * commandObj, c // View Scene commands can only reference groups which we belong to. if (!isEndpointInGroup(fabricIndex, endpoint, groupId)) { - status = EMBER_ZCL_STATUS_INVALID_FIELD; + status = EMBER_ZCL_STATUS_INVALID_COMMAND; } else { diff --git a/src/app/clusters/window-covering-server/window-covering-server.cpp b/src/app/clusters/window-covering-server/window-covering-server.cpp index e32d75daeea49a..5955a6bb24ed12 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.cpp +++ b/src/app/clusters/window-covering-server/window-covering-server.cpp @@ -841,7 +841,7 @@ bool emberAfWindowCoveringClusterGoToLiftPercentageCallback(app::CommandHandler } else { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_CONSTRAINT_ERROR); } } else @@ -933,7 +933,7 @@ bool emberAfWindowCoveringClusterGoToTiltPercentageCallback(app::CommandHandler } else { - emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_INVALID_VALUE); + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_CONSTRAINT_ERROR); } } else diff --git a/src/app/tests/suites/DL_Schedules.yaml b/src/app/tests/suites/DL_Schedules.yaml index 580b6556a26869..7f87cfde766436 100644 --- a/src/app/tests/suites/DL_Schedules.yaml +++ b/src/app/tests/suites/DL_Schedules.yaml @@ -108,7 +108,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with out-of-bounds index" command: "SetWeekDaySchedule" @@ -129,7 +129,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with 0 user index" command: "SetWeekDaySchedule" @@ -150,7 +150,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with out-of-bounds user index" command: "SetWeekDaySchedule" @@ -171,7 +171,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule for non-existing user" command: "SetWeekDaySchedule" @@ -213,7 +213,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule for Sunday and Monday" command: "SetWeekDaySchedule" @@ -234,7 +234,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule for Sunday Wednesday and Saturday" command: "SetWeekDaySchedule" @@ -255,7 +255,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with invalid start hour" command: "SetWeekDaySchedule" @@ -276,7 +276,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with invalid start minute" command: "SetWeekDaySchedule" @@ -297,7 +297,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with invalid end hour" command: "SetWeekDaySchedule" @@ -318,7 +318,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with invalid end minute" command: "SetWeekDaySchedule" @@ -339,7 +339,7 @@ tests: - name: "endMinute" value: 60 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with start hour later that end hour" command: "SetWeekDaySchedule" @@ -360,7 +360,7 @@ tests: - name: "endMinute" value: 00 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Week Day schedule with start minute later that end minute when @@ -383,7 +383,7 @@ tests: - name: "endMinute" value: 49 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Make sure that previous operations did not create a schedule" command: "GetWeekDaySchedule" @@ -506,7 +506,7 @@ tests: - name: "localEndTime" value: 12345689 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Year Day schedule with out-of-bounds index" command: "SetYearDaySchedule" @@ -521,7 +521,7 @@ tests: - name: "localEndTime" value: 12345689 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Year Day schedule with 0 user index" command: "SetYearDaySchedule" @@ -536,7 +536,7 @@ tests: - name: "localEndTime" value: 12345689 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Year Day schedule with out-of-bounds user index" command: "SetYearDaySchedule" @@ -551,7 +551,7 @@ tests: - name: "localEndTime" value: 12345689 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Year Day schedule for non-existing user" command: "SetYearDaySchedule" @@ -704,7 +704,7 @@ tests: - name: "operatingMode" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Holiday schedule with out-of-bounds index" command: "SetHolidaySchedule" @@ -719,7 +719,7 @@ tests: - name: "operatingMode" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Holiday schedule with start hour later that end hour" command: "SetHolidaySchedule" @@ -734,7 +734,7 @@ tests: - name: "operatingMode" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Create Holiday schedule with invalid operating mode" command: "SetHolidaySchedule" @@ -749,7 +749,7 @@ tests: - name: "operatingMode" value: 5 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Make sure that previous operations did not create a schedule" command: "GetHolidaySchedule" @@ -918,7 +918,7 @@ tests: - name: "userIndex" value: 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Week Day schedule with out-of-bounds index" command: "ClearWeekDaySchedule" @@ -929,7 +929,7 @@ tests: - name: "userIndex" value: 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Week Day schedule with 0 user index" command: "ClearWeekDaySchedule" @@ -940,7 +940,7 @@ tests: - name: "userIndex" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Week Day schedule with out-of-bounds user index" command: "ClearWeekDaySchedule" @@ -951,7 +951,7 @@ tests: - name: "userIndex" value: NumberOfTotalUsersSupported + 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Week Day schedule with non-existing user" command: "ClearWeekDaySchedule" @@ -1043,7 +1043,7 @@ tests: - name: "userIndex" value: 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Year Day schedule with out-of-bounds index" command: "ClearYearDaySchedule" @@ -1054,7 +1054,7 @@ tests: - name: "userIndex" value: 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Year Day schedule with 0 user index" command: "ClearYearDaySchedule" @@ -1065,7 +1065,7 @@ tests: - name: "userIndex" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Year Day schedule with out-of-bounds user index" command: "ClearYearDaySchedule" @@ -1076,7 +1076,7 @@ tests: - name: "userIndex" value: NumberOfTotalUsersSupported + 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Year Day schedule with non-existing user" command: "ClearYearDaySchedule" @@ -1164,7 +1164,7 @@ tests: - name: "holidayIndex" value: 0 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Clear Holiday schedule with out-of-bounds index" command: "ClearHolidaySchedule" @@ -1173,7 +1173,7 @@ tests: - name: "holidayIndex" value: NumberOfYearDaySchedulesSupportedPerUser + 1 response: - error: INVALID_FIELD + error: INVALID_COMMAND - label: "Make sure that week day schedule was not deleted" command: "GetWeekDaySchedule" diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index ead88b5677c0af..e03a338a90e5fa 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -2965,7 +2965,7 @@ tests: "Send a command that takes an optional parameter but do not set it." command: "TestSimpleOptionalArgumentRequest" response: - error: INVALID_VALUE + error: CONSTRAINT_ERROR - label: "Send a command that takes an optional parameter but do not set it." diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 6bcf85cd189999..646ea32c5565d7 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -28,7 +28,6 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_FAILURE = 0x01, EMBER_ZCL_STATUS_INVALID_SUBSCRIPTION = 0x7D, EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS = 0x7E, - EMBER_ZCL_STATUS_NOT_AUTHORIZED = 0x7E, // Deprecated; same as UNSUPPORTED_ACCESS EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT = 0x7F, EMBER_ZCL_STATUS_MALFORMED_COMMAND = 0x80, EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND = 0x81, @@ -36,14 +35,10 @@ enum EmberAfStatus : uint8_t EMBER_ZCL_STATUS_DEPRECATED83 = 0x83, EMBER_ZCL_STATUS_DEPRECATED84 = 0x84, EMBER_ZCL_STATUS_INVALID_COMMAND = 0x85, - EMBER_ZCL_STATUS_INVALID_FIELD = 0x85, // Deprecated; same as INVALID_COMMAND EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE = 0x86, EMBER_ZCL_STATUS_CONSTRAINT_ERROR = 0x87, - EMBER_ZCL_STATUS_INVALID_VALUE = 0x87, // Deprecated; same as CONSTRAINT_ERROR EMBER_ZCL_STATUS_UNSUPPORTED_WRITE = 0x88, - EMBER_ZCL_STATUS_READ_ONLY = 0x88, // Deprecated; same as UNSUPPORTED_WRITE EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED = 0x89, - EMBER_ZCL_STATUS_INSUFFICIENT_SPACE = 0x89, // Deprecated; same as RESOURCE_EXHAUSTED EMBER_ZCL_STATUS_DUPLICATE_EXISTS = 0x8A, EMBER_ZCL_STATUS_NOT_FOUND = 0x8B, EMBER_ZCL_STATUS_UNREPORTABLE_ATTRIBUTE = 0x8C, diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index d9b76dec4101af..e30b990546b62d 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -197,7 +197,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb if (realIndex >= MAX_ENDPOINT_COUNT) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } if (id == kInvalidEndpointId) { @@ -207,7 +207,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb auto serverClusterCount = emberAfClusterCountForEndpointType(ep, /* server = */ true); if (dataVersionStorage.size() < serverClusterCount) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } index = static_cast(realIndex); @@ -415,7 +415,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 1) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfCopyString(dest, src, bufferSize - 1); } @@ -423,7 +423,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 2) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } emberAfCopyLongString(dest, src, bufferSize - 2); } @@ -431,7 +431,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (bufferSize < 2) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } // Just copy the length. @@ -441,7 +441,7 @@ static EmberAfStatus typeSensitiveMemCopy(ClusterId clusterId, uint8_t * dest, u { if (!ignoreReadLength && readLength < am->size) { - return EMBER_ZCL_STATUS_INSUFFICIENT_SPACE; + return EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED; } if (src == nullptr) { @@ -545,7 +545,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, if (!emberAfAttributeWriteAccessCallback(attRecord->endpoint, attRecord->clusterId, am->attributeId)) { - return EMBER_ZCL_STATUS_NOT_AUTHORIZED; + return EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS; } } else @@ -560,7 +560,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, if (!emberAfAttributeReadAccessCallback(attRecord->endpoint, attRecord->clusterId, am->attributeId)) { - return EMBER_ZCL_STATUS_NOT_AUTHORIZED; + return EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS; } } diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 5d9b898974ea70..4012932b2dc381 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -216,8 +216,8 @@ static bool IsNullValue(const uint8_t * data, uint16_t dataLen, bool isAttribute // device is not found in the attribute table) // - EMBER_ZCL_STATUS_INVALID_DATA_TYPE: if the data type passed in doesnt match the type // stored in the attribute table -// - EMBER_ZCL_STATUS_READ_ONLY: if the attribute isnt writable -// - EMBER_ZCL_STATUS_INVALID_VALUE: if the value is set out of the allowable range for +// - EMBER_ZCL_STATUS_UNSUPPORTED_WRITE: if the attribute isnt writable +// - EMBER_ZCL_STATUS_CONSTRAINT_ERROR: if the value is set out of the allowable range for // the attribute // - EMBER_ZCL_STATUS_SUCCESS: if the attribute was found and successfully written // @@ -267,12 +267,12 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu { emberAfAttributesPrintln("%pattr not writable", "WRITE ERR: "); emberAfAttributesFlush(); - return EMBER_ZCL_STATUS_READ_ONLY; + return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; } } // if the value the attribute is being set to is out of range - // return EMBER_ZCL_STATUS_INVALID_VALUE + // return EMBER_ZCL_STATUS_CONSTRAINT_ERROR if ((metadata->mask & ATTRIBUTE_MASK_MIN_MAX) != 0U) { EmberAfDefaultAttributeValue minv = metadata->defaultValue.ptrToMinMaxValue->minValue; @@ -309,7 +309,7 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu // null value is always in-range for a nullable attribute. (!metadata->IsNullable() || !IsNullValue(data, dataLen, isAttributeSigned))) { - return EMBER_ZCL_STATUS_INVALID_VALUE; + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } } @@ -406,7 +406,7 @@ EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, Attribut } else { // failed, print debug info - if (status == EMBER_ZCL_STATUS_INSUFFICIENT_SPACE) + if (status == EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED) { emberAfAttributesPrintln("READ: attribute size too large for caller"); emberAfAttributesFlush(); diff --git a/src/app/util/generic-callbacks.h b/src/app/util/generic-callbacks.h index f690732081cc44..0da0b07d17ca80 100644 --- a/src/app/util/generic-callbacks.h +++ b/src/app/util/generic-callbacks.h @@ -110,7 +110,7 @@ bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::Cluste * value of EMBER_ZCL_STATUS_SUCCESS. Ensure that the size of the externally * managed attribute value is smaller than what the buffer can hold. In the case * of a buffer overflow throw an appropriate error such as - * EMBER_ZCL_STATUS_INSUFFICIENT_SPACE. Any other return value indicates the + * EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED. Any other return value indicates the * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 2091c79610662a..e6f921c53748a5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -52952,7 +52952,7 @@ class TestClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); break; case 374: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_VALUE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 375: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -70995,46 +70995,46 @@ class DL_SchedulesSuite : public TestCommand } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -71098,16 +71098,16 @@ class DL_SchedulesSuite : public TestCommand } break; case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -71177,16 +71177,16 @@ class DL_SchedulesSuite : public TestCommand } break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -71275,16 +71275,16 @@ class DL_SchedulesSuite : public TestCommand } break; case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -71339,16 +71339,16 @@ class DL_SchedulesSuite : public TestCommand } break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -71403,10 +71403,10 @@ class DL_SchedulesSuite : public TestCommand } break; case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 9fd2ea0102cf72..af4c59a07376d9 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -77629,7 +77629,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER)); break; case 374: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_VALUE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 375: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -87303,7 +87303,7 @@ class TestCluster : public TestCommandBridge { ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_VALUE)); + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); }]; @@ -114251,46 +114251,46 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114311,16 +114311,16 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -114347,16 +114347,16 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114386,16 +114386,16 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 54: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -114410,16 +114410,16 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 59: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 60: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 61: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 62: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -114434,10 +114434,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 67: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 68: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_FIELD)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -114822,7 +114822,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -114852,7 +114852,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -114882,7 +114882,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -114912,7 +114912,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -114972,7 +114972,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115002,7 +115002,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115032,7 +115032,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115062,7 +115062,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115092,7 +115092,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115122,7 +115122,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115152,7 +115152,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115182,7 +115182,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115214,7 +115214,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115471,7 +115471,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115498,7 +115498,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115525,7 +115525,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115552,7 +115552,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115863,7 +115863,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115890,7 +115890,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115917,7 +115917,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -115944,7 +115944,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116300,7 +116300,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116326,7 +116326,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116352,7 +116352,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116378,7 +116378,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116588,7 +116588,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116614,7 +116614,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116640,7 +116640,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116666,7 +116666,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116875,7 +116875,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }]; @@ -116900,7 +116900,7 @@ class DL_Schedules : public TestCommandBridge { err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_INVALID_FIELD)); + EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); }];