|
iceoryx2
C++ Bindings
|
#include <sample_mut.hpp>
Public Member Functions | |
| SampleMut (SampleMut &&rhs) noexcept | |
| auto | operator= (SampleMut &&rhs) noexcept -> SampleMut & |
| ~SampleMut () noexcept | |
| SampleMut (const SampleMut &)=delete | |
| auto | operator= (const SampleMut &) -> SampleMut &=delete |
| auto | header () const -> HeaderPublishSubscribe |
| Returns a reference to the [Header] of the [Sample]. | |
| template<typename T = UserHeader, typename = std::enable_if_t<!std::is_same<void, UserHeader>::value, T>> | |
| auto | user_header () const -> const T & |
| Returns a reference to the user_header of the [Sample]. | |
| template<typename T = UserHeader, typename = std::enable_if_t<!std::is_same<void, UserHeader>::value, T>> | |
| auto | user_header_mut () -> T & |
| Returns a mutable reference to the user_header of the [Sample]. | |
| template<typename T = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE && !has_flatbuffer_marker<T>(), void>> | |
| auto | payload () const -> const ValueType & |
| Returns a reference to the const payload of the sample. | |
| template<typename T = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE && !has_flatbuffer_marker<T>(), void>> | |
| auto | payload_mut () -> ValueType & |
| Returns a reference to the payload of the sample. | |
| template<typename T = Payload, typename = std::enable_if_t<has_flatbuffer_marker<T>(), void>> | |
| auto | payload_bytes () const -> bb::ImmutableSlice< uint8_t > |
| Returns the serialized flatbuffer data as bytes. | |
| template<typename T = Payload, typename = std::enable_if_t<has_flatbuffer_marker<T>(), void>> | |
| auto | payload_root () const -> const typename T::ValueType * |
| Returns the root of the flatbuffer. | |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> bb::ImmutableSlice< ValueType > |
| Returns an immutable slice to the payload of the sample. | |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | payload_mut () -> bb::MutableSlice< ValueType > |
| Returns a mutable slice to the payload of the sample. | |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| void | truncate (uint64_t number_of_elements) |
Friends | |
| template<ServiceType, typename, typename> | |
| class | Publisher |
| template<ServiceType, typename, typename> | |
| class | SampleMutUninit |
| template<ServiceType ST, typename PayloadT, typename UserHeaderT> | |
| auto | send (SampleMut< ST, PayloadT, UserHeaderT > &&sample) -> bb::Expected< size_t, SendError > |
Acquired by a [Publisher] via
It stores the payload that will be sent to all connected [Subscriber]s. If the [SampleMut] is not sent it will release the loaned memory when going out of scope.
Does not implement [Send] since it releases unsent samples in the [Publisher] and the [Publisher] is not thread-safe!
DO NOT MOVE THE SAMPLE INTO ANOTHER THREAD!
Definition at line 54 of file sample_mut.hpp.
|
inlinenoexcept |
Definition at line 138 of file sample_mut.hpp.
References SampleMut().
Referenced by operator=(), operator=(), SampleMut(), SampleMut(), and send.
|
inlinenoexcept |
Definition at line 161 of file sample_mut.hpp.
|
delete |
References SampleMut().
|
inline |
Returns a reference to the [Header] of the [Sample].
Definition at line 166 of file sample_mut.hpp.
Referenced by payload_bytes().
|
delete |
References iox2::has_flatbuffer_marker(), payload(), payload_mut(), payload_root(), SampleMut(), truncate(), user_header(), and user_header_mut().
|
inlinenoexcept |
Definition at line 149 of file sample_mut.hpp.
References iox2::internal::iox2_sample_mut_move(), and SampleMut().
|
inline |
Returns an immutable slice to the payload of the sample.
Definition at line 215 of file sample_mut.hpp.
|
inline |
Returns a reference to the const payload of the sample.
Definition at line 195 of file sample_mut.hpp.
Referenced by operator=().
|
inline |
Returns the serialized flatbuffer data as bytes.
Definition at line 257 of file sample_mut.hpp.
References header().
Referenced by payload_root().
|
inline |
Returns a mutable slice to the payload of the sample.
Definition at line 233 of file sample_mut.hpp.
|
inline |
Returns a reference to the payload of the sample.
Definition at line 205 of file sample_mut.hpp.
Referenced by operator=().
| auto iox2::SampleMut< S, Payload, UserHeader >::payload_root | ( | ) | const->consttypenameT::ValueType * |
Returns the root of the flatbuffer.
Definition at line 270 of file sample_mut.hpp.
References payload_bytes().
Referenced by operator=().
|
inline |
Shortens the payload to its first number_of_elements elements, so that only those are sent. It has no effect when number_of_elements is not smaller than the current number of elements.
Definition at line 249 of file sample_mut.hpp.
Referenced by operator=().
|
inline |
Returns a reference to the user_header of the [Sample].
Definition at line 175 of file sample_mut.hpp.
Referenced by operator=().
|
inline |
Returns a mutable reference to the user_header of the [Sample].
Definition at line 185 of file sample_mut.hpp.
Referenced by operator=().
|
friend |
|
friend |
Definition at line 113 of file sample_mut.hpp.
References SampleMutUninit.
Referenced by SampleMutUninit.
|
friend |
References SampleMut(), and send.
Referenced by send.