Struct capsules::ieee802154::virtual_mac::MacUser [] [src]

pub struct MacUser<'a> {
    mux: &'a MuxMac<'a>,
    operation: MapCell<Op>,
    next: ListLink<'a, MacUser<'a>>,
    tx_client: Cell<Option<&'a TxClient>>,
    rx_client: Cell<Option<&'a RxClient>>,
}

Keep state for each Mac user. All users of the virtualized MAC interface need to create one of these and register it with the MAC device muxer MuxMac by calling MuxMac#add_user. Then, each MacUser behaves exactly like an independent MAC device, except MAC device state is shared between all MacUsers because there is only one MAC device. For example, the MAC device address is shared, so calling set_address on one MacUser sets the MAC address for all MacUsers.

Fields

Methods

impl<'a> MacUser<'a>
[src]

[src]

impl<'a> MacUser<'a>
[src]

[src]

[src]

Trait Implementations

impl<'a> ListNode<'a, MacUser<'a>> for MacUser<'a>
[src]

[src]

impl<'a> MacDevice<'a> for MacUser<'a>
[src]

[src]

Sets the transmission client of this MAC device

[src]

Sets the receive client of this MAC device

[src]

The short 16-bit address of the MAC device

[src]

The long 64-bit address (EUI-64) of the MAC device

[src]

The 16-bit PAN ID of the MAC device

[src]

Set the short 16-bit address of the MAC device

[src]

Set the long 64-bit address (EUI-64) of the MAC device

[src]

Set the 16-bit PAN ID of the MAC device

[src]

This method must be called after one or more calls to set_*. If set_* is called without calling config_commit, there is no guarantee that the underlying hardware configuration (addresses, pan ID) is in line with this MAC device implementation. Read more

[src]

Returns if the MAC device is currently on.

[src]

Prepares a mutable buffer slice as an 802.15.4 frame by writing the appropriate header bytes into the buffer. This needs to be done before adding the payload because the length of the header is not fixed. Read more

[src]

Transmits a frame that has been prepared by the above process. If the transmission process fails, the buffer inside the frame is returned so that it can be re-used. Read more