InPortConnector.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: euc-jp -*-
3 
4 
18 
19 import OpenRTM_aist
20 import RTC
21 
22 
23 
44  """
45  """
46 
47 
56  def __init__(self, info, buffer):
57  self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("InPortConnector")
58  self._profile = info
59  self._buffer = buffer
60  self._dataType = None
61  self._endian = None
62 
63 
64 
71  def __del__(self):
72  pass
73 
74 
75 
89  def profile(self):
90  self._rtcout.RTC_TRACE("profile()")
91  return self._profile
92 
93 
94 
108  def id(self):
109  self._rtcout.RTC_TRACE("id() = %s", self.profile().id)
110  return self.profile().id
111 
112 
113 
127  def name(self):
128  self._rtcout.RTC_TRACE("name() = %s", self.profile().name)
129  return self.profile().name
130 
131 
132 
146  def disconnect(self):
147  pass
148 
149 
163  def getBuffer(self):
164  return self._buffer
165 
166 
180  def read(self, data):
181  pass
182 
183  # void setConnectorInfo(ConnectorInfo profile);
184  def setConnectorInfo(self, profile):
185  self._profile = profile
186 
187  if self._profile.properties.hasKey("serializer"):
188  endian = self._profile.properties.getProperty("serializer.cdr.endian")
189  if not endian:
190  self._rtcout.RTC_ERROR("InPortConnector.setConnectorInfo(): endian is not supported.")
191  return RTC.RTC_ERROR
192 
193  endian = OpenRTM_aist.split(endian, ",") # Maybe endian is ["little","big"]
194  endian = OpenRTM_aist.normalize(endian) # Maybe self._endian is "little" or "big"
195 
196  if endian == "little":
197  self._endian = True
198  elif endian == "big":
199  self._endian = False
200  else:
201  self._endian = None
202 
203  else:
204  self._endian = True # little endian
205 
206  return RTC.RTC_OK
207 
208 
209 
210  # template<class DataType>
211  # void setDataTyep(DataType data);
212  def setDataType(self, data):
213  self._dataType = data
def profile(self)
Getting ConnectorInfo.
def __init__(self, info, buffer)
ConstructorInPortConnector(ConnectorInfo& info, CdrBufferBase* buffer);.
def id(self)
Getting Connector ID.
def disconnect(self)
Disconnect connection.
def name(self)
Getting Connector name.
def profile(self)
Getting Profile.


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