Class SetParametersResponder

Nested Relationships

Nested Types

Class Documentation

class SetParametersResponder

Responder for a client setParameters request.

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 to respond() 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, via WebSocketServer::publishParameterValues and RemoteAccessGateway::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> &&params) &&

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_error if the underlying parameter-array allocation fails. If this happens, the responder is left intact; dropping it (without another respond()) sends the generic error status to the client.

Parameters:

paramsParameter 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