class TxFrame

Defined at line 1024 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

Supports IEEE 802.15.4 MAC frame generation for transmission.

Public Methods

void CopyFrom (const TxFrame & aFromFrame)

Copies the PSDU and all attributes (except for frame link type) from another frame.

Parameters

aFromFrame [in] The frame to copy from.
void GenerateImmAck (const RxFrame & aFrame, bool aIsFramePending)

Generate Imm-Ack in this frame object.

Parameters

aFrame [in] A reference to the frame received.
aIsFramePending [in] Value of the ACK's frame pending bit.
void SetChannel (uint8_t aChannel)

Sets the channel on which to send the frame.

It also sets the `RxChannelAfterTxDone` to the same channel.

Parameters

aChannel [in] The channel used for transmission.

Defined at line 1087 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetTxPower (int8_t aTxPower)

Sets TX power to send the frame.

Parameters

aTxPower [in] The tx power used for transmission.

Defined at line 1098 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

uint8_t GetRxChannelAfterTxDone ()

Gets the RX channel after frame TX is done.

Defined at line 1105 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetRxChannelAfterTxDone (uint8_t aChannel)

Sets the RX channel after frame TX is done.

Parameters

aChannel [in] The RX channel after frame TX is done.

Defined at line 1112 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

uint8_t GetMaxCsmaBackoffs ()

Returns the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel

access failure.

Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006.

Defined at line 1123 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetMaxCsmaBackoffs (uint8_t aMaxCsmaBackoffs)

Sets the maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel

access failure.

Equivalent to macMaxCSMABackoffs in IEEE 802.15.4-2006.

Parameters

aMaxCsmaBackoffs [in] The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure.

Defined at line 1134 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

uint8_t GetMaxFrameRetries ()

Returns the maximum number of retries allowed after a transmission failure.

Equivalent to macMaxFrameRetries in IEEE 802.15.4-2006.

Defined at line 1143 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetMaxFrameRetries (uint8_t aMaxFrameRetries)

Sets the maximum number of retries allowed after a transmission failure.

Equivalent to macMaxFrameRetries in IEEE 802.15.4-2006.

Parameters

aMaxFrameRetries [in] The maximum number of retries allowed after a transmission failure.

Defined at line 1152 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

bool IsARetransmission ()

Indicates whether or not the frame is a retransmission.

Defined at line 1160 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetIsARetransmission (bool aIsARetx)

Sets the retransmission flag attribute.

Parameters

aIsARetx [in] TRUE if frame is a retransmission of an earlier frame, FALSE otherwise.

Defined at line 1167 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

bool IsCsmaCaEnabled ()

Indicates whether or not CSMA-CA is enabled.

Defined at line 1175 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetCsmaCaEnabled (bool aCsmaCaEnabled)

Sets the CSMA-CA enabled attribute.

Parameters

aCsmaCaEnabled [in] TRUE if CSMA-CA must be enabled for this packet, FALSE otherwise.

Defined at line 1182 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

const Mac::KeyMaterial & GetAesKey ()

Returns the key used for frame encryption and authentication (AES CCM).

Defined at line 1189 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void ProcessTransmitAesCcm (const ExtAddress & aExtAddress)

Performs AES CCM on the frame which is going to be sent.

Parameters

aExtAddress [in] A reference to the extended address, which will be used to generate nonce for AES CCM computation.
Error GenerateEnhAck (const RxFrame & aRxFrame, bool aIsFramePending, const uint8_t * aIeData, uint8_t aIeLength)

Generate Enh-Ack in this frame object.

Parameters

aRxFrame [in] A reference to the received frame.
aIsFramePending [in] Value of the ACK's frame pending bit.
aIeData [in] A pointer to the IE data portion of the ACK to be sent.
aIeLength [in] The length of IE data portion of the ACK to be sent.
void SetAesKey (const Mac::KeyMaterial & aAesKey)

Sets the key used for frame encryption and authentication (AES CCM).

Parameters

aAesKey [in] The pointer to the key.

Defined at line 1199 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

bool IsSecurityProcessed ()

Indicates whether or not the frame has security processed.

Defined at line 1225 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetIsSecurityProcessed (bool aIsSecurityProcessed)

Sets the security processed flag attribute.

Parameters

aIsSecurityProcessed [in] TRUE if the frame already has security processed.

Defined at line 1232 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

bool IsCslIePresent ()

Indicates whether or not the frame contains the CSL IE.

Defined at line 1243 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetCslIePresent (bool aCslPresent)

Sets the CSL IE present flag.

Parameters

aCslPresent [in] TRUE if the frame contains the CSL IE.

Defined at line 1250 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

bool IsHeaderUpdated ()

Indicates whether or not the frame header is updated.

Defined at line 1258 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetIsHeaderUpdated (bool aIsHeaderUpdated)

Sets the header updated flag attribute.

Parameters

aIsHeaderUpdated [in] TRUE if the frame header is updated.

Defined at line 1265 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetTxDelay (uint32_t aTxDelay)

Set TX delay field for the frame.

Parameters

aTxDelay [in] The delay time for the TX frame.

Defined at line 1341 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

void SetTxDelayBaseTime (uint32_t aTxDelayBaseTime)

Set TX delay base time field for the frame.

Parameters

aTxDelayBaseTime [in] The delay base time for the TX frame.

Defined at line 1348 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp

Records