Class GetParametersResponder¶
Defined in File parameter_handler.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class GetParametersResponder¶
Responder for a client
getParametersrequest.This is the means by which a parameter handler responds to a get request from a client. Each request is paired with a unique responder instance, and the handler must complete it by calling
respond()exactly once (pass an empty vector if no values are available). Dropping the responder without responding is reserved for unrecoverable internal errors, and sends a generic error status to the requesting client.Public Functions
-
void respond(std::vector<Parameter> &¶ms) &&¶
Send parameter values back to the requesting client.
Entries with an unset value are dropped before serialization.
May throw
std::runtime_errorif the underlying parameter-array allocation fails. If this happens, the responder is left intact; dropping it (without anotherrespond()) sends the generic error status to the client.- Parameters:
params – Parameter values to send.
-
~GetParametersResponder() = default¶
-
GetParametersResponder(GetParametersResponder&&) noexcept = default¶
Default move constructor.
-
GetParametersResponder &operator=(GetParametersResponder&&) noexcept = default¶
Default move assignment.
-
GetParametersResponder(const GetParametersResponder&) = delete¶
-
GetParametersResponder &operator=(const GetParametersResponder&) = delete¶
Friends
- friend struct internal::ForwarderAccess
-
void respond(std::vector<Parameter> &¶ms) &&¶