Merge branch 'add_network_diag_clusters_v1_4' into 'release/v1.4'

esp_matter: Add WiFiNetworkDiagnotics and ThreadNetworkDiagnostics clusters by default(v1.4)

See merge request app-frameworks/esp-matter!1383
This commit is contained in:
Shu Chen
2026-01-15 11:10:16 +00:00
12 changed files with 485 additions and 22 deletions
+298 -2
View File
@@ -554,6 +554,24 @@ attribute_t *create_current_heap_high_watermark(cluster_t *cluster, uint64_t val
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint64(value));
}
attribute_t *create_thread_metrics(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count)
{
return esp_matter::attribute::create(cluster, SoftwareDiagnostics::Attributes::ThreadMetrics::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_array(value, length, count));
}
attribute_t *create_current_heap_free(cluster_t *cluster, uint64_t value)
{
return esp_matter::attribute::create(cluster, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint64(value));
}
attribute_t *create_current_heap_used(cluster_t *cluster, uint64_t value)
{
return esp_matter::attribute::create(cluster, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint64(value));
}
} /* attribute */
} /* software_diagnostics */
@@ -718,7 +736,7 @@ attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value)
} /* attribute */
} /* icd_management */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace attribute {
attribute_t *create_bssid(cluster_t *cluster, uint8_t *value, uint16_t length)
@@ -800,7 +818,7 @@ attribute_t *create_overrun_count(cluster_t *cluster, nullable<uint64_t> value)
}
} /* attribute */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
namespace attribute {
@@ -928,6 +946,284 @@ attribute_t *create_rloc16(cluster_t *cluster, nullable<uint16_t> value)
return NULL;
}
attribute_t *create_overrun_count(cluster_t *cluster, uint64_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::OverrunCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint64(value));
}
attribute_t *create_detached_role_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_chlid_role_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_router_role_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_leader_role_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_attach_attempt_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_partition_id_change_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_better_partition_attach_attempt_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_parent_change_count(cluster_t *cluster, uint16_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint16(value));
}
attribute_t *create_tx_total_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_unicast_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_broadcast_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_ack_requested_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_acked_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_no_ack_requested_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_data_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxDataCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_data_poll_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_beacon_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_beacon_request_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_other_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_retry_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_direct_max_retry_expiry_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_indirect_max_retry_expiry_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_err_cca_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_err_abort_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_tx_err_busy_channel_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_total_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_unicast_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_broadcast_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_data_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxDataCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_data_poll_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_beacon_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_beacon_request_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_other_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_address_filtered_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_dest_addr_filtered_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_duplicated_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_no_frame_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_unknown_neighbor_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_invalid_src_addr_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_sec_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_fcs_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_rx_err_other_count(cluster_t *cluster, uint32_t value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id,
ATTRIBUTE_FLAG_MANAGED_INTERNALLY, esp_matter_uint32(value));
}
attribute_t *create_active_timestamp(cluster_t *cluster, nullable<uint64_t> value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id,
ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY,
esp_matter_nullable_uint64(value));
}
attribute_t *create_pending_timestamp(cluster_t *cluster, nullable<uint64_t> value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id,
ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY,
esp_matter_nullable_uint64(value));
}
attribute_t *create_delay(cluster_t *cluster, nullable<uint32_t> value)
{
return esp_matter::attribute::create(cluster, ThreadNetworkDiagnostics::Attributes::Delay::Id,
ATTRIBUTE_FLAG_NULLABLE | ATTRIBUTE_FLAG_MANAGED_INTERNALLY,
esp_matter_nullable_uint32(value));
}
} /* attribute */
} /* thread_network_diagnostics */
+51 -2
View File
@@ -164,6 +164,9 @@ attribute_t *create_test_event_triggers_enabled(cluster_t *cluster, bool value);
namespace software_diagnostics {
namespace attribute {
attribute_t *create_current_heap_high_watermark(cluster_t *cluster, uint64_t value);
attribute_t *create_thread_metrics(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
attribute_t *create_current_heap_free(cluster_t *cluster, uint64_t value);
attribute_t *create_current_heap_used(cluster_t *cluster, uint64_t value);
} /* attribute */
} /* software_diagnostics */
@@ -211,7 +214,7 @@ attribute_t *create_operating_mode(cluster_t *cluster, uint8_t value);
} /* attribute */
} /* icd_management */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace attribute {
attribute_t *create_bssid(cluster_t *cluster, uint8_t *value, uint16_t length);
attribute_t *create_security_type(cluster_t *cluster, nullable<uint8_t> value);
@@ -231,7 +234,7 @@ attribute_t *create_packet_unicast_tx_count(cluster_t *cluster, nullable<uint32_
attribute_t *create_current_max_rate(cluster_t *cluster, nullable<uint64_t> value);
attribute_t *create_overrun_count(cluster_t *cluster, nullable<uint64_t> value);
} /* attribute */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
namespace attribute {
@@ -254,6 +257,52 @@ attribute_t *create_operational_dataset_components(cluster_t *cluster, uint8_t *
attribute_t *create_active_network_faults(cluster_t *cluster, uint8_t *value, uint16_t length, uint16_t count);
attribute_t *create_ext_address(cluster_t *cluster, nullable<uint64_t> value);
attribute_t *create_rloc16(cluster_t *cluster, nullable<uint16_t> value);
attribute_t *create_overrun_count(cluster_t *cluster, uint64_t value);
attribute_t *create_detached_role_count(cluster_t *cluster, uint16_t value);
attribute_t *create_chlid_role_count(cluster_t *cluster, uint16_t value);
attribute_t *create_router_role_count(cluster_t *cluster, uint16_t value);
attribute_t *create_leader_role_count(cluster_t *cluster, uint16_t value);
attribute_t *create_attach_attempt_count(cluster_t *cluster, uint16_t value);
attribute_t *create_partition_id_change_count(cluster_t *cluster, uint16_t value);
attribute_t *create_better_partition_attach_attempt_count(cluster_t *cluster, uint16_t value);
attribute_t *create_parent_change_count(cluster_t *cluster, uint16_t value);
attribute_t *create_tx_total_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_unicast_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_broadcast_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_ack_requested_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_acked_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_no_ack_requested_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_data_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_data_poll_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_beacon_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_beacon_request_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_other_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_retry_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_direct_max_retry_expiry_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_indirect_max_retry_expiry_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_err_cca_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_err_abort_count(cluster_t *cluster, uint32_t value);
attribute_t *create_tx_err_busy_channel_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_total_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_unicast_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_broadcast_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_data_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_data_poll_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_beacon_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_beacon_request_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_other_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_address_filtered_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_dest_addr_filtered_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_duplicated_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_no_frame_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_unknown_neighbor_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_invalid_src_addr_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_sec_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_fcs_count(cluster_t *cluster, uint32_t value);
attribute_t *create_rx_err_other_count(cluster_t *cluster, uint32_t value);
attribute_t *create_active_timestamp(cluster_t *cluster, nullable<uint64_t> value);
attribute_t *create_pending_timestamp(cluster_t *cluster, nullable<uint64_t> value);
attribute_t *create_delay(cluster_t *cluster, nullable<uint32_t> value);
} /* attribute */
} /* thread_network_diagnostics */
+2 -2
View File
@@ -573,7 +573,7 @@ cluster_t *create(endpoint_t *endpoint, uint8_t flags)
}
} /* group_key_management */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
const function_generic_t *function_list = NULL;
const int function_flags = CLUSTER_FLAG_NONE;
@@ -602,7 +602,7 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags)
return cluster;
}
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
const function_generic_t *function_list = NULL;
+2 -2
View File
@@ -166,10 +166,10 @@ using config_t = common::config_t;
cluster_t *create(endpoint_t *endpoint, uint8_t flags);
} /* group_key_management */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
using config_t = common::config_t;
cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
using config_t = common::config_t;
+2 -2
View File
@@ -1683,7 +1683,7 @@ command_t *create_reset_counts(cluster_t *cluster)
} /* command */
} /* thread_network_diagnostics */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace command {
command_t *create_reset_counts(cluster_t *cluster)
@@ -1693,7 +1693,7 @@ command_t *create_reset_counts(cluster_t *cluster)
}
} /* command */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace ethernet_network_diagnostics {
namespace command {
+2 -2
View File
@@ -75,11 +75,11 @@ command_t *create_reset_counts(cluster_t *cluster);
} /* command */
} /* thread_network_diagnostics */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace command {
command_t *create_reset_counts(cluster_t *cluster);
} /* command */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace ethernet_network_diagnostics {
namespace command {
@@ -95,6 +95,12 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
0);
}
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
#if defined(CONFIG_SUPPORT_WIFI_NETWORK_DIAGNOSTICS_CLUSTER)
wifi_network_diagnostics::create(endpoint, nullptr, CLUSTER_FLAG_SERVER);
#endif
#if defined(CONFIG_SUPPORT_THREAD_NETWORK_DIAGNOSTICS_CLUSTER)
thread_network_diagnostics::create(endpoint, nullptr, CLUSTER_FLAG_SERVER);
#endif
return ESP_OK;
}
} /* root_node */
+2 -2
View File
@@ -150,7 +150,7 @@ event_t *create_boot_reason(cluster_t *cluster)
} // namespace event
} // namespace general_diagnostics
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace event {
event_t *create_disconnection(cluster_t *cluster)
{
@@ -168,7 +168,7 @@ event_t *create_connection_status(cluster_t *cluster)
}
} // namespace event
} // namespace wifi_network_diagnotics
} // namespace wifi_network_diagnostics
namespace thread_network_diagnostics {
namespace event {
+2 -2
View File
@@ -73,13 +73,13 @@ event_t *create_boot_reason(cluster_t *cluster);
} // namespace event
} // namespace general_diagnostics
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
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 wifi_network_diagnotics
} // namespace wifi_network_diagnostics
namespace thread_network_diagnostics {
namespace event {
+80 -2
View File
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "esp_matter_attribute.h"
#include "esp_matter_command.h"
#include <esp_log.h>
#include <esp_matter.h>
#include <esp_matter_feature.h>
@@ -920,7 +922,7 @@ esp_err_t add(cluster_t *cluster, config_t *config)
} /* feature */
} /* window_covering */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace feature {
namespace packets_counts {
@@ -976,7 +978,83 @@ esp_err_t add(cluster_t *cluster)
} /* error_counts */
} /* feature */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
namespace feature {
namespace packets_counts {
uint32_t get_id()
{
return chip::to_underlying(ThreadNetworkDiagnostics::Feature::kPacketCounts);
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* packets_counts */
namespace error_counts {
uint32_t get_id()
{
return chip::to_underlying(ThreadNetworkDiagnostics::Feature::kErrorCounts);
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
update_feature_map(cluster, get_id());
/* Attribute managed internally */
attribute::create_overrun_count(cluster, 0);
/* Command */
command::create_reset_counts(cluster);
return ESP_OK;
}
} /* error_counts */
namespace mle_counts {
uint32_t get_id()
{
return chip::to_underlying(ThreadNetworkDiagnostics::Feature::kMLECounts);
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* mle_counts */
namespace mac_counts {
uint32_t get_id()
{
return chip::to_underlying(ThreadNetworkDiagnostics::Feature::kMACCounts);
}
esp_err_t add(cluster_t *cluster)
{
VerifyOrReturnError(cluster, ESP_ERR_INVALID_ARG, ESP_LOGE(TAG, "Cluster cannot be NULL"));
update_feature_map(cluster, get_id());
return ESP_OK;
}
} /* mac_counts */
} /* feature */
} /* thread_network_diagnostics */
namespace ethernet_network_diagnostics {
namespace feature {
+36 -2
View File
@@ -468,7 +468,7 @@ esp_err_t add(cluster_t *cluster, config_t *config);
} /* feature */
} /* window_covering */
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
namespace feature {
namespace packets_counts {
@@ -486,7 +486,41 @@ esp_err_t add(cluster_t *cluster);
} /* error_counts */
} /* feature */
} /* wifi_network_diagnotics */
} /* wifi_network_diagnostics */
namespace thread_network_diagnostics {
namespace feature {
namespace packets_counts {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* packets_counts */
namespace error_counts {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* error_counts */
namespace mle_counts {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mle_counts */
namespace mac_counts {
uint32_t get_id();
esp_err_t add(cluster_t *cluster);
} /* mac_counts */
} /* feature */
} /* thread_network_diagnostics */
namespace ethernet_network_diagnostics {
namespace feature {
@@ -79,9 +79,9 @@ namespace group_key_management {
constexpr uint16_t cluster_revision = 2;
} // namespace group_key_management
namespace wifi_network_diagnotics {
namespace wifi_network_diagnostics {
constexpr uint16_t cluster_revision = 1;
} // namespace wifi_network_diagnotics
} // namespace wifi_network_diagnostics
namespace thread_network_diagnostics {
constexpr uint16_t cluster_revision = 3;