OutPortCorbaCdrProvider class. More...
#include <OutPortCorbaCdrProvider.h>
Public Member Functions | |
virtual ::OpenRTM::PortStatus | get (::OpenRTM::CdrData_out data) throw (CORBA::SystemException) |
[CORBA interface] Get data from the buffer More... | |
virtual void | init (coil::Properties &prop) |
Initializing configuration. More... | |
OutPortCorbaCdrProvider (void) | |
Constructor. More... | |
virtual void | setBuffer (CdrBufferBase *buffer) |
Setting outside buffer's pointer. More... | |
virtual void | setConnector (OutPortConnector *connector) |
set Connector More... | |
virtual void | setListener (ConnectorInfo &info, ConnectorListeners *listeners) |
Set the listener. More... | |
virtual | ~OutPortCorbaCdrProvider (void) |
Destructor. More... | |
Public Member Functions inherited from RTC::OutPortProvider | |
virtual bool | publishInterface (SDOPackage::NVList &properties) |
Publish interface information. More... | |
virtual void | publishInterfaceProfile (SDOPackage::NVList &properties) |
Publish InterfaceProfile information. More... | |
virtual DATAPORTSTATUS_ENUM | ~OutPortProvider (void) |
Destructor. More... | |
Private Member Functions | |
::OpenRTM::PortStatus | convertReturn (BufferStatus::Enum status, const cdrMemoryStream &data) |
Return codes conversion. More... | |
void | onBufferEmpty () |
Notify an ON_BUFFER_EMPTY event to listeners. More... | |
void | onBufferRead (const cdrMemoryStream &data) |
Notify an ON_BUFFER_READ event to listeners. More... | |
void | onBufferReadTimeout () |
Notify an ON_BUFFER_READ_TIMEOUT event to listeners. More... | |
void | onSend (const cdrMemoryStream &data) |
Notify an ON_SEND event to listeners. More... | |
void | onSenderEmpty () |
Notify an ON_SENDER_EMPTY event to listeners. More... | |
void | onSenderError () |
Notify an ON_SENDER_ERROR event to listeners. More... | |
void | onSenderTimeout () |
Notify an ON_SENDER_TIMEOUT event to listeners. More... | |
Private Attributes | |
CdrBufferBase * | m_buffer |
OutPortConnector * | m_connector |
ConnectorListeners * | m_listeners |
::OpenRTM::OutPortCdr_var | m_objref |
ConnectorInfo | m_profile |
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 Member Functions inherited from RTC::OutPortProvider | |
void | setDataFlowType (const char *dataflow_type) |
Set the data flow type. More... | |
void | setDataType (const char *data_type) |
Set the data type. More... | |
void | setInterfaceType (const char *interface_type) |
Set the interface type. More... | |
void | setPortType (const char *port_type) |
Set the port type. More... | |
void | setSubscriptionType (const char *subs_type) |
Set the subscription type. More... | |
Protected Attributes inherited from RTC::OutPortProvider | |
SDOPackage::NVList | m_properties |
Properties to hold the port profiles. More... | |
Logger | rtclog |
Logger stream. More... | |
OutPortCorbaCdrProvider class.
The OutPort provider class which uses the OpenRTM::OutPortCdr interface in CORBA for data transfer and realizes a pull-type dataflow.
Definition at line 61 of file OutPortCorbaCdrProvider.h.
RTC::OutPortCorbaCdrProvider::OutPortCorbaCdrProvider | ( | void | ) |
|
virtual |
|
private |
Return codes conversion.
Definition at line 193 of file OutPortCorbaCdrProvider.cpp.
OpenRTM::PortStatus RTC::OutPortCorbaCdrProvider::get | ( | ::OpenRTM::CdrData_out | data | ) | |
throw | ( | CORBA::SystemException | |||
) |
[CORBA interface] Get data from the buffer
Get data from the internal buffer.
Definition at line 148 of file OutPortCorbaCdrProvider.cpp.
|
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.
prop | Configuration information |
Reimplemented from RTC::OutPortProvider.
Definition at line 98 of file OutPortCorbaCdrProvider.cpp.
|
inlineprivate |
Notify an ON_BUFFER_EMPTY event to listeners.
Definition at line 296 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_BUFFER_READ event to listeners.
data | cdrMemoryStream |
Definition at line 268 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_BUFFER_READ_TIMEOUT event to listeners.
Definition at line 309 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_SEND event to listeners.
data | cdrMemoryStream |
Definition at line 283 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_SENDER_EMPTY event to listeners.
Definition at line 322 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_SENDER_ERROR event to listeners.
Definition at line 348 of file OutPortCorbaCdrProvider.h.
|
inlineprivate |
Notify an ON_SENDER_TIMEOUT event to listeners.
Definition at line 335 of file OutPortCorbaCdrProvider.h.
|
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.
buffer | A pointer to a data buffer to be used by OutPortProvider |
Implements RTC::OutPortProvider.
Definition at line 109 of file OutPortCorbaCdrProvider.cpp.
|
virtual |
set Connector
Setting outside connector's pointer.
OutPort creates OutPortConnector object when it establishes connection between OutPort and InPort, and it calls this function with a pointer to the connector object. Since the OutPort has the ownership of this connector, OutPortProvider should not delete it.
connector | OutPortConnector |
Implements RTC::OutPortProvider.
Definition at line 135 of file OutPortCorbaCdrProvider.cpp.
|
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.
info | Connector information |
listeners | Listener objects |
Implements RTC::OutPortProvider.
Definition at line 121 of file OutPortCorbaCdrProvider.cpp.
|
private |
Definition at line 355 of file OutPortCorbaCdrProvider.h.
|
private |
Definition at line 359 of file OutPortCorbaCdrProvider.h.
|
private |
Definition at line 357 of file OutPortCorbaCdrProvider.h.
|
private |
Definition at line 356 of file OutPortCorbaCdrProvider.h.
|
private |
Definition at line 358 of file OutPortCorbaCdrProvider.h.