1 | /**
|
---|
2 | *
|
---|
3 | * Distributed under the UTC Heudiascy Pacpus License, Version 1.0.
|
---|
4 | * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved.
|
---|
5 | *
|
---|
6 | * See the LICENSE file for more information or a copy at:
|
---|
7 | * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt
|
---|
8 | *
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef DEF_HDFILE_HEADER_T_H
|
---|
12 | #define DEF_HDFILE_HEADER_T_H
|
---|
13 |
|
---|
14 | #include <Pacpus/kernel/cstdint.h>
|
---|
15 | #include <Pacpus/kernel/road_time.h>
|
---|
16 |
|
---|
17 | #define HEADER_SIGNATURE_LENGTH 4
|
---|
18 | #define VERSION_NUMBER 2
|
---|
19 |
|
---|
20 | #pragma pack(push,4)
|
---|
21 | struct hdfile_header_t
|
---|
22 | {
|
---|
23 | typedef int8_t SignatureT;
|
---|
24 | typedef int32_t DataTypeT;
|
---|
25 | typedef int32_t VersionT;
|
---|
26 | typedef int32_t DataSizeT;
|
---|
27 | typedef int32_t DataOffsetT;
|
---|
28 | // FIXME: file size should be 64-bit long to support large (>2GB) files
|
---|
29 | typedef int32_t FileSizeT;
|
---|
30 | typedef int32_t RecordCountT;
|
---|
31 |
|
---|
32 | static const DataSizeT kVariableRecordSize = -1;
|
---|
33 |
|
---|
34 | SignatureT Signature[HEADER_SIGNATURE_LENGTH];
|
---|
35 | DataTypeT Type; /* IMAGE, CAN, UNKNOWN, etc. */
|
---|
36 | VersionT VersionNumber;
|
---|
37 | DataOffsetT DataOffset; /* starting of the data */
|
---|
38 | DataSizeT DataSize; /* number of byte for data */
|
---|
39 | FileSizeT FileSize; /* current size of the file */
|
---|
40 | road_time_t TimeMin, TimeMax;
|
---|
41 | RecordCountT NbRecords; /* number of records */
|
---|
42 | };
|
---|
43 | #pragma pack(pop)
|
---|
44 |
|
---|
45 | #endif // DEF_HDFILE_HEADER_T_H
|
---|