当前位置: 首页>>代码示例>>Python>>正文


Python converter.decode_bits函数代码示例

本文整理汇总了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
开发者ID:sahlberg,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_report_luns.py

示例2: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a TestUnitReady cdb
     """
     result = {}
     decode_bits(cdb, TestUnitReady._cdb_bits, result)
     return result
开发者ID:c-r-h,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_testunitready.py

示例3: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a ExchangeMedium cdb
     """
     result = {}
     decode_bits(cdb, ExchangeMedium._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_exchangemedium.py

示例4: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a Read10 cdb
     """
     result = {}
     decode_bits(cdb, Read10._cdb_bits, result)
     return result
开发者ID:AHelper,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_read10.py

示例5: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a Write16 cdb
     """
     result = {}
     decode_bits(cdb, Write16._cdb_bits, result)
     return result
开发者ID:AHelper,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_write16.py

示例6: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a ReadElementStatus cdb
     """
     result = {}
     decode_bits(cdb, ReadElementStatus._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_readelementstatus.py

示例7: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a PreventAllowMediumRemoval cdb
     """
     result = {}
     decode_bits(cdb, PreventAllowMediumRemoval._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_preventallow_mediumremoval.py

示例8: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a ModeSense6 cdb
     """
     result = {}
     decode_bits(cdb, MODESENSE6.cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_modesense6.py

示例9: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a GetLBAStatus cdb
     """
     result = {}
     decode_bits(cdb, GetLBAStatus._cdb_bits, result)
     return result
开发者ID:c-r-h,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_getlbastatus.py

示例10: unmarshall_datain

 def unmarshall_datain(data):
     """
     Unmarshall the ReadCapacity10 datain.
     """
     result = {}
     decode_bits(data, ReadCapacity10._datain_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_readcapacity10.py

示例11: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a PositionToElement cdb
     """
     result = {}
     decode_bits(cdb, PositionToElement._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_positiontoelement.py

示例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
开发者ID:Katana-Steel,项目名称:python-scsi,代码行数:25,代码来源:scsi_cdb_report_luns.py

示例13: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall an Inquiry cdb
     """
     result = {}
     decode_bits(cdb, Inquiry._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_inquiry.py

示例14: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a OpenCloseImportExportElement cdb
     """
     result = {}
     decode_bits(cdb, OpenCloseImportExportElement._cdb_bits, result)
     return result
开发者ID:harapr-fds,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_openclose_exportimport_element.py

示例15: unmarshall_cdb

 def unmarshall_cdb(cdb):
     """
     Unmarshall a ReportPriority cdb
     """
     result = {}
     decode_bits(cdb, ReportPriority._cdb_bits, result)
     return result
开发者ID:sahlberg,项目名称:python-scsi,代码行数:7,代码来源:scsi_cdb_report_priority.py


注:本文中的pyscsi.utils.converter.decode_bits函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。