2018-09-01 19:22:46 +01:00
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:25 +00:00
|
|
|
// Aaru Data Preservation Suite
|
2018-09-01 19:22:46 +01:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Filename : Properties.cs
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// Component : Core.
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Contains the device info properties.
|
|
|
|
|
//
|
|
|
|
|
// --[ 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/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2020-12-31 23:08:23 +00:00
|
|
|
// Copyright © 2011-2021 Natalia Portillo
|
2018-09-01 19:22:46 +01:00
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2020-02-27 00:33:26 +00:00
|
|
|
using Aaru.CommonTypes.Enums;
|
|
|
|
|
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
|
|
|
|
using Aaru.Decoders.ATA;
|
2021-01-24 18:25:48 +01:00
|
|
|
using Aaru.Decoders.DVD;
|
2020-02-27 00:33:26 +00:00
|
|
|
using Aaru.Decoders.SCSI;
|
|
|
|
|
using Aaru.Decoders.SCSI.SSC;
|
|
|
|
|
using Aaru.Devices;
|
|
|
|
|
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
|
2018-09-01 19:22:46 +01:00
|
|
|
|
2020-02-27 00:33:26 +00:00
|
|
|
namespace Aaru.Core.Devices.Info
|
2018-09-01 19:22:46 +01:00
|
|
|
{
|
|
|
|
|
public partial class DeviceInfo
|
|
|
|
|
{
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw IDENTIFY DEVICE response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] AtaIdentify { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw IDENTIFY PACKET DEVICE response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] AtapiIdentify { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw INQUIRY response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] ScsiInquiryData { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded INQUIRY response
|
|
|
|
|
/// </summary>
|
2020-01-11 20:55:54 +00:00
|
|
|
public Inquiry? ScsiInquiry { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Response for ATA Memory Card Pass Through
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public AtaErrorRegistersChs? AtaMcptError { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// List of raw EVPD page indexed by page number
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public Dictionary<byte, byte[]> ScsiEvpdPages { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded MODE SENSE response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public Modes.DecodedMode? ScsiMode { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw MODE SENSE(6) response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] ScsiModeSense6 { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw MODE SENSE(10) response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] ScsiModeSense10 { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw GET CONFIGURATION response
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] MmcConfiguration { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded Plextor features
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public Plextor PlextorFeatures { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded Kreon features
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public KreonFeatures KreonFeatures { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw GET BLOCK LIMITS support
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] BlockLimits { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw density support
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] DensitySupport { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded density support
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public DensitySupport.DensitySupportHeader? DensitySupportHeader { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw medium density support
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] MediumDensitySupport { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Decoded medium density support
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public DensitySupport.MediaTypeSupportHeader? MediaTypeSupportHeader { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw CID registers
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] CID { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw CSD
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] CSD { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw extended CSD
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] ExtendedCSD { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw SCR registers
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] SCR { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw OCR registers
|
|
|
|
|
/// </summary>
|
2018-09-01 19:22:46 +01:00
|
|
|
public byte[] OCR { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Aaru's device type
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public DeviceType Type { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Device manufacturer
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string Manufacturer { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Device model
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string Model { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Device firmware version or revision
|
|
|
|
|
/// </summary>
|
2020-01-09 15:02:21 +00:00
|
|
|
public string FirmwareRevision { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Device serial number
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string Serial { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// SCSI Peripheral Device Type
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public PeripheralDeviceTypes ScsiType { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Is media removable from device?
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public bool IsRemovable { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Is device attached via USB?
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public bool IsUsb { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// USB vendor ID
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public ushort UsbVendorId { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// USB product ID
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public ushort UsbProductId { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Raw USB descriptors
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public byte[] UsbDescriptors { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// USB manufacturer string
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string UsbManufacturerString { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// USB product string
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string UsbProductString { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// USB serial number string
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string UsbSerialString { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Is device attached via FireWire?
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public bool IsFireWire { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// FireWire's device GUID
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public ulong FireWireGuid { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// FireWire's device model ID
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public uint FireWireModel { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// FireWire's device model name
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string FireWireModelName { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// FireWire's device vendor ID
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public uint FireWireVendor { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// FireWire's device vendor name
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public string FireWireVendorName { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Is device a CompactFlash device?
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public bool IsCompactFlash { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Is device a PCMCIA or CardBus device?
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public bool IsPcmcia { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// PCMCIA/CardBus CIS
|
|
|
|
|
/// </summary>
|
2018-09-02 00:25:35 +01:00
|
|
|
public byte[] Cis { get; }
|
2021-08-17 13:56:05 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// MMC device CSS/CPRM Region Protection Code
|
|
|
|
|
/// </summary>
|
2021-01-24 18:25:48 +01:00
|
|
|
public CSS_CPRM.RegionalPlaybackControlState? RPC { get; }
|
2018-09-01 19:22:46 +01:00
|
|
|
}
|
|
|
|
|
}
|