libaaruformat
1.0
Aaru Data Preservation Suite - Format Library
Toggle main menu visibility
Loading...
Searching...
No Matches
flux.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Aaru Data Preservation Suite.
3
* Copyright (c) 2019-2025 Natalia Portillo.
4
*
5
* This library is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU Lesser General Public License as
7
* published by the Free Software Foundation; either version 2.1 of the
8
* License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
17
*/
18
86
87
#ifndef LIBAARUFORMAT_FLUX_H
88
#define LIBAARUFORMAT_FLUX_H
89
90
#include <stdint.h>
91
92
#pragma pack(push, 1)
93
116
typedef
struct
FluxHeader
117
{
118
uint32_t
identifier
;
119
uint16_t
entries
;
120
uint8_t
blockAlignmentShift
;
121
uint64_t
crc64
;
122
}
FluxHeader
;
123
155
typedef
struct
FluxEntry
156
{
157
uint32_t
head
;
158
uint16_t
track
;
159
uint8_t
subtrack
;
160
uint32_t
captureIndex
;
161
uint64_t
indexResolution
;
162
uint64_t
dataResolution
;
163
uint64_t
indexOffset
;
164
uint64_t
payloadOffset
;
165
}
FluxEntry
;
166
182
typedef
struct
FluxCaptureMeta
183
{
184
uint32_t
head
;
185
uint16_t
track
;
186
uint8_t
subtrack
;
187
uint32_t
captureIndex
;
188
uint64_t
indexResolution
;
189
uint64_t
dataResolution
;
190
}
FluxCaptureMeta
;
191
203
typedef
struct
FluxCaptureMapEntry
FluxCaptureMapEntry
;
204
242
typedef
struct
DataStreamPayloadHeader
243
{
244
uint32_t
identifier
;
245
uint16_t
dataType
;
246
uint16_t
compression
;
247
uint32_t
cmpLength
;
248
uint32_t
length
;
249
uint64_t
cmpCrc64
;
250
uint64_t
crc64
;
251
}
DataStreamPayloadHeader
;
252
270
typedef
struct
FluxCaptureRecord
271
{
272
FluxEntry
entry
;
273
uint8_t *
data_buffer
;
274
uint32_t
data_length
;
275
uint8_t *
index_buffer
;
276
uint32_t
index_length
;
277
}
FluxCaptureRecord
;
278
296
typedef
struct
FluxCaptureKey
297
{
298
uint32_t
head
;
299
uint16_t
track
;
300
uint8_t
subtrack
;
301
uint32_t
captureIndex
;
302
}
FluxCaptureKey
;
303
304
#pragma pack(pop)
305
306
#endif
// LIBAARUFORMAT_FLUX_H
DataStreamPayloadHeader
Header structure for a DataStreamPayloadBlock containing data stream payload.
Definition
flux.h:243
DataStreamPayloadHeader::dataType
uint16_t dataType
Data type classification (value from DataType), e.g., FluxData or BitstreamData.
Definition
flux.h:245
DataStreamPayloadHeader::cmpLength
uint32_t cmpLength
Compressed length in bytes (includes LZMA properties if compression = Lzma).
Definition
flux.h:247
DataStreamPayloadHeader::cmpCrc64
uint64_t cmpCrc64
CRC64-ECMA checksum of the compressed payload (or same as crc64 if uncompressed).
Definition
flux.h:249
DataStreamPayloadHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::DataStreamPayloadBlock (0x4C505344, "DSPL").
Definition
flux.h:244
DataStreamPayloadHeader::compression
uint16_t compression
Compression type: 0 = None, 1 = Lzma.
Definition
flux.h:246
DataStreamPayloadHeader::length
uint32_t length
Uncompressed length in bytes.
Definition
flux.h:248
DataStreamPayloadHeader::crc64
uint64_t crc64
CRC64-ECMA checksum of the uncompressed payload.
Definition
flux.h:250
FluxCaptureKey
Key structure for flux capture lookup map.
Definition
flux.h:297
FluxCaptureKey::track
uint16_t track
Track number identifying the capture location.
Definition
flux.h:299
FluxCaptureKey::subtrack
uint8_t subtrack
Subtrack number identifying the capture location.
Definition
flux.h:300
FluxCaptureKey::head
uint32_t head
Head number identifying the capture location.
Definition
flux.h:298
FluxCaptureKey::captureIndex
uint32_t captureIndex
Capture index, allowing multiple captures for the same location.
Definition
flux.h:301
FluxCaptureMapEntry
Internal hash table entry for flux capture lookup.
Definition
flux.c:35
FluxCaptureMeta
Metadata structure returned by aaruf_get_flux_captures().
Definition
flux.h:183
FluxCaptureMeta::head
uint32_t head
Head number the flux capture corresponds to.
Definition
flux.h:184
FluxCaptureMeta::indexResolution
uint64_t indexResolution
Resolution in picoseconds at which the index stream was sampled.
Definition
flux.h:188
FluxCaptureMeta::captureIndex
uint32_t captureIndex
Capture index, allowing multiple captures for the same location.
Definition
flux.h:187
FluxCaptureMeta::subtrack
uint8_t subtrack
Subtrack number the flux capture corresponds to.
Definition
flux.h:186
FluxCaptureMeta::dataResolution
uint64_t dataResolution
Resolution in picoseconds at which the data stream was sampled.
Definition
flux.h:189
FluxCaptureMeta::track
uint16_t track
Track number the flux capture corresponds to.
Definition
flux.h:185
FluxCaptureRecord
Internal structure for storing flux capture data during write mode.
Definition
flux.h:271
FluxCaptureRecord::entry
FluxEntry entry
Flux entry metadata describing this capture.
Definition
flux.h:272
FluxCaptureRecord::data_length
uint32_t data_length
Length of the data buffer in bytes.
Definition
flux.h:274
FluxCaptureRecord::index_length
uint32_t index_length
Length of the index buffer in bytes.
Definition
flux.h:276
FluxCaptureRecord::index_buffer
uint8_t * index_buffer
Pointer to the flux index buffer. Owned by the utarray, freed automatically.
Definition
flux.h:275
FluxCaptureRecord::data_buffer
uint8_t * data_buffer
Pointer to the flux data buffer. Owned by the utarray, freed automatically.
Definition
flux.h:273
FluxEntry
Metadata entry describing a single flux capture in the FluxDataBlock.
Definition
flux.h:156
FluxEntry::indexResolution
uint64_t indexResolution
Resolution in picoseconds at which the index stream was sampled.
Definition
flux.h:161
FluxEntry::dataResolution
uint64_t dataResolution
Resolution in picoseconds at which the data stream was sampled.
Definition
flux.h:162
FluxEntry::head
uint32_t head
Head number the flux capture corresponds to. Typically 0 or 1 for double-sided media.
Definition
flux.h:157
FluxEntry::payloadOffset
uint64_t payloadOffset
Block-aligned file offset where the DataStreamPayloadBlock containing this capture's data is stored,...
Definition
flux.h:164
FluxEntry::track
uint16_t track
Track number the flux capture corresponds to. Track numbering is format-dependent.
Definition
flux.h:158
FluxEntry::indexOffset
uint64_t indexOffset
Byte offset within the payload where the index buffer starts (equals data_length).
Definition
flux.h:163
FluxEntry::subtrack
uint8_t subtrack
Subtrack number, allowing sub-stepping within a track. Used for fine positioning.
Definition
flux.h:159
FluxEntry::captureIndex
uint32_t captureIndex
Capture index, allowing multiple captures for the same location (e.g., multiple revolutions).
Definition
flux.h:160
FluxHeader
Header structure for a FluxDataBlock containing flux capture metadata.
Definition
flux.h:117
FluxHeader::identifier
uint32_t identifier
Block identifier, must be BlockType::FluxDataBlock (0x58554C46, "FLUX").
Definition
flux.h:118
FluxHeader::entries
uint16_t entries
Number of FluxEntry records following this header. Maximum value: 65535.
Definition
flux.h:119
FluxHeader::crc64
uint64_t crc64
CRC64-ECMA checksum of the FluxEntry array (header excluded).
Definition
flux.h:121
FluxHeader::blockAlignmentShift
uint8_t blockAlignmentShift
Block alignment shift: 2^blockAlignmentShift = block alignment boundary in bytes.
Definition
flux.h:120
include
aaruformat
structs
flux.h
Generated by
1.18.0