mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Final cleanup of DiscImageChef.Devices.
This commit is contained in:
@@ -43,7 +43,6 @@ namespace DiscImageChef.Devices
|
||||
buffer = new byte[512];
|
||||
AtaRegistersLba28 registers = new AtaRegistersLba28 {Command = (byte)AtaCommands.ReadBuffer};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -60,7 +59,6 @@ namespace DiscImageChef.Devices
|
||||
buffer = new byte[512];
|
||||
AtaRegistersLba28 registers = new AtaRegistersLba28 {Command = (byte)AtaCommands.ReadBufferDma};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.Dma, AtaTransferRegister.NoTransfer,
|
||||
ref buffer, timeout, false, out duration, out bool sense);
|
||||
Error = LastError != 0;
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace DiscImageChef.Devices
|
||||
AtaRegistersLba48 registers =
|
||||
new AtaRegistersLba48 {Command = (byte)AtaCommands.NativeMaxAddress, Feature = 0x0000};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
public bool AtaIdentify(out byte[] buffer, out AtaErrorRegistersChs statusRegisters)
|
||||
@@ -49,9 +49,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device, using default device timeout
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -61,9 +61,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -73,9 +73,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device
|
||||
/// Sends the ATA IDENTIFY DEVICE command to the device
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -86,7 +86,6 @@ namespace DiscImageChef.Devices
|
||||
buffer = new byte[512];
|
||||
AtaRegistersChs registers = new AtaRegistersChs {Command = (byte)AtaCommands.IdentifyDevice};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -117,7 +116,6 @@ namespace DiscImageChef.Devices
|
||||
Command = retry ? (byte)AtaCommands.ReadDmaRetry : (byte)AtaCommands.ReadDma
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.Dma, AtaTransferRegister.SectorCount,
|
||||
ref buffer, timeout, true, out duration, out bool sense);
|
||||
Error = LastError != 0;
|
||||
@@ -141,7 +139,6 @@ namespace DiscImageChef.Devices
|
||||
Sector = sector
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
|
||||
out bool sense);
|
||||
@@ -172,7 +169,6 @@ namespace DiscImageChef.Devices
|
||||
Sector = sector
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
|
||||
out bool sense);
|
||||
@@ -204,7 +200,6 @@ namespace DiscImageChef.Devices
|
||||
Sector = sector
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.SectorCount, ref buffer, timeout, true, out duration,
|
||||
out bool sense);
|
||||
@@ -228,7 +223,6 @@ namespace DiscImageChef.Devices
|
||||
Sector = sector
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, true, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device, using default device timeout
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device, using default device timeout
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
public bool AtapiIdentify(out byte[] buffer, out AtaErrorRegistersChs statusRegisters)
|
||||
@@ -49,9 +49,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device, using default device timeout
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device, using default device timeout
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -61,9 +61,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -73,9 +73,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device
|
||||
/// Sends the ATA IDENTIFY PACKET DEVICE command to the device
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters"/> contains the error registers.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="statusRegisters" /> contains the error registers.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="statusRegisters">Status registers.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -86,7 +86,6 @@ namespace DiscImageChef.Devices
|
||||
buffer = new byte[512];
|
||||
AtaRegistersChs registers = new AtaRegistersChs {Command = (byte)AtaCommands.IdentifyPacketDevice};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace DiscImageChef.Devices
|
||||
DeviceHead = (byte)(head & 0x0F)
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -92,7 +91,6 @@ namespace DiscImageChef.Devices
|
||||
byte[] buffer = new byte[0];
|
||||
AtaRegistersLba28 registers = new AtaRegistersLba28 {Command = (byte)AtaCommands.RequestSense};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace DiscImageChef.Devices
|
||||
AtaRegistersChs registers =
|
||||
new AtaRegistersChs {Command = (byte)AtaCommands.CheckMediaCardType, Feature = feature};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace DiscImageChef.Devices
|
||||
LbaMid = 0x4F
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -72,7 +71,6 @@ namespace DiscImageChef.Devices
|
||||
SectorCount = 0xF1
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -95,7 +93,6 @@ namespace DiscImageChef.Devices
|
||||
LbaMid = 0x4F
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -117,7 +114,6 @@ namespace DiscImageChef.Devices
|
||||
LbaMid = 0x4F
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -141,7 +137,6 @@ namespace DiscImageChef.Devices
|
||||
LbaLow = subcommand
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -164,7 +159,6 @@ namespace DiscImageChef.Devices
|
||||
LbaMid = 0x4F
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -188,7 +182,6 @@ namespace DiscImageChef.Devices
|
||||
LbaLow = logAddress
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
@@ -210,7 +203,6 @@ namespace DiscImageChef.Devices
|
||||
LbaMid = 0x4F
|
||||
};
|
||||
|
||||
|
||||
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData,
|
||||
AtaTransferRegister.NoTransfer, ref buffer, timeout, false, out duration,
|
||||
out bool sense);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends a SCSI command to this device
|
||||
/// Sends a SCSI command to this device
|
||||
/// </summary>
|
||||
/// <returns>0 if no error occurred, otherwise, errno</returns>
|
||||
/// <param name="cdb">SCSI CDB</param>
|
||||
@@ -49,7 +49,10 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="timeout">Timeout in seconds</param>
|
||||
/// <param name="direction">SCSI command transfer direction</param>
|
||||
/// <param name="duration">Time it took to execute the command in milliseconds</param>
|
||||
/// <param name="sense"><c>True</c> if SCSI command returned non-OK status and <paramref name="senseBuffer"/> contains SCSI sense</param>
|
||||
/// <param name="sense">
|
||||
/// <c>True</c> if SCSI command returned non-OK status and <paramref name="senseBuffer" /> contains
|
||||
/// SCSI sense
|
||||
/// </param>
|
||||
public int SendScsiCommand(byte[] cdb, ref byte[] buffer, out byte[] senseBuffer, uint timeout,
|
||||
ScsiDirection direction, out double duration, out bool sense)
|
||||
{
|
||||
@@ -58,7 +61,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an ATA/ATAPI command to this device using CHS addressing
|
||||
/// Sends an ATA/ATAPI command to this device using CHS addressing
|
||||
/// </summary>
|
||||
/// <returns>0 if no error occurred, otherwise, errno</returns>
|
||||
/// <param name="registers">ATA registers.</param>
|
||||
@@ -67,19 +70,23 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="transferRegister">Indicates which register indicates the transfer length</param>
|
||||
/// <param name="buffer">Buffer for ATA/ATAPI command response</param>
|
||||
/// <param name="timeout">Timeout in seconds</param>
|
||||
/// <param name="transferBlocks">If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in bytes.</param>
|
||||
/// <param name="transferBlocks">
|
||||
/// If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in
|
||||
/// bytes.
|
||||
/// </param>
|
||||
/// <param name="duration">Time it took to execute the command in milliseconds</param>
|
||||
/// <param name="sense"><c>True</c> if ATA/ATAPI command returned non-OK status</param>
|
||||
public int SendAtaCommand(AtaRegistersChs registers, out AtaErrorRegistersChs errorRegisters,
|
||||
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
|
||||
uint timeout, bool transferBlocks, out double duration, out bool sense)
|
||||
{
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol, transferRegister,
|
||||
ref buffer, timeout, transferBlocks, out duration, out sense);
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol,
|
||||
transferRegister, ref buffer, timeout, transferBlocks, out duration,
|
||||
out sense);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an ATA/ATAPI command to this device using 28-bit LBA addressing
|
||||
/// Sends an ATA/ATAPI command to this device using 28-bit LBA addressing
|
||||
/// </summary>
|
||||
/// <returns>0 if no error occurred, otherwise, errno</returns>
|
||||
/// <param name="registers">ATA registers.</param>
|
||||
@@ -88,19 +95,23 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="transferRegister">Indicates which register indicates the transfer length</param>
|
||||
/// <param name="buffer">Buffer for ATA/ATAPI command response</param>
|
||||
/// <param name="timeout">Timeout in seconds</param>
|
||||
/// <param name="transferBlocks">If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in bytes.</param>
|
||||
/// <param name="transferBlocks">
|
||||
/// If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in
|
||||
/// bytes.
|
||||
/// </param>
|
||||
/// <param name="duration">Time it took to execute the command in milliseconds</param>
|
||||
/// <param name="sense"><c>True</c> if ATA/ATAPI command returned non-OK status</param>
|
||||
public int SendAtaCommand(AtaRegistersLba28 registers, out AtaErrorRegistersLba28 errorRegisters,
|
||||
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
|
||||
uint timeout, bool transferBlocks, out double duration, out bool sense)
|
||||
{
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol, transferRegister,
|
||||
ref buffer, timeout, transferBlocks, out duration, out sense);
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol,
|
||||
transferRegister, ref buffer, timeout, transferBlocks, out duration,
|
||||
out sense);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends an ATA/ATAPI command to this device using 48-bit LBA addressing
|
||||
/// Sends an ATA/ATAPI command to this device using 48-bit LBA addressing
|
||||
/// </summary>
|
||||
/// <returns>0 if no error occurred, otherwise, errno</returns>
|
||||
/// <param name="registers">ATA registers.</param>
|
||||
@@ -109,19 +120,23 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="transferRegister">Indicates which register indicates the transfer length</param>
|
||||
/// <param name="buffer">Buffer for ATA/ATAPI command response</param>
|
||||
/// <param name="timeout">Timeout in seconds</param>
|
||||
/// <param name="transferBlocks">If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in bytes.</param>
|
||||
/// <param name="transferBlocks">
|
||||
/// If set to <c>true</c>, transfer is indicated in blocks, otherwise, it is indicated in
|
||||
/// bytes.
|
||||
/// </param>
|
||||
/// <param name="duration">Time it took to execute the command in milliseconds</param>
|
||||
/// <param name="sense"><c>True</c> if ATA/ATAPI command returned non-OK status</param>
|
||||
public int SendAtaCommand(AtaRegistersLba48 registers, out AtaErrorRegistersLba48 errorRegisters,
|
||||
AtaProtocol protocol, AtaTransferRegister transferRegister, ref byte[] buffer,
|
||||
uint timeout, bool transferBlocks, out double duration, out bool sense)
|
||||
{
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol, transferRegister,
|
||||
ref buffer, timeout, transferBlocks, out duration, out sense);
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol,
|
||||
transferRegister, ref buffer, timeout, transferBlocks, out duration,
|
||||
out sense);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a MMC/SD command to this device
|
||||
/// Sends a MMC/SD command to this device
|
||||
/// </summary>
|
||||
/// <returns>The result of the command.</returns>
|
||||
/// <param name="command">MMC/SD opcode</param>
|
||||
@@ -140,7 +155,8 @@ namespace DiscImageChef.Devices
|
||||
uint blockSize, uint blocks, ref byte[] buffer, out uint[] response,
|
||||
out double duration, out bool sense, uint timeout = 0)
|
||||
{
|
||||
switch(command) {
|
||||
switch(command)
|
||||
{
|
||||
case MmcCommands.SendCid when cachedCid != null:
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
@@ -176,10 +192,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
}
|
||||
|
||||
if((command != (MmcCommands)SecureDigitalCommands.SendOperatingCondition &&
|
||||
command != MmcCommands.SendOpCond) || cachedOcr == null)
|
||||
return Command.SendMmcCommand(PlatformId, FileHandle, command, write, isApplication, flags, argument, blockSize,
|
||||
blocks, ref buffer, out response, out duration, out sense, timeout);
|
||||
if(command != (MmcCommands)SecureDigitalCommands.SendOperatingCondition &&
|
||||
command != MmcCommands.SendOpCond || cachedOcr == null)
|
||||
return Command.SendMmcCommand(PlatformId, FileHandle, command, write, isApplication, flags, argument,
|
||||
blockSize, blocks, ref buffer, out response, out duration, out sense,
|
||||
timeout);
|
||||
|
||||
{
|
||||
DateTime start = DateTime.Now;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Opens the device for sending direct commands
|
||||
/// Opens the device for sending direct commands
|
||||
/// </summary>
|
||||
/// <param name="devicePath">Device path</param>
|
||||
public Device(string devicePath)
|
||||
@@ -71,11 +71,9 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
case PlatformID.Win32NT:
|
||||
{
|
||||
FileHandle = Extern.CreateFile(devicePath,
|
||||
FileAccess.GenericRead | FileAccess.GenericWrite,
|
||||
FileShare.Read | FileShare.Write, IntPtr.Zero,
|
||||
FileMode.OpenExisting, FileAttributes.Normal,
|
||||
IntPtr.Zero);
|
||||
FileHandle = Extern.CreateFile(devicePath, FileAccess.GenericRead | FileAccess.GenericWrite,
|
||||
FileShare.Read | FileShare.Write, IntPtr.Zero, FileMode.OpenExisting,
|
||||
FileAttributes.Normal, IntPtr.Zero);
|
||||
|
||||
if(((SafeFileHandle)FileHandle).IsInvalid)
|
||||
{
|
||||
@@ -107,8 +105,7 @@ namespace DiscImageChef.Devices
|
||||
LastError = Marshal.GetLastWin32Error();
|
||||
}
|
||||
|
||||
CamDevice camDevice =
|
||||
(CamDevice)Marshal.PtrToStructure((IntPtr)FileHandle, typeof(CamDevice));
|
||||
CamDevice camDevice = (CamDevice)Marshal.PtrToStructure((IntPtr)FileHandle, typeof(CamDevice));
|
||||
|
||||
if(StringHandlers.CToString(camDevice.SimName) == "ata")
|
||||
throw new
|
||||
@@ -116,8 +113,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new InvalidOperationException($"Platform {PlatformId} not yet supported.");
|
||||
default: throw new InvalidOperationException($"Platform {PlatformId} not yet supported.");
|
||||
}
|
||||
|
||||
if(Error) throw new SystemException($"Error {LastError} opening device.");
|
||||
@@ -133,7 +129,8 @@ namespace DiscImageChef.Devices
|
||||
bool scsiSense = true;
|
||||
|
||||
// Windows is answering SCSI INQUIRY for all device types so it needs to be detected first
|
||||
switch(PlatformId) {
|
||||
switch(PlatformId)
|
||||
{
|
||||
case PlatformID.Win32NT:
|
||||
StoragePropertyQuery query = new StoragePropertyQuery();
|
||||
query.PropertyId = StoragePropertyId.Device;
|
||||
@@ -147,11 +144,9 @@ namespace DiscImageChef.Devices
|
||||
int error = 0;
|
||||
|
||||
bool hasError = !Extern.DeviceIoControlStorageQuery((SafeFileHandle)FileHandle,
|
||||
WindowsIoctl
|
||||
.IoctlStorageQueryProperty,
|
||||
ref query, (uint)Marshal.SizeOf(query),
|
||||
descriptorPtr, 1000, ref returned,
|
||||
IntPtr.Zero);
|
||||
WindowsIoctl.IoctlStorageQueryProperty,
|
||||
ref query, (uint)Marshal.SizeOf(query),
|
||||
descriptorPtr, 1000, ref returned, IntPtr.Zero);
|
||||
|
||||
if(hasError) error = Marshal.GetLastWin32Error();
|
||||
|
||||
@@ -212,9 +207,11 @@ namespace DiscImageChef.Devices
|
||||
break;
|
||||
}
|
||||
|
||||
switch(Type) {
|
||||
switch(Type)
|
||||
{
|
||||
case DeviceType.SCSI:
|
||||
case DeviceType.ATAPI: scsiSense = ScsiInquiry(out inqBuf, out _);
|
||||
case DeviceType.ATAPI:
|
||||
scsiSense = ScsiInquiry(out inqBuf, out _);
|
||||
break;
|
||||
case DeviceType.ATA:
|
||||
bool atapiSense = AtapiIdentify(out ataBuf, out _);
|
||||
@@ -239,10 +236,11 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
byte[] sdBuffer = new byte[16];
|
||||
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle, MmcCommands.SendCsd, false, false,
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle, MmcCommands.SendCsd,
|
||||
false, false,
|
||||
MmcFlags.ResponseSpiR2 | MmcFlags.ResponseR2 |
|
||||
MmcFlags.CommandAc, 0, 16, 1, ref sdBuffer,
|
||||
out _, out _, out bool sense);
|
||||
MmcFlags.CommandAc, 0, 16, 1, ref sdBuffer, out _,
|
||||
out _, out bool sense);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
@@ -252,7 +250,8 @@ namespace DiscImageChef.Devices
|
||||
|
||||
sdBuffer = new byte[16];
|
||||
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle, MmcCommands.SendCid, false, false,
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle, MmcCommands.SendCid,
|
||||
false, false,
|
||||
MmcFlags.ResponseSpiR2 | MmcFlags.ResponseR2 |
|
||||
MmcFlags.CommandAc, 0, 16, 1, ref sdBuffer, out _,
|
||||
out _, out sense);
|
||||
@@ -266,10 +265,11 @@ namespace DiscImageChef.Devices
|
||||
sdBuffer = new byte[8];
|
||||
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle,
|
||||
(MmcCommands)SecureDigitalCommands.SendScr, false, true,
|
||||
(MmcCommands)SecureDigitalCommands.SendScr, false,
|
||||
true,
|
||||
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 |
|
||||
MmcFlags.CommandAdtc, 0, 8, 1, ref sdBuffer,
|
||||
out _, out _, out sense);
|
||||
MmcFlags.CommandAdtc, 0, 8, 1, ref sdBuffer, out _,
|
||||
out _, out sense);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
@@ -298,8 +298,8 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
sdBuffer = new byte[4];
|
||||
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle, MmcCommands.SendOpCond, false,
|
||||
true,
|
||||
LastError = Windows.Command.SendMmcCommand((SafeFileHandle)FileHandle,
|
||||
MmcCommands.SendOpCond, false, true,
|
||||
MmcFlags.ResponseSpiR3 | MmcFlags.ResponseR3 |
|
||||
MmcFlags.CommandBcr, 0, 4, 1, ref sdBuffer,
|
||||
out _, out _, out sense);
|
||||
@@ -343,7 +343,8 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: scsiSense = ScsiInquiry(out inqBuf, out _);
|
||||
default:
|
||||
scsiSense = ScsiInquiry(out inqBuf, out _);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -375,7 +376,8 @@ namespace DiscImageChef.Devices
|
||||
#endregion SecureDigital / MultiMediaCard
|
||||
|
||||
#region USB
|
||||
switch(PlatformId) {
|
||||
switch(PlatformId)
|
||||
{
|
||||
case PlatformID.Linux:
|
||||
if(devicePath.StartsWith("/dev/sd", StringComparison.Ordinal) ||
|
||||
devicePath.StartsWith("/dev/sr", StringComparison.Ordinal) ||
|
||||
@@ -405,14 +407,14 @@ namespace DiscImageChef.Devices
|
||||
|
||||
StreamReader usbSr = new StreamReader(resolvedLink + "/idProduct");
|
||||
string usbTemp = usbSr.ReadToEnd();
|
||||
ushort.TryParse(usbTemp, NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture, out usbProduct);
|
||||
ushort.TryParse(usbTemp, NumberStyles.HexNumber, CultureInfo.InvariantCulture,
|
||||
out usbProduct);
|
||||
usbSr.Close();
|
||||
|
||||
usbSr = new StreamReader(resolvedLink + "/idVendor");
|
||||
usbTemp = usbSr.ReadToEnd();
|
||||
ushort.TryParse(usbTemp, NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture, out usbVendor);
|
||||
ushort.TryParse(usbTemp, NumberStyles.HexNumber, CultureInfo.InvariantCulture,
|
||||
out usbVendor);
|
||||
usbSr.Close();
|
||||
|
||||
if(File.Exists(resolvedLink + "/manufacturer"))
|
||||
@@ -448,10 +450,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
// I have to search for USB disks, floppies and CD-ROMs as separate device types
|
||||
foreach(string devGuid in new[]
|
||||
{
|
||||
Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom,
|
||||
Usb.GuidDevinterfaceDisk
|
||||
})
|
||||
{Usb.GuidDevinterfaceFloppy, Usb.GuidDevinterfaceCdrom, Usb.GuidDevinterfaceDisk})
|
||||
{
|
||||
usbDevice = Usb.FindDrivePath(devicePath, devGuid);
|
||||
if(usbDevice != null) break;
|
||||
@@ -468,7 +467,8 @@ namespace DiscImageChef.Devices
|
||||
usbDevice.SerialNumber; // This is incorrect filled by Windows with SCSI/ATA serial number
|
||||
}
|
||||
break;
|
||||
default: IsUsb = false;
|
||||
default:
|
||||
IsUsb = false;
|
||||
break;
|
||||
}
|
||||
#endregion USB
|
||||
@@ -489,27 +489,25 @@ namespace DiscImageChef.Devices
|
||||
while(resolvedLink.Contains("firewire"))
|
||||
{
|
||||
resolvedLink = Path.GetDirectoryName(resolvedLink);
|
||||
if(!File.Exists(resolvedLink + "/model") ||
|
||||
!File.Exists(resolvedLink + "/vendor") ||
|
||||
if(!File.Exists(resolvedLink + "/model") || !File.Exists(resolvedLink + "/vendor") ||
|
||||
!File.Exists(resolvedLink + "/guid")) continue;
|
||||
|
||||
StreamReader fwSr = new StreamReader(resolvedLink + "/model");
|
||||
string fwTemp = fwSr.ReadToEnd();
|
||||
uint.TryParse(fwTemp, NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture, out firewireModel);
|
||||
uint.TryParse(fwTemp, NumberStyles.HexNumber, CultureInfo.InvariantCulture,
|
||||
out firewireModel);
|
||||
fwSr.Close();
|
||||
|
||||
fwSr = new StreamReader(resolvedLink + "/vendor");
|
||||
fwTemp = fwSr.ReadToEnd();
|
||||
uint.TryParse(fwTemp, NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture,
|
||||
uint.TryParse(fwTemp, NumberStyles.HexNumber, CultureInfo.InvariantCulture,
|
||||
out firewireVendor);
|
||||
fwSr.Close();
|
||||
|
||||
fwSr = new StreamReader(resolvedLink + "/guid");
|
||||
fwTemp = fwSr.ReadToEnd();
|
||||
ulong.TryParse(fwTemp, NumberStyles.HexNumber,
|
||||
CultureInfo.InvariantCulture, out firewireGuid);
|
||||
ulong.TryParse(fwTemp, NumberStyles.HexNumber, CultureInfo.InvariantCulture,
|
||||
out firewireGuid);
|
||||
fwSr.Close();
|
||||
|
||||
if(File.Exists(resolvedLink + "/model_name"))
|
||||
@@ -554,20 +552,17 @@ namespace DiscImageChef.Devices
|
||||
resolvedLink = Path.GetDirectoryName(resolvedLink);
|
||||
if(!Directory.Exists(resolvedLink + "/pcmcia_socket")) continue;
|
||||
|
||||
string[] subdirs =
|
||||
Directory.GetDirectories(resolvedLink + "/pcmcia_socket",
|
||||
"pcmcia_socket*",
|
||||
SearchOption.TopDirectoryOnly);
|
||||
string[] subdirs = Directory.GetDirectories(resolvedLink + "/pcmcia_socket",
|
||||
"pcmcia_socket*",
|
||||
SearchOption.TopDirectoryOnly);
|
||||
|
||||
if(subdirs.Length <= 0) continue;
|
||||
|
||||
string possibleDir =
|
||||
Path.Combine(resolvedLink, "pcmcia_socket", subdirs[0]);
|
||||
if(!File.Exists(possibleDir + "/card_type") ||
|
||||
!File.Exists(possibleDir + "/cis")) continue;
|
||||
string possibleDir = Path.Combine(resolvedLink, "pcmcia_socket", subdirs[0]);
|
||||
if(!File.Exists(possibleDir + "/card_type") || !File.Exists(possibleDir + "/cis"))
|
||||
continue;
|
||||
|
||||
FileStream cisFs = new FileStream(possibleDir + "/cis",
|
||||
System.IO.FileMode.Open,
|
||||
FileStream cisFs = new FileStream(possibleDir + "/cis", System.IO.FileMode.Open,
|
||||
System.IO.FileAccess.Read);
|
||||
byte[] cisBuf = new byte[65536];
|
||||
int cisCount = cisFs.Read(cisBuf, 0, 65536);
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Releases unmanaged resources and performs other cleanup operations before the
|
||||
/// <see cref="Device"/> is reclaimed by garbage collection.
|
||||
/// Releases unmanaged resources and performs other cleanup operations before the
|
||||
/// <see cref="Device" /> is reclaimed by garbage collection.
|
||||
/// </summary>
|
||||
~Device()
|
||||
{
|
||||
|
||||
@@ -97,8 +97,8 @@ namespace DiscImageChef.Devices
|
||||
byte[] buffer = new byte[0];
|
||||
|
||||
LastError = SendMmcCommand(MmcCommands.SetBlocklen, false, false,
|
||||
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAc, length, 0,
|
||||
0, ref buffer, out response, out duration, out bool sense, timeout);
|
||||
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAc, length, 0, 0,
|
||||
ref buffer, out response, out duration, out bool sense, timeout);
|
||||
Error = LastError != 0;
|
||||
|
||||
DicConsole.DebugWriteLine("MMC Device", "SET_BLOCKLEN took {0} ms.", duration);
|
||||
@@ -118,8 +118,8 @@ namespace DiscImageChef.Devices
|
||||
|
||||
LastError = SendMmcCommand(command, false, false,
|
||||
MmcFlags.ResponseSpiR1 | MmcFlags.ResponseR1 | MmcFlags.CommandAdtc, address,
|
||||
blockSize, transferLength, ref buffer, out response, out duration, out bool sense,
|
||||
timeout);
|
||||
blockSize, transferLength, ref buffer, out response, out duration,
|
||||
out bool sense, timeout);
|
||||
Error = LastError != 0;
|
||||
|
||||
if(transferLength > 1)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -53,7 +53,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -84,7 +84,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the error threshold
|
||||
/// Sets the error threshold
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if set error threshold was adapteced, <c>false</c> otherwise.</returns>
|
||||
/// <param name="threshold">Threshold. 0 to disable error reporting.</param>
|
||||
@@ -97,7 +97,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the error threshold
|
||||
/// Sets the error threshold
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if set error threshold was adapteced, <c>false</c> otherwise.</returns>
|
||||
/// <param name="threshold">Threshold. 0 to disable error reporting.</param>
|
||||
@@ -127,7 +127,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -140,7 +140,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -168,7 +168,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills the Adaptec controller RAM with 1K bytes of data
|
||||
/// Fills the Adaptec controller RAM with 1K bytes of data
|
||||
/// </summary>
|
||||
/// <param name="buffer">Data to fill the buffer with.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -194,7 +194,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads 1K bytes of data from the Adaptec controller RAM
|
||||
/// Reads 1K bytes of data from the Adaptec controller RAM
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -67,7 +67,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// Gets the underlying drive cylinder, head and index bytes for the specified SCSI LBA.
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="lba">Logical Block Address, starting from 1.</param>
|
||||
@@ -79,7 +79,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the tape at the specified block address
|
||||
/// Positions the tape at the specified block address
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Parks the load arm in preparation for transport
|
||||
/// Parks the load arm in preparation for transport
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -50,7 +50,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unparks the load arm prior to operation
|
||||
/// Unparks the load arm prior to operation
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -61,7 +61,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parks the load arm in preparation for transport or unparks it prior to operation
|
||||
/// Parks the load arm in preparation for transport or unparks it prior to operation
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="park">If set to <c>true</c>, parks the load arm</param>
|
||||
|
||||
@@ -62,11 +62,9 @@ namespace DiscImageChef.Devices
|
||||
|
||||
if(mode != FujitsuDisplayModes.Half)
|
||||
if(!ArrayHelpers.ArrayIsNullOrWhiteSpace(firstHalfBytes) &&
|
||||
!ArrayHelpers.ArrayIsNullOrWhiteSpace(secondHalfBytes))
|
||||
displayLen = true;
|
||||
!ArrayHelpers.ArrayIsNullOrWhiteSpace(secondHalfBytes)) displayLen = true;
|
||||
else if(!ArrayHelpers.ArrayIsNullOrWhiteSpace(firstHalfBytes) &&
|
||||
ArrayHelpers.ArrayIsNullOrWhiteSpace(secondHalfBytes))
|
||||
halfMsg = true;
|
||||
ArrayHelpers.ArrayIsNullOrWhiteSpace(secondHalfBytes)) halfMsg = true;
|
||||
|
||||
buffer[0] = (byte)((byte)mode << 5);
|
||||
if(displayLen) buffer[0] += 0x10;
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Reads a "raw" sector from DVD on HL-DT-ST drives.
|
||||
/// Reads a "raw" sector from DVD on HL-DT-ST drives.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the HL-DT-ST READ DVD (RAW) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the HP READ LONG vendor command
|
||||
/// Sends the HP READ LONG vendor command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="relAddr">If set to <c>true</c> address contain two's complement offset from last read address.</param>
|
||||
@@ -56,9 +56,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the HP READ LONG vendor command
|
||||
/// Sends the HP READ LONG vendor command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="relAddr">If set to <c>true</c> address contain two's complement offset from last read address.</param>
|
||||
@@ -66,7 +66,10 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="transferLen">How many blocks/bytes to read.</param>
|
||||
/// <param name="blockBytes">How many bytes per block.</param>
|
||||
/// <param name="pba">If set to <c>true</c> address contain physical block address.</param>
|
||||
/// <param name="sectorCount">If set to <c>true</c> <paramref name="transferLen"/> is a count of secors to read. Otherwise it will be ignored</param>
|
||||
/// <param name="sectorCount">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> is a count of secors to read. Otherwise
|
||||
/// it will be ignored
|
||||
/// </param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
public bool HpReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address,
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the drive to the xtreme unlocked state
|
||||
/// Sets the drive to the xtreme unlocked state
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -65,9 +65,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the drive to the locked state.
|
||||
/// Sets the drive to the locked state.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -77,9 +77,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the drive to the xtreme unlocked state
|
||||
/// Sets the drive to the xtreme unlocked state
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -89,9 +89,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the drive to the wxripper unlocked state
|
||||
/// Sets the drive to the wxripper unlocked state
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -101,9 +101,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the drive to the specified lock state
|
||||
/// Sets the drive to the specified lock state
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -130,9 +130,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of supported features
|
||||
/// Gets a list of supported features
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -205,9 +205,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the SS sector.
|
||||
/// Gets the SS sector.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the MMC GET CONFIGURATION command for all Features
|
||||
/// Sends the MMC GET CONFIGURATION command for all Features
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI GET CONFIGURATION response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -52,9 +52,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC GET CONFIGURATION command for all Features starting with specified one
|
||||
/// Sends the MMC GET CONFIGURATION command for all Features starting with specified one
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI GET CONFIGURATION response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="startingFeatureNumber">Feature number where the feature list should start from</param>
|
||||
@@ -68,15 +68,15 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC GET CONFIGURATION command
|
||||
/// Sends the MMC GET CONFIGURATION command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI GET CONFIGURATION response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="startingFeatureNumber">Starting Feature number.</param>
|
||||
/// <param name="rt">Return type, <see cref="MmcGetConfigurationRt"/>.</param>
|
||||
/// <param name="rt">Return type, <see cref="MmcGetConfigurationRt" />.</param>
|
||||
public bool GetConfiguration(out byte[] buffer, out byte[] senseBuffer, ushort startingFeatureNumber,
|
||||
MmcGetConfigurationRt rt, uint timeout, out double duration)
|
||||
{
|
||||
@@ -114,9 +114,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ DISC STRUCTURE command
|
||||
/// Sends the MMC READ DISC STRUCTURE command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ DISC STRUCTURE response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="mediaType">Medium type for requested disc structure</param>
|
||||
@@ -168,9 +168,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get formatted TOC from disc, in MM:SS:FF format
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get formatted TOC from disc, in MM:SS:FF format
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="track">Start TOC from this track</param>
|
||||
@@ -182,9 +182,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get formatted TOC from disc
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get formatted TOC from disc
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
|
||||
@@ -198,9 +198,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get multi-session information, in MM:SS:FF format
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get multi-session information, in MM:SS:FF format
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -211,9 +211,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get multi-session information
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get multi-session information
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
|
||||
@@ -226,9 +226,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get raw TOC subchannels
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get raw TOC subchannels
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="sessionNumber">Session which TOC to get</param>
|
||||
@@ -241,9 +241,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get PMA
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get PMA
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -254,9 +254,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get ATIP
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get ATIP
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -267,9 +267,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get Lead-In CD-TEXT
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command to get Lead-In CD-TEXT
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -280,9 +280,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command
|
||||
/// Sends the MMC READ TOC/PMA/ATIP command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ TOC/PMA/ATIP response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="msf">If <c>true</c>, request data in MM:SS:FF units, otherwise, in blocks</param>
|
||||
@@ -331,9 +331,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ DISC INFORMATION command
|
||||
/// Sends the MMC READ DISC INFORMATION command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ DISC INFORMATION response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -345,9 +345,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ DISC INFORMATION command
|
||||
/// Sends the MMC READ DISC INFORMATION command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ DISC INFORMATION response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="dataType">Which disc information to read</param>
|
||||
@@ -379,9 +379,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ CD command
|
||||
/// Sends the MMC READ CD command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the MMC READ CD response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -436,9 +436,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the MMC READ CD MSF command
|
||||
/// Sends the MMC READ CD MSF command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the MMC READ CD MSF response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the NEC READ CD-DA command
|
||||
/// Sends the NEC READ CD-DA command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the NEC READ CD-DA response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the Pioneer READ CD-DA command
|
||||
/// Sends the Pioneer READ CD-DA command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Pioneer READ CD-DA response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -77,9 +77,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the Pioneer READ CD-DA MSF command
|
||||
/// Sends the Pioneer READ CD-DA MSF command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Pioneer READ CD-DA MSF response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -116,14 +116,17 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the Pioneer READ CD-XA command
|
||||
/// Sends the Pioneer READ CD-XA command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Pioneer READ CD-XA response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="errorFlags">If set to <c>true</c>, returns all sector data with 294 bytes of error flags. Superseedes <paramref name="wholeSector"/></param>
|
||||
/// <param name="errorFlags">
|
||||
/// If set to <c>true</c>, returns all sector data with 294 bytes of error flags. Superseedes
|
||||
/// <paramref name="wholeSector" />
|
||||
/// </param>
|
||||
/// <param name="wholeSector">If set to <c>true</c>, returns all 2352 bytes of sector data.</param>
|
||||
/// <param name="lba">Start block address.</param>
|
||||
/// <param name="transferLength">How many blocks to read.</param>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the Plasmon READ LONG vendor command
|
||||
/// Sends the Plasmon READ LONG vendor command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Plasmon READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="relAddr">If set to <c>true</c> address contain two's complement offset from last read address.</param>
|
||||
@@ -56,9 +56,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the Plasmon READ LONG vendor command
|
||||
/// Sends the Plasmon READ LONG vendor command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Plasmon READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="relAddr">If set to <c>true</c> address contain two's complement offset from last read address.</param>
|
||||
@@ -66,7 +66,10 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="transferLen">How many blocks/bytes to read.</param>
|
||||
/// <param name="blockBytes">How many bytes per block.</param>
|
||||
/// <param name="pba">If set to <c>true</c> address contain physical block address.</param>
|
||||
/// <param name="sectorCount">If set to <c>true</c> <paramref name="transferLen"/> is a count of secors to read. Otherwise it will be ignored</param>
|
||||
/// <param name="sectorCount">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> is a count of secors to read. Otherwise
|
||||
/// it will be ignored
|
||||
/// </param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
public bool PlasmonReadLong(out byte[] buffer, out byte[] senseBuffer, bool relAddr, uint address,
|
||||
@@ -78,9 +81,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the logical or physical block address for the specified <paramref name="address"/>
|
||||
/// Retrieves the logical or physical block address for the specified <paramref name="address" />
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the block address will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="address">PBA/LBA to read.</param>
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the Plextor READ CD-DA command
|
||||
/// Sends the Plextor READ CD-DA command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Plextor READ CD-DA response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -79,9 +79,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a "raw" sector from DVD on Plextor drives. Does it reading drive's cache.
|
||||
/// Reads a "raw" sector from DVD on Plextor drives. Does it reading drive's cache.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the Plextor READ DVD (RAW) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -114,7 +114,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the statistics EEPROM from Plextor CD recorders
|
||||
/// Reads the statistics EEPROM from Plextor CD recorders
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if EEPROM is correctly read, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -140,7 +140,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the statistics EEPROM from Plextor PX-708 and PX-712 recorders
|
||||
/// Reads the statistics EEPROM from Plextor PX-708 and PX-712 recorders
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if EEPROM is correctly read, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -166,7 +166,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a block from the statistics EEPROM from Plextor DVD recorders
|
||||
/// Reads a block from the statistics EEPROM from Plextor DVD recorders
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if EEPROM is correctly read, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -198,7 +198,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets speeds set by Plextor PoweRec
|
||||
/// Gets speeds set by Plextor PoweRec
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if speeds were got correctly, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -238,7 +238,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor PoweRec status
|
||||
/// Gets the Plextor PoweRec status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if PoweRec is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -276,7 +276,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor SilentMode status
|
||||
/// Gets the Plextor SilentMode status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if SilentMode is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -305,7 +305,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor GigaRec status
|
||||
/// Gets the Plextor GigaRec status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if GigaRec is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -333,7 +333,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor VariRec status
|
||||
/// Gets the Plextor VariRec status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if VariRec is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -366,7 +366,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor SecuRec status
|
||||
/// Gets the Plextor SecuRec status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if SecuRec is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -393,7 +393,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor SpeedRead status
|
||||
/// Gets the Plextor SpeedRead status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if SpeedRead is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -421,7 +421,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor CD-R and multi-session hiding status
|
||||
/// Gets the Plextor CD-R and multi-session hiding status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if CD-R and multi-session hiding is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -449,7 +449,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor DVD+ book bitsetting status
|
||||
/// Gets the Plextor DVD+ book bitsetting status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if DVD+ book bitsetting is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
@@ -482,7 +482,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Plextor DVD+ test writing status
|
||||
/// Gets the Plextor DVD+ test writing status
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if DVD+ test writing is supported, <c>false</c> otherwise.</returns>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the SBC READ (6) command
|
||||
/// Sends the SBC READ (6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -54,9 +54,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ (6) command
|
||||
/// Sends the SBC READ (6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -89,17 +89,23 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ (10) command
|
||||
/// Sends the SBC READ (10) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="rdprotect">Instructs the drive how to check for protection information on the medium.</param>
|
||||
/// <param name="dpo">If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache fetch/retain.</param>
|
||||
/// <param name="dpo">
|
||||
/// If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache
|
||||
/// fetch/retain.
|
||||
/// </param>
|
||||
/// <param name="fua">If set to <c>true</c> requested blocks MUST bu read from medium and not the cache.</param>
|
||||
/// <param name="fuaNv">If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not present they shall be stored there.</param>
|
||||
/// <param name="fuaNv">
|
||||
/// If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not
|
||||
/// present they shall be stored there.
|
||||
/// </param>
|
||||
/// <param name="lba">Starting block.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="groupNumber">Group number where attributes associated with this command should be collected.</param>
|
||||
@@ -138,17 +144,23 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ (12) command
|
||||
/// Sends the SBC READ (12) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="rdprotect">Instructs the drive how to check for protection information on the medium.</param>
|
||||
/// <param name="dpo">If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache fetch/retain.</param>
|
||||
/// <param name="dpo">
|
||||
/// If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache
|
||||
/// fetch/retain.
|
||||
/// </param>
|
||||
/// <param name="fua">If set to <c>true</c> requested blocks MUST bu read from medium and not the cache.</param>
|
||||
/// <param name="fuaNv">If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not present they shall be stored there.</param>
|
||||
/// <param name="fuaNv">
|
||||
/// If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not
|
||||
/// present they shall be stored there.
|
||||
/// </param>
|
||||
/// <param name="lba">Starting block.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="groupNumber">Group number where attributes associated with this command should be collected.</param>
|
||||
@@ -191,17 +203,23 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ (16) command
|
||||
/// Sends the SBC READ (16) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="rdprotect">Instructs the drive how to check for protection information on the medium.</param>
|
||||
/// <param name="dpo">If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache fetch/retain.</param>
|
||||
/// <param name="dpo">
|
||||
/// If set to <c>true</c> requested blocks shall be assigned the lowest retention priority on cache
|
||||
/// fetch/retain.
|
||||
/// </param>
|
||||
/// <param name="fua">If set to <c>true</c> requested blocks MUST bu read from medium and not the cache.</param>
|
||||
/// <param name="fuaNv">If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not present they shall be stored there.</param>
|
||||
/// <param name="fuaNv">
|
||||
/// If set to <c>true</c> requested blocks will be returned from non-volatile cache. If they're not
|
||||
/// present they shall be stored there.
|
||||
/// </param>
|
||||
/// <param name="lba">Starting block.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="groupNumber">Group number where attributes associated with this command should be collected.</param>
|
||||
@@ -247,17 +265,20 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ LONG (10) command
|
||||
/// Sends the SBC READ LONG (10) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name = "relAddr"></param>
|
||||
/// <param name="relAddr"></param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="correct">If set to <c>true</c> ask the drive to try to correct errors in the sector.</param>
|
||||
/// <param name="lba">LBA to read.</param>
|
||||
/// <param name="transferBytes">How many bytes to read. If the number is not exactly the drive's size, the command will fail and incidate a delta of the size in SENSE.</param>
|
||||
/// <param name="transferBytes">
|
||||
/// How many bytes to read. If the number is not exactly the drive's size, the command will
|
||||
/// fail and incidate a delta of the size in SENSE.
|
||||
/// </param>
|
||||
public bool ReadLong10(out byte[] buffer, out byte[] senseBuffer, bool correct, bool relAddr, uint lba,
|
||||
ushort transferBytes, uint timeout, out double duration)
|
||||
{
|
||||
@@ -286,16 +307,19 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SBC READ LONG (16) command
|
||||
/// Sends the SBC READ LONG (16) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ LONG response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
/// <param name="correct">If set to <c>true</c> ask the drive to try to correct errors in the sector.</param>
|
||||
/// <param name="lba">LBA to read.</param>
|
||||
/// <param name="transferBytes">How many bytes to read. If the number is not exactly the drive's size, the command will fail and incidate a delta of the size in SENSE.</param>
|
||||
/// <param name="transferBytes">
|
||||
/// How many bytes to read. If the number is not exactly the drive's size, the command will
|
||||
/// fail and incidate a delta of the size in SENSE.
|
||||
/// </param>
|
||||
public bool ReadLong16(out byte[] buffer, out byte[] senseBuffer, bool correct, ulong lba, uint transferBytes,
|
||||
uint timeout, out double duration)
|
||||
{
|
||||
@@ -329,7 +353,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the device reading element to the specified block address
|
||||
/// Moves the device reading element to the specified block address
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="lba">LBA.</param>
|
||||
@@ -356,7 +380,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Moves the device reading element to the specified block address
|
||||
/// Moves the device reading element to the specified block address
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="lba">LBA.</param>
|
||||
|
||||
@@ -37,11 +37,11 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory, or reports which elements in the changer contain one
|
||||
/// Reads an attribute from the medium auxiliary memory, or reports which elements in the changer contain one
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="element">Element address.</param>
|
||||
/// <param name="elementType">Element type.</param>
|
||||
/// <param name="volume">Volume number.</param>
|
||||
@@ -79,8 +79,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
if(sense) return true;
|
||||
|
||||
uint attrLen = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] +
|
||||
4);
|
||||
uint attrLen = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] + 4);
|
||||
buffer = new byte[attrLen];
|
||||
cdb[10] = (byte)((buffer.Length & 0xFF000000) >> 24);
|
||||
cdb[11] = (byte)((buffer.Length & 0xFF0000) >> 16);
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device using default device timeout.
|
||||
/// Sends the SPC INQUIRY command to the device using default device timeout.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
public bool ScsiInquiry(out byte[] buffer, out byte[] senseBuffer)
|
||||
@@ -52,9 +52,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device using default device timeout.
|
||||
/// Sends the SPC INQUIRY command to the device using default device timeout.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -64,9 +64,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device.
|
||||
/// Sends the SPC INQUIRY command to the device.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -76,9 +76,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device.
|
||||
/// Sends the SPC INQUIRY command to the device.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -111,9 +111,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page using default device timeout.
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page using default device timeout.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="page">The Extended Vital Product Data</param>
|
||||
@@ -123,9 +123,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page using default device timeout.
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page using default device timeout.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -136,9 +136,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page.
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -149,9 +149,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page.
|
||||
/// Sends the SPC INQUIRY command to the device with an Extended Vital Product Data page.
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI INQUIRY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -188,7 +188,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC TEST UNIT READY command to the device
|
||||
/// Sends the SPC TEST UNIT READY command to the device
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if unit is NOT ready, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -210,9 +210,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-1
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-1
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(6) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -224,9 +224,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-2
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-2
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(6) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -241,9 +241,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-3 SPC-3
|
||||
/// Sends the SPC MODE SENSE(6) command to the device as introduced in SCSI-3 SPC-3
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(6) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -289,9 +289,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-2
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-2
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(10) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -307,9 +307,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-3 SPC-2
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-3 SPC-2
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(10) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -326,9 +326,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-3 SPC-3
|
||||
/// Sends the SPC MODE SENSE(10) command to the device as introduced in SCSI-3 SPC-3
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI MODE SENSE(10) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -378,9 +378,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command to prevent medium removal
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command to prevent medium removal
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -390,9 +390,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command to allow medium removal
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command to allow medium removal
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -402,9 +402,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -420,9 +420,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command
|
||||
/// Sends the SPC PREVENT ALLOW MEDIUM REMOVAL command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -447,9 +447,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC READ CAPACITY command
|
||||
/// Sends the SPC READ CAPACITY command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ CAPACITY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -460,13 +460,13 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC READ CAPACITY command
|
||||
/// Sends the SPC READ CAPACITY command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ CAPACITY response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="relAddr">Indicates that <paramref name="address"/> is relative to current medium position</param>
|
||||
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi"/> is set</param>
|
||||
/// <param name="relAddr">Indicates that <paramref name="address" /> is relative to current medium position</param>
|
||||
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi" /> is set</param>
|
||||
/// <param name="pmi">If set, it is requesting partial media capacity</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -500,9 +500,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC READ CAPACITY(16) command
|
||||
/// Sends the SPC READ CAPACITY(16) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ CAPACITY(16) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -513,12 +513,12 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC READ CAPACITY(16) command
|
||||
/// Sends the SPC READ CAPACITY(16) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ CAPACITY(16) response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi"/> is set</param>
|
||||
/// <param name="address">Address where information is requested from, only valid if <paramref name="pmi" /> is set</param>
|
||||
/// <param name="pmi">If set, it is requesting partial media capacity</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
/// <param name="duration">Duration in milliseconds it took for the device to execute the command.</param>
|
||||
@@ -561,9 +561,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC READ MEDIA SERIAL NUMBER command
|
||||
/// Sends the SPC READ MEDIA SERIAL NUMBER command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ MEDIA SERIAL NUMBER response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -587,8 +587,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
if(sense) return true;
|
||||
|
||||
uint strctLength = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) +
|
||||
buffer[3] + 4);
|
||||
uint strctLength = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] + 4);
|
||||
buffer = new byte[strctLength];
|
||||
cdb[6] = (byte)((buffer.Length & 0xFF000000) >> 24);
|
||||
cdb[7] = (byte)((buffer.Length & 0xFF0000) >> 16);
|
||||
@@ -606,11 +605,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="partition">Partition number.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
/// <param name="cache">If set to <c>true</c> device can return cached data.</param>
|
||||
@@ -624,11 +623,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
/// <param name="cache">If set to <c>true</c> device can return cached data.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -641,11 +640,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="partition">Partition number.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -658,11 +657,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -674,11 +673,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="volume">Volume number.</param>
|
||||
/// <param name="partition">Partition number.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
@@ -692,11 +691,11 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// Reads an attribute from the medium auxiliary memory
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction"/>.</param>
|
||||
/// <param name="action">What to do, <see cref="ScsiAttributeAction" />.</param>
|
||||
/// <param name="volume">Volume number.</param>
|
||||
/// <param name="partition">Partition number.</param>
|
||||
/// <param name="firstAttribute">First attribute identifier.</param>
|
||||
@@ -711,9 +710,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SELECT(6) command
|
||||
/// Sends the SPC MODE SELECT(6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer with the data to be sent to the device</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="savePages">Set to save pages between resets.</param>
|
||||
@@ -730,8 +729,7 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
if(PlatformId != PlatformID.Win32NT && PlatformId != PlatformID.Win32S &&
|
||||
PlatformId != PlatformID.Win32Windows && PlatformId != PlatformID.WinCE &&
|
||||
PlatformId != PlatformID.WindowsPhone &&
|
||||
PlatformId != PlatformID.Xbox) LastError = 75;
|
||||
PlatformId != PlatformID.WindowsPhone && PlatformId != PlatformID.Xbox) LastError = 75;
|
||||
else LastError = 111;
|
||||
Error = true;
|
||||
duration = 0;
|
||||
@@ -755,9 +753,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SPC MODE SELECT(10) command
|
||||
/// Sends the SPC MODE SELECT(10) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer with the data to be sent to the device</param>
|
||||
/// <param name="savePages">Set to save pages between resets.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -774,8 +772,7 @@ namespace DiscImageChef.Devices
|
||||
{
|
||||
if(PlatformId != PlatformID.Win32NT && PlatformId != PlatformID.Win32S &&
|
||||
PlatformId != PlatformID.Win32Windows && PlatformId != PlatformID.WinCE &&
|
||||
PlatformId != PlatformID.WindowsPhone &&
|
||||
PlatformId != PlatformID.Xbox) LastError = 75;
|
||||
PlatformId != PlatformID.WindowsPhone && PlatformId != PlatformID.Xbox) LastError = 75;
|
||||
else LastError = 111;
|
||||
Error = true;
|
||||
duration = 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Prepares the medium for reading
|
||||
/// Prepares the medium for reading
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if load was successful, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -50,7 +50,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepares the medium for ejection
|
||||
/// Prepares the medium for ejection
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if unload was successful, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -62,7 +62,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepares the medium for reading or ejection
|
||||
/// Prepares the medium for reading or ejection
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if load/unload was successful, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -70,7 +70,10 @@ namespace DiscImageChef.Devices
|
||||
/// <param name="load">If set to <c>true</c> load the medium for reading.</param>
|
||||
/// <param name="retense">If set to <c>true</c> retense the tape.</param>
|
||||
/// <param name="endOfTape">If set to <c>true</c> move the medium to the EOT mark.</param>
|
||||
/// <param name="hold">If set to <c>true</c> and <paramref name="load"/> is also set to <c>true</c>, moves the medium to the drive but does not prepare it for reading.</param>
|
||||
/// <param name="hold">
|
||||
/// If set to <c>true</c> and <paramref name="load" /> is also set to <c>true</c>, moves the medium to
|
||||
/// the drive but does not prepare it for reading.
|
||||
/// </param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
public bool LoadUnload(out byte[] senseBuffer, bool immediate, bool load, bool retense, bool endOfTape,
|
||||
@@ -97,7 +100,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="lba">Logical block address.</param>
|
||||
@@ -109,7 +112,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="partition">Partition to position to.</param>
|
||||
@@ -122,7 +125,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -135,7 +138,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -150,7 +153,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified object identifier
|
||||
/// Positions the medium to the specified object identifier
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -187,7 +190,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="lba">Logical block address.</param>
|
||||
@@ -200,7 +203,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="partition">Partition to position to.</param>
|
||||
@@ -214,7 +217,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// Positions the medium to the specified block in the current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -228,7 +231,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// Positions the medium to the specified block in the specified partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -244,7 +247,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the medium to the specified object identifier
|
||||
/// Positions the medium to the specified object identifier
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c>, return from the command immediately.</param>
|
||||
@@ -303,7 +306,7 @@ namespace DiscImageChef.Devices
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the medium
|
||||
/// Reads the specified number of bytes or of blocks from the medium
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -319,13 +322,19 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the medium
|
||||
/// Reads the specified number of bytes or of blocks from the medium
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="sili">If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while <paramref name="fixedLen"/> is set also.</param>
|
||||
/// <param name="fixedLen">If set to <c>true</c> <paramref name="transferLen"/> indicates how many blocks to read of a fixed size.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen"/> status.</param>
|
||||
/// <param name="sili">
|
||||
/// If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while
|
||||
/// <paramref name="fixedLen" /> is set also.
|
||||
/// </param>
|
||||
/// <param name="fixedLen">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> indicates how many blocks to read of a
|
||||
/// fixed size.
|
||||
/// </param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen" /> status.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -353,7 +362,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified object
|
||||
/// Reads a number of fixed-length blocks starting at specified object
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -371,7 +380,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -390,7 +399,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified object
|
||||
/// Reads a number of fixed-length blocks starting at specified object
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -407,7 +416,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -425,15 +434,21 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of bytes or objects starting at specified object from the specified partition
|
||||
/// Reads a number of bytes or objects starting at specified object from the specified partition
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="sili">If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while <paramref name="fixedLen"/> is set also.</param>
|
||||
/// <param name="fixedLen">If set to <c>true</c> <paramref name="transferLen"/> indicates how many blocks to read of a fixed size.</param>
|
||||
/// <param name="sili">
|
||||
/// If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while
|
||||
/// <paramref name="fixedLen" /> is set also.
|
||||
/// </param>
|
||||
/// <param name="fixedLen">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> indicates how many blocks to read of a
|
||||
/// fixed size.
|
||||
/// </param>
|
||||
/// <param name="partition">Partition to read object from.</param>
|
||||
/// <param name="objectId">Object identifier.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen"/> status.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen" /> status.</param>
|
||||
/// <param name="objectSize">Object size in bytes.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -471,7 +486,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the drive the maximum and minimum block size
|
||||
/// Requests the drive the maximum and minimum block size
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -495,7 +510,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -507,7 +522,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reports current reading/writing elements position on the medium using 32 bytes response
|
||||
/// Reports current reading/writing elements position on the medium using 32 bytes response
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -519,7 +534,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -540,7 +555,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// Reports current reading/writing elements position on the medium
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -591,7 +606,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of blocks from the medium, backwards
|
||||
/// Reads the specified number of blocks from the medium, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -607,7 +622,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the medium, backwards
|
||||
/// Reads the specified number of bytes or of blocks from the medium, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -624,14 +639,20 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the medium, backwards
|
||||
/// Reads the specified number of bytes or of blocks from the medium, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="byteOrder">If set to <c>true</c> drive should un-reverse the blocks and bytes</param>
|
||||
/// <param name="sili">If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while <paramref name="fixedLen"/> is set also.</param>
|
||||
/// <param name="fixedLen">If set to <c>true</c> <paramref name="transferLen"/> indicates how many blocks to read of a fixed size.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen"/> status.</param>
|
||||
/// <param name="sili">
|
||||
/// If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while
|
||||
/// <paramref name="fixedLen" /> is set also.
|
||||
/// </param>
|
||||
/// <param name="fixedLen">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> indicates how many blocks to read of a
|
||||
/// fixed size.
|
||||
/// </param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen" /> status.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -660,7 +681,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified object, backwards
|
||||
/// Reads a number of fixed-length blocks starting at specified object, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -678,7 +699,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition, backwards
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -697,7 +718,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified object, backwards
|
||||
/// Reads a number of fixed-length blocks starting at specified object, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -714,7 +735,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition, backwards
|
||||
/// Reads a number of fixed-length blocks starting at specified block from the specified partition, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -732,16 +753,22 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads a number of bytes or objects starting at specified object from the specified partition, backwards
|
||||
/// Reads a number of bytes or objects starting at specified object from the specified partition, backwards
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="byteOrder">If set to <c>true</c> drive should un-reverse the blocks and bytes</param>
|
||||
/// <param name="sili">If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while <paramref name="fixedLen"/> is set also.</param>
|
||||
/// <param name="fixedLen">If set to <c>true</c> <paramref name="transferLen"/> indicates how many blocks to read of a fixed size.</param>
|
||||
/// <param name="sili">
|
||||
/// If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while
|
||||
/// <paramref name="fixedLen" /> is set also.
|
||||
/// </param>
|
||||
/// <param name="fixedLen">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> indicates how many blocks to read of a
|
||||
/// fixed size.
|
||||
/// </param>
|
||||
/// <param name="partition">Partition to read object from.</param>
|
||||
/// <param name="objectId">Object identifier.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen"/> status.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen" /> status.</param>
|
||||
/// <param name="objectSize">Object size in bytes.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -781,7 +808,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of blocks from the device's buffer
|
||||
/// Reads the specified number of blocks from the device's buffer
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -797,7 +824,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the device's buffer
|
||||
/// Reads the specified number of bytes or of blocks from the device's buffer
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -814,13 +841,19 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the specified number of bytes or of blocks from the device's buffer
|
||||
/// Reads the specified number of bytes or of blocks from the device's buffer
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="sili">If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while <paramref name="fixedLen"/> is set also.</param>
|
||||
/// <param name="fixedLen">If set to <c>true</c> <paramref name="transferLen"/> indicates how many blocks to read of a fixed size.</param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen"/> status.</param>
|
||||
/// <param name="sili">
|
||||
/// If set to <c>true</c> suppress the incorrect-length indication. Cannot be set while
|
||||
/// <paramref name="fixedLen" /> is set also.
|
||||
/// </param>
|
||||
/// <param name="fixedLen">
|
||||
/// If set to <c>true</c> <paramref name="transferLen" /> indicates how many blocks to read of a
|
||||
/// fixed size.
|
||||
/// </param>
|
||||
/// <param name="transferLen">Transfer length in blocks or bytes depending of <paramref name="fixedLen" /> status.</param>
|
||||
/// <param name="blockSize">Block size in bytes.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
/// <param name="duration">Duration.</param>
|
||||
@@ -848,7 +881,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -860,7 +893,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -874,7 +907,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// Requests the device to return descriptors for supported densities or medium types
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -917,7 +950,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the reading/writing element to the beginning of current partition
|
||||
/// Positions the reading/writing element to the beginning of current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout.</param>
|
||||
@@ -928,7 +961,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Positions the reading/writing element to the beginning of current partition
|
||||
/// Positions the reading/writing element to the beginning of current partition
|
||||
/// </summary>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="immediate">If set to <c>true</c> return from the command immediately.</param>
|
||||
@@ -953,7 +986,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Selects the specified track
|
||||
/// Selects the specified track
|
||||
/// </summary>
|
||||
/// <returns><c>true</c>, if select was tracked, <c>false</c> otherwise.</returns>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace DiscImageChef.Devices
|
||||
public partial class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends the SyQuest READ (6) command
|
||||
/// Sends the SyQuest READ (6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -53,9 +53,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SyQuest READ LONG (6) command
|
||||
/// Sends the SyQuest READ LONG (6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -69,9 +69,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SyQuest READ (6) command
|
||||
/// Sends the SyQuest READ (6) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -120,7 +120,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// Requests the usage, seek and error counters, and resets them
|
||||
/// </summary>
|
||||
/// <param name="buffer">Buffer.</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
@@ -133,9 +133,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SyQuest READ LONG (10) command
|
||||
/// Sends the SyQuest READ LONG (10) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
@@ -149,9 +149,9 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the SyQuest READ (10) command
|
||||
/// Sends the SyQuest READ (10) command
|
||||
/// </summary>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer"/> contains the sense buffer.</returns>
|
||||
/// <returns><c>true</c> if the command failed and <paramref name="senseBuffer" /> contains the sense buffer.</returns>
|
||||
/// <param name="buffer">Buffer where the SCSI READ response will be stored</param>
|
||||
/// <param name="senseBuffer">Sense buffer.</param>
|
||||
/// <param name="timeout">Timeout in seconds.</param>
|
||||
|
||||
@@ -51,184 +51,169 @@ namespace DiscImageChef.Devices
|
||||
readonly byte[] cachedOcr;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Platform ID for this device
|
||||
/// Gets the Platform ID for this device
|
||||
/// </summary>
|
||||
/// <value>The Platform ID</value>
|
||||
public PlatformID PlatformId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file handle representing this device
|
||||
/// Gets the file handle representing this device
|
||||
/// </summary>
|
||||
/// <value>The file handle</value>
|
||||
public object FileHandle { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the standard timeout for commands sent to this device
|
||||
/// Gets or sets the standard timeout for commands sent to this device
|
||||
/// </summary>
|
||||
/// <value>The timeout in seconds</value>
|
||||
public uint Timeout { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this <see cref="Device"/> is in error.
|
||||
/// Gets a value indicating whether this <see cref="Device" /> is in error.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if error; otherwise, <c>false</c>.</value>
|
||||
public bool Error { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the last error number.
|
||||
/// Gets the last error number.
|
||||
/// </summary>
|
||||
/// <value>The last error.</value>
|
||||
public int LastError { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device type.
|
||||
/// Gets the device type.
|
||||
/// </summary>
|
||||
/// <value>The device type.</value>
|
||||
public DeviceType Type { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device's manufacturer
|
||||
/// Gets the device's manufacturer
|
||||
/// </summary>
|
||||
/// <value>The manufacturer.</value>
|
||||
public string Manufacturer { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device model
|
||||
/// Gets the device model
|
||||
/// </summary>
|
||||
/// <value>The model.</value>
|
||||
public string Model { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device's revision.
|
||||
/// Gets the device's revision.
|
||||
/// </summary>
|
||||
/// <value>The revision.</value>
|
||||
public string Revision { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device's serial number.
|
||||
/// Gets the device's serial number.
|
||||
/// </summary>
|
||||
/// <value>The serial number.</value>
|
||||
public string Serial { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device's SCSI peripheral device type
|
||||
/// Gets the device's SCSI peripheral device type
|
||||
/// </summary>
|
||||
/// <value>The SCSI peripheral device type.</value>
|
||||
public PeripheralDeviceTypes ScsiType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device's media is removable.
|
||||
/// Gets a value indicating whether this device's media is removable.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device's media is removable; otherwise, <c>false</c>.</value>
|
||||
public bool IsRemovable { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device is attached via USB.
|
||||
/// Gets a value indicating whether this device is attached via USB.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device is attached via USB; otherwise, <c>false</c>.</value>
|
||||
public bool IsUsb { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB vendor ID.
|
||||
/// Gets the USB vendor ID.
|
||||
/// </summary>
|
||||
/// <value>The USB vendor ID.</value>
|
||||
public ushort UsbVendorId
|
||||
{
|
||||
get => usbVendor;
|
||||
}
|
||||
public ushort UsbVendorId => usbVendor;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB product ID.
|
||||
/// Gets the USB product ID.
|
||||
/// </summary>
|
||||
/// <value>The USB product ID.</value>
|
||||
public ushort UsbProductId
|
||||
{
|
||||
get => usbProduct;
|
||||
}
|
||||
public ushort UsbProductId => usbProduct;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB descriptors.
|
||||
/// Gets the USB descriptors.
|
||||
/// </summary>
|
||||
/// <value>The USB descriptors.</value>
|
||||
public byte[] UsbDescriptors { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB manufacturer string.
|
||||
/// Gets the USB manufacturer string.
|
||||
/// </summary>
|
||||
/// <value>The USB manufacturer string.</value>
|
||||
public string UsbManufacturerString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB product string.
|
||||
/// Gets the USB product string.
|
||||
/// </summary>
|
||||
/// <value>The USB product string.</value>
|
||||
public string UsbProductString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB serial string.
|
||||
/// Gets the USB serial string.
|
||||
/// </summary>
|
||||
/// <value>The USB serial string.</value>
|
||||
public string UsbSerialString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device is attached via FireWire.
|
||||
/// Gets a value indicating whether this device is attached via FireWire.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device is attached via FireWire; otherwise, <c>false</c>.</value>
|
||||
public bool IsFireWire { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the FireWire GUID
|
||||
/// Gets the FireWire GUID
|
||||
/// </summary>
|
||||
/// <value>The FireWire GUID.</value>
|
||||
public ulong FireWireGuid
|
||||
{
|
||||
get => firewireGuid;
|
||||
}
|
||||
public ulong FireWireGuid => firewireGuid;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the FireWire model number
|
||||
/// Gets the FireWire model number
|
||||
/// </summary>
|
||||
/// <value>The FireWire model.</value>
|
||||
public uint FireWireModel
|
||||
{
|
||||
get => firewireModel;
|
||||
}
|
||||
public uint FireWireModel => firewireModel;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the FireWire model name.
|
||||
/// Gets the FireWire model name.
|
||||
/// </summary>
|
||||
/// <value>The FireWire model name.</value>
|
||||
public string FireWireModelName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the FireWire vendor number.
|
||||
/// Gets the FireWire vendor number.
|
||||
/// </summary>
|
||||
/// <value>The FireWire vendor number.</value>
|
||||
public uint FireWireVendor
|
||||
{
|
||||
get => firewireVendor;
|
||||
}
|
||||
public uint FireWireVendor => firewireVendor;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the FireWire vendor name.
|
||||
/// Gets the FireWire vendor name.
|
||||
/// </summary>
|
||||
/// <value>The FireWire vendor name.</value>
|
||||
public string FireWireVendorName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device is a CompactFlash device.
|
||||
/// Gets a value indicating whether this device is a CompactFlash device.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device is a CompactFlash device; otherwise, <c>false</c>.</value>
|
||||
public bool IsCompactFlash { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device is a PCMCIA device.
|
||||
/// Gets a value indicating whether this device is a PCMCIA device.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device is a PCMCIA device; otherwise, <c>false</c>.</value>
|
||||
public bool IsPcmcia { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Contains the PCMCIA CIS if applicable
|
||||
/// Contains the PCMCIA CIS if applicable
|
||||
/// </summary>
|
||||
public byte[] Cis { get; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user