The BaseServer class contains the common implementation for the different server.
More...
#include <iceoryx_posh/internal/popo/base_server.hpp>
|
|
| BaseServer (const BaseServer &other)=delete |
|
BaseServer & | operator= (const BaseServer &)=delete |
|
| BaseServer (BaseServer &&rhs)=delete |
|
BaseServer & | operator= (BaseServer &&rhs)=delete |
| uid_t | getUid () const noexcept |
| | Get the UID of the server.
|
| 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.
|
|
void | stopOffer () noexcept |
| | Stop offering the service when already offering, otherwise nothing.
|
| bool | isOffered () const noexcept |
| | Check if the server is offering.
|
| bool | hasClients () const noexcept |
| | Check if the server has clients.
|
| bool | hasRequests () const noexcept |
| | Check if requests are available.
|
| bool | hasMissedRequests () noexcept |
| | Check if requests has been missed since the last call of this method.
|
|
void | releaseQueuedRequests () noexcept |
| | Releases any unread queued requests.
|
|
|
using | SelfType = BaseServer<PortT, TriggerHandleT> |
|
using | PortType = PortT |
|
|
| BaseServer (const capro::ServiceDescription &service, const ServerOptions &serverOptions) noexcept |
| void | invalidateTrigger (const uint64_t uniqueTriggerId) noexcept |
| | Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
|
| void | enableState (TriggerHandleT &&triggerHandle, const ServerState serverState) noexcept |
| | Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
|
| WaitSetIsConditionSatisfiedCallback | getCallbackForIsStateConditionSatisfied (const ServerState serverState) const noexcept |
| | 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) noexcept |
| | Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
|
| void | enableEvent (TriggerHandleT &&triggerHandle, const ServerEvent serverEvent) noexcept |
| | Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
|
| void | disableEvent (const ServerEvent serverEvent) noexcept |
| | Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
|
| const PortT & | port () const noexcept |
| | port
|
| PortT & | port () noexcept |
| | port
|
|
|
PortT | m_port |
|
TriggerHandleT | m_trigger |
|
|
class | NotificationAttorney |
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
class iox::popo::BaseServer< PortT, TriggerHandleT >
The BaseServer class contains the common implementation for the different server.
- Parameters
-
| [in] | PortT | type of the underlying port, required for testing specializations. |
| [in] | TriggerHandleT | type of the underlying trigger handle, required for testing |
- Note
- Not intended for public usage! Use the Server or UntypedServer instead!
◆ disableEvent()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
- Parameters
-
| [in] | serverEvent | the event which should be detached |
◆ disableState()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
- Parameters
-
| [in] | serverState | the state which should be detached |
◆ enableEvent()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
| void iox::popo::BaseServer< PortT, TriggerHandleT >::enableEvent |
( |
TriggerHandleT && | triggerHandle, |
|
|
const ServerEvent | serverEvent ) |
|
protectednoexcept |
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
- Parameters
-
| [in] | triggerHandle | rvalue reference to the triggerHandle. This class takes the ownership of that handle. |
| [in] | serverEvent | the event which should be attached |
◆ enableState()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
| void iox::popo::BaseServer< PortT, TriggerHandleT >::enableState |
( |
TriggerHandleT && | triggerHandle, |
|
|
const ServerState | serverState ) |
|
protectednoexcept |
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
- Parameters
-
| [in] | triggerHandle | rvalue reference to the triggerHandle. This class takes the ownership of that handle. |
| [in] | serverState | the state which should be attached |
◆ getCallbackForIsStateConditionSatisfied()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
| WaitSetIsConditionSatisfiedCallback iox::popo::BaseServer< PortT, TriggerHandleT >::getCallbackForIsStateConditionSatisfied |
( |
const ServerState | serverState | ) |
const |
|
protectednoexcept |
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.
- Parameters
-
| [in] | serverState | the state to which the hasTriggeredCallback is required |
◆ getServiceDescription()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Get the service description of the server.
- Returns
- A reference to the service description.
◆ getUid()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Get the UID of the server.
- Returns
- The server's UID.
◆ hasClients()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Check if the server has clients.
- Returns
- True if currently has subscribers to the service.
◆ hasMissedRequests()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Check if requests has been missed since the last call of this method.
- Returns
- True if requests has been missed.
Requests may be missed due to overflowing receive queue.
◆ hasRequests()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Check if requests are available.
- Returns
- True if requests are available.
◆ invalidateTrigger()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
- Parameters
-
| [in] | uniqueTriggerId | the id of the corresponding trigger |
◆ isOffered()
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
Check if the server is offering.
- Returns
- True if service is currently being offered.
◆ port() [1/2]
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
port
- Returns
- const accessor of the underlying port
◆ port() [2/2]
template<typename PortT = ServerPortUser, typename TriggerHandleT = TriggerHandle>
port
- Returns
- accessor of the underlying port
The documentation for this class was generated from the following file: