Template Class SubscriberImpl

Inheritance Relationships

Base Type

Derived Type

Class Documentation

template<typename T, typename H = iox::mepoo::NoUserHeader, typename BaseSubscriberType = BaseSubscriber<>>
class SubscriberImpl : public iox::popo::BaseSubscriber<>

The SubscriberImpl class implements the typed subscriber API.

Note

Not intended for public usage! Use the Subscriber instead!

Subclassed by iox::popo::Subscriber< iox::roudi::ServiceRegistry >

Public Types

using PortType = typename BaseSubscriberType::PortType
using SubscriberSampleDeleter = SampleDeleter<PortType>

Public Functions

explicit SubscriberImpl(const capro::ServiceDescription &service, const SubscriberOptions &subscriberOptions = SubscriberOptions()) noexcept
SubscriberImpl(const SubscriberImpl &other) = delete
SubscriberImpl &operator=(const SubscriberImpl&) = delete
SubscriberImpl(SubscriberImpl &&rhs) = delete
SubscriberImpl &operator=(SubscriberImpl &&rhs) = delete
virtual ~SubscriberImpl() noexcept
cxx::expected<Sample<const T, const H>, ChunkReceiveResult> take() noexcept

Take the samples from the top of the receive queue.

The sample takes care of the cleanup. Don’t store the raw pointer to the content of the sample, but always the whole sample.

Returns:

Either a sample or a ChunkReceiveResult.