SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
|
An Obervable class that listens for Signal K stream deltas and notifies any observers of value changes. This serves as a base class for code that needs to listen to the stream, with the most common descendant being SKValueListener
More...
#include <sensesp/signalk/signalk_listener.h>
Public Member Functions | |
SKListener (String sk_path, int listen_delay, String config_path="") | |
String & | get_sk_path () |
int | get_listen_delay () |
virtual void | parse_value (const JsonObject &json) |
Public Member Functions inherited from sensesp::Observable | |
Observable () | |
Observable (Observable &&other) | |
Move constructor. | |
void | notify () |
void | attach (std::function< void()> observer) |
Public Member Functions inherited from sensesp::Configurable | |
Configurable (String config_path="", String description="", int sort_order=1000) | |
String | get_description () |
void | set_description (String description) |
Set the description of the Configurable. | |
int | get_sort_order () |
void | set_sort_order (int sort_order) |
virtual void | save_configuration () |
Static Public Member Functions | |
static const std::vector< SKListener * > & | get_listeners () |
static bool | take_semaphore (unsigned long int timeout_ms=0) |
static void | release_semaphore () |
Protected Attributes | |
String | sk_path |
Protected Attributes inherited from sensesp::Configurable | |
String | description_ = "" |
int | sort_order_ = 1000 |
Additional Inherited Members | |
Public Attributes inherited from sensesp::Configurable | |
const String | config_path_ |
Protected Member Functions inherited from sensesp::Configurable | |
virtual void | load_configuration () |
An Obervable class that listens for Signal K stream deltas and notifies any observers of value changes. This serves as a base class for code that needs to listen to the stream, with the most common descendant being SKValueListener
Definition at line 28 of file signalk_listener.h.
The constructor
sk_path | The Signal K path that identifies this particular subscription to value |
listen_delay | How often you want the SK Server to send the data you're subscribing to |
config_path | The optional configuration path that allows an end user to change the configuration of this object. See the Configurable class for more information. |
Definition at line 9 of file signalk_listener.cpp.
|
inline |
Definition at line 49 of file signalk_listener.h.
|
inlinestatic |
Definition at line 53 of file signalk_listener.h.
|
inline |
Returns the current Signal K path. An empty string is returned if this particular source is not configured or intended to return actual data.
Definition at line 47 of file signalk_listener.h.
|
inlinevirtual |
Reimplemented in sensesp::SKValueListener< T >.
Definition at line 51 of file signalk_listener.h.
|
static |
|
protected |
Definition at line 59 of file signalk_listener.h.