OpenRTM-aist 2.1.0
|
OutPortPushConnector class. More...
#include <OutPortPushConnector.h>
Public Member Functions | |
OutPortPushConnector (ConnectorInfo info, InPortConsumer *consumer, ConnectorListenersBase *listeners, CdrBufferBase *buffer=nullptr) | |
Constructor. | |
~OutPortPushConnector () override | |
Destructor. | |
DataPortStatus | write (RTC::ByteDataStreamBase *data) override |
Writing data. | |
DataPortStatus | disconnect () override |
disconnect | |
void | activate () override |
Connector activation. | |
void | deactivate () override |
Connector deactivation. | |
CdrBufferBase * | getBuffer () override |
Getting Buffer. | |
void | unsubscribeInterface (const coil::Properties &prop) override |
![]() | |
OutPortConnector (ConnectorInfo &info, ConnectorListenersBase *listeners) | |
Constructor . | |
~OutPortConnector () override | |
Destructor . | |
const ConnectorInfo & | profile () override |
Getting Profile. | |
const char * | id () override |
Getting Connector ID. | |
const char * | name () override |
Getting Connector name. | |
virtual void | setEndian (bool endian_type) |
Setting an endian type. | |
virtual bool | isLittleEndian () |
return it whether endian setting. | |
template<class DataType > | |
DataPortStatus | write (DataType &data) |
The conversion template of the data type. | |
virtual BufferStatus | read (ByteData &data) |
bool | setInPort (InPortBase *directInPort) |
virtual void | setPullDirectMode () |
virtual bool | pullDirectMode () |
![]() | |
virtual | ~ConnectorBase ()=default |
Destructor . | |
Protected Member Functions | |
virtual PublisherBase * | createPublisher (ConnectorInfo &info) |
create buffer | |
virtual CdrBufferBase * | createBuffer (ConnectorInfo &info) |
create buffer | |
void | onConnect () |
Invoke callback when connection is established . | |
void | onDisconnect () |
Invoke callback when connection is destroied . | |
Additional Inherited Members | |
![]() | |
Logger | rtclog |
Logger streamf . | |
ConnectorInfo | m_profile |
PortProfile of the Port . | |
bool | m_littleEndian |
Connected Endian . | |
PortBase * | m_directInPort |
InProt pointer to the peer in the same process . | |
ConnectorListenersBase * | m_listeners |
A reference to a ConnectorListener . | |
ConnectorListenersBase * | m_inPortListeners |
A pointer to a InPort's ConnectorListener . | |
bool | m_directMode |
std::string | m_marshaling_type |
ByteDataStreamBase * | m_cdr |
OutPortPushConnector class.
Connector class of OutPort for push type dataflow. When "push" is specified as dataflow_type at the time of establishing connection, this object is generated and owned by the OutPort. This connector and InPortPushConnector make a pair and realize push type dataflow of data ports. One connector corresponds to one connection which provides a data stream. Connector is distinguished by ID of the UUID that is generated at establishing connection.
OutPortPushConnector owns and manages the following objects.
Data written into the OutPort is passed to OutPortPushConnector::write(), and the connector writes into the publisher. The publisher gets data from the buffer based on the policy and it is transferred to InPort by pushing it into the InPortConsumer.
RTC::OutPortPushConnector::OutPortPushConnector | ( | ConnectorInfo | info, |
InPortConsumer * | consumer, | ||
ConnectorListenersBase * | listeners, | ||
CdrBufferBase * | buffer = nullptr |
||
) |
Constructor.
|
override |
Destructor.
This operation calls disconnect(), which destructs and deletes the consumer, the publisher and the buffer.
|
overridevirtual |
|
protectedvirtual |
create buffer
|
protectedvirtual |
create buffer
|
overridevirtual |
|
overridevirtual |
disconnect
This operation destruct and delete the consumer, the publisher and the buffer.
Implements RTC::OutPortConnector.
|
overridevirtual |
Getting Buffer.
Implements RTC::OutPortConnector.
|
protected |
Invoke callback when connection is established .
|
protected |
Invoke callback when connection is destroied .
|
overridevirtual |
Reimplemented from RTC::OutPortConnector.
|
overridevirtual |
Writing data.
This operation writes data into publisher and then the data will be transferred to correspondent InPort. If data is written properly, this function will return PORT_OK return code. Except normal return, CONNECTION_LOST, BUFFER_FULL, BUFFER_ERROR, PORT_ERROR, BUFFER_TIMEOUT and PRECONDITION_NO_MET will be returned as error codes.
Implements RTC::OutPortConnector.