Rework the flux decoders to add a desync opcode for separating multiple reads

in a flux stream. Finally add a unit test for the flux decoder.
This commit is contained in:
dg
2021-12-05 14:42:57 +00:00
parent 298f77f52e
commit 18d90c44dd
21 changed files with 210 additions and 47 deletions

View File

@@ -98,7 +98,7 @@ public:
_config(config.ibm())
{}
RecordType advanceToNextRecord()
RecordType advanceToNextRecord() override
{
const FluxMatcher* matcher = nullptr;
_sector->clock = _fmr->seekToPattern(ANY_RECORD_PATTERN, matcher);
@@ -130,7 +130,7 @@ public:
return RecordType::UNKNOWN_RECORD;
}
void decodeSectorRecord()
void decodeSectorRecord() override
{
unsigned recordSize = _currentHeaderLength + IBM_IDAM_LEN;
auto bits = readRawBits(recordSize*16);
@@ -156,7 +156,7 @@ public:
_sector->logicalTrack = _sector->physicalCylinder;
}
void decodeDataRecord()
void decodeDataRecord() override
{
unsigned recordLength = _currentHeaderLength + _currentSectorSize + 3;
auto bits = readRawBits(recordLength*16);