Menu

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

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
typedef CFrame< DEV, uint8_t, SFD, PL> device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::baseType

definition of base type

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
typedef baseType::mob_t device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::mob_t

definition of driver specific message object

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
typedef AtmelSerialDriver<DEV, PL, BR, SFD> device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::type

definition of class type


Constructor & Destructor Documentation

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::AtmelSerialDriver (  )  [inline]
template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::~AtmelSerialDriver (  )  [inline]

Member Function Documentation

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReady (  )  [inline, protected]
template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReceive (  )  [inline, protected]
template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
void device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::init (  )  [inline]

(Re)Initializes the driver for the serial connection.

References TRACE_FUNCTION.

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
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.

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
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

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
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.
Todo:
provide functionality for the onReady() interrupt

Referenced by device::nic::serial::AtmelSerialDriver< DEV, PL, BR, SFD >::handleReady().

template<class DEV , uint8_t PL = 255, uint16_t BR = 19200, class SFD = struct SerialFrameDelimiter>
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: