#include <PublisherPeriodic.h>
Public Types | |
typedef coil::Mutex | Mutex |
typedef coil::Condition < Mutex > | Condition |
typedef coil::Guard < coil::Mutex > | Guard |
Public Member Functions | |
DATAPORTSTATUS_ENUM | PublisherPeriodic () |
Constructor. | |
virtual | ~PublisherPeriodic (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 } |
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) |
Publisher that invokes the consumer's sending process periodically. This is used when the data sending is regularly executed.
typedef coil::Mutex RTC::PublisherPeriodic::Mutex |
typedef coil::Condition<Mutex> RTC::PublisherPeriodic::Condition |
typedef coil::Guard<coil::Mutex> RTC::PublisherPeriodic::Guard |
enum RTC::PublisherPeriodic::Policy [protected] |
DATAPORTSTATUS_ENUM RTC::PublisherPeriodic::PublisherPeriodic | ( | ) |
Constructor.
Constructor. The intervals of invoking send processing needs to be set in dataport.push_rate of Property object. The interval is specified by floating point string in Hz. For example, "1000.0" is set for 1000.0Hz. If the above property is unset, "1000Hz" will be set.
consumer | Consumer which waits for data sending | |
property | Property objects that are set the control information of this Publisher |
virtual RTC::PublisherPeriodic::~PublisherPeriodic | ( | void | ) | [virtual] |
Destructor.
Destructor
virtual ReturnCode RTC::PublisherPeriodic::init | ( | coil::Properties & | prop | ) | [virtual] |
virtual ReturnCode RTC::PublisherPeriodic::setConsumer | ( | InPortConsumer * | consumer | ) | [virtual] |
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherPeriodic::setBuffer | ( | CdrBufferBase * | buffer | ) | [virtual] |
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherPeriodic::write | ( | const cdrMemoryStream & | data, | |
unsigned long | sec, | |||
unsigned long | usec | |||
) | [virtual] |
Implements RTC::PublisherBase.
virtual bool RTC::PublisherPeriodic::isActive | ( | ) | [virtual] |
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherPeriodic::activate | ( | ) | [virtual] |
Implements RTC::PublisherBase.
virtual ReturnCode RTC::PublisherPeriodic::deactivate | ( | ) | [virtual] |
Implements RTC::PublisherBase.
virtual int RTC::PublisherPeriodic::svc | ( | void | ) | [virtual] |
Thread execution function.
ACE_Task::svc() override function.
ReturnCode RTC::PublisherPeriodic::pushAll | ( | ) | [protected] |
push "all" policy
ReturnCode RTC::PublisherPeriodic::pushFifo | ( | ) | [protected] |
push "fifo" policy
ReturnCode RTC::PublisherPeriodic::pushSkip | ( | ) | [protected] |
push "skip" policy
ReturnCode RTC::PublisherPeriodic::pushNew | ( | ) | [protected] |
push "new" policy
ReturnCode RTC::PublisherPeriodic::convertReturn | ( | BufferStatus::Enum | status | ) | [protected] |