18#ifndef IOX_POSH_POPO_BASE_SERVER_HPP
19#define IOX_POSH_POPO_BASE_SERVER_HPP
21#include "iceoryx_hoofs/cxx/expected.hpp"
22#include "iceoryx_posh/capro/service_description.hpp"
23#include "iceoryx_posh/internal/popo/ports/server_port_user.hpp"
24#include "iceoryx_posh/popo/server_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 = ServerPortUser,
typename TriggerHandleT = TriggerHandle>
103 using PortType = PortT;
115 void enableState(TriggerHandleT&& triggerHandle, const ServerState serverState) noexcept;
120 WaitSetIsConditionSatisfiedCallback
131 void enableEvent(TriggerHandleT&& triggerHandle, const ServerEvent serverEvent) noexcept;
141 const PortT&
port() const noexcept;
150 TriggerHandleT m_trigger;
156#include "iceoryx_posh/internal/popo/base_server.inl"
The BaseServer class contains the common implementation for the different server.
Definition base_server.hpp:40
bool hasClients() const noexcept
Check if the server has clients.
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(const ServerState serverState) const noexcept
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event correspo...
bool hasRequests() const noexcept
Check if requests are available.
void releaseQueuedRequests() noexcept
Releases any unread queued requests.
void stopOffer() noexcept
Stop offering the service when already offering, otherwise nothing.
void disableState(const ServerState serverState) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
void disableEvent(const ServerEvent serverEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
bool hasMissedRequests() noexcept
Check if requests has been missed since the last call of this method.
bool isOffered() const noexcept
Check if the server is offering.
void enableEvent(TriggerHandleT &&triggerHandle, const ServerEvent serverEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal t...
void enableState(TriggerHandleT &&triggerHandle, const ServerState serverState) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal t...
void invalidateTrigger(const uint64_t uniqueTriggerId) noexcept
Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
const capro::ServiceDescription & getServiceDescription() const noexcept
Get the service description of the server.
void offer() noexcept
Offer the service to be connected to when not already offering, otherwise nothing.
const PortT & port() const noexcept
port
uid_t getUid() const noexcept
Get the UID of the server.
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 server.
Definition server_options.hpp:33