Class SubscriberPortRouDi

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class SubscriberPortRouDi : public iox::popo::BasePort

The SubscriberPortRouDi provides the API for accessing a subscriber port from the RouDi middleware daemon side. The subscriber port is divided in the sevaral parts like SubscriberPortData, SubscriberPortRouDi and SubscriberPortUser. The SubscriberPortRouDi provides service discovery functionality that is based on CaPro messages. With this API the dynamic connections between publisher and subscriber ports can be established.

Subclassed by iox::popo::SubscriberPortMultiProducer, iox::popo::SubscriberPortSingleProducer

Public Types

using MemberType_t = SubscriberPortData

Public Functions

explicit SubscriberPortRouDi(cxx::not_null<MemberType_t*const> subscriberPortDataPtr) noexcept
SubscriberPortRouDi(const SubscriberPortRouDi &other) = delete
SubscriberPortRouDi &operator=(const SubscriberPortRouDi&) = delete
SubscriberPortRouDi(SubscriberPortRouDi &&rhs) noexcept = default
SubscriberPortRouDi &operator=(SubscriberPortRouDi &&rhs) noexcept = default
virtual ~SubscriberPortRouDi() = default
const SubscriberOptions &getOptions() const noexcept

Returns subscriber options.

Returns:

subscriber options

virtual cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept = 0

get an optional CaPro message that requests changes to 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 = 0

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

void releaseAllChunks() noexcept

cleanup the subscriber and release all the chunks it currently holds Caution: Contract is that user process is no more running when cleanup is called

Protected Functions

const MemberType_t *getMembers() const noexcept
MemberType_t *getMembers() noexcept

Protected Attributes

ChunkReceiver<SubscriberPortData::ChunkReceiverData_t> m_chunkReceiver