SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
signalk_time.cpp
Go to the documentation of this file.
1
2#include "signalk_time.h"
3
4namespace sensesp {
5
10
14 json_doc["path"] = this->sk_path;
15 json_doc["value"] = output;
17 return json;
18}
19
23
24static const char SCHEMA[] PROGMEM = R"({
25 "type": "object",
26 "properties": {
27 "sk_path": { "title": "Signal K Path", "type": "string" },
28 "value": { "title": "Last value", "type" : "string", "readOnly": true }
29 }
30 })";
31
33
35 String expected[] = {"sk_path"};
36 for (auto str : expected) {
37 if (!config.containsKey(str)) {
38 return false;
39 }
40 }
41 sk_path = config["sk_path"].as<String>();
42 return true;
43}
44
45} // namespace sensesp
virtual void load_configuration()
Construct a new transform based on a single function.
A class that produces Signal K output to be forwarded to the Signal K server (if the system is connec...
virtual String get_config_schema() override
virtual void get_configuration(JsonObject &doc) override
virtual String as_signalk() override
SKOutputTime(String sk_path, String config_path="")
virtual bool set_configuration(const JsonObject &config) override
Consumes a time_t time object and produces a human readable string of the time for UTC in ISO 8601 fo...
Definition timestring.h:15
const uint8_t PAGE_css_bootstrap[] PROGMEM