|
iceoryx2
C++ Language Bindings
|
#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) |
| PortFactoryPublisher (const PortFactoryPublisher &)=delete | |
| PortFactoryPublisher (PortFactoryPublisher &&)=default | |
| auto | operator= (const PortFactoryPublisher &) -> PortFactoryPublisher &=delete |
| auto | operator= (PortFactoryPublisher &&) -> PortFactoryPublisher &=default |
| ~PortFactoryPublisher ()=default | |
| 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<bb::IsSlice<T>::VALUE, 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 |
Factory to create a new [Publisher] port/endpoint for [MessagingPattern::PublishSubscribe] based communication.
Definition at line 34 of file port_factory_publisher.hpp.
|
delete |
|
default |
|
default |
|
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 140 of file port_factory_publisher.hpp.
| auto iox2::PortFactoryPublisher< S, Payload, UserHeader >::backpressure_strategy | ( | const BackpressureStrategy | value | ) | -> decltype(auto) |
Sets the [BackpressureStrategy].
|
inline |
Creates a new [Publisher] or returns a [PublisherCreateError] on failure.
Definition at line 161 of file port_factory_publisher.hpp.
References iox2::detail::backpressure_handler_delegate(), iox2::detail::degradation_handler_delegate(), iox2::bb::err(), and iox2::internal::override_callback().
|
inline |
Sets the maximum slice length that a user can allocate with [Publisher::loan_slice()] or [Publisher::loan_slice_uninit()].
Definition at line 126 of file port_factory_publisher.hpp.
| 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.
|
delete |
|
default |
|
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.
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 132 of file port_factory_publisher.hpp.
|
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].
Publisher], including the send function, is accessed from multiple threads, the handler must be thread-safe if it captures data Definition at line 154 of file port_factory_publisher.hpp.
|
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.
Publisher], including the send function, is accessed from multiple threads, the handler must be thread-safe if it captures data Definition at line 147 of file port_factory_publisher.hpp.
|
friend |
Definition at line 106 of file port_factory_publisher.hpp.