RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rtctk::componentFramework::RepositoryIf::Response Class Reference

An object used to wait for a request to complete. More...

#include <rtctk/componentFramework/repositoryIf.hpp>

Public Member Functions

 Response (std::future< void > &&future) noexcept
 
 Response (Response &&other) noexcept
 
Responseoperator= (Response &&other) noexcept
 
void Wait ()
 Waits for the request that was sent to the repository to complete.
 
bool Wait (const std::chrono::microseconds &timeout)
 Waits for the request that was sent to the repository to complete.
 

Detailed Description

An object used to wait for a request to complete.

This is effectively just a wrapper around a future object to provide blocking Wait methods to wait for a response to a previously sent request.

Thread Safety
thread-compatible
Deprecated
Use BatchResponse instead.

Constructor & Destructor Documentation

◆ Response() [1/2]

rtctk::componentFramework::RepositoryIf::Response::Response ( std::future< void > && future)
explicitnoexcept

◆ Response() [2/2]

rtctk::componentFramework::RepositoryIf::Response::Response ( RepositoryIf::Response && other)
noexcept

Member Function Documentation

◆ operator=()

RepositoryIf::Response & rtctk::componentFramework::RepositoryIf::Response::operator= ( RepositoryIf::Response && other)
noexcept

◆ Wait() [1/2]

void rtctk::componentFramework::RepositoryIf::Response::Wait ( )

Waits for the request that was sent to the repository to complete.

This method is used to synchronise with a request sent to the repository. It will block until the request is complete.

Exception Safety
basic

◆ Wait() [2/2]

bool rtctk::componentFramework::RepositoryIf::Response::Wait ( const std::chrono::microseconds & timeout)

Waits for the request that was sent to the repository to complete.

This method is used to synchronise with a request sent to the repository. It will block until the request is complete or a timeout occurs.

Note
If a timeout occurs the request may still not be complete. This method should be invoked again until it returns true.
Parameters
[in]timeoutThe maximum number of microseconds to wait for the request to complete.
Returns
true if the request is complete and false if a timeout occurred.
Exception Safety
basic

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