FakeSCSIDevice

This is a simple class used to simulate the communication with a device by using known buffers. Pass this device to a SCSICommand, and during the sgio_execute() it sets the response buffers with the data instead of executing a real ioctl.

Note: To test a scsi command test cases will pass the constructor applicable buffers (dataout, datain, sense) and then pass the device to a SCSICommand. The unmarshall will work on those buffers.

Constructors

this
this(ubyte[] dataout_buf, ubyte[] datain_buf, ubyte[] sense_buf)

Construct a FakeSCSIDevice where the ioctl will return the arg buffers.

Members

Functions

sgio_execute
void sgio_execute(ubyte[] cdb_buf, ubyte[] dataout_buf, ubyte[] datain_buf, ubyte[] sense_buf)

Overloaded sgio_execute to set the argument buffers to their expected values.

Inherited Members

From SCSIDeviceBS

blocksize
int blocksize [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
total_lba
ulong total_lba [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta