Removed wrong inheritance of SCDP and SCBR from Disk class (#948)

* Fixed TODOs, updated SCBR and SCDP

* Introduced ByteWriter interface

* Use accessors instead of directly accessing length/block fields
This commit is contained in:
Uwe Seimet
2022-10-29 18:10:00 +02:00
committed by GitHub
parent c1f63c6745
commit 6e35577368
20 changed files with 148 additions and 169 deletions
+4 -1
View File
@@ -84,6 +84,10 @@ public:
scsi_defs::status GetStatus() const { return ctrl.status; }
void SetStatus(scsi_defs::status s) { ctrl.status = s; }
uint32_t GetLength() const { return ctrl.length; }
void SetLength(uint32_t l) { ctrl.length = l; }
uint32_t GetBlocks() const { return ctrl.blocks; }
void SetBlocks(uint32_t b) { ctrl.blocks = b; }
void DecrementBlocks() { --ctrl.blocks; }
bool IsByteTransfer() const { return is_byte_transfer; }
void SetByteTransfer(bool);
@@ -101,7 +105,6 @@ protected:
bool HasValidLength() const { return ctrl.length != 0; }
int GetOffset() const { return ctrl.offset; }
void ResetOffset() { ctrl.offset = 0; }
void SetLength(uint32_t l) { ctrl.length = l; }
void UpdateOffsetAndLength() { ctrl.offset += ctrl.length; ctrl.length = 0; }
private: