From 684c9a1fed02745fd460eec85081a8ccbfccd1fa Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 19 Oct 2015 03:13:15 +0100 Subject: [PATCH] * 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. --- ATA/ATA.cs | 44 ++++++------- ChangeLog | 15 +++++ DiscImageChef.Decoders.csproj | 1 - SCSI/Enums.cs | 96 +++++++++++++-------------- SCSI/Inquiry.cs | 118 +++++++++++++++++----------------- SCSI/MMC/MMC.cs | 80 ----------------------- SCSI/VendorString.cs | 2 +- 7 files changed, 145 insertions(+), 211 deletions(-) delete mode 100644 SCSI/MMC/MMC.cs diff --git a/ATA/ATA.cs b/ATA/ATA.cs index c595849..962c8fc 100644 --- a/ATA/ATA.cs +++ b/ATA/ATA.cs @@ -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: diff --git a/ChangeLog b/ChangeLog index 4bb1d9e..d0083c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2015-10-19 Natalia Portillo + + * 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 * SCSI/Enums.cs: diff --git a/DiscImageChef.Decoders.csproj b/DiscImageChef.Decoders.csproj index ef95693..f1fa6e2 100644 --- a/DiscImageChef.Decoders.csproj +++ b/DiscImageChef.Decoders.csproj @@ -36,7 +36,6 @@ - diff --git a/SCSI/Enums.cs b/SCSI/Enums.cs index 3ef7b69..005b872 100644 --- a/SCSI/Enums.cs +++ b/SCSI/Enums.cs @@ -39,108 +39,108 @@ using System; namespace DiscImageChef.Decoders.SCSI { - enum SCSIPeripheralQualifiers : byte + enum PeripheralQualifiers : byte { /// /// Peripheral qualifier: Device is connected and supported /// - SCSIPQSupported = 0x00, + Supported = 0x00, /// /// Peripheral qualifier: Device is supported but not connected /// - SCSIPQUnconnected = 0x01, + Unconnected = 0x01, /// /// Peripheral qualifier: Reserved value /// - SCSIPQReserved = 0x02, + Reserved = 0x02, /// /// Peripheral qualifier: Device is connected but unsupported /// - SCSIPQUnsupported = 0x03, + Unsupported = 0x03, /// /// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07 /// - SCSIPQVendorMask = 0x04 + VendorMask = 0x04 } - public enum SCSIPeripheralDeviceTypes : byte + public enum PeripheralDeviceTypes : byte { /// /// Direct-access device /// - SCSIPDTDirectAccess = 0x00, + DirectAccess = 0x00, /// /// Sequential-access device /// - SCSIPDTSequentialAccess = 0x01, + SequentialAccess = 0x01, /// /// Printer device /// - SCSIPDTPrinterDevice = 0x02, + PrinterDevice = 0x02, /// /// Processor device /// - SCSIPDTProcessorDevice = 0x03, + ProcessorDevice = 0x03, /// /// Write-once device /// - SCSIPDTWriteOnceDevice = 0x04, + WriteOnceDevice = 0x04, /// /// CD-ROM/DVD/etc device /// - SCSIPDTMultiMediaDevice = 0x05, + MultiMediaDevice = 0x05, /// /// Scanner device /// - SCSIPDTScannerDevice = 0x06, + ScannerDevice = 0x06, /// /// Optical memory device /// - SCSIPDTOpticalDevice = 0x07, + OpticalDevice = 0x07, /// /// Medium change device /// - SCSIPDTMediumChangerDevice = 0x08, + MediumChangerDevice = 0x08, /// /// Communications device /// - SCSIPDTCommsDevice = 0x09, + CommsDevice = 0x09, /// /// Graphics arts pre-press device (defined in ASC IT8) /// - SCSIPDTPrePressDevice1 = 0x0A, + PrePressDevice1 = 0x0A, /// /// Graphics arts pre-press device (defined in ASC IT8) /// - SCSIPDTPrePressDevice2 = 0x0B, + PrePressDevice2 = 0x0B, /// /// Array controller device /// - SCSIPDTArrayControllerDevice = 0x0C, + ArrayControllerDevice = 0x0C, /// /// Enclosure services device /// - SCSIPDTEnclosureServiceDevice = 0x0D, + EnclosureServiceDevice = 0x0D, /// /// Simplified direct-access device /// - SCSIPDTSimplifiedDevice = 0x0E, + SimplifiedDevice = 0x0E, /// /// Optical card reader/writer device /// - SCSIPDTOCRWDevice = 0x0F, + OCRWDevice = 0x0F, /// /// Bridging Expanders /// - SCSIPDTBridgingExpander = 0x10, + BridgingExpander = 0x10, /// /// Object-based Storage Device /// - SCSIPDTObjectDevice = 0x11, + ObjectDevice = 0x11, /// /// Automation/Drive Interface /// - SCSIPDTADCDevice = 0x12, + ADCDevice = 0x12, /// /// Security Manager Device /// @@ -152,90 +152,90 @@ namespace DiscImageChef.Decoders.SCSI /// /// Well known logical unit /// - SCSIPDTWellKnownDevice = 0x1E, + WellKnownDevice = 0x1E, /// /// Unknown or no device type /// - SCSIPDTUnknownDevice = 0x1F + UnknownDevice = 0x1F } - enum SCSIANSIVersions : byte + enum ANSIVersions : byte { /// /// Device does not claim conformance to any ANSI version /// - SCSIANSINoVersion = 0x00, + ANSINoVersion = 0x00, /// /// Device complies with ANSI X3.131:1986 /// - SCSIANSI1986Version = 0x01, + ANSI1986Version = 0x01, /// /// Device complies with ANSI X3.131:1994 /// - SCSIANSI1994Version = 0x02, + ANSI1994Version = 0x02, /// /// Device complies with ANSI X3.301:1997 /// - SCSIANSI1997Version = 0x03, + ANSI1997Version = 0x03, /// /// Device complies with ANSI X3.351:2001 /// - SCSIANSI2001Version = 0x04, + ANSI2001Version = 0x04, /// /// Device complies with ANSI X3.408:2005. /// - SCSIANSI2005Version = 0x05, + ANSI2005Version = 0x05, /// /// Device complies with SPC-4 /// - SCSIANSI2008Version = 0x06 + ANSI2008Version = 0x06 } - enum SCSIECMAVersions : byte + enum ECMAVersions : byte { /// /// Device does not claim conformance to any ECMA version /// - SCSIECMANoVersion = 0x00, + ECMANoVersion = 0x00, /// /// Device complies with an obsolete ECMA standard /// - SCSIECMAObsolete = 0x01 + ECMAObsolete = 0x01 } - enum SCSIISOVersions : byte + enum ISOVersions : byte { /// /// Device does not claim conformance to any ISO/IEC version /// - SCSIISONoVersion = 0x00, + ISONoVersion = 0x00, /// /// Device complies with ISO/IEC 9316:1995 /// - SCSIISO1995Version = 0x02 + ISO1995Version = 0x02 } - enum SCSISPIClocking : byte + enum SPIClocking : byte { /// /// Supports only ST /// - SCSIClockingST = 0x00, + ST = 0x00, /// /// Supports only DT /// - SCSIClockingDT = 0x01, + DT = 0x01, /// /// Reserved value /// - SCSIClockingReserved = 0x02, + Reserved = 0x02, /// /// Supports ST and DT /// - SCSIClockingSTandDT = 0x03, + STandDT = 0x03, } - enum SCSITGPSValues : byte + enum TGPSValues : byte { /// /// Assymetrical access not supported diff --git a/SCSI/Inquiry.cs b/SCSI/Inquiry.cs index 76dd8cb..bf746a9 100644 --- a/SCSI/Inquiry.cs +++ b/SCSI/Inquiry.cs @@ -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 diff --git a/SCSI/MMC/MMC.cs b/SCSI/MMC/MMC.cs deleted file mode 100644 index af911f3..0000000 --- a/SCSI/MMC/MMC.cs +++ /dev/null @@ -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 . - ----------------------------------------------------------------------------- -Copyright (C) 2011-2014 Claunia.com -****************************************************************************/ -//$Id$ -using System; -using System.Text; - -namespace DiscImageChef.Decoders -{ - /// - /// 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 - /// - public static class MMC - { - #region Public enumerations - #endregion - - #region Public methods - - - - #endregion Public methods - - #region Public structures - - - - - - - - #endregion Public structures - } -} - diff --git a/SCSI/VendorString.cs b/SCSI/VendorString.cs index cdbc1ae..d5908cd 100644 --- a/SCSI/VendorString.cs +++ b/SCSI/VendorString.cs @@ -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) {