本文整理汇总了Python中OpenIPMI.channel_medium_string方法的典型用法代码示例。如果您正苦于以下问题:Python OpenIPMI.channel_medium_string方法的具体用法?Python OpenIPMI.channel_medium_string怎么用?Python OpenIPMI.channel_medium_string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenIPMI
的用法示例。
在下文中一共展示了OpenIPMI.channel_medium_string方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import channel_medium_string [as 别名]
def setup(self):
for i in range(0, OpenIPMI.MAX_USED_CHANNELS) + [15]:
chi = self.info[i]
if (len(chi) > 0):
cdata = MCChanData(self, i)
ch = self.Append(self.treeroot, str(i), [], cdata)
if ("info" in chi):
info = chi["info"]
v = [ 0 ]
rv = info.info.get_medium(v)
if (not rv):
cdata.medium = v[0]
s = OpenIPMI.channel_medium_string(v[0])
self.SetColumn(ch, s, 1)
pass
self.add_info(ch, info)
pass
if ("v" in chi):
self.add_access(ch, chi["v"])
pass
if ("n" in chi):
self.add_access(ch, chi["n"])
pass
pass
pass
self.AfterDone()
return
示例2: add_info
# 需要导入模块: import OpenIPMI [as 别名]
# 或者: from OpenIPMI import channel_medium_string [as 别名]
def add_info(self, ch, oinfo):
info = oinfo.info
item = self.Append(ch, "Info", [])
v = [ 0 ]
rv = info.get_medium(v)
if (not rv):
self.add_data(item, "Medium",
[OpenIPMI.channel_medium_string(v[0])])
pass
rv = info.get_protocol_type(v)
if (not rv):
self.add_data(item, "Protocol Type",
[OpenIPMI.channel_protocol_string(v[0])])
pass
rv = info.get_session_support(v)
if (not rv):
self.add_data(item, "Session Support",
[OpenIPMI.channel_session_support_string(v[0])])
pass
v = info.get_vendor_id()
if (v):
self.add_data(item, "Vendor ID", [v])
pass
v = info.get_aux_info()
if (v):
self.add_data(item, "Aux Info", [v])
pass
return