Files
Aaru/DiscImageChef.Decoders/SCSI/Modes/Structs.cs

73 lines
2.6 KiB
C#
Raw Normal View History

2017-12-21 02:03:21 +00:00
// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Structs.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : Device structures decoders.
//
// --[ Description ] ----------------------------------------------------------
//
// Common structures for MODE pages decoding and encoding.
//
// --[ License ] --------------------------------------------------------------
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2018-12-29 17:34:38 +00:00
// Copyright © 2011-2019 Natalia Portillo
2017-12-21 02:03:21 +00:00
// ****************************************************************************/
using System.Diagnostics.CodeAnalysis;
2017-12-21 02:03:21 +00:00
namespace DiscImageChef.Decoders.SCSI
{
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
2017-12-21 02:03:21 +00:00
public static partial class Modes
{
public struct BlockDescriptor
{
public DensityType Density;
2018-06-22 08:08:38 +01:00
public ulong Blocks;
public uint BlockLength;
2017-12-21 02:03:21 +00:00
}
public struct ModeHeader
{
2018-06-22 08:08:38 +01:00
public MediumTypes MediumType;
public bool WriteProtected;
2017-12-21 02:03:21 +00:00
public BlockDescriptor[] BlockDescriptors;
2018-06-22 08:08:38 +01:00
public byte Speed;
public byte BufferedMode;
public bool EBC;
public bool DPOFUA;
2017-12-21 02:03:21 +00:00
}
public struct ModePage
{
2018-06-22 08:08:38 +01:00
public byte Page;
public byte Subpage;
2017-12-21 02:03:21 +00:00
public byte[] PageResponse;
}
public struct DecodedMode
{
public ModeHeader Header;
public ModePage[] Pages;
}
}
}