RTC::PublisherFlush Class Reference

PublisherFlush class. More...

#include <PublisherFlush.h>

Inheritance diagram for RTC::PublisherFlush:

RTC::PublisherBase RTC::DataPortStatus

List of all members.

Public Types

typedef coil::Mutex Mutex
typedef coil::Condition< MutexCondition
typedef coil::Guard< coil::MutexGuard

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.


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.


Member Typedef Documentation


Constructor & Destructor Documentation

DATAPORTSTATUS_ENUM RTC::PublisherFlush::PublisherFlush (  ) 

Constructor.

Consrtuctor.

Parameters:
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.


Member Function Documentation

virtual ReturnCode RTC::PublisherFlush::init ( coil::Properties prop  )  [virtual]

initialization

Implements RTC::PublisherBase.

virtual ReturnCode RTC::PublisherFlush::setConsumer ( InPortConsumer consumer  )  [virtual]

Store InPort consumer.

Implements RTC::PublisherBase.

virtual ReturnCode RTC::PublisherFlush::setBuffer ( CdrBufferBase buffer  )  [virtual]

Setting buffer pointer.

This method returns PORT_ERROR because PublisherFlush doesn't use the buffer.

Parameters:
buffer CDR buffer
Returns:
PORT_ERROR

virtual ::RTC::DataPortStatus::Enum RTC::PublisherFlush::setListener ( ConnectorInfo profile,
RTC::ConnectorListeners listeners 
) [virtual]

Set the listener.

Parameters:
info ConnectorInfo
listeners ConnectorListeners
Returns:
PORT_OK Normal return INVALID_ARGS Invalid arguments

Implements RTC::PublisherBase.

virtual ReturnCode RTC::PublisherFlush::write ( const cdrMemoryStream &  data,
unsigned long  sec,
unsigned long  usec 
) [virtual]

Write data.

Parameters:
data Data
sec Timeout period
nsec Timeout period
Returns:
Return code

Implements RTC::PublisherBase.

virtual bool RTC::PublisherFlush::isActive (  )  [virtual]

Confirm to activate.

Confirm that has been activated.

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

Implements RTC::PublisherBase.

virtual ReturnCode RTC::PublisherFlush::activate (  )  [virtual]

activation

Returns:
Return code

Implements RTC::PublisherBase.

virtual ReturnCode RTC::PublisherFlush::deactivate (  )  [virtual]

deactivation

Returns:
Return code

Implements RTC::PublisherBase.

void RTC::PublisherFlush::onSend ( const cdrMemoryStream &  data  )  [inline, protected]

Connector data listener functions.

This method is notified to listeners of ON_SEND.

Parameters:
data cdrMemoryStream

References RTC::ON_SEND.

void RTC::PublisherFlush::onReceived ( const cdrMemoryStream &  data  )  [inline, protected]

This method is notified to listeners of ON_RECEIVED.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
data cdrMemoryStream

References RTC::ON_RECEIVER_ERROR.


Generated on Thu Jan 28 13:25:36 2010 for OpenRTM by  doxygen 1.5.5