|
ADTF File Library
|
Interface for seekable Reader, where the file position can be adapted. More...
#include <reader.h>
Public Member Functions | |
| virtual uint64_t | getItemIndexForTimeStamp (std::chrono::nanoseconds time_stamp)=0 |
| virtual uint64_t | getItemIndexForStreamItemIndex (uint16_t stream_id, uint64_t stream_item_index)=0 |
| virtual std::shared_ptr< const StreamType > | getStreamTypeBefore (uint64_t item_index, uint16_t stream_id)=0 |
| virtual void | seekTo (uint64_t item_index)=0 |
Public Member Functions inherited from adtf_file::Reader | |
| virtual std::string | getReaderIdentifier () const =0 |
| Get the Reader Identifier of the Reader. | |
| virtual void | open (const std::string &filename, std::shared_ptr< SampleFactory > sample_factory, std::shared_ptr< StreamTypeFactory > stream_type_factory)=0 |
| opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call | |
| virtual FileItem | getNextItem ()=0 |
| virtual uint32_t | getFileVersion () const |
| virtual std::string | getDescription () const |
| virtual std::vector< Extension > | getExtensions () const |
| Get the Extensions if any. | |
| virtual std::vector< Stream > | getStreams () const |
| Get the Streams. | |
| virtual std::optional< uint64_t > | getItemCount () const |
| Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams. | |
| virtual std::optional< double > | getProgress () const |
| Get the Progress, a relative file position between 0.0 and 1.0. | |
Public Member Functions inherited from adtf_file::Configurable | |
| virtual | ~Configurable ()=default |
| DTOR. | |
| virtual const Configuration & | getConfiguration () const |
| virtual void | setConfiguration (const Configuration &configuration) |
Interface for seekable Reader, where the file position can be adapted.
|
pure virtual |
Find the index of the given stream item.
| [in] | stream_id | The stream id. |
| [in] | stream_item_index | The item index within the stream. |
| 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, adtfdat_processing::MultiFileReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
Find the index of the first item that has a timestamp greator or equal to the one specified.
| [in] | time_stamp | The timestamp. |
| std::runtime_error | if position was not found |
| any | other implementation dependent exceptions for the get call |
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
Returns the stream type that is valid
| [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. |
| 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, adtfdat_processing::MultiFileReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
Seek to the given index, such that getNextItem() will return the item corresponding to the index on the next call.
| [in] | item_index | The index to seek to. |
| std::out_of_range | if given item_index is out of range (check for getItemCount()) |
| any | other implementation dependent exceptions for the seek call |
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.