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
sourceimpl Header
impl Header
sourcepub fn get_octet_size(&self) -> usize
pub fn get_octet_size(&self) -> usize
Get the size of this header in octets
sourcepub fn has_security(&self) -> bool
pub fn has_security(&self) -> bool
Whether this header has security enabled
Trait Implementations
sourceimpl PartialEq<Header> for Header
impl PartialEq<Header> for Header
sourceimpl TryRead<'_, &Header> for FrameContent
impl TryRead<'_, &Header> for FrameContent
sourceimpl<AEADBLKCIPH, KEYDESCLO> TryWrite<&Option<&mut SecurityContext<AEADBLKCIPH, KEYDESCLO>>> for Header where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> TryWrite<&Option<&mut SecurityContext<AEADBLKCIPH, KEYDESCLO>>> for Header where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl Copy for Header
impl Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more