RTI Recording Service Version 7.1.0
rti::recording::storage::TStorageStreamReader< Data, Info > Class Template Referenceabstract

A templatized wrapping implementation of StorageStreamReader, providing a strongly-typed interface regarding data and info representations. More...

#include <StorageStreamReader.hpp>

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

Public Types

typedef Data DataRep
 The data type. More...
 
typedef Info InfoRep
 The info type. More...
 

Public Member Functions

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. More...
 
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. 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...
 
- Public Member Functions inherited from rti::recording::storage::StorageStreamReader
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

template<typename Data, typename Info>
class rti::recording::storage::TStorageStreamReader< Data, Info >

A templatized wrapping implementation of StorageStreamReader, providing a strongly-typed interface regarding data and info representations.

class rti::recording::storage::TStorageStreamReader

You can implement this interface as a convenience to manipulate the data and info representation without dealing with opaque pointers.

Member Typedef Documentation

◆ DataRep

template<typename Data , typename Info >
typedef Data rti::recording::storage::TStorageStreamReader< Data, Info >::DataRep

The data type.

◆ InfoRep

template<typename Data , typename Info >
typedef Info rti::recording::storage::TStorageStreamReader< Data, Info >::InfoRep

The info type.

Member Function Documentation

◆ read() [1/2]

template<typename Data , typename Info >
void rti::recording::storage::TStorageStreamReader< Data, Info >::read ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq,
const SelectorState selector 
)
inlinevirtual

Performs the conversion between the vector of data and info pointers to strongly-typed pointers.

Implements rti::recording::storage::StorageStreamReader.

References rti::recording::storage::TStorageStreamReader< Data, Info >::read().

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

◆ return_loan() [1/2]

template<typename Data , typename Info >
void rti::recording::storage::TStorageStreamReader< Data, Info >::return_loan ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq 
)
inlinevirtual

Performs the conversion between the vector of data and info pointers to strongly-typed pointers.

Implements rti::recording::storage::StorageStreamReader.

References rti::recording::storage::TStorageStreamReader< Data, Info >::return_loan().

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

◆ read() [2/2]

template<typename Data , typename Info >
virtual void rti::recording::storage::StorageStreamReader::read ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq,
const SelectorState selector 
)
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.

Implements rti::recording::storage::StorageStreamReader.

◆ return_loan() [2/2]

template<typename Data , typename Info >
virtual void rti::recording::storage::StorageStreamReader::return_loan ( std::vector< SamplePtr > &  sample_seq,
std::vector< InfoPtr > &  info_seq 
)
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.

Implements rti::recording::storage::StorageStreamReader.