openthread_sys

Struct 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

Source§

fn clone(&self) -> otMacCounters

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for otMacCounters

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for otMacCounters

Source§

fn default() -> otMacCounters

Returns the “default value” for a type. Read more
Source§

impl Copy for otMacCounters

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.