COSA
An Object-Oriented Platform for Arduino Programming
IOEvent< DEVICE > Class Template Reference

#include <IOEvent.hh>

Inheritance diagram for IOEvent< DEVICE >:
Inheritance graph
Collaboration diagram for IOEvent< DEVICE >:
Collaboration graph

Public Member Functions

 IOEvent (Event::Handler *handler)
 
virtual int putchar (char c)
 
virtual int getchar ()
 

Protected Attributes

Event::Handlerm_handler
 

Detailed Description

template<typename DEVICE>
class IOEvent< DEVICE >

IOEvent is an IOStream filter class that may push events when data has been received and send completed. Extends a given IOStream::Device class. Can be used to map an interrupt driven device such as UART to event driven on completed input lines.

Parameters
[in]DEVICEclass to filter.

Definition at line 36 of file IOEvent.hh.

Constructor & Destructor Documentation

template<typename DEVICE >
IOEvent< DEVICE >::IOEvent ( Event::Handler handler)
inline

Constuct IOEvent object for filtered stream operations.

Definition at line 41 of file IOEvent.hh.

Member Function Documentation

template<typename DEVICE >
virtual int IOEvent< DEVICE >::getchar ( )
inlinevirtual

Read character from device.

Returns
character or EOF(-1).

Definition at line 62 of file IOEvent.hh.

template<typename DEVICE >
virtual int IOEvent< DEVICE >::putchar ( char  c)
inlinevirtual

Write character to device.

Parameters
[in]ccharacter to write.
Returns
character written or EOF(-1).

Definition at line 49 of file IOEvent.hh.

Member Data Documentation

template<typename DEVICE >
Event::Handler* IOEvent< DEVICE >::m_handler
protected

Definition at line 71 of file IOEvent.hh.


The documentation for this class was generated from the following file: