Represents the MAC layer counters.

Public Attributes#

uint32_t

The total number of unique MAC frame transmission requests.

uint32_t

The total number of unique unicast MAC frame transmission requests.

uint32_t

The total number of unique broadcast MAC frame transmission requests.

uint32_t

The total number of unique MAC frame transmission requests with requested acknowledgment.

uint32_t

The total number of unique MAC frame transmission requests that were acked.

uint32_t

The total number of unique MAC frame transmission requests without requested acknowledgment.

uint32_t

The total number of unique MAC Data frame transmission requests.

uint32_t

The total number of unique MAC Data Poll frame transmission requests.

uint32_t

The total number of unique MAC Beacon frame transmission requests.

uint32_t

The total number of unique MAC Beacon Request frame transmission requests.

uint32_t

The total number of unique other MAC frame transmission requests.

uint32_t

The total number of MAC retransmission attempts.

uint32_t

The total number of unique MAC transmission packets that meet maximal retry limit for direct packets.

uint32_t

The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets.

uint32_t

The total number of CCA failures.

uint32_t

The total number of unique MAC transmission request failures cause by an abort error.

uint32_t

The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail).

uint32_t

The total number of received frames.

uint32_t

The total number of unicast frames received.

uint32_t

The total number of broadcast frames received.

uint32_t

The total number of MAC Data frames received.

uint32_t

The total number of MAC Data Poll frames received.

uint32_t

The total number of MAC Beacon frames received.

uint32_t

The total number of MAC Beacon Request frames received.

uint32_t

The total number of other types of frames received.

uint32_t

The total number of frames dropped by MAC Filter module, for example received from denylisted node.

uint32_t

The total number of frames dropped by destination address check, for example received frame for other node.

uint32_t

The total number of frames dropped due to duplication, that is when the frame has been already received.

uint32_t

The total number of frames dropped because of missing or malformed content.

uint32_t

The total number of frames dropped due to unknown neighbor.

uint32_t

The total number of frames dropped due to invalid source address.

uint32_t

The total number of frames dropped due to security error.

uint32_t

The total number of frames dropped due to invalid FCS.

uint32_t

The total number of frames dropped due to other error.

Public Attribute Documentation#

mTxTotal#

uint32_t otMacCounters::mTxTotal

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:

  • mTxUnicast

  • mTxBroadcast

  • mTxAckRequested

  • mTxNoAckRequested

  • mTxData

  • mTxDataPoll

  • mTxBeacon

  • mTxBeaconRequest

  • mTxOther

  • mTxErrAbort

  • mTxErrBusyChannel

The following equations are valid:

  • mTxTotal = mTxUnicast + mTxBroadcast

  • mTxTotal = mTxAckRequested + mTxNoAckRequested

  • mTxTotal = mTxData + mTxDataPoll + mTxBeacon + mTxBeaconRequest + mTxOther


Definition at line 113 of file include/openthread/link.h

mTxUnicast#

uint32_t otMacCounters::mTxUnicast

The total number of unique unicast MAC frame transmission requests.


Definition at line 118 of file include/openthread/link.h

mTxBroadcast#

uint32_t otMacCounters::mTxBroadcast

The total number of unique broadcast MAC frame transmission requests.


Definition at line 123 of file include/openthread/link.h

mTxAckRequested#

uint32_t otMacCounters::mTxAckRequested

The total number of unique MAC frame transmission requests with requested acknowledgment.


Definition at line 128 of file include/openthread/link.h

mTxAcked#

uint32_t otMacCounters::mTxAcked

The total number of unique MAC frame transmission requests that were acked.


Definition at line 133 of file include/openthread/link.h

mTxNoAckRequested#

uint32_t otMacCounters::mTxNoAckRequested

The total number of unique MAC frame transmission requests without requested acknowledgment.


Definition at line 138 of file include/openthread/link.h

mTxData#

uint32_t otMacCounters::mTxData

The total number of unique MAC Data frame transmission requests.


Definition at line 143 of file include/openthread/link.h

mTxDataPoll#

uint32_t otMacCounters::mTxDataPoll

The total number of unique MAC Data Poll frame transmission requests.


Definition at line 148 of file include/openthread/link.h

mTxBeacon#

uint32_t otMacCounters::mTxBeacon

The total number of unique MAC Beacon frame transmission requests.


Definition at line 153 of file include/openthread/link.h

mTxBeaconRequest#

uint32_t otMacCounters::mTxBeaconRequest

The total number of unique MAC Beacon Request frame transmission requests.


Definition at line 158 of file include/openthread/link.h

mTxOther#

uint32_t otMacCounters::mTxOther

The total number of unique other MAC frame transmission requests.

This counter is currently used for counting out-of-band frames.


Definition at line 165 of file include/openthread/link.h

mTxRetry#

uint32_t otMacCounters::mTxRetry

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 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 OT_RADIO_CAPS_TRANSMIT_RETRIES.


Definition at line 185 of file include/openthread/link.h

mTxDirectMaxRetryExpiry#

uint32_t otMacCounters::mTxDirectMaxRetryExpiry

The total number of unique MAC transmission packets that meet maximal retry limit for direct packets.


Definition at line 190 of file include/openthread/link.h

mTxIndirectMaxRetryExpiry#

uint32_t otMacCounters::mTxIndirectMaxRetryExpiry

The total number of unique MAC transmission packets that meet maximal retry limit for indirect packets.


Definition at line 195 of file include/openthread/link.h

mTxErrCca#

uint32_t otMacCounters::mTxErrCca

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 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 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).


Definition at line 209 of file include/openthread/link.h

mTxErrAbort#

uint32_t otMacCounters::mTxErrAbort

The total number of unique MAC transmission request failures cause by an abort error.


Definition at line 214 of file include/openthread/link.h

mTxErrBusyChannel#

uint32_t otMacCounters::mTxErrBusyChannel

The total number of unique MAC transmission requests failures caused by a busy channel (a CSMA/CA fail).


Definition at line 219 of file include/openthread/link.h

mRxTotal#

uint32_t otMacCounters::mRxTotal

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.


Definition at line 227 of file include/openthread/link.h

mRxUnicast#

uint32_t otMacCounters::mRxUnicast

The total number of unicast frames received.


Definition at line 232 of file include/openthread/link.h

mRxBroadcast#

uint32_t otMacCounters::mRxBroadcast

The total number of broadcast frames received.


Definition at line 237 of file include/openthread/link.h

mRxData#

uint32_t otMacCounters::mRxData

The total number of MAC Data frames received.


Definition at line 242 of file include/openthread/link.h

mRxDataPoll#

uint32_t otMacCounters::mRxDataPoll

The total number of MAC Data Poll frames received.


Definition at line 247 of file include/openthread/link.h

mRxBeacon#

uint32_t otMacCounters::mRxBeacon

The total number of MAC Beacon frames received.


Definition at line 252 of file include/openthread/link.h

mRxBeaconRequest#

uint32_t otMacCounters::mRxBeaconRequest

The total number of MAC Beacon Request frames received.


Definition at line 257 of file include/openthread/link.h

mRxOther#

uint32_t otMacCounters::mRxOther

The total number of other types of frames received.


Definition at line 262 of file include/openthread/link.h

mRxAddressFiltered#

uint32_t otMacCounters::mRxAddressFiltered

The total number of frames dropped by MAC Filter module, for example received from denylisted node.


Definition at line 267 of file include/openthread/link.h

mRxDestAddrFiltered#

uint32_t otMacCounters::mRxDestAddrFiltered

The total number of frames dropped by destination address check, for example received frame for other node.


Definition at line 272 of file include/openthread/link.h

mRxDuplicated#

uint32_t otMacCounters::mRxDuplicated

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.


Definition at line 280 of file include/openthread/link.h

mRxErrNoFrame#

uint32_t otMacCounters::mRxErrNoFrame

The total number of frames dropped because of missing or malformed content.


Definition at line 285 of file include/openthread/link.h

mRxErrUnknownNeighbor#

uint32_t otMacCounters::mRxErrUnknownNeighbor

The total number of frames dropped due to unknown neighbor.


Definition at line 290 of file include/openthread/link.h

mRxErrInvalidSrcAddr#

uint32_t otMacCounters::mRxErrInvalidSrcAddr

The total number of frames dropped due to invalid source address.


Definition at line 295 of file include/openthread/link.h

mRxErrSec#

uint32_t otMacCounters::mRxErrSec

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.


Definition at line 303 of file include/openthread/link.h

mRxErrFcs#

uint32_t otMacCounters::mRxErrFcs

The total number of frames dropped due to invalid FCS.


Definition at line 308 of file include/openthread/link.h

mRxErrOther#

uint32_t otMacCounters::mRxErrOther

The total number of frames dropped due to other error.


Definition at line 313 of file include/openthread/link.h