Struct capsules::net::sixlowpan::TxState   
                   
                       [−]
                   
               [src]
struct TxState {
    packet: TakeCell<'static, [u8]>,
    src_pan: Cell<PanID>,
    dst_pan: Cell<PanID>,
    src_mac_addr: Cell<MacAddress>,
    dst_mac_addr: Cell<MacAddress>,
    security: Cell<Option<(SecurityLevel, KeyId)>>,
    dgram_tag: Cell<u16>,
    dgram_size: Cell<u16>,
    dgram_offset: Cell<usize>,
    tx_dgram_tag: Cell<u16>,
    tx_busy: Cell<bool>,
    tx_buf: TakeCell<'static, [u8]>,
}Tracks the global transmit state for a single IPv6 packet.
Since transmit is serialized, the Sixlowpan struct only contains
a reference to a single TxState (that is, we can only have a single
outstanding transmission at the same time).
This struct maintains a reference to the full IPv6 packet, the source/dest MAC addresses and PanIDs, security/compression/fragmentation options, per-fragmentation state, and some global state.
Fields
packet: TakeCell<'static, [u8]>
                           
                           
                           
                           src_pan: Cell<PanID>
                           
                           
                           
                           dst_pan: Cell<PanID>
                           
                           
                           
                           src_mac_addr: Cell<MacAddress>
                           
                           
                           
                           dst_mac_addr: Cell<MacAddress>
                           
                           
                           
                           security: Cell<Option<(SecurityLevel, KeyId)>>
                           
                           
                           
                           dgram_tag: Cell<u16>
                           
                           
                           
                           dgram_size: Cell<u16>
                           
                           
                           
                           dgram_offset: Cell<usize>
                           
                           
                           
                           tx_dgram_tag: Cell<u16>
                           
                           
                           
                           tx_busy: Cell<bool>
                           
                           
                           
                           tx_buf: TakeCell<'static, [u8]>
                           
                    Methods
impl TxState[src]
fn new(tx_buf: &'static mut [u8]) -> TxState[src]
Creates a new TxState
Arguments
tx_buf - A buffer for storing fragments the size of a 802.15.4 frame.
This buffer must be at least radio::MAX_FRAME_SIZE bytes long.
fn is_transmit_done(&self) -> bool[src]
fn init_transmit(
    &self, 
    src_mac_addr: MacAddress, 
    dst_mac_addr: MacAddress, 
    packet: &'static mut [u8], 
    packet_len: usize, 
    security: Option<(SecurityLevel, KeyId)>
)[src]
&self,
src_mac_addr: MacAddress,
dst_mac_addr: MacAddress,
packet: &'static mut [u8],
packet_len: usize,
security: Option<(SecurityLevel, KeyId)>
)
fn start_transmit(
    &self, 
    dgram_tag: u16, 
    frag_buf: &'static mut [u8], 
    radio: &MacDevice, 
    ctx_store: &ContextStore
) -> Result<(), (ReturnCode, &'static mut [u8])>[src]
&self,
dgram_tag: u16,
frag_buf: &'static mut [u8],
radio: &MacDevice,
ctx_store: &ContextStore
) -> Result<(), (ReturnCode, &'static mut [u8])>
fn prepare_transmit_first_fragment(
    &self, 
    ip6_packet: &[u8], 
    frame: Frame, 
    radio: &MacDevice, 
    ctx_store: &ContextStore
) -> Result<(), (ReturnCode, &'static mut [u8])>[src]
&self,
ip6_packet: &[u8],
frame: Frame,
radio: &MacDevice,
ctx_store: &ContextStore
) -> Result<(), (ReturnCode, &'static mut [u8])>
fn prepare_transmit_next_fragment(
    &self, 
    frag_buf: &'static mut [u8], 
    radio: &MacDevice
) -> Result<(), (ReturnCode, &'static mut [u8])>[src]
&self,
frag_buf: &'static mut [u8],
radio: &MacDevice
) -> Result<(), (ReturnCode, &'static mut [u8])>
fn end_transmit<'a>(
    &self, 
    tx_buf: &'static mut [u8], 
    client: Option<&'a SixlowpanClient>, 
    acked: bool, 
    result: ReturnCode
)[src]
&self,
tx_buf: &'static mut [u8],
client: Option<&'a SixlowpanClient>,
acked: bool,
result: ReturnCode
)