2017-12-21 02:03:21 +00:00
|
|
|
|
// /***************************************************************************
|
2020-02-27 12:31:23 +00:00
|
|
|
|
// Aaru Data Preservation Suite
|
2017-12-21 02:03:21 +00:00
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : 10_SSC.cs
|
|
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
|
//
|
|
|
|
|
|
// Component : Device structures decoders.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Decodes SCSI MODE PAGE 10h: Device configuration page.
|
|
|
|
|
|
//
|
|
|
|
|
|
// --[ 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/>.
|
|
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2022-12-03 16:07:08 +00:00
|
|
|
|
// Copyright © 2011-2023 Natalia Portillo
|
2017-12-21 02:03:21 +00:00
|
|
|
|
// ****************************************************************************/
|
|
|
|
|
|
|
2017-12-22 02:04:18 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2017-12-21 02:03:21 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
2022-11-15 15:58:41 +00:00
|
|
|
|
namespace Aaru.Decoders.SCSI;
|
|
|
|
|
|
|
2023-10-03 23:09:28 +01:00
|
|
|
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
|
|
|
|
|
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
|
|
|
|
|
|
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
2022-03-06 13:29:37 +00:00
|
|
|
|
public static partial class Modes
|
2017-12-21 02:03:21 +00:00
|
|
|
|
{
|
2023-10-03 23:09:28 +01:00
|
|
|
|
#region Mode Page 0x10: Device configuration page
|
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
/// <summary>Device configuration page Page code 0x10 16 bytes in SCSI-2, SSC-1, SSC-2, SSC-3</summary>
|
2023-10-05 01:05:20 +01:00
|
|
|
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
2022-03-06 13:29:37 +00:00
|
|
|
|
public struct ModePage_10_SSC
|
2017-12-21 02:03:21 +00:00
|
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
|
/// <summary>Parameters can be saved</summary>
|
|
|
|
|
|
public bool PS;
|
|
|
|
|
|
/// <summary>Used in mode select to change partition to one specified in <see cref="ActivePartition" /></summary>
|
|
|
|
|
|
public bool CAP;
|
|
|
|
|
|
/// <summary>Used in mode select to change format to one specified in <see cref="ActiveFormat" /></summary>
|
|
|
|
|
|
public bool CAF;
|
|
|
|
|
|
/// <summary>Active format, vendor-specific</summary>
|
|
|
|
|
|
public byte ActiveFormat;
|
|
|
|
|
|
/// <summary>Current logical partition</summary>
|
|
|
|
|
|
public byte ActivePartition;
|
|
|
|
|
|
/// <summary>How full the buffer shall be before writing to medium</summary>
|
|
|
|
|
|
public byte WriteBufferFullRatio;
|
|
|
|
|
|
/// <summary>How empty the buffer shall be before reading more data from the medium</summary>
|
|
|
|
|
|
public byte ReadBufferEmptyRatio;
|
|
|
|
|
|
/// <summary>Delay in 100 ms before buffered data is forcefully written to the medium even before buffer is full</summary>
|
|
|
|
|
|
public ushort WriteDelayTime;
|
|
|
|
|
|
/// <summary>Drive supports recovering data from buffer</summary>
|
|
|
|
|
|
public bool DBR;
|
|
|
|
|
|
/// <summary>Medium has block IDs</summary>
|
|
|
|
|
|
public bool BIS;
|
|
|
|
|
|
/// <summary>Drive recognizes and reports setmarks</summary>
|
|
|
|
|
|
public bool RSmk;
|
|
|
|
|
|
/// <summary>Drive selects best speed</summary>
|
|
|
|
|
|
public bool AVC;
|
|
|
|
|
|
/// <summary>If drive should stop pre-reading on filemarks</summary>
|
|
|
|
|
|
public byte SOCF;
|
|
|
|
|
|
/// <summary>If set, recovered buffer data is LIFO, otherwise, FIFO</summary>
|
|
|
|
|
|
public bool RBO;
|
|
|
|
|
|
/// <summary>Report early warnings</summary>
|
|
|
|
|
|
public bool REW;
|
|
|
|
|
|
/// <summary>Inter-block gap</summary>
|
|
|
|
|
|
public byte GapSize;
|
|
|
|
|
|
/// <summary>End-of-Data format</summary>
|
|
|
|
|
|
public byte EODDefined;
|
|
|
|
|
|
/// <summary>EOD generation enabled</summary>
|
|
|
|
|
|
public bool EEG;
|
|
|
|
|
|
/// <summary>Synchronize data to medium on early warning</summary>
|
|
|
|
|
|
public bool SEW;
|
|
|
|
|
|
/// <summary>Bytes to reduce buffer size on early warning</summary>
|
|
|
|
|
|
public uint BufferSizeEarlyWarning;
|
|
|
|
|
|
/// <summary>Selected data compression algorithm</summary>
|
|
|
|
|
|
public byte SelectedCompression;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>Soft write protect</summary>
|
|
|
|
|
|
public bool SWP;
|
|
|
|
|
|
/// <summary>Associated write protect</summary>
|
|
|
|
|
|
public bool ASOCWP;
|
|
|
|
|
|
/// <summary>Persistent write protect</summary>
|
|
|
|
|
|
public bool PERSWP;
|
|
|
|
|
|
/// <summary>Permanent write protect</summary>
|
|
|
|
|
|
public bool PRMWP;
|
|
|
|
|
|
|
|
|
|
|
|
public bool BAML;
|
|
|
|
|
|
public bool BAM;
|
|
|
|
|
|
public byte RewindOnReset;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>How drive shall respond to detection of compromised WORM medium integrity</summary>
|
|
|
|
|
|
public byte WTRE;
|
|
|
|
|
|
/// <summary>Respond to commands only if a reservation exists</summary>
|
|
|
|
|
|
public bool OIR;
|
|
|
|
|
|
}
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
public static ModePage_10_SSC? DecodeModePage_10_SSC(byte[] pageResponse)
|
|
|
|
|
|
{
|
|
|
|
|
|
if((pageResponse?[0] & 0x40) == 0x40)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
if((pageResponse?[0] & 0x3F) != 0x10)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
if(pageResponse[1] + 2 != pageResponse.Length)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
if(pageResponse.Length < 16)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
var decoded = new ModePage_10_SSC();
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.PS |= (pageResponse[0] & 0x80) == 0x80;
|
|
|
|
|
|
decoded.CAP |= (pageResponse[2] & 0x40) == 0x40;
|
|
|
|
|
|
decoded.CAF |= (pageResponse[2] & 0x20) == 0x20;
|
|
|
|
|
|
decoded.ActiveFormat = (byte)(pageResponse[2] & 0x1F);
|
|
|
|
|
|
decoded.ActivePartition = pageResponse[3];
|
|
|
|
|
|
decoded.WriteBufferFullRatio = pageResponse[4];
|
|
|
|
|
|
decoded.ReadBufferEmptyRatio = pageResponse[5];
|
|
|
|
|
|
decoded.WriteDelayTime = (ushort)((pageResponse[6] << 8) + pageResponse[7]);
|
|
|
|
|
|
decoded.DBR |= (pageResponse[8] & 0x80) == 0x80;
|
|
|
|
|
|
decoded.BIS |= (pageResponse[8] & 0x40) == 0x40;
|
|
|
|
|
|
decoded.RSmk |= (pageResponse[8] & 0x20) == 0x20;
|
|
|
|
|
|
decoded.AVC |= (pageResponse[8] & 0x10) == 0x10;
|
|
|
|
|
|
decoded.RBO |= (pageResponse[8] & 0x02) == 0x02;
|
|
|
|
|
|
decoded.REW |= (pageResponse[8] & 0x01) == 0x01;
|
|
|
|
|
|
decoded.EEG |= (pageResponse[10] & 0x10) == 0x10;
|
|
|
|
|
|
decoded.SEW |= (pageResponse[10] & 0x08) == 0x08;
|
|
|
|
|
|
decoded.SOCF = (byte)((pageResponse[8] & 0x0C) >> 2);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-07 07:36:42 +00:00
|
|
|
|
decoded.BufferSizeEarlyWarning = (uint)((pageResponse[11] << 16) + (pageResponse[12] << 8) + pageResponse[13]);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.SelectedCompression = pageResponse[14];
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.SWP |= (pageResponse[10] & 0x04) == 0x04;
|
|
|
|
|
|
decoded.ASOCWP |= (pageResponse[15] & 0x04) == 0x04;
|
|
|
|
|
|
decoded.PERSWP |= (pageResponse[15] & 0x02) == 0x02;
|
|
|
|
|
|
decoded.PRMWP |= (pageResponse[15] & 0x01) == 0x01;
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.BAML |= (pageResponse[10] & 0x02) == 0x02;
|
|
|
|
|
|
decoded.BAM |= (pageResponse[10] & 0x01) == 0x01;
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.RewindOnReset = (byte)((pageResponse[15] & 0x18) >> 3);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
decoded.OIR |= (pageResponse[15] & 0x20) == 0x20;
|
|
|
|
|
|
decoded.WTRE = (byte)((pageResponse[15] & 0xC0) >> 6);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
return decoded;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static string PrettifyModePage_10_SSC(byte[] pageResponse) =>
|
|
|
|
|
|
PrettifyModePage_10_SSC(DecodeModePage_10_SSC(pageResponse));
|
|
|
|
|
|
|
|
|
|
|
|
public static string PrettifyModePage_10_SSC(ModePage_10_SSC? modePage)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!modePage.HasValue)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
ModePage_10_SSC page = modePage.Value;
|
|
|
|
|
|
var sb = new StringBuilder();
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine(Localization.SCSI_Device_configuration_page);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.PS)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Parameters_can_be_saved);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2023-10-03 23:09:28 +01:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Active_format_0, page.ActiveFormat).AppendLine();
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Active_partition_0, page.ActivePartition).AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Write_buffer_shall_have_a_full_ratio_of_0_before_being_flushed_to_medium,
|
2023-10-04 17:34:36 +01:00
|
|
|
|
page.WriteBufferFullRatio).
|
|
|
|
|
|
AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.
|
2023-10-04 17:34:36 +01:00
|
|
|
|
AppendFormat("\t" + Localization.Read_buffer_shall_have_an_empty_ratio_of_0_before_more_data_is_read_from_medium,
|
|
|
|
|
|
page.ReadBufferEmptyRatio).
|
|
|
|
|
|
AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
sb.
|
2023-10-04 17:34:36 +01:00
|
|
|
|
AppendFormat("\t" + Localization.Drive_will_delay_0_ms_before_buffered_data_is_forcefully_written_to_the_medium_even_before_buffer_is_full,
|
|
|
|
|
|
page.WriteDelayTime * 100).
|
|
|
|
|
|
AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
if(page.DBR)
|
|
|
|
|
|
{
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_supports_recovering_data_from_buffer);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2023-10-03 23:09:28 +01:00
|
|
|
|
sb.AppendLine(page.RBO
|
|
|
|
|
|
? "\t" + Localization.Recovered_buffer_data_comes_in_LIFO_order
|
|
|
|
|
|
: "\t" + Localization.Recovered_buffer_data_comes_in_FIFO_order);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.BIS)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Medium_supports_block_IDs);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.RSmk)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_reports_setmarks);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
switch(page.SOCF)
|
2017-12-21 02:03:21 +00:00
|
|
|
|
{
|
2022-03-06 13:29:37 +00:00
|
|
|
|
case 0:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_pre_read_until_buffer_is_full);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
case 1:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_pre_read_until_one_filemark_is_detected);
|
2018-06-22 08:08:38 +01:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
case 2:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_pre_read_until_two_filemark_is_detected);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
case 3:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_pre_read_until_three_filemark_is_detected);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.REW)
|
|
|
|
|
|
{
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_reports_early_warnings);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
if(page.SEW)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_synchronize_buffer_to_medium_on_early_warnings);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
switch(page.GapSize)
|
|
|
|
|
|
{
|
2023-10-03 23:09:28 +01:00
|
|
|
|
case 0:
|
|
|
|
|
|
break;
|
2022-03-06 13:29:37 +00:00
|
|
|
|
case 1:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Inter_block_gap_is_long_enough_to_support_update_in_place);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
case 4:
|
|
|
|
|
|
case 5:
|
|
|
|
|
|
case 6:
|
|
|
|
|
|
case 7:
|
|
|
|
|
|
case 8:
|
|
|
|
|
|
case 9:
|
|
|
|
|
|
case 10:
|
|
|
|
|
|
case 11:
|
|
|
|
|
|
case 12:
|
|
|
|
|
|
case 13:
|
|
|
|
|
|
case 14:
|
|
|
|
|
|
case 15:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Inter_block_gap_is_0_times_the_device_defined_gap_size,
|
2023-10-04 17:34:36 +01:00
|
|
|
|
page.GapSize).
|
|
|
|
|
|
AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Inter_block_gap_is_unknown_value_0, page.GapSize).AppendLine();
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.EEG)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_generates_end_of_data);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
switch(page.SelectedCompression)
|
|
|
|
|
|
{
|
|
|
|
|
|
case 0:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_does_not_use_compression);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
case 1:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_uses_default_compression);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
default:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendFormat("\t" + Localization.Drive_uses_unknown_compression_0, page.SelectedCompression).
|
|
|
|
|
|
AppendLine();
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.SWP)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Software_write_protect_is_enabled);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.ASOCWP)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Associated_write_protect_is_enabled);
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.PERSWP)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Persistent_write_protect_is_enabled);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.PRMWP)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Permanent_write_protect_is_enabled);
|
2017-12-21 02:03:21 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
if(page.BAML)
|
2023-10-03 23:09:28 +01:00
|
|
|
|
{
|
|
|
|
|
|
sb.AppendLine(page.BAM
|
|
|
|
|
|
? "\t" + Localization.Drive_operates_using_explicit_address_mode
|
|
|
|
|
|
: "\t" + Localization.Drive_operates_using_implicit_address_mode);
|
|
|
|
|
|
}
|
2019-11-25 00:54:38 +00:00
|
|
|
|
|
2022-03-06 13:29:37 +00:00
|
|
|
|
switch(page.RewindOnReset)
|
|
|
|
|
|
{
|
|
|
|
|
|
case 1:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_shall_position_to_beginning_of_default_data_partition_on_reset);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 2:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_shall_maintain_its_position_on_reset);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
2017-12-21 02:03:21 +00:00
|
|
|
|
}
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
switch(page.WTRE)
|
|
|
|
|
|
{
|
|
|
|
|
|
case 1:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_do_nothing_on_WORM_tampered_medium);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
case 2:
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_return_CHECK_CONDITION_on_WORM_tampered_medium);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(page.OIR)
|
2022-11-27 13:33:47 +00:00
|
|
|
|
sb.AppendLine("\t" + Localization.Drive_will_only_respond_to_commands_if_it_has_received_a_reservation);
|
2022-03-06 13:29:37 +00:00
|
|
|
|
|
|
|
|
|
|
return sb.ToString();
|
2017-12-21 02:03:21 +00:00
|
|
|
|
}
|
2023-10-03 23:09:28 +01:00
|
|
|
|
|
|
|
|
|
|
#endregion Mode Page 0x10: Device configuration page
|
2017-12-21 02:03:21 +00:00
|
|
|
|
}
|