本文整理汇总了Python中pyscsi.utils.converter.decode_bits函数的典型用法代码示例。如果您正苦于以下问题:Python decode_bits函数的具体用法?Python decode_bits怎么用?Python decode_bits使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了decode_bits函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a ReportLuns cdb
"""
result = {}
decode_bits(cdb, ReportLuns._cdb_bits, result)
return result
示例2: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a TestUnitReady cdb
"""
result = {}
decode_bits(cdb, TestUnitReady._cdb_bits, result)
return result
示例3: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a ExchangeMedium cdb
"""
result = {}
decode_bits(cdb, ExchangeMedium._cdb_bits, result)
return result
示例4: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a Read10 cdb
"""
result = {}
decode_bits(cdb, Read10._cdb_bits, result)
return result
示例5: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a Write16 cdb
"""
result = {}
decode_bits(cdb, Write16._cdb_bits, result)
return result
示例6: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a ReadElementStatus cdb
"""
result = {}
decode_bits(cdb, ReadElementStatus._cdb_bits, result)
return result
示例7: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a PreventAllowMediumRemoval cdb
"""
result = {}
decode_bits(cdb, PreventAllowMediumRemoval._cdb_bits, result)
return result
示例8: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a ModeSense6 cdb
"""
result = {}
decode_bits(cdb, MODESENSE6.cdb_bits, result)
return result
示例9: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a GetLBAStatus cdb
"""
result = {}
decode_bits(cdb, GetLBAStatus._cdb_bits, result)
return result
示例10: unmarshall_datain
def unmarshall_datain(data):
"""
Unmarshall the ReadCapacity10 datain.
"""
result = {}
decode_bits(data, ReadCapacity10._datain_bits, result)
return result
示例11: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a PositionToElement cdb
"""
result = {}
decode_bits(cdb, PositionToElement._cdb_bits, result)
return result
示例12: unmarshall_datain
def unmarshall_datain(data):
"""
Unmarshall the ReportLuns datain buffer.
:param data: a byte array
:return result: a dic
"""
result = {}
_data = data[8:scsi_ba_to_int(data[:4]) + 4]
_luns = []
_count = 0
while len(_data):
# maybe we drop the whole "put a dict into the list for every lun" thing at all
_r = {}
decode_bits(_data[:8],
ReportLuns._datain_bits,
_r)
key = 'lun%s' % _count
_r[key] = _r.pop('lun')
_luns.append(_r)
_data = _data[8:]
_count += 1
result.update({'luns': _luns})
return result
示例13: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall an Inquiry cdb
"""
result = {}
decode_bits(cdb, Inquiry._cdb_bits, result)
return result
示例14: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a OpenCloseImportExportElement cdb
"""
result = {}
decode_bits(cdb, OpenCloseImportExportElement._cdb_bits, result)
return result
示例15: unmarshall_cdb
def unmarshall_cdb(cdb):
"""
Unmarshall a ReportPriority cdb
"""
result = {}
decode_bits(cdb, ReportPriority._cdb_bits, result)
return result