RASCSI/cpp/scsiexec/scsi_executor.h
2023-11-15 17:58:53 +01:00

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;
};