Skip to content

Commit e77765a

Browse files
committed
Merge branch 'lit_icd_support_for_cc13x4_26x4' of github.com:abiradarti/connectedhomeip into lit_icd_support_for_cc13x4_26x4
2 parents 84d1144 + 6b80e0e commit e77765a

File tree

30 files changed

+191
-118
lines changed

30 files changed

+191
-118
lines changed

docs/ERROR_CODES.md

+2
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ This file was **AUTOMATICALLY** generated by
118118
| 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` |
119119
| 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` |
120120
| 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` |
121+
| 168 | 0xA8 | `CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL` |
121122
| 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` |
122123
| 172 | 0xAC | `CHIP_ERROR_INTERNAL` |
123124
| 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` |
@@ -252,6 +253,7 @@ This file was **AUTOMATICALLY** generated by
252253
| 1426 | 0x592 | `DATA_VERSION_MISMATCH` |
253254
| 1428 | 0x594 | `TIMEOUT` |
254255
| 1436 | 0x59C | `BUSY` |
256+
| 1437 | 0x59D | `ACCESS_RESTRICTED` |
255257
| 1475 | 0x5C3 | `UNSUPPORTED_CLUSTER` |
256258
| 1477 | 0x5C5 | `NO_UPSTREAM_SUBSCRIPTION` |
257259
| 1478 | 0x5C6 | `NEEDS_TIMED_INTERACTION` |

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -2217,6 +2217,7 @@
22172217
}; \
22182218
const EmberAfGenericClusterFunction chipFuncArrayThermostatServer[] = { \
22192219
(EmberAfGenericClusterFunction) emberAfThermostatClusterServerInitCallback, \
2220+
(EmberAfGenericClusterFunction) MatterThermostatClusterServerAttributeChangedCallback, \
22202221
(EmberAfGenericClusterFunction) MatterThermostatClusterServerShutdownCallback, \
22212222
(EmberAfGenericClusterFunction) MatterThermostatClusterServerPreAttributeChangedCallback, \
22222223
}; \
@@ -3756,7 +3757,7 @@
37563757
.attributes = ZAP_ATTRIBUTE_INDEX(616), \
37573758
.attributeCount = 26, \
37583759
.clusterSize = 72, \
3759-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \
3760+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \
37603761
.functions = chipFuncArrayThermostatServer, \
37613762
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ), \
37623763
.generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 246 ), \

src/access/AccessControl.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -538,12 +538,7 @@ CHIP_ERROR AccessControl::CheckARL(const SubjectDescriptor & subjectDescriptor,
538538
if (result != CHIP_NO_ERROR)
539539
{
540540
ChipLogProgress(DataManagement, "AccessControl: %s",
541-
#if 0
542-
// TODO(#35177): new error code coming when access check plumbing are fixed in callers
543541
(result == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL) ? "denied (restricted)" : "denied (restriction error)");
544-
#else
545-
(result == CHIP_ERROR_ACCESS_DENIED) ? "denied (restricted)" : "denied (restriction error)");
546-
#endif
547542
return result;
548543
}
549544

src/access/AccessRestrictionProvider.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -197,45 +197,25 @@ CHIP_ERROR AccessRestrictionProvider::DoCheck(const std::vector<Entry> & entries
197197
if (requestPath.requestType == RequestType::kAttributeReadRequest ||
198198
requestPath.requestType == RequestType::kAttributeWriteRequest)
199199
{
200-
#if 0
201-
// TODO(#35177): use new ARL error code when access checks are fixed
202200
return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL;
203-
#else
204-
return CHIP_ERROR_ACCESS_DENIED;
205-
#endif
206201
}
207202
break;
208203
case Type::kAttributeWriteForbidden:
209204
if (requestPath.requestType == RequestType::kAttributeWriteRequest)
210205
{
211-
#if 0
212-
// TODO(#35177): use new ARL error code when access checks are fixed
213206
return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL;
214-
#else
215-
return CHIP_ERROR_ACCESS_DENIED;
216-
#endif
217207
}
218208
break;
219209
case Type::kCommandForbidden:
220210
if (requestPath.requestType == RequestType::kCommandInvokeRequest)
221211
{
222-
#if 0
223-
// TODO(#35177): use new ARL error code when access checks are fixed
224212
return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL;
225-
#else
226-
return CHIP_ERROR_ACCESS_DENIED;
227-
#endif
228213
}
229214
break;
230215
case Type::kEventForbidden:
231216
if (requestPath.requestType == RequestType::kEventReadRequest)
232217
{
233-
#if 0
234-
// TODO(#35177): use new ARL error code when access checks are fixed
235218
return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL;
236-
#else
237-
return CHIP_ERROR_ACCESS_DENIED;
238-
#endif
239219
}
240220
break;
241221
}

src/access/tests/TestAccessRestrictionProvider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void RunChecks(const CheckData * checkData, size_t count)
174174
{
175175
for (size_t i = 0; i < count; i++)
176176
{
177-
CHIP_ERROR expectedResult = checkData[i].allow ? CHIP_NO_ERROR : CHIP_ERROR_ACCESS_DENIED;
177+
CHIP_ERROR expectedResult = checkData[i].allow ? CHIP_NO_ERROR : CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL;
178178
EXPECT_EQ(accessControl.Check(checkData[i].subjectDescriptor, checkData[i].requestPath, checkData[i].privilege),
179179
expectedResult);
180180
}

src/app/CommandHandlerImpl.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,13 @@ Status CommandHandlerImpl::ProcessCommandDataIB(CommandDataIB::Parser & aCommand
410410
err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege);
411411
if (err != CHIP_NO_ERROR)
412412
{
413-
if (err != CHIP_ERROR_ACCESS_DENIED)
413+
if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL))
414414
{
415415
return FallibleAddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success;
416416
}
417417
// TODO: when wildcard invokes are supported, handle them to discard rather than fail with status
418-
return FallibleAddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success;
418+
Status status = err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted;
419+
return FallibleAddStatus(concretePath, status) != CHIP_NO_ERROR ? Status::Failure : Status::Success;
419420
}
420421
}
421422

src/app/EventManagement.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,9 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut
563563
Access::GetAccessControl().Check(eventLoadOutContext->mSubjectDescriptor, requestPath, requestPrivilege);
564564
if (accessControlError != CHIP_NO_ERROR)
565565
{
566-
ReturnErrorCodeIf(accessControlError != CHIP_ERROR_ACCESS_DENIED, accessControlError);
566+
ReturnErrorCodeIf((accessControlError != CHIP_ERROR_ACCESS_DENIED) &&
567+
(accessControlError != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL),
568+
accessControlError);
567569
ret = CHIP_ERROR_UNEXPECTED_EVENT;
568570
}
569571

src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ constexpr size_t kUniqueLocationIdMaxSize = 64;
3434
constexpr size_t kUniqueLocationIdsListMaxSize = 64;
3535
constexpr size_t kLocationDescriptorNameMaxSize = 128;
3636

37-
constexpr size_t kDeviceDirectoryMaxSize = 256;
38-
constexpr size_t kLocationDirectoryMaxSize = 64;
39-
4037
class AttrAccess : public AttributeAccessInterface
4138
{
4239
public:
@@ -264,7 +261,6 @@ CHIP_ERROR EcosystemInformationServer::AddDeviceInfo(EndpointId aEndpoint, std::
264261
VerifyOrReturnError((aEndpoint != kRootEndpointId && aEndpoint != kInvalidEndpointId), CHIP_ERROR_INVALID_ARGUMENT);
265262

266263
auto & deviceInfo = mDevicesMap[aEndpoint];
267-
VerifyOrReturnError((deviceInfo.mDeviceDirectory.size() < kDeviceDirectoryMaxSize), CHIP_ERROR_NO_MEMORY);
268264
deviceInfo.mDeviceDirectory.push_back(std::move(aDevice));
269265
return CHIP_NO_ERROR;
270266
}
@@ -282,7 +278,6 @@ CHIP_ERROR EcosystemInformationServer::AddLocationInfo(EndpointId aEndpoint, con
282278
EcosystemLocationKey key = { .mUniqueLocationId = aLocationId, .mFabricIndex = aFabricIndex };
283279
VerifyOrReturnError((deviceInfo.mLocationDirectory.find(key) == deviceInfo.mLocationDirectory.end()),
284280
CHIP_ERROR_INVALID_ARGUMENT);
285-
VerifyOrReturnError((deviceInfo.mLocationDirectory.size() < kLocationDirectoryMaxSize), CHIP_ERROR_NO_MEMORY);
286281
deviceInfo.mLocationDirectory[key] = std::move(aLocation);
287282
return CHIP_NO_ERROR;
288283
}

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

+51
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,52 @@ void ThermostatAttrAccess::OnFabricRemoved(const FabricTable & fabricTable, Fabr
468468
}
469469
}
470470

471+
void MatterThermostatClusterServerAttributeChangedCallback(const ConcreteAttributePath & attributePath)
472+
{
473+
uint32_t flags;
474+
if (FeatureMap::Get(attributePath.mEndpointId, &flags) != Status::Success)
475+
{
476+
ChipLogError(Zcl, "MatterThermostatClusterServerAttributeChangedCallback: could not get feature flags");
477+
return;
478+
}
479+
480+
auto featureMap = BitMask<Feature, uint32_t>(flags);
481+
if (!featureMap.Has(Feature::kPresets))
482+
{
483+
// This server does not support presets, so nothing to do
484+
return;
485+
}
486+
487+
bool occupied = true;
488+
if (featureMap.Has(Feature::kOccupancy))
489+
{
490+
BitMask<OccupancyBitmap, uint8_t> occupancy;
491+
if (Occupancy::Get(attributePath.mEndpointId, &occupancy) == Status::Success)
492+
{
493+
occupied = occupancy.Has(OccupancyBitmap::kOccupied);
494+
}
495+
}
496+
497+
bool clearActivePreset = false;
498+
switch (attributePath.mAttributeId)
499+
{
500+
case OccupiedHeatingSetpoint::Id:
501+
case OccupiedCoolingSetpoint::Id:
502+
clearActivePreset = occupied;
503+
break;
504+
case UnoccupiedHeatingSetpoint::Id:
505+
case UnoccupiedCoolingSetpoint::Id:
506+
clearActivePreset = !occupied;
507+
break;
508+
}
509+
if (!clearActivePreset)
510+
{
511+
return;
512+
}
513+
ChipLogProgress(Zcl, "Setting active preset to null");
514+
gThermostatAttrAccess.SetActivePreset(attributePath.mEndpointId, std::nullopt);
515+
}
516+
471517
} // namespace Thermostat
472518
} // namespace Clusters
473519
} // namespace app
@@ -762,6 +808,11 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr
762808
}
763809
}
764810

811+
void MatterThermostatClusterServerAttributeChangedCallback(const ConcreteAttributePath & attributePath)
812+
{
813+
Thermostat::MatterThermostatClusterServerAttributeChangedCallback(attributePath);
814+
}
815+
765816
bool emberAfThermostatClusterClearWeeklyScheduleCallback(app::CommandHandler * commandObj,
766817
const app::ConcreteCommandPath & commandPath,
767818
const Commands::ClearWeeklySchedule::DecodableType & commandData)

src/app/clusters/thermostat-server/thermostat-server.h

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ class ThermostatAttrAccess : public chip::app::AttributeAccessInterface, public
207207
friend void TimerExpiredCallback(System::Layer * systemLayer, void * callbackContext);
208208

209209
friend void MatterThermostatClusterServerShutdownCallback(EndpointId endpoint);
210+
friend void MatterThermostatClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
210211

211212
friend bool emberAfThermostatClusterSetActivePresetRequestCallback(
212213
CommandHandler * commandObj, const ConcreteCommandPath & commandPath,

src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,17 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data
281281
RequiredPrivilege::ForReadAttribute(request.path));
282282
if (err != CHIP_NO_ERROR)
283283
{
284-
ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err);
284+
ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err);
285285

286286
// Implementation of 8.4.3.2 of the spec for path expansion
287287
if (request.path.mExpanded)
288288
{
289289
return CHIP_NO_ERROR;
290290
}
291-
// access denied has a specific code for IM
292-
return CHIP_IM_GLOBAL_STATUS(UnsupportedAccess);
291+
292+
// access denied and access restricted have specific codes for IM
293+
return err == CHIP_ERROR_ACCESS_DENIED ? CHIP_IM_GLOBAL_STATUS(UnsupportedAccess)
294+
: CHIP_IM_GLOBAL_STATUS(AccessRestricted);
293295
}
294296
}
295297

src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat
287287

288288
if (err != CHIP_NO_ERROR)
289289
{
290-
ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err);
290+
ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err);
291291

292292
// TODO: when wildcard/group writes are supported, handle them to discard rather than fail with status
293-
return Status::UnsupportedAccess;
293+
return err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted;
294294
}
295295
}
296296

src/app/common/templates/config-data.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ ClustersWithAttributeChangedFunctions:
7272
- Pump Configuration and Control
7373
- Window Covering
7474
- Fan Control
75+
- Thermostat
7576

7677
ClustersWithShutdownFunctions:
7778
- Barrier Control

src/app/reporting/Engine.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -346,23 +346,26 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool &
346346
Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path);
347347

348348
err = Access::GetAccessControl().Check(apReadHandler->GetSubjectDescriptor(), requestPath, requestPrivilege);
349-
if (err != CHIP_ERROR_ACCESS_DENIED)
349+
if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL))
350350
{
351351
ReturnErrorOnFailure(err);
352352
}
353353
else
354354
{
355355
TLV::TLVWriter checkpoint = aWriter;
356-
err = EventReportIB::ConstructEventStatusIB(aWriter, path, StatusIB(Status::UnsupportedAccess));
356+
err = EventReportIB::ConstructEventStatusIB(aWriter, path,
357+
err == CHIP_ERROR_ACCESS_DENIED ? StatusIB(Status::UnsupportedAccess)
358+
: StatusIB(Status::AccessRestricted));
359+
357360
if (err != CHIP_NO_ERROR)
358361
{
359362
aWriter = checkpoint;
360363
break;
361364
}
362365
aHasEncodedData = true;
363-
ChipLogDetail(InteractionModel, "Access to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL",
366+
ChipLogDetail(InteractionModel, "Access to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by %s",
364367
current->mValue.mEndpointId, ChipLogValueMEI(current->mValue.mClusterId),
365-
ChipLogValueMEI(current->mValue.mEventId));
368+
ChipLogValueMEI(current->mValue.mEventId), err == CHIP_ERROR_ACCESS_DENIED ? "ACL" : "ARL");
366369
}
367370
current = current->mpNext;
368371
}

src/app/util/ember-compatibility-functions.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,13 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b
302302
CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, requestPrivilege);
303303
if (err != CHIP_NO_ERROR)
304304
{
305-
ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err);
305+
ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err);
306306
if (aPath.mExpanded)
307307
{
308308
return CHIP_NO_ERROR;
309309
}
310-
return CHIP_IM_GLOBAL_STATUS(UnsupportedAccess);
310+
return err == CHIP_ERROR_ACCESS_DENIED ? CHIP_IM_GLOBAL_STATUS(UnsupportedAccess)
311+
: CHIP_IM_GLOBAL_STATUS(AccessRestricted);
311312
}
312313
}
313314

@@ -701,9 +702,12 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor,
701702
}
702703
if (err != CHIP_NO_ERROR)
703704
{
704-
ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err);
705+
ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err);
705706
// TODO: when wildcard/group writes are supported, handle them to discard rather than fail with status
706-
return apWriteHandler->AddStatus(aPath, Protocols::InteractionModel::Status::UnsupportedAccess);
707+
return apWriteHandler->AddStatus(aPath,
708+
err == CHIP_ERROR_ACCESS_DENIED
709+
? Protocols::InteractionModel::Status::UnsupportedAccess
710+
: Protocols::InteractionModel::Status::AccessRestricted);
707711
}
708712
apWriteHandler->CacheACLCheckResult({ aPath, requestPrivilege });
709713
}

src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ limitations under the License.
4444
<server init="false" tick="false">true</server>
4545
<!-- cluster revision -->
4646
<globalAttribute code="0xFFFD" side="either" value="1"/>
47-
<attribute code="0x0000" side="server" define="DEVICE_DIRECTORY" type="array" entryType="EcosystemDeviceStruct" length="256" minLength="1">
47+
<attribute code="0x0000" side="server" define="DEVICE_DIRECTORY" type="array" entryType="EcosystemDeviceStruct">
4848
<description>DeviceDirectory</description>
4949
<access op="read" privilege="manage"/>
5050
</attribute>
51-
<attribute code="0x0001" side="server" define="LOCATION_DIRECTORY" type="array" entryType="EcosystemLocationStruct" length="64" minLength="1">
51+
<attribute code="0x0001" side="server" define="LOCATION_DIRECTORY" type="array" entryType="EcosystemLocationStruct">
5252
<description>LocationDirectory</description>
5353
<access op="read" privilege="manage"/>
5454
</attribute>

src/controller/java/src/chip/devicecontroller/model/Status.java

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public enum Code {
5757
Reserved99(0x99),
5858
Reserved9a(0x9a),
5959
Busy(0x9c),
60+
AccessRestricted(0x9d),
6061
Deprecatedc0(0xc0),
6162
Deprecatedc1(0xc1),
6263
Deprecatedc2(0xc2),

src/controller/java/src/matter/controller/model/Status.kt

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ data class Status(val status: Int, val clusterStatus: Int?) {
5757
RESERVED99(0X99),
5858
RESERVED9A(0X9A),
5959
BUSY(0X9C),
60+
ACCESS_RESTRICTED(0x9D),
6061
DEPRECATEDC0(0XC0),
6162
DEPRECATEDC1(0XC1),
6263
DEPRECATEDC2(0XC2),

src/controller/python/chip/interaction_model/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class Status(enum.IntEnum):
7373
Reserved99 = 0x99
7474
Reserved9a = 0x9a
7575
Busy = 0x9c
76+
AccessRestricted = 0x9d
7677
Deprecatedc0 = 0xc0
7778
Deprecatedc1 = 0xc1
7879
Deprecatedc2 = 0xc2

src/lib/core/CHIPError.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err)
362362
case CHIP_ERROR_VERSION_MISMATCH.AsInteger():
363363
desc = "Version mismatch";
364364
break;
365+
case CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL.AsInteger():
366+
desc = "The CHIP message's access is restricted by ARL";
367+
break;
365368
case CHIP_EVENT_ID_FOUND.AsInteger():
366369
desc = "Event ID matching criteria was found";
367370
break;

src/lib/core/CHIPError.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,14 @@ using CHIP_ERROR = ::chip::ChipError;
14841484
*/
14851485
#define CHIP_ERROR_VERSION_MISMATCH CHIP_CORE_ERROR(0xa7)
14861486

1487-
// AVAILABLE: 0xa8
1487+
/**
1488+
* @def CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL
1489+
*
1490+
* @brief
1491+
* The CHIP message is not granted access for further processing due to Access Restriction List.
1492+
*/
1493+
#define CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL CHIP_CORE_ERROR(0xa8)
1494+
14881495
// AVAILABLE: 0xa9
14891496
// AVAILABLE: 0xaa
14901497

0 commit comments

Comments
 (0)