20.1.7.20. RpcServerReader

template<typename T>
class RpcServerReader

An interface for a server-side RPC reader.

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

Public Functions

virtual ~RpcServerReader() noexcept = default

Destructor.

virtual bool read(T &value) = 0

Blocking read operation.

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

Parameters:

value – The value to read the input into.

Throws:
Returns:

True if a value was read, false if the feed has finished.

virtual bool read(T &value, const eprosima::fastdds::dds::Duration_t &timeout) = 0

Blocking read operation with timeout.

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

Parameters:
  • value – The value to read the input into.

  • timeout – The maximum time to wait for an input.

Throws:
Returns:

True if a value was read, false if the feed has finished.