2022-12-03 04:20:27 +00:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
2022-12-05 17:58:23 +00:00
|
|
|
// SCSI Target Emulator PiSCSI
|
2022-12-03 04:20:27 +00:00
|
|
|
// for Raspberry Pi
|
|
|
|
//
|
|
|
|
// Copyright (C) 2022 akuker
|
|
|
|
//
|
|
|
|
// [ Logical representation of a single data sample ]
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "shared/scsi.h"
|
2023-10-15 06:38:15 +00:00
|
|
|
#include <cstdint>
|
2022-12-03 04:20:27 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using namespace scsi_defs;
|
|
|
|
|
|
|
|
class DataSample
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual bool GetBSY() const = 0;
|
|
|
|
virtual bool GetSEL() const = 0;
|
|
|
|
virtual bool GetATN() const = 0;
|
|
|
|
virtual bool GetACK() const = 0;
|
|
|
|
virtual bool GetRST() const = 0;
|
|
|
|
virtual bool GetMSG() const = 0;
|
|
|
|
virtual bool GetCD() const = 0;
|
|
|
|
virtual bool GetIO() const = 0;
|
|
|
|
virtual bool GetREQ() const = 0;
|
|
|
|
virtual bool GetACT() const = 0;
|
|
|
|
virtual uint8_t GetDAT() const = 0;
|
|
|
|
|
|
|
|
virtual uint32_t GetRawCapture() const = 0;
|
|
|
|
|
|
|
|
phase_t GetPhase() const;
|
|
|
|
virtual bool GetSignal(int pin) const = 0;
|
|
|
|
|
|
|
|
uint64_t GetTimestamp() const
|
|
|
|
{
|
|
|
|
return timestamp;
|
|
|
|
}
|
|
|
|
|
|
|
|
string GetPhaseStr() const;
|
|
|
|
|
|
|
|
virtual ~DataSample() = default;
|
|
|
|
|
|
|
|
explicit DataSample(uint64_t in_timestamp) : timestamp{in_timestamp} {}
|
|
|
|
DataSample() = default;
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint64_t timestamp = 0;
|
|
|
|
};
|