|
iceoryx2
C++ Bindings
|
#include <pending_response.hpp>
Public Member Functions | |
| PendingResponse (PendingResponse &&rhs) noexcept | |
| auto | operator= (PendingResponse &&rhs) noexcept -> PendingResponse & |
| ~PendingResponse () noexcept | |
| PendingResponse (const PendingResponse &)=delete | |
| auto | operator= (const PendingResponse &) -> PendingResponse &=delete |
| auto | receive () -> bb::Expected< bb::Optional< Response< Service, ResponsePayload, ResponseUserHeader > >, ReceiveError > |
| auto | header () const -> RequestHeader |
| template<typename T = RequestUserHeader, typename = std::enable_if_t<!std::is_same<void, RequestUserHeader>::value, T>> | |
| auto | user_header () const -> const T & |
| template<typename T = RequestPayload, typename = std::enable_if_t<!bb::IsSlice<T>::VALUE && !has_flatbuffer_marker<T>(), void>> | |
| auto | payload () const -> const T & |
| template<typename T = RequestPayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>> | |
| auto | payload () const -> bb::ImmutableSlice< ValueType > |
| template<typename T = RequestPayload, 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 = RequestPayload, typename = std::enable_if_t<has_flatbuffer_marker<T>(), void>> | |
| auto | payload_root () const -> const typename T::ValueType * |
| Returns the root of the flatbuffer. | |
| auto | number_of_server_connections () const -> size_t |
| auto | has_response () -> bool |
| auto | is_connected () const -> bool |
| void | set_disconnect_hint () |
Friends | |
| template<ServiceType , typename , typename , typename , typename > | |
| class | Client |
| template<ServiceType S, typename RequestPayloadT , typename RequestUserHeaderT , typename ResponsePayloadT , typename ResponseUserHeaderT > | |
| auto | send (RequestMut< S, RequestPayloadT, RequestUserHeaderT, ResponsePayloadT, ResponseUserHeaderT > &&request) -> bb::Expected< PendingResponse< S, RequestPayloadT, RequestUserHeaderT, ResponsePayloadT, ResponseUserHeaderT >, RequestSendError > |
Represents an active connection to all [Server] that received the [RequestMut]. The [Client] can use it to receive the corresponding [Response]s.
As soon as it goes out of scope, the connections are closed and the [Server]s are informed.
Definition at line 41 of file pending_response.hpp.
|
inlinenoexcept |
Definition at line 133 of file pending_response.hpp.
|
inlinenoexcept |
Definition at line 159 of file pending_response.hpp.
|
delete |
|
inline |
Returns [true] when a [Server] has sent a [Response] otherwise [false].
Definition at line 291 of file pending_response.hpp.
|
inline |
Returns a reference to the iceoryx2 internal [RequestHeader] of the corresponding [RequestMut]
Definition at line 190 of file pending_response.hpp.
Referenced by iox2::PendingResponse< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload_bytes().
|
inline |
Returns [true] until the [ActiveRequest] goes out of scope on the [Server]s side indicating that the [Server] will no longer send [Response]s. It also returns [false] when there are no [Server]s.
Definition at line 302 of file pending_response.hpp.
|
inline |
Returns how many [Server]s received the corresponding [RequestMut] initially.
Definition at line 280 of file pending_response.hpp.
|
delete |
|
inlinenoexcept |
Definition at line 143 of file pending_response.hpp.
| auto iox2::PendingResponse< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload | ( | ) | const -> bb::ImmutableSlice< ValueType > |
Returns a reference to the request payload of the corresponding [RequestMut]
|
inline |
Returns a reference to the request payload of the corresponding [RequestMut]
Definition at line 218 of file pending_response.hpp.
|
inline |
Returns the serialized flatbuffer data as bytes.
Definition at line 250 of file pending_response.hpp.
Referenced by iox2::PendingResponse< Service, RequestPayload, RequestUserHeader, ResponsePayload, ResponseUserHeader >::payload_root().
|
inline |
Returns the root of the flatbuffer.
Definition at line 269 of file pending_response.hpp.
|
inline |
Receives a [Response] from one of the [Server]s that received the [RequestMut].
Definition at line 169 of file pending_response.hpp.
References iox2::bb::err(), and iox2::bb::NULLOPT.
|
inline |
Marks the connection state that the [Client] wants to gracefully disconnect. When the [Server] reads this, it can send the last [Response] and drop the corresponding [ActiveRequest] to terminate the connection ensuring that no [Response] is lost on the [Client] side.
Definition at line 312 of file pending_response.hpp.
|
inline |
Returns a reference to the user defined request header of the corresponding [RequestMut]
Definition at line 204 of file pending_response.hpp.
|
friend |
Definition at line 110 of file pending_response.hpp.
|
friend |