1 #ifndef SECTOR_H 2 #define SECTOR_H 3 4 #include "bytes.h" 5 #include "fluxmap.h" 6 7 /* 8 * Note that sectors here used zero-based numbering throughout (to make the 9 * maths easier); traditionally floppy disk use 0-based track numbering and 10 * 1-based sector numbering, which makes no sense. 11 */ 12 class Sector 13 { 14 public: 15 enum Status 16 { 17 OK, 18 BAD_CHECKSUM, 19 MISSING, 20 DATA_MISSING, 21 CONFLICT, 22 INTERNAL_ERROR 23 }; 24 25 static const std::string statusToString(Status status); 26 27 Status status = Status::INTERNAL_ERROR; 28 Fluxmap::Position position; 29 nanoseconds_t clock = 0; 30 nanoseconds_t headerStartTime = 0; 31 nanoseconds_t headerEndTime = 0; 32 nanoseconds_t dataStartTime = 0; 33 nanoseconds_t dataEndTime = 0; 34 int physicalTrack = 0; 35 int physicalSide = 0; 36 int logicalTrack = 0; 37 int logicalSide = 0; 38 int logicalSector = 0; 39 Bytes data; 40 }; 41 42 #endif 43 44