Skip to content

Commit

Permalink
Mass-replace " Ids::*" with " *::Id" in cluster impls.
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 " Ids::\([A-Za-z0-9]*\)" " \1::Id" -- src/app/clusters
  • Loading branch information
bzbarsky-apple committed Sep 30, 2021
1 parent a1f65d6 commit 9b7675b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::Read(ClusterInfo & aClusterInfo, const
*aDataRead = true;
switch (aClusterInfo.mFieldId)
{
case Ids::PacketRxCount: {
case PacketRxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetEthPacketRxCount, aEncoder);
}
case Ids::PacketTxCount: {
case PacketTxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetEthPacketTxCount, aEncoder);
}
case Ids::TxErrCount: {
case TxErrCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetEthTxErrCount, aEncoder);
}
case Ids::CollisionCount: {
case CollisionCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetEthCollisionCount, aEncoder);
}
case Ids::OverrunCount: {
case OverrunCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetEthOverrunCount, aEncoder);
}
default: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(ClusterInfo & aClusterInfo, const A
*aDataRead = true;
switch (aClusterInfo.mFieldId)
{
case Ids::RebootCount: {
case RebootCount::Id: {
return ReadIfSupported(&PlatformManager::GetRebootCount, aEncoder);
}
case Ids::UpTime: {
case UpTime::Id: {
return ReadIfSupported(&PlatformManager::GetUpTime, aEncoder);
}
case Ids::TotalOperationalHours: {
case TotalOperationalHours::Id: {
return ReadIfSupported(&PlatformManager::GetTotalOperationalHours, aEncoder);
}
case Ids::BootReasons: {
case BootReasons::Id: {
return ReadIfSupported(&PlatformManager::GetBootReasons, aEncoder);
}
default: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ CHIP_ERROR SoftwareDiagosticsAttrAccess::Read(ClusterInfo & aClusterInfo, const
*aDataRead = true;
switch (aClusterInfo.mFieldId)
{
case Ids::CurrentHeapFree: {
case CurrentHeapFree::Id: {
return ReadIfSupported(&PlatformManager::GetCurrentHeapFree, aEncoder);
}
case Ids::CurrentHeapUsed: {
case CurrentHeapUsed::Id: {
return ReadIfSupported(&PlatformManager::GetCurrentHeapUsed, aEncoder);
}
case Ids::CurrentHeapHighWatermark: {
case CurrentHeapHighWatermark::Id: {
return ReadIfSupported(&PlatformManager::GetCurrentHeapHighWatermark, aEncoder);
}
default: {
Expand Down
16 changes: 8 additions & 8 deletions src/app/clusters/thermostat-server/thermostat-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En

switch (attributeId)
{
case Ids::OccupiedHeatingSetpoint: {
case OccupiedHeatingSetpoint::Id: {
int16_t AbsMinHeatSetpointLimit;
int16_t AbsMaxHeatSetpointLimit;
int16_t MinHeatSetpointLimit;
Expand Down Expand Up @@ -112,7 +112,7 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En
break;
}

case Ids::OccupiedCoolingSetpoint: {
case OccupiedCoolingSetpoint::Id: {
int16_t AbsMinCoolSetpointLimit;
int16_t AbsMaxCoolSetpointLimit;
int16_t MinCoolSetpointLimit;
Expand Down Expand Up @@ -151,8 +151,8 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En
break;
}

case Ids::MinHeatSetpointLimit:
case Ids::MaxHeatSetpointLimit: {
case MinHeatSetpointLimit::Id:
case MaxHeatSetpointLimit::Id: {
int16_t AbsMinHeatSetpointLimit;
int16_t AbsMaxHeatSetpointLimit;

Expand All @@ -176,8 +176,8 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En

break;
}
case Ids::MinCoolSetpointLimit:
case Ids::MaxCoolSetpointLimit: {
case MinCoolSetpointLimit::Id:
case MaxCoolSetpointLimit::Id: {
int16_t AbsMinCoolSetpointLimit;
int16_t AbsMaxCoolSetpointLimit;

Expand All @@ -202,7 +202,7 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En
break;
}

case Ids::ControlSequenceOfOperation: {
case ControlSequenceOfOperation::Id: {
uint8_t requestedCSO;
requestedCSO = *value;
if (requestedCSO > EMBER_ZCL_THERMOSTAT_CONTROL_SEQUENCE_COOLING_AND_HEATING_WITH_REHEAT)
Expand All @@ -213,7 +213,7 @@ EmberAfStatus emberAfThermostatClusterServerPreAttributeChangedCallback(chip::En
break;
}

case Ids::SystemMode: {
case SystemMode::Id: {
uint8_t ControlSequenceOfOperation = kInvalidControlSequenceOfOperation;
uint8_t RequestedSystemMode = kInvalidRequestedSystemMode;
GetControlSequenceOfOperation(endpoint, &ControlSequenceOfOperation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,40 +78,40 @@ CHIP_ERROR WiFiDiagosticsAttrAccess::Read(ClusterInfo & aClusterInfo, const Attr
*aDataRead = true;
switch (aClusterInfo.mFieldId)
{
case Ids::SecurityType: {
case SecurityType::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiSecurityType, aEncoder);
}
case Ids::WiFiVersion: {
case WiFiVersion::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiVersion, aEncoder);
}
case Ids::ChannelNumber: {
case ChannelNumber::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiChannelNumber, aEncoder);
}
case Ids::Rssi: {
case Rssi::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiRssi, aEncoder);
}
case Ids::BeaconLostCount: {
case BeaconLostCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiBeaconLostCount, aEncoder);
}
case Ids::BeaconRxCount: {
case BeaconRxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiBeaconRxCount, aEncoder);
}
case Ids::PacketMulticastRxCount: {
case PacketMulticastRxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiPacketMulticastRxCount, aEncoder);
}
case Ids::PacketMulticastTxCount: {
case PacketMulticastTxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiPacketMulticastTxCount, aEncoder);
}
case Ids::PacketUnicastRxCount: {
case PacketUnicastRxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiPacketUnicastRxCount, aEncoder);
}
case Ids::PacketUnicastTxCount: {
case PacketUnicastTxCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiPacketUnicastTxCount, aEncoder);
}
case Ids::CurrentMaxRate: {
case CurrentMaxRate::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiCurrentMaxRate, aEncoder);
}
case Ids::OverrunCount: {
case OverrunCount::Id: {
return ReadIfSupported(&ConnectivityManager::GetWiFiOverrunCount, aEncoder);
}
default: {
Expand Down

0 comments on commit 9b7675b

Please sign in to comment.