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

An interface for a server-side RPC reader. More...

#include <RpcServerReader.hpp>

Public Member Functions

virtual ~RpcServerReader () noexcept=default
 Destructor.
virtual bool read (T &value)=0
 Blocking read operation.
virtual bool read (T &value, const eprosima::fastdds::dds::Duration_t &timeout)=0
 Blocking read operation with timeout.

Detailed Description

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

An interface for a server-side RPC reader.

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

Constructor & Destructor Documentation

◆ ~RpcServerReader()

template<typename T>
virtual ~RpcServerReader ( )
virtualdefaultnoexcept

Destructor.

Member Function Documentation

◆ read() [1/2]

template<typename T>
virtual bool read ( T & value)
pure virtual

Blocking read operation.

Will block until an input is available or the input feed has finished.

Parameters
valueThe value to read the input into.
Returns
True if a value was read, false if the feed has finished.
Exceptions
RpcBrokenPipeExceptionif the communication with the client breaks.
RpcFeedCancelledExceptionif the client cancels the input feed.

◆ read() [2/2]

template<typename T>
virtual bool read ( T & value,
const eprosima::fastdds::dds::Duration_t & timeout )
pure virtual

Blocking read operation with timeout.

Will block until an input is available, the input feed has finished, or the timeout expires.

Parameters
valueThe value to read the input into.
timeoutThe maximum time to wait for an input.
Returns
True if a value was read, false if the feed has finished.
Exceptions
RpcTimeoutExceptionif the timeout expires.
RpcBrokenPipeExceptionif the communication with the client breaks.
RpcFeedCancelledExceptionif the client cancels the input feed.

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