Skip to content

iox::popo::SubscriberPortSingleProducer🔗

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.

#include <subscriber_port_single_producer.hpp>

Inherits from iox::popo::SubscriberPortRouDi, iox::popo::BasePort

Public Types🔗

Name
using SubscriberPortData MemberType_t

Public Functions🔗

Name
SubscriberPortSingleProducer(cxx::not_null< MemberType_t *const > publisherPortDataPtr)
SubscriberPortSingleProducer(const SubscriberPortSingleProducer & other)
SubscriberPortSingleProducer & operator=(const SubscriberPortSingleProducer & )
SubscriberPortSingleProducer(SubscriberPortSingleProducer && rhs) =default
SubscriberPortSingleProducer & operator=(SubscriberPortSingleProducer && rhs) =default
~SubscriberPortSingleProducer() =default
virtual cxx::optional< capro::CaproMessage > tryGetCaProMessage() override
get an optional CaPro message that changes the subscription state of the subscriber
virtual cxx::optional< capro::CaproMessage > dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMessage & caProMessage) override
dispatch a CaPro message to the subscriber for processing

Additional inherited members🔗

Public Functions inherited from iox::popo::SubscriberPortRouDi

Name
SubscriberPortRouDi(cxx::not_null< MemberType_t *const > subscriberPortDataPtr)
SubscriberPortRouDi(const SubscriberPortRouDi & other)
SubscriberPortRouDi(SubscriberPortRouDi && rhs) =default
virtual ~SubscriberPortRouDi() =default
QueueFullPolicy getQueueFullPolicy() const
Returns behaviour in case of a full delivery queue.
void releaseAllChunks()
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 inherited from iox::popo::SubscriberPortRouDi

Name
const MemberType_t * getMembers() const
MemberType_t * getMembers()

Protected Attributes inherited from iox::popo::SubscriberPortRouDi

Name
ChunkReceiver< SubscriberPortData::ChunkReceiverData_t > m_chunkReceiver

Public Functions inherited from iox::popo::BasePort

Name
BasePort(MemberType_t *const basePortDataPtr)
BasePort(const BasePort & other)
BasePort(BasePort && )
virtual ~BasePort() =default
operator bool() const
a port can be constructed from a nullptr, additionally it also can be moved and in these cases the member methods would work on a nullptr. to circumvent this problem
capro::ServiceDescription getCaProServiceDescription() const
Reads Type of actual CaPro Port (publisher/subscriber...)
RuntimeName_t getRuntimeName() const
Gets name of the application's runtime for the active port.
UniquePortId getUniqueID() const
Gets Id of the active port.
NodeName_t getNodeName() const
returns node name for the active port
void destroy()
Indicate that this port can be destroyed.
bool toBeDestroyed() const
Checks whether port can be destroyed.

Protected Functions inherited from iox::popo::BasePort

Name
const MemberType_t * getMembers() const
MemberType_t * getMembers()

Public Types Documentation🔗

using MemberType_t🔗

using iox::popo::SubscriberPortSingleProducer::MemberType_t =  SubscriberPortData;

Public Functions Documentation🔗

function SubscriberPortSingleProducer🔗

explicit SubscriberPortSingleProducer(
    cxx::not_null< MemberType_t *const > publisherPortDataPtr
)

function SubscriberPortSingleProducer🔗

SubscriberPortSingleProducer(
    const SubscriberPortSingleProducer & other
)

function operator=🔗

SubscriberPortSingleProducer & operator=(
    const SubscriberPortSingleProducer & 
)

function SubscriberPortSingleProducer🔗

SubscriberPortSingleProducer(
    SubscriberPortSingleProducer && rhs
) =default

function operator=🔗

SubscriberPortSingleProducer & operator=(
    SubscriberPortSingleProducer && rhs
) =default

function ~SubscriberPortSingleProducer🔗

~SubscriberPortSingleProducer() =default

function tryGetCaProMessage🔗

virtual cxx::optional< capro::CaproMessage > tryGetCaProMessage() override

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

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

Reimplements: iox::popo::SubscriberPortRouDi::tryGetCaProMessage

function dispatchCaProMessageAndGetPossibleResponse🔗

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

dispatch a CaPro message to the subscriber for processing

Parameters:

  • caProMessage to process

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

Reimplements: iox::popo::SubscriberPortRouDi::dispatchCaProMessageAndGetPossibleResponse


Updated on 31 May 2022 at 15:29:16 CEST