SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
|
A class that produces Signal K output to be forwarded to the Signal K server (if the system is connected to one). Signal K is reported via the as_signalK() method. More...
#include <sensesp/signalk/signalk_emitter.h>
Public Member Functions | |
SKEmitter (const String &sk_path) | |
virtual void | as_signalk_json (JsonDocument &doc) |
virtual SKMetadata * | get_metadata () |
virtual void | add_metadata (JsonArray &meta) |
String & | get_sk_path () |
void | set_sk_path (const String &path) |
Public Member Functions inherited from sensesp::Observable | |
Observable () | |
Observable (Observable &&other) | |
Move constructor. | |
void | notify () |
void | attach (std::function< void()> observer) |
Static Public Member Functions | |
static const std::vector< SKEmitter * > & | get_sources () |
Protected Attributes | |
String | sk_path_ {} |
A class that produces Signal K output to be forwarded to the Signal K server (if the system is connected to one). Signal K is reported via the as_signalK() method.
Definition at line 20 of file signalk_emitter.h.
sensesp::SKEmitter::SKEmitter | ( | const String & | sk_path | ) |
The constructor
sk_path | The Signal K path that identifies this particular output |
Definition at line 7 of file signalk_emitter.cpp.
|
virtual |
Adds this emitter's Signal K meta data to the specified meta object. The default implementation calls the add_entry()
method of the SKMetadata
class returned by get_metadata()
. If get_metadata()
returns NULL, this method does nothing.
Definition at line 11 of file signalk_emitter.cpp.
|
inlinevirtual |
Returns the data to be reported to the server as a Signal K json object.
Reimplemented in sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< T >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutput< String >, sensesp::SKOutputRawJson, and sensesp::SKOutputTime.
Definition at line 33 of file signalk_emitter.h.
|
inlinevirtual |
Returns a Metadata structure that describes the sk_path this SKEmitter is associated with. If this emitter has no metadata, NULL is returned.
Reimplemented in sensesp::SKOutput< T >, and sensesp::SKOutput< String >.
Definition at line 45 of file signalk_emitter.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 62 of file signalk_emitter.h.
|
inlinestatic |
|
inline |
|
protected |
Definition at line 69 of file signalk_emitter.h.