mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-01 19:41:48 +00:00
44 lines
822 B
C++
44 lines
822 B
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator PiSCSI
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2023 Uwe Seimet
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "scsiexec/phase_executor.h"
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include <span>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
class ScsiExecutor
|
|
{
|
|
|
|
public:
|
|
|
|
ScsiExecutor(BUS &bus, int id)
|
|
{
|
|
phase_executor = make_unique<PhaseExecutor>(bus, id);
|
|
}
|
|
~ScsiExecutor() = default;
|
|
|
|
bool Execute(const string&, bool, string&);
|
|
|
|
void SetTarget(int id, int lun)
|
|
{
|
|
phase_executor->SetTarget(id, lun);
|
|
}
|
|
|
|
private:
|
|
|
|
vector<uint8_t> buffer = vector<uint8_t>(65536);
|
|
|
|
unique_ptr<PhaseExecutor> phase_executor;
|
|
};
|