rusEFI
The most advanced open source ECU
|
Class for sensors that convert from some raw floating point value (ex: voltage, frequency, pulse width) to a sensor reading. More...
#include <functional_sensor.h>
Public Member Functions | |
FunctionalSensor (SensorType type, efidur_t timeoutPeriod) | |
void | showInfo (const char *sensorName) const override |
![]() | |
FunctionalSensorImpl (SensorType type, efidur_t timeoutPeriod) | |
void | postRawValue (float inputValue, efitick_t timestamp) override |
void | setFunction (SensorConverter &func) |
SensorConverter * | getFunction () const |
float | getRaw () const override final |
![]() | |
SensorResult | get () const final override |
StoredValueSensor (SensorType type, efidur_t timeoutNt) | |
void | invalidate () |
void | invalidate (UnexpectedCode why) |
void | setValidValue (float value, efitick_t timestamp) |
void | showInfo (const char *sensorName) const override |
virtual void | setTimeout (int timeoutMs) |
![]() | |
bool | Register () |
const char * | getSensorName () const |
virtual bool | hasSensor () const |
virtual bool | isRedundant () const |
void | unregister () |
SensorType | type () const |
Additional Inherited Members | |
![]() | |
static void | showAllSensorInfo () |
static void | showInfo (SensorType type) |
static void | resetRegistry () |
static const Sensor * | getSensorOfType (SensorType type) |
static SensorResult | get (SensorType type) |
static float | getOrZero (SensorType type) |
static float | getRaw (SensorType type) |
static bool | isRedundant (SensorType type) |
static bool | hasSensor (SensorType type) |
static void | setMockValue (SensorType type, float value, bool mockRedundant=false) |
static void | setInvalidMockValue (SensorType type) |
static void | resetMockValue (SensorType type) |
static void | resetAllMocks () |
static void | inhibitTimeouts (bool inhibit) |
static const char * | getSensorName (SensorType type) |
![]() | |
FunctionalSensorBase (SensorType type, efidur_t timeoutPeriod) | |
![]() | |
Sensor (SensorType type) | |
![]() | |
static bool | s_inhibitSensorTimeouts = false |
Class for sensors that convert from some raw floating point value (ex: voltage, frequency, pulse width) to a sensor reading.
To use this class, implement the conversion operation for your sensor as a class that inherits from SensorConverter, and implement convert to convert a raw reading from the sensor to a usable value (and valid bit).
Register an instance of the new class with an interface that provides and posts raw values so the sensor can update.
Definition at line 24 of file functional_sensor.h.
FunctionalSensor::FunctionalSensor | ( | SensorType | type, |
efidur_t | timeoutPeriod | ||
) |
Definition at line 9 of file functional_sensor.cpp.
|
overridevirtual |
Implements Sensor.
Definition at line 26 of file sensor_info_printing.cpp.