|
ADTF File Library
|
#include <reader.h>
Public Member Functions | |
| 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) |
This is the base class for implementing a file reader.
Please take a look at the trigonomerty reader example to get an idea on how to implement your own.
|
inlinevirtual |
Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
inlinevirtual |
Get the Extensions if any.
Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
inlinevirtual |
The file version with respect to ADTF DAT Format. When implementing a reader yourself
ifhd::v201_v301::version_id if you do not explicitly create trigger items.ifhd::v500::version_id otherwise. Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
inlinevirtual |
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of all streams.
Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
Returns the next item of the file and increase the item index to the next one. These can be samples, streamtypes or trigger.
| exceptions::EndOfFile | if end of file was reached |
| std::exception | based exception for any other implementation dependent case to identify error on getNextItem call |
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
inlinevirtual |
Get the Progress, a relative file position between 0.0 and 1.0.
Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
Get the Reader Identifier of the Reader.
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::ReferencedFilesReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
inlinevirtual |
Get the Streams.
Reimplemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.
|
pure virtual |
opens a file by the given filename. The given factories must be used to create samples and streamtypes for the getNextItem call
| filename | The file to open |
| sample_factory | The sample factory to create samples for the getNextItem call. |
| stream_type_factory | The stream type factory to create streamtype for the getNextItem call. |
| std::exception | based exception for any other implementation dependent case to identify error on open call |
Implemented in adtf_file::ADTFDatFileReader, adtfdat_processing::MultiFileReader, adtfdat_processing::OffsetReaderWrapper, adtfdat_processing::ReferencedFilesReader, adtfdat_processing::SampleTimestampSanitizerReader, adtfdat_processing::SortingProxyReader, adtfdat_processing::StreamRenamingReader, adtfdat_processing::StreamsToSubstreamsReader, and adtfdat_processing::TimeExtensionReader.