本文整理汇总了Python中OpenIPMI.get_threshold_access_support_string方法的典型用法代码示例。如果您正苦于以下问题:Python OpenIPMI.get_threshold_access_support_string方法的具体用法?Python OpenIPMI.get_threshold_access_support_string怎么用?Python OpenIPMI.get_threshold_access_support_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenIPMI
的用法示例。
在下文中一共展示了OpenIPMI.get_threshold_access_support_string方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import get_threshold_access_support_string [as 别名]
#.........这里部分代码省略.........
' '.join(self.events_supported))
pass
sval = ""
fval = [ 0.0 ]
rv = sensor.get_nominal_reading(fval)
if (rv == 0):
sval += " Nominal:" + str(fval[0])
pass
rv = sensor.get_sensor_min(fval)
if (rv == 0):
sval += " Min:" + str(fval[0])
pass
rv = sensor.get_sensor_max(fval)
if (rv == 0):
sval += " Max:" + str(fval[0])
pass
rv = sensor.get_normal_min(fval)
if (rv == 0):
sval += " NormalMin:" + str(fval[0])
pass
rv = sensor.get_normal_max(fval)
if (rv == 0):
sval += " NormalMax:" + str(fval[0])
pass
if (sval != ""):
sval = sval.strip()
self.ui.append_item(self, "Ranges", sval);
pass
self.threshold_support = sensor.get_threshold_access()
ts = self.threshold_support
self.ui.append_item(self, "Threshold Support",
OpenIPMI.get_threshold_access_support_string(ts))
sval = ""
rval = ""
if (ts != OpenIPMI.THRESHOLD_ACCESS_SUPPORT_NONE):
wval = ""
ival = [ 0 ]
for th in threshold_strings:
rv = sensor.threshold_settable(th, ival)
if (rv == 0) and (ival[0] == 1):
sval += " " + th
pass
rv = sensor.threshold_readable(th, ival)
if (rv == 0) and (ival[0] == 1):
rval += " " + th
pass
rv = sensor.threshold_reading_supported(th, ival)
if (rv == 0) and (ival[0] == 1):
wval += " " + th
pass
pass
if (wval != ""):
wval = wval.strip()
self.ui.append_item(self, "Thresholds Reported", wval)
pass
if ((ts == OpenIPMI.THRESHOLD_ACCESS_SUPPORT_READABLE)
or (ts == OpenIPMI.THRESHOLD_ACCESS_SUPPORT_SETTABLE)):
if (sval != ""):
sval = sval.strip()
self.ui.append_item(self, "Settable Thresholds", sval)
pass
if (rval != ""):
rval = rval.strip()