RTC::PublisherNew Class Reference

PublisherNew class. More...

#include <PublisherNew.h>

Inheritance diagram for RTC::PublisherNew:

RTC::PublisherBase RTC::DataPortStatus

List of all members.

Public Types

typedef coil::Mutex Mutex
typedef
coil::Condition
< Mutex
Condition
typedef coil::Guard
< coil::Mutex > 
Guard

Public Member Functions

DATAPORTSTATUS_ENUM PublisherNew ()
 Constructor.
virtual ~PublisherNew (void)
 Destructor.
virtual ReturnCode init (coil::Properties &prop)
 initialization
virtual ReturnCode setConsumer (InPortConsumer *consumer)
virtual ReturnCode setBuffer (CdrBufferBase *buffer)
virtual ReturnCode write (const cdrMemoryStream &data, unsigned long sec, unsigned long usec)
virtual bool isActive ()
virtual ReturnCode activate ()
virtual ReturnCode deactivate ()
virtual int svc (void)
 Thread execution function.

Protected Types

enum  Policy { ALL, FIFO, SKIP, NEW }
 Task start function. More...

Protected Member Functions

ReturnCode pushAll ()
 push "all" policy
ReturnCode pushFifo ()
 push "fifo" policy
ReturnCode pushSkip ()
 push "skip" policy
ReturnCode pushNew ()
 push "new" policy
ReturnCode convertReturn (BufferStatus::Enum status)


Detailed Description

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.


Member Typedef Documentation

typedef coil::Mutex RTC::PublisherNew::Mutex

typedef coil::Condition<Mutex> RTC::PublisherNew::Condition

typedef coil::Guard<coil::Mutex> RTC::PublisherNew::Guard


Member Enumeration Documentation

enum RTC::PublisherNew::Policy [protected]

Task start function.

ACE_Task::open() override function. Create newly thread for this Publisher.

Parameters:
args Thread creation arguments (Unused in this Publisher)
Returns:
Execution result
Task terminate function

ACE_Task::release() override function. Set 2driven flag to false, and terminate this Publisher's operation. However, if the driven thread is blocked, Consumer's send processing may be invoked maximum once.

Enumerator:
ALL 
FIFO 
SKIP 
NEW 


Constructor & Destructor Documentation

DATAPORTSTATUS_ENUM RTC::PublisherNew::PublisherNew (  ) 

Constructor.

Constructor Create new thread for this Publisher.

Parameters:
consumer Consumer that waits for the data sending
property Property object that is configured this Publisher's control information.(Unused in this Publisher)

virtual RTC::PublisherNew::~PublisherNew ( void   )  [virtual]

Destructor.

Destructor


Member Function Documentation

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

initialization

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

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

Implements RTC::PublisherBase.

virtual int RTC::PublisherNew::svc ( void   )  [virtual]

Thread execution function.

ACE_Task::svc() override function. Make thread stand by until data in the buffer is updated.

Returns:
Execution result

ReturnCode RTC::PublisherNew::pushAll (  )  [protected]

push "all" policy

ReturnCode RTC::PublisherNew::pushFifo (  )  [protected]

push "fifo" policy

ReturnCode RTC::PublisherNew::pushSkip (  )  [protected]

push "skip" policy

ReturnCode RTC::PublisherNew::pushNew (  )  [protected]

push "new" policy

ReturnCode RTC::PublisherNew::convertReturn ( BufferStatus::Enum  status  )  [protected]


Generated on Sun May 24 14:08:46 2009 for OpenRTM by  doxygen 1.5.3