18#ifndef IOX_POSH_GW_CHANNEL_HPP
19#define IOX_POSH_GW_CHANNEL_HPP
21#include "iceoryx_hoofs/cxx/expected.hpp"
22#include "iceoryx_hoofs/cxx/optional.hpp"
23#include "iceoryx_hoofs/internal/objectpool/objectpool.hpp"
24#include "iceoryx_posh/capro/service_description.hpp"
25#include "iceoryx_posh/iceoryx_posh_types.hpp"
33enum class ChannelError : uint8_t
55template <
typename IceoryxTerminal,
typename ExternalTerminal>
58 using IceoryxTerminalPtr = std::shared_ptr<IceoryxTerminal>;
59 using IceoryxTerminalPool = cxx::ObjectPool<IceoryxTerminal, MAX_CHANNEL_NUMBER>;
60 using ExternalTerminalPtr = std::shared_ptr<ExternalTerminal>;
61 using ExternalTerminalPool = cxx::ObjectPool<ExternalTerminal, MAX_CHANNEL_NUMBER>;
65 const IceoryxTerminalPtr iceoryxTerminal,
66 const ExternalTerminalPtr externalTerminal)
noexcept;
76 template <
typename IceoryxPubSubOptions>
78 const IceoryxPubSubOptions& options)
noexcept;
81 IceoryxTerminalPtr getIceoryxTerminal() const noexcept;
82 ExternalTerminalPtr getExternalTerminal() const noexcept;
85 static IceoryxTerminalPool s_iceoryxTerminals;
86 static ExternalTerminalPool s_externalTerminals;
88 capro::ServiceDescription m_service;
89 IceoryxTerminalPtr m_iceoryxTerminal;
90 ExternalTerminalPtr m_externalTerminal;
96#include "iceoryx_posh/internal/gateway/channel.inl"
class for the identification of a communication event including information on the service,...
Definition: service_description.hpp:81
A data structure representing a channel between Iceoryx and an external system.
Definition: channel.hpp:57
static cxx::expected< Channel, ChannelError > create(const capro::ServiceDescription &service, const IceoryxPubSubOptions &options) noexcept
create Creates a channel for the given service whose terminals reside in a static object pool.