11 #ifndef HPP_RTI_RECORDING_STORAGE_STREAMREADER_HPP_ 12 #define HPP_RTI_RECORDING_STORAGE_STREAMREADER_HPP_ 16 #include "dds/dds.hpp" 18 #include "rti/routing/detail/ForwarderUtils.hpp" 20 #include "rti/recording/storage/SelectorState.hpp" 23 namespace rti {
namespace recording {
namespace storage {
34 typedef void* SamplePtr;
35 typedef void* InfoPtr;
76 std::vector<SamplePtr>& sample_seq,
77 std::vector<InfoPtr>& info_seq,
94 std::vector<SamplePtr>& sample_seq,
95 std::vector<InfoPtr>& info_seq) = 0;
112 virtual void reset() = 0;
123 template <
typename Data,
typename Info>
144 std::vector<SamplePtr>& sample_seq,
145 std::vector<InfoPtr>& info_seq,
148 read(sample_seq_, info_seq_, selector);
149 RTI_ROUTING_SAMPLE_VECTOR_COPY_PTRS(sample_seq, sample_seq_);
150 RTI_ROUTING_SAMPLE_VECTOR_COPY_PTRS(info_seq, info_seq_);
158 std::vector<SamplePtr>& sample_seq,
159 std::vector<InfoPtr>& info_seq) RTI_FINAL
161 RTI_ROUTING_SAMPLE_VECTOR_COPY_PTRS(sample_seq_, sample_seq);
162 RTI_ROUTING_SAMPLE_VECTOR_COPY_PTRS(info_seq_, info_seq);
169 std::vector<Data *>& sample_seq,
170 std::vector<Info *>& info_seq,
174 std::vector<Data *>& sample_seq,
175 std::vector<Info *>& info_seq) = 0;
184 std::vector<Data*> sample_seq_;
185 std::vector<Info*> info_seq_;
194 dds::core::xtypes::DynamicData,
virtual void read(std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq, const SelectorState &selector)=0
Method called by Replay Service and Converter to retrieve samples from storage for a particular strea...
Data DataRep
The data type.
Definition: StorageStreamReader.hpp:130
Info InfoRep
The info type.
Definition: StorageStreamReader.hpp:134
virtual ~StorageStreamReader()
Virtual destructor.
Definition: StorageStreamReader.hpp:40
virtual bool finished()=0
Method for querying whether there are no more samples for this stream.
TStorageStreamReader< dds::core::xtypes::DynamicData, dds::sub::SampleInfo > DynamicDataStorageStreamReader
Convenience definition of typed StorageStreamReader that requires dds::core::xtypes::DynamicData for ...
Definition: StorageStreamReader.hpp:195
Storage stream reader.
Definition: StorageStreamReader.hpp:31
virtual void return_loan(std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq)=0
Method for releasing resources related to the queried data samples.
void return_loan(std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq) RTI_FINAL
Performs the conversion between the vector of data and info pointers to strongly-typed pointers...
Definition: StorageStreamReader.hpp:157
The RTI namespace.
Definition: RecordingServiceImpl.hpp:22
void read(std::vector< SamplePtr > &sample_seq, std::vector< InfoPtr > &info_seq, const SelectorState &selector) RTI_FINAL
Performs the conversion between the vector of data and info pointers to strongly-typed pointers...
Definition: StorageStreamReader.hpp:143
This class is used by Replay Service or Converter when asking the storage plugin for data...
Definition: SelectorState.hpp:98
virtual void reset()=0
Method used by Replay Service when looping, to start over. After this method is called, the stream reader should be ready to start reading data from the beginning of the stream, again.
A templatized wrapping implementation of StorageStreamReader, providing a strongly-typed interface re...
Definition: StorageStreamReader.hpp:124