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

Remove PHYRateEnum from the list of WeakEnums #30530

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::ReadIfSupported(CHIP_ERROR (DiagnosticD
CHIP_ERROR EthernetDiagosticsAttrAccess::ReadPHYRate(AttributeValueEncoder & aEncoder)
{
Attributes::PHYRate::TypeInfo::Type pHYRate;
auto value = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M;
auto value = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M;

if (DeviceLayer::GetDiagnosticDataProvider().GetEthPHYRate(value) == CHIP_NO_ERROR)
{
pHYRate.SetNonNull(value);
ChipLogProgress(Zcl, "The current nominal, usable speed at the top of the physical layer of the Node: %d", value);
ChipLogProgress(Zcl, "The current nominal, usable speed at the top of the physical layer of the Node: %d",
chip::to_underlying(value));
}
else
{
Expand Down
1 change: 0 additions & 1 deletion src/app/common/templates/config-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WeakEnums:
- ColorControlOptions
- ColorMode
- EnhancedColorMode
- PHYRateEnum

EnumsNotUsedAsTypeInXML:
# List of enums that are not used as a type in XML. By adding an enum
Expand Down
20 changes: 10 additions & 10 deletions src/platform/Linux/ConnectivityUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,34 +658,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters::
switch (speed)
{
case 10:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M;
break;
case 100:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M;
break;
case 1000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G;
break;
case 25000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g;
break;
case 5000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G;
break;
case 10000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G;
break;
case 40000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G;
break;
case 100000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G;
break;
case 200000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G;
break;
case 400000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G;
break;
default:
ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed);
Expand Down
20 changes: 10 additions & 10 deletions src/platform/Tizen/ConnectivityUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,34 +447,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, PHYRateEnum & p
switch (speed)
{
case 10:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M;
break;
case 100:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M;
break;
case 1000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G;
break;
case 25000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g;
break;
case 5000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G;
break;
case 10000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G;
break;
case 40000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G;
break;
case 100000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G;
break;
case 200000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G;
break;
case 400000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G;
break;
default:
ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed);
Expand Down
20 changes: 10 additions & 10 deletions src/platform/webos/ConnectivityUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,34 +566,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters::
switch (speed)
{
case 10:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M;
break;
case 100:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M;
break;
case 1000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G;
break;
case 25000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g;
break;
case 5000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G;
break;
case 10000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G;
break;
case 40000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G;
break;
case 100000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G;
break;
case 200000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G;
break;
case 400000:
pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G;
pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G;
break;
default:
ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions zzz_generated/app-common/app-common/zap-generated/enums.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading