Class GetParametersResponder

Nested Relationships

Nested Types

Class Documentation

class GetParametersResponder

Responder for a client getParameters request.

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> &&params) &&

Send parameter values back to the requesting client.

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 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