#include <PublisherFlush.h>
Public Types | |
typedef coil::Mutex | Mutex |
typedef coil::Condition< Mutex > | Condition |
typedef coil::Guard< coil::Mutex > | Guard |
Public Member Functions | |
DATAPORTSTATUS_ENUM | PublisherFlush () |
Constructor. | |
virtual | ~PublisherFlush (void) |
Destructor. | |
virtual ReturnCode | init (coil::Properties &prop) |
initialization | |
virtual ReturnCode | setConsumer (InPortConsumer *consumer) |
Store InPort consumer. | |
virtual ReturnCode | setBuffer (CdrBufferBase *buffer) |
Setting buffer pointer. | |
virtual ::RTC::DataPortStatus::Enum | setListener (ConnectorInfo &profile, RTC::ConnectorListeners *listeners) |
Set the listener. | |
virtual ReturnCode | write (const cdrMemoryStream &data, unsigned long sec, unsigned long usec) |
Write data. | |
virtual bool | isActive () |
Confirm to activate. | |
virtual ReturnCode | activate () |
activation | |
virtual ReturnCode | deactivate () |
deactivation | |
Protected Member Functions | |
void | onSend (const cdrMemoryStream &data) |
Connector data listener functions. | |
void | onReceived (const cdrMemoryStream &data) |
This method is notified to listeners of ON_RECEIVED. | |
void | onReceiverFull (const cdrMemoryStream &data) |
This method is notified to listeners of ON_RECEIVER_FULL. | |
void | onReceiverTimeout (const cdrMemoryStream &data) |
This method is notified to listeners of ON_RECEIVER_TIMEOUT. | |
void | onReceiverError (const cdrMemoryStream &data) |
This method is notified to listeners of ON_RECEIVER_ERROR. |
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.
DATAPORTSTATUS_ENUM RTC::PublisherFlush::PublisherFlush | ( | ) |
Constructor.
Consrtuctor.
consumer | Consumer to wait for the data sending | |
property | Property object that have been set the control information of this Publisher |
virtual RTC::PublisherFlush::~PublisherFlush | ( | void | ) | [virtual] |
Destructor.
Destructor This is invoked by PublisherFactory when this Publisher is destoroyed.
virtual ReturnCode RTC::PublisherFlush::init | ( | coil::Properties & | prop | ) | [virtual] |
virtual ReturnCode RTC::PublisherFlush::setConsumer | ( | InPortConsumer * | consumer | ) | [virtual] |
virtual ReturnCode RTC::PublisherFlush::setBuffer | ( | CdrBufferBase * | buffer | ) | [virtual] |
Setting buffer pointer.
This method returns PORT_ERROR because PublisherFlush doesn't use the buffer.
buffer | CDR buffer |
virtual ::RTC::DataPortStatus::Enum RTC::PublisherFlush::setListener | ( | ConnectorInfo & | profile, | |
RTC::ConnectorListeners * | listeners | |||
) | [virtual] |
Set the listener.
info | ConnectorInfo | |
listeners | ConnectorListeners |
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherFlush::write | ( | const cdrMemoryStream & | data, | |
unsigned long | sec, | |||
unsigned long | usec | |||
) | [virtual] |
Write data.
data | Data | |
sec | Timeout period | |
nsec | Timeout period |
Implements RTC::PublisherBase.
virtual bool RTC::PublisherFlush::isActive | ( | ) | [virtual] |
Confirm to activate.
Confirm that has been activated.
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherFlush::activate | ( | ) | [virtual] |
virtual ReturnCode RTC::PublisherFlush::deactivate | ( | ) | [virtual] |
void RTC::PublisherFlush::onSend | ( | const cdrMemoryStream & | data | ) | [inline, protected] |
Connector data listener functions.
This method is notified to listeners of ON_SEND.
data | cdrMemoryStream |
References RTC::ON_SEND.
void RTC::PublisherFlush::onReceived | ( | const cdrMemoryStream & | data | ) | [inline, protected] |
This method is notified to listeners of ON_RECEIVED.
data | cdrMemoryStream |
References RTC::ON_RECEIVED.
void RTC::PublisherFlush::onReceiverFull | ( | const cdrMemoryStream & | data | ) | [inline, protected] |
This method is notified to listeners of ON_RECEIVER_FULL.
data | cdrMemoryStream |
References RTC::ON_RECEIVER_FULL.
void RTC::PublisherFlush::onReceiverTimeout | ( | const cdrMemoryStream & | data | ) | [inline, protected] |
This method is notified to listeners of ON_RECEIVER_TIMEOUT.
data | cdrMemoryStream |
References RTC::ON_RECEIVER_TIMEOUT.
void RTC::PublisherFlush::onReceiverError | ( | const cdrMemoryStream & | data | ) | [inline, protected] |
This method is notified to listeners of ON_RECEIVER_ERROR.
data | cdrMemoryStream |
References RTC::ON_RECEIVER_ERROR.