RTC::OutPort< DataType, Buffer > Class Template Reference

OutPort template class. More...

#include <OutPort.h>

Inheritance diagram for RTC::OutPort< DataType, Buffer >:

RTC::OutPortBase

List of all members.

Public Member Functions

 OutPort (const char *name, DataType &value, long int length=8)
 Constructor.
virtual ~OutPort ()
 Destructor.
virtual bool write (const DataType &value)
 Write data.
bool write ()
 Write data.
bool operator<< (DataType &value)
 Write data.
bool read (DataType &value)
 Readout the data.
void setReadBlock (bool block)
 Set blocking mode of the data read processing.
void setWriteBlock (bool block)
 Set blocking mode of the data writing processing.
void setReadTimeout (long int timeout)
 Set timeout of the data read processing.
void setWriteTimeout (long int timeout)
 Set timeout of the data writing processing.
void setOnWrite (OnWrite< DataType > *on_write)
 Set OnWrite callback.
void setOnWriteConvert (OnWriteConvert< DataType > *on_wconvert)
 Set OnWriteConvert callback.
void setOnOverflow (OnOverflow< DataType > *on_overflow)
 Set OnOverflow callback.
void setOnRead (OnRead< DataType > *on_read)
 Set OnRead callback.
void setOnReadConvert (OnReadConvert< DataType > *on_rconvert)
 Set OnReadConvert callback.
void setOnUnderflow (OnUnderflow< DataType > *on_underflow)
 Set OnUnderflow callback.


Detailed Description

template<class DataType, template< class DataType > class Buffer = RingBuffer>
class RTC::OutPort< DataType, Buffer >

OutPort template class.

This is the OutPort template class. The data type "DateType" supported by OutPort and the buffer type "BufferType" are used as template arguments.

Since:
0.2.0

Constructor & Destructor Documentation

template<class DataType, template< class DataType > class Buffer = RingBuffer>
RTC::OutPort< DataType, Buffer >::OutPort ( const char *  name,
DataType &  value,
long int  length = 8 
) [inline]

Constructor.

Constructor

Parameters:
name Port's name
value Data variable bound to this port
length Buffer length (The default value:8)

template<class DataType, template< class DataType > class Buffer = RingBuffer>
virtual RTC::OutPort< DataType, Buffer >::~OutPort (  )  [inline, virtual]

Destructor.

Destructor


Member Function Documentation

template<class DataType, template< class DataType > class Buffer = RingBuffer>
virtual bool RTC::OutPort< DataType, Buffer >::write ( const DataType &  value  )  [inline, virtual]

Write data.

Write data in the port.

Parameters:
value The target data for writing
Returns:
Writing result (Successful:true, Failed:false)

template<class DataType, template< class DataType > class Buffer = RingBuffer>
bool RTC::OutPort< DataType, Buffer >::write (  )  [inline]

Write data.

Write data to the port. Write the value, which was set to the bound variable, to the port.

Returns:
Writing result (Successful:true, Failed:false)

template<class DataType, template< class DataType > class Buffer = RingBuffer>
bool RTC::OutPort< DataType, Buffer >::operator<< ( DataType &  value  )  [inline]

Write data.

Write data to the port. Write the set value to the port.

Parameters:
value The target data for writing
Returns:
Writing result (Successful:true, Failed:false)

template<class DataType, template< class DataType > class Buffer = RingBuffer>
bool RTC::OutPort< DataType, Buffer >::read ( DataType &  value  )  [inline]

Readout the data.

Readout the value from DataPort

Parameters:
value Readout data
Returns:
Readout result (Successful:true, Failed:false)

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setReadBlock ( bool  block  )  [inline]

Set blocking mode of the data read processing.

Set the blocking mode for the readout. When the block mode is specified, the invoke of read() method is blocked until the readout data is received or timeout occurs.

Parameters:
block Flag of blocking mode

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setWriteBlock ( bool  block  )  [inline]

Set blocking mode of the data writing processing.

Set the blocking mode for the writing. When the block mode is specified, the invoke of write() method is blocked until the area written into the buffer can be used or timeout occurs.

Parameters:
block Flag of blocking mode

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setReadTimeout ( long int  timeout  )  [inline]

Set timeout of the data read processing.

Set the timeout period of read() with usec. read() must be a block mode.

Parameters:
timeout Timeout period[usec]

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setWriteTimeout ( long int  timeout  )  [inline]

Set timeout of the data writing processing.

Set the timeout period of write() with usec. write() must be a block mode.

Parameters:
timeout Timeout period[usec]

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnWrite ( OnWrite< DataType > *  on_write  )  [inline]

Set OnWrite callback.

Set OnWrite callback functor invoked immediately before data is written.

Parameters:
on_write OnWrite callback functor

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnWriteConvert ( OnWriteConvert< DataType > *  on_wconvert  )  [inline]

Set OnWriteConvert callback.

Set OnWriteConvert callback functor invoked when data is written. The processing result of this callback function is written. Therefore, filtering of the writing data will be possible.

Parameters:
on_wconvert OnWriteConvert callback functor

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnOverflow ( OnOverflow< DataType > *  on_overflow  )  [inline]

Set OnOverflow callback.

Set OnOverflow callback functor, which is invoked when data cannot be written because of the buffer full.

Parameters:
on_overflow OnOverflow callback functor

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnRead ( OnRead< DataType > *  on_read  )  [inline]

Set OnRead callback.

Set OnWrite callback functor invoked immediately before data is readout.

Parameters:
on_read OnRead callback functor

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnReadConvert ( OnReadConvert< DataType > *  on_rconvert  )  [inline]

Set OnReadConvert callback.

Set OnReadConvert callback functor invoked when data is readout. The processing result of this callback function is readout. Therefore, filtering of the read data will be possible.

Parameters:
on_rconvert OnReadConvert callback functor

template<class DataType, template< class DataType > class Buffer = RingBuffer>
void RTC::OutPort< DataType, Buffer >::setOnUnderflow ( OnUnderflow< DataType > *  on_underflow  )  [inline]

Set OnUnderflow callback.

Set OnUnderflow callback functor, which is invoked when data cannot be readout because of the buffer empty.

Parameters:
on_underflow OnUnderflow callback functor


Generated on Thu May 29 15:03:33 2008 for OpenRTM by  doxygen 1.5.3