|
iceoryx_doc
1.0.1
|
The ClientPortUser provides the API for accessing a client port from the user side. The client port is divided in the three parts ClientPortData, ClientPortRouDi and ClientPortUser. The ClientPortUser uses the functionality of a ChunkSender and ChunReceiver for sending requests and receiving responses. Additionally it provides the connect / disconnect API which controls whether the client port shall connect to the server. More...
#include <client_port_user.hpp>


Public Types | |
| using | MemberType_t = ClientPortData |
Public Types inherited from iox::popo::BasePort | |
| using | MemberType_t = BasePortData |
Public Member Functions | |
| ClientPortUser (cxx::not_null< MemberType_t *const > clientPortDataPtr) noexcept | |
| ClientPortUser (const ClientPortUser &other)=delete | |
| ClientPortUser & | operator= (const ClientPortUser &)=delete |
| ClientPortUser (ClientPortUser &&rhs)=default | |
| ClientPortUser & | operator= (ClientPortUser &&rhs)=default |
| 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 cleanup if the user process disappears. More... | |
| void | freeRequest (RequestHeader *const requestHeader) noexcept |
| Free an allocated request without sending it. More... | |
| void | sendRequest (RequestHeader *const requestHeader) noexcept |
| Send an allocated request chunk to the server port. More... | |
| void | connect () noexcept |
| try to connect to the server Caution: There can be delays between calling connect and a change in the connection state More... | |
| void | disconnect () noexcept |
| disconnect from the server | |
| ConnectionState | getConnectionState () const noexcept |
| get the current connection state. Caution: There can be delays between calling connect and a change in the connection state. The connection state can also change without user interaction if the server comes and goes More... | |
| 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 response in the queue is returned (FiFo queue) More... | |
| void | releaseResponse (const ResponseHeader *const responseHeader) noexcept |
| Release a response that was obtained with getResponseChunk. More... | |
| bool | hasNewResponses () const noexcept |
| check if there are responses in the queue More... | |
| bool | hasLostResponsesSinceLastCall () noexcept |
| check if there was a queue overflow since the last call of hasLostResponseChunks More... | |
| void | setConditionVariable (ConditionVariableData &conditionVariableData, const uint64_t notificationIndex) noexcept |
| set a condition variable (via its pointer) to the client | |
| void | unsetConditionVariable () noexcept |
| unset a condition variable from the client | |
| bool | isConditionVariableSet () const noexcept |
| check if there's a condition variable set More... | |
Public Member Functions inherited from iox::popo::BasePort | |
| BasePort (MemberType_t *const basePortDataPtr) noexcept | |
| BasePort (const BasePort &other)=delete | |
| BasePort & | operator= (const BasePort &)=delete |
| BasePort (BasePort &&) noexcept | |
| BasePort & | operator= (BasePort &&) noexcept |
| operator bool () const noexcept | |
| a port can be constructed from a nullptr, additionally it also can be moved and in these cases the member methods would work on a nullptr. to circumvent this problem More... | |
| capro::ServiceDescription | getCaProServiceDescription () const noexcept |
| Reads Type of actual CaPro Port (publisher/subscriber...) More... | |
| RuntimeName_t | getRuntimeName () const noexcept |
| Gets name of the application's runtime for the active port. More... | |
| UniquePortId | getUniqueID () const noexcept |
| Gets Id of the active port. More... | |
| NodeName_t | getNodeName () const noexcept |
| returns node name for the active port More... | |
| void | destroy () noexcept |
| Indicate that this port can be destroyed. | |
| bool | toBeDestroyed () const noexcept |
| Checks whether port can be destroyed. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from iox::popo::BasePort | |
| const MemberType_t * | getMembers () const noexcept |
| MemberType_t * | getMembers () noexcept |
The ClientPortUser provides the API for accessing a client port from the user side. The client port is divided in the three parts ClientPortData, ClientPortRouDi and ClientPortUser. The ClientPortUser uses the functionality of a ChunkSender and ChunReceiver for sending requests and receiving responses. Additionally it provides the connect / disconnect API which controls whether the client port shall connect to the server.
|
noexcept |
Allocate a chunk, the ownerhip of the SharedChunk remains in the ClientPortUser for being able to cleanup if the user process disappears.
| [in] | userPayloadSize,size | of the user-paylaod without additional headers |
|
noexcept |
try to connect to the server Caution: There can be delays between calling connect and a change in the connection state
|
noexcept |
Free an allocated request without sending it.
| [in] | chunkHeader,pointer | to the ChunkHeader to free |
|
noexcept |
get the current connection state. Caution: There can be delays between calling connect and a change in the connection state. The connection state can also change without user interaction if the server comes and goes
|
noexcept |
Tries to get the next response from the queue. If there is a new one, the ChunkHeader of the oldest response in the queue is returned (FiFo queue)
|
noexcept |
check if there was a queue overflow since the last call of hasLostResponseChunks
|
noexcept |
check if there are responses in the queue
|
noexcept |
check if there's a condition variable set
|
noexcept |
Release a response that was obtained with getResponseChunk.
| [in] | chunkHeader,pointer | to the ChunkHeader to release |
|
noexcept |
Send an allocated request chunk to the server port.
| [in] | chunkHeader,pointer | to the ChunkHeader to send |