18#ifndef IOX_POSH_POPO_BASE_CLIENT_HPP
19#define IOX_POSH_POPO_BASE_CLIENT_HPP
21#include "iceoryx_hoofs/cxx/expected.hpp"
22#include "iceoryx_posh/capro/service_description.hpp"
23#include "iceoryx_posh/internal/popo/ports/client_port_user.hpp"
24#include "iceoryx_posh/popo/client_options.hpp"
25#include "iceoryx_posh/popo/trigger_handle.hpp"
26#include "iceoryx_posh/runtime/posh_runtime.hpp"
32using uid_t = UniquePortId;
38template <
typename PortT = ClientPortUser,
typename TriggerHandleT = TriggerHandle>
97 using PortType = PortT;
109 void enableState(TriggerHandleT&& triggerHandle, const ClientState clientState) noexcept;
114 WaitSetIsConditionSatisfiedCallback
125 void enableEvent(TriggerHandleT&& triggerHandle, const ClientEvent clientEvent) noexcept;
134 const PortT&
port() const noexcept;
143 TriggerHandleT m_trigger;
148#include "iceoryx_posh/internal/popo/base_client.inl"
The BaseClient class contains the common implementation for the different clients.
Definition: base_client.hpp:40
void enableState(TriggerHandleT &&triggerHandle, const ClientState clientState) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal t...
void connect() noexcept
Initiate connection to server when not already connected, otherwise nothing.
void enableEvent(TriggerHandleT &&triggerHandle, const ClientEvent clientEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal t...
bool hasResponses() const noexcept
Check if response are available.
ConnectionState getConnectionState() const noexcept
Get current connection state.
const PortT & port() const noexcept
const accessor of the underlying port
void disableState(const ClientState clientState) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
void disableEvent(const ClientEvent clientEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
void disconnect() noexcept
Disconnects when already connected, otherwise nothing.
const capro::ServiceDescription & getServiceDescription() const noexcept
Get the service description of the client.
void releaseQueuedResponses() noexcept
Releases any unread queued response.
bool hasMissedResponses() noexcept
Check if response has been missed since the last call of this method.
uid_t getUid() const noexcept
Get the unique ID of the client.
void invalidateTrigger(const uint64_t uniqueTriggerId) noexcept
Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(const ClientState clientState) const noexcept
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event correspo...
Class which allows accessing private methods to friends of NotificationAttorney. Used for example by ...
Definition: notification_attorney.hpp:33
This struct is used to configure the client.
Definition: client_options.hpp:33