1#ifndef SENSESP_SRC_SENSESP_SIGNALK_SIGNALK_VALUE_LISTENER_H_
2#define SENSESP_SRC_SENSESP_SIGNALK_SIGNALK_VALUE_LISTENER_H_
4#include <ArduinoJson.h>
24 String config_path =
"")
27 ESP_LOGE(__FILENAME__,
28 "SKValueListener: User has provided no sk_path to listen to.");
33 this->
emit(json[
"value"].as<T>());
An Obervable class that listens for Signal K stream deltas and notifies any observers of value change...
An ValueProducer that listens to specific Signal K paths and emits its value whenever it changes.
void parse_value(const JsonObject &json) override
SKValueListener(String sk_path, int listen_delay=1000, String config_path="")
A base class for any sensor or piece of code that outputs a value for consumption elsewhere.
void emit(const T &new_value)
SKValueListener< float > FloatSKListener
SKValueListener< String > StringSKListener
SKValueListener< bool > BoolSKListener
SKValueListener< int > IntSKListener