1#ifndef SENSESP_SIGNALK_SIGNALK_PUT_REQUEST_LISTENER_H_
2#define SENSESP_SIGNALK_SIGNALK_PUT_REQUEST_LISTENER_H_
6#include <ArduinoJson.h>
54 static std::vector<SKPutListener*> listeners_;
70 "SKPutRequestListener: User has provided no sk_path to respond to.");
75 this->
emit(put[
"value"].as<T>());
A base class which allow observers to attach callbacks to themselves. The callbacks will be called wh...
An Obervable class that listens for Signal K PUT requests coming over the websocket connection and no...
static void clear_registry()
static const std::vector< SKPutListener * > & get_listeners()
virtual void parse_value(const JsonObject &put)=0
An object that listens for PUT requests to come in for the specified SignalK path....
SKPutRequestListener(String sk_path)
void parse_value(const JsonObject &put) override
A base class for any sensor or piece of code that outputs a value for consumption elsewhere.
void emit(const T &new_value)
SKPutRequestListener< int > IntSKPutRequestListener
SKPutRequestListener< bool > BoolSKPutRequestListener
SKPutRequestListener< String > StringSKPutRequestListener
SKPutRequestListener< float > FloatSKPutRequestListener