本文整理汇总了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)
示例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)
示例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)
示例4: write_triggerStopType
def write_triggerStopType(self, attr):
data=attr.get_write_value()
trig = AttrHelper._getDictValue(self.__Trigger,data)
_MerlinCamera.setTriggerStopType(trig)
示例5: read_triggerOutTTL
def read_triggerOutTTL(self, attr):
trigout = _MerlinCamera.getTriggerOutTTL()
attr.set_value(AttrHelper._getDictKey(self.__TriggerOutput,trigout))
示例6: write_chargeSumming
def write_chargeSumming(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch,data)
_MerlinCamera.setChargeSumming(mode)
示例7: write_useRawReadout
def write_useRawReadout(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setUseRawReadout(mode)
示例8: write_triggerUseDelay
def write_triggerUseDelay(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch,data)
_MerlinCamera.setTriggerUseDelay(mode)
示例9: write_fileEnable
def write_fileEnable(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch,data)
_MerlinCamera.setFileEnable(mode)
示例10: write_counter
def write_counter(self, attr):
data=attr.get_write_value()
counter = AttrHelper._getDictValue(self.__Counter,data)
_MerlinCamera.setEnableCounters(counter)
示例11: write_triggerOutLVDSInvert
def write_triggerOutLVDSInvert(self, attr):
data=attr.get_write_value()
trigout = AttrHelper._getDictValue(self.__TriggerLevel,data)
_MerlinCamera.setTriggerOutLVDSInvert(trigout)
示例12: write_continuousRW
def write_continuousRW(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch,data)
_MerlinCamera.setContinuousRW(mode)
示例13: read_counter
def read_counter(self, attr):
counter = _MerlinCamera.getEnableCounters()
attr.set_value(AttrHelper._getDictKey(self.__Counter,counter))
示例14: read_continuousRW
def read_continuousRW(self, attr):
mode = _MerlinCamera.getContinuousRW()
attr.set_value(AttrHelper._getDictKey(self.__Switch,mode))
示例15: write_colourMode
def write_colourMode(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__ColourMode,data)
_MerlinCamera.setColourMode(mode)