OpenRTM-aist  1.2.1
Public Member Functions | List of all members
RTC::OutPortDirectConsumer Class Reference

OutPortDirectConsumer class. More...

#include <OutPortDirectConsumer.h>

Inheritance diagram for RTC::OutPortDirectConsumer:
Inheritance graph
[legend]
Collaboration diagram for RTC::OutPortDirectConsumer:
Collaboration graph
[legend]

Public Member Functions

DATAPORTSTATUS_ENUM OutPortDirectConsumer ()
 Constructor. More...
 
virtual ~OutPortDirectConsumer (void)
 Destructor. More...
 
virtual void init (coil::Properties &prop)
 Initializing configuration. More...
 
virtual void setBuffer (CdrBufferBase *buffer)
 Setting outside buffer's pointer. More...
 
virtual void setListener (ConnectorInfo &info, ConnectorListeners *listeners)
 Set the listener. More...
 
virtual ReturnCode get (cdrMemoryStream &data)
 Read data. More...
 
virtual bool subscribeInterface (const SDOPackage::NVList &properties)
 Subscribe the data receive notification. More...
 
virtual void unsubscribeInterface (const SDOPackage::NVList &properties)
 Unsubscribe the data receive notification. More...
 
- Public Member Functions inherited from RTC::OutPortConsumer
virtual DATAPORTSTATUS_ENUM ~OutPortConsumer (void)
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from RTC::DataPortStatus
enum  Enum {
  PORT_OK = 0, PORT_ERROR, BUFFER_ERROR, BUFFER_FULL,
  BUFFER_EMPTY, BUFFER_TIMEOUT, SEND_FULL, SEND_TIMEOUT,
  RECV_EMPTY, RECV_TIMEOUT, INVALID_ARGS, PRECONDITION_NOT_MET,
  CONNECTION_LOST, UNKNOWN_ERROR
}
 DataPortStatus return codes. More...
 
- Static Public Member Functions inherited from RTC::DataPortStatus
static const char * toString (DataPortStatus::Enum status)
 Convert DataPortStatus into the string. More...
 
- Protected Attributes inherited from RTC::OutPortConsumer
Logger rtclog
 Logger stream. More...
 

Detailed Description

OutPortDirectConsumer class.

The OutPort consumer class which uses the OpenRTM::OutPortCdr interface in CORBA for data transfer and realizes a pull-type dataflow.

Since
1.2.0

Constructor & Destructor Documentation

DATAPORTSTATUS_ENUM RTC::OutPortDirectConsumer::OutPortDirectConsumer ( )

Constructor.

Constructor

virtual RTC::OutPortDirectConsumer::~OutPortDirectConsumer ( void  )
virtual

Destructor.

Destructor

Member Function Documentation

virtual ReturnCode RTC::OutPortDirectConsumer::get ( cdrMemoryStream &  data)
virtual

Read data.

Read set data

Parameters
dataObject to receive the read data
Returns
Read result (Successful:true, Failed:false)

Implements RTC::OutPortConsumer.

virtual void RTC::OutPortDirectConsumer::init ( coil::Properties prop)
virtual

Initializing configuration.

This operation would be called to configure in initialization. In the concrete class, configuration should be performed getting appropriate information from the given Properties data. This function might be called right after instantiation and connection sequence respectivly. Therefore, this function should be implemented assuming multiple call.

Parameters
propConfiguration information

Implements RTC::OutPortConsumer.

virtual void RTC::OutPortDirectConsumer::setBuffer ( CdrBufferBase buffer)
virtual

Setting outside buffer's pointer.

A pointer to a buffer from which OutPortProvider retrieve data. If already buffer is set, previous buffer's pointer will be overwritten by the given pointer to a buffer. Since OutPortProvider does not assume ownership of the buffer pointer, destructor of the buffer should be done by user.

Parameters
bufferA pointer to a data buffer to be used by OutPortProvider

Implements RTC::OutPortConsumer.

virtual void RTC::OutPortDirectConsumer::setListener ( ConnectorInfo info,
ConnectorListeners listeners 
)
virtual

Set the listener.

OutPort provides callback functionality that calls specific listener objects according to the events in the data publishing process. For details, see documentation of ConnectorDataListener class and ConnectorListener class in ConnectorListener.h. In this OutPortCorbaCdrProvider provides the following callbacks.

  • ON_BUFFER_WRITE
  • ON_BUFFER_FULL
  • ON_RECEIVED
  • ON_RECEIVER_FULL
  • ON_SENDER_EMPTY
  • ON_SENDER_TIMEOUT
  • ON_SENDER_ERROR
Parameters
infoConnector information
listenersListener objects

Implements RTC::OutPortConsumer.

virtual bool RTC::OutPortDirectConsumer::subscribeInterface ( const SDOPackage::NVList &  properties)
virtual

Subscribe the data receive notification.

Subscribe the data receive notification based on specified property information

Parameters
propertiesSubscription information
Returns
Subscription result (Successful:true, Failed:false)

Implements RTC::OutPortConsumer.

virtual void RTC::OutPortDirectConsumer::unsubscribeInterface ( const SDOPackage::NVList &  properties)
virtual

Unsubscribe the data receive notification.

Unsubscribe the data receive notification.

Parameters
propertiesUnsubscription information

Implements RTC::OutPortConsumer.


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