iceoryx_posh 2.0.5
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
iox::popo::UntypedSubscriberImpl< BaseSubscriberType > Class Template Reference

The UntypedSubscriberImpl class implements the untyped subscriber API. More...

#include <iceoryx_posh/internal/popo/untyped_subscriber_impl.hpp>

Inheritance diagram for iox::popo::UntypedSubscriberImpl< BaseSubscriberType >:
Inheritance graph
[legend]
Collaboration diagram for iox::popo::UntypedSubscriberImpl< BaseSubscriberType >:
Collaboration graph
[legend]

Public Types

using BaseSubscriber = BaseSubscriberType
 
using SelfType = UntypedSubscriberImpl< BaseSubscriberType >
 

Public Member Functions

 UntypedSubscriberImpl (const capro::ServiceDescription &service, const SubscriberOptions &subscriberOptions=SubscriberOptions())
 
 UntypedSubscriberImpl (const UntypedSubscriberImpl &other)=delete
 
UntypedSubscriberImploperator= (const UntypedSubscriberImpl &)=delete
 
 UntypedSubscriberImpl (UntypedSubscriberImpl &&rhs)=delete
 
UntypedSubscriberImploperator= (UntypedSubscriberImpl &&rhs)=delete
 
cxx::expected< const void *, ChunkReceiveResulttake () noexcept
 Take the chunk from the top of the receive queue.
 
void release (const void *const userPayload) noexcept
 Releases the ownership of the chunk provided by the user-payload pointer.
 
- Public Member Functions inherited from iox::popo::BaseSubscriber< port_t >
uid_t getUid () const noexcept
 uid Get the unique ID of the subscriber.
 
capro::ServiceDescription getServiceDescription () const noexcept
 getServiceDescription Get the service description of the subscriber.
 
void subscribe () noexcept
 subscribe Initiate subscription.
 
SubscribeState getSubscriptionState () const noexcept
 getSubscriptionState Get current subscription state.
 
void unsubscribe () noexcept
 unsubscribe Unsubscribes if currently subscribed, otherwise do nothing.
 
bool hasData () const noexcept
 Check if data is available.
 
bool hasMissedData () noexcept
 Check if data has been missed since the last call of this method.
 
void releaseQueuedData () noexcept
 Releases any unread queued data.
 

Additional Inherited Members

- Protected Types inherited from iox::popo::BaseSubscriber< port_t >
using SelfType = BaseSubscriber< port_t >
 Only usable by the WaitSet, not for public use. Invalidates the internal triggerHandle.
 
using PortType = port_t
 
- Protected Member Functions inherited from iox::popo::BaseSubscriber< port_t >
 BaseSubscriber (const capro::ServiceDescription &service, const SubscriberOptions &subscriberOptions) noexcept
 
 BaseSubscriber (const BaseSubscriber &other)=delete
 
BaseSubscriberoperator= (const BaseSubscriber &)=delete
 
 BaseSubscriber (BaseSubscriber &&rhs)=delete
 
BaseSubscriberoperator= (BaseSubscriber &&rhs)=delete
 
cxx::expected< const mepoo::ChunkHeader *, ChunkReceiveResulttakeChunk () noexcept
 small helper method to unwrap the expected<optional<ChunkHeader*>> from the tryGetChunk method of the port
 
void invalidateTrigger (const uint64_t trigger) noexcept
 
void enableState (iox::popo::TriggerHandle &&triggerHandle, const SubscriberState subscriberState) noexcept
 Only usable by the WaitSet, not for public use. Attaches the triggerHandle to the internal trigger.
 
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied (const SubscriberState subscriberState) const noexcept
 Only usable by the WaitSet, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.
 
void disableState (const SubscriberState subscriberState) noexcept
 Only usable by the WaitSet, not for public use. Resets the internal triggerHandle.
 
void enableEvent (iox::popo::TriggerHandle &&triggerHandle, const SubscriberEvent subscriberState) noexcept
 Only usable by the WaitSet, not for public use. Attaches the triggerHandle to the internal trigger.
 
void disableEvent (const SubscriberEvent subscriberEvent) noexcept
 Only usable by the WaitSet, not for public use. Resets the internal triggerHandle.
 
const port_tport () const noexcept
 const accessor of the underlying port
 
port_tport () noexcept
 accessor of the underlying port
 
- Protected Attributes inherited from iox::popo::BaseSubscriber< port_t >
port_t m_port {nullptr}
 
TriggerHandle m_trigger
 

Detailed Description

template<typename BaseSubscriberType = BaseSubscriber<>>
class iox::popo::UntypedSubscriberImpl< BaseSubscriberType >

The UntypedSubscriberImpl class implements the untyped subscriber API.

Note
Not intended for public usage! Use the UntypedSubscriber instead!

Member Function Documentation

◆ release()

template<typename BaseSubscriberType = BaseSubscriber<>>
void iox::popo::UntypedSubscriberImpl< BaseSubscriberType >::release ( const void *const  userPayload)
noexcept

Releases the ownership of the chunk provided by the user-payload pointer.

Parameters
userPayloadpointer 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.

◆ take()

template<typename BaseSubscriberType = BaseSubscriber<>>
cxx::expected< const void *, ChunkReceiveResult > iox::popo::UntypedSubscriberImpl< BaseSubscriberType >::take ( )
noexcept

Take the chunk from the top of the receive queue.

Returns
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


The documentation for this class was generated from the following file: