iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > Class Template Reference

#include <server.hpp>

Public Member Functions

 Server (Server &&rhs) noexcept
auto operator= (Server &&rhs) noexcept -> Server &
 ~Server () noexcept
 Server (const Server &) noexcept=delete
auto operator= (const Server &) noexcept -> Server &=delete
auto receive () -> bb::Expected< bb::Optional< ActiveRequest< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > >, ReceiveError >
template<typename T = ResponsePayload, typename = std::enable_if_t<bb::IsSlice<T>::VALUE, void>>
auto initial_max_slice_len () const -> uint64_t
 Returns the maximum initial slice length configured for this [Server].
auto id () const -> UniqueServerId
 Returns the [UniqueServerId] of the [Server].
auto name () const -> PortNameView
 Returns the [PortNameView] of the [Server].
auto has_requests () const -> bb::Expected< bool, ConnectionFailure >
 Returns true if the [Server] has [RequestMut]s in its buffer.

Friends

template<ServiceType, typename, typename, typename, typename>
class PortFactoryServer

Detailed Description

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
class iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >

Receives [RequestMut] from a [Client] and responds with [Response] by using an [ActiveRequest].

Definition at line 32 of file server.hpp.

Constructor & Destructor Documentation

◆ Server() [1/2]

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::Server ( Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > && rhs)
inlinenoexcept

Definition at line 77 of file server.hpp.

References Server().

Referenced by operator=(), operator=(), PortFactoryServer, Server(), and Server().

◆ ~Server()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::~Server ( )
inlinenoexcept

Definition at line 103 of file server.hpp.

◆ Server() [2/2]

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::Server ( const Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > & )
deletenoexcept

References Server().

Member Function Documentation

◆ has_requests()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::has_requests ( ) const->bb::Expected< bool, ConnectionFailure >
inline

Returns true if the [Server] has [RequestMut]s in its buffer.

Definition at line 171 of file server.hpp.

References iox2::bb::err(), and iox2::bb::into().

Referenced by operator=().

◆ id()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::id ( ) const->UniqueServerId
inline

Returns the [UniqueServerId] of the [Server].

Definition at line 148 of file server.hpp.

◆ initial_max_slice_len()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
template<typename T, typename>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::initial_max_slice_len ( ) const->uint64_t
inline

Returns the maximum initial slice length configured for this [Server].

Definition at line 138 of file server.hpp.

◆ name()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::name ( ) const->PortNameView
inline

Returns the [PortNameView] of the [Server].

Definition at line 160 of file server.hpp.

References iox2::PortNameView::from_native_ptr().

Referenced by operator=().

◆ operator=() [1/2]

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::operator= ( const Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > & ) ->Server &=delete
deletenoexcept

References has_requests(), name(), and Server().

◆ operator=() [2/2]

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::operator= ( Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > && rhs) ->Server &
inlinenoexcept

Definition at line 87 of file server.hpp.

References Server().

◆ receive()

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
auto iox2::Server< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader >::receive ( ) ->bb::Expected< bb::Optional< ActiveRequest< Service, RequestPayload, RequestHeader, ResponsePayload, ResponseHeader > >, ReceiveError >
inline

Receives a [RequestMut] that was sent by a [Client] and returns an [ActiveRequest] which can be used to respond. If no [RequestMut]s were received it returns [None].

Definition at line 112 of file server.hpp.

References iox2::bb::err(), iox2::bb::into(), and iox2::bb::NULLOPT.

◆ PortFactoryServer

template<ServiceType Service, typename RequestPayload, typename RequestHeader, typename ResponsePayload, typename ResponseHeader>
template<ServiceType, typename, typename, typename, typename>
friend class PortFactoryServer
friend

Definition at line 63 of file server.hpp.

References PortFactoryServer, and Server().

Referenced by PortFactoryServer.


The documentation for this class was generated from the following file: