Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icd management: make the feature map and operating mode managed by AAI #37062

Merged
merged 11 commits into from
Jan 17, 2025
Prev Previous commit
Next Next commit
change the macro for operating mode
wqx6 committed Jan 15, 2025
commit 185bd7622784165189c0bd9ca34f5b266961fdb3
Original file line number Diff line number Diff line change
@@ -70,14 +70,14 @@ class IcdManagementAttributeAccess : public AttributeAccessInterface
return encoder.Encode(mICDConfigurationData->GetFeatureMap());
}

#if CHIP_CONFIG_ENABLE_ICD_DSLS
#if CHIP_CONFIG_ENABLE_ICD_LIT
wqx6 marked this conversation as resolved.
Show resolved Hide resolved
CHIP_ERROR ReadOperatingMode(EndpointId endpoint, AttributeValueEncoder & encoder)
{
return mICDConfigurationData->GetICDMode() == ICDConfigurationData::ICDMode::SIT
? encoder.Encode(IcdManagement::OperatingModeEnum::kSit)
: encoder.Encode(IcdManagement::OperatingModeEnum::kLit);
}
#endif // CHIP_CONFIG_ENABLE_ICD_DSLS
#endif // CHIP_CONFIG_ENABLE_ICD_LIT

#if CHIP_CONFIG_ENABLE_ICD_CIP
CHIP_ERROR ReadRegisteredClients(EndpointId endpoint, AttributeValueEncoder & encoder);
@@ -110,10 +110,10 @@ CHIP_ERROR IcdManagementAttributeAccess::Read(const ConcreteReadAttributePath &

case IcdManagement::Attributes::FeatureMap::Id:
return ReadFeatureMap(aPath.mEndpointId, aEncoder);
#if CHIP_CONFIG_ENABLE_ICD_DSLS
#if CHIP_CONFIG_ENABLE_ICD_LIT
case IcdManagement::Attributes::OperatingMode::Id:
return ReadOperatingMode(aPath.mEndpointId, aEncoder);
#endif // CHIP_CONFIG_ENABLE_ICD_DSLS
#endif // CHIP_CONFIG_ENABLE_ICD_LIT
#if CHIP_CONFIG_ENABLE_ICD_CIP
case IcdManagement::Attributes::RegisteredClients::Id:
return ReadRegisteredClients(aPath.mEndpointId, aEncoder);