|
iceoryx2
C++ Language Bindings
|
#include <sample.hpp>
Public Member Functions | |
| Sample (Sample &&rhs) noexcept | |
| auto | operator= (Sample &&rhs) noexcept -> Sample & |
| ~Sample () | |
| Sample (const Sample &)=delete | |
| auto | operator= (const Sample &) -> Sample &=delete |
| template<typename T = Payload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> const ValueType & |
Returns a reference to the payload of the [Sample]. | |
| template<typename T = Payload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> bb::ImmutableSlice< ValueType > |
Returns a slice to navigate the payload 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]. | |
| auto | header () const -> HeaderPublishSubscribe |
Returns a reference to the [Header] of the [Sample]. | |
| auto | origin () const -> UniquePublisherId |
Returns the [UniquePublisherId] of the [Publisher](crate::port::publisher::Publisher) | |
Friends | |
| template<ServiceType , typename , typename > | |
| class | Subscriber |
It stores the payload and is acquired by the [Subscriber] whenever it receives new data from a [Publisher] via [Subscriber::receive()].
Does not implement [Send] since it releases unsent samples vie the [Subscriber] and the [Subscriber] is not thread-safe!
DO NOT MOVE THE SAMPLE INTO ANOTHER THREAD!
Definition at line 41 of file sample.hpp.
|
inlinenoexcept |
Definition at line 92 of file sample.hpp.
|
inline |
Definition at line 115 of file sample.hpp.
|
delete |
|
inline |
Returns a reference to the [Header] of the [Sample].
Definition at line 158 of file sample.hpp.
Referenced by iox2::Sample< ServiceType, Payload, UserHeader >::origin().
|
delete |
|
inlinenoexcept |
Definition at line 103 of file sample.hpp.
|
inline |
Returns the [UniquePublisherId] of the [Publisher](crate::port::publisher::Publisher)
Definition at line 166 of file sample.hpp.
References iox2::Sample< ServiceType, Payload, UserHeader >::header().
| auto iox2::Sample< ServiceType, Payload, UserHeader >::payload | ( | ) | const -> bb::ImmutableSlice< ValueType > |
Returns a slice to navigate the payload of the [Sample].
|
inline |
Returns a reference to the payload of the [Sample].
Definition at line 121 of file sample.hpp.
|
inline |
Returns a reference to the user_header of the [Sample].
Definition at line 149 of file sample.hpp.
|
friend |
Definition at line 72 of file sample.hpp.