Trait hdd::scsi::SCSIDevice [] [src]

pub trait SCSIDevice {
    fn do_cmd(
        &self,
        cmd: &[u8],
        dir: Direction,
        sense_len: u8,
        data_len: usize
    ) -> Result<(Vec<u8>, Vec<u8>), Error>; fn scsi_inquiry(
        &self,
        vital: bool,
        code: u8
    ) -> Result<(Vec<u8>, Vec<u8>), Error> { ... }
fn read_capacity_10(
        &self,
        lba: Option<u32>
    ) -> Result<(Vec<u8>, u32, u32), Error> { ... }
fn log_sense(
        &self,
        changed: bool,
        save_params: bool,
        default: bool,
        threshold: bool,
        page: u8,
        subpage: u8,
        param_ptr: u16
    ) -> Result<(Vec<u8>, Vec<u8>), Error> { ... }
fn ata_pass_through_16(
        &self,
        dir: Direction,
        regs: &RegistersWrite
    ) -> Result<(RegistersRead, Vec<u8>), Error> { ... } }

Required Methods

Executes cmd and returns tuple of (sense, data).

Provided Methods

returns tuple of (sense, logical block address, block length in bytes)

Executes LOG SENSE command.

Arguments are: - changed: whether to return code values changed since the last LOG SELECT or LOG CHANGE command (obsolete) - save_params: record log parameters marked as saveable into non-volatile, vendor-specific location (might not be supported) - default: whether to return current or default values (?) - threshold: whether to return cumulative or threshold values - page, subpage: log page to return parameters from - param_ptr: limit list of return values to parameters starting with id param_ptr

Implementors