SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::Sensor Class Reference

The base class for all sensors. Used only as a base class - never instantiated directly in a project. More...

#include <sensesp/sensors/sensor.h>

Inheritance diagram for sensesp::Sensor:
[legend]

Public Member Functions

 Sensor (String config_path="")
 
- 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)
 
virtual void get_configuration (JsonObject &configObject)
 
virtual bool set_configuration (const JsonObject &config)
 
virtual String get_config_schema ()
 
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 ()
 
- Public Member Functions inherited from sensesp::Startable
 Startable (int priority=0)
 
virtual void start ()
 
const int get_start_priority ()
 
void set_start_priority (int priority)
 

Static Public Member Functions

static const std::set< Sensor * > & get_sensors ()
 
- Static Public Member Functions inherited from sensesp::Startable
static void start_all ()
 

Additional Inherited Members

- Public Attributes inherited from sensesp::Configurable
const String config_path_
 
- Protected Member Functions inherited from sensesp::Configurable
virtual void load_configuration ()
 
- Protected Attributes inherited from sensesp::Configurable
String description_ = ""
 
int sort_order_ = 1000
 

Detailed Description

The base class for all sensors. Used only as a base class - never instantiated directly in a project.

In SensESP, a sensor is something that takes a measurement outside of the SensESP / SignalK environment and brings it into SensESP. Look at the list of files in https://github.com/SignalK/SensESP/tree/master/src/sensors for all the already-defined sensors.

Parameters
config_pathThe path that defines the place in the hierarchy of variables, in the Config UI, that are configurable at run-time. If a class has no configurable variables, or if you simply don't want any particular variable to be configurable at run-time in your project, don't provide a config_path when you construct the class.

Definition at line 28 of file sensor.h.

Constructor & Destructor Documentation

◆ Sensor()

sensesp::Sensor::Sensor ( String  config_path = "")

Definition at line 7 of file sensor.cpp.

Member Function Documentation

◆ get_sensors()

static const std::set< Sensor * > & sensesp::Sensor::get_sensors ( )
inlinestatic

Definition at line 34 of file sensor.h.


The documentation for this class was generated from the following files: