InPortProvider.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- coding: euc-jp -*-
00003 
00004 ##
00005 # @file  InPortProvider.py
00006 # @brief InPortProvider class
00007 # @date  $Date: 2007/09/20 $
00008 # @author Noriaki Ando <n-ando@aist.go.jp> and Shinji Kurihara
00009 #
00010 # Copyright (C) 2006-2008
00011 #     Noriaki Ando
00012 #     Task-intelligence Research Group,
00013 #     Intelligent Systems Research Institute,
00014 #     National Institute of
00015 #         Advanced Industrial Science and Technology (AIST), Japan
00016 #     All rights reserved.
00017 
00018 
00019 import OpenRTM_aist
00020 import SDOPackage, SDOPackage__POA
00021 
00022 
00023 ##
00024 # @if jp
00025 # @class InPortProvider
00026 # @brief InPortProvider クラス
00027 #
00028 # InPortの情報を保持するためのクラス。
00029 #
00030 # @since 0.4.0
00031 #
00032 # @else
00033 # @class InPortProvider
00034 # @brief InPortProvider class
00035 # @endif
00036 class InPortProvider(OpenRTM_aist.DataPortStatus):
00037   """
00038   """
00039 
00040 
00041 
00042   ##
00043   # @if jp
00044   # @brief コンストラクタ
00045   #
00046   # コンストラクタ
00047   #
00048   # @param self
00049   #
00050   # @else
00051   # @brief Constructor
00052   # @endif
00053   def __init__(self):
00054     self._properties = []
00055     self._interfaceType = ""
00056     self._dataflowType = ""
00057     self._subscriptionType = ""
00058     self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("InPortProvider")
00059     self._connector = None
00060 
00061 
00062   ##
00063   # @if jp
00064   # @brief InterfaceProfile情報を公開する
00065   #
00066   # InterfaceProfile情報を公開する。
00067   #
00068   # @param self
00069   # @param prop InterfaceProfile情報を受け取るプロパティ
00070   #
00071   # @else
00072   #
00073   # @endif
00074   def publishInterfaceProfile(self, prop):
00075     self._rtcout.RTC_TRACE("publishInterfaceProfile()")
00076     OpenRTM_aist.NVUtil.appendStringValue(prop, "dataport.interface_type",
00077                                           self._interfaceType)
00078     OpenRTM_aist.NVUtil.append(prop, self._properties)
00079 
00080   ##
00081   # @if jp
00082   # @brief Interface情報を公開する
00083   #
00084   # Interface情報を公開する。
00085   #
00086   # @param self
00087   # @param prop Interface情報を受け取るプロパティ
00088   #
00089   # @else
00090   #
00091   # @endif
00092   def publishInterface(self, prop):
00093     self._rtcout.RTC_TRACE("publishInterface()")
00094     if not OpenRTM_aist.NVUtil.isStringValue(prop,
00095                                              "dataport.interface_type",
00096                                              self._interfaceType):
00097       return False
00098 
00099     OpenRTM_aist.NVUtil.append(prop, self._properties)
00100     return True
00101 
00102 
00103   ##
00104   # @if jp
00105   # @brief インタフェースタイプを設定する
00106   #
00107   # インタフェースタイプを設定する。
00108   #
00109   # @param self
00110   # @param interface_type 設定対象インタフェースタイプ
00111   #
00112   # @else
00113   #
00114   # @endif
00115   def setInterfaceType(self, interface_type):
00116     self._rtcout.RTC_TRACE("setInterfaceType(%s)", interface_type)
00117     self._interfaceType = interface_type
00118 
00119 
00120   ##
00121   # @if jp
00122   # @brief データフロータイプを設定する
00123   #
00124   # データフロータイプを設定する。
00125   #
00126   # @param self
00127   # @param dataflow_type 設定対象データフロータイプ
00128   #
00129   # @else
00130   #
00131   # @endif
00132   def setDataFlowType(self, dataflow_type):
00133     self._rtcout.RTC_TRACE("setDataFlowType(%s)", dataflow_type)
00134     self._dataflowType = dataflow_type
00135 
00136 
00137   ##
00138   # @if jp
00139   # @brief サブスクリプションタイプを設定する
00140   #
00141   # サブスクリプションタイプを設定する。
00142   #
00143   # @param self
00144   # @param subs_type 設定対象サブスクリプションタイプ
00145   #
00146   # @else
00147   #
00148   # @endif
00149   def setSubscriptionType(self, subs_type):
00150     self._rtcout.RTC_TRACE("setSubscriptionType(%s)", subs_type)
00151     self._subscriptionType = subs_type
00152 
00153 
00154 
00155   def setConnector(self, connector):
00156     self._connector = connector
00157 
00158 
00159 inportproviderfactory = None
00160 
00161 
00162 class InPortProviderFactory(OpenRTM_aist.Factory,InPortProvider):
00163   def __init__(self):
00164     OpenRTM_aist.Factory.__init__(self) # Call GlobalFactory.Factory()
00165     InPortProvider.__init__(self)
00166     return
00167 
00168 
00169   def instance():
00170     global inportproviderfactory
00171 
00172     if inportproviderfactory is None:
00173       inportproviderfactory = InPortProviderFactory()
00174 
00175     return inportproviderfactory
00176 
00177   instance = staticmethod(instance)
00178 
00179 
00180   def __del__(self):
00181     pass


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Aug 27 2015 14:17:28