RTI Routing Service  Version 7.0.0
rti::routing::adapter::StreamWriter Class Referenceabstract

Provides a way to write samples of a specific type in a data domain. More...

#include <StreamWriter.hpp>

Inheritance diagram for rti::routing::adapter::StreamWriter:
rti::routing::UpdatableEntity rti::routing::adapter::TStreamWriter< Data, Info >

Public Member Functions

virtual int write (const std::vector< SamplePtr > &sample_seq, const std::vector< InfoPtr > &info_seq)=0
 Writes a collection of data samples to the output stream associated with this StreamWriter. More...
 
virtual ~StreamWriter ()
 Virtual destructor. More...
 
- Public Member Functions inherited from rti::routing::UpdatableEntity
virtual void update (const std::map< std::string, std::string > &properties)
 Updates a pluggable entity. More...
 
virtual ~UpdatableEntity ()
 Virtual destructor. More...
 

Detailed Description

Provides a way to write samples of a specific type in a data domain.

In the XML configuration file, A StreamWriter is associated with the tag <output> within <route> or <auto_route>.

Multi-threading safety:
Partially Safe All operations on a concrete StreamWriter objects are safe and always serialized on a given Session. Operations on different StreamWriter objects can be called concurrently if the StreamWriter objects belong to different Sessions.

Constructor & Destructor Documentation

◆ ~StreamWriter()

virtual rti::routing::adapter::StreamWriter::~StreamWriter ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ write()

virtual int rti::routing::adapter::StreamWriter::write ( const std::vector< SamplePtr > &  sample_seq,
const std::vector< InfoPtr > &  info_seq 
)
pure virtual

Writes a collection of data samples to the output stream associated with this StreamWriter.

Parameters
sample_seq<<in>> Vector of sample pointers. The data representation associated with the samples will be given by the value of TypeInfo::data_representation_kind that is part of the StreamInfo object passed at StreamWriter creation time. Usually the data representation is dynamic type, which corresponds to dds::core::xtypes::DynamicData.
info_seq<<in>> Vector of sample info pointers. The info representation is dependent of the StreamWriter implementation. Usually when data representation is dynamic type, the sample info is dds::sub::SampleInfo.
Returns
Number of samples written.
Exceptions
std::exception

Implemented in rti::routing::adapter::TStreamWriter< Data, Info >.

Referenced by rti::routing::adapter::TStreamWriter< Data, Info >::write().