OpenRTM-aist-Python 1.2.1
|
PublisherFlush class. More...
Public Member Functions | |
def | __init__ (self) |
Constructor. | |
def | __del__ (self) |
Destructor. | |
def | init (self, prop) |
initialization More... | |
def | setConsumer (self, consumer) |
Store InPort consumer. More... | |
def | setBuffer (self, buffer) |
Setting buffer pointer. More... | |
def | setListener (self, info, listeners) |
Set the listener. More... | |
def | write (self, data, sec, usec) |
Write data. More... | |
def | isActive (self) |
If publisher is active state. More... | |
def | activate (self) |
activation More... | |
def | deactivate (self) |
deactivation More... | |
def | onSend (self, data) |
Notify an ON_SEND event to listners. More... | |
def | onReceived (self, data) |
Notify an ON_RECEIVED event to listeners. More... | |
def | onReceiverFull (self, data) |
Notify an ON_RECEIVER_FULL event to listeners. More... | |
def | onReceiverTimeout (self, data) |
Notify an ON_RECEIVER_TIMEOUT event to listeners. More... | |
def | onReceiverError (self, data) |
Notify an ON_RECEIVER_ERROR event to listeners. More... | |
Public Member Functions inherited from OpenRTM_aist.PublisherBase.PublisherBase | |
def | init (self, prop) |
Initializing configuration. More... | |
def | setConsumer (self, consumer) |
virtual ReturnCode setConsumer(InPortConsumer* consumer) = 0; | |
def | setBuffer (self, buffer) |
virtual ReturnCode setBuffer(BufferBase<cdrMemoryStream>* buffer) = 0; | |
def | isActive (self) |
virtual bool isActive() = 0; | |
def | activate (self) |
virtual ReturnCode activate() = 0; | |
def | deactivate (self) |
virtual ReturnCode deactivate() = 0; | |
def | release (self) |
Release the Publisher. More... | |
Public Member Functions inherited from OpenRTM_aist.DataPortStatus.DataPortStatus | |
def | toString (status) |
Convert DataPortStatus into the string. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from OpenRTM_aist.DataPortStatus.DataPortStatus | |
int | PORT_OK = 0 |
DataPortStatus return codes. More... | |
PublisherFlush class.
def OpenRTM_aist.PublisherFlush.PublisherFlush.activate | ( | self | ) |
activation
This function activates the publisher. By calling this function, this publisher starts the thread that pushes data to InPort. If precondition such as initialization process and so on is not met, the error code PRECONDITION_NOT_MET is returned.
PublisherBase::ReturnCode PublisherFlush::activate()
def OpenRTM_aist.PublisherFlush.PublisherFlush.deactivate | ( | self | ) |
deactivation
This function deactivates the publisher. By calling this function, this publisher stops the thread that pushes data to InPort. If precondition such as initialization process and so on is not met, the error code PRECONDITION_NOT_MET is returned.
PublisherBase::ReturnCode PublisherFlush::deactivate()
def OpenRTM_aist.PublisherFlush.PublisherFlush.init | ( | self, | |
prop | |||
) |
initialization
This function have to be called before using this class object. However, this PublisherFlush class has no parameters to be initialized.
property | Property objects that includes the control information of this Publisher |
virtual ReturnCode init(coil::Properties& prop);
def OpenRTM_aist.PublisherFlush.PublisherFlush.isActive | ( | self | ) |
If publisher is active state.
A Publisher can be activated/deactivated synchronized with the data port. The active state and the non-active state are made transition by the "activate()" and the "deactivate()" functions respectively. This function confirms if the publisher is in active state.
def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceived | ( | self, | |
data | |||
) |
Notify an ON_RECEIVED event to listeners.
data | cdrMemoryStream |
inline void onReceived(const cdrMemoryStream& data)
def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverError | ( | self, | |
data | |||
) |
Notify an ON_RECEIVER_ERROR event to listeners.
data | cdrMemoryStream |
inline void onReceiverError(const cdrMemoryStream& data)
def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverFull | ( | self, | |
data | |||
) |
Notify an ON_RECEIVER_FULL event to listeners.
data | cdrMemoryStream |
inline void onReceiverFull(const cdrMemoryStream& data)
def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverTimeout | ( | self, | |
data | |||
) |
Notify an ON_RECEIVER_TIMEOUT event to listeners.
data | cdrMemoryStream |
inline void onReceiverTimeout(const cdrMemoryStream& data)
def OpenRTM_aist.PublisherFlush.PublisherFlush.onSend | ( | self, | |
data | |||
) |
Notify an ON_SEND event to listners.
data | cdrMemoryStream |
inline void onSend(const cdrMemoryStream& data)
def OpenRTM_aist.PublisherFlush.PublisherFlush.setBuffer | ( | self, | |
buffer | |||
) |
Setting buffer pointer.
Since PublisherFlush does not use any buffers, This function always returns PORT_OK.
buffer | CDR buffer |
PublisherBase::ReturnCode PublisherFlush::setBuffer(CdrBufferBase* buffer)
def OpenRTM_aist.PublisherFlush.PublisherFlush.setConsumer | ( | self, | |
consumer | |||
) |
Store InPort consumer.
This operation sets a consumer that is associated with this object. If the consumer object is NULL, INVALID_ARGS will be returned.
consumer | A pointer to a consumer object. |
PublisherFlush::setConsumer(InPortConsumer* consumer)
def OpenRTM_aist.PublisherFlush.PublisherFlush.setListener | ( | self, | |
info, | |||
listeners | |||
) |
Set the listener.
This function sets ConnectorListeners listener object to the Publisher. By setting ConnectorListeners containing various listeners objects, these listeners are called at the time of reading and writing of a buffer, and transmission of data etc. Since the ownership of the ConnectorListeners object is owned by Port or RTObject, the Publisher never deletes the ConnectorListeners object. If the given ConnectorListeners' pointer is NULL, this function returns INVALID_ARGS.
info | ConnectorInfo that is localized object of ConnectorProfile |
listeners | ConnectorListeners that holds various listeners |
virtual ::RTC::DataPortStatus::Enum setListener(ConnectorInfo& info, RTC::ConnectorListeners* listeners);
def OpenRTM_aist.PublisherFlush.PublisherFlush.write | ( | self, | |
data, | |||
sec, | |||
usec | |||
) |
Write data.
This function writes data into the consumer associated with this Publisher. If this function is called without initializing correctly such as a consumer, listeners, etc., error code PRECONDITION_NOT_MET will be returned and no operation of the writing to the consumer etc. will be performed.
When publisher writes data to the buffer, if the consumer returns full-status, returns error, is returned with timeout, error codes BUFFER_FULL, BUFFER_ERROR and BUFFER_TIMEOUT will be returned respectively.
In other cases, PROT_ERROR will be returned.
data | Data to be wrote to the buffer |
sec | Timeout time in unit seconds |
nsec | Timeout time in unit nano-seconds |
PublisherBase::ReturnCode PublisherFlush::write(const cdrMemoryStream& data, unsigned long sec, unsigned long usec)