Skip to content

Commit

Permalink
Mass-replace Attributes::Ids::* with Attributes::*::Id.
Browse files Browse the repository at this point in the history
This commit was created by installing the git-extras package and running:

  git sed -f g "Attributes::Ids::\([A-Za-z0-9]*\)" "Attributes::\1::Id"
  • Loading branch information
bzbarsky-apple committed Sep 30, 2021
1 parent b8f1fab commit a1f65d6
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion examples/lighting-app/efr32/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
{
if (clusterId == OnOff::Id)
{
if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogError(Zcl, "ON OFF attribute ID: " ChipLogFormatMEI " Type: %" PRIu8 " Value: %" PRIu16 ", length %" PRIu16,
ChipLogValueMEI(attributeId), type, *value, size);
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/k32w/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/linux/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/nrfconnect/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ using namespace chip::app::Clusters;
void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask,
uint16_t manufacturerCode, uint8_t type, uint16_t size, uint8_t * value)
{
if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::Ids::OnOff)
if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Cluster OnOff: attribute OnOff set to %" PRIu8, *value);
LightingMgr().InitiateAction(*value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION,
AppEvent::kEventType_Lighting, size, value);
}
else if (clusterId == LevelControl::Id && attributeId == LevelControl::Attributes::Ids::CurrentLevel)
else if (clusterId == LevelControl::Id && attributeId == LevelControl::Attributes::CurrentLevel::Id)
{
ChipLogProgress(Zcl, "Cluster LevelControl: attribute CurrentLevel set to %" PRIu8, *value);
LightingMgr().InitiateAction(LightingManager::LEVEL_ACTION, AppEvent::kEventType_Lighting, size, value);
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/telink/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId

if (clusterId == OnOff::Id)
{
if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand All @@ -48,7 +48,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
}
else if (clusterId == LevelControl::Id)
{
if (attributeId != LevelControl::Attributes::Ids::CurrentLevel)
if (attributeId != LevelControl::Attributes::CurrentLevel::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/efr32/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
EFR32_LOG("Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/k32w/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nrfconnect/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ using namespace ::chip::app::Clusters;
void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, uint8_t mask,
uint16_t manufacturerCode, uint8_t type, uint16_t size, uint8_t * value)
{
if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::Ids::OnOff)
if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Cluster OnOff: attribute OnOff set to %" PRIu8, *value);
BoltLockMgr().InitiateAction(0, *value ? BoltLockManager::LOCK_ACTION : BoltLockManager::UNLOCK_ACTION);
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/cc13x2x7_26x2x7/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
2 changes: 1 addition & 1 deletion examples/pump-app/nrfconnect/main/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: %" PRIx32, attributeId);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void emberAfPostAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId
return;
}

if (attributeId != OnOff::Attributes::Ids::OnOff)
if (attributeId != OnOff::Attributes::OnOff::Id)
{
ChipLogProgress(Zcl, "Unknown attribute ID: %" PRIx32, attributeId);
return;
Expand Down
6 changes: 3 additions & 3 deletions src/app/clusters/descriptor/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ EmberAfStatus writeAttribute(EndpointId endpoint, AttributeId attributeId, uint8
EmberAfStatus writeClientServerAttribute(EndpointId endpoint, bool server)
{
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
AttributeId attributeId = server ? Descriptor::Attributes::Ids::ServerList : Descriptor::Attributes::Ids::ClientList;
AttributeId attributeId = server ? Descriptor::Attributes::ServerList::Id : Descriptor::Attributes::ClientList::Id;

uint16_t clusterCount = emberAfClusterCount(endpoint, server);

Expand Down Expand Up @@ -85,7 +85,7 @@ EmberAfStatus writeClientAttribute(EndpointId endpoint)
EmberAfStatus writeDeviceAttribute(EndpointId endpoint, uint16_t index)
{
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
AttributeId attributeId = Descriptor::Attributes::Ids::DeviceList;
AttributeId attributeId = Descriptor::Attributes::DeviceList::Id;

uint16_t deviceTypeCount = 1;
DeviceTypeId deviceTypeId = emberAfDeviceIdFromIndex(index);
Expand All @@ -104,7 +104,7 @@ EmberAfStatus writeDeviceAttribute(EndpointId endpoint, uint16_t index)
EmberAfStatus writePartsAttribute(EndpointId endpoint)
{
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
AttributeId attributeId = Descriptor::Attributes::Ids::PartsList;
AttributeId attributeId = Descriptor::Attributes::PartsList::Id;

uint16_t partsCount = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/identify-server/identify-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static inline void identify_deactivate(Identify * identify)

void emberAfIdentifyClusterServerAttributeChangedCallback(EndpointId endpoint, AttributeId attributeId)
{
if (attributeId == Clusters::Identify::Attributes::Ids::IdentifyTime)
if (attributeId == Clusters::Identify::Attributes::IdentifyTime::Id)
{
Identify * identify = inst(endpoint);
uint16_t identifyTime;
Expand Down
Loading

0 comments on commit a1f65d6

Please sign in to comment.