Template Class Channel
Defined in File channel.hpp
Class Documentation
-
template<typename IceoryxTerminal, typename ExternalTerminal>
class Channel A data structure representing a channel between Iceoryx and an external system.
The class couples related iceoryx and external interfaces that communicate with eachother to form the communication channel. These interfaces are conceptualized as channel “Terminals”.
The structure holds pointers to the instances of the terminals. The terminals can be created and managed externally, in which case the structure only serves as a means of coupling the two. This can be achieved by simply calling the constructor with pointers to them.
Alternatively, the class can manage the terminals internally in a static object pool, automatically cleaning them up when the channel is discarded. This can be achieved via the Channel::create method.
Public Functions
-
constexpr Channel(const capro::ServiceDescription &service, const IceoryxTerminalPtr iceoryxTerminal, const ExternalTerminalPtr externalTerminal) noexcept
-
constexpr bool operator==(const Channel<IceoryxTerminal, ExternalTerminal> &rhs) const noexcept
-
capro::ServiceDescription getServiceDescription() const noexcept
-
IceoryxTerminalPtr getIceoryxTerminal() const noexcept
-
ExternalTerminalPtr getExternalTerminal() const noexcept
Public Static Functions
-
template<typename IceoryxPubSubOptions>
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.
- Parameters:
service – The service to create the channel for.
options – The PublisherOptions or SubscriberOptions with historyCapacity and queueCapacity.
- Returns:
A copy of the created channel, if successful.
-
constexpr Channel(const capro::ServiceDescription &service, const IceoryxTerminalPtr iceoryxTerminal, const ExternalTerminalPtr externalTerminal) noexcept