#include <OutPort.h>
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. |
This is the OutPort template class. The data type "DateType" supported by OutPort and the buffer type "BufferType" are used as template arguments.
RTC::OutPort< DataType, Buffer >::OutPort | ( | const char * | name, | |
DataType & | value, | |||
long int | length = 8 | |||
) | [inline] |
Constructor.
Constructor
name | Port's name | |
value | Data variable bound to this port | |
length | Buffer length (The default value:8) |
virtual RTC::OutPort< DataType, Buffer >::~OutPort | ( | ) | [inline, virtual] |
Destructor.
Destructor
virtual bool RTC::OutPort< DataType, Buffer >::write | ( | const DataType & | value | ) | [inline, virtual] |
Write data.
Write data in the port.
value | The target data for writing |
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.
bool RTC::OutPort< DataType, Buffer >::operator<< | ( | DataType & | value | ) | [inline] |
Write data.
Write data to the port. Write the set value to the port.
value | The target data for writing |
bool RTC::OutPort< DataType, Buffer >::read | ( | DataType & | value | ) | [inline] |
Readout the data.
Readout the value from DataPort
value | Readout data |
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.
block | Flag of blocking mode |
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.
block | Flag of blocking mode |
void RTC::OutPort< DataType, Buffer >::setReadTimeout | ( | long int | timeout | ) | [inline] |
void RTC::OutPort< DataType, Buffer >::setWriteTimeout | ( | long int | timeout | ) | [inline] |
void RTC::OutPort< DataType, Buffer >::setOnWrite | ( | OnWrite< DataType > * | on_write | ) | [inline] |
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.
on_wconvert | OnWriteConvert callback functor |
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.
on_overflow | OnOverflow callback functor |
void RTC::OutPort< DataType, Buffer >::setOnRead | ( | OnRead< DataType > * | on_read | ) | [inline] |
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.
on_rconvert | OnReadConvert callback functor |
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.
on_underflow | OnUnderflow callback functor |