Class SubscriberPortSingleProducer

Inheritance Relationships

Base Type

Class Documentation

class SubscriberPortSingleProducer : public iox::popo::SubscriberPortRouDi

The SubscriberPortSingleProducer is the implementation of the SubscriberPortRouDi for a setup where subscriber is allowed to have only one matching publisher. I.e. a 1:m pub/sub deployment. The handling of CaPro messages is different for 1:m and n:m deployment.

Public Types

using MemberType_t = SubscriberPortData

Public Functions

explicit SubscriberPortSingleProducer(cxx::not_null<MemberType_t*const> publisherPortDataPtr) noexcept
SubscriberPortSingleProducer(const SubscriberPortSingleProducer &other) = delete
SubscriberPortSingleProducer &operator=(const SubscriberPortSingleProducer&) = delete
SubscriberPortSingleProducer(SubscriberPortSingleProducer &&rhs) noexcept = default
SubscriberPortSingleProducer &operator=(SubscriberPortSingleProducer &&rhs) noexcept = default
~SubscriberPortSingleProducer() = default
virtual cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept override

get an optional CaPro message that changes the subscription state of the subscriber

Returns:

CaPro message with new subscription requet, empty optional if no state change

virtual cxx::optional<capro::CaproMessage> dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMessage &caProMessage) noexcept override

dispatch a CaPro message to the subscriber for processing

Parameters:

caProMessage[in] to process

Returns:

CaPro message with an immediate response the provided CaPro message, empty optional if no response