struct BuildInfo
Defined at line 895 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp
Represents the information to use to build the frame.
Public Members
Type mType
Version mVersion
Addresses mAddrs
PanIds mPanIds
SecurityLevel mSecurityLevel
KeyIdMode mKeyIdMode
CommandId mCommandId
bool mSuppressSequence
bool mEmptyPayload
Public Methods
void BuildInfo ()
Initializes the `BuildInfo` by clearing all its fields (setting all bytes to zero).
Defined at line 900 of file ../../third_party/openthread/src/core/mac/mac_frame.hpp
void PrepareHeadersIn (TxFrame & aTxFrame)
Prepares MAC headers based on `BuildInfo` fields in a given `TxFrame`.
This method uses the `BuildInfo` structure to construct the MAC address and security headers in
It determines the Frame Control Field (FCF), including setting the appropriate frame type, security level,
and addressing mode flags. It populates the source and destination addresses and PAN IDs within the MAC
header based on the information provided in the `BuildInfo` structure.
It sets the Ack Request bit in the FCF if the following criteria are met:
- A destination address is present
- The destination address is not the broadcast address
- The frame type is not an ACK frame
The header IE entries are prepared based on `mAppendTimeIe` and `mAppendCslIe` flags and the IE Present
flag in FCF is determined accordingly.
The Frame Pending flag in FCF is not set. It may need to be set separately depending on the specific
requirements of the frame being transmitted.