From b23735dabc216255490550fc67cf5cd94947bd40 Mon Sep 17 00:00:00 2001 From: mahesh Date: Fri, 5 Jul 2024 12:35:17 +0530 Subject: [PATCH] components: Replaced diagnostics cluster namespaces as per the spec --- components/esp_matter/esp_matter_attribute.cpp | 12 ++++++------ components/esp_matter/esp_matter_attribute.h | 12 ++++++------ components/esp_matter/esp_matter_cluster.cpp | 12 ++++++------ components/esp_matter/esp_matter_cluster.h | 12 ++++++------ components/esp_matter/esp_matter_command.cpp | 12 ++++++------ components/esp_matter/esp_matter_command.h | 12 ++++++------ components/esp_matter/esp_matter_endpoint.cpp | 4 ++-- components/esp_matter/esp_matter_endpoint.h | 4 ++-- components/esp_matter/esp_matter_event.cpp | 8 ++++---- components/esp_matter/esp_matter_event.h | 8 ++++---- components/esp_matter/esp_matter_feature.cpp | 8 ++++---- components/esp_matter/esp_matter_feature.h | 8 ++++---- 12 files changed, 56 insertions(+), 56 deletions(-) diff --git a/components/esp_matter/esp_matter_attribute.cpp b/components/esp_matter/esp_matter_attribute.cpp index 7615cad80..137f134be 100644 --- a/components/esp_matter/esp_matter_attribute.cpp +++ b/components/esp_matter/esp_matter_attribute.cpp @@ -646,7 +646,7 @@ attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value) } /* attribute */ } /* icd_management */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace attribute { attribute_t *create_bssid(cluster_t *cluster, uint8_t *value, uint16_t length) @@ -728,9 +728,9 @@ attribute_t *create_overrun_count(cluster_t *cluster, nullable value) } } /* attribute */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace attribute { attribute_t *create_channel(cluster_t *cluster, nullable value) @@ -837,9 +837,9 @@ attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, ui } } /* attribute */ -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace attribute { attribute_t *create_phy_rate(cluster_t *cluster, nullable value) @@ -891,7 +891,7 @@ attribute_t *create_time_since_reset(cluster_t *cluster, uint64_t value) } } /* attribute */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace bridged_device_basic_information { namespace attribute { diff --git a/components/esp_matter/esp_matter_attribute.h b/components/esp_matter/esp_matter_attribute.h index 701a99b43..8da38d542 100644 --- a/components/esp_matter/esp_matter_attribute.h +++ b/components/esp_matter/esp_matter_attribute.h @@ -196,7 +196,7 @@ attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value); } /* attribute */ } /* icd_management */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace attribute { attribute_t *create_bssid(cluster_t *cluster, uint8_t *value, uint16_t length); attribute_t *create_security_type(cluster_t *cluster, nullable value); @@ -216,9 +216,9 @@ attribute_t *create_packet_unicast_tx_count(cluster_t *cluster, nullable value); attribute_t *create_overrun_count(cluster_t *cluster, nullable value); } /* attribute */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace attribute { attribute_t *create_channel(cluster_t *cluster, nullable value); attribute_t *create_routing_role(cluster_t *cluster, nullable value); @@ -238,9 +238,9 @@ attribute_t *create_channel_page0_mask(cluster_t *cluster, uint8_t *value, uint1 attribute_t *create_operational_dataset_components(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count); } /* attribute */ -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace attribute { attribute_t *create_phy_rate(cluster_t *cluster, nullable value); attribute_t *create_full_duplex(cluster_t *cluster, nullable value); @@ -252,7 +252,7 @@ attribute_t *create_overrun_count(cluster_t *cluster, uint64_t value); attribute_t *create_carrier_detect(cluster_t *cluster, nullable value); attribute_t *create_time_since_reset(cluster_t *cluster, uint64_t value); } /* attribute */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace bridged_device_basic_information { constexpr uint8_t k_max_vendor_name_length = 32; diff --git a/components/esp_matter/esp_matter_cluster.cpp b/components/esp_matter/esp_matter_cluster.cpp index 5c226e335..28fcc9f59 100644 --- a/components/esp_matter/esp_matter_cluster.cpp +++ b/components/esp_matter/esp_matter_cluster.cpp @@ -725,7 +725,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags) } } /* group_key_management */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; @@ -765,9 +765,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) return cluster; } -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; @@ -819,9 +819,9 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) return cluster; } -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { const function_generic_t *function_list = NULL; const int function_flags = CLUSTER_FLAG_NONE; @@ -856,7 +856,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags) return cluster; } -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace time_synchronization { const function_generic_t *function_list = NULL; diff --git a/components/esp_matter/esp_matter_cluster.h b/components/esp_matter/esp_matter_cluster.h index 73e1b9c6b..965ceff24 100644 --- a/components/esp_matter/esp_matter_cluster.h +++ b/components/esp_matter/esp_matter_cluster.h @@ -187,32 +187,32 @@ typedef struct config { cluster_t *create(endpoint_t *endpoint, uint8_t flags); } /* group_key_management */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { typedef struct config { uint16_t cluster_revision; config() : cluster_revision(1) {} } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { typedef struct config { uint16_t cluster_revision; config() : cluster_revision(2) {} } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { typedef struct config { uint16_t cluster_revision; config() : cluster_revision(1) {} } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace time_synchronization { typedef struct config { diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index fdd62d616..9d3a34571 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -1556,7 +1556,7 @@ command_t *create_disable_action_with_duration(cluster_t *cluster) } /* command */ } /* actions */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace command { command_t *create_reset_counts(cluster_t *cluster) @@ -1566,9 +1566,9 @@ command_t *create_reset_counts(cluster_t *cluster) } } /* command */ -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace command { command_t *create_reset_counts(cluster_t *cluster) @@ -1578,9 +1578,9 @@ command_t *create_reset_counts(cluster_t *cluster) } } /* command */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace command { command_t *create_reset_counts(cluster_t *cluster) @@ -1590,7 +1590,7 @@ command_t *create_reset_counts(cluster_t *cluster) } } /* command */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace diagnostic_logs { namespace command { diff --git a/components/esp_matter/esp_matter_command.h b/components/esp_matter/esp_matter_command.h index 1933dfb5b..16cef8e46 100644 --- a/components/esp_matter/esp_matter_command.h +++ b/components/esp_matter/esp_matter_command.h @@ -42,23 +42,23 @@ command_t *create_disable_action_with_duration(cluster_t *cluster); } /* command */ } /* actions */ -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace command { command_t *create_reset_counts(cluster_t *cluster); } /* command */ -} /* diagnostics_network_thread */ +} /* thread_network_diagnostics */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace command { command_t *create_reset_counts(cluster_t *cluster); } /* command */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace command { command_t *create_reset_counts(cluster_t *cluster); } /* command */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace diagnostic_logs { namespace command { diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index 1214d9cfd..32dc21473 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -64,10 +64,10 @@ esp_err_t add(endpoint_t *endpoint, config_t *config) group_key_management::create(endpoint, CLUSTER_FLAG_SERVER); #if CHIP_DEVICE_CONFIG_ENABLE_WIFI - diagnostics_network_wifi::create(endpoint, &(config->diagnostics_network_wifi), CLUSTER_FLAG_SERVER); + wifi_network_diagnotics::create(endpoint, &(config->wifi_network_diagnotics), CLUSTER_FLAG_SERVER); #endif #if CHIP_DEVICE_CONFIG_ENABLE_THREAD - diagnostics_network_thread::create(endpoint, &(config->diagnostics_network_thread), CLUSTER_FLAG_SERVER); + thread_network_diagnostics::create(endpoint, &(config->thread_network_diagnostics), CLUSTER_FLAG_SERVER); #endif #if CHIP_CONFIG_ENABLE_ICD_SERVER icd_management::create(endpoint, &(config->icd_management), CLUSTER_FLAG_SERVER, diff --git a/components/esp_matter/esp_matter_endpoint.h b/components/esp_matter/esp_matter_endpoint.h index 39fb4704d..18c7dbd99 100644 --- a/components/esp_matter/esp_matter_endpoint.h +++ b/components/esp_matter/esp_matter_endpoint.h @@ -145,8 +145,8 @@ typedef struct config { cluster::general_diagnostics::config_t general_diagnostics; cluster::administrator_commissioning::config_t administrator_commissioning; cluster::operational_credentials::config_t operational_credentials; - cluster::diagnostics_network_wifi::config_t diagnostics_network_wifi; - cluster::diagnostics_network_thread::config_t diagnostics_network_thread; + cluster::wifi_network_diagnotics::config_t wifi_network_diagnotics; + cluster::thread_network_diagnostics::config_t thread_network_diagnostics; cluster::icd_management::config_t icd_management; } config_t; diff --git a/components/esp_matter/esp_matter_event.cpp b/components/esp_matter/esp_matter_event.cpp index 2ad7aab74..e335189a8 100644 --- a/components/esp_matter/esp_matter_event.cpp +++ b/components/esp_matter/esp_matter_event.cpp @@ -137,7 +137,7 @@ event_t *create_boot_reason(cluster_t *cluster) } // namespace event } // namespace general_diagnostics -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace event { event_t *create_disconnection(cluster_t *cluster) { @@ -155,9 +155,9 @@ event_t *create_connection_status(cluster_t *cluster) } } // namespace event -} // namespace diagnostics_network_wifi +} // namespace wifi_network_diagnotics -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace event { event_t *create_connection_status(cluster_t *cluster) { @@ -170,7 +170,7 @@ event_t *create_network_fault_change(cluster_t *cluster) } } // namespace event -} // namespace diagnostics_network_thread +} // namespace thread_network_diagnostics namespace software_diagnostics { namespace event { diff --git a/components/esp_matter/esp_matter_event.h b/components/esp_matter/esp_matter_event.h index ce96838de..b95e2a0e4 100644 --- a/components/esp_matter/esp_matter_event.h +++ b/components/esp_matter/esp_matter_event.h @@ -66,20 +66,20 @@ event_t *create_boot_reason(cluster_t *cluster); } // namespace event } // namespace general_diagnostics -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace event { event_t *create_disconnection(cluster_t *cluster); event_t *create_association_failure(cluster_t *cluster); event_t *create_connection_status(cluster_t *cluster); } // namespace event -} // namespace diagnostics_network_wifi +} // namespace wifi_network_diagnotics -namespace diagnostics_network_thread { +namespace thread_network_diagnostics { namespace event { event_t *create_connection_status(cluster_t *cluster); event_t *create_network_fault_change(cluster_t *cluster); } // namespace event -} // namespace diagnostics_network_thread +} // namespace thread_network_diagnostics namespace software_diagnostics { namespace event { diff --git a/components/esp_matter/esp_matter_feature.cpp b/components/esp_matter/esp_matter_feature.cpp index 0bb282f25..c73568ec3 100644 --- a/components/esp_matter/esp_matter_feature.cpp +++ b/components/esp_matter/esp_matter_feature.cpp @@ -902,7 +902,7 @@ esp_err_t add(cluster_t *cluster, config_t *config) } /* feature */ } /* window_covering */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace feature { namespace packets_counts { @@ -964,9 +964,9 @@ esp_err_t add(cluster_t *cluster) } /* error_counts */ } /* feature */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace feature { namespace packets_counts { @@ -1019,7 +1019,7 @@ esp_err_t add(cluster_t *cluster, config_t *config) } /* error_counts */ } /* feature */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace air_quality { namespace feature { diff --git a/components/esp_matter/esp_matter_feature.h b/components/esp_matter/esp_matter_feature.h index 825573509..e331a9b08 100644 --- a/components/esp_matter/esp_matter_feature.h +++ b/components/esp_matter/esp_matter_feature.h @@ -419,7 +419,7 @@ esp_err_t add(cluster_t *cluster, config_t *config); } /* feature */ } /* window_covering */ -namespace diagnostics_network_wifi { +namespace wifi_network_diagnotics { namespace feature { namespace packets_counts { @@ -437,9 +437,9 @@ esp_err_t add(cluster_t *cluster); } /* error_counts */ } /* feature */ -} /* diagnostics_network_wifi */ +} /* wifi_network_diagnotics */ -namespace diagnostics_network_ethernet { +namespace ethernet_network_diagnostics { namespace feature { namespace packets_counts { @@ -470,7 +470,7 @@ esp_err_t add(cluster_t *cluster, config_t *config); } /* error_counts */ } /* feature */ -} /* diagnostics_network_ethernet */ +} /* ethernet_network_diagnostics */ namespace thermostat { namespace feature {