2022-10-08 17:26:04 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
|
|
// for Raspberry Pi
|
|
|
|
//
|
|
|
|
// Copyright (C) 2022 Uwe Seimet
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "scsi.h"
|
|
|
|
#include "rascsi_interface.pb.h"
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
2022-10-25 08:29:57 +00:00
|
|
|
#include <filesystem>
|
2022-10-08 17:26:04 +00:00
|
|
|
|
|
|
|
using namespace std;
|
2022-10-25 08:29:57 +00:00
|
|
|
using namespace filesystem;
|
2022-10-23 19:51:39 +00:00
|
|
|
using namespace rascsi_interface;
|
2022-10-08 17:26:04 +00:00
|
|
|
|
|
|
|
class PrimaryDevice;
|
|
|
|
class MockAbstractController;
|
|
|
|
|
2022-10-23 19:51:39 +00:00
|
|
|
shared_ptr<PrimaryDevice> CreateDevice(PbDeviceType, MockAbstractController&, const string& = "");
|
|
|
|
|
|
|
|
void TestInquiry(PbDeviceType, scsi_defs::device_type, scsi_defs::scsi_level, const string&,
|
|
|
|
int, bool, const string& = "");
|
|
|
|
|
2022-10-25 08:29:57 +00:00
|
|
|
pair<int, path> OpenTempFile();
|
|
|
|
path CreateTempFile(int);
|
2022-10-23 19:51:39 +00:00
|
|
|
|
|
|
|
int GetInt16(const vector<byte>&, int);
|
|
|
|
uint32_t GetInt32(const vector<byte>&, int);
|