Wiselib
Public Types | Public Member Functions
wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P > Class Template Reference

Parameters address_ -> UART Device address e.g. More...

#include <pc_com_uart_file.h>

Inherits wiselib::UartBase< OsModel_P, OsModel_P::size_t, OsModel_P::block_data_t >.

List of all members.

Public Types

enum  ErrorCodes { SUCCESS = OsModel::SUCCESS, ERR_UNSPEC = OsModel::ERR_UNSPEC }
typedef OsModel_P OsModel
typedef Timer_P Timer
typedef OsModel::size_t size_t
typedef OsModel::block_data_t block_data_t
typedef PCComUartModel
< OsModel_P, address_,
isense_reset_, Timer_P > 
self_type
typedef self_typeself_pointer_t
enum  ReturnValues
typedef delegate2< void,
size_t, block_data_t * > 
uart_delegate_t
typedef vector_static< OsModel,
uart_delegate_t,
UART_BASE_MAX_RECEIVERS > 
CallbackVector
typedef CallbackVector::iterator CallbackVectorIterator

Public Member Functions

 PCComUartModel ()
 PCComUartModel (PCOs &os)
void set_baudrate (uint32_t baudrate)
int enable_serial_comm ()
int disable_serial_comm ()
int write (size_t len, char *buf)
void try_read (void *userdata)
const char * address ()
int reg_read_callback (T *obj_pnt)
int unreg_read_callback (int idx)
void notify_receivers (size_t len, block_data_t *data)

Detailed Description

template<typename OsModel_P, const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
class wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >

Parameters address_ -> UART Device address e.g.

"/dev/ttyUSB0" (hint: allocate char[] in order to be able to pass string template parameter) isense_reset -> If true, toggle RTS/DTR lines at beginning of communication so an attached iSense node will reboot. Might confuse other UART devices so only use for iSense.


Member Typedef Documentation

template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef OsModel::block_data_t wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::block_data_t
typedef vector_static<OsModel, uart_delegate_t, UART_BASE_MAX_RECEIVERS > wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::CallbackVector [inherited]
typedef CallbackVector::iterator wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::CallbackVectorIterator [inherited]
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef OsModel_P wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::OsModel
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef self_type* wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::self_pointer_t
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef PCComUartModel<OsModel_P, address_, isense_reset_, Timer_P> wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::self_type
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef OsModel::size_t wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::size_t
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
typedef Timer_P wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::Timer
typedef delegate2<void, size_t, block_data_t*> wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::uart_delegate_t [inherited]

Member Enumeration Documentation

template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
enum wiselib::PCComUartModel::ErrorCodes
Enumerator:
SUCCESS 
ERR_UNSPEC 

Constructor & Destructor Documentation

template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::PCComUartModel ( )
template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::PCComUartModel ( PCOs os)

Member Function Documentation

template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
const char* wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::address ( ) [inline]
template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
int wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::disable_serial_comm ( )
template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
int wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::enable_serial_comm ( )
void wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::notify_receivers ( size_t  len,
block_data_t data 
) [inline, inherited]
int wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::reg_read_callback ( T *  obj_pnt) [inline, inherited]
template<typename OsModel_P , const char * address_, const bool isense_reset_ = false, typename Timer_P = typename OsModel_P::Timer>
void wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::set_baudrate ( uint32_t  baudrate) [inline]
template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
void wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::try_read ( void *  userdata)
int wiselib::UartBase< OsModel_P, OsModel_P::size_t , OsModel_P::block_data_t , UART_BASE_MAX_RECEIVERS >::unreg_read_callback ( int  idx) [inline, inherited]
template<typename OsModel_P , const char * address_, const bool isense_reset_, typename Timer_P >
int wiselib::PCComUartModel< OsModel_P, address_, isense_reset_, Timer_P >::write ( size_t  len,
char *  buf 
)

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines