Fast DDS  Version 3.3.0
Fast DDS
Loading...
Searching...
No Matches
RpcClientWriter< T > Class Template Referenceabstract

An interface for a client-side RPC writer. More...

#include <RpcClientWriter.hpp>

Public Member Functions

virtual ~RpcClientWriter () noexcept=default
 Destructor.
 
virtual void write (const T &value)=0
 Copy write operation.
 
virtual void write (T &&value)=0
 Move write operation.
 
virtual void finish (RpcStatusCode reason=RPC_STATUS_CODE_OK)=0
 Marks the end of the input feed.
 

Detailed Description

template<typename T>
class eprosima::fastdds::dds::rpc::RpcClientWriter< T >

An interface for a client-side RPC writer.

Would be used to write inputs from a client on an operation with @feed annotated inputs.

Constructor & Destructor Documentation

◆ ~RpcClientWriter()

template<typename T >
virtual ~RpcClientWriter ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ finish()

template<typename T >
virtual void finish ( RpcStatusCode  reason = RPC_STATUS_CODE_OK)
pure virtual

Marks the end of the input feed.

Will indicate to the server that no more inputs will be sent. Specifying a reason different from RPC_STATUS_CODE_OK will indicate that the feed was finished due to an error, and that the client will not be expecting a reply.

May block depending on the configured queue sizes in both the client and the server.

Parameters
reasonThe status code to indicate the reason for finishing the feed.
Exceptions
RpcBrokenPipeExceptionif the communication with the server breaks.
RpcTimeoutExceptionif the operation needs to block for a time longer than the configured timeout.

◆ write() [1/2]

template<typename T >
virtual void write ( const T &  value)
pure virtual

Copy write operation.

Will add a value to the input feed, that would be eventually sent to the server. May block depending on the configured queue sizes in both the client and the server.

Parameters
valueThe value to write to the input feed.
Exceptions
RpcBrokenPipeExceptionif the communication with the server breaks.
RpcTimeoutExceptionif the operation needs to block for a time longer than the configured timeout.
RpcOperationErrorif the server communicates an error.

◆ write() [2/2]

template<typename T >
virtual void write ( T &&  value)
pure virtual

Move write operation.

Will add a value to the input feed, that would be eventually sent to the server. May block depending on the configured queue sizes in both the client and the server.

Parameters
valueThe value to write to the input feed.
Exceptions
RpcBrokenPipeExceptionif the communication with the server breaks.
RpcTimeoutExceptionif the operation needs to block for a time longer than the configured timeout.
RpcOperationErrorif the server communicates an error.

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