本文整理汇总了Python中AttrHelper._getDictValue方法的典型用法代码示例。如果您正苦于以下问题:Python AttrHelper._getDictValue方法的具体用法?Python AttrHelper._getDictValue怎么用?Python AttrHelper._getDictValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttrHelper
的用法示例。
在下文中一共展示了AttrHelper._getDictValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: applyNewPropery
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
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
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
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
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
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_gain
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_gain(self, attr):
data=attr.get_write_value()
gain = AttrHelper._getDictValue(self.__GainSetting,data)
_MerlinCamera.setGain(gain)
示例5: write_depth
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_depth(self, attr):
data=attr.get_write_value()
depth = AttrHelper._getDictValue(self.__Depth,data)
_MerlinCamera.setCounterDepth(depth)
示例6: write_counter
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_counter(self, attr):
data=attr.get_write_value()
counter = AttrHelper._getDictValue(self.__Counter,data)
_MerlinCamera.setEnableCounters(counter)
示例7: write_continuousRW
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_continuousRW(self, attr):
data=attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch,data)
_MerlinCamera.setContinuousRW(mode)
示例8: write_badChannelInterpolation
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_badChannelInterpolation(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setBadChannelInterpolation(mode)
示例9: write_useRawReadout
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_useRawReadout(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setUseRawReadout(mode)
示例10: write_triggerOutLVDSInvert
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_triggerOutLVDSInvert(self, attr):
data=attr.get_write_value()
trigout = AttrHelper._getDictValue(self.__TriggerLevel,data)
_MerlinCamera.setTriggerOutLVDSInvert(trigout)
示例11: write_triggered
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_triggered(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setTriggered(mode)
示例12: write_outputSignalPolarity
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_outputSignalPolarity(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Polarity, data)
_Mythen3Camera.setOutputSignalPolarity(mode)
示例13: write_gateMode
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_gateMode(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setGateMode(mode)
示例14: write_continuousTrigger
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_continuousTrigger(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setContinuousTrigger(mode)
示例15: write_rateCorrection
# 需要导入模块: import AttrHelper [as 别名]
# 或者: from AttrHelper import _getDictValue [as 别名]
def write_rateCorrection(self, attr):
data = attr.get_write_value()
mode = AttrHelper._getDictValue(self.__Switch, data)
_Mythen3Camera.setRateCorrection(mode)