iox::popo::UntypedClientImpl🔗
The UntypedClientImpl class implements the untyped client API. More...
#include <iceoryx_posh/internal/popo/untyped_client_impl.hpp>
Inherits from iox::popo::BaseClient<>
Inherited by iox::popo::UntypedClient
Public Functions🔗
Name | |
---|---|
UntypedClientImpl(const capro::ServiceDescription & service, const ClientOptions & clientOptions ={}) | |
virtual | ~UntypedClientImpl() |
UntypedClientImpl(const UntypedClientImpl & ) | |
UntypedClientImpl(UntypedClientImpl && ) | |
UntypedClientImpl & | operator=(const UntypedClientImpl & ) |
UntypedClientImpl & | operator=(UntypedClientImpl && ) |
cxx::expected< void *, AllocationError > | loan(const uint32_t payloadSize, const uint32_t payloadAlignment) Get a request chunk from loaned shared memory. |
void | releaseRequest(void *const requestPayload) Releases the ownership of the request chunk provided by the payload pointer. |
cxx::expected< ClientSendError > | send(void *const requestPayload) Sends the provided memory chunk as request to the server. |
cxx::expected< const void *, ChunkReceiveResult > | take() Take the response chunk from the top of the receive queue. |
void | releaseResponse(const void *const responsePayload) Releases the ownership of the response chunk provided by the payload pointer. |
Additional inherited members🔗
Protected Types inherited from iox::popo::BaseClient<>
Name | |
---|---|
using BaseClient< PortT, TriggerHandleT > | SelfType |
using PortT | PortType |
Public Functions inherited from iox::popo::BaseClient<>
Name | |
---|---|
virtual | ~BaseClient() |
BaseClient(const BaseClient & other) | |
BaseClient(BaseClient && rhs) | |
uid_t | getUid() const Get the unique ID of the client. |
const capro::ServiceDescription & | getServiceDescription() const Get the service description of the client. |
void | connect() Initiate connection to server when not already connected, otherwise nothing. |
ConnectionState | getConnectionState() const Get current connection state. |
void | disconnect() Disconnects when already connected, otherwise nothing. |
bool | hasResponses() const Check if response are available. |
bool | hasMissedResponses() Check if response has been missed since the last call of this method. |
void | releaseQueuedResponses() Releases any unread queued response. |
Protected Functions inherited from iox::popo::BaseClient<>
Name | |
---|---|
BaseClient(const capro::ServiceDescription & service, const ClientOptions & clientOptions) | |
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 ClientState clientState) Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. |
WaitSetIsConditionSatisfiedCallback | getCallbackForIsStateConditionSatisfied(const ClientState clientState) const Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback. |
void | disableState(const ClientState clientState) Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. |
void | enableEvent(TriggerHandleT && triggerHandle, const ClientEvent clientEvent) Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger. |
void | disableEvent(const ClientEvent clientEvent) Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle. |
const PortT & | port() const const accessor of the underlying port |
PortT & | port() accessor of the underlying port |
Protected Attributes inherited from iox::popo::BaseClient<>
Name | |
---|---|
PortT | m_port |
TriggerHandleT | m_trigger |
Friends inherited from iox::popo::BaseClient<>
Name | |
---|---|
class | NotificationAttorney |
Detailed Description🔗
template <typename BaseClientT =BaseClient<>>
class iox::popo::UntypedClientImpl;
The UntypedClientImpl class implements the untyped client API.
Note: Not intended for public usage! Use the [UntypedClient](/v2.0.1/API-reference/posh/Classes/classiox_1_1popo_1_1UntypedClient/)
instead!
Public Functions Documentation🔗
function UntypedClientImpl🔗
explicit UntypedClientImpl(
const capro::ServiceDescription & service,
const ClientOptions & clientOptions ={}
)
function ~UntypedClientImpl🔗
virtual ~UntypedClientImpl()
function UntypedClientImpl🔗
UntypedClientImpl(
const UntypedClientImpl &
)
function UntypedClientImpl🔗
UntypedClientImpl(
UntypedClientImpl &&
)
function operator=🔗
UntypedClientImpl & operator=(
const UntypedClientImpl &
)
function operator=🔗
UntypedClientImpl & operator=(
UntypedClientImpl &&
)
function loan🔗
cxx::expected< void *, AllocationError > loan(
const uint32_t payloadSize,
const uint32_t payloadAlignment
)
Get a request chunk from loaned shared memory.
Parameters:
- 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 releaseRequest🔗
void releaseRequest(
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 loan
and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
function send🔗
cxx::expected< ClientSendError > send(
void *const requestPayload
)
Sends the provided memory chunk as request to the server.
Parameters:
- requestPayload Pointer to the payload of the allocated shared memory chunk.
Return: Error if sending was not successful
function take🔗
cxx::expected< const void *, ChunkReceiveResult > take()
Take the response 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 releaseResponse
function releaseResponse🔗
void releaseResponse(
const 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 take
and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
Updated on 2 April 2022 at 16:37:47 CEST