ADTF File Library
Loading...
Searching...
No Matches
indexedfile_types_v201_v301.h
Go to the documentation of this file.
1
16
17#ifndef INDEXEDFILE_V201_V301_TYPE_HEADER
18#define INDEXEDFILE_V201_V301_TYPE_HEADER
19
21
22namespace ifhd
23{
27namespace v201_v301
28{
29
34static inline uint32_t getFileId()
35{
36 static uint32_t file_id = *((uint32_t*) "IFHD");
37 return file_id;
38}
39
41static constexpr uint32_t version_id_beta = 0x0200;
44static constexpr uint32_t version_id = 0x00000201;
47static constexpr uint32_t version_id_with_history = 0x00000300;
50static const uint32_t version_id_with_history_end_offset = 0x00000301;
51
52
66
71{
72 fm_none = 0x00,
73 fm_description = 0x01,
74 fm_date_time = 0x02
75};
76
81{
82 rf_none = 0x0,
83 rf_use_external_buffer = 0x1,
84 rf_backwards = 0x2
85};
86
87#pragma pack(push)
88#pragma pack(1)
89
99{
102 uint32_t file_id;
106 uint32_t version_id;
108 uint32_t flags;
114 uint64_t data_offset;
116 uint64_t data_size;
118 uint64_t chunk_count;
123 uint64_t duration;
126 uint64_t file_time;
135 uint64_t time_offset;
148 int8_t reserved[30];
152 int8_t description[1912];
153}; // size is 2048 Bytes
154
161{
163 int8_t identifier[max_file_extension_identifier_length];
165 uint16_t stream_id;
167 uint8_t reserved1[2];
169 uint32_t user_id;
171 uint32_t type_id;
173 uint32_t version_id;
176 uint64_t data_pos;
178 uint64_t data_size;
180 uint8_t reserved[96];
181}; // size is 512 Bytes
182
189{
192 uint64_t time_stamp;
202 uint32_t size;
204 uint16_t stream_id;
206 uint16_t flags;
208 uint64_t stream_index;
209}; // size is 32 Bytes
210
215{
217 uint64_t time_stamp;
221 uint32_t size;
223 uint16_t stream_id;
226 uint16_t flags;
228 uint64_t chunk_offset;
230 uint64_t chunk_index;
232 uint64_t stream_index;
237}; // size is 44 Bytes
238
244{
249}; // size is 4 Bytes
250
256{
266 int8_t stream_name[max_streamname_length]; //use Ascii 7
267}; // size is 256 Byte
268
281
283enum ChecksumType : uint32_t
284{
285 xxh3_64 = 0
286};
287
296
299{
301 uint64_t offset;
303 uint64_t size;
305 uint64_t checksum;
306};
307
308#pragma pack(pop)
309
310
311
312
317{
324};
325
330{
332 ct_data = 0x00,
336 ct_info = 0x02,
338 ct_marker = 0x04,
340 ct_type = 0x08,
343};
344
382
383} // namespace v201_301
384} // namespace ifhd
385
386#endif // _INDEXEDFILE_V201_v301_TYPE_HEADER_
namespace for indexed file definitions in version 2.0, 2.1, 3.0 and 3.1
Definition indexedfile_types_v201_v301.h:28
ChunkType
Definition indexedfile_types_v201_v301.h:330
@ ct_marker
marks the chunk as marker data
Definition indexedfile_types_v201_v301.h:338
@ ct_keydata
marks the chunk as KEY data (results to an index table entry)
Definition indexedfile_types_v201_v301.h:334
@ ct_info
marks the chunk as info data
Definition indexedfile_types_v201_v301.h:336
@ ct_trigger
marks the chunk as trigger data
Definition indexedfile_types_v201_v301.h:342
@ ct_data
marks the chunk as data
Definition indexedfile_types_v201_v301.h:332
@ ct_type
marks the chunk as type data
Definition indexedfile_types_v201_v301.h:340
FieldMask
Definition indexedfile_types_v201_v301.h:71
ChecksumType
Type of the checksum function used for calculating the checksum in the "checksums" extension.
Definition indexedfile_types_v201_v301.h:284
OpenMode
Definition indexedfile_types_v201_v301.h:349
@ om_query_info
Definition indexedfile_types_v201_v301.h:358
@ om_store_checksums
Definition indexedfile_types_v201_v301.h:380
@ om_none
Definition indexedfile_types_v201_v301.h:353
@ om_file_change_mode
Definition indexedfile_types_v201_v301.h:368
@ om_validate_chunk_header
Definition indexedfile_types_v201_v301.h:364
@ om_no_overwrite
Definition indexedfile_types_v201_v301.h:374
SeekFlags
Definition indexedfile_types_v201_v301.h:317
@ sf_default
The default seek flag.
Definition indexedfile_types_v201_v301.h:319
@ sf_before
Seek to the last chunk before the seek time.
Definition indexedfile_types_v201_v301.h:323
@ sf_keydata
Just seek in index table.
Definition indexedfile_types_v201_v301.h:321
TimeFormat
Definition indexedfile_types_v201_v301.h:57
@ tf_chunk_index
The earliest chunk at or after this index counter within within the whole file, filtered by the strea...
Definition indexedfile_types_v201_v301.h:59
@ tf_chunk_time
The earliest chunk at or after this timestamp, filtered by the stream Id.
Definition indexedfile_types_v201_v301.h:61
@ tf_stream_index
Definition indexedfile_types_v201_v301.h:64
ReadFlags
Definition indexedfile_types_v201_v301.h:81
namespace for IFHD File library
Definition indexedfile_types.h:30
Additional index table information.
Definition indexedfile_types_v201_v301.h:271
uint8_t reserved[20]
for later use
Definition indexedfile_types_v201_v301.h:279
uint64_t stream_index_offset
Definition indexedfile_types_v201_v301.h:274
uint32_t stream_table_index_offset
Definition indexedfile_types_v201_v301.h:277
Header of the "checksums" extension.
Definition indexedfile_types_v201_v301.h:290
ChecksumType type
The type of the used checksum.
Definition indexedfile_types_v201_v301.h:292
uint64_t count
The number of checksums.
Definition indexedfile_types_v201_v301.h:294
header for chunks Each Chunk header 16 Byte aligned within the file.
Definition indexedfile_types_v201_v301.h:189
uint16_t flags
chunk type flags see ChunkType
Definition indexedfile_types_v201_v301.h:206
uint64_t time_stamp
Definition indexedfile_types_v201_v301.h:192
uint32_t offset_to_last
Definition indexedfile_types_v201_v301.h:198
uint32_t ref_master_table_index
referring to the master index table
Definition indexedfile_types_v201_v301.h:194
uint16_t stream_id
stream identifier the chunk belongs to
Definition indexedfile_types_v201_v301.h:204
uint32_t size
Definition indexedfile_types_v201_v301.h:202
uint64_t stream_index
number of the chunk within stream it belongs to
Definition indexedfile_types_v201_v301.h:208
header for a chunk reference
Definition indexedfile_types_v201_v301.h:215
uint64_t stream_index
number of chunk within the stream it belongs to
Definition indexedfile_types_v201_v301.h:232
uint32_t ref_stream_table_index
Definition indexedfile_types_v201_v301.h:236
uint64_t time_stamp
timestamp of the chunk in microseconds or nanoseconds resolution (depending on file version)
Definition indexedfile_types_v201_v301.h:217
uint64_t chunk_offset
file offset position of the chunk it refers to (in byte)
Definition indexedfile_types_v201_v301.h:228
uint16_t stream_id
stream identifier of the chunk it refers to
Definition indexedfile_types_v201_v301.h:223
uint32_t size
Definition indexedfile_types_v201_v301.h:221
uint64_t chunk_index
number of chunk
Definition indexedfile_types_v201_v301.h:230
uint16_t flags
Definition indexedfile_types_v201_v301.h:226
Header for a file extensions.
Definition indexedfile_types_v201_v301.h:161
uint32_t version_id
optional version id
Definition indexedfile_types_v201_v301.h:173
uint8_t reserved[96]
reserved. currently not in use
Definition indexedfile_types_v201_v301.h:180
uint8_t reserved1[2]
reserved. currently not in use
Definition indexedfile_types_v201_v301.h:167
int8_t identifier[max_file_extension_identifier_length]
Identifier.
Definition indexedfile_types_v201_v301.h:163
uint64_t data_pos
Definition indexedfile_types_v201_v301.h:176
uint32_t user_id
optional user id
Definition indexedfile_types_v201_v301.h:169
uint64_t data_size
size of the extension-data in bytes
Definition indexedfile_types_v201_v301.h:178
uint16_t stream_id
related Stream identifier. 0 for every stream 1> id >= Max streams)
Definition indexedfile_types_v201_v301.h:165
uint32_t type_id
optional type id
Definition indexedfile_types_v201_v301.h:171
The File header for dat-files.
Definition indexedfile_types_v201_v301.h:99
int8_t reserved[30]
reserved bytes. currently not in use
Definition indexedfile_types_v201_v301.h:148
uint64_t first_chunk_offset
Definition indexedfile_types_v201_v301.h:140
uint64_t data_size
size of the data area block (in bytes)
Definition indexedfile_types_v201_v301.h:116
uint64_t chunk_count
amount of chunks
Definition indexedfile_types_v201_v301.h:118
uint8_t patch_number
patch number (not in use yet)
Definition indexedfile_types_v201_v301.h:137
uint64_t max_chunk_size
greatest user data size of chunk
Definition indexedfile_types_v201_v301.h:120
uint32_t version_id
Definition indexedfile_types_v201_v301.h:106
uint64_t duration
Definition indexedfile_types_v201_v301.h:123
int8_t description[1912]
Definition indexedfile_types_v201_v301.h:152
uint32_t file_id
Definition indexedfile_types_v201_v301.h:102
uint64_t time_offset
Definition indexedfile_types_v201_v301.h:135
uint64_t data_offset
file-offset to the begin of data block (absolute)
Definition indexedfile_types_v201_v301.h:114
uint64_t ring_buffer_end_offset
Definition indexedfile_types_v201_v301.h:146
uint32_t extension_count
amount of extension blocks
Definition indexedfile_types_v201_v301.h:110
uint32_t flags
flags ... not in use yet
Definition indexedfile_types_v201_v301.h:108
uint8_t header_byte_order
Definition indexedfile_types_v201_v301.h:132
uint64_t continuous_offset
Definition indexedfile_types_v201_v301.h:143
uint64_t extension_offset
file-offset to the begin of extension table block (absolute)
Definition indexedfile_types_v201_v301.h:112
uint64_t file_time
Definition indexedfile_types_v201_v301.h:126
A checksum over a range within the file itself.
Definition indexedfile_types_v201_v301.h:299
uint64_t offset
The start offset of the range.
Definition indexedfile_types_v201_v301.h:301
uint64_t size
The size of the range.
Definition indexedfile_types_v201_v301.h:303
uint64_t checksum
The hash over the range (using XXH3)
Definition indexedfile_types_v201_v301.h:305
Definition indexedfile_types_v201_v301.h:256
uint64_t stream_first_time
First timestamp of stream.
Definition indexedfile_types_v201_v301.h:260
int8_t stream_name[max_streamname_length]
Stream name.
Definition indexedfile_types_v201_v301.h:266
uint64_t stream_index_count
Amount of stream indexes.
Definition indexedfile_types_v201_v301.h:258
uint64_t stream_last_time
Last timestamp of stream.
Definition indexedfile_types_v201_v301.h:262
uint32_t info_data_size
Info data size.
Definition indexedfile_types_v201_v301.h:264
Definition indexedfile_types_v201_v301.h:244
uint32_t ref_master_table_index
Definition indexedfile_types_v201_v301.h:248