| // Copyright 2021 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.lowpan.device; |
| |
| protocol Counters { |
| /// Returns a snapshot of the counters without resetting the counters. |
| Get() -> (struct { |
| counters AllCounters; |
| }); |
| |
| /// Resets all of the counters to zero returning the counter values |
| /// immediately prior. |
| Reset() -> (struct { |
| counters AllCounters; |
| }); |
| }; |
| |
| /// Table describing all counters. |
| /// |
| /// May be empty if no counters are supported. |
| type AllCounters = table { |
| /// MAC Counters for TX |
| 1: mac_tx MacCounters; |
| |
| /// MAC Counters for RX |
| 2: mac_rx MacCounters; |
| }; |
| |
| /// Counters associated with the MAC layer. |
| /// |
| /// Some counters are only valid for RX or TX. |
| type MacCounters = table { |
| /// The total number of frames |
| 1: total uint32; |
| |
| /// The total number of unicast frames |
| 2: unicast uint32; |
| |
| /// The total number of broadcast frames |
| 3: broadcast uint32; |
| |
| /// The number of frames with ack request |
| 4: ack_requested uint32; |
| |
| /// The number of frames that were acked |
| 5: acked uint32; |
| |
| /// The number of frames without ack request |
| 6: no_ack_requested uint32; |
| |
| /// The number of data frames |
| 7: data uint32; |
| |
| /// The number of data poll frames |
| 8: data_poll uint32; |
| |
| /// The number of beacon frames |
| 9: beacon uint32; |
| |
| /// The number of beacon request frames |
| 10: beacon_request uint32; |
| |
| /// The number of other types of frames |
| 11: other uint32; |
| |
| /// The number of frames filtered by address filter (allowlist |
| /// or denylist). |
| 12: address_filtered uint32; |
| |
| /// The number of retransmission attempts. |
| /// TX only. |
| 13: retries uint32; |
| |
| /// The number of expired retransmission retries for direct message. |
| /// TX only. |
| 14: direct_max_retry_expiry uint32; |
| |
| /// The number of expired retransmission retries for indirect message |
| /// TX only. |
| 15: indirect_max_retry_expiry uint32; |
| |
| /// The number of received frames filtered by destination check. |
| /// RX only. |
| 16: dest_addr_filtered uint32; |
| |
| /// The number of received duplicated frames. |
| /// RX only. |
| 17: duplicated uint32; |
| |
| /// The number of received frames with no or malformed content. |
| /// RX only. |
| 18: err_no_frame uint32; |
| |
| /// The number of received frames from unknown neighbor. |
| /// RX only. |
| 19: err_unknown_neighbor uint32; |
| |
| /// The number of received frames whose source address is invalid. |
| /// RX only. |
| 20: err_invalid_src_addr uint32; |
| |
| /// The number of received frames with security error. |
| /// RX only. |
| 21: err_sec uint32; |
| |
| /// The number of received frames with FCS error. |
| /// RX only. |
| 22: err_fcs uint32; |
| |
| /// The number of CCA failures. |
| /// TX only. |
| 23: err_cca uint32; |
| |
| /// The number of frame transmission failures due to abort error. |
| /// TX only. |
| 24: err_abort uint32; |
| |
| /// The number of frames that were dropped due to a busy channel. |
| /// TX only. |
| 25: err_busy_channel uint32; |
| |
| /// The number of frames that encountered some other error. |
| 26: err_other uint32; |
| }; |