17#ifndef IOX_POSH_POPO_CLIENT_IMPL_HPP
18#define IOX_POSH_POPO_CLIENT_IMPL_HPP
20#include "iceoryx_posh/capro/service_description.hpp"
21#include "iceoryx_posh/internal/popo/base_client.hpp"
22#include "iceoryx_posh/internal/popo/request_deleter.hpp"
23#include "iceoryx_posh/internal/popo/response_deleter.hpp"
24#include "iceoryx_posh/internal/popo/rpc_interface.hpp"
25#include "iceoryx_posh/internal/popo/typed_port_api_trait.hpp"
26#include "iceoryx_posh/popo/client_options.hpp"
27#include "iceoryx_posh/popo/request.hpp"
28#include "iceoryx_posh/popo/response.hpp"
29#include "iceoryx_posh/popo/trigger_handle.hpp"
30#include "iceoryx_posh/runtime/posh_runtime.hpp"
38template <
typename Req,
typename Res,
typename BaseClientT = BaseClient<>>
41 using RequestTypeAssert =
typename TypedPortApiTrait<Req>::Assert;
42 using ResponseTypeAssert =
typename TypedPortApiTrait<Res>::Assert;
61 template <typename... Args>
62 cxx::expected<
Request<Req>, AllocationError>
loan(Args&&... args) noexcept;
67 cxx::expected<ClientSendError>
send(
Request<Req>&& request) noexcept override;
73 cxx::expected<
Response<const Res>, ChunkReceiveResult>
take() noexcept;
76 using BaseClientT::
port;
79 cxx::expected<
Request<Req>, AllocationError> loanUninitialized() noexcept;
81 using RequestSampleDeleter = RequestDeleter<typename BaseClientT::PortType>;
82 RequestSampleDeleter m_requestDeleter{
port()};
83 using ResponseSampleDeleter = ResponseDeleter<typename BaseClientT::PortType>;
84 ResponseSampleDeleter m_responseDeleter{
port()};
89#include "iceoryx_posh/internal/popo/client_impl.inl"
class for the identification of a communication event including information on the service,...
Definition: service_description.hpp:81
const PortT & port() const noexcept
const accessor of the underlying port
The ClientImpl class implements the typed client API.
Definition: client_impl.hpp:40
ClientImpl(const capro::ServiceDescription &service, const ClientOptions &clientOptions={}) noexcept
Constructor for a client.
cxx::expected< Request< Req >, AllocationError > loan(Args &&... args) noexcept
Get a Request from loaned shared memory and construct the data with the given arguments.
cxx::expected< ClientSendError > send(Request< Req > &&request) noexcept override
Sends the given Request and then releases its loan.
cxx::expected< Response< const Res >, ChunkReceiveResult > take() noexcept
Take the Response from the top of the receive queue.
The Request class is a mutable abstraction over types which are written to loaned shared memory....
Definition: request.hpp:40
The Response class is a mutable abstraction over types which are written to loaned shared memory....
Definition: response.hpp:42
Definition: request.hpp:33
This struct is used to configure the client.
Definition: client_options.hpp:33