Module capsules::ieee802154::virtual_mac
[−]
[src]
Virtual IEEE 802.15.4 MAC device
MuxMac
provides multiplexed access to an 802.15.4 MAC device. This enables
a single underlying 802.15.4 radio to be shared transparently by multiple
users. For example, the kernel might want to send raw 802.15.4 frames and
subsequently 6LoWPAN-encoded and fragmented IP packets. This capsule allows
that to happen by providing a mechanism for sequencing transmission attempts,
Every radio frame received is provided to all listening clients so that each
client can perform its own frame filtering logic.
Usage
// Create the mux. let mux_mac = static_init!( capsules::ieee802154::virtual_mac::MuxMac<'static>, capsules::ieee802154::virtual_mac::MuxMac::new(&'static mac_device)); mac_device.set_transmit_client(mux_mac); mac_device.set_receive_client(mux_mac); // Everything that uses the virtualized MAC device must create one of these. let virtual_mac = static_init!( capsules::ieee802154::virtual_mac::MacUser<'static>, capsules::ieee802154::virtual_mac::MacUser::new(mux_mac)); mux_mac.add_user(virtual_mac);
Reexports
use core::cell::Cell; |
use ieee802154::device; |
use ieee802154::framer; |
use kernel::ReturnCode; |
use kernel::common::List; |
use kernel::common::ListLink; |
use kernel::common::ListNode; |
use kernel::common::take_cell::MapCell; |
use net::ieee802154::*; |
Structs
MacUser |
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 |
IEE 802.15.4 MAC device muxer that keeps a list of MAC users and sequences any pending transmission requests. Any received frames from the underlying MAC device are sent to all users. |
Enums
Op |