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