SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
signalk_emitter.h
Go to the documentation of this file.
1#ifndef _signalk_emitter_H_
2#define _signalk_emitter_H_
3
4#include <ArduinoJson.h>
5
6#include <set>
7
8#include "sensesp.h"
12#include "signalk_metadata.h"
13
14namespace sensesp {
15
21class SKEmitter : virtual public Observable {
22 public:
29
34 virtual String as_signalk() { return "not implemented"; }
35
42 virtual SKMetadata* get_metadata() { return NULL; }
43
52 virtual void add_metadata(JsonArray& meta);
53
59 String& get_sk_path() { return sk_path; }
60
61 void set_sk_path(const String& path) { sk_path = path; }
62
63 static const std::vector<SKEmitter*>& get_sources() { return sources; }
64
65 protected:
67
68 private:
69 static std::vector<SKEmitter*> sources;
70};
71
72} // namespace sensesp
73
74#endif
Construct a new transform based on a single function.
A base class which allow observers to attach callbacks to themselves. The callbacks will be called wh...
Definition observable.h:16
A class that produces Signal K output to be forwarded to the Signal K server (if the system is connec...
virtual void add_metadata(JsonArray &meta)
virtual SKMetadata * get_metadata()
virtual String as_signalk()
void set_sk_path(const String &path)
static const std::vector< SKEmitter * > & get_sources()
Holds Signal K meta data that is associated with the sk_path an SKEmitter class may optionally send t...