famouso::mw::nl::IEEE_802_15_4_NL< driver_t > Class Template Reference
Network layer that acts as the interface to any IEEE 802.15.4 compliant network. More...
#include <IEEE_802_15_4_NL.h>
Data Structures | |
struct | info |
contains information about the networ layer including maximal available payload More... | |
struct | message |
Public Types | |
typedef IEEE_802_15_4_NL | type |
typedef famouso::mw::Subject | SNN |
typedef Packet< SNN > | Packet_t |
typedef driver_t::mob_t | mob_t |
typedef afp::Disable | AFP_Config |
Default AFP configuration of this network layer (see AFP configuration in the Network Layer). | |
Public Member Functions | |
IEEE_802_15_4_NL () | |
~IEEE_802_15_4_NL () | |
void | init () |
Initialises the network layer. | |
void | bind (const Subject &s, SNN &snn) |
This method binds a subject to a specific network name. | |
void | deliver (const Packet_t &p) |
Publishes messages that are within the available payload of the driver used. | |
void | fetch (Packet_t &p) |
Transfers the data of the last received message into a packet for further use. | |
void | rx_interrupt (const mob_t &msg) |
The rx_interrupt is called from the driver-level as reaction to a physical interrupt that was triggered by the arival of a new message. | |
void | tx_interrupt () |
The tx_interrupt is called if the driver is able to send new/further messages. (not yet implemented). | |
SNN | lastPacketSNN () |
Returns Short Network Name of the last received message. | |
Protected Attributes | |
struct famouso::mw::nl::IEEE_802_15_4_NL::message | mbuffer |
Detailed Description
template<class driver_t>
class famouso::mw::nl::IEEE_802_15_4_NL< driver_t >
Network layer that acts as the interface to any IEEE 802.15.4 compliant network.
This allows to use IEEE 802.15.4 as a Network Layer within the FAMOUSO middleware. Depending on the configuration different drivers can be used. There are two types of drivers available. Driver that use the serial port to transfer messages to devices that send those message via an IEEE 802.15.4 connection and driver that implement the IEEE 802.15.4 connection themselfe.
- Parameters:
-
[in] driver_t generic driver for this network layer
- Todo:
use template parameter (enum) to determin actually usable payload size during compile time
test possibility to reduce memory space by using the provided mob_t object
Member Typedef Documentation
typedef afp::Disable famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::AFP_Config |
Default AFP configuration of this network layer (see AFP configuration in the Network Layer).
typedef driver_t::mob_t famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::mob_t |
typedef Packet<SNN> famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::Packet_t |
typedef famouso::mw::Subject famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::SNN |
typedef IEEE_802_15_4_NL famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::type |
Constructor & Destructor Documentation
famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::IEEE_802_15_4_NL | ( | ) | [inline] |
famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::~IEEE_802_15_4_NL | ( | ) | [inline] |
Member Function Documentation
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::bind | ( | const Subject & | s, | |
SNN & | snn | |||
) | [inline] |
This method binds a subject to a specific network name.
- Parameters:
-
[in] s Subject of the channel [out] snn Short Network Name
References TRACE_FUNCTION.
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::deliver | ( | const Packet_t & | p | ) | [inline] |
Publishes messages that are within the available payload of the driver used.
- Parameters:
-
[in] p packet to be published
- Todo:
- transmit p.fragment
References Packet< T >::data, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::data, Packet< T >::data_length, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::size, Packet< T >::snn, and TRACE_FUNCTION.
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::fetch | ( | Packet_t & | p | ) | [inline] |
Transfers the data of the last received message into a packet for further use.
- Parameters:
-
[out] p packet that is going to contain the received data
- Todo:
- transmit p.fragment
References Packet< T >::data, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::data, Packet< T >::data_length, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::mbuffer, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::size, Packet< T >::snn, and TRACE_FUNCTION.
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::init | ( | ) | [inline] |
Initialises the network layer.
During this method the parameter of the network layer and the methods for interrupt handling are initialized (see delegates for further references).
References TRACE_FUNCTION.
SNN famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::lastPacketSNN | ( | ) | [inline] |
Returns Short Network Name of the last received message.
- Returns:
- Short Network Name of the last received message.
References famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::data, and famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::mbuffer.
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::rx_interrupt | ( | const mob_t & | msg | ) | [inline] |
The rx_interrupt is called from the driver-level as reaction to a physical interrupt that was triggered by the arival of a new message.
References famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::data, famouso::mw::el::IncommingEventFromNL, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::mbuffer, famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::message::size, and TRACE_FUNCTION.
void famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::tx_interrupt | ( | ) | [inline] |
The tx_interrupt is called if the driver is able to send new/further messages. (not yet implemented).
- Todo:
- Provide functionality to use tx_interrupt
References TRACE_FUNCTION.
Field Documentation
struct famouso::mw::nl::IEEE_802_15_4_NL::message famouso::mw::nl::IEEE_802_15_4_NL< driver_t >::mbuffer [protected] |
The documentation for this class was generated from the following file:
- include/mw/nl/IEEE_802_15_4_NL.h