PLCnext API Documentation  22.6.0.43
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
Arp::System::Rsc::Services::RscWriter Class Reference

Writes data to Rsc. More...

#include <RscWriter.hpp>

Public Member Functions

 RscWriter (BinaryWriter2 &remotingWriter, RscClientContext *pClientContext=nullptr)
 Constructs an RscWriter instance. More...
 
 RscWriter (const RscWriter &arg)=default
 Copy constructor. More...
 
RscWriteroperator= (const RscWriter &arg)=default
 Assignment operator. More...
 
 ~RscWriter (void)=default
 Destructs this instance and frees all resources. More...
 
RscStream GetStream ()
 Creates an instance of RscStream initialized to write stream data. More...
 
RemotingWriter & GetRemotingWriter (void)
 Returns reference to RemotingWriter More...
 
void WriteConfirmation (bool flush=false)
 Sends a confirmation message to remote station. More...
 
void WriteStream (RscStreamAdapter &stream)
 Writes the data from the supplied stream to remote stream. More...
 
template<class T >
void Write (const T &value)
 Writes an element of T from Rsc. Datatag and format is determined deducted by type of T. More...
 
template<class T >
void Write (const T &value, bool writeTag)
 Writes an element of T from Rsc. Datatag and format is determined deducted by type of T. More...
 
template<int N>
void WriteString (const String &value)
 Writes a string in format Utf-8. More...
 
template<int N>
void WriteString (const char(&value)[N])
 Writes a string in format Utf-8. More...
 
template<class T >
void WriteObject (const T &value)
 Writes an object. Datatag and format is determined deducted by type of T. This method doesn't support strings. More...
 
template<int N>
void WriteObjectString (const String &value)
 Writes a string in object format as Utf8 string. More...
 
template<int N>
void WriteObjectString (const char(&value)[N])
 Writes a string in object format as Utf8 string. More...
 
template<class T >
void WriteArray (const std::vector< T > &values)
 Writes an array to Rsc. The data to write has to be stored in a std::vector. More...
 
template<class T >
void WriteArray (const std::vector< std::vector< T >> &values)
 Writes an array of arrays to Rsc. The data to write has to be stored in a std::vector. More...
 
template<class T , size_t N>
void WriteArray (const std::array< T, N > &values)
 Writes an array to Rsc. The data to write has to be stored in a std::array. More...
 

Detailed Description

Writes data to Rsc.

Constructor & Destructor Documentation

◆ RscWriter() [1/2]

Arp::System::Rsc::Services::RscWriter::RscWriter ( BinaryWriter2 &  remotingWriter,
RscClientContext *  pClientContext = nullptr 
)
inline

Constructs an RscWriter instance.

◆ RscWriter() [2/2]

Arp::System::Rsc::Services::RscWriter::RscWriter ( const RscWriter arg)
default

Copy constructor.

◆ ~RscWriter()

Arp::System::Rsc::Services::RscWriter::~RscWriter ( void  )
default

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetRemotingWriter()

RemotingWriter & Arp::System::Rsc::Services::RscWriter::GetRemotingWriter ( void  )
inline

Returns reference to RemotingWriter

Returns
reference to RemotingWriter

◆ GetStream()

RscStream Arp::System::Rsc::Services::RscWriter::GetStream ( void  )
inline

Creates an instance of RscStream initialized to write stream data.

Returns
instance of RscStream

◆ operator=()

RscWriter& Arp::System::Rsc::Services::RscWriter::operator= ( const RscWriter arg)
default

Assignment operator.

◆ Write() [1/2]

template<class T >
void Arp::System::Rsc::Services::RscWriter::Write ( const T &  value)
inline

Writes an element of T from Rsc. Datatag and format is determined deducted by type of T.

Parameters
valueReference to data
Template Parameters
TType of element to write

◆ Write() [2/2]

template<class T >
void Arp::System::Rsc::Services::RscWriter::Write ( const T &  value,
bool  writeTag 
)
inline

Writes an element of T from Rsc. Datatag and format is determined deducted by type of T.

Parameters
valueReference to data
writeTagif true the tag is written, otherwise it's ommitted.
Template Parameters
TType of element to write

◆ WriteArray() [1/3]

template<class T , size_t N>
void Arp::System::Rsc::Services::RscWriter::WriteArray ( const std::array< T, N > &  values)
inline

Writes an array to Rsc. The data to write has to be stored in a std::array.

Parameters
valuesReference to array data to write
Template Parameters
TType of array elements
NSize of static array

◆ WriteArray() [2/3]

template<class T >
void Arp::System::Rsc::Services::RscWriter::WriteArray ( const std::vector< std::vector< T >> &  values)
inline

Writes an array of arrays to Rsc. The data to write has to be stored in a std::vector.

Parameters
valuesReference to array data to write
Template Parameters
TType of array elements

◆ WriteArray() [3/3]

template<class T >
void Arp::System::Rsc::Services::RscWriter::WriteArray ( const std::vector< T > &  values)
inline

Writes an array to Rsc. The data to write has to be stored in a std::vector.

Parameters
valuesReference to array data to write
Template Parameters
TType of array elements

◆ WriteConfirmation()

void Arp::System::Rsc::Services::RscWriter::WriteConfirmation ( bool  flush = false)
inline

Sends a confirmation message to remote station.

Parameters
flushTrue if internal data buffers should be flushed

◆ WriteObject()

template<class T >
void Arp::System::Rsc::Services::RscWriter::WriteObject ( const T &  value)
inline

Writes an object. Datatag and format is determined deducted by type of T. This method doesn't support strings.

Parameters
valueReference to element
Template Parameters
TType of element

◆ WriteObjectString() [1/2]

template<int N>
void Arp::System::Rsc::Services::RscWriter::WriteObjectString ( const char(&)  value[N])
inline

Writes a string in object format as Utf8 string.

Parameters
valueReference to character array with string to send
Template Parameters
NMaximum number of characters

◆ WriteObjectString() [2/2]

template<int N>
void Arp::System::Rsc::Services::RscWriter::WriteObjectString ( const String value)
inline

Writes a string in object format as Utf8 string.

Parameters
valueReference to string element
Template Parameters
NMaximum number of characters

◆ WriteStream()

void Arp::System::Rsc::Services::RscWriter::WriteStream ( RscStreamAdapter stream)

Writes the data from the supplied stream to remote stream.

Parameters
streamThe stream to write the data from.

◆ WriteString() [1/2]

template<int N>
void Arp::System::Rsc::Services::RscWriter::WriteString ( const char(&)  value[N])
inline

Writes a string in format Utf-8.

Parameters
valueReference to character array with string to send
Template Parameters
NMaximum number of characters

◆ WriteString() [2/2]

template<int N>
void Arp::System::Rsc::Services::RscWriter::WriteString ( const String value)
inline

Writes a string in format Utf-8.

Parameters
valueReference to String object
Template Parameters
NMaximum number of characters

The documentation for this class was generated from the following file: