Files
Aaru/Aaru.Tests.Devices/SCSI.cs

157 lines
6.0 KiB
C#
Raw Normal View History

// /***************************************************************************
2020-07-25 02:01:36 +01:00
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
// Filename : SCSI.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
2020-07-25 02:01:36 +01:00
// Component : Aaru device testing.
//
// --[ 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
// ****************************************************************************/
2020-02-27 00:33:26 +00:00
using Aaru.Console;
using Aaru.Devices;
2020-02-29 18:03:35 +00:00
using Aaru.Tests.Devices.SCSI;
2020-02-27 00:33:26 +00:00
namespace Aaru.Tests.Devices
{
2020-02-29 18:03:35 +00:00
internal static partial class MainClass
{
public static void Scsi(string devPath, Device dev)
{
while(true)
{
System.Console.Clear();
2020-02-29 18:03:35 +00:00
AaruConsole.WriteLine("Device: {0}", devPath);
AaruConsole.WriteLine("Send a SCSI command to the device:");
AaruConsole.WriteLine("1.- Send an Adaptec vendor command to the device.");
AaruConsole.WriteLine("2.- Send an Archive vendor command to the device.");
AaruConsole.WriteLine("3.- Send a Certance vendor command to the device.");
AaruConsole.WriteLine("4.- Send a Fujitsu vendor command to the device.");
AaruConsole.WriteLine("5.- Send an HL-DT-ST vendor command to the device.");
AaruConsole.WriteLine("6.- Send a Hewlett-Packard vendor command to the device.");
AaruConsole.WriteLine("7.- Send a Kreon vendor command to the device.");
AaruConsole.WriteLine("8.- Send a SCSI MultiMedia Command to the device.");
AaruConsole.WriteLine("9.- Send a NEC vendor command to the device.");
AaruConsole.WriteLine("10.- Send a Pioneer vendor command to the device.");
AaruConsole.WriteLine("11.- Send a Plasmon vendor command to the device.");
AaruConsole.WriteLine("12.- Send a Plextor vendor command to the device.");
AaruConsole.WriteLine("13.- Send a SCSI Block Command to the device.");
AaruConsole.WriteLine("14.- Send a SCSI Media Changer command to the device.");
AaruConsole.WriteLine("15.- Send a SCSI Primary Command to the device.");
AaruConsole.WriteLine("16.- Send a SCSI Streaming Command to the device.");
AaruConsole.WriteLine("17.- Send a SyQuest vendor command to the device.");
AaruConsole.WriteLine("0.- Return to command class menu.");
AaruConsole.Write("Choose: ");
string strDev = System.Console.ReadLine();
2020-02-29 18:03:35 +00:00
if(!int.TryParse(strDev, out int item))
{
2020-02-29 18:03:35 +00:00
AaruConsole.WriteLine("Not a number. Press any key to continue...");
System.Console.ReadKey();
2020-02-29 18:03:35 +00:00
continue;
}
switch(item)
{
case 0:
2020-02-29 18:03:35 +00:00
AaruConsole.WriteLine("Returning to command class menu...");
return;
case 1:
Adaptec.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
continue;
2017-09-08 20:05:23 +01:00
case 2:
ArchiveCorp.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 3:
Certance.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 4:
Fujitsu.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 5:
HlDtSt.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 6:
Hp.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 7:
Kreon.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 8:
Mmc.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 9:
Nec.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 10:
Pioneer.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 11:
Plasmon.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 12:
Plextor.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 13:
Sbc.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 14:
Smc.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 15:
Spc.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 16:
Ssc.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
case 17:
SyQuest.Menu(devPath, dev);
2020-02-29 18:03:35 +00:00
2017-09-08 20:05:23 +01:00
continue;
default:
2020-02-29 18:03:35 +00:00
AaruConsole.WriteLine("Incorrect option. Press any key to continue...");
System.Console.ReadKey();
2020-02-29 18:03:35 +00:00
continue;
}
}
}
}
2017-12-19 20:33:03 +00:00
}