RTI Recording Service  Version 6.0.1
 All Data Structures Namespaces Files Functions Typedefs Enumerations Enumerator Groups
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.
 
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).
 
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.
 
virtual bool finished ()=0
 Method for querying whether there are no more samples for this stream.
 
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.
 

Detailed Description

Storage stream reader.

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

Constructor & Destructor Documentation

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

Virtual destructor.

Member Function Documentation

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.

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

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 >.

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.
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.


RTI Recording Service Version 6.0.1 Copyright © Sun Nov 17 2019 Real-Time Innovations, Inc