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