famouso::mw::nl::SerialNL< DRV > Class Template Reference
Network Layer for serial communication. More...
#include <SerialNL.h>
Data Structures | |
struct | info |
information about the network layer More... | |
Public Types | |
typedef SerialNL< DRV > | type |
typedef famouso::mw::Subject | SNN |
typedef Packet< SNN > | Packet_t |
typedef afp::Disable | AFP_Config |
Default AFP configuration of this network layer (see AFP configuration in the Network Layer). | |
typedef DRV::mob_t | mob_t |
Public Member Functions | |
SerialNL () | |
~SerialNL () | |
void | init () |
Initialises the network layer. | |
void | bind (const Subject &s, SNN &snn) |
Binds a subject to a specific network name. | |
void | deliver (const Packet_t &p) |
Publishes messages using the driver. | |
void | fetch (Packet_t &p) |
Transfers the data of the last received message into a packet. | |
void | rx_interrupt () |
Triggered if a new packet was received by the driver. | |
void | tx_interrupt () |
Called if the driver is able to send new/further messages. | |
SNN | lastPacketSNN () |
Gets the 'Short Network Name' of the last message. | |
Protected Attributes | |
DRV | driver |
mob_t | rmob |
Detailed Description
template<class DRV>
class famouso::mw::nl::SerialNL< DRV >
Network Layer for serial communication.
This network layer enables the use of a serial communication within the FAMOUSO middleware.
- Parameters:
-
[in] DRV generic driver for this network layer
Member Typedef Documentation
typedef afp::Disable famouso::mw::nl::SerialNL< DRV >::AFP_Config |
Default AFP configuration of this network layer (see AFP configuration in the Network Layer).
typedef DRV::mob_t famouso::mw::nl::SerialNL< DRV >::mob_t |
typedef Packet<SNN> famouso::mw::nl::SerialNL< DRV >::Packet_t |
typedef famouso::mw::Subject famouso::mw::nl::SerialNL< DRV >::SNN |
typedef SerialNL<DRV> famouso::mw::nl::SerialNL< DRV >::type |
Constructor & Destructor Documentation
famouso::mw::nl::SerialNL< DRV >::SerialNL | ( | ) | [inline] |
famouso::mw::nl::SerialNL< DRV >::~SerialNL | ( | ) | [inline] |
Member Function Documentation
void famouso::mw::nl::SerialNL< DRV >::bind | ( | const Subject & | s, | |
SNN & | snn | |||
) | [inline] |
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::SerialNL< DRV >::deliver | ( | const Packet_t & | p | ) | [inline] |
Publishes messages using the driver.
- Parameters:
-
[in] p packet to be published
- Todo:
- insert value of p.fragment into message
References Packet< T >::data, Packet< T >::data_length, famouso::mw::nl::SerialNL< DRV >::driver, Packet< T >::snn, and TRACE_FUNCTION.
void famouso::mw::nl::SerialNL< DRV >::fetch | ( | Packet_t & | p | ) | [inline] |
Transfers the data of the last received message into a packet.
- Parameters:
-
[out] p packet for the message data
- Todo:
- get value of p.fragment from message
References Packet< T >::data, Packet< T >::data_length, Packet< T >::fragment, famouso::mw::nl::SerialNL< DRV >::rmob, Packet< T >::snn, and TRACE_FUNCTION.
void famouso::mw::nl::SerialNL< DRV >::init | ( | ) | [inline] |
Initialises the network layer.
If this method is called the ArMARoW driver of FAMOUSO is (re)initialized and the methods for interrupt handling are bound to the appropriated driver methods (see delegates for further references).
References famouso::mw::nl::SerialNL< DRV >::driver, and TRACE_FUNCTION.
SNN famouso::mw::nl::SerialNL< DRV >::lastPacketSNN | ( | ) | [inline] |
Gets the 'Short Network Name' of the last message.
- Returns:
- Returns the 'Short Network Name' of the message last received.
References famouso::mw::nl::SerialNL< DRV >::rmob.
void famouso::mw::nl::SerialNL< DRV >::rx_interrupt | ( | ) | [inline] |
Triggered if a new packet was received by the driver.
References famouso::mw::nl::SerialNL< DRV >::driver, famouso::mw::el::IncommingEventFromNL, famouso::mw::nl::SerialNL< DRV >::rmob, and TRACE_FUNCTION.
void famouso::mw::nl::SerialNL< DRV >::tx_interrupt | ( | ) | [inline] |
Called if the driver is able to send new/further messages.
- Note:
- This functionality is not implemented yet.
- Todo:
- Provide functionality to use tx_interrupt
References TRACE_FUNCTION.
Field Documentation
DRV famouso::mw::nl::SerialNL< DRV >::driver [protected] |
mob_t famouso::mw::nl::SerialNL< DRV >::rmob [protected] |
The documentation for this class was generated from the following file:
- include/mw/nl/SerialNL.h