iox::popo::BaseClient🔗
The BaseClient class contains the common implementation for the different clients. More...
#include <iceoryx_posh/internal/popo/base_client.hpp>
Protected Types🔗
Name | |
---|---|
using BaseClient< PortT, TriggerHandleT > | SelfType |
using PortT | PortType |
Public Functions🔗
Name | |
---|---|
virtual | ~BaseClient() |
BaseClient(const BaseClient & other) | |
BaseClient & | operator=(const BaseClient & ) |
BaseClient(BaseClient && rhs) | |
BaseClient & | operator=(BaseClient && rhs) |
uid_t | getUid() const Get the unique ID of the client. |
const capro::ServiceDescription & | getServiceDescription() const Get the service description of the client. |
void | connect() Initiate connection to server when not already connected, otherwise nothing. |
ConnectionState | getConnectionState() const Get current connection state. |
void | disconnect() Disconnects when already connected, otherwise nothing. |
bool | hasResponses() const Check if response are available. |
bool | hasMissedResponses() Check if response has been missed since the last call of this method. |
void | releaseQueuedResponses() Releases any unread queued response. |
Protected Functions🔗
Name | |
---|---|
BaseClient(const capro::ServiceDescription & service, const ClientOptions & clientOptions) | |
void | invalidateTrigger(const uint64_t uniqueTriggerId) Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle. |
void | enableState(TriggerHandleT && triggerHandle, const ClientState clientState) Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. |
WaitSetIsConditionSatisfiedCallback | getCallbackForIsStateConditionSatisfied(const ClientState clientState) const Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback. |
void | disableState(const ClientState clientState) Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. |
void | enableEvent(TriggerHandleT && triggerHandle, const ClientEvent clientEvent) Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. |
void | disableEvent(const ClientEvent clientEvent) Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. |
const PortT & | port() const const accessor of the underlying port |
PortT & | port() accessor of the underlying port |
Protected Attributes🔗
Name | |
---|---|
PortT | m_port |
TriggerHandleT | m_trigger |
Friends🔗
Name | |
---|---|
class | NotificationAttorney |
Detailed Description🔗
template <typename PortT =ClientPortUser,
typename TriggerHandleT =TriggerHandle>
class iox::popo::BaseClient;
The BaseClient class contains the common implementation for the different clients.
Parameters:
- PortT type of the underlying port, required for testing
- TriggerHandleT type of the underlying trigger handle, required for testing
Note: Not intended for public usage! Use the [Client](/v2.0.5/API-reference/posh/Classes/classiox_1_1popo_1_1Client/)
or [UntypedClient](/v2.0.5/API-reference/posh/Classes/classiox_1_1popo_1_1UntypedClient/)
instead!
Protected Types Documentation🔗
using SelfType🔗
using iox::popo::BaseClient< PortT, TriggerHandleT >::SelfType = BaseClient<PortT, TriggerHandleT>;
using PortType🔗
using iox::popo::BaseClient< PortT, TriggerHandleT >::PortType = PortT;
Public Functions Documentation🔗
function ~BaseClient🔗
virtual ~BaseClient()
function BaseClient🔗
BaseClient(
const BaseClient & other
)
function operator=🔗
BaseClient & operator=(
const BaseClient &
)
function BaseClient🔗
BaseClient(
BaseClient && rhs
)
function operator=🔗
BaseClient & operator=(
BaseClient && rhs
)
function getUid🔗
uid_t getUid() const
Get the unique ID of the client.
Return: The client's unique ID.
function getServiceDescription🔗
const capro::ServiceDescription & getServiceDescription() const
Get the service description of the client.
Return: A reference to the service description.
function connect🔗
void connect()
Initiate connection to server when not already connected, otherwise nothing.
function getConnectionState🔗
ConnectionState getConnectionState() const
Get current connection state.
Return: The current connection state.
function disconnect🔗
void disconnect()
Disconnects when already connected, otherwise nothing.
function hasResponses🔗
bool hasResponses() const
Check if response are available.
Return: True if responses are available.
function hasMissedResponses🔗
bool hasMissedResponses()
Check if response has been missed since the last call of this method.
Return: True if response has been missed.
Response may be missed due to overflowing receive queue.
function releaseQueuedResponses🔗
void releaseQueuedResponses()
Releases any unread queued response.
Protected Functions Documentation🔗
function BaseClient🔗
BaseClient(
const capro::ServiceDescription & service,
const ClientOptions & clientOptions
)
function invalidateTrigger🔗
void invalidateTrigger(
const uint64_t uniqueTriggerId
)
Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
Parameters:
- uniqueTriggerId the id of the corresponding trigger
function enableState🔗
void enableState(
TriggerHandleT && triggerHandle,
const ClientState clientState
)
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
Parameters:
- triggerHandle rvalue reference to the triggerHandle. This class takes the ownership of that handle.
- clientState the state which should be attached
function getCallbackForIsStateConditionSatisfied🔗
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(
const ClientState clientState
) const
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.
Parameters:
- clientState the state to which the hasTriggeredCallback is required
function disableState🔗
void disableState(
const ClientState clientState
)
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
Parameters:
- clientState the state which should be detached
function enableEvent🔗
void enableEvent(
TriggerHandleT && triggerHandle,
const ClientEvent clientEvent
)
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
Parameters:
- triggerHandle rvalue reference to the triggerHandle. This class takes the ownership of that handle.
- clientEvent the event which should be attached
function disableEvent🔗
void disableEvent(
const ClientEvent clientEvent
)
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
Parameters:
- clientEvent the event which should be detached
function port🔗
const PortT & port() const
const accessor of the underlying port
function port🔗
PortT & port()
accessor of the underlying port
Protected Attributes Documentation🔗
variable m_port🔗
PortT m_port;
variable m_trigger🔗
TriggerHandleT m_trigger;
Friends🔗
friend NotificationAttorney🔗
friend class NotificationAttorney;
Updated on 18 December 2023 at 13:11:43 CET