Added virtual Dispatch() to Device class

This commit is contained in:
Uwe Seimet 2021-08-24 13:38:27 +02:00
parent 8f862f8a15
commit 22d24c348f
4 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,8 @@ using namespace std;
#define STATUS_PARAMSAVE 0x00053900 // SAVING PARAMETERS NOT SUPPORTED
#define STATUS_NODEFECT 0x00010000 // DEFECT LIST NOT FOUND
class SCSIDEV;
class Device
{
private:
@ -92,6 +94,8 @@ public:
// Override for device specific initializations, to be called after all device properties have been set
virtual void Init() {};
virtual bool Dispatch(SCSIDEV *) = 0;
const string& GetType() const { return type; }
bool IsReady() const { return ready; }

View File

@ -231,7 +231,7 @@ public:
// TODO Try to get rid of this method, which is called by SASIDEV (but must not)
virtual bool ModeSelect(const DWORD *cdb, const BYTE *buf, int length);// MODE SELECT command
virtual bool Dispatch(SCSIDEV *);
virtual bool Dispatch(SCSIDEV *) override;
protected:
// Internal processing

View File

@ -28,6 +28,7 @@
//===========================================================================
class CTapDriver;
class CFileSys;
class SCSIBR : public Disk
{
@ -50,7 +51,7 @@ public:
void Init() override;
bool Dispatch(SCSIDEV *);
bool Dispatch(SCSIDEV *) override;
// commands
int Inquiry(const DWORD *cdb, BYTE *buf) override; // INQUIRY command

View File

@ -101,7 +101,7 @@ public:
int Read(const DWORD *cdb, BYTE *buf, uint64_t block) override; // READ command
int ReadToc(const DWORD *cdb, BYTE *buf); // READ TOC command
bool Dispatch(SCSIDEV *);
bool Dispatch(SCSIDEV *) override;
private:
// Open