Skip to content

Commit d43214c

Browse files
Added new CHIP_ERROR
1 parent afd568c commit d43214c

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

src/app/clusters/scenes-server/SceneHandlerImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace {
2626
/// @brief Validate the attribute exists for a given cluster
2727
/// @param[in] clusterID Cluster ID
2828
/// @param[in] attID Attribute ID
29-
/// @return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE if the attribute does not exist for a given cluster or is not scenable
29+
/// @return CHIP_ERROR_UNSUPPORTED_ATTRIBUTE if the attribute does not exist for a given cluster or is not scenable
3030
/// @note This will allways fail for global list attributes. If we do want to make them scenable someday, we will need to
3131
/// use a different validation method.
3232
// TODO: Assess if we also want to throw an error if the attribute value is out of range
@@ -37,7 +37,7 @@ CHIP_ERROR ValidateAttributePath(EndpointId endpoint, ClusterId cluster, Attribu
3737
bool attIndex = emberAfContainsAttribute(endpoint, cluster, attributeId);
3838
if (!attIndex)
3939
{
40-
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
40+
return CHIP_ERROR_UNSUPPORTED_ATTRIBUTE;
4141
}
4242
return CHIP_NO_ERROR;
4343
}

src/app/clusters/scenes-server/scenes-server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ CHIP_ERROR AddResponseOnError(CommandHandlerInterface::HandlerContext & ctx, Res
7070
{
7171
resp.status = to_underlying(Protocols::InteractionModel::Status::ResourceExhausted);
7272
}
73-
else if (CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE == err)
73+
else if (CHIP_ERROR_UNSUPPORTED_ATTRIBUTE == err)
7474
{
7575
resp.status = to_underlying(Protocols::InteractionModel::Status::InvalidCommand);
7676
}

src/app/tests/suites/certification/Test_TC_S_2_2.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ tests:
435435
"Step 4e: TH sends a RecallScene command to DUT with the GroupID field
436436
set to GI (Where GI is a group currently absent from the group table)
437437
and the SceneID field set to 0x01."
438-
PICS: S.S.C05.Rsp
439438
command: "RecallScene"
440439
arguments:
441440
values:

src/app/tests/suites/certification/Test_TC_S_2_3.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ tests:
721721
- label:
722722
"Step 6g: TH sends a ViewScene command to DUT with the GroupID field
723723
set to G1 and the SceneID field set to 0x03."
724-
PICS: S.S.C01.Rsp && PICS_SDK_CI_ONLY
724+
PICS: S.S.C01.Rsp
725725
command: "ViewScene"
726726
arguments:
727727
values:

src/lib/core/CHIPError.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,15 @@ using CHIP_ERROR = ::chip::ChipError;
11351135
#define CHIP_ERROR_TRANSACTION_CANCELED CHIP_CORE_ERROR(0x68)
11361136

11371137
// AVAILABLE: 0x69
1138-
// AVAILABLE: 0x6a
1138+
1139+
/**
1140+
* @def CHIP_ERROR_UNSUPPORTED_ATTRIBUTE
1141+
*
1142+
* @brief
1143+
* The requested CHIP attribute is not supported.
1144+
*
1145+
*/
1146+
#define CHIP_ERROR_UNSUPPORTED_ATTRIBUTE CHIP_CORE_ERROR(0x6a)
11391147

11401148
/**
11411149
* @def CHIP_ERROR_INVALID_SUBSCRIPTION

0 commit comments

Comments
 (0)