ADTF  3.18.2
indexedfile_types.h
Go to the documentation of this file.
1 
7 #ifndef _INDEXEDFILE_TYPE_HEADER_
8 #define _INDEXEDFILE_TYPE_HEADER_
9 
10 namespace A_UTILS_NS
11 {
12 
14 #define MAX_INDEXED_STREAMS 512
15 
17 class DOEXPORT IIndexedFile
18 {
19  public:
20  virtual ~IIndexedFile() {}
21 
25  typedef enum
26  {
29  TF_ChunkIndex = 1,
32  TF_ChunkTime = 2,
35  TF_StreamIndex = 3
36  } tTimeFormat;
37 
41  typedef enum
42  {
43  RF_None = 0x0,
44  RF_UseExternalBuffer = 0x1,
45  RF_Backwards = 0x2
46  } tReadFlags;
47 
48 #pragma pack(push)
49 #pragma pack(1)
50 
59  typedef struct tagFileHeader
60  {
107  tInt8 _reserved[30];
111  tInt8 strDescription[1912];
112  } tFileHeader; // size is 2048 Bytes
113 
115  #define MAX_FILEEXTENSIONIDENTIFIER_LENGTH 384
121  typedef struct tagFileExtension
122  {
128  tUInt8 _reserved1[2];
141  tUInt8 _reserved[96];
142  } tFileExtension; // size is 512 Bytes
143 
149  typedef struct tagChunkHeader
150  {
170  } tChunkHeader; // size is 32 Bytes
171 
176  typedef struct tagChunkRef
177  {
199  } tChunkRef; // size is 44 Bytes
200 
205  typedef struct tagStreamRef
206  {
211  } tStreamRef; // size is 4 Bytes
212 
214  #define MAX_STREAMNAME_LENGTH 228
215 
220  typedef struct tagStreamInfoHeader
221  {
231  tInt8 strStreamName[MAX_STREAMNAME_LENGTH]; //use Ascii 7
232  } tStreamInfoHeader; // size is 256 Byte
233 
235  typedef struct tagAdditionalIndexInfo
236  {
244  tUInt8 _reserved[20];
246 
247 #pragma pack(pop)
248 
250  typedef struct tag_IndexBlockItem
251  {
253  IIndexedFile::tChunkRef* pData;
259  struct tag_IndexBlockItem* pNext;
260  } tIndexBlockItem ;
261 
263  typedef struct tag_StreamIndexBlockItem
264  {
272  struct tag_StreamIndexBlockItem* pNext;
274 
275 
279  typedef enum
280  {
282  SF_DEFAULT = 0x0,
284  SF_KEYDATA = 0x1,
286  SF_BEFORE = 0x02
287  } tSeekFlags;
288 
292  typedef enum
293  {
295  CT_DATA = 0x00,
297  CT_KEYDATA = 0x01,
299  CT_INFO = 0x02,
301  CT_MARKER = 0x04,
303  CT_TYPE = 0x08,
305  CT_TRIGGER = 0x10
306  } tChunkType;
307 
311  typedef enum
312  {
316  OM_None = 0x00,
324  OM_DisableFileSystemCache = 0x01,
330  OM_SyncWrite = 0x02,
335  OM_QueryInfo = 0x04,
341  OM_ValidateChunkHeader = 0x08,
345  OM_FileChangeMode = 0x10
346  } tOpenMode;
347 };
348 
349 } // namespace
350 
351 #endif // _INDEXEDFILE_TYPE_HEADER_
uint8_t tUInt8
type definition for unsigned integer values (8bit) (platform and compiler independent type).
uint16_t tUInt16
type definition for unsigned integer values (16bit) (platform and compiler independent type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
uint32_t tUInt32
type definition for unsigned integer values (32bit) (platform and compiler independent type).
int8_t tInt8
type definition for signed integer values (8bit) (platform and compiler independent type).
uint64_t tUInt64
type definition for unsigned integer values (64bit) (platform and compiler independent type).
Indexed file interface.
#define MAX_STREAMNAME_LENGTH
maximum length of the stream name
#define MAX_FILEEXTENSIONIDENTIFIER_LENGTH
maximum length of a file extension
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11
Additional index table information.
tUInt64 ui64StreamIndexOffset
stream index count offset (the offset is > 0 if data was dropped within the ring buffer while recordi...
tUInt32 ui32StreamTableIndexOffset
Offset of the Index table entry position within master table (dropped indextable entries while record...
header for chunks Each Chunk header 16 Byte aligned within the file.
tUInt32 ui32RefMasterTableIndex
referring to the master index table
tUInt32 ui32Size
size of the chunks (in bytes)
tUInt32 ui32OffsetToLast
relative byte offset to the previous chunk header (in bytes)
tUInt64 ui64StreamIndex
number of the chunk within stream it belongs to
tUInt16 ui16StreamId
stream identifier the chunk belongs to
tUInt16 ui16Flags
key data / flags see also IIndexedFile::tChunkType
tUInt64 ui64TimeStamp
timestamp of the chunk
header for a chunk reference
tUInt32 ui32Size
size of the chunk it refers to
tUInt32 ui32RefStreamTableIndex
number of stream index table entry this master index entry belongs to
tUInt64 ui64StreamIndex
number of chunk within the stream it belongs to
tUInt16 ui16StreamId
stream identifier of the chunk it refers to
tUInt64 ui64ChunkIndex
number of chunk
tUInt64 ui64ChunkOffset
file offset position of the chunk it refers to (in byte)
tUInt16 ui16Flags
key data / flags of the chunk it refers to see also IIndexFile::tChunkType
tUInt64 ui64TimeStamp
timestamp of the chunk it refers to
Header for a file extensions.
tUInt64 ui64DataSize
size of the extension-data in bytes
tUInt16 ui16StreamId
related Stream identifier. 0 for every stream 1> id >= Max streams)
tUInt64 ui64DataPos
file offset of the extension data (absolute), will be changed to tInt64 in a future version
tUInt32 ui32UserId
optional user id
tUInt32 ui32TypeId
optional type id
tUInt32 ui32VersionId
optional version id
The File header for dat-files.
tUInt64 ui64ExtensionOffset
file-offset to the begin of extension table block (absolute)
tUInt64 ui64FirstChunkOffset
the file offset of the first chunk (only needed for cIndexedFile::m_nVersionIdWithHistory)
tUInt64 ui64ContinuousOffset
the offset of the first chunk of the continuous section of the file (only needed for cIndexedFile::m_...
tUInt64 ui64RingBufferEndOffset
the end position withing the ring buffer section (only needed for cIndexedFile::m_nVersionIdWithHisto...
tUInt64 ui64DataSize
size of the data area block (in bytes)
tUInt8 ui8PatchNumber
patch number (not in use yet)
tUInt64 ui64FileTime
creation time of file
tUInt64 ui64TimeOffset
time offset for every time within the file is referred to (timestamp zero)
tUInt32 ui32FileId
identifier for every dat-File.
tUInt64 ui64Duration
timestamp of the last chunk
tUInt8 ui8HeaderByteOrder
endianess of management structures (little or big endian), see also PLATFORM_BYTEORDER.
tUInt32 ui32Flags
flags ... not in use yet
tUInt64 ui64MaxChunkSize
greatest user data size of chunk
tUInt64 ui64ChunkCount
amount of chunks
tUInt64 ui64DataOffset
file-offset to the begin of data block (absolute)
tUInt32 ui32VersionId
format version of dat files, current version is cIndexedFile::m_nVersionId or cIndexedFile::m_nVersio...
tUInt32 ui32ExtensionCount
amount of extension blocks
Index block item.
struct tag_IndexBlockItem * pNext
Pointer to next element.
tInt nCurrentItemCount
Current item count.
tInt nMaxItemCount
Maximal item count.
IIndexedFile::tChunkRef * pData
Data.
Stream index block item.
tInt nCurrentItemCount
Current item count.
tStreamRef * pData
Data.
tInt nMaxItemCount
Maximal item count.
struct tag_StreamIndexBlockItem * pNext
Pointer to next element.
Stream info header.
tUInt32 ui32InfoDataSize
Info data size.
tUInt64 ui64StreamFirstTime
First timestamp of stream.
tUInt64 ui64StreamIndexCount
Amount of stream indexes.
tUInt64 ui64StreamLastTime
Last timestamp of stream.
header for a stream reference elements
tUInt32 ui32RefMasterTableIndex
number of master index entry it belongs to