OpenRTM-aist 2.1.0
|
PublisherNew class. More...
#include <PublisherNew.h>
Public Member Functions | |
PublisherNew () | |
Constructor. | |
~PublisherNew () 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. | |
DataPortStatus | setListener (ConnectorInfo &info, ConnectorListenersBase *listeners) override |
Set the listener. | |
DataPortStatus | write (ByteDataStreamBase *data, std::chrono::nanoseconds timeout) override |
Write data. | |
bool | isActive () override |
If publisher is active state. | |
DataPortStatus | activate () override |
activation | |
DataPortStatus | deactivate () override |
deactivation | |
virtual int | svc () |
Thread execution function. | |
![]() | |
virtual | ~PublisherBase ()=default |
Destructor. | |
virtual DataPortStatus | setBuffer (BufferBase< ByteData > *buffer)=0 |
Setting buffer pointer. | |
virtual void | release () |
Release the Publisher. | |
Protected Types | |
enum | Policy { PUBLISHER_POLICY_ALL , PUBLISHER_POLICY_FIFO , PUBLISHER_POLICY_SKIP , PUBLISHER_POLICY_NEW } |
Protected Member Functions | |
void | setPushPolicy (const coil::Properties &prop) |
Setting PushPolicy . | |
bool | createTask (const coil::Properties &prop) |
Setting Task . | |
DataPortStatus | pushAll () |
push "all" policy | |
DataPortStatus | pushFifo () |
push "fifo" policy | |
DataPortStatus | pushSkip () |
push "skip" policy | |
DataPortStatus | pushNew () |
push "new" policy | |
DataPortStatus | convertReturn (BufferStatus status, ByteData &data) |
Convertion from BufferStatus to DataPortStatus. | |
DataPortStatus | invokeListener (DataPortStatus status, ByteData &data) |
Call listeners according to the DataPortStatus. | |
void | onBufferWrite (ByteData &data) |
Notify an ON_BUFFER_WRITE event to listeners. | |
void | onBufferFull (ByteData &data) |
Notify an ON_BUFFER_FULL event to listeners. | |
void | onBufferWriteTimeout (ByteData &data) |
Notify an ON_BUFFER_WRITE_TIMEOUT event to listeners. | |
void | onBufferWriteOverwrite (ByteData &data) |
Notify an ON_BUFFER_OVERWRITE event to listeners. | |
void | onBufferRead (ByteData &data) |
Notify an ON_BUFFER_READ event to listeners. | |
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. | |
void | onSenderError () |
Notify an ON_SENDER_ERROR event to listeners. | |
PublisherNew class.
Send new data at timing of when it is stored into the buffer. This class is used when operating Consumer that waits for the data send timing in different thread from one of the send side. Publisher's driven is blocked until the data send timing reaches, if the send timing notification is received, the Consumer's send processing will be invoked immediately.
|
protected |
RTC::PublisherNew::PublisherNew | ( | ) |
Constructor.
|
override |
Destructor.
|
overridevirtual |
activation
Implements RTC::PublisherBase.
|
protected |
Convertion from BufferStatus to DataPortStatus.
|
protected |
Setting Task .
|
overridevirtual |
deactivation
Implements RTC::PublisherBase.
|
overridevirtual |
Initialization.
Implements RTC::PublisherBase.
|
protected |
Call listeners according to the DataPortStatus.
|
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.
Implements RTC::PublisherBase.
|
inlineprotected |
Notify an ON_BUFFER_FULL event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_BUFFER_FULL.
|
inlineprotected |
Notify an ON_BUFFER_READ event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_BUFFER_READ.
|
inlineprotected |
Notify an ON_BUFFER_WRITE event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_BUFFER_WRITE.
|
inlineprotected |
Notify an ON_BUFFER_OVERWRITE event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_BUFFER_OVERWRITE.
|
inlineprotected |
Notify an ON_BUFFER_WRITE_TIMEOUT event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_BUFFER_WRITE_TIMEOUT.
|
inlineprotected |
Notify an ON_RECEIVED event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVED.
|
inlineprotected |
Notify an ON_RECEIVER_ERROR event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_ERROR.
|
inlineprotected |
Notify an ON_RECEIVER_FULL event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_FULL.
|
inlineprotected |
Notify an ON_RECEIVER_TIMEOUT event to listeners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_RECEIVER_TIMEOUT.
|
inlineprotected |
Notify an ON_SEND event to listners.
References RTC::ConnectorListenersBase::notifyOut(), and RTC::ON_SEND.
|
inlineprotected |
Notify an ON_SENDER_ERROR event to listeners.
References RTC::ConnectorListenersBase::notify(), and RTC::ON_SENDER_ERROR.
|
protected |
push "all" policy
|
protected |
push "fifo" policy
|
protected |
push "new" policy
|
protected |
push "skip" policy
|
override |
Setting buffer pointer.
|
overridevirtual |
Store InPort consumer.
Implements RTC::PublisherBase.
|
overridevirtual |
Set the listener.
Implements RTC::PublisherBase.
|
protected |
Setting PushPolicy .
|
virtual |
Thread execution function.
|
overridevirtual |
Write data.
Implements RTC::PublisherBase.