|
iceoryx2
C++ Language Bindings
|
Sends [RequestMut]s to a [Server] in a request-response based communication.
More...
#include <client.hpp>
Public Member Functions | |
| Client (Client &&rhs) noexcept | |
| auto | operator= (Client &&rhs) noexcept -> Client & |
| ~Client () noexcept | |
| Client (const Client &) noexcept=delete | |
| auto | operator= (const Client &) noexcept -> Client &=delete |
| auto | id () const -> UniqueClientId |
Returns the [UniqueClientId] of the [Client]. | |
| auto | backpressure_strategy () const -> BackpressureStrategy |
| auto | max_active_requests () const -> uint64_t |
Returns the maximal active requests a [Client] can send. | |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | initial_max_slice_len () const -> uint64_t |
| Returns the maximum number of elements that can be loaned in a slice. | |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | send_copy (const RequestPayload &payload) const -> bb::Expected< PendingResponse< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >, RequestSendError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | send_slice_copy (bb::ImmutableSlice< ValueType > &payload) const -> bb::Expected< PendingResponse< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >, RequestSendError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_uninit () -> bb::Expected< RequestMutUninit< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >, LoanError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice_uninit (uint64_t number_of_elements) -> bb::Expected< RequestMutUninit< Service, T, RequestUserHeader, ResponsePayload, ResponseUserHeader >, LoanError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan () -> bb::Expected< RequestMut< Service, T, RequestUserHeader, ResponsePayload, ResponseUserHeader >, LoanError > |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice (uint64_t number_of_elements) -> bb::Expected< RequestMut< Service, T, RequestUserHeader, ResponsePayload, ResponseUserHeader >, LoanError > |
Friends | |
| template<ServiceType , typename , typename , typename , typename > | |
| class | PortFactoryClient |
Sends [RequestMut]s to a [Server] in a request-response based communication.
Definition at line 31 of file client.hpp.
|
inlinenoexcept |
Definition at line 116 of file client.hpp.
|
inlinenoexcept |
Definition at line 142 of file client.hpp.
|
deletenoexcept |
|
inline |
Returns the strategy the [Client] follows when a [RequestMut] cannot be delivered if the [Server]s buffer is full.
Definition at line 164 of file client.hpp.
|
inline |
Returns the [UniqueClientId] of the [Client].
Definition at line 151 of file client.hpp.
|
inline |
Returns the maximum number of elements that can be loaned in a slice.
Definition at line 187 of file client.hpp.
|
inline |
Acquires the payload for the request and initializes the underlying memory with default. This can be very expensive when the payload is large, therefore prefer [Client::loan_uninit()] when possible.
Definition at line 291 of file client.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_uninit().
|
inline |
Acquires the payload for the request and initializes the underlying memory with default. This can be very expensive when the payload is large, therefore prefer [Client::loan_uninit()] when possible.
Definition at line 308 of file client.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_slice_uninit().
|
inline |
Acquires an [RequestMutUninit] to store payload. This API shall be used by default to avoid unnecessary copies.
Definition at line 218 of file client.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan_slice().
|
inline |
Acquires an [RequestMutUninit] to store payload. This API shall be used by default to avoid unnecessary copies.
Definition at line 198 of file client.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::loan().
|
inline |
Returns the maximal active requests a [Client] can send.
Definition at line 175 of file client.hpp.
|
inlinenoexcept |
Definition at line 126 of file client.hpp.
|
deletenoexcept |
|
inline |
Copies the input value into a [RequestMut] and sends it. On success it returns a [PendingResponse] that can be used to receive a stream of [Response]s from the [Server].
Definition at line 237 of file client.hpp.
References iox2::bb::err().
|
inline |
Copies the input value into a [RequestMut] and sends it. On success it returns a [PendingResponse] that can be used to receive a stream of [Response]s from the [Server].
Definition at line 262 of file client.hpp.
References iox2::bb::err().
|
friend |
Definition at line 102 of file client.hpp.