adtf_file_library  0.13.2
time_extension_reader.h
Go to the documentation of this file.
1 
17 #pragma once
18 #include <adtf_file/reader.h>
19 #include <unordered_map>
20 
21 namespace adtfdat_processing
22 {
23 
29 {
30 public:
35 
36  std::string getReaderIdentifier() const override;
37  void open(const std::string& file_name,
38  std::shared_ptr<adtf_file::SampleFactory> sample_factory,
39  std::shared_ptr<adtf_file::StreamTypeFactory> stream_type_factory) override;
40 
41  uint32_t getFileVersion() const override;
42  std::string getDescription() const override;
43  std::vector<adtf_file::Stream> getStreams() const override;
44  std::vector<adtf_file::Extension> getExtensions() const override;
46  std::optional<uint64_t> getItemCount() const override;
47  std::optional<double> getProgress() const override;
48 
49 private:
50  std::shared_ptr<adtf_file::SampleFactory> _sample_factory;
51  std::shared_ptr<adtf_file::StreamTypeFactory> _stream_type_factory;
52  std::shared_ptr<Reader> _reader;
53  std::vector<adtf_file::Stream> _streams;
54  uint16_t _time_extension_stream_id;
55  std::chrono::nanoseconds _time_extension;
56  std::chrono::nanoseconds _time_extension_interval;
57  std::chrono::nanoseconds _time_extension_last;
58  bool _next_item_is_sample = true;
59 };
60 
65 
66 }
Definition: reader.h:318
class to create or read a file item. This file item is either a sample, streamtype or trigger.
Definition: reader.h:156
Default Reader factory implementation for readers using a standard default CTOR.
Definition: reader.h:339
Definition: reader.h:173
Proxy Reader that allows you to provide samples after the orignal reader has signal EOF.
Definition: time_extension_reader.h:29
std::string getDescription() const override
std::vector< adtf_file::Stream > getStreams() const override
Get the Streams.
uint32_t getFileVersion() const override
std::string getReaderIdentifier() const override
Get the Reader Identifier of the Reader.
adtf_file::FileItem getNextItem() override
void open(const std::string &file_name, std::shared_ptr< adtf_file::SampleFactory > sample_factory, std::shared_ptr< adtf_file::StreamTypeFactory > stream_type_factory) override
opens a file by the given filename. The given factories must be used to create samples and streamtype...
std::optional< uint64_t > getItemCount() const override
Get the Item Count. This gets the overall count of all items (samples, stream types and triggers) of ...
std::optional< double > getProgress() const override
Get the Progress, a relative file position between 0.0 and 1.0.
std::vector< adtf_file::Extension > getExtensions() const override
Get the Extensions if any.
namespace for ADTF DAT Processing library.
Definition: ddl_helpers.h:38

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