|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Packed on-disk structures of the Data Position Measurement (DPM) block. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | DpmHeader |
| Header of the Data Position Measurement block. More... | |
| struct | DpmEntry |
| A DPM control point. More... | |
| struct | DpmCalibration |
| A rotation calibration done while measuring. More... | |
Macros | |
| #define | DPM_UNITS_PER_TURN 2560000 |
| Angle units per turn, Alcohol 120% units (256 per turn) multiplied by 10000. | |
| #define | DPM_UNITS_PER_ALCOHOL_UNIT 10000 |
| Angle units per Alcohol 120% unit. | |
| #define | DPM_FLAG_OPPOSITE_TRACK_PATH 0x01 |
| Bit set in DpmHeader::flags when the layers use opposite track path. | |
Typedefs | |
| typedef struct DpmHeader | DpmHeader |
| typedef struct DpmEntry | DpmEntry |
| typedef struct DpmCalibration | DpmCalibration |
Enumerations | |
| enum | DpmEntryStatus { DpmStatusUnknown = 0 , DpmStatusMeasured = 1 , DpmStatusRemeasured = 2 , DpmStatusInterpolated = 3 , DpmStatusUnreadable = 4 , DpmStatusLayerBreak = 5 } |
| Status of the bin of sectors that ends at an entry. More... | |
Packed on-disk structures of the Data Position Measurement (DPM) block.
Data Position Measurement records the physical angle of sectors along the spiral track of an optical disc, as measured by timing reads. The angle is cumulative: it starts at 0 on the first entry and grows by one full turn every DPM_UNITS_PER_TURN units, so it also counts how many times the disc turned.
Binary layout (little-endian, packed):
DpmHeader (sizeof = 40 bytes) uint64_t layerEnd[layerEnds] -> last sector of every layer but the last, increasing DpmEntry entry[entries] -> control points, strictly increasing sector DpmCalibration calibration[calibrations]
length = layerEnds * 8 + entries * sizeof(DpmEntry) + calibrations * sizeof(DpmCalibration) crc64 = CRC64-ECMA of the length bytes that follow the header
The density, in degrees per sector, of the bin between two consecutive entries is (angle[i + 1] - angle[i]) * 360 / DPM_UNITS_PER_TURN / (lba[i + 1] - lba[i]).
Alcohol 120% stores the same cumulative angle, in 256 units per turn, on a uniform grid. A value of this block divided by DPM_UNITS_PER_ALCOHOL_UNIT, rounded, is the Alcohol 120% value.
Definition in file dpm.h.
| #define DPM_FLAG_OPPOSITE_TRACK_PATH 0x01 |
Bit set in DpmHeader::flags when the layers use opposite track path.
| #define DPM_UNITS_PER_ALCOHOL_UNIT 10000 |
| #define DPM_UNITS_PER_TURN 2560000 |
| typedef struct DpmCalibration DpmCalibration |
| typedef struct DpmEntry DpmEntry |
| typedef struct DpmHeader DpmHeader |
| enum DpmEntryStatus |
Status of the bin of sectors that ends at an entry.
Ignored for the first entry.