SensESP 3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
signalk_emitter.cpp
Go to the documentation of this file.
1#include "signalk_emitter.h"
2
3namespace sensesp {
4
5std::vector<SKEmitter*> SKEmitter::sources_;
6
7SKEmitter::SKEmitter(const String& sk_path) : sk_path_{sk_path} {
8 sources_.push_back(this);
9}
10
11void SKEmitter::add_metadata(JsonArray& meta) {
12 SKMetadata* my_meta = this->get_metadata();
13 if (my_meta != NULL) {
14 my_meta->add_entry(this->get_sk_path(), meta);
15 }
16}
17
18} // namespace sensesp
virtual void add_metadata(JsonArray &meta)
virtual SKMetadata * get_metadata()
SKEmitter(const String &sk_path)
Holds Signal K meta data that is associated with the sk_path an SKEmitter class may optionally send t...
virtual void add_entry(const String &sk_path, JsonArray &meta)