|
iceoryx2
C++ Language Bindings
|
Sending endpoint of a publish-subscriber based communication. More...
#include <publisher.hpp>
Public Member Functions | |
| Publisher (Publisher &&rhs) noexcept | |
| auto | operator= (Publisher &&rhs) noexcept -> Publisher & |
| ~Publisher () | |
| Publisher (const Publisher &)=delete | |
| auto | operator= (const Publisher &) -> Publisher &=delete |
| auto | id () const -> UniquePublisherId |
Returns the [UniquePublisherId] of the [Publisher]. | |
| auto | backpressure_strategy () const -> BackpressureStrategy |
| template<typename T = Payload, 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 = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | send_copy (const Payload &payload) const -> bb::Expected< size_t, SendError > |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | send_slice_copy (bb::ImmutableSlice< ValueType > &payload) const -> bb::Expected< size_t, SendError > |
| template<typename T = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_uninit () -> bb::Expected< SampleMutUninit< S, Payload, UserHeader >, LoanError > |
| template<typename T = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | loan () -> bb::Expected< SampleMut< S, Payload, UserHeader >, LoanError > |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice (uint64_t number_of_elements) -> bb::Expected< SampleMut< S, T, UserHeader >, LoanError > |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | loan_slice_uninit (uint64_t number_of_elements) -> bb::Expected< SampleMutUninit< S, T, UserHeader >, LoanError > |
| auto | update_connections () -> bb::Expected< void, ConnectionFailure > |
Friends | |
| template<ServiceType , typename , typename > | |
| class | PortFactoryPublisher |
Sending endpoint of a publish-subscriber based communication.
Definition at line 34 of file publisher.hpp.
|
inlinenoexcept |
Definition at line 128 of file publisher.hpp.
|
inline |
Definition at line 144 of file publisher.hpp.
|
delete |
|
inline |
Returns the strategy the [Publisher] follows when a [SampleMut] cannot be delivered since the [Subscriber]s buffer is full.
Definition at line 149 of file publisher.hpp.
|
inline |
Returns the [UniquePublisherId] of the [Publisher].
Definition at line 161 of file publisher.hpp.
|
inline |
Returns the maximum number of elements that can be loaned in a slice.
Definition at line 156 of file publisher.hpp.
|
inline |
Loans/allocates a [SampleMut] from the underlying data segment of the [Publisher] and initialize it with the default value. This can be a performance hit and [Publisher::loan_uninit] can be used to loan an uninitalized [SampleMut].
On failure it returns [LoanError] describing the failure.
Definition at line 222 of file publisher.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::Publisher< S, Payload, UserHeader >::loan_uninit().
|
inline |
Loans/allocates a [SampleMut] from the underlying data segment of the [Publisher] and initializes all slice elements with the default value. This can be a performance hit and [Publisher::loan_slice_uninit()] can be used to loan a slice of uninitialized [Payload].
On failure it returns [LoanError] describing the failure.
Definition at line 236 of file publisher.hpp.
References iox2::assume_init(), iox2::bb::err(), and iox2::Publisher< S, Payload, UserHeader >::loan_slice_uninit().
|
inline |
Loans/allocates a [SampleMutUninit] from the underlying data segment of the [Publisher]. The user has to initialize the payload before it can be sent.
On failure it returns [LoanError] describing the failure.
Definition at line 254 of file publisher.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::Publisher< S, Payload, UserHeader >::loan_slice().
|
inline |
Loans/allocates a [SampleMutUninit] from the underlying data segment of the [Publisher]. The user has to initialize the payload before it can be sent.
On failure it returns [LoanError] describing the failure.
Definition at line 206 of file publisher.hpp.
References iox2::bb::err(), and iox2::internal::PlacementDefault< T >::placement_default().
Referenced by iox2::Publisher< S, Payload, UserHeader >::loan().
|
delete |
|
inlinenoexcept |
Definition at line 133 of file publisher.hpp.
|
inline |
Copies the input value into a [SampleMut] and delivers it. On success it returns the number of [Subscriber]s that received the data, otherwise a [SendError] describing the failure.
Definition at line 170 of file publisher.hpp.
References iox2::bb::err().
|
inline |
Definition at line 188 of file publisher.hpp.
References iox2::bb::err().
|
inline |
Explicitly updates all connections to the [Subscriber]s. This is required to be called whenever a new [Subscriber] is connected to the service. It is called implicitly whenever [SampleMut::send()] or [Publisher::send_copy()] is called. When a [Subscriber] is connected that requires a history this call will deliver it.
Definition at line 270 of file publisher.hpp.
References iox2::bb::err().
|
friend |
Definition at line 106 of file publisher.hpp.