Exemplo n.º 1
0
class T10VendorIDDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.vendor_specific_identifier))
    t10_vendor_identification = str_field(where=bytes_ref[4:12])
    vendor_specific_identifier = bytearray_field(
        where=bytes_ref[12:4 + designator_length])
Exemplo n.º 2
0
class UnknownVPDPageBuffer(Buffer):
    peripheral_device = buffer_field(where=bytes_ref[0:],
                                     type=PeripheralDeviceDataBuffer)
    page_code = be_uint_field(where=bytes_ref[1])
    page_length = be_uint_field(where=bytes_ref[2:4],
                                set_before_pack=len_ref(self_ref.page_data))
    page_data = list_field(where=bytes_ref[4:4 + page_length], type=b_uint8)
Exemplo n.º 3
0
class UnitSerialNumberVPDPageBuffer(Buffer):
    peripheral_device = buffer_field(where=bytes_ref[0:],
                                     type=PeripheralDeviceDataBuffer)
    page_code = be_uint_field(where=bytes_ref[1])
    page_length = be_uint_field(where=bytes_ref[3],
                                set_before_pack=len_ref(
                                    self_ref.product_serial_number))
    product_serial_number = str_field(where=bytes_ref[4:4 + page_length])
Exemplo n.º 4
0
class StringInquiryPageBuffer(Buffer):
    peripheral_device = buffer_field(where=bytes_ref[0:],
                                     type=PeripheralDeviceDataBuffer)
    page_code = be_uint_field(where=bytes_ref[1])
    page_length = be_uint_field(where=bytes_ref[2:4],
                                set_before_pack=len_ref(self_ref.string))
    string = str_field(where=bytes_ref[4:4 + page_length],
                       unpack_after=page_length)
Exemplo n.º 5
0
class MD5LogicalUnitDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(
        where=bytes_ref[3],
        set_before_pack=len_ref(self_ref.md5_logical_unit_identifier))
    md5_logical_unit_identifier = bytearray_field(
        where=bytes_ref[4:4 + designator_length])
Exemplo n.º 6
0
class Reserved_Designator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.designator))
    desginator = str_field(where=bytes_ref[4:4 + designator_length])
Exemplo n.º 7
0
class VendorSpecificDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.vendor_specific_identifier))
    vendor_specific_identifier = bytearray_field(
        where=bytes_ref[4:4 + designator_length])
Exemplo n.º 8
0
class SCSINameDesignator(DesignatorDescriptor):
    designator_length = be_uint_field(where=bytes_ref[3],
                                      set_before_pack=len_ref(
                                          self_ref.scsi_name_string))
    scsi_name_string = bytearray_field(where=bytes_ref[4:4 +
                                                       designator_length])