iceoryx_posh 2.0.3
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
iox::popo::BaseClient< PortT, TriggerHandleT > Class Template Reference

The BaseClient class contains the common implementation for the different clients. More...

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

Inheritance diagram for iox::popo::BaseClient< PortT, TriggerHandleT >:
Inheritance graph
[legend]
Collaboration diagram for iox::popo::BaseClient< PortT, TriggerHandleT >:
Collaboration graph
[legend]

Public Member Functions

 BaseClient (const BaseClient &other)=delete
 
BaseClientoperator= (const BaseClient &)=delete
 
 BaseClient (BaseClient &&rhs)=delete
 
BaseClientoperator= (BaseClient &&rhs)=delete
 
uid_t getUid () const noexcept
 Get the unique ID of the client. More...
 
const capro::ServiceDescriptiongetServiceDescription () const noexcept
 Get the service description of the client. More...
 
void connect () noexcept
 Initiate connection to server when not already connected, otherwise nothing.
 
ConnectionState getConnectionState () const noexcept
 Get current connection state. More...
 
void disconnect () noexcept
 Disconnects when already connected, otherwise nothing.
 
bool hasResponses () const noexcept
 Check if response are available. More...
 
bool hasMissedResponses () noexcept
 Check if response has been missed since the last call of this method. More...
 
void releaseQueuedResponses () noexcept
 Releases any unread queued response.
 

Protected Types

using SelfType = BaseClient< PortT, TriggerHandleT >
 
using PortType = PortT
 

Protected Member Functions

 BaseClient (const capro::ServiceDescription &service, const ClientOptions &clientOptions) noexcept
 
void invalidateTrigger (const uint64_t uniqueTriggerId) noexcept
 Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle. More...
 
void enableState (TriggerHandleT &&triggerHandle, const ClientState clientState) noexcept
 Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. More...
 
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied (const ClientState clientState) const noexcept
 Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback. More...
 
void disableState (const ClientState clientState) noexcept
 Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. More...
 
void enableEvent (TriggerHandleT &&triggerHandle, const ClientEvent clientEvent) noexcept
 Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. More...
 
void disableEvent (const ClientEvent clientEvent) noexcept
 Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. More...
 
const PortT & port () const noexcept
 const accessor of the underlying port
 
PortT & port () noexcept
 accessor of the underlying port
 

Protected Attributes

PortT m_port
 
TriggerHandleT m_trigger
 

Friends

class NotificationAttorney
 

Detailed Description

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
class iox::popo::BaseClient< PortT, TriggerHandleT >

The BaseClient class contains the common implementation for the different clients.

Parameters
[in]PortTtype of the underlying port, required for testing
[in]TriggerHandleTtype of the underlying trigger handle, required for testing
Note
Not intended for public usage! Use the Client or UntypedClient instead!

Member Function Documentation

◆ disableEvent()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
void iox::popo::BaseClient< PortT, TriggerHandleT >::disableEvent ( const ClientEvent  clientEvent)
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.

Parameters
[in]clientEventthe event which should be detached

◆ disableState()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
void iox::popo::BaseClient< PortT, TriggerHandleT >::disableState ( const ClientState  clientState)
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.

Parameters
[in]clientStatethe state which should be detached

◆ enableEvent()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
void iox::popo::BaseClient< PortT, TriggerHandleT >::enableEvent ( TriggerHandleT &&  triggerHandle,
const ClientEvent  clientEvent 
)
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.

Parameters
[in]triggerHandlervalue reference to the triggerHandle. This class takes the ownership of that handle.
[in]clientEventthe event which should be attached

◆ enableState()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
void iox::popo::BaseClient< PortT, TriggerHandleT >::enableState ( TriggerHandleT &&  triggerHandle,
const ClientState  clientState 
)
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.

Parameters
[in]triggerHandlervalue reference to the triggerHandle. This class takes the ownership of that handle.
[in]clientStatethe state which should be attached

◆ getCallbackForIsStateConditionSatisfied()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
WaitSetIsConditionSatisfiedCallback iox::popo::BaseClient< PortT, TriggerHandleT >::getCallbackForIsStateConditionSatisfied ( const ClientState  clientState) const
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.

Parameters
[in]clientStatethe state to which the hasTriggeredCallback is required

◆ getConnectionState()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
ConnectionState iox::popo::BaseClient< PortT, TriggerHandleT >::getConnectionState ( ) const
noexcept

Get current connection state.

Returns
The current connection state.

◆ getServiceDescription()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
const capro::ServiceDescription & iox::popo::BaseClient< PortT, TriggerHandleT >::getServiceDescription ( ) const
noexcept

Get the service description of the client.

Returns
A reference to the service description.

◆ getUid()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
uid_t iox::popo::BaseClient< PortT, TriggerHandleT >::getUid ( ) const
noexcept

Get the unique ID of the client.

Returns
The client's unique ID.

◆ hasMissedResponses()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
bool iox::popo::BaseClient< PortT, TriggerHandleT >::hasMissedResponses ( )
noexcept

Check if response has been missed since the last call of this method.

Returns
True if response has been missed.

Response may be missed due to overflowing receive queue.

◆ hasResponses()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
bool iox::popo::BaseClient< PortT, TriggerHandleT >::hasResponses ( ) const
noexcept

Check if response are available.

Returns
True if responses are available.

◆ invalidateTrigger()

template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
void iox::popo::BaseClient< PortT, TriggerHandleT >::invalidateTrigger ( const uint64_t  uniqueTriggerId)
protectednoexcept

Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.

Parameters
[in]uniqueTriggerIdthe id of the corresponding trigger

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