17 #ifndef IOX_POSH_POPO_PORTS_SERVER_PORT_USER_HPP
18 #define IOX_POSH_POPO_PORTS_SERVER_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/server_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 ServerPortUser(cxx::not_null<MemberType_t* const> serverPortDataPtr) noexcept;
56 cxx::expected<cxx::optional<const RequestHeader*>, ChunkReceiveResult>
getRequest() 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 ServerPortUser provides the API for accessing a server port from the user side....
Definition: server_port_user.hpp:40
void unsetConditionVariable() noexcept
unset a condition variable from the client
void sendResponse(ResponseHeader *const responseHeader) noexcept
Send an allocated request chunk to the server port.
bool isOffered() const noexcept
Checks whether the server port is currently offered.
bool hasNewRequests() const noexcept
check if there are requests in the queue
void offer() noexcept
offer this server port in the system
bool hasLostRequestsSinceLastCall() noexcept
check if there was a queue overflow since the last call of hasLostRequestsSinceLastCall
void freeResponse(ResponseHeader *const responseHeader) noexcept
Free an allocated response without sending it.
cxx::expected< ResponseHeader *, AllocationError > allocateResponse(const uint32_t userPayloadSize) noexcept
Allocate a response, the ownerhip of the SharedChunk remains in the ServerPortUser for being able to ...
void setConditionVariable(ConditionVariableData &conditionVariableData, const uint64_t notificationIndex) noexcept
set a condition variable (via its pointer) to the client
bool hasClients() const noexcept
Checks whether there are currently clients connected to this server.
void releaseRequest(const RequestHeader *const requestHeader) noexcept
Release a request that was obtained with getRequest.
void stopOffer() noexcept
stop offering this server port, all clients will be disconnected from this server
bool isConditionVariableSet() const noexcept
check if there's a condition variable set
cxx::expected< cxx::optional< const RequestHeader * >, ChunkReceiveResult > getRequest() noexcept
Tries to get the next request from the queue. If there is a new one, the ChunkHeader of the oldest re...
Definition: service_description.hpp:29
Defines different base port data.
Definition: base_port_data.hpp:34
Definition: condition_variable_data.hpp:31
Definition: server_port_data.hpp:34