Interface for seekable Reader, where the file position can be adapted.
More...
#include <reader.h>
Interface for seekable Reader, where the file position can be adapted.
◆ getItemIndexForStreamItemIndex()
virtual uint64_t adtf_file::SeekableReader::getItemIndexForStreamItemIndex |
( |
uint16_t |
stream_id, |
|
|
uint64_t |
stream_item_index |
|
) |
| |
|
pure virtual |
Find the index of the given stream item.
- Parameters
-
[in] | stream_id | The stream id. |
[in] | stream_item_index | The item index within the stream. |
- Returns
- The item index.
- Exceptions
-
std::out_of_range | if given item_index is out of range |
std::out_of_range | if given stream_id is out of range (must be at least 1) |
std::runtime_error | if position was not found |
any | other implementation dependent exceptions for the get call |
Implemented in adtf_file::ADTFDatFileReader.
◆ getItemIndexForTimeStamp()
virtual uint64_t adtf_file::SeekableReader::getItemIndexForTimeStamp |
( |
std::chrono::nanoseconds |
time_stamp | ) |
|
|
pure virtual |
Find the index of the first item that has a timestamp greator or equal to the one specified.
- Parameters
-
[in] | time_stamp | The timestamp. |
- Returns
- The item index.
- Exceptions
-
std::runtime_error | if position was not found |
any | other implementation dependent exceptions for the get call |
Implemented in adtf_file::ADTFDatFileReader.
◆ getStreamTypeBefore()
virtual std::shared_ptr<const StreamType> adtf_file::SeekableReader::getStreamTypeBefore |
( |
uint64_t |
item_index, |
|
|
uint16_t |
stream_id |
|
) |
| |
|
pure virtual |
Returns the stream type that is valid
- Parameters
-
[in] | item_index | The global index before which the stream type should be retrieved. |
[in] | stream_id | The stream id for which the stream type should be retrieved. |
- Returns
- A shared pointer to the stream type.
- Exceptions
-
std::out_of_range | if given item_index is out of range |
std::out_of_range | if given stream_id is out of range (must be at least 1) |
any | other implementation dependent exceptions for the get call |
Implemented in adtf_file::ADTFDatFileReader.
◆ seekTo()
virtual void adtf_file::SeekableReader::seekTo |
( |
uint64_t |
item_index | ) |
|
|
pure virtual |
Seek to the given index, such that getNextItem() will return the item corresponding to the index on the next call.
- Parameters
-
[in] | item_index | The index to seek to. |
- Exceptions
-
std::out_of_range | if given item_index is out of range (check for Reader::getItemCount) |
any | other implementation dependent exceptions for the seek call |
Implemented in adtf_file::ADTFDatFileReader.
The documentation for this class was generated from the following file: