27 #include <coil/TimeValue.h> 28 #include <coil/Time.h> 88 template <
class DataType>
147 bool read_block =
false,
bool write_block =
false,
148 int read_timeout = 0,
int write_timeout = 0)
149 #if defined(__GNUC__) && (__GNUC__ <= 3 && __GNUC_MINOR__ <= 3) 150 :
InPortBase(name, ::CORBA_Util::toRepositoryIdOfStruct<DataType>()),
152 :
InPortBase(name, ::CORBA_Util::toRepositoryId<DataType>()),
245 RTC_DEBUG((
"isNew() = true, readable data: %d", r));
249 RTC_DEBUG((
"isNew() = false, no readable data"));
296 RTC_DEBUG((
"isEmpty() = true, buffer is empty"));
300 RTC_DEBUG((
"isEmpty() = false, data exists in the buffer"));
425 RTC_ERROR((
"unknown retern value from buffer.read()"));
579 #endif // RTC_INPORT_H #define RTC_ERROR(fmt)
Error log output macro.
#define DATAPORTSTATUS_ENUM
Importing RTC::DataPortStatus macro.
coil::Mutex m_connectorsMutex
virtual ~InPort(void)
Destructor.
DATAPORTSTATUS_ENUM InPort(const char *name, DataType &value, int bufsize=64, bool read_block=false, bool write_block=false, int read_timeout=0, int write_timeout=0)
A constructor.
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
virtual const char * name()
Get port name.
Enum
DataPortStatus return codes.
DataType & m_value
The reference to type-T value bound this OutPort.
#define RTC_WARN(fmt)
Warning log output macro.
virtual bool isEmpty()
Check whether the data is newest.
Data convert callback abstract class on read()
void setOnReadConvert(OnReadConvert< DataType > *on_rconvert)
Set callback when data is readout to the InPort buffer.
#define RTC_DEBUG(fmt)
Debug level log output macro.
OnReadConvert< DataType > * m_OnReadConvert
Pointer to OnReadConvert callback functor.
OnRead< DataType > * m_OnRead
Pointer to OnRead callback functor.
InPortConnector base class.
virtual void update()
Read the newly value to type-T variable which is bound to InPort's buffer.
InPortBase(const char *name, const char *data_type)
Constructor.
RTC::Port implementation for InPort.
virtual bool isNew()
Check whether the data is newest.
void setOnRead(OnRead< DataType > *on_read)
Set callback when data is read from the InPort buffer.
void operator>>(DataType &rhs)
Read the newly value data in InPort to type-T variable.
ConnectorList m_connectors
Connection list.
bool read()
Readout the value from DataPort.
Callback abstract class on read()