REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
help.h
Go to the documentation of this file.
1// Copyright (c) 2024 anabrid GmbH
2// Contact: https://www.anabrid.com/licensing/
3//
4// SPDX-License-Identifier: MIT OR GPL-2.0-or-later
5
6#pragma once
7
8#include "protocol/handler.h"
9
10#include "protocol/registry.h"
11
12namespace msg {
13namespace handlers {
14
16class HelpHandler : public MessageHandler {
17public:
18 utils::status replyWithObject(const Request& req, JsonObject &msg_out) override {
19 msg_out["human_readable_info"] =
20 "This is a JSON-Lines protocol described at https://anabrid.dev/docs/hybrid-controller/";
21
22 auto types_list = msg_out.createNestedArray("available_types");
23 msg::handlers::Registry::get().write_handler_names_to(types_list);
24
25 return utils::status::success();
26 }
27};
28
29} // namespace handlers
30
31} // namespace msg
utils::status replyWithObject(const Request &req, JsonObject &msg_out) override
Definition help.h:18
Definition carrier.h:10