Template Class BaseClient
Defined in File base_client.hpp
Inheritance Relationships
Derived Types
public iox::popo::ClientImpl< Req, Res, BaseClientT >(Template Class ClientImpl)public iox::popo::UntypedClientImpl< BaseClientT >(Template Class UntypedClientImpl)
Class Documentation
-
template<typename PortT = ClientPortUser, typename TriggerHandleT = TriggerHandle>
class BaseClient The BaseClient class contains the common implementation for the different clients.
Note
Not intended for public usage! Use the
ClientorUntypedClientinstead!- Param PortT:
[in] type of the underlying port, required for testing
- Param TriggerHandleT:
[in] type of the underlying trigger handle, required for testing
Subclassed by iox::popo::ClientImpl< Req, Res, BaseClientT >, iox::popo::UntypedClientImpl< BaseClientT >
Public Functions
-
virtual ~BaseClient() noexcept
-
BaseClient(const BaseClient &other) = delete
-
BaseClient &operator=(const BaseClient&) = delete
-
BaseClient(BaseClient &&rhs) = delete
-
BaseClient &operator=(BaseClient &&rhs) = delete
-
const capro::ServiceDescription &getServiceDescription() const noexcept
Get the service description of the client.
- Returns:
A reference to the service description.
-
void connect() noexcept
Initiate connection to server when not already connected, otherwise nothing.
-
ConnectionState getConnectionState() const noexcept
Get current connection state.
- Returns:
The current connection state.
-
void disconnect() noexcept
Disconnects when already connected, otherwise nothing.
-
bool hasResponses() const noexcept
Check if response are available.
- Returns:
True if responses are available.
-
bool hasMissedResponses() noexcept
Check if response has been missed since the last call of this method.
Response may be missed due to overflowing receive queue.
- Returns:
True if response has been missed.
-
void releaseQueuedResponses() noexcept
Releases any unread queued response.
Protected Functions
-
BaseClient(const capro::ServiceDescription &service, const ClientOptions &clientOptions) noexcept
-
void invalidateTrigger(const uint64_t uniqueTriggerId) noexcept
Only usable by the WaitSet/Listener, not for public use. Invalidates the internal triggerHandle.
- Parameters:
uniqueTriggerId – [in] the id of the corresponding trigger
-
void enableState(TriggerHandleT &&triggerHandle, const ClientState clientState) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
- Parameters:
triggerHandle – [in] rvalue reference to the triggerHandle. This class takes the ownership of that handle.
clientState – [in] the state which should be attached
-
WaitSetIsConditionSatisfiedCallback getCallbackForIsStateConditionSatisfied(const ClientState clientState) const noexcept
Only usable by the WaitSet/Listener, not for public use. Returns method pointer to the event corresponding hasTriggered method callback.
- Parameters:
clientState – [in] the state to which the hasTriggeredCallback is required
-
void disableState(const ClientState clientState) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
- Parameters:
clientState – [in] the state which should be detached
-
void enableEvent(TriggerHandleT &&triggerHandle, const ClientEvent clientEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Attaches the triggerHandle to the internal trigger.
- Parameters:
triggerHandle – [in] rvalue reference to the triggerHandle. This class takes the ownership of that handle.
clientEvent – [in] the event which should be attached
-
void disableEvent(const ClientEvent clientEvent) noexcept
Only usable by the WaitSet/Listener, not for public use. Resets the internal triggerHandle.
- Parameters:
clientEvent – [in] the event which should be detached
Friends
- friend class NotificationAttorney