21 from omniORB
import any
24 import OpenRTM__POA,OpenRTM
69 OpenRTM_aist.OutPortProvider.__init__(self)
78 orb = OpenRTM_aist.Manager.instance().getORB()
81 orb.object_to_string(self.
_objref)))
105 oid = self._default_POA().servant_to_id(self)
106 self._default_POA().deactivate_object(oid)
138 def init(self, prop):
274 self.
_rtcout.RTC_PARANOID(
"OutPortCorbaCdrProvider.get()")
277 return (OpenRTM.UNKNOWN_ERROR,
None)
281 self.
_rtcout.RTC_ERROR(
"buffer is empty.")
282 return (OpenRTM.BUFFER_EMPTY,
None)
287 if ret == OpenRTM_aist.BufferStatus.BUFFER_OK:
289 self.
_rtcout.RTC_ERROR(
"buffer is empty.")
290 return (OpenRTM.BUFFER_EMPTY,
None)
293 self.
_rtcout.RTC_TRACE(OpenRTM_aist.Logger.print_exception())
294 return (OpenRTM.UNKNOWN_ERROR,
None)
310 self.
_listeners.connectorData_[OpenRTM_aist.ConnectorDataListenerType.ON_BUFFER_READ].notify(self.
_profile, data)
325 self.
_listeners.connectorData_[OpenRTM_aist.ConnectorDataListenerType.ON_SEND].notify(self.
_profile, data)
338 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_BUFFER_EMPTY].notify(self.
_profile)
351 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_BUFFER_READ_TIMEOUT].notify(self.
_profile)
364 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_SENDER_EMPTY].notify(self.
_profile)
377 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_SENDER_TIMEOUT].notify(self.
_profile)
390 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_SENDER_ERROR].notify(self.
_profile)
404 if status == OpenRTM_aist.BufferStatus.BUFFER_OK:
407 return (OpenRTM.PORT_OK, data)
409 elif status == OpenRTM_aist.BufferStatus.BUFFER_ERROR:
411 return (OpenRTM.PORT_ERROR, data)
413 elif status == OpenRTM_aist.BufferStatus.BUFFER_FULL:
415 return (OpenRTM.BUFFER_FULL, data)
417 elif status == OpenRTM_aist.BufferStatus.BUFFER_EMPTY:
420 return (OpenRTM.BUFFER_EMPTY, data)
422 elif status == OpenRTM_aist.BufferStatus.PRECONDITION_NOT_MET:
424 return (OpenRTM.PORT_ERROR, data)
426 elif status == OpenRTM_aist.BufferStatus.TIMEOUT:
429 return (OpenRTM.BUFFER_TIMEOUT, data)
432 return (OpenRTM.UNKNOWN_ERROR, data)
435 return (OpenRTM.UNKNOWN_ERROR, data)
439 factory = OpenRTM_aist.OutPortProviderFactory.instance()
440 factory.addFactory(
"corba_cdr",
443 def setBuffer(self, buffer)
Setting outside buffer's pointer.
def convertReturn(self, status, data)
Return codes conversion::OpenRTM::PortStatus convertReturn(BufferStatus::Enum status, const cdrMemoryStream& data);.
def setListener(self, info, listeners)
Set the listener.
def onBufferReadTimeout(self)
Notify an ON_BUFFER_READ_TIMEOUT event to listenersinline void onBufferReadTimeout() ...
def onSenderEmpty(self)
Notify an ON_SENDER_EMPTY event to listenersinline void onSenderEmpty()
def OutPortCorbaCdrProviderInit()
def onBufferEmpty(self)
Notify an ON_BUFFER_EMPTY event to listenersinline void onBufferEmpty()
def onSenderError(self)
Notify an ON_SENDER_ERROR event to listenersinline void onSenderError()
def onSend(self, data)
Notify an ON_SEND event to listeners.
def __init__(self)
Constructor.
def init(self, prop)
Initializing configuration.
def setConnector(self, connector)
set Connector
OutPortCorbaCdrProvider class.
def setInterfaceType(self, interface_type)
def __del__(self)
Destructor.
def onBufferRead(self, data)
Notify an ON_BUFFER_READ event to listeners.
def onSenderTimeout(self)
Notify an ON_SENDER_TIMEOUT event to listenersinline void onSenderTimeout()
def get(self)
[CORBA interface] Get data from the buffer
def newNV(name, value)
Create NameVale.