mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Added manual test subapplication for device commands.
This commit is contained in:
83
DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs
Normal file
83
DiscImageChef.Tests.Devices/SecureDigital/MultiMediaCard.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : MultiMediaCard.cs
|
||||
// Version : 1.0
|
||||
// Author(s) : Natalia Portillo
|
||||
//
|
||||
// Component : Component
|
||||
//
|
||||
// Revision : $Revision$
|
||||
// Last change by : $Author$
|
||||
// Date : $Date$
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Description
|
||||
//
|
||||
// --[ 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/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2015 Claunia.com
|
||||
// ****************************************************************************/
|
||||
// //$Id$
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
{
|
||||
public static class MultiMediaCard
|
||||
{
|
||||
public static void Menu(string devPath, Device dev)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Send a MultiMediaCard command to the device:");
|
||||
DicConsole.WriteLine("1.- Send READ_MULTIPLE_BLOCK command.");
|
||||
DicConsole.WriteLine("2.- Send READ_SINGLE_BLOCK command.");
|
||||
DicConsole.WriteLine("3.- Send SEND_CSD command.");
|
||||
DicConsole.WriteLine("4.- Send SEND_EXT_CSD command.");
|
||||
DicConsole.WriteLine("5.- Send SEND_OP_COND command.");
|
||||
DicConsole.WriteLine("6.- Send SEND_STATUS command.");
|
||||
DicConsole.WriteLine("7.- Send SET_BLOCKLEN command.");
|
||||
DicConsole.WriteLine("0.- Return to SecureDigital/MultiMediaCard commands menu.");
|
||||
DicConsole.Write("Choose: ");
|
||||
|
||||
string strDev = System.Console.ReadLine();
|
||||
if(!int.TryParse(strDev, out int item))
|
||||
{
|
||||
DicConsole.WriteLine("Not a number. Press any key to continue...");
|
||||
System.Console.ReadKey();
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(item)
|
||||
{
|
||||
case 0:
|
||||
DicConsole.WriteLine("Returning to SecureDigital/MultiMediaCard commands menu...");
|
||||
return;
|
||||
default:
|
||||
DicConsole.WriteLine("Incorrect option. Press any key to continue...");
|
||||
System.Console.ReadKey();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
79
DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs
Normal file
79
DiscImageChef.Tests.Devices/SecureDigital/SecureDigital.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : SecureDigital.cs
|
||||
// Version : 1.0
|
||||
// Author(s) : Natalia Portillo
|
||||
//
|
||||
// Component : Component
|
||||
//
|
||||
// Revision : $Revision$
|
||||
// Last change by : $Author$
|
||||
// Date : $Date$
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Description
|
||||
//
|
||||
// --[ 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/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright (C) 2011-2015 Claunia.com
|
||||
// ****************************************************************************/
|
||||
// //$Id$
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Devices;
|
||||
|
||||
namespace DiscImageChef.Tests.Devices.SecureDigital
|
||||
{
|
||||
public static class SecureDigital
|
||||
{
|
||||
public static void Menu(string devPath, Device dev)
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Send a SecureDigital command to the device:");
|
||||
DicConsole.WriteLine("1.- Send SD_SEND_OP_COND command.");
|
||||
DicConsole.WriteLine("2.- Send SD_STATUS command.");
|
||||
DicConsole.WriteLine("3.- Send SEND_SCR command.");
|
||||
DicConsole.WriteLine("0.- Return to SecureDigital/MultiMediaCard commands menu.");
|
||||
DicConsole.Write("Choose: ");
|
||||
|
||||
string strDev = System.Console.ReadLine();
|
||||
if(!int.TryParse(strDev, out int item))
|
||||
{
|
||||
DicConsole.WriteLine("Not a number. Press any key to continue...");
|
||||
System.Console.ReadKey();
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(item)
|
||||
{
|
||||
case 0:
|
||||
DicConsole.WriteLine("Returning to SecureDigital/MultiMediaCard commands menu...");
|
||||
return;
|
||||
default:
|
||||
DicConsole.WriteLine("Incorrect option. Press any key to continue...");
|
||||
System.Console.ReadKey();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user