RTI Recording Service  Version 6.1.1
rti::recording::storage::StorageStreamReader Class Referenceabstract

Storage stream reader. More...

#include <StorageStreamReader.hpp>

Inheritance diagram for rti::recording::storage::StorageStreamReader:
rti::recording::storage::TStorageStreamReader< Data, Info >

Public Member Functions

virtual ~StorageStreamReader ()
 Virtual destructor. More...
 
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 stream (DDS topic). The data samples retrieved have to be provided in increasing time-stamp order (reception time-stamp). More...
 
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. More...
 
virtual bool finished ()=0
 Method for querying whether there are no more samples for this stream. More...
 
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. More...
 

Detailed Description

Storage stream reader.

class rti::recording::storage::StorageStreamReader This class retrieves user data from storage.

Constructor & Destructor Documentation

◆ ~StorageStreamReader()

virtual rti::recording::storage::StorageStreamReader::~StorageStreamReader ( )
inlinevirtual

Virtual destructor.

References finished(), read(), reset(), and return_loan().

Member Function Documentation

◆ read()

virtual void rti::recording::storage::StorageStreamReader::read ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq,
const SelectorState selector 
)
pure virtual

Method called by Replay Service and Converter to retrieve samples from storage for a particular stream (DDS topic). The data samples retrieved have to be provided in increasing time-stamp order (reception time-stamp).

Parameters
sample_seqA vector of data samples that Replay Service or Converter will replay or convert to a new format. A SampleType is a DDS_DynamicData * cast as a void *
info_seqA vector of sample information about the samples, such as recorded timestamps of the sample data. An InfoType is a DDS_SampleInfo * cast as a void *.
selectorProvides the statefulness and constraints of the data queried by Replay Service or Converter. When the selector's sample state is set to 'any', it means its asking for stateless information (it doesn't care whether the data has been read before or not). When the selector's sample state is set to 'not read' then it's a stateful read, and only samples that weren't given to the application before have to be provided. Note: for the moment, Replay Service or Converter won't ask for data with sample state equal to 'read', so this state can be ignored.

When the selector's start timestamp is set to a value different than 0, it means that Replay Service is on a jumping process. The StreamReader should then prepare its statement with this new start timestamp. Also, if the selector's maximum samples is set to 0, it means that Replay Service is on a jumping breakpoint process instead of a standard jumping process. In this case, the StreamReader should also prepare the statement but it should not read any sample.

Implemented in rti::recording::storage::TStorageStreamReader< Data, Info >.

Referenced by rti::recording::storage::TStorageStreamReader< Data, Info >::read(), rti::recording::storage::TStorageStreamReader< Data, Info >::return_loan(), and ~StorageStreamReader().

◆ return_loan()

virtual void rti::recording::storage::StorageStreamReader::return_loan ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq 
)
pure virtual

Method for releasing resources related to the queried data samples.

This is called back when the Replay Service or Converter has finished with the data samples queried in the take() function, and wants to notify the plugin that it can free any related resources.

Parameters
sample_seqA vector of sample objects that the plugin can now free.
info_seqA vector of sample_info objects that the plugin can now free.

Implemented in rti::recording::storage::TStorageStreamReader< Data, Info >.

Referenced by rti::recording::storage::TStorageStreamReader< Data, Info >::return_loan(), and ~StorageStreamReader().

◆ finished()

virtual bool rti::recording::storage::StorageStreamReader::finished ( )
pure virtual

Method for querying whether there are no more samples for this stream.

Returns
true if there is no more data available for this stream, false otherwise.

Referenced by ~StorageStreamReader().

◆ reset()

virtual void rti::recording::storage::StorageStreamReader::reset ( )
pure virtual

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.

Referenced by ~StorageStreamReader().