Public Member Functions | Private Attributes | List of all members
OpenRTM_aist.PublisherFlush.PublisherFlush Class Reference

PublisherFlush class. More...

Inheritance diagram for OpenRTM_aist.PublisherFlush.PublisherFlush:
Inheritance graph
[legend]

Public Member Functions

def __del__ (self)
 Destructor. More...
 
def __init__ (self)
 Constructor. More...
 
def activate (self)
 activation More...
 
def deactivate (self)
 deactivation More...
 
def init (self, prop)
 initialization More...
 
def isActive (self)
 If publisher is active state. More...
 
def onReceived (self, data)
 Notify an ON_RECEIVED event to listeners. More...
 
def onReceiverError (self, data)
 Notify an ON_RECEIVER_ERROR 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 onSend (self, data)
 Notify an ON_SEND event to listners. More...
 
def setBuffer (self, buffer)
 Setting buffer pointer. More...
 
def setConsumer (self, consumer)
 Store InPort consumer. More...
 
def setListener (self, info, listeners)
 Set the listener. More...
 
def write (self, data, sec, usec)
 Write data. More...
 
- Public Member Functions inherited from OpenRTM_aist.PublisherBase.PublisherBase
def activate (self)
 virtual ReturnCode activate() = 0; More...
 
def deactivate (self)
 virtual ReturnCode deactivate() = 0; More...
 
def init (self, prop)
 Initializing configuration. More...
 
def isActive (self)
 virtual bool isActive() = 0; More...
 
def release (self)
 Release the Publisher. More...
 
def setBuffer (self, buffer)
 virtual ReturnCode setBuffer(BufferBase<cdrMemoryStream>* buffer) = 0; More...
 
def setConsumer (self, consumer)
 virtual ReturnCode setConsumer(InPortConsumer* consumer) = 0; More...
 
def setListener (self, info, listeners)
 
def write (self, data, sec, usec)
 
- Public Member Functions inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
def __init__ (self)
 
def toString (status)
 Convert DataPortStatus into the string. More...
 

Private Attributes

 _active
 
 _consumer
 
 _listeners
 
 _profile
 
 _retcode
 
 _rtcout
 

Additional Inherited Members

- Static Public Attributes inherited from OpenRTM_aist.DataPortStatus.DataPortStatus
int BUFFER_EMPTY = 4
 
int BUFFER_ERROR = 2
 
int BUFFER_FULL = 3
 
int BUFFER_TIMEOUT = 5
 
int CONNECTION_LOST = 12
 
int INVALID_ARGS = 10
 
int PORT_ERROR = 1
 
int PORT_OK = 0
 DataPortStatus return codes. More...
 
int PRECONDITION_NOT_MET = 11
 
int RECV_EMPTY = 8
 
int RECV_TIMEOUT = 9
 
int SEND_FULL = 6
 
int SEND_TIMEOUT = 7
 
 toString = staticmethod(toString)
 
int UNKNOWN_ERROR = 13
 

Detailed Description

PublisherFlush class.

 

Definition at line 35 of file PublisherFlush.py.

Constructor & Destructor Documentation

◆ __init__()

def OpenRTM_aist.PublisherFlush.PublisherFlush.__init__ (   self)

Constructor.

Definition at line 54 of file PublisherFlush.py.

◆ __del__()

def OpenRTM_aist.PublisherFlush.PublisherFlush.__del__ (   self)

Destructor.

Definition at line 74 of file PublisherFlush.py.

Member Function Documentation

◆ activate()

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.

Returns
PORT_OK normal return PRECONDITION_NOT_MET precondition is not met

PublisherBase::ReturnCode PublisherFlush::activate()

Definition at line 373 of file PublisherFlush.py.

◆ deactivate()

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.

Returns
PORT_OK normal return PRECONDITION_NOT_MET precondition is not met

PublisherBase::ReturnCode PublisherFlush::deactivate()

Definition at line 407 of file PublisherFlush.py.

◆ init()

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.

Parameters
propertyProperty objects that includes the control information of this Publisher
Returns
ReturnCode PORT_OK normal return INVALID_ARGS Properties with invalid values.

virtual ReturnCode init(coil::Properties& prop);

Definition at line 105 of file PublisherFlush.py.

◆ isActive()

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.

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

bool PublisherFlush::isActive()

Definition at line 343 of file PublisherFlush.py.

◆ onReceived()

def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceived (   self,
  data 
)

Notify an ON_RECEIVED event to listeners.

Parameters
datacdrMemoryStream

inline void onReceived(const cdrMemoryStream& data)

Definition at line 440 of file PublisherFlush.py.

◆ onReceiverError()

def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverError (   self,
  data 
)

Notify an ON_RECEIVER_ERROR event to listeners.

Parameters
datacdrMemoryStream

inline void onReceiverError(const cdrMemoryStream& data)

Definition at line 485 of file PublisherFlush.py.

◆ onReceiverFull()

def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverFull (   self,
  data 
)

Notify an ON_RECEIVER_FULL event to listeners.

Parameters
datacdrMemoryStream

inline void onReceiverFull(const cdrMemoryStream& data)

Definition at line 455 of file PublisherFlush.py.

◆ onReceiverTimeout()

def OpenRTM_aist.PublisherFlush.PublisherFlush.onReceiverTimeout (   self,
  data 
)

Notify an ON_RECEIVER_TIMEOUT event to listeners.

Parameters
datacdrMemoryStream

inline void onReceiverTimeout(const cdrMemoryStream& data)

Definition at line 470 of file PublisherFlush.py.

◆ onSend()

def OpenRTM_aist.PublisherFlush.PublisherFlush.onSend (   self,
  data 
)

Notify an ON_SEND event to listners.

Parameters
datacdrMemoryStream

inline void onSend(const cdrMemoryStream& data)

Definition at line 425 of file PublisherFlush.py.

◆ setBuffer()

def OpenRTM_aist.PublisherFlush.PublisherFlush.setBuffer (   self,
  buffer 
)

Setting buffer pointer.

Since PublisherFlush does not use any buffers, This function always returns PORT_OK.

Parameters
bufferCDR buffer
Returns
PORT_OK

PublisherBase::ReturnCode PublisherFlush::setBuffer(CdrBufferBase* buffer)

Definition at line 164 of file PublisherFlush.py.

◆ setConsumer()

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.

Parameters
consumerA pointer to a consumer object.
Returns
ReturnCode PORT_OK normal return INVALID_ARGS given argument has invalid value

PublisherFlush::setConsumer(InPortConsumer* consumer)

Definition at line 133 of file PublisherFlush.py.

◆ setListener()

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.

Parameters
infoConnectorInfo that is localized object of ConnectorProfile
listenersConnectorListeners that holds various listeners
Returns
PORT_OK Normal return INVALID_ARGS Invalid arguments

virtual ::RTC::DataPortStatus::Enum setListener(ConnectorInfo& info, RTC::ConnectorListeners* listeners);

Definition at line 204 of file PublisherFlush.py.

◆ write()

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.

Parameters
dataData to be wrote to the buffer
secTimeout time in unit seconds
nsecTimeout time in unit nano-seconds
Returns
PORT_OK Normal return PRECONDITION_NO_MET Precondition does not met. A consumer, a buffer, listenes are not set properly. SEND_FULL Data was sent but full-status returned SEND_TIMEOUT Data was sent but timeout occurred CONNECTION_LOST detected that the connection has been lost

PublisherBase::ReturnCode PublisherFlush::write(const cdrMemoryStream& data, unsigned long sec, unsigned long usec)

Definition at line 277 of file PublisherFlush.py.

Member Data Documentation

◆ _active

OpenRTM_aist.PublisherFlush.PublisherFlush._active
private

Definition at line 57 of file PublisherFlush.py.

◆ _consumer

OpenRTM_aist.PublisherFlush.PublisherFlush._consumer
private

Definition at line 56 of file PublisherFlush.py.

◆ _listeners

OpenRTM_aist.PublisherFlush.PublisherFlush._listeners
private

Definition at line 59 of file PublisherFlush.py.

◆ _profile

OpenRTM_aist.PublisherFlush.PublisherFlush._profile
private

Definition at line 58 of file PublisherFlush.py.

◆ _retcode

OpenRTM_aist.PublisherFlush.PublisherFlush._retcode
private

Definition at line 60 of file PublisherFlush.py.

◆ _rtcout

OpenRTM_aist.PublisherFlush.PublisherFlush._rtcout
private

Definition at line 55 of file PublisherFlush.py.


The documentation for this class was generated from the following file:


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Mon Feb 28 2022 23:01:09