adtf_file_library  0.13.2
Classes | Public Member Functions | List of all members
ifhd::v201_v301::IndexWriteTable Class Reference

#include <indexwritetable_v201_v301.h>

Public Member Functions

void create (timestamp_t index_delay=1000000)
 
void free ()
 
uint16_t getMaxStreamId () const
 
size_t getItemCount (uint16_t stream_id) const
 
uint64_t getBufferSize (uint16_t stream_id) const
 
void copyToBuffer (uint16_t stream_id, void *buffer) const
 
void append (uint16_t stream_id, uint64_t stream_index, uint64_t chunk_index, uint64_t file_pos, uint32_t size, timestamp_t time_stamp, uint32_t flags, bool &index_entry_appended)
 
void remove (uint64_t chunk_index, uint16_t stream_id)
 
uint64_t getIndexOffset (uint16_t stream_id) const
 
uint64_t getIndexTableOffset (uint16_t stream_id) const
 

Detailed Description

Class for storing an index table of an indexed file.

Member Function Documentation

◆ append()

void ifhd::v201_v301::IndexWriteTable::append ( uint16_t  stream_id,
uint64_t  stream_index,
uint64_t  chunk_index,
uint64_t  file_pos,
uint32_t  size,
timestamp_t  time_stamp,
uint32_t  flags,
bool &  index_entry_appended 
)

Appends a new item to the index table.

Parameters
stream_idThe stream id.
stream_indexThe stream index.
chunk_indexThe chunk index.
file_posThe file position.
sizeThe size of the item.
time_stampThe timestamp.
flagsappend flags, see ChunkHeader
index_entry_appendedreturn true if index enty is appended for this chunk

◆ copyToBuffer()

void ifhd::v201_v301::IndexWriteTable::copyToBuffer ( uint16_t  stream_id,
void *  buffer 
) const

Copys all stream data into a buffer. No buffer overflow checking is done!

Parameters
[in]stream_idthe stream id.
[out]bufferThe buffer that is to be filled.

◆ create()

void ifhd::v201_v301::IndexWriteTable::create ( timestamp_t  index_delay = 1000000)

Allocates all neccessary resources.

Parameters
index_delayThe maximum delay between indices.

◆ free()

void ifhd::v201_v301::IndexWriteTable::free ( )

Frees all allocated resources.

◆ getBufferSize()

uint64_t ifhd::v201_v301::IndexWriteTable::getBufferSize ( uint16_t  stream_id) const

Returns the buffer size of a stream.

Parameters
stream_idThe stream id.
Returns
The buffer size of the stream.

◆ getIndexOffset()

uint64_t ifhd::v201_v301::IndexWriteTable::getIndexOffset ( uint16_t  stream_id) const

Returns the offset of the first stream index in the chunk headers fro the given stream.

Parameters
stream_idThe stream id.
Returns
the offset of the first stream index in the chunk headers fro the given stream.

◆ getIndexTableOffset()

uint64_t ifhd::v201_v301::IndexWriteTable::getIndexTableOffset ( uint16_t  stream_id) const

Returns the offset of the stream table indices in the chunk header and master/stream references.

Parameters
stream_idThe stream id.
Returns
the offset of the stream table indices in the chunk header and master/stream references..

◆ getItemCount()

size_t ifhd::v201_v301::IndexWriteTable::getItemCount ( uint16_t  stream_id) const

Returns the item count of a stream.

Parameters
stream_idThe stream id.
Returns
The item count of the stream.

◆ getMaxStreamId()

uint16_t ifhd::v201_v301::IndexWriteTable::getMaxStreamId ( ) const

Returns the biggest possible stream id.

Returns
The biggest possible stream id.

◆ remove()

void ifhd::v201_v301::IndexWriteTable::remove ( uint64_t  chunk_index,
uint16_t  stream_id 
)

The method removes an index entry from the front of the tables.

Parameters
chunk_indexthe chunk index
stream_idthe stream id

The documentation for this class was generated from the following file:

Copyright © CARIAD SE.
Generated on Mon Jun 10 2024 by doxygen 1.9.1
GIT Commit Hash: eb3af397a6b49ad6fcad9a60d8277d909b458b48