PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | List of all members
Arp::System::Rsc::Services::RscStream Class Reference

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

#include <RscStream.hpp>

Public Types

using Stream = Arp::System::Commons::Io::Stream
 

Public Member Functions

 RscStream (void)=default
 Constructs an instance of RscStream More...
 
 RscStream (RemotingWriter &writer)
 Constructs an instance of RscStream to write stream data More...
 
 RscStream (RemotingReader &reader)
 Constructs an instance of RscStream to read stream data More...
 
 RscStream (const RscStream &rscStream)=default
 Copy Constructor More...
 
 ~RscStream (void)=default
 Destructs this instance and frees all resources. More...
 
bool HasWriter (void) const
 Determines if this instance is able to write. More...
 
bool HasReader (void) const
 Determines if this instance is able to reade. More...
 
void SetWriter (RemotingWriter *pValue)
 Sets RemotingWriter needed to write stream data More...
 
void SetReader (RemotingReader *pValue)
 Sets RemotingReader needed to read stream data More...
 
void BeginRead (void)
 Begins the read operation. Need pReader to be set. More...
 
size_t Read (byte *pBuffer, size_t bufferSize)
 Reads up to bufferSize byte into memory referenced by pBuffer More...
 
void Skip (void)
 Skips the entire stream and disposes the read data More...
 
void DeserializeTo (Stream &stream)
 Deserialize the stream data and copies it to the as agument passed stream More...
 
void DeserializeTo (RscStream stream)
 Deserialize the stream data and copies it to the as agument passed Rsc stream More...
 
void BeginWrite (void)
 Begins the write operation More...
 
void Write (const byte *pBuffer, size_t bufferCount)
 Writes data into stream More...
 
void Flush (void)
 Ends the read writer operation and writes remaining internal buffered bytes More...
 
void SerializeFrom (Stream &stream)
 Serialize the stream data from the as agument passed stream More...
 
void SerializeFrom (RscStream stream)
 Serialize the stream data from the as agument passed stream More...
 

Detailed Description

Enables Rsc services to marshal large data packets as stream.

Constructor & Destructor Documentation

◆ RscStream() [1/4]

Arp::System::Rsc::Services::RscStream::RscStream ( void  )
default

Constructs an instance of RscStream

◆ RscStream() [2/4]

Arp::System::Rsc::Services::RscStream::RscStream ( RemotingWriter &  writer)
inline

Constructs an instance of RscStream to write stream data

Parameters
writerReference to RemotingWriter to writer stream data

◆ RscStream() [3/4]

Arp::System::Rsc::Services::RscStream::RscStream ( RemotingReader &  reader)
inline

Constructs an instance of RscStream to read stream data

Parameters
readerReference to RemotingReader to read stream data

◆ RscStream() [4/4]

Arp::System::Rsc::Services::RscStream::RscStream ( const RscStream rscStream)
default

Copy Constructor

◆ ~RscStream()

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

Destructs this instance and frees all resources.

Member Function Documentation

◆ BeginRead()

void Arp::System::Rsc::Services::RscStream::BeginRead ( void  )

Begins the read operation. Need pReader to be set.

◆ BeginWrite()

void Arp::System::Rsc::Services::RscStream::BeginWrite ( void  )

Begins the write operation

◆ DeserializeTo() [1/2]

void Arp::System::Rsc::Services::RscStream::DeserializeTo ( RscStream  stream)

Deserialize the stream data and copies it to the as agument passed Rsc stream

◆ DeserializeTo() [2/2]

void Arp::System::Rsc::Services::RscStream::DeserializeTo ( Stream stream)

Deserialize the stream data and copies it to the as agument passed stream

◆ Flush()

void Arp::System::Rsc::Services::RscStream::Flush ( void  )

Ends the read writer operation and writes remaining internal buffered bytes

◆ HasReader()

bool Arp::System::Rsc::Services::RscStream::HasReader ( void  ) const
inline

Determines if this instance is able to reade.

◆ HasWriter()

bool Arp::System::Rsc::Services::RscStream::HasWriter ( void  ) const
inline

Determines if this instance is able to write.

◆ Read()

size_t Arp::System::Rsc::Services::RscStream::Read ( byte pBuffer,
size_t  bufferSize 
)

Reads up to bufferSize byte into memory referenced by pBuffer

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

◆ SerializeFrom() [1/2]

void Arp::System::Rsc::Services::RscStream::SerializeFrom ( RscStream  stream)

Serialize the stream data from the as agument passed stream

◆ SerializeFrom() [2/2]

void Arp::System::Rsc::Services::RscStream::SerializeFrom ( Stream stream)

Serialize the stream data from the as agument passed stream

◆ SetReader()

void Arp::System::Rsc::Services::RscStream::SetReader ( RemotingReader *  pValue)
inline

Sets RemotingReader needed to read stream data

Parameters
pValuePointer to RemotingReader

◆ SetWriter()

void Arp::System::Rsc::Services::RscStream::SetWriter ( RemotingWriter *  pValue)
inline

Sets RemotingWriter needed to write stream data

Parameters
pValuePointer to RemotingWriter

◆ Skip()

void Arp::System::Rsc::Services::RscStream::Skip ( void  )

Skips the entire stream and disposes the read data

◆ Write()

void Arp::System::Rsc::Services::RscStream::Write ( const byte pBuffer,
size_t  bufferCount 
)

Writes data into stream

Parameters
pBufferPointer to data
bufferCountAmount of byte to write

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