Skip to content

iox::popo::BaseServer🔗

The BaseServer class contains the common implementation for the different server. More...

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

Protected Types🔗

Name
using BaseServer< PortT, TriggerHandleT > SelfType
using PortT PortType

Public Functions🔗

Name
virtual ~BaseServer()
BaseServer(const BaseServer & other)
BaseServer & operator=(const BaseServer & )
BaseServer(BaseServer && rhs)
BaseServer & operator=(BaseServer && rhs)
uid_t getUid() const
Get the UID of the server.
const capro::ServiceDescription & getServiceDescription() const
Get the service description of the server.
void offer()
Offer the service to be connected to when not already offering, otherwise nothing.
void stopOffer()
Stop offering the service when already offering, otherwise nothing.
bool isOffered() const
Check if the server is offering.
bool hasClients() const
Check if the server has clients.
bool hasRequests() const
Check if requests are available.
bool hasMissedRequests()
Check if requests has been missed since the last call of this method.
void releaseQueuedRequests()
Releases any unread queued requests.

Protected Functions🔗

Name
BaseServer(const capro::ServiceDescription & service, const ServerOptions & serverOptions)
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 ServerState serverState)
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(const ServerState serverState) const
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.
void disableState(const ServerState serverState)
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
void enableEvent(TriggerHandleT && triggerHandle, const ServerEvent serverEvent)
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
void disableEvent(const ServerEvent serverEvent)
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
const PortT & port() const
port
PortT & port()
port

Protected Attributes🔗

Name
PortT m_port
TriggerHandleT m_trigger

Friends🔗

Name
class NotificationAttorney

Detailed Description🔗

template <typename PortT  =ServerPortUser,
typename TriggerHandleT  =TriggerHandle>
class iox::popo::BaseServer;

The BaseServer class contains the common implementation for the different server.

Parameters:

  • PortT type of the underlying port, required for testing specializations.
  • TriggerHandleT type of the underlying trigger handle, required for testing

Note: Not intended for public usage! Use the [Server](/v2.0.5/API-reference/posh/Classes/classiox_1_1popo_1_1Server/) or [UntypedServer](/v2.0.5/API-reference/posh/Classes/classiox_1_1popo_1_1UntypedServer/) instead!

Protected Types Documentation🔗

using SelfType🔗

using iox::popo::BaseServer< PortT, TriggerHandleT >::SelfType =  BaseServer<PortT, TriggerHandleT>;

using PortType🔗

using iox::popo::BaseServer< PortT, TriggerHandleT >::PortType =  PortT;

Public Functions Documentation🔗

function ~BaseServer🔗

virtual ~BaseServer()

function BaseServer🔗

BaseServer(
    const BaseServer & other
)

function operator=🔗

BaseServer & operator=(
    const BaseServer & 
)

function BaseServer🔗

BaseServer(
    BaseServer && rhs
)

function operator=🔗

BaseServer & operator=(
    BaseServer && rhs
)

function getUid🔗

uid_t getUid() const

Get the UID of the server.

Return: The server's UID.

function getServiceDescription🔗

const capro::ServiceDescription & getServiceDescription() const

Get the service description of the server.

Return: A reference to the service description.

function offer🔗

void offer()

Offer the service to be connected to when not already offering, otherwise nothing.

function stopOffer🔗

void stopOffer()

Stop offering the service when already offering, otherwise nothing.

function isOffered🔗

bool isOffered() const

Check if the server is offering.

Return: True if service is currently being offered.

function hasClients🔗

bool hasClients() const

Check if the server has clients.

Return: True if currently has subscribers to the service.

function hasRequests🔗

bool hasRequests() const

Check if requests are available.

Return: True if requests are available.

function hasMissedRequests🔗

bool hasMissedRequests()

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

Return: True if requests has been missed.

Requests may be missed due to overflowing receive queue.

function releaseQueuedRequests🔗

void releaseQueuedRequests()

Releases any unread queued requests.

Protected Functions Documentation🔗

function BaseServer🔗

BaseServer(
    const capro::ServiceDescription & service,
    const ServerOptions & serverOptions
)

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 ServerState serverState
)

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.
  • serverState the state which should be attached

function getCallbackForIsStateConditionSatisfied🔗

WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(
    const ServerState serverState
) const

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

Parameters:

  • serverState the state to which the hasTriggeredCallback is required

function disableState🔗

void disableState(
    const ServerState serverState
)

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

Parameters:

  • serverState the state which should be detached

function enableEvent🔗

void enableEvent(
    TriggerHandleT && triggerHandle,
    const ServerEvent serverEvent
)

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.
  • serverEvent the event which should be attached

function disableEvent🔗

void disableEvent(
    const ServerEvent serverEvent
)

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

Parameters:

  • serverEvent the event which should be detached

function port🔗

const PortT & port() const

port

Return: const accessor of the underlying port

function port🔗

PortT & port()

port

Return: 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