SCSICommand

SCSICommand encapsulates generic functinality that is needed for each SCSI command that can be sent to a device. All new commands must implement this abstract class, ensure to call init_cdb, and override the unmarshall function.

Constructors

this
this(SCSIDevice dev, ubyte opcode, int dataout_alloclen, int datain_alloclen)

The constructor will allocate sense, dataout, and datain buffers as necessary

Destructor

~this
~this()
Undocumented in source.

Members

Functions

execute
void execute()

Execute the SCSI command on the device (using device.sgio_execute), then unmarshalls the datain buffer with a call to unmarshall().

init_cdb
void init_cdb(ubyte opcode)

Allocate the CDB and set the opcode field. Opcode is used to determine cdb length.

unmarshall
void unmarshall()

Abstract method used to unmarshall the datain buffer.

Properties

cdb
ubyte[] cdb [@property getter]

Get a reference ot the CDB

datain
ubyte[] datain [@property getter]

Get a reference to the datain buffer (possibly null)

dataout
ubyte[] dataout [@property getter]

Get a reference to the dataout buffer (possibly null)

device
SCSIDevice device [@property getter]

Get the SCSIDevice

sense
ubyte[] sense [@property getter]

Get a reference to the sense buffer

Variables

m_cdb
ubyte[] m_cdb;
Undocumented in source.
m_dataout
ubyte[] m_dataout;
Undocumented in source.

Meta