pub struct Header {
    pub frame_type: FrameType,
    pub frame_pending: bool,
    pub ack_request: bool,
    pub pan_id_compress: bool,
    pub seq_no_suppress: bool,
    pub ie_present: bool,
    pub version: FrameVersion,
    pub seq: u8,
    pub destination: Option<Address>,
    pub source: Option<Address>,
    pub auxiliary_security_header: Option<AuxiliarySecurityHeader>,
}
Expand description

MAC frame header

External documentation for MAC frame format start at 5.2

Fields

frame_type: FrameType

Frame Type

frame_pending: bool

Frame Pending

The Frame Pending field shall be set to true if the device sending the frame has more data for the recipient,as described in 5.1.6.3. This field shall be set to false otherwise.

ack_request: bool

Acknowledgement Request

The AR field specifies whether an acknowledgment is required from the recipient device on receipt of a data or MAC command frame. If this field is set to true, the recipient device shall send an acknowledgment frame only if, upon reception, the frame passes the filtering described in 5.1.6.2. If this field is set to false, the recipient device shall not send an acknowledgment frame.

pan_id_compress: bool

PAN ID Compress

The PAN ID Compression field specifies whether the MAC frame is to be sent containing only one of the PAN identifier fields when both src and destination addresses are present. If this field is set to true and both the src and destination addresses are present, the frame shall contain only the Destination PAN Identifier field, and the Source PAN Identifier field shall be assumed equal to that of the destination. If this field is set to false, then the PAN Identifier field shall be present if and only if the corresponding address is present.

seq_no_suppress: bool

Suppress sequence number

ie_present: bool

Information element present

version: FrameVersion

Frame version

seq: u8

Sequence Number

destination: Option<Address>

Destination Address

source: Option<Address>

Source Address

auxiliary_security_header: Option<AuxiliarySecurityHeader>

Auxiliary security header. If security is enabled in this header, this field will be Some, else it will be None

Implementations

Get the size of this header in octets

Whether this header has security enabled

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Try to read from bytes using context. Read more

Try to read from bytes using context. Read more

Try to write to bytes using context. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.