21 from omniORB
import any
128 def __init__(self, info, consumer, listeners, buffer = 0):
129 OpenRTM_aist.OutPortConnector.__init__(self, info)
147 if self.
_profile.properties.hasKey(
"serializer"):
148 endian = self.
_profile.properties.getProperty(
"serializer.cdr.endian")
150 self.
_rtcout.RTC_ERROR(
"write(): endian is not set.")
153 endian = OpenRTM_aist.split(endian,
",")
154 endian = OpenRTM_aist.normalize(endian)
155 if endian ==
"little":
157 elif endian ==
"big":
165 self.
_buffer.init(info.properties.getNode(
"buffer"))
235 self.
_rtcout.RTC_TRACE(
"write()")
240 cdr_data = cdrMarshal(any.to_any(data).typecode(), data, self.
_endian)
242 self.
_rtcout.RTC_ERROR(
"write(): endian %s is not support.",self.
_endian)
265 self.
_rtcout.RTC_TRACE(
"disconnect()")
269 self.
_rtcout.RTC_DEBUG(
"delete publisher")
270 pfactory = OpenRTM_aist.PublisherFactory.instance()
277 self.
_rtcout.RTC_DEBUG(
"delete consumer")
278 cfactory = OpenRTM_aist.InPortConsumerFactory.instance()
285 self.
_rtcout.RTC_DEBUG(
"delete buffer")
286 bfactory = OpenRTM_aist.CdrBufferFactory.instance()
287 bfactory.deleteObject(self.
_buffer)
290 self.
_rtcout.RTC_TRACE(
"disconnect() done")
374 pub_type = info.properties.getProperty(
"subscription_type",
"flush")
375 pub_type = OpenRTM_aist.normalize([pub_type])
376 return OpenRTM_aist.PublisherFactory.instance().createObject(pub_type)
400 buf_type = info.properties.getProperty(
"buffer_type",
403 return OpenRTM_aist.CdrBufferFactory.instance().createObject(buf_type)
415 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_CONNECT].notify(self.
_profile)
427 self.
_listeners.connector_[OpenRTM_aist.ConnectorListenerType.ON_DISCONNECT].notify(self.
_profile)
def write(self, data)
Writing data.
def getBuffer(self)
Getting Buffer.
def onConnect(self)
Invoke callback when connection is established void onConnect()
I£îPortConnector base class.
def createBuffer(self, info)
create buffer
OutPortPushConnector class.
def onDisconnect(self)
Invoke callback when connection is destroied void onDisconnect()
def activate(self)
Connector activation.
def __init__(self, info, consumer, listeners, buffer=0)
Constructor.
def deactivate(self)
Connector deactivation.
int PORT_OK
DataPortStatus return codes.
def __del__(self)
Destructor.
def createPublisher(self, info)
create buffer
def disconnect(self)
disconnect