iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::PortFactoryPublisher< S, Payload, UserHeader > Class Template Reference

#include <port_factory_publisher.hpp>

Public Member Functions

auto backpressure_strategy (const BackpressureStrategy value) -> decltype(auto)
 Sets the [BackpressureStrategy].
auto max_loaned_samples (const uint64_t value) -> decltype(auto)
auto name (const PortName value) -> decltype(auto)
 PortFactoryPublisher (PortFactoryPublisher &&rhs) noexcept
auto operator= (PortFactoryPublisher &&rhs) noexcept -> PortFactoryPublisher &
 ~PortFactoryPublisher ()
 PortFactoryPublisher (const PortFactoryPublisher &)=delete
auto operator= (const PortFactoryPublisher &) -> PortFactoryPublisher &=delete
auto override_sample_preallocation (const OverridePreallocationCallback &callback) &&-> PortFactoryPublisher &&
template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto initial_max_slice_len (uint64_t value) &&-> PortFactoryPublisher &&
template<typename T = Payload, typename = std::enable_if_t<has_flatbuffer_marker<T>(), void>>
auto initial_reserved_memory (uint64_t value) &&-> PortFactoryPublisher &&
template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE || has_flatbuffer_marker<T>(), void>>
auto allocation_strategy (AllocationStrategy value) &&-> PortFactoryPublisher &&
auto set_degradation_handler (DegradationHandler *handler) &&-> PortFactoryPublisher &&
auto set_backpressure_handler (BackpressureHandler *handler) &&-> PortFactoryPublisher &&
auto create () &&-> bb::Expected< Publisher< S, Payload, UserHeader >, PublisherCreateError >
 Creates a new [Publisher] or returns a [PublisherCreateError] on failure.

Friends

template<ServiceType, typename, typename>
class PortFactoryPublishSubscribe

Detailed Description

template<ServiceType S, typename Payload, typename UserHeader>
class iox2::PortFactoryPublisher< S, Payload, UserHeader >

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

Definition at line 36 of file port_factory_publisher.hpp.

Constructor & Destructor Documentation

◆ PortFactoryPublisher() [1/2]

template<ServiceType S, typename Payload, typename UserHeader>
iox2::PortFactoryPublisher< S, Payload, UserHeader >::PortFactoryPublisher ( PortFactoryPublisher< S, Payload, UserHeader > && rhs)
inlinenoexcept

◆ ~PortFactoryPublisher()

template<ServiceType S, typename Payload, typename UserHeader>
iox2::PortFactoryPublisher< S, Payload, UserHeader >::~PortFactoryPublisher ( )
inline

Definition at line 176 of file port_factory_publisher.hpp.

◆ PortFactoryPublisher() [2/2]

template<ServiceType S, typename Payload, typename UserHeader>
iox2::PortFactoryPublisher< S, Payload, UserHeader >::PortFactoryPublisher ( const PortFactoryPublisher< S, Payload, UserHeader > & )
delete

Member Function Documentation

◆ allocation_strategy()

template<ServiceType S, typename Payload, typename UserHeader>
template<typename T, typename>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::allocation_strategy ( AllocationStrategy value) &&->PortFactoryPublisher &&
inline

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

Definition at line 197 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ backpressure_strategy()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::backpressure_strategy ( const BackpressureStrategy value) ->decltype(auto)

◆ create()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::create ( ) &&->bb::Expected< Publisher< S, Payload, UserHeader >, PublisherCreateError >
inline

◆ initial_max_slice_len()

template<ServiceType S, typename Payload, typename UserHeader>
template<typename T, typename>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::initial_max_slice_len ( uint64_t value) &&->PortFactoryPublisher &&
inline

Sets the maximum slice length that a user can allocate with [Publisher::loan_slice()] or [Publisher::loan_slice_uninit()].

Definition at line 183 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ initial_reserved_memory()

template<ServiceType S, typename Payload, typename UserHeader>
template<typename T, typename>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::initial_reserved_memory ( uint64_t value) &&->PortFactoryPublisher &&
inline

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

Definition at line 206 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ max_loaned_samples()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::max_loaned_samples ( const uint64_t value) ->decltype(auto)

Defines how many [SampleMut] the [Publisher] can loan with [Publisher::loan()] or [Publisher::loan_uninit()] in parallel.

References max_loaned_samples().

Referenced by max_loaned_samples().

◆ name()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::name ( const PortName value) ->decltype(auto)

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

References name(), and PortFactoryPublisher().

Referenced by name().

◆ operator=() [1/2]

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::operator= ( const PortFactoryPublisher< S, Payload, UserHeader > & ) ->PortFactoryPublisher &=delete
delete

◆ operator=() [2/2]

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::operator= ( PortFactoryPublisher< S, Payload, UserHeader > && rhs) ->PortFactoryPublisher &
inlinenoexcept

Definition at line 156 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ override_sample_preallocation()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::override_sample_preallocation ( const OverridePreallocationCallback & callback) &&->PortFactoryPublisher &&
inline

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

Important

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

Definition at line 189 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ set_backpressure_handler()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::set_backpressure_handler ( BackpressureHandler * handler) &&->PortFactoryPublisher &&
inline

Sets the [BackpressureHandler] of the [Publisher]. Whenever a [SampleMut] cannot be sent to a [Subscriber], 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 publisher. If the [Publisher], including the send function, is accessed from multiple threads, the handler must be thread-safe if it captures data

Definition at line 219 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ set_degradation_handler()

template<ServiceType S, typename Payload, typename UserHeader>
auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::set_degradation_handler ( DegradationHandler * handler) &&->PortFactoryPublisher &&
inline

Sets the [DegradationHandler] of the [Publisher]. Whenever a connection to a [Subscriber] 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 publisher. If the [Publisher], including the send function, is accessed from multiple threads, the handler must be thread-safe if it captures data

Definition at line 212 of file port_factory_publisher.hpp.

References PortFactoryPublisher().

◆ PortFactoryPublishSubscribe

template<ServiceType S, typename Payload, typename UserHeader>
template<ServiceType, typename, typename>
friend class PortFactoryPublishSubscribe
friend

Definition at line 124 of file port_factory_publisher.hpp.

References PortFactoryPublishSubscribe.

Referenced by PortFactoryPublishSubscribe.


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