Class ServerPortRouDi

Inheritance Relationships

Base Type

Class Documentation

class ServerPortRouDi : public iox::popo::BasePort

The ServerPortRouDi provides the API for accessing a server port from the RouDi middleware daemon side. The server port is divided in the three parts ServerPortData, ServerPortRouDi and ServerPortUser. The ServerPortRouDi provides service discovery functionality that is based on CaPro messages. With this API the dynamic connections between clients and servers ports can be established.

Public Types

using MemberType_t = ServerPortData

Public Functions

explicit ServerPortRouDi(MemberType_t &serverPortData) noexcept
ServerPortRouDi(const ServerPortRouDi &other) = delete
ServerPortRouDi &operator=(const ServerPortRouDi&) = delete
ServerPortRouDi(ServerPortRouDi &&rhs) noexcept = default
ServerPortRouDi &operator=(ServerPortRouDi &&rhs) noexcept = default
~ServerPortRouDi() = default
QueueFullPolicy getRequestQueueFullPolicy() const noexcept

Access to the configured requestQueueFullPolicy.

Returns:

the configured requestQueueFullPolicy

ConsumerTooSlowPolicy getClientTooSlowPolicy() const noexcept

Access to the configured clientTooSlowPolicy.

Returns:

the configured clientTooSlowPolicy

cxx::optional<capro::CaproMessage> tryGetCaProMessage() noexcept

get an optional CaPro message that changes the offer state of the server

Returns:

CaPro message with the new offer state, empty optional if no state change

cxx::optional<capro::CaproMessage> dispatchCaProMessageAndGetPossibleResponse(const capro::CaproMessage &caProMessage) noexcept

dispatch a CaPro message to the server for processing

Parameters:

caProMessage[in] to process

Returns:

CaPro message with an immediate response the provided CaPro message, empty optional if no response

void releaseAllChunks() noexcept

cleanup the server and release all the chunks it currently holds Caution: Contract is that user process is no more running when cleanup is called