iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader > Class Template Reference

#include <port_factory_client.hpp>

Public Member Functions

auto backpressure_strategy (const BackpressureStrategy value) -> decltype(auto)
auto max_active_requests (const uint64_t value) -> decltype(auto)
auto name (const PortName value) -> decltype(auto)
 PortFactoryClient (PortFactoryClient &&rhs) noexcept
auto operator= (PortFactoryClient &&rhs) noexcept -> PortFactoryClient &
 ~PortFactoryClient ()
 PortFactoryClient (const PortFactoryClient &)=delete
auto operator= (const PortFactoryClient &) -> PortFactoryClient &=delete
template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto initial_max_slice_len (uint64_t value) &&-> PortFactoryClient &&
 Sets the maximum number of elements that can be loaned in a slice.
template<typename T = RequestPayload, typename = std::enable_if_t<has_flatbuffer_marker<T>(), void>>
auto initial_reserved_memory (uint64_t value) &&-> PortFactoryClient &&
template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE || has_flatbuffer_marker<T>(), void>>
auto allocation_strategy (AllocationStrategy value) &&-> PortFactoryClient &&
auto override_request_preallocation (const OverridePreallocationCallback &callback) &&-> PortFactoryClient &&
auto set_request_degradation_handler (DegradationHandler *handler) &&-> PortFactoryClient &&
auto set_response_degradation_handler (DegradationHandler *handler) &&-> PortFactoryClient &&
auto set_backpressure_handler (BackpressureHandler *handler) &&-> PortFactoryClient &&
auto create () &&-> bb::Expected< Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >, ClientCreateError >
 Creates a new [Client] or returns a [ClientCreateError] on failure.

Friends

template<ServiceType, typename, typename, typename, typename>
class PortFactoryRequestResponse

Detailed Description

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
class iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >

Factory to create a new [Client] port/endpoint for [MessagingPattern::RequestResponse] based communication.

Definition at line 38 of file port_factory_client.hpp.

Constructor & Destructor Documentation

◆ PortFactoryClient() [1/2]

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::PortFactoryClient ( PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader > && rhs)
inlinenoexcept

◆ ~PortFactoryClient()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::~PortFactoryClient ( )
inline

Definition at line 360 of file port_factory_client.hpp.

◆ PortFactoryClient() [2/2]

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::PortFactoryClient ( const PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader > & )
delete

References PortFactoryClient().

Member Function Documentation

◆ allocation_strategy()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
template<typename T, typename>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::allocation_strategy ( AllocationStrategy value) &&->PortFactoryClient &&
inline

Defines the allocation strategy that is used when the provided [PortFactoryClient::initial_max_slice_len()] is exhausted. This happens when the user acquires more than max slice len in [Client::loan_slice()] or [Client::loan_slice_uninit()].

Definition at line 191 of file port_factory_client.hpp.

References PortFactoryClient().

◆ backpressure_strategy()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::backpressure_strategy ( const BackpressureStrategy value) ->decltype(auto)

Sets the [BackpressureStrategy] which defines how the [Client] shall behave when a [Server] cannot receive a [RequestMut] since its internal buffer is full.

References backpressure_strategy().

Referenced by backpressure_strategy().

◆ create()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::create ( ) &&->bb::Expected< Client< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >, ClientCreateError >
inline

◆ initial_max_slice_len()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
template<typename T, typename>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::initial_max_slice_len ( uint64_t value) &&->PortFactoryClient &&
inline

Sets the maximum number of elements that can be loaned in a slice.

Definition at line 155 of file port_factory_client.hpp.

References PortFactoryClient().

◆ initial_reserved_memory()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
template<typename T, typename>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::initial_reserved_memory ( uint64_t value) &&->PortFactoryClient &&
inline

Sets the maximum initial reserved memory that the underlying allocator reserves for the flatbuffer builder.

Definition at line 167 of file port_factory_client.hpp.

References PortFactoryClient().

◆ max_active_requests()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::max_active_requests ( const uint64_t value) ->decltype(auto)

Defines the required maximal amount of active requests the [Client] can send. Smallest possible value is 1.

References max_active_requests().

Referenced by max_active_requests().

◆ name()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::name ( const PortName value) ->decltype(auto)

The [PortName] that shall be assigned to the [Client]. It does not have to be unique. If no [PortName] is defined then the [Client] does not have a name.

References name(), and PortFactoryClient().

Referenced by name().

◆ operator=() [1/2]

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::operator= ( const PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader > & ) ->PortFactoryClient &=delete
delete

References PortFactoryClient().

◆ operator=() [2/2]

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::operator= ( PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader > && rhs) ->PortFactoryClient &
inlinenoexcept

Definition at line 335 of file port_factory_client.hpp.

References PortFactoryClient().

◆ override_request_preallocation()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::override_request_preallocation ( const OverridePreallocationCallback & callback) &&->PortFactoryClient &&
inline

Defines a callback to reduce the number of preallocated [RequestMut]s. The input argument is the worst case number of preallocated [RequestMut]s required to guarantee that the [Client] never runs out of [RequestMut]s to loan and send. The return value is clamped between 1 and the worst case number of preallocated [RequestMut]s.

Important

If the user reduces the number of preallocated [RequestMut]s, iceoryx2 can no longer guarantee, that the [Client] can always loan a [RequestMut] to send.

Definition at line 178 of file port_factory_client.hpp.

References PortFactoryClient().

◆ set_backpressure_handler()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::set_backpressure_handler ( BackpressureHandler * handler) &&->PortFactoryClient &&
inline

Sets the [BackpressureHandler] of the [Client]. Whenever a [RequestMut] cannot be sent to a [Server], this handler is called and depending on the returned [BackpressureAction], measures will be taken. If no handler is set, the measures will be determined by the value set in [BackpressureStrategy].

Attention
The handler function needs to live as long as the generated client. If the [Client], including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data

Definition at line 224 of file port_factory_client.hpp.

References PortFactoryClient().

◆ set_request_degradation_handler()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::set_request_degradation_handler ( DegradationHandler * handler) &&->PortFactoryClient &&
inline

Sets the [DegradationHandler] for sending [RequestMut] from the [Client]. Whenever a request connection to a [Server] is corrupted, this handler is called and depending on the returned [DegradationAction] measures will be taken.

Attention
The handler function needs to live as long as the generated client. If the [Client], including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data

Definition at line 202 of file port_factory_client.hpp.

References PortFactoryClient().

◆ set_response_degradation_handler()

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
auto iox2::PortFactoryClient< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::set_response_degradation_handler ( DegradationHandler * handler) &&->PortFactoryClient &&
inline

Sets the [DegradationHandler] for receiving [Response]s from a [Server]. Whenever a response connection to a [Server] is corrupted, this handler is called and depending on the returned [DegradationAction] measures will be taken.

Attention
The handler function needs to live as long as the generated client. If the [Client], including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data

Definition at line 213 of file port_factory_client.hpp.

References PortFactoryClient().

◆ PortFactoryRequestResponse

template<ServiceType Service, typename RequestPayload, typename RequestUserHeader, typename ResponsePayload, typename ResponseUserHeader>
template<ServiceType, typename, typename, typename, typename>
friend class PortFactoryRequestResponse
friend

Definition at line 135 of file port_factory_client.hpp.

References PortFactoryRequestResponse.

Referenced by PortFactoryRequestResponse.


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