Class SetParametersResponder¶
Defined in File parameter_handler.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class SetParametersResponder¶
Responder for a client
setParametersrequest.This is the means by which a parameter handler responds to a set request from a client. Each request is paired with a unique responder instance, and the handler must complete it by calling
respond()exactly once with the values that were actually applied (pass an empty vector if the request could not be handled). When the request carried a request_id, the values passed torespond()are echoed back to the requesting client; otherwise the responder does nothing on the wire. The responder does not notify other parameter subscribers; a handler may be shared across multiple sinks, so it is the implementer’s responsibility to broadcast applied updates to subscribers on each sink (for example, viaWebSocketServer::publishParameterValuesandRemoteAccessGateway::publishParameterValues). 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) &&¶
Acknowledge the set request with the values that were actually applied.
Echoes those values back to the requesting client when the request carried a request_id; otherwise does nothing on the wire. 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 that were applied.
-
~SetParametersResponder() = default¶
-
SetParametersResponder(SetParametersResponder&&) noexcept = default¶
Default move constructor.
-
SetParametersResponder &operator=(SetParametersResponder&&) noexcept = default¶
Default move assignment.
-
SetParametersResponder(const SetParametersResponder&) = delete¶
-
SetParametersResponder &operator=(const SetParametersResponder&) = delete¶
Friends
- friend struct internal::ForwarderAccess
-
void respond(std::vector<Parameter> &¶ms) &&¶