PLCnext API Documentation 25.0.2.69
Public Member Functions | Friends | List of all members
Arp::Base::Rsc::Commons::RscStreamReader Class Reference

Enables Rsc services to marshal large data packets as stream. More...

#include <RscStreamReader.hpp>

Public Member Functions

 RscStreamReader (void)
 Constructs an empty instance of RscStreamReader
 
 RscStreamReader (RscReader &reader)
 Constructs an instance of RscStreamReader to deserialize stream data More...
 
bool IsEmpty (void) const
 Determines if this instance contains a Rsc reader to read the data. More...
 
size_t Read (byte *pBuffer, size_t bufferSize)
 Reads up to bufferSize byte into memory referenced by pBuffer. More...
 
void DeserializeTo (Stream &stream)
 Deserializes the stream data and copies it to the as argument passed stream. More...
 
void DeserializeTo (RscStreamWriter &streamWriter)
 Deserialize the stream data and copies it to the as argument passed Rsc stream. More...
 
void Skip (void)
 Skips any remaining remoting data during deserialization, if any error occurs.
 

Friends

class RscStreamWriter
 

Detailed Description

Enables Rsc services to marshal large data packets as stream.

Constructor & Destructor Documentation

◆ RscStreamReader()

Arp::Base::Rsc::Commons::RscStreamReader::RscStreamReader ( RscReader reader)
explicit

Constructs an instance of RscStreamReader to deserialize stream data

Parameters
readerThe RscReader to deserialize the stream data.

Member Function Documentation

◆ DeserializeTo() [1/2]

void Arp::Base::Rsc::Commons::RscStreamReader::DeserializeTo ( RscStreamWriter streamWriter)

Deserialize the stream data and copies it to the as argument passed Rsc stream.

Parameters
streamWriterThe stream writer to deserialize the data to.

◆ DeserializeTo() [2/2]

void Arp::Base::Rsc::Commons::RscStreamReader::DeserializeTo ( Stream stream)

Deserializes the stream data and copies it to the as argument passed stream.

Parameters
streamThe stream to copy the data to.

◆ IsEmpty()

bool Arp::Base::Rsc::Commons::RscStreamReader::IsEmpty ( void  ) const

Determines if this instance contains a Rsc reader to read the data.

Returns
true if the remoting reader was set, otherwise false.

If the remoting reader was not set, the Read() operation will throw an exception.

◆ Read()

size_t Arp::Base::Rsc::Commons::RscStreamReader::Read ( byte *  pBuffer,
size_t  bufferSize 
)

Reads up to bufferSize byte into memory referenced by pBuffer.

Parameters
pBufferPointer to buffer memory to write the read bytes to.
bufferSizeSize of memory addressed by pBuffer.
Returns
Number of bytes read into pBuffer, 0 if stream ends.

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