#ifndef FLUX_H #define FLUX_H #include "lib/core/bytes.h" #include "lib/data/locations.h" class DiskLayout; class Fluxmap; class Image; class LogicalTrackLayout; class PhysicalTrackLayout; class Sector; struct Record { nanoseconds_t clock = 0; nanoseconds_t startTime = 0; nanoseconds_t endTime = 0; uint32_t position = 0; Bytes rawData; }; struct Track { std::shared_ptr ltl; std::shared_ptr ptl; std::shared_ptr fluxmap; std::vector> records; /* All sectors, valid or not, including duplicates. */ std::vector> allSectors; /* Zero or one sector for each ID, preferring good ones. */ std::vector> normalisedSectors; }; struct Disk { Disk(); /* Creates a Disk from an Image, populating the tracks and sectors maps * based on the supplied disk layout. */ Disk(const std::shared_ptr& image, const DiskLayout& diskLayout); Disk& operator=(const Disk& other) = default; std::multimap> tracksByPhysicalLocation; std::multimap> sectorsByPhysicalLocation; std::shared_ptr image; /* 0 if the period is unknown (e.g. if this Disk was made from an image). */ nanoseconds_t rotationalPeriod = 0; }; #endif