iox::popo::UntypedServerImpl🔗
The UntypedServerImpl class implements the untyped server API. More...
#include <iceoryx_posh/internal/popo/untyped_server_impl.hpp>
Inherits from iox::popo::BaseServer<>
Inherited by iox::popo::UntypedServer
Public Functions🔗
Name | |
---|---|
UntypedServerImpl(const capro::ServiceDescription & service, const ServerOptions & serverOptions ={}) | |
virtual | ~UntypedServerImpl() |
UntypedServerImpl(const UntypedServerImpl & ) | |
UntypedServerImpl(UntypedServerImpl && ) | |
UntypedServerImpl & | operator=(const UntypedServerImpl & ) |
UntypedServerImpl & | operator=(UntypedServerImpl && ) |
cxx::expected< const void *, ServerRequestResult > | take() Take the request chunk from the top of the receive queue. |
void | releaseRequest(const void *const requestPayload) Releases the ownership of the request chunk provided by the payload pointer. |
cxx::expected< void *, AllocationError > | loan(const RequestHeader *const requestHeader, const uint32_t payloadSize, const uint32_t payloadAlignment) Get a response chunk from loaned shared memory. |
cxx::expected< ServerSendError > | send(void *const responsePayload) Sends the provided memory chunk as response to the client. |
void | releaseResponse(void *const responsePayload) Releases the ownership of the response chunk provided by the payload pointer. |
Additional inherited members🔗
Protected Types inherited from iox::popo::BaseServer<>
Name | |
---|---|
using BaseServer< PortT, TriggerHandleT > | SelfType |
using PortT | PortType |
Public Functions inherited from iox::popo::BaseServer<>
Name | |
---|---|
virtual | ~BaseServer() |
BaseServer(const BaseServer & other) | |
BaseServer(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 inherited from iox::popo::BaseServer<>
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 inherited from iox::popo::BaseServer<>
Name | |
---|---|
PortT | m_port |
TriggerHandleT | m_trigger |
Friends inherited from iox::popo::BaseServer<>
Name | |
---|---|
class | NotificationAttorney |
Detailed Description🔗
template <typename BaseServerT =BaseServer<>>
class iox::popo::UntypedServerImpl;
The UntypedServerImpl class implements the untyped server API.
Note: Not intended for public usage! Use the [UntypedServer](/v2.0.3/API-reference/posh/Classes/classiox_1_1popo_1_1UntypedServer/)
instead!
Public Functions Documentation🔗
function UntypedServerImpl🔗
explicit UntypedServerImpl(
const capro::ServiceDescription & service,
const ServerOptions & serverOptions ={}
)
function ~UntypedServerImpl🔗
virtual ~UntypedServerImpl()
function UntypedServerImpl🔗
UntypedServerImpl(
const UntypedServerImpl &
)
function UntypedServerImpl🔗
UntypedServerImpl(
UntypedServerImpl &&
)
function operator=🔗
UntypedServerImpl & operator=(
const UntypedServerImpl &
)
function operator=🔗
UntypedServerImpl & operator=(
UntypedServerImpl &&
)
function take🔗
cxx::expected< const void *, ServerRequestResult > take()
Take the request chunk from the top of the receive queue.
Return: The payload pointer of the request chunk taken.
No automatic cleanup of the associated chunk is performed and must be manually done by calling releaseRequest
function releaseRequest🔗
void releaseRequest(
const void *const requestPayload
)
Releases the ownership of the request chunk provided by the payload pointer.
Parameters:
- requestPayload pointer to the payload of the chunk to be released
The requestPayload pointer must have been previously provided by take
and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
function loan🔗
cxx::expected< void *, AllocationError > loan(
const RequestHeader *const requestHeader,
const uint32_t payloadSize,
const uint32_t payloadAlignment
)
Get a response chunk from loaned shared memory.
Parameters:
- requestHeader The requestHeader to which the response belongs to, to determine where to send the response
- payloadSize The expected payload size of the chunk.
- payloadAlignment The expected payload alignment of the chunk.
Return: A pointer to the payload of a chunk of memory with the requested size or an AllocationError if no chunk could be loaned.
Note: An AllocationError occurs if no chunk is available in the shared memory.
function send🔗
cxx::expected< ServerSendError > send(
void *const responsePayload
)
Sends the provided memory chunk as response to the client.
Parameters:
- responsePayload Pointer to the payload of the allocated shared memory chunk.
Return: Error if sending was not successful
function releaseResponse🔗
void releaseResponse(
void *const responsePayload
)
Releases the ownership of the response chunk provided by the payload pointer.
Parameters:
- responsePayload pointer to the payload of the chunk to be released
The responsePayload pointer must have been previously provided by loan
and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
Updated on 10 February 2023 at 12:43:22 CET