mirror of
https://github.com/aaru-dps/Aaru.CommonTypes.git
synced 2025-12-16 19:24:30 +00:00
General code refactor.
This commit is contained in:
@@ -109,10 +109,10 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
MustBeSet = 0x4000,
|
||||
#pragma warning disable 1591
|
||||
Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800,
|
||||
Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100,
|
||||
Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020,
|
||||
Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004,
|
||||
Reserved01 = 0x0002,
|
||||
Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100,
|
||||
Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020,
|
||||
Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004,
|
||||
Reserved01 = 0x0002,
|
||||
#pragma warning restore 1591
|
||||
/// <summary>Indicates a device specific minimum standby timer value</summary>
|
||||
SpecificStandbyTimer = 0x0001
|
||||
@@ -265,7 +265,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
MustBeSet = 0x4000,
|
||||
#pragma warning disable 1591
|
||||
Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800,
|
||||
Reserved10 = 0x0400,
|
||||
Reserved10 = 0x0400,
|
||||
#pragma warning restore 1591
|
||||
/// <summary>DSN feature set is supported</summary>
|
||||
DSN = 0x0200,
|
||||
@@ -327,9 +327,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
ZonedBit0 = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data set management flag bits.
|
||||
/// </summary>
|
||||
/// <summary>Data set management flag bits.</summary>
|
||||
[Flags]
|
||||
public enum DataSetMgmtBit : ushort
|
||||
{
|
||||
@@ -344,9 +342,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Trim = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Device form factor
|
||||
/// </summary>
|
||||
/// <summary>Device form factor</summary>
|
||||
public enum DeviceFormFactorEnum : ushort
|
||||
{
|
||||
/// <summary>Size not reported</summary>
|
||||
@@ -460,9 +456,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SATA capabilities flags
|
||||
/// </summary>
|
||||
/// <summary>SATA capabilities flags</summary>
|
||||
[Flags]
|
||||
public enum SATACapabilitiesBit : ushort
|
||||
{
|
||||
@@ -484,7 +478,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
NCQ = 0x0100,
|
||||
#pragma warning disable 1591
|
||||
Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020,
|
||||
Reserved04 = 0x0010,
|
||||
Reserved04 = 0x0010,
|
||||
#pragma warning restore 1591
|
||||
/// <summary>Supports SATA Gen. 3 Signaling Speed (6.0Gb/s)</summary>
|
||||
Gen3Speed = 0x0008,
|
||||
@@ -496,9 +490,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Clear = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// More SATA capabilities flags
|
||||
/// </summary>
|
||||
/// <summary>More SATA capabilities flags</summary>
|
||||
[Flags]
|
||||
public enum SATACapabilitiesBit2 : ushort
|
||||
{
|
||||
@@ -527,9 +519,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Clear = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SATA features flags
|
||||
/// </summary>
|
||||
/// <summary>SATA features flags</summary>
|
||||
[Flags]
|
||||
public enum SATAFeaturesBit : ushort
|
||||
{
|
||||
@@ -560,9 +550,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Clear = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SCT Command Transport flags
|
||||
/// </summary>
|
||||
/// <summary>SCT Command Transport flags</summary>
|
||||
[Flags]
|
||||
public enum SCTCommandTransportBit : ushort
|
||||
{
|
||||
@@ -614,9 +602,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Supported = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specific configuration flags
|
||||
/// </summary>
|
||||
/// <summary>Specific configuration flags</summary>
|
||||
public enum SpecificConfigurationEnum : ushort
|
||||
{
|
||||
/// <summary>Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete</summary>
|
||||
@@ -629,9 +615,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
NotRequiresSetCompleteResponse = 0xC837
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transfer mode flags
|
||||
/// </summary>
|
||||
/// <summary>Transfer mode flags</summary>
|
||||
[Flags]
|
||||
public enum TransferMode : byte
|
||||
{
|
||||
@@ -642,9 +626,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Trusted Computing flags
|
||||
/// </summary>
|
||||
/// <summary>Trusted Computing flags</summary>
|
||||
[Flags]
|
||||
public enum TrustedComputingBit : ushort
|
||||
{
|
||||
@@ -654,18 +636,16 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
Set = 0x4000,
|
||||
#pragma warning disable 1591
|
||||
Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800,
|
||||
Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100,
|
||||
Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020,
|
||||
Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004,
|
||||
Reserved01 = 0x0002,
|
||||
Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100,
|
||||
Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020,
|
||||
Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004,
|
||||
Reserved01 = 0x0002,
|
||||
#pragma warning restore 1591
|
||||
/// <summary>Trusted Computing feature set is supported</summary>
|
||||
TrustedComputing = 0x0001
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IDENTIFY DEVICE decoded response
|
||||
/// </summary>
|
||||
/// <summary>IDENTIFY DEVICE decoded response</summary>
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)]
|
||||
public struct IdentifyDevice
|
||||
{
|
||||
@@ -1017,9 +997,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
public byte Checksum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes a raw IDENTIFY DEVICE response
|
||||
/// </summary>
|
||||
/// <summary>Decodes a raw IDENTIFY DEVICE response</summary>
|
||||
/// <param name="IdentifyDeviceResponse">Raw IDENTIFY DEVICE response</param>
|
||||
/// <returns>Decoded IDENTIFY DEVICE</returns>
|
||||
public static IdentifyDevice? Decode(byte[] IdentifyDeviceResponse)
|
||||
@@ -1050,9 +1028,7 @@ namespace Aaru.CommonTypes.Structs.Devices.ATA
|
||||
return ATAID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Encodes a raw IDENTIFY DEVICE response
|
||||
/// </summary>
|
||||
/// <summary>Encodes a raw IDENTIFY DEVICE response</summary>
|
||||
/// <param name="identify">Decoded IDENTIFY DEVICE</param>
|
||||
/// <returns>Raw IDENTIFY DEVICE response</returns>
|
||||
public static byte[] Encode(IdentifyDevice? identify)
|
||||
|
||||
@@ -34,9 +34,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
{
|
||||
/// <summary>
|
||||
/// List of known SCSI peripheral qualifiers
|
||||
/// </summary>
|
||||
/// <summary>List of known SCSI peripheral qualifiers</summary>
|
||||
public enum PeripheralQualifiers : byte
|
||||
{
|
||||
/// <summary>Peripheral qualifier: Device is connected and supported</summary>
|
||||
@@ -51,9 +49,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
VendorMask = 0x04
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known peripheral device types
|
||||
/// </summary>
|
||||
/// <summary>List of known peripheral device types</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum PeripheralDeviceTypes : byte
|
||||
{
|
||||
@@ -105,9 +101,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
UnknownDevice = 0x1F
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known ANSI SCSI standards
|
||||
/// </summary>
|
||||
/// <summary>List of known ANSI SCSI standards</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum ANSIVersions : byte
|
||||
{
|
||||
@@ -127,9 +121,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
ANSI2008Version = 0x06
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known ECMA SCSI standards
|
||||
/// </summary>
|
||||
/// <summary>List of known ECMA SCSI standards</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum ECMAVersions : byte
|
||||
{
|
||||
@@ -139,9 +131,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
ECMA111 = 0x01
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known ISO SCSI standards
|
||||
/// </summary>
|
||||
/// <summary>List of known ISO SCSI standards</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum ISOVersions : byte
|
||||
{
|
||||
@@ -151,9 +141,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
ISO1995Version = 0x02
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known SCSI Parallel Interface clocking types
|
||||
/// </summary>
|
||||
/// <summary>List of known SCSI Parallel Interface clocking types</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum SPIClocking : byte
|
||||
{
|
||||
@@ -167,9 +155,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
STandDT = 0x03
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known TGPS values
|
||||
/// </summary>
|
||||
/// <summary>List of known TGPS values</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum TGPSValues : byte
|
||||
{
|
||||
@@ -183,9 +169,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
Both = 0x03
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known SCSI protocols
|
||||
/// </summary>
|
||||
/// <summary>List of known SCSI protocols</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum ProtocolIdentifiers : byte
|
||||
{
|
||||
@@ -217,37 +201,23 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
NoProtocol = 15
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known SCSI definitions
|
||||
/// </summary>
|
||||
/// <summary>List of known SCSI definitions</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum ScsiDefinitions : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <summary>Unknown</summary>
|
||||
Current = 0,
|
||||
/// <summary>
|
||||
/// SCSI-1
|
||||
/// </summary>
|
||||
/// <summary>SCSI-1</summary>
|
||||
SCSI1 = 1,
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <summary>Unknown</summary>
|
||||
CCS = 2,
|
||||
/// <summary>
|
||||
/// SCSI-2
|
||||
/// </summary>
|
||||
SCSI2 = 3,
|
||||
/// <summary>
|
||||
/// SCSI-3
|
||||
/// </summary>
|
||||
/// <summary>SCSI-2</summary>
|
||||
SCSI2 = 3,
|
||||
/// <summary>SCSI-3</summary>
|
||||
SCSI3 = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// List of known SCSI physical interfaces
|
||||
/// </summary>
|
||||
/// <summary>List of known SCSI physical interfaces</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public enum PhysicalInterfaces : uint
|
||||
{
|
||||
|
||||
@@ -251,9 +251,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
0x48, 0x69, 0x2D, 0x4D, 0x44, 0x20, 0x20, 0x20
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Decodes a SCSI INQUIRY response
|
||||
/// </summary>
|
||||
/// <summary>Decodes a SCSI INQUIRY response</summary>
|
||||
/// <param name="SCSIInquiryResponse">INQUIRY raw response data</param>
|
||||
/// <returns>Decoded SCSI INQUIRY</returns>
|
||||
#region Public methods
|
||||
@@ -513,9 +511,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI
|
||||
return decoded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Encodes a SCSI INQUIRY response
|
||||
/// </summary>
|
||||
/// <summary>Encodes a SCSI INQUIRY response</summary>
|
||||
/// <param name="inq">Decoded SCSI INQUIRY</param>
|
||||
/// <returns>Raw SCSI INQUIRY response</returns>
|
||||
public static byte[] Encode(Inquiry? inq)
|
||||
|
||||
@@ -46,9 +46,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI.Modes
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public class ModePage_2A
|
||||
{
|
||||
/// <summary>
|
||||
/// Write speed performance descriptors
|
||||
/// </summary>
|
||||
/// <summary>Write speed performance descriptors</summary>
|
||||
public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors;
|
||||
/// <summary>Parameters can be saved</summary>
|
||||
public bool PS { get; set; }
|
||||
@@ -97,133 +95,74 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI.Modes
|
||||
/// <summary>Current drive speed in Kbytes/second</summary>
|
||||
public ushort CurrentSpeed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Can read packet media
|
||||
/// </summary>
|
||||
public bool Method2 { get; set; }
|
||||
/// <summary>
|
||||
/// Can read CD-RW
|
||||
/// </summary>
|
||||
public bool ReadCDRW { get; set; }
|
||||
/// <summary>
|
||||
/// Can read CD-R
|
||||
/// </summary>
|
||||
public bool ReadCDR { get; set; }
|
||||
/// <summary>
|
||||
/// Can write CD-RW
|
||||
/// </summary>
|
||||
public bool WriteCDRW { get; set; }
|
||||
/// <summary>
|
||||
/// Can write CD-R
|
||||
/// </summary>
|
||||
public bool WriteCDR { get; set; }
|
||||
/// <summary>
|
||||
/// Supports IEC-958 digital output on port 2
|
||||
/// </summary>
|
||||
/// <summary>Can read packet media</summary>
|
||||
public bool Method2 { get; set; }
|
||||
/// <summary>Can read CD-RW</summary>
|
||||
public bool ReadCDRW { get; set; }
|
||||
/// <summary>Can read CD-R</summary>
|
||||
public bool ReadCDR { get; set; }
|
||||
/// <summary>Can write CD-RW</summary>
|
||||
public bool WriteCDRW { get; set; }
|
||||
/// <summary>Can write CD-R</summary>
|
||||
public bool WriteCDR { get; set; }
|
||||
/// <summary>Supports IEC-958 digital output on port 2</summary>
|
||||
public bool DigitalPort2 { get; set; }
|
||||
/// <summary>
|
||||
/// Supports IEC-958 digital output on port 1
|
||||
/// </summary>
|
||||
/// <summary>Supports IEC-958 digital output on port 1</summary>
|
||||
public bool DigitalPort1 { get; set; }
|
||||
/// <summary>Can deliver a composite audio and video data stream</summary>
|
||||
public bool Composite { get; set; }
|
||||
/// <summary>This bit controls the behavior of the LOAD/UNLOAD command when trying to load a Slot with no Disc present</summary>
|
||||
public bool SSS { get; set; }
|
||||
/// <summary>Contains a changer that can report the exact contents of the slots</summary>
|
||||
public bool SDP { get; set; }
|
||||
/// <summary>Page length</summary>
|
||||
public byte Length { get; set; }
|
||||
/// <summary>Set if LSB comes first</summary>
|
||||
public bool LSBF { get; set; }
|
||||
/// <summary>Set if HIGH on LRCK indicates left channel. Clear if HIGH on LRCK indicates right channel.</summary>
|
||||
public bool RCK { get; set; }
|
||||
/// <summary>
|
||||
/// Can deliver a composite audio and video data stream
|
||||
/// Set if data valid on the falling edge of the BCK signal. Clear if data valid on the rising edge of the BCK
|
||||
/// signal
|
||||
/// </summary>
|
||||
public bool Composite { get; set; }
|
||||
/// <summary>
|
||||
/// This bit controls the behavior of the LOAD/UNLOAD command when trying to load a Slot with no Disc present
|
||||
/// </summary>
|
||||
public bool SSS { get; set; }
|
||||
/// <summary>
|
||||
/// Contains a changer that can report the exact contents of the slots
|
||||
/// </summary>
|
||||
public bool SDP { get; set; }
|
||||
/// <summary>
|
||||
/// Page length
|
||||
/// </summary>
|
||||
public byte Length { get; set; }
|
||||
/// <summary>
|
||||
/// Set if LSB comes first
|
||||
/// </summary>
|
||||
public bool LSBF { get; set; }
|
||||
/// <summary>
|
||||
/// Set if HIGH on LRCK indicates left channel. Clear if HIGH on LRCK indicates right channel.
|
||||
/// </summary>
|
||||
public bool RCK { get; set; }
|
||||
/// <summary>
|
||||
/// Set if data valid on the falling edge of the BCK signal. Clear if data valid on the rising edge of the BCK signal
|
||||
/// </summary>
|
||||
public bool BCK { get; set; }
|
||||
public bool BCK { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Can do a test write
|
||||
/// </summary>
|
||||
public bool TestWrite { get; set; }
|
||||
/// <summary>
|
||||
/// Maximum write speed
|
||||
/// </summary>
|
||||
public ushort MaxWriteSpeed { get; set; }
|
||||
/// <summary>
|
||||
/// Current write speed
|
||||
/// </summary>
|
||||
/// <summary>Can do a test write</summary>
|
||||
public bool TestWrite { get; set; }
|
||||
/// <summary>Maximum write speed</summary>
|
||||
public ushort MaxWriteSpeed { get; set; }
|
||||
/// <summary>Current write speed</summary>
|
||||
public ushort CurrentWriteSpeed { get; set; }
|
||||
/// <summary>
|
||||
/// Can read disc's barcode
|
||||
/// </summary>
|
||||
/// <summary>Can read disc's barcode</summary>
|
||||
public bool ReadBarcode { get; set; }
|
||||
/// <summary>
|
||||
/// Can read DVD-RAM
|
||||
/// </summary>
|
||||
public bool ReadDVDRAM { get; set; }
|
||||
/// <summary>
|
||||
/// Can read DVD-R
|
||||
/// </summary>
|
||||
public bool ReadDVDR { get; set; }
|
||||
/// <summary>
|
||||
/// Can read DVD-ROM
|
||||
/// </summary>
|
||||
public bool ReadDVDROM { get; set; }
|
||||
/// <summary>
|
||||
/// Can write DVD-RAM
|
||||
/// </summary>
|
||||
public bool WriteDVDRAM { get; set; }
|
||||
/// <summary>
|
||||
/// Can write DVD-R
|
||||
/// </summary>
|
||||
public bool WriteDVDR { get; set; }
|
||||
/// <summary>
|
||||
/// Can read raw R-W subchannel from the Lead-In
|
||||
/// </summary>
|
||||
public bool LeadInPW { get; set; }
|
||||
/// <summary>
|
||||
/// Can read both sides of a disc
|
||||
/// </summary>
|
||||
public bool SCC { get; set; }
|
||||
/// <summary>
|
||||
/// Support copyright management
|
||||
/// </summary>
|
||||
/// <summary>Can read DVD-RAM</summary>
|
||||
public bool ReadDVDRAM { get; set; }
|
||||
/// <summary>Can read DVD-R</summary>
|
||||
public bool ReadDVDR { get; set; }
|
||||
/// <summary>Can read DVD-ROM</summary>
|
||||
public bool ReadDVDROM { get; set; }
|
||||
/// <summary>Can write DVD-RAM</summary>
|
||||
public bool WriteDVDRAM { get; set; }
|
||||
/// <summary>Can write DVD-R</summary>
|
||||
public bool WriteDVDR { get; set; }
|
||||
/// <summary>Can read raw R-W subchannel from the Lead-In</summary>
|
||||
public bool LeadInPW { get; set; }
|
||||
/// <summary>Can read both sides of a disc</summary>
|
||||
public bool SCC { get; set; }
|
||||
/// <summary>Support copyright management</summary>
|
||||
public ushort CMRSupported { get; set; }
|
||||
/// <summary>
|
||||
/// Supports buffer under-run free recording
|
||||
/// </summary>
|
||||
public bool BUF { get; set; }
|
||||
/// <summary>
|
||||
/// Selected rotational control
|
||||
/// </summary>
|
||||
public byte RotationControlSelected { get; set; }
|
||||
/// <summary>
|
||||
/// Current write speed selected
|
||||
/// </summary>
|
||||
/// <summary>Supports buffer under-run free recording</summary>
|
||||
public bool BUF { get; set; }
|
||||
/// <summary>Selected rotational control</summary>
|
||||
public byte RotationControlSelected { get; set; }
|
||||
/// <summary>Current write speed selected</summary>
|
||||
public ushort CurrentWriteSpeedSelected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Database ID
|
||||
/// </summary>
|
||||
/// <summary>Database ID</summary>
|
||||
[JsonIgnore, Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the page 2Ah of a MODE SENSE response
|
||||
/// </summary>
|
||||
/// <summary>Decodes the page 2Ah of a MODE SENSE response</summary>
|
||||
/// <param name="pageResponse">Raw page 2Ah</param>
|
||||
/// <returns>Decoded page 2Ah</returns>
|
||||
public static ModePage_2A Decode(byte[] pageResponse)
|
||||
@@ -337,9 +276,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI.Modes
|
||||
return decoded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Encodes a page 2Ah of a MODE SENSE response
|
||||
/// </summary>
|
||||
/// <summary>Encodes a page 2Ah of a MODE SENSE response</summary>
|
||||
/// <param name="decoded">Decoded page 2Ah</param>
|
||||
/// <returns>Raw page 2Ah</returns>
|
||||
public static byte[] Encode(ModePage_2A decoded)
|
||||
@@ -564,19 +501,13 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI.Modes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Page 2Ah write descriptor
|
||||
/// </summary>
|
||||
/// <summary>Page 2Ah write descriptor</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public struct ModePage_2A_WriteDescriptor
|
||||
{
|
||||
/// <summary>
|
||||
/// Rotational control
|
||||
/// </summary>
|
||||
public byte RotationControl;
|
||||
/// <summary>
|
||||
/// Write speed
|
||||
/// </summary>
|
||||
/// <summary>Rotational control</summary>
|
||||
public byte RotationControl;
|
||||
/// <summary>Write speed</summary>
|
||||
public ushort WriteSpeed;
|
||||
}
|
||||
#endregion Mode Page 0x2A: CD-ROM capabilities page
|
||||
|
||||
@@ -227,9 +227,7 @@ namespace Aaru.CommonTypes.Structs
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Information about a volume
|
||||
/// </summary>
|
||||
/// <summary>Information about a volume</summary>
|
||||
public class FileSystemInfo
|
||||
{
|
||||
/// <summary>Blocks for this filesystem</summary>
|
||||
@@ -249,53 +247,35 @@ namespace Aaru.CommonTypes.Structs
|
||||
/// <summary>Filesystem type</summary>
|
||||
public string Type;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes an empty instance of this structure
|
||||
/// </summary>
|
||||
/// <summary>Initializes an empty instance of this structure</summary>
|
||||
public FileSystemInfo() => Id = new FileSystemId();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a clone of this structure
|
||||
/// </summary>
|
||||
/// <summary>Gets a clone of this structure</summary>
|
||||
/// <returns>Clone of this structure</returns>
|
||||
public FileSystemInfo ShallowCopy() => (FileSystemInfo)MemberwiseClone();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stores a filesystem volume unique identifier or serial number
|
||||
/// </summary>
|
||||
/// <summary>Stores a filesystem volume unique identifier or serial number</summary>
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct FileSystemId
|
||||
{
|
||||
/// <summary>
|
||||
/// Set to <c>true</c> if the identifier is a 32-bit integer
|
||||
/// </summary>
|
||||
/// <summary>Set to <c>true</c> if the identifier is a 32-bit integer</summary>
|
||||
[FieldOffset(0)]
|
||||
public bool IsInt;
|
||||
/// <summary>
|
||||
/// Set to <c>true</c> if the identifier is a 64-bit integer
|
||||
/// </summary>
|
||||
/// <summary>Set to <c>true</c> if the identifier is a 64-bit integer</summary>
|
||||
[FieldOffset(1)]
|
||||
public bool IsLong;
|
||||
/// <summary>
|
||||
/// Set to <c>true</c> if the identifier is a GUID
|
||||
/// </summary>
|
||||
/// <summary>Set to <c>true</c> if the identifier is a GUID</summary>
|
||||
[FieldOffset(2)]
|
||||
public bool IsGuid;
|
||||
|
||||
/// <summary>
|
||||
/// Identifier as a 32-bit integer
|
||||
/// </summary>
|
||||
/// <summary>Identifier as a 32-bit integer</summary>
|
||||
[FieldOffset(3)]
|
||||
public uint Serial32;
|
||||
/// <summary>
|
||||
/// Identifier as a 64-bit integer
|
||||
/// </summary>
|
||||
/// <summary>Identifier as a 64-bit integer</summary>
|
||||
[FieldOffset(3)]
|
||||
public ulong Serial64;
|
||||
/// <summary>
|
||||
/// Identifier as a GUID
|
||||
/// </summary>
|
||||
/// <summary>Identifier as a GUID</summary>
|
||||
[FieldOffset(3)]
|
||||
public Guid uuid;
|
||||
}
|
||||
|
||||
@@ -167,9 +167,7 @@ namespace Aaru.CommonTypes.Structs
|
||||
/// <summary>Partition type</summary>
|
||||
public TrackType TrackType;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes an empty instance of this structure
|
||||
/// </summary>
|
||||
/// <summary>Initializes an empty instance of this structure</summary>
|
||||
public Track() => Indexes = new Dictionary<ushort, int>();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
|
||||
namespace Aaru.CommonTypes.Structs
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a tape file
|
||||
/// </summary>
|
||||
/// <summary>Describes a tape file</summary>
|
||||
public struct TapeFile
|
||||
{
|
||||
/// <summary>File number</summary>
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
|
||||
namespace Aaru.CommonTypes.Structs
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a tape partition
|
||||
/// </summary>
|
||||
/// <summary>Describes a tape partition</summary>
|
||||
public struct TapePartition
|
||||
{
|
||||
/// <summary>Partition number</summary>
|
||||
|
||||
Reference in New Issue
Block a user