当前位置: 首页>>代码示例>>Python>>正文


Python OpenRTM_aist.uuid1方法代码示例

本文整理汇总了Python中OpenRTM_aist.uuid1方法的典型用法代码示例。如果您正苦于以下问题:Python OpenRTM_aist.uuid1方法的具体用法?Python OpenRTM_aist.uuid1怎么用?Python OpenRTM_aist.uuid1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenRTM_aist的用法示例。


在下文中一共展示了OpenRTM_aist.uuid1方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: loadSheet

# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import uuid1 [as 别名]
    def loadSheet(self):
        
        self.rtc.mRemoveAllPort()
        count = 1
        m_hostname = ''
        _path = []
        

        while True:
            
            
            cell,sheet,m_len = self.rtc.m_excel.getCell(count,"A",'保存用',"",False)

            if cell.Value2 == None:
                return
            
            m_name = re.split(':',cell.Value2)
            
            
            if len(m_name) < 2:
                return

            if len(m_name) == 2:
                for dn in CalcDataPort.DataType.DataTypeList:
                    if m_name[1] == dn:
                        m_name[1] = dn
                #m_name[1] = m_name[1].decode("cp932").encode("utf-8")
                F_Name = m_name[1] + str(OpenRTM_aist.uuid1())
                row,col,mlen,sn,mstate,t_attachports = self.loadParam(count)
                if m_name[0] == 'DataInPort':
                    self.rtc.mAddInPort(F_Name, [[m_name[0],m_name[1]],m_name[1]], row, col, mlen, sn, mstate, t_attachports, False)
                elif m_name[0] == 'DataOutPort':
                    self.rtc.mAddOutPort(F_Name, [[m_name[0],m_name[1]],m_name[1]], row, col, mlen, sn, mstate, t_attachports, False)
            else:
                if m_hostname == m_name[1]:
                    pass
                else:
                    _paths = OOoRTC.GetPathList(m_name[1], self.mgr, None)
                    m_hostname = m_name[1]

                if _paths == None:
                    return

                for p in _paths:
                    if p[0] == m_name:
                        F_Name = p[0][-2] + p[0][-1]
                        profile = p[1].get_port_profile()
                        #props = nvlist_to_dict(profile.properties)

                        

                        row,col,mlen,sn,mstate,t_attachports = self.loadParam(count)
                        
                        if OOoRTC.nvlist_getValue(profile.properties,'port.port_type') == 'DataInPort':
                            self.rtc.mAddOutPort(F_Name, p, row, col, mlen, sn, mstate, t_attachports)
                        elif OOoRTC.nvlist_getValue(profile.properties,'port.port_type') == 'DataOutPort':
                            self.rtc.mAddInPort(F_Name, p, row, col, mlen, sn, mstate, t_attachports)            
    
            count = count + 1
开发者ID:Nobu19800,项目名称:ExcelRTCpy,代码行数:61,代码来源:MainWindow.py

示例2: __init__

# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import uuid1 [as 别名]
  def __init__(self, sdo):
    self._pId         = str(OpenRTM_aist.uuid1())
    self._org_mutex   = threading.RLock()

    self._orgProperty = SDOPackage.OrganizationProperty([])
    self._varOwner    = sdo
    self._memberList  = []
    self._dependency  = SDOPackage.OWN
    self._objref      = self._this()
    self._rtcout = OpenRTM_aist.Manager.instance().getLogbuf("rtobject.sdo_organization")
开发者ID:yosuke,项目名称:OpenRTM-aist-Python,代码行数:12,代码来源:SdoOrganization.py

示例3: getUUID

# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import uuid1 [as 别名]
 def getUUID(self):
   return OpenRTM_aist.uuid1()
开发者ID:yosuke,项目名称:OpenRTM-aist-Python,代码行数:4,代码来源:SdoConfiguration.py

示例4: addSlot

# 需要导入模块: import OpenRTM_aist [as 别名]
# 或者: from OpenRTM_aist import uuid1 [as 别名]
    def addSlot(self):
        
        pn = str(self.portListcomboBox.currentText().toLocal8Bit())
        if self.rtc.InPorts.has_key(pn) == True:
            self.setPortParam(self.rtc.InPorts[pn])
            self.updateSaveSheet()
            return
        elif self.rtc.OutPorts.has_key(pn) == True:
            self.setPortParam(self.rtc.OutPorts[pn])
            self.updateSaveSheet()
            return

        dt = str(self.datatypecomboBox.currentText().toLocal8Bit())
        if dt != "":
            F_Name = dt + str(OpenRTM_aist.uuid1())
            pt = str(self.porttypecomboBox.currentText().toLocal8Bit())
            if pt == "DataOutPort":
                if self.compAddOutPort(F_Name, [[pt,dt],dt], False):
                    self.massageBoxFunc('',dt.decode("utf-8")+u"型のOutPortを作成しました。")
            else:
                if self.compAddInPort(F_Name, [[pt,dt],dt], False):
                    self.massageBoxFunc('',dt.decode("utf-8")+u"型のInPortを作成しました。")

            self.updateInPortList()
            self.updateDataPortList()
            self.updateSaveSheet()
            return
            
        t_comp, nd = OOoRTC.JudgePort(self, self._paths)
        if t_comp:
            
            for n,o in self.rtc.OutPorts.items():
                if o._port_a[0] == t_comp[0]:
                    self.setPortParam(o)
                    
                    return
            for n,i in self.rtc.InPorts.items():
                if i._port_a[0] == t_comp[0]:
                    self.setPortParam(i)
                    
                    return
                
            F_Name = t_comp[0][-2] + t_comp[0][-1]
            profile = t_comp[1].get_port_profile()
            #props = nvlist_to_dict(profile.properties)

            if OOoRTC.nvlist_getValue(profile.properties,'port.port_type') == 'DataInPort':
                self.compAddOutPort(F_Name, t_comp)
            elif OOoRTC.nvlist_getValue(profile.properties,'port.port_type') == 'DataOutPort':
                self.compAddInPort(F_Name, t_comp)

            

            self.updateSaveSheet()
            self.infotextBox.setText(u"作成済み")

            self.updateInPortList()
            self.updateDataPortList()

            self.massageBoxFunc('',t_comp[0][-2]+u"の"+t_comp[0][-1]+u"と通信するデータポートを作成しました。")

        
        """print self.coltextBox.text()
开发者ID:Nobu19800,项目名称:ExcelRTCpy,代码行数:65,代码来源:MainWindow.py


注:本文中的OpenRTM_aist.uuid1方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。