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


Python AttrHelper类代码示例

本文整理汇总了Python中AttrHelper的典型用法代码示例。如果您正苦于以下问题:Python AttrHelper类的具体用法?Python AttrHelper怎么用?Python AttrHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: applyNewPropery

 def applyNewPropery(self, prop_name, extra=None):
     if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name]
     else: name = self.__Attribute2FunctionBase[prop_name]
                                        
     dict = getattr(self, '_'+self.__class__.__name__+'__'+name)
     func = getattr(_RayonixHsInterface, 'set'+name)
     key = getattr(self, prop_name)
     val = AttrHelper._getDictValue(dict, key.upper())
     if  val is None:
         deb.Error('Wrong value for property %s :%s' % (prop_name, val))
     else:
         if extra is not None: func(extra,val)
         else: func(val)
开发者ID:esrf-bliss,项目名称:Lima-tango-python,代码行数:13,代码来源:RayonixHs.py

示例2: applyNewPropery

    def applyNewPropery(self, prop_name, extra=None):
        if extra is not None: name = self.__OtherAttribute2FunctionBase[prop_name]
        else: name = self.__Attribute2FunctionBase[prop_name]
        key = getattr(self, prop_name)
        if not key: return # property is not set
        
        dict = getattr(self, '_'+self.__class__.__name__+'__'+name)
        func = getattr(_MaxipixAcq, 'set'+name)
        deb.Always('Setting property '+prop_name) 

        val = AttrHelper._getDictValue(dict, key.upper())
        if  val is None:
            deb.Error('Wrong value for property %s :%s' % (prop_name, val))
        else:
            if extra is not None: func(extra,val)
            else: func(val)
开发者ID:alba-controls,项目名称:Lima-tango,代码行数:16,代码来源:Maxipix.py

示例3: applyNewPropery

    def applyNewPropery(self, prop_name, extra=None):
        if extra is not None:
            name = self.__OtherAttribute2FunctionBase[prop_name]
        else:
            name = self.__Attribute2FunctionBase[prop_name]
        key = getattr(self, prop_name)
        if not key:
            return  # property is not set

        dict = getattr(self, "_" + self.__class__.__name__ + "__" + name)
        func = getattr(self.__MetaMpx, "set" + name)
        deb.Always("Setting property " + prop_name)

        val = AttrHelper._getDictValue(dict, key.upper())
        if val is None:
            deb.Error("Wrong value for property %s :%s" % (prop_name, val))
        else:
            if extra is not None:
                func(extra, val)
            else:
                func(val)
开发者ID:esrf-bliss,项目名称:Lima-tango-python,代码行数:21,代码来源:MetaMaxipix2.py

示例4: write_triggerStopType

 def write_triggerStopType(self, attr):
     data=attr.get_write_value()
     trig = AttrHelper._getDictValue(self.__Trigger,data)
     _MerlinCamera.setTriggerStopType(trig)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例5: read_triggerOutTTL

 def read_triggerOutTTL(self, attr):
     trigout = _MerlinCamera.getTriggerOutTTL()
     attr.set_value(AttrHelper._getDictKey(self.__TriggerOutput,trigout))
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:3,代码来源:Merlin.py

示例6: write_chargeSumming

 def write_chargeSumming(self, attr):
     data=attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__Switch,data)
     _MerlinCamera.setChargeSumming(mode)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例7: write_useRawReadout

 def write_useRawReadout(self, attr):
     data = attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__Switch, data)
     _Mythen3Camera.setUseRawReadout(mode)
开发者ID:esrf-bliss,项目名称:Lima-tango-python,代码行数:4,代码来源:Mythen3.py

示例8: write_triggerUseDelay

 def write_triggerUseDelay(self, attr):
     data=attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__Switch,data)
     _MerlinCamera.setTriggerUseDelay(mode)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例9: write_fileEnable

 def write_fileEnable(self, attr):
     data=attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__Switch,data)
     _MerlinCamera.setFileEnable(mode)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例10: write_counter

 def write_counter(self, attr):
     data=attr.get_write_value()
     counter = AttrHelper._getDictValue(self.__Counter,data)
     _MerlinCamera.setEnableCounters(counter)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例11: write_triggerOutLVDSInvert

 def write_triggerOutLVDSInvert(self, attr):
     data=attr.get_write_value()
     trigout = AttrHelper._getDictValue(self.__TriggerLevel,data)
     _MerlinCamera.setTriggerOutLVDSInvert(trigout)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例12: write_continuousRW

 def write_continuousRW(self, attr):
     data=attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__Switch,data)
     _MerlinCamera.setContinuousRW(mode)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py

示例13: read_counter

 def read_counter(self, attr):
     counter = _MerlinCamera.getEnableCounters()
     attr.set_value(AttrHelper._getDictKey(self.__Counter,counter))
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:3,代码来源:Merlin.py

示例14: read_continuousRW

 def read_continuousRW(self, attr):
     mode = _MerlinCamera.getContinuousRW()
     attr.set_value(AttrHelper._getDictKey(self.__Switch,mode))
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:3,代码来源:Merlin.py

示例15: write_colourMode

 def write_colourMode(self, attr):
     data=attr.get_write_value()
     mode = AttrHelper._getDictValue(self.__ColourMode,data)
     _MerlinCamera.setColourMode(mode)
开发者ID:grm84,项目名称:Lima-tango-python,代码行数:4,代码来源:Merlin.py


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