OpenRTM-aist 2.1.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
RTC::PublisherFlush Class Reference

PublisherFlush class. More...

#include <PublisherFlush.h>

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

Public Member Functions

 PublisherFlush ()
 Constructor.
 
 ~PublisherFlush () override
 Destructor.
 
DataPortStatus init (coil::Properties &prop) override
 initialization
 
DataPortStatus setConsumer (InPortConsumer *consumer) override
 Store InPort consumer.
 
DataPortStatus setBuffer (CdrBufferBase *buffer) override
 Setting buffer pointer.
 
::RTC::DataPortStatus setListener (ConnectorInfo &info, RTC::ConnectorListenersBase *listeners) override
 Set the listener.
 
DataPortStatus write (ByteDataStreamBase *data, std::chrono::nanoseconds timeout=std::chrono::nanoseconds(-1)) override
 Write data.
 
bool isActive () override
 If publisher is active state.
 
DataPortStatus activate () override
 activation
 
DataPortStatus deactivate () override
 deactivation
 
- Public Member Functions inherited from RTC::PublisherBase
virtual ~PublisherBase ()=default
 Destructor.
 
virtual DataPortStatus setBuffer (BufferBase< ByteData > *buffer)=0
 Setting buffer pointer.
 
virtual void release ()
 Release the Publisher.
 

Protected Member Functions

void onSend (ByteData &data)
 Notify an ON_SEND event to listners.
 
void onReceived (ByteData &data)
 Notify an ON_RECEIVED event to listeners.
 
void onReceiverFull (ByteData &data)
 Notify an ON_RECEIVER_FULL event to listeners.
 
void onReceiverTimeout (ByteData &data)
 Notify an ON_RECEIVER_TIMEOUT event to listeners.
 
void onReceiverError (ByteData &data)
 Notify an ON_RECEIVER_ERROR event to listeners.
 

Detailed Description

PublisherFlush class.

This is a Publisher class of Flush type. This class sends unsend data that has been stored in the buffer. This executes Consumer that waits for the data send timing in the same thread as its send side.

Constructor & Destructor Documentation

◆ PublisherFlush()

RTC::PublisherFlush::PublisherFlush ( )

Constructor.

◆ ~PublisherFlush()

RTC::PublisherFlush::~PublisherFlush ( )
override

Destructor.

Member Function Documentation

◆ activate()

DataPortStatus RTC::PublisherFlush::activate ( )
overridevirtual

activation

Implements RTC::PublisherBase.

◆ deactivate()

DataPortStatus RTC::PublisherFlush::deactivate ( )
overridevirtual

deactivation

Implements RTC::PublisherBase.

◆ init()

DataPortStatus RTC::PublisherFlush::init ( coil::Properties &  prop)
overridevirtual

initialization

Implements RTC::PublisherBase.

◆ isActive()

bool RTC::PublisherFlush::isActive ( )
overridevirtual

If publisher is active state.

A Publisher can be activated/deactivated synchronized with the data port. The active state and the non-active state are made transition by the "activate()" and the "deactivate()" functions respectively. This function confirms if the publisher is in active state.

Returns
Result of state confirmation (Active state:true, Inactive state:false)

Implements RTC::PublisherBase.

◆ onReceived()

void RTC::PublisherFlush::onReceived ( ByteData data)
inlineprotected

Notify an ON_RECEIVED event to listeners.

References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVED.

◆ onReceiverError()

void RTC::PublisherFlush::onReceiverError ( ByteData data)
inlineprotected

Notify an ON_RECEIVER_ERROR event to listeners.

References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_ERROR.

◆ onReceiverFull()

void RTC::PublisherFlush::onReceiverFull ( ByteData data)
inlineprotected

Notify an ON_RECEIVER_FULL event to listeners.

References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_FULL.

◆ onReceiverTimeout()

void RTC::PublisherFlush::onReceiverTimeout ( ByteData data)
inlineprotected

Notify an ON_RECEIVER_TIMEOUT event to listeners.

References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_TIMEOUT.

◆ onSend()

void RTC::PublisherFlush::onSend ( ByteData data)
inlineprotected

Notify an ON_SEND event to listners.

References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_SEND.

◆ setBuffer()

DataPortStatus RTC::PublisherFlush::setBuffer ( CdrBufferBase buffer)
override

Setting buffer pointer.

◆ setConsumer()

DataPortStatus RTC::PublisherFlush::setConsumer ( InPortConsumer consumer)
overridevirtual

Store InPort consumer.

Implements RTC::PublisherBase.

◆ setListener()

::RTC::DataPortStatus RTC::PublisherFlush::setListener ( ConnectorInfo info,
RTC::ConnectorListenersBase listeners 
)
overridevirtual

Set the listener.

Implements RTC::PublisherBase.

◆ write()

DataPortStatus RTC::PublisherFlush::write ( ByteDataStreamBase data,
std::chrono::nanoseconds  timeout = std::chrono::nanoseconds(-1) 
)
overridevirtual

Write data.

Implements RTC::PublisherBase.


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