17 #ifndef IOX_POSH_POPO_PORTS_CLIENT_PORT_USER_HPP
18 #define IOX_POSH_POPO_PORTS_CLIENT_PORT_USER_HPP
20 #include "iceoryx_posh/internal/popo/building_blocks/chunk_receiver.hpp"
21 #include "iceoryx_posh/internal/popo/building_blocks/chunk_sender.hpp"
22 #include "iceoryx_posh/internal/popo/ports/base_port.hpp"
23 #include "iceoryx_posh/internal/popo/ports/client_port_data.hpp"
24 #include "iceoryx_posh/mepoo/chunk_header.hpp"
25 #include "iceoryx_utils/cxx/expected.hpp"
26 #include "iceoryx_utils/cxx/helplets.hpp"
27 #include "iceoryx_utils/cxx/optional.hpp"
28 #include "iceoryx_utils/error_handling/error_handling.hpp"
44 explicit ClientPortUser(cxx::not_null<MemberType_t* const> clientPortDataPtr) noexcept;
57 cxx::expected<RequestHeader*, AllocationError>
allocateRequest(
const uint32_t userPayloadSize) noexcept;
this class is the base for all ports. it is constructed from a member pointer and is only movable....
Definition: base_port.hpp:43
The ChunkReceiver is a building block of the shared memory communication infrastructure....
Definition: chunk_receiver.hpp:46
The ChunkSender is a building block of the shared memory communication infrastructure....
Definition: chunk_sender.hpp:49
The ClientPortUser provides the API for accessing a client port from the user side....
Definition: client_port_user.hpp:40
void releaseResponse(const ResponseHeader *const responseHeader) noexcept
Release a response that was obtained with getResponseChunk.
bool hasNewResponses() const noexcept
check if there are responses in the queue
bool isConditionVariableSet() const noexcept
check if there's a condition variable set
bool hasLostResponsesSinceLastCall() noexcept
check if there was a queue overflow since the last call of hasLostResponseChunks
cxx::expected< cxx::optional< const ResponseHeader * >, ChunkReceiveResult > getResponse() noexcept
Tries to get the next response from the queue. If there is a new one, the ChunkHeader of the oldest r...
void unsetConditionVariable() noexcept
unset a condition variable from the client
void sendRequest(RequestHeader *const requestHeader) noexcept
Send an allocated request chunk to the server port.
void setConditionVariable(ConditionVariableData &conditionVariableData, const uint64_t notificationIndex) noexcept
set a condition variable (via its pointer) to the client
cxx::expected< RequestHeader *, AllocationError > allocateRequest(const uint32_t userPayloadSize) noexcept
Allocate a chunk, the ownerhip of the SharedChunk remains in the ClientPortUser for being able to cle...
void disconnect() noexcept
disconnect from the server
void freeRequest(RequestHeader *const requestHeader) noexcept
Free an allocated request without sending it.
ConnectionState getConnectionState() const noexcept
get the current connection state. Caution: There can be delays between calling connect and a change i...
void connect() noexcept
try to connect to the server Caution: There can be delays between calling connect and a change in the...
Definition: service_description.hpp:29
Defines different base port data.
Definition: base_port_data.hpp:34
Definition: client_port_data.hpp:34
Definition: condition_variable_data.hpp:31