* DiscImageChef/Commands/Decode.cs:

* DiscImageChef.Decoders/ATA/ATA.cs:
	* DiscImageChef/Commands/DeviceInfo.cs:
	  Rename SCSI decoders fields, methods and structs to more
	  adequate names.

	* DiscImageChef.Decoders/SCSI/MMC/MMC.cs:
	* DiscImageChef.Decoders/DiscImageChef.Decoders.csproj:
	  Separated SCSI decoders by type.

	* DiscImageChef.Decoders/SCSI/Enums.cs:
	* DiscImageChef.Decoders/SCSI/Inquiry.cs:
	* DiscImageChef.Decoders/SCSI/VendorString.cs:
	  Rename fields, methods and structs to more adequate names.
This commit is contained in:
2015-10-19 03:13:15 +01:00
parent b3d48cac37
commit 12c5412b52
10 changed files with 154 additions and 213 deletions

View File

@@ -2263,69 +2263,69 @@ namespace DiscImageChef.Decoders
if (atapi)
{
// Bits 12 to 8, SCSI Peripheral Device Type
switch ((SCSI.SCSIPeripheralDeviceTypes)(((ushort)ATAID.GeneralConfiguration & 0x1F00) >> 8))
switch ((SCSI.PeripheralDeviceTypes)(((ushort)ATAID.GeneralConfiguration & 0x1F00) >> 8))
{
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTDirectAccess: //0x00,
case SCSI.PeripheralDeviceTypes.DirectAccess: //0x00,
sb.AppendLine("ATAPI Direct-access device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTSequentialAccess: //0x01,
case SCSI.PeripheralDeviceTypes.SequentialAccess: //0x01,
sb.AppendLine("ATAPI Sequential-access device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTPrinterDevice: //0x02,
case SCSI.PeripheralDeviceTypes.PrinterDevice: //0x02,
sb.AppendLine("ATAPI Printer device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTProcessorDevice: //0x03,
case SCSI.PeripheralDeviceTypes.ProcessorDevice: //0x03,
sb.AppendLine("ATAPI Processor device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTWriteOnceDevice: //0x04,
case SCSI.PeripheralDeviceTypes.WriteOnceDevice: //0x04,
sb.AppendLine("ATAPI Write-once device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTMultiMediaDevice: //0x05,
case SCSI.PeripheralDeviceTypes.MultiMediaDevice: //0x05,
sb.AppendLine("ATAPI CD-ROM/DVD/etc device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTScannerDevice: //0x06,
case SCSI.PeripheralDeviceTypes.ScannerDevice: //0x06,
sb.AppendLine("ATAPI Scanner device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTOpticalDevice: //0x07,
case SCSI.PeripheralDeviceTypes.OpticalDevice: //0x07,
sb.AppendLine("ATAPI Optical memory device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTMediumChangerDevice: //0x08,
case SCSI.PeripheralDeviceTypes.MediumChangerDevice: //0x08,
sb.AppendLine("ATAPI Medium change device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTCommsDevice: //0x09,
case SCSI.PeripheralDeviceTypes.CommsDevice: //0x09,
sb.AppendLine("ATAPI Communications device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTPrePressDevice1: //0x0A,
case SCSI.PeripheralDeviceTypes.PrePressDevice1: //0x0A,
sb.AppendLine("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTPrePressDevice2: //0x0B,
case SCSI.PeripheralDeviceTypes.PrePressDevice2: //0x0B,
sb.AppendLine("ATAPI Graphics arts pre-press device (defined in ASC IT8)");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTArrayControllerDevice: //0x0C,
case SCSI.PeripheralDeviceTypes.ArrayControllerDevice: //0x0C,
sb.AppendLine("ATAPI Array controller device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTEnclosureServiceDevice: //0x0D,
case SCSI.PeripheralDeviceTypes.EnclosureServiceDevice: //0x0D,
sb.AppendLine("ATAPI Enclosure services device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTSimplifiedDevice: //0x0E,
case SCSI.PeripheralDeviceTypes.SimplifiedDevice: //0x0E,
sb.AppendLine("ATAPI Simplified direct-access device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTOCRWDevice: //0x0F,
case SCSI.PeripheralDeviceTypes.OCRWDevice: //0x0F,
sb.AppendLine("ATAPI Optical card reader/writer device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTBridgingExpander: //0x10,
case SCSI.PeripheralDeviceTypes.BridgingExpander: //0x10,
sb.AppendLine("ATAPI Bridging Expanders");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTObjectDevice: //0x11,
case SCSI.PeripheralDeviceTypes.ObjectDevice: //0x11,
sb.AppendLine("ATAPI Object-based Storage Device");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTADCDevice: //0x12,
case SCSI.PeripheralDeviceTypes.ADCDevice: //0x12,
sb.AppendLine("ATAPI Automation/Drive Interface");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTWellKnownDevice: //0x1E,
case SCSI.PeripheralDeviceTypes.WellKnownDevice: //0x1E,
sb.AppendLine("ATAPI Well known logical unit");
break;
case SCSI.SCSIPeripheralDeviceTypes.SCSIPDTUnknownDevice: //0x1F
case SCSI.PeripheralDeviceTypes.UnknownDevice: //0x1F
sb.AppendLine("ATAPI Unknown or no device type");
break;
default:

View File

@@ -1,3 +1,18 @@
2015-10-19 Natalia Portillo <claunia@claunia.com>
* ATA/ATA.cs:
Rename SCSI decoders fields, methods and structs to more
adequate names.
* SCSI/MMC/MMC.cs:
* DiscImageChef.Decoders.csproj:
Separated SCSI decoders by type.
* SCSI/Enums.cs:
* SCSI/Inquiry.cs:
* SCSI/VendorString.cs:
Rename fields, methods and structs to more adequate names.
2015-10-19 Natalia Portillo <claunia@claunia.com>
* SCSI/Enums.cs:

View File

@@ -36,7 +36,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SCSI\Inquiry.cs" />
<Compile Include="ATA\ATA.cs" />
<Compile Include="SCSI\MMC\MMC.cs" />
<Compile Include="Blu-ray\BD.cs" />
<Compile Include="Floppy\Enums.cs" />
<Compile Include="Floppy\System3740.cs" />

View File

@@ -39,108 +39,108 @@ using System;
namespace DiscImageChef.Decoders.SCSI
{
enum SCSIPeripheralQualifiers : byte
enum PeripheralQualifiers : byte
{
/// <summary>
/// Peripheral qualifier: Device is connected and supported
/// </summary>
SCSIPQSupported = 0x00,
Supported = 0x00,
/// <summary>
/// Peripheral qualifier: Device is supported but not connected
/// </summary>
SCSIPQUnconnected = 0x01,
Unconnected = 0x01,
/// <summary>
/// Peripheral qualifier: Reserved value
/// </summary>
SCSIPQReserved = 0x02,
Reserved = 0x02,
/// <summary>
/// Peripheral qualifier: Device is connected but unsupported
/// </summary>
SCSIPQUnsupported = 0x03,
Unsupported = 0x03,
/// <summary>
/// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07
/// </summary>
SCSIPQVendorMask = 0x04
VendorMask = 0x04
}
public enum SCSIPeripheralDeviceTypes : byte
public enum PeripheralDeviceTypes : byte
{
/// <summary>
/// Direct-access device
/// </summary>
SCSIPDTDirectAccess = 0x00,
DirectAccess = 0x00,
/// <summary>
/// Sequential-access device
/// </summary>
SCSIPDTSequentialAccess = 0x01,
SequentialAccess = 0x01,
/// <summary>
/// Printer device
/// </summary>
SCSIPDTPrinterDevice = 0x02,
PrinterDevice = 0x02,
/// <summary>
/// Processor device
/// </summary>
SCSIPDTProcessorDevice = 0x03,
ProcessorDevice = 0x03,
/// <summary>
/// Write-once device
/// </summary>
SCSIPDTWriteOnceDevice = 0x04,
WriteOnceDevice = 0x04,
/// <summary>
/// CD-ROM/DVD/etc device
/// </summary>
SCSIPDTMultiMediaDevice = 0x05,
MultiMediaDevice = 0x05,
/// <summary>
/// Scanner device
/// </summary>
SCSIPDTScannerDevice = 0x06,
ScannerDevice = 0x06,
/// <summary>
/// Optical memory device
/// </summary>
SCSIPDTOpticalDevice = 0x07,
OpticalDevice = 0x07,
/// <summary>
/// Medium change device
/// </summary>
SCSIPDTMediumChangerDevice = 0x08,
MediumChangerDevice = 0x08,
/// <summary>
/// Communications device
/// </summary>
SCSIPDTCommsDevice = 0x09,
CommsDevice = 0x09,
/// <summary>
/// Graphics arts pre-press device (defined in ASC IT8)
/// </summary>
SCSIPDTPrePressDevice1 = 0x0A,
PrePressDevice1 = 0x0A,
/// <summary>
/// Graphics arts pre-press device (defined in ASC IT8)
/// </summary>
SCSIPDTPrePressDevice2 = 0x0B,
PrePressDevice2 = 0x0B,
/// <summary>
/// Array controller device
/// </summary>
SCSIPDTArrayControllerDevice = 0x0C,
ArrayControllerDevice = 0x0C,
/// <summary>
/// Enclosure services device
/// </summary>
SCSIPDTEnclosureServiceDevice = 0x0D,
EnclosureServiceDevice = 0x0D,
/// <summary>
/// Simplified direct-access device
/// </summary>
SCSIPDTSimplifiedDevice = 0x0E,
SimplifiedDevice = 0x0E,
/// <summary>
/// Optical card reader/writer device
/// </summary>
SCSIPDTOCRWDevice = 0x0F,
OCRWDevice = 0x0F,
/// <summary>
/// Bridging Expanders
/// </summary>
SCSIPDTBridgingExpander = 0x10,
BridgingExpander = 0x10,
/// <summary>
/// Object-based Storage Device
/// </summary>
SCSIPDTObjectDevice = 0x11,
ObjectDevice = 0x11,
/// <summary>
/// Automation/Drive Interface
/// </summary>
SCSIPDTADCDevice = 0x12,
ADCDevice = 0x12,
/// <summary>
/// Security Manager Device
/// </summary>
@@ -152,90 +152,90 @@ namespace DiscImageChef.Decoders.SCSI
/// <summary>
/// Well known logical unit
/// </summary>
SCSIPDTWellKnownDevice = 0x1E,
WellKnownDevice = 0x1E,
/// <summary>
/// Unknown or no device type
/// </summary>
SCSIPDTUnknownDevice = 0x1F
UnknownDevice = 0x1F
}
enum SCSIANSIVersions : byte
enum ANSIVersions : byte
{
/// <summary>
/// Device does not claim conformance to any ANSI version
/// </summary>
SCSIANSINoVersion = 0x00,
ANSINoVersion = 0x00,
/// <summary>
/// Device complies with ANSI X3.131:1986
/// </summary>
SCSIANSI1986Version = 0x01,
ANSI1986Version = 0x01,
/// <summary>
/// Device complies with ANSI X3.131:1994
/// </summary>
SCSIANSI1994Version = 0x02,
ANSI1994Version = 0x02,
/// <summary>
/// Device complies with ANSI X3.301:1997
/// </summary>
SCSIANSI1997Version = 0x03,
ANSI1997Version = 0x03,
/// <summary>
/// Device complies with ANSI X3.351:2001
/// </summary>
SCSIANSI2001Version = 0x04,
ANSI2001Version = 0x04,
/// <summary>
/// Device complies with ANSI X3.408:2005.
/// </summary>
SCSIANSI2005Version = 0x05,
ANSI2005Version = 0x05,
/// <summary>
/// Device complies with SPC-4
/// </summary>
SCSIANSI2008Version = 0x06
ANSI2008Version = 0x06
}
enum SCSIECMAVersions : byte
enum ECMAVersions : byte
{
/// <summary>
/// Device does not claim conformance to any ECMA version
/// </summary>
SCSIECMANoVersion = 0x00,
ECMANoVersion = 0x00,
/// <summary>
/// Device complies with an obsolete ECMA standard
/// </summary>
SCSIECMAObsolete = 0x01
ECMAObsolete = 0x01
}
enum SCSIISOVersions : byte
enum ISOVersions : byte
{
/// <summary>
/// Device does not claim conformance to any ISO/IEC version
/// </summary>
SCSIISONoVersion = 0x00,
ISONoVersion = 0x00,
/// <summary>
/// Device complies with ISO/IEC 9316:1995
/// </summary>
SCSIISO1995Version = 0x02
ISO1995Version = 0x02
}
enum SCSISPIClocking : byte
enum SPIClocking : byte
{
/// <summary>
/// Supports only ST
/// </summary>
SCSIClockingST = 0x00,
ST = 0x00,
/// <summary>
/// Supports only DT
/// </summary>
SCSIClockingDT = 0x01,
DT = 0x01,
/// <summary>
/// Reserved value
/// </summary>
SCSIClockingReserved = 0x02,
Reserved = 0x02,
/// <summary>
/// Supports ST and DT
/// </summary>
SCSIClockingSTandDT = 0x03,
STandDT = 0x03,
}
enum SCSITGPSValues : byte
enum TGPSValues : byte
{
/// <summary>
/// Assymetrical access not supported

View File

@@ -55,7 +55,7 @@ namespace DiscImageChef.Decoders.SCSI
{
#region Public methods
public static SCSIInquiry? DecodeSCSIInquiry(byte[] SCSIInquiryResponse)
public static SCSIInquiry? Decode(byte[] SCSIInquiryResponse)
{
if (SCSIInquiryResponse == null)
return null;
@@ -194,7 +194,7 @@ namespace DiscImageChef.Decoders.SCSI
return decoded;
}
public static string PrettifySCSIInquiry(SCSIInquiry? SCSIInquiryResponse)
public static string Prettify(SCSIInquiry? SCSIInquiryResponse)
{
if (SCSIInquiryResponse == null)
return null;
@@ -203,21 +203,21 @@ namespace DiscImageChef.Decoders.SCSI
StringBuilder sb = new StringBuilder();
sb.AppendFormat("Device vendor: {0}", VendorString.PrettifySCSIVendorString(StringHandlers.SpacePaddedToString(response.VendorIdentification))).AppendLine();
sb.AppendFormat("Device vendor: {0}", VendorString.Prettify(StringHandlers.SpacePaddedToString(response.VendorIdentification))).AppendLine();
sb.AppendFormat("Device name: {0}", StringHandlers.SpacePaddedToString(response.ProductIdentification)).AppendLine();
sb.AppendFormat("Device release level: {0}", StringHandlers.SpacePaddedToString(response.ProductRevisionLevel)).AppendLine();
switch ((SCSIPeripheralQualifiers)response.PeripheralQualifier)
switch ((PeripheralQualifiers)response.PeripheralQualifier)
{
case SCSIPeripheralQualifiers.SCSIPQSupported:
case PeripheralQualifiers.Supported:
sb.AppendLine("Device is connected and supported.");
break;
case SCSIPeripheralQualifiers.SCSIPQUnconnected:
case PeripheralQualifiers.Unconnected:
sb.AppendLine("Device is supported but not connected.");
break;
case SCSIPeripheralQualifiers.SCSIPQReserved:
case PeripheralQualifiers.Reserved:
sb.AppendLine("Reserved value set in Peripheral Qualifier field.");
break;
case SCSIPeripheralQualifiers.SCSIPQUnsupported:
case PeripheralQualifiers.Unsupported:
sb.AppendLine("Device is connected but unsupported.");
break;
default:
@@ -225,75 +225,75 @@ namespace DiscImageChef.Decoders.SCSI
break;
}
switch ((SCSIPeripheralDeviceTypes)response.PeripheralDeviceType)
switch ((PeripheralDeviceTypes)response.PeripheralDeviceType)
{
case SCSIPeripheralDeviceTypes.SCSIPDTDirectAccess: //0x00,
case PeripheralDeviceTypes.DirectAccess: //0x00,
sb.AppendLine("Direct-access device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTSequentialAccess: //0x01,
case PeripheralDeviceTypes.SequentialAccess: //0x01,
sb.AppendLine("Sequential-access device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTPrinterDevice: //0x02,
case PeripheralDeviceTypes.PrinterDevice: //0x02,
sb.AppendLine("Printer device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTProcessorDevice: //0x03,
case PeripheralDeviceTypes.ProcessorDevice: //0x03,
sb.AppendLine("Processor device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTWriteOnceDevice: //0x04,
case PeripheralDeviceTypes.WriteOnceDevice: //0x04,
sb.AppendLine("Write-once device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTMultiMediaDevice: //0x05,
case PeripheralDeviceTypes.MultiMediaDevice: //0x05,
sb.AppendLine("CD-ROM/DVD/etc device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTScannerDevice: //0x06,
case PeripheralDeviceTypes.ScannerDevice: //0x06,
sb.AppendLine("Scanner device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTOpticalDevice: //0x07,
case PeripheralDeviceTypes.OpticalDevice: //0x07,
sb.AppendLine("Optical memory device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTMediumChangerDevice: //0x08,
case PeripheralDeviceTypes.MediumChangerDevice: //0x08,
sb.AppendLine("Medium change device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTCommsDevice: //0x09,
case PeripheralDeviceTypes.CommsDevice: //0x09,
sb.AppendLine("Communications device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTPrePressDevice1: //0x0A,
case PeripheralDeviceTypes.PrePressDevice1: //0x0A,
sb.AppendLine("Graphics arts pre-press device (defined in ASC IT8)");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTPrePressDevice2: //0x0B,
case PeripheralDeviceTypes.PrePressDevice2: //0x0B,
sb.AppendLine("Graphics arts pre-press device (defined in ASC IT8)");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTArrayControllerDevice: //0x0C,
case PeripheralDeviceTypes.ArrayControllerDevice: //0x0C,
sb.AppendLine("Array controller device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTEnclosureServiceDevice: //0x0D,
case PeripheralDeviceTypes.EnclosureServiceDevice: //0x0D,
sb.AppendLine("Enclosure services device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTSimplifiedDevice: //0x0E,
case PeripheralDeviceTypes.SimplifiedDevice: //0x0E,
sb.AppendLine("Simplified direct-access device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTOCRWDevice: //0x0F,
case PeripheralDeviceTypes.OCRWDevice: //0x0F,
sb.AppendLine("Optical card reader/writer device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTBridgingExpander: //0x10,
case PeripheralDeviceTypes.BridgingExpander: //0x10,
sb.AppendLine("Bridging Expanders");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTObjectDevice: //0x11,
case PeripheralDeviceTypes.ObjectDevice: //0x11,
sb.AppendLine("Object-based Storage Device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTADCDevice: //0x12,
case PeripheralDeviceTypes.ADCDevice: //0x12,
sb.AppendLine("Automation/Drive Interface");
break;
case SCSIPeripheralDeviceTypes.SCSISecurityManagerDevice: //0x13,
case PeripheralDeviceTypes.SCSISecurityManagerDevice: //0x13,
sb.AppendLine("Security Manager Device");
break;
case SCSIPeripheralDeviceTypes.SCSIZonedBlockDEvice: //0x14
case PeripheralDeviceTypes.SCSIZonedBlockDEvice: //0x14
sb.AppendLine("Host managed zoned block device");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTWellKnownDevice: //0x1E,
case PeripheralDeviceTypes.WellKnownDevice: //0x1E,
sb.AppendLine("Well known logical unit");
break;
case SCSIPeripheralDeviceTypes.SCSIPDTUnknownDevice: //0x1F
case PeripheralDeviceTypes.UnknownDevice: //0x1F
sb.AppendLine("Unknown or no device type");
break;
default:
@@ -301,27 +301,27 @@ namespace DiscImageChef.Decoders.SCSI
break;
}
switch ((SCSIANSIVersions)response.ANSIVersion)
switch ((ANSIVersions)response.ANSIVersion)
{
case SCSIANSIVersions.SCSIANSINoVersion:
case ANSIVersions.ANSINoVersion:
sb.AppendLine("Device does not claim to comply with any SCSI ANSI standard");
break;
case SCSIANSIVersions.SCSIANSI1986Version:
case ANSIVersions.ANSI1986Version:
sb.AppendLine("Device claims to comply with ANSI X3.131:1986 (SCSI-1)");
break;
case SCSIANSIVersions.SCSIANSI1994Version:
case ANSIVersions.ANSI1994Version:
sb.AppendLine("Device claims to comply with ANSI X3.131:1994 (SCSI-2)");
break;
case SCSIANSIVersions.SCSIANSI1997Version:
case ANSIVersions.ANSI1997Version:
sb.AppendLine("Device claims to comply with ANSI X3.301:1997 (SPC-1)");
break;
case SCSIANSIVersions.SCSIANSI2001Version:
case ANSIVersions.ANSI2001Version:
sb.AppendLine("Device claims to comply with ANSI X3.351:2001 (SPC-2)");
break;
case SCSIANSIVersions.SCSIANSI2005Version:
case ANSIVersions.ANSI2005Version:
sb.AppendLine("Device claims to comply with ANSI X3.408:2005 (SPC-3)");
break;
case SCSIANSIVersions.SCSIANSI2008Version:
case ANSIVersions.ANSI2008Version:
sb.AppendLine("Device claims to comply with ANSI X3.408:2005 (SPC-4)");
break;
default:
@@ -329,12 +329,12 @@ namespace DiscImageChef.Decoders.SCSI
break;
}
switch ((SCSIECMAVersions)response.ECMAVersion)
switch ((ECMAVersions)response.ECMAVersion)
{
case SCSIECMAVersions.SCSIECMANoVersion:
case ECMAVersions.ECMANoVersion:
sb.AppendLine("Device does not claim to comply with any SCSI ECMA standard");
break;
case SCSIECMAVersions.SCSIECMAObsolete:
case ECMAVersions.ECMAObsolete:
sb.AppendLine("Device claims to comply with an obsolete SCSI ECMA standard");
break;
default:
@@ -342,12 +342,12 @@ namespace DiscImageChef.Decoders.SCSI
break;
}
switch ((SCSIISOVersions)response.ISOVersion)
switch ((ISOVersions)response.ISOVersion)
{
case SCSIISOVersions.SCSIISONoVersion:
case ISOVersions.ISONoVersion:
sb.AppendLine("Device does not claim to comply with any SCSI ISO/IEC standard");
break;
case SCSIISOVersions.SCSIISO1995Version:
case ISOVersions.ISO1995Version:
sb.AppendLine("Device claims to comply with ISO/IEC 9316:1995");
break;
default:
@@ -412,18 +412,18 @@ namespace DiscImageChef.Decoders.SCSI
sb.AppendLine("Vendor specific bit 5 on byte 6 of INQUIRY response is set");
#endif
switch ((SCSITGPSValues)response.TPGS)
switch ((TGPSValues)response.TPGS)
{
case SCSITGPSValues.NotSupported:
case TGPSValues.NotSupported:
sb.AppendLine("Device does not support assymetrical access");
break;
case SCSITGPSValues.OnlyImplicit:
case TGPSValues.OnlyImplicit:
sb.AppendLine("Device only supports implicit assymetrical access");
break;
case SCSITGPSValues.OnlyExplicit:
case TGPSValues.OnlyExplicit:
sb.AppendLine("Device only supports explicit assymetrical access");
break;
case SCSITGPSValues.Both:
case TGPSValues.Both:
sb.AppendLine("Device supports implicit and explicit assymetrical access");
break;
default:
@@ -431,18 +431,18 @@ namespace DiscImageChef.Decoders.SCSI
break;
}
switch ((SCSISPIClocking)response.Clocking)
switch ((SPIClocking)response.Clocking)
{
case SCSISPIClocking.SCSIClockingST:
case SPIClocking.ST:
sb.AppendLine("Device supports only ST clocking");
break;
case SCSISPIClocking.SCSIClockingDT:
case SPIClocking.DT:
sb.AppendLine("Device supports only DT clocking");
break;
case SCSISPIClocking.SCSIClockingReserved:
case SPIClocking.Reserved:
sb.AppendLine("Reserved value 0x02 found in SPI clocking field");
break;
case SCSISPIClocking.SCSIClockingSTandDT:
case SPIClocking.STandDT:
sb.AppendLine("Device supports ST and DT clocking");
break;
default:
@@ -1908,10 +1908,10 @@ namespace DiscImageChef.Decoders.SCSI
return sb.ToString();
}
public static string PrettifySCSIInquiry(byte[] SCSIInquiryResponse)
public static string Prettify(byte[] SCSIInquiryResponse)
{
SCSIInquiry? decoded = DecodeSCSIInquiry(SCSIInquiryResponse);
return PrettifySCSIInquiry(decoded);
SCSIInquiry? decoded = Decode(SCSIInquiryResponse);
return Prettify(decoded);
}
#endregion Public methods

View File

@@ -1,80 +0,0 @@
/***************************************************************************
The Disc Image Chef
----------------------------------------------------------------------------
Filename : MMC.cs
Version : 1.0
Author(s) : Natalia Portillo
Component : Decoders.
Revision : $Revision$
Last change by : $Author$
Date : $Date$
--[ Description ] ----------------------------------------------------------
Decodes common structures to DVD, HD DVD and BD.
--[ License ] --------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------
Copyright (C) 2011-2014 Claunia.com
****************************************************************************/
//$Id$
using System;
using System.Text;
namespace DiscImageChef.Decoders
{
/// <summary>
/// Information from the following standards:
/// ANSI X3.304-1997
/// T10/1048-D revision 9.0
/// T10/1048-D revision 10a
/// T10/1228-D revision 7.0c
/// T10/1228-D revision 11a
/// T10/1363-D revision 10g
/// T10/1545-D revision 1d
/// T10/1545-D revision 5
/// T10/1545-D revision 5a
/// T10/1675-D revision 2c
/// T10/1675-D revision 4
/// T10/1836-D revision 2g
/// </summary>
public static class MMC
{
#region Public enumerations
#endregion
#region Public methods
#endregion Public methods
#region Public structures
#endregion Public structures
}
}

View File

@@ -41,7 +41,7 @@ namespace DiscImageChef.Decoders.SCSI
{
public static class VendorString
{
public static string PrettifySCSIVendorString(string SCSIVendorString)
public static string Prettify(string SCSIVendorString)
{
switch (SCSIVendorString)
{

View File

@@ -1,3 +1,10 @@
2015-10-19 Natalia Portillo <claunia@claunia.com>
* Commands/Decode.cs:
* Commands/DeviceInfo.cs:
Rename SCSI decoders fields, methods and structs to more
adequate names.
2015-10-19 Natalia Portillo <claunia@claunia.com>
* Commands/Decode.cs:

View File

@@ -82,7 +82,7 @@ namespace DiscImageChef.Commands
{
DicConsole.WriteLine("SCSI INQUIRY command response:");
DicConsole.WriteLine("================================================================================");
DicConsole.WriteLine(Decoders.SCSI.Inquiry.PrettifySCSIInquiry(inquiry));
DicConsole.WriteLine(Decoders.SCSI.Inquiry.Prettify(inquiry));
DicConsole.WriteLine("================================================================================");
}
break;

View File

@@ -81,7 +81,7 @@ namespace DiscImageChef.Commands
else
DicConsole.WriteLine("SCSI OK");
DicConsole.WriteLine(Decoders.SCSI.Inquiry.PrettifySCSIInquiry(inqBuf));
DicConsole.WriteLine(Decoders.SCSI.Inquiry.Prettify(inqBuf));
Structs.AtaErrorRegistersCHS errorRegisters;