iox::popo::UntypedSubscriberImpl🔗
The UntypedSubscriberImpl class implements the untyped subscriber API. More...
#include <iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp>
Inherits from iox::popo::BaseSubscriber<>
Public Types🔗
Name | |
---|---|
using BaseSubscriberType | BaseSubscriber |
using UntypedSubscriberImpl< BaseSubscriberType > | SelfType |
Public Functions🔗
Name | |
---|---|
UntypedSubscriberImpl(const capro::ServiceDescription & service, const SubscriberOptions & subscriberOptions =SubscriberOptions()) | |
UntypedSubscriberImpl(const UntypedSubscriberImpl & other) | |
UntypedSubscriberImpl & | operator=(const UntypedSubscriberImpl & ) |
UntypedSubscriberImpl(UntypedSubscriberImpl && rhs) | |
UntypedSubscriberImpl & | operator=(UntypedSubscriberImpl && rhs) |
virtual | ~UntypedSubscriberImpl() |
cxx::expected< const void *, ChunkReceiveResult > | take() Take the chunk from the top of the receive queue. |
void | release(const void *const userPayload) Releases the ownership of the chunk provided by the user-payload pointer. |
Additional inherited members🔗
Protected Types inherited from iox::popo::BaseSubscriber<>
Name | |
---|---|
using port_t | PortType |
Public Functions inherited from iox::popo::BaseSubscriber<>
Name | |
---|---|
virtual | ~BaseSubscriber() |
uid_t | getUid() const uid Get the unique ID of the subscriber. |
capro::ServiceDescription | getServiceDescription() const getServiceDescription Get the service description of the subscriber. |
void | subscribe() subscribe Initiate subscription. |
SubscribeState | getSubscriptionState() const getSubscriptionState Get current subscription state. |
void | unsubscribe() unsubscribe Unsubscribes if currently subscribed, otherwise do nothing. |
bool | hasData() const Check if data is available. |
bool | hasMissedData() Check if data has been missed since the last call of this method. |
void | releaseQueuedData() Releases any unread queued data. |
Protected Functions inherited from iox::popo::BaseSubscriber<>
Name | |
---|---|
cxx::expected< const mepoo::ChunkHeader *, ChunkReceiveResult > | takeChunk() small helper method to unwrap the expected<optional<ChunkHeader*>> from the tryGetChunk method of the port |
void | invalidateTrigger(const uint64_t trigger) |
void | enableState(iox::popo::TriggerHandle && triggerHandle, const SubscriberState subscriberState) Only usable by the WaitSet, not for public use. Attaches the triggerHandle to the internal trigger. |
WaitSetIsConditionSatisfiedCallback | getCallbackForIsStateConditionSatisfied(const SubscriberState subscriberState) const Only usable by the WaitSet, not for public use. Returns method pointer to the event corresponding hasTriggered method callback. |
void | disableState(const SubscriberState subscriberState) Only usable by the WaitSet, not for public use. Resets the internal triggerHandle. |
void | enableEvent(iox::popo::TriggerHandle && triggerHandle, const SubscriberEvent subscriberState) Only usable by the WaitSet, not for public use. Attaches the triggerHandle to the internal trigger. |
void | disableEvent(const SubscriberEvent subscriberEvent) Only usable by the WaitSet, not for public use. Resets the internal triggerHandle. |
const port_t & | port() const const accessor of the underlying port |
port_t & | port() accessor of the underlying port |
Protected Attributes inherited from iox::popo::BaseSubscriber<>
Name | |
---|---|
port_t | m_port |
TriggerHandle | m_trigger |
Friends inherited from iox::popo::BaseSubscriber<>
Name | |
---|---|
class | NotificationAttorney |
class | iox::runtime::ServiceDiscovery |
Detailed Description🔗
template <typename BaseSubscriberType =BaseSubscriber<>>
class iox::popo::UntypedSubscriberImpl;
The UntypedSubscriberImpl class implements the untyped subscriber API.
Note: Not intended for public usage! Use the [UntypedSubscriber](/v2.0.5/API-reference/posh/Classes/classiox_1_1popo_1_1UntypedSubscriber/)
instead!
Public Types Documentation🔗
using BaseSubscriber🔗
using iox::popo::UntypedSubscriberImpl< BaseSubscriberType >::BaseSubscriber = BaseSubscriberType;
using SelfType🔗
using iox::popo::UntypedSubscriberImpl< BaseSubscriberType >::SelfType = UntypedSubscriberImpl<BaseSubscriberType>;
Public Functions Documentation🔗
function UntypedSubscriberImpl🔗
explicit UntypedSubscriberImpl(
const capro::ServiceDescription & service,
const SubscriberOptions & subscriberOptions =SubscriberOptions()
)
function UntypedSubscriberImpl🔗
UntypedSubscriberImpl(
const UntypedSubscriberImpl & other
)
function operator=🔗
UntypedSubscriberImpl & operator=(
const UntypedSubscriberImpl &
)
function UntypedSubscriberImpl🔗
UntypedSubscriberImpl(
UntypedSubscriberImpl && rhs
)
function operator=🔗
UntypedSubscriberImpl & operator=(
UntypedSubscriberImpl && rhs
)
function ~UntypedSubscriberImpl🔗
virtual ~UntypedSubscriberImpl()
function take🔗
cxx::expected< const void *, ChunkReceiveResult > take()
Take the chunk from the top of the receive queue.
Return: The user-payload pointer of the chunk taken.
No automatic cleanup of the associated chunk is performed and must be manually done by calling release
function release🔗
void release(
const void *const userPayload
)
Releases the ownership of the chunk provided by the user-payload pointer.
Parameters:
- userPayload pointer to the user-payload of the chunk to be released
The userPayload pointer must have been previously provided by take and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
Updated on 18 December 2023 at 13:11:43 CET