1 | // This file is part of the PACPUS framework distributed under the
|
---|
2 | // CECILL-C License, Version 1.0.
|
---|
3 | //
|
---|
4 | /// @author Firstname Surname <firstname.surname@utc.fr>
|
---|
5 | /// @date Month, Year
|
---|
6 | /// @version $Id$
|
---|
7 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
8 | /// @brief Brief description.
|
---|
9 | ///
|
---|
10 | /// Detailed description.
|
---|
11 |
|
---|
12 | #ifndef DEF_HDFILE_HEADER_T_H
|
---|
13 | #define DEF_HDFILE_HEADER_T_H
|
---|
14 |
|
---|
15 | #include <Pacpus/kernel/cstdint.h>
|
---|
16 | #include <Pacpus/kernel/road_time.h>
|
---|
17 |
|
---|
18 | #define HEADER_SIGNATURE_LENGTH 4
|
---|
19 | #define VERSION_NUMBER 2
|
---|
20 |
|
---|
21 | #pragma pack(push,4)
|
---|
22 | /// @todo Documentation
|
---|
23 | struct hdfile_header_t
|
---|
24 | {
|
---|
25 | /// @todo Documentation
|
---|
26 | typedef int8_t SignatureT;
|
---|
27 | /// @todo Documentation
|
---|
28 | typedef int32_t DataTypeT;
|
---|
29 | /// @todo Documentation
|
---|
30 | typedef int32_t VersionT;
|
---|
31 | /// @todo Documentation
|
---|
32 | typedef int32_t DataSizeT;
|
---|
33 | /// @todo Documentation
|
---|
34 | typedef int32_t DataOffsetT;
|
---|
35 | /// @todo Documentation
|
---|
36 | /// @todo FIXME: file size should be 64-bit long to support large (>2GB) files
|
---|
37 | typedef int32_t FileSizeT;
|
---|
38 | /// @todo Documentation
|
---|
39 | typedef int32_t RecordCountT;
|
---|
40 |
|
---|
41 | /// @todo Documentation
|
---|
42 | static const DataSizeT kVariableRecordSize = -1;
|
---|
43 |
|
---|
44 | /// @todo Documentation
|
---|
45 | SignatureT Signature[HEADER_SIGNATURE_LENGTH];
|
---|
46 | /// Record data type
|
---|
47 | /// Should default to @link FILE_DBT_UNKNOWN
|
---|
48 | /// @see DbiteFileTypes.h for more
|
---|
49 | DataTypeT Type;
|
---|
50 | /// File format version
|
---|
51 | VersionT VersionNumber;
|
---|
52 | /// Offset indicating the start of the data [bytes]
|
---|
53 | DataOffsetT DataOffset;
|
---|
54 | /// Current size of the data, without header [bytes]
|
---|
55 | DataSizeT DataSize;
|
---|
56 | /// Current size of the file [bytes]
|
---|
57 | FileSizeT FileSize;
|
---|
58 | /// @todo Documentation
|
---|
59 | road_time_t TimeMin;
|
---|
60 | /// @todo Documentation
|
---|
61 | road_time_t TimeMax;
|
---|
62 | /// Number of records already in the file
|
---|
63 | RecordCountT NbRecords;
|
---|
64 | };
|
---|
65 | #pragma pack(pop)
|
---|
66 |
|
---|
67 | #endif // DEF_HDFILE_HEADER_T_H
|
---|