#include <PublisherNew.h>
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) |
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.
typedef coil::Mutex RTC::PublisherNew::Mutex |
typedef coil::Condition<Mutex> RTC::PublisherNew::Condition |
typedef coil::Guard<coil::Mutex> RTC::PublisherNew::Guard |
enum RTC::PublisherNew::Policy [protected] |
Task start function.
ACE_Task::open() override function. Create newly thread for this Publisher.
args | Thread creation arguments (Unused in this Publisher) |
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.
DATAPORTSTATUS_ENUM RTC::PublisherNew::PublisherNew | ( | ) |
Constructor.
Constructor Create new thread for this Publisher.
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
virtual ReturnCode RTC::PublisherNew::init | ( | coil::Properties & | prop | ) | [virtual] |
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.
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] |