device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD > Class Template Reference
Atmel driver for the serial network layer. More...
#include <device/nic/serial/AtmelSerialDriver.h>
Data Structures | |
struct | cfgInfo |
definition of driver specific information More... | |
Public Types | |
typedef CFrame< DEV, uint8_t, SFD, PL > | baseType |
definition of base type | |
typedef AtmelSerialDriver< DEV, PL, BR, SFD > | type |
definition of class type | |
typedef baseType::mob_t | mob_t |
definition of driver specific message object | |
Public Member Functions | |
AtmelSerialDriver () | |
~AtmelSerialDriver () | |
void | init () |
(Re)Initializes the driver for the serial connection. | |
void | recv (mob_t &message) |
Fetches the message received last. | |
void | send (const mob_t &message) |
Transmits a message using the serial port. | |
Data Fields | |
famouso::util::Delegate | onReceive |
Triggered if a packet was received. | |
famouso::util::Delegate | onReady |
Triggered if driver is able to send new/further messages. | |
Protected Member Functions | |
void | handleReceive () |
void | handleReady () |
Detailed Description
template<class DEV, uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
class device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >
Atmel driver for the serial network layer.
- Template Parameters:
-
character device used for the serial connection available payload of the driver (255 byte) baudrate used by the driver (default 19200 bps) byte modifier for framing/stuffing
- Todo:
minimize number of delegates used
move implementation of CFrame to FAMOUSO
use same framing/stuffing implementation as the AsioDriver
Member Typedef Documentation
typedef CFrame< DEV, uint8_t, SFD, PL> device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::baseType |
definition of base type
typedef baseType::mob_t device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::mob_t |
definition of driver specific message object
typedef AtmelSerialDriver<DEV, PL, BR, SFD> device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::type |
definition of class type
Constructor & Destructor Documentation
device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::AtmelSerialDriver | ( | ) | [inline] |
device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::~AtmelSerialDriver | ( | ) | [inline] |
Member Function Documentation
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReady | ( | ) | [inline, protected] |
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReceive | ( | ) | [inline, protected] |
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::init | ( | ) | [inline] |
(Re)Initializes the driver for the serial connection.
References TRACE_FUNCTION.
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::recv | ( | mob_t & | message | ) | [inline] |
Fetches the message received last.
- Parameters:
-
[out] message where the data is stored
References TRACE_FUNCTION.
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::send | ( | const mob_t & | message | ) | [inline] |
Transmits a message using the serial port.
- Parameters:
-
[in] message object that is to be send
References TRACE_FUNCTION.
Field Documentation
famouso::util::Delegate device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::onReady |
Triggered if driver is able to send new/further messages.
- Note:
- This functionality is not yet implemented.
Referenced by device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReady().
famouso::util::Delegate device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::onReceive |
Triggered if a packet was received.
Referenced by device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReceive().
The documentation for this class was generated from the following file:
- include/devices/nic/serial/AtmelSerialDriver.h