iceoryx_posh 2.0.5
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
iox::gw::Channel< IceoryxTerminal, ExternalTerminal > Class Template Reference

A data structure representing a channel between Iceoryx and an external system. More...

#include <iceoryx_posh/gateway/channel.hpp>

Public Member 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
 

Static Public Member 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.
 

Detailed Description

template<typename IceoryxTerminal, typename ExternalTerminal>
class iox::gw::Channel< IceoryxTerminal, ExternalTerminal >

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.

Member Function Documentation

◆ create()

template<typename IceoryxTerminal , typename ExternalTerminal >
template<typename IceoryxPubSubOptions >
static cxx::expected< Channel, ChannelError > iox::gw::Channel< IceoryxTerminal, ExternalTerminal >::create ( const capro::ServiceDescription service,
const IceoryxPubSubOptions &  options 
)
staticnoexcept

create Creates a channel for the given service whose terminals reside in a static object pool.

Parameters
serviceThe service to create the channel for.
optionsThe PublisherOptions or SubscriberOptions with historyCapacity and queueCapacity.
Returns
A copy of the created channel, if successful.

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