Class PublisherPortRouDi

Inheritance Relationships

Base Type

Class Documentation

class PublisherPortRouDi : public iox::popo::BasePort

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

Public Types

using MemberType_t = PublisherPortData

Public Functions

explicit PublisherPortRouDi(cxx::not_null<MemberType_t*const> publisherPortDataPtr) noexcept
PublisherPortRouDi(const PublisherPortRouDi &other) = delete
PublisherPortRouDi &operator=(const PublisherPortRouDi&) = delete
PublisherPortRouDi(PublisherPortRouDi &&rhs) noexcept = default
PublisherPortRouDi &operator=(PublisherPortRouDi &&rhs) noexcept = default
~PublisherPortRouDi() = default
const PublisherOptions &getOptions() const noexcept

Returns publisher options.

Returns:

publisher options

cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept

get an optional CaPro message that changes the offer state of the publisher

Returns:

CaPro message with the new offer state, empty optional if no state change

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

dispatch a CaPro message to the publisher 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 publisher and release all the chunks it currently holds Caution: Contract is that user process is no more running when cleanup is called