OutPortConnector.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: euc-jp -*-
3 
4 
5 
20 
21 import OpenRTM_aist
22 import RTC
23 
24 
45  """
46  """
47 
48 
56  def __init__(self, info):
57  self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("OutPortConnector")
58  self._profile = info
59  self._endian = None
60  return
61 
62 
69  def __del__(self):
70  pass
71 
72 
73 
87  def profile(self):
88  self._rtcout.RTC_TRACE("profile()")
89  return self._profile
90 
91 
105  def id(self):
106  self._rtcout.RTC_TRACE("id() = %s", self.profile().id)
107  return self.profile().id
108 
109 
110 
124  def name(self):
125  self._rtcout.RTC_TRACE("name() = %s", self.profile().name)
126  return self.profile().name
127 
128 
129  # void setConnectorInfo(ConnectorInfo info);
130  def setConnectorInfo(self, info):
131  self._profile = info
132 
133  if self._profile.properties.hasKey("serializer"):
134  endian = self._profile.properties.getProperty("serializer.cdr.endian")
135  if not endian:
136  self._rtcout.RTC_ERROR("InPortConnector.setConnectorInfo(): endian is not supported.")
137  return RTC.RTC_ERROR
138 
139  endian = OpenRTM_aist.split(endian, ",") # Maybe endian is ["little","big"]
140  endian = OpenRTM_aist.normalize(endian) # Maybe self._endian is "little" or "big"
141 
142  if endian == "little":
143  self._endian = True
144  elif endian == "big":
145  self._endian = False
146  else:
147  self._endian = None
148 
149  else:
150  self._endian = True # little endian
151 
152  return RTC.RTC_OK
def name(self)
Getting Connector name.
def profile(self)
Getting ConnectorInfo.
def __init__(self, info)
ConstructorOutPortConnector(ConnectorInfo& info);.
def profile(self)
Getting Profile.


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34