Struct openthread_sys::otMacCounters
source · #[repr(C)]pub struct otMacCounters {Show 34 fields
pub mTxTotal: u32,
pub mTxUnicast: u32,
pub mTxBroadcast: u32,
pub mTxAckRequested: u32,
pub mTxAcked: u32,
pub mTxNoAckRequested: u32,
pub mTxData: u32,
pub mTxDataPoll: u32,
pub mTxBeacon: u32,
pub mTxBeaconRequest: u32,
pub mTxOther: u32,
pub mTxRetry: u32,
pub mTxDirectMaxRetryExpiry: u32,
pub mTxIndirectMaxRetryExpiry: u32,
pub mTxErrCca: u32,
pub mTxErrAbort: u32,
pub mTxErrBusyChannel: u32,
pub mRxTotal: u32,
pub mRxUnicast: u32,
pub mRxBroadcast: u32,
pub mRxData: u32,
pub mRxDataPoll: u32,
pub mRxBeacon: u32,
pub mRxBeaconRequest: u32,
pub mRxOther: u32,
pub mRxAddressFiltered: u32,
pub mRxDestAddrFiltered: u32,
pub mRxDuplicated: u32,
pub mRxErrNoFrame: u32,
pub mRxErrUnknownNeighbor: u32,
pub mRxErrInvalidSrcAddr: u32,
pub mRxErrSec: u32,
pub mRxErrFcs: u32,
pub mRxErrOther: u32,
}
Expand description
Represents the MAC layer counters.
Fields§
§mTxTotal: u32
The total number of unique MAC frame transmission requests.
Note that this counter is incremented for each MAC transmission request only by one, regardless of the amount of CCA failures, CSMA-CA attempts, or retransmissions.
This increment rule applies to the following counters:
- @p mTxUnicast
- @p mTxBroadcast
- @p mTxAckRequested
- @p mTxNoAckRequested
- @p mTxData
- @p mTxDataPoll
- @p mTxBeacon
- @p mTxBeaconRequest
- @p mTxOther
- @p mTxErrAbort
- @p mTxErrBusyChannel
The following equations are valid:
- @p mTxTotal = @p mTxUnicast + @p mTxBroadcast
- @p mTxTotal = @p mTxAckRequested + @p mTxNoAckRequested
- @p mTxTotal = @p mTxData + @p mTxDataPoll + @p mTxBeacon + @p mTxBeaconRequest + @p mTxOther
mTxUnicast: u32
The total number of unique unicast MAC frame transmission requests.
mTxBroadcast: u32
The total number of unique broadcast MAC frame transmission requests.
mTxAckRequested: u32
The total number of unique MAC frame transmission requests with requested acknowledgment.
mTxAcked: u32
The total number of unique MAC frame transmission requests that were acked.
mTxNoAckRequested: u32
The total number of unique MAC frame transmission requests without requested acknowledgment.
mTxData: u32
The total number of unique MAC Data frame transmission requests.
mTxDataPoll: u32
The total number of unique MAC Data Poll frame transmission requests.
mTxBeacon: u32
The total number of unique MAC Beacon frame transmission requests.
mTxBeaconRequest: u32
The total number of unique MAC Beacon Request frame transmission requests.
mTxOther: u32
The total number of unique other MAC frame transmission requests.
This counter is currently used for counting out-of-band frames.
mTxRetry: u32
The total number of MAC retransmission attempts.
Note that this counter is incremented by one for each retransmission attempt that may be triggered by lack of acknowledgement, CSMA/CA failure, or other type of transmission error. The @p mTxRetry counter is incremented both for unicast and broadcast MAC frames.
Modify the following configuration parameters to control the amount of retransmissions in the system:
- OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT
- OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT
- OPENTHREAD_CONFIG_MAC_TX_NUM_BCAST
- OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
- OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_INDIRECT
Currently, this counter is invalid if the platform’s radio driver capability includes @ref OT_RADIO_CAPS_TRANSMIT_RETRIES.
mTxDirectMaxRetryExpiry: u32
The total number of unique MAC transmission packets that meet maximal retry limit for direct packets.
mTxIndirectMaxRetryExpiry: u32
The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets.
mTxErrCca: u32
The total number of CCA failures.
The meaning of this counter can be different and it depends on the platform’s radio driver capabilities.
If @ref OT_RADIO_CAPS_CSMA_BACKOFF is enabled, this counter represents the total number of full CSMA/CA failed attempts and it is incremented by one also for each retransmission (in case of a CSMA/CA fail).
If @ref OT_RADIO_CAPS_TRANSMIT_RETRIES is enabled, this counter represents the total number of full CSMA/CA failed attempts and it is incremented by one for each individual data frame request (regardless of the amount of retransmissions).
mTxErrAbort: u32
The total number of unique MAC transmission request failures cause by an abort error.
mTxErrBusyChannel: u32
The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail).
mRxTotal: u32
The total number of received frames.
This counter counts all frames reported by the platform’s radio driver, including frames that were dropped, for example because of an FCS error.
mRxUnicast: u32
The total number of unicast frames received.
mRxBroadcast: u32
The total number of broadcast frames received.
mRxData: u32
The total number of MAC Data frames received.
mRxDataPoll: u32
The total number of MAC Data Poll frames received.
mRxBeacon: u32
The total number of MAC Beacon frames received.
mRxBeaconRequest: u32
The total number of MAC Beacon Request frames received.
mRxOther: u32
The total number of other types of frames received.
mRxAddressFiltered: u32
The total number of frames dropped by MAC Filter module, for example received from denylisted node.
mRxDestAddrFiltered: u32
The total number of frames dropped by destination address check, for example received frame for other node.
mRxDuplicated: u32
The total number of frames dropped due to duplication, that is when the frame has been already received.
This counter may be incremented, for example when ACK frame generated by the receiver hasn’t reached transmitter node which performed retransmission.
mRxErrNoFrame: u32
The total number of frames dropped because of missing or malformed content.
mRxErrUnknownNeighbor: u32
The total number of frames dropped due to unknown neighbor.
mRxErrInvalidSrcAddr: u32
The total number of frames dropped due to invalid source address.
mRxErrSec: u32
The total number of frames dropped due to security error.
This counter may be incremented, for example when lower than expected Frame Counter is used to encrypt the frame.
mRxErrFcs: u32
The total number of frames dropped due to invalid FCS.
mRxErrOther: u32
The total number of frames dropped due to other error.
Trait Implementations§
source§impl Clone for otMacCounters
impl Clone for otMacCounters
source§fn clone(&self) -> otMacCounters
fn clone(&self) -> otMacCounters
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for otMacCounters
impl Debug for otMacCounters
source§impl Default for otMacCounters
impl Default for otMacCounters
source§fn default() -> otMacCounters
fn default() -> otMacCounters
impl Copy for otMacCounters
Auto Trait Implementations§
impl Freeze for otMacCounters
impl RefUnwindSafe for otMacCounters
impl Send for otMacCounters
impl Sync for otMacCounters
impl Unpin for otMacCounters
impl UnwindSafe for otMacCounters
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)