rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
FuelLevelSensor Class Reference

#include <fuel_level_sensor.h>

Inheritance diagram for FuelLevelSensor:
Inheritance graph
[legend]
Collaboration diagram for FuelLevelSensor:
Collaboration graph
[legend]

Public Member Functions

 FuelLevelSensor (SensorType type, efidur_t timeoutPeriod)
 
void showInfo (const char *sensorName) const override
 
- Public Member Functions inherited from FunctionalSensorImpl< FuelLevelFunc >
 FunctionalSensorImpl (SensorType type, efidur_t timeoutPeriod)
 
void postRawValue (float inputValue, efitick_t timestamp) override
 
void setFunction (FuelLevelFunc &func)
 
FuelLevelFuncgetFunction () const
 
float getRaw () const override final
 
- Public Member Functions inherited from StoredValueSensor
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)
 
- Public Member Functions inherited from Sensor
bool Register ()
 
const chargetSensorName () const
 
virtual bool hasSensor () const
 
virtual bool isRedundant () const
 
void unregister ()
 
SensorType type () const
 

Private Attributes

FuelLevelFunc m_FuelLevelFunc
 

Additional Inherited Members

- Static Public Member Functions inherited from Sensor
static void showAllSensorInfo ()
 
static void showInfo (SensorType type)
 
static void resetRegistry ()
 
static const SensorgetSensorOfType (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 chargetSensorName (SensorType type)
 
- Protected Member Functions inherited from FunctionalSensorBase
 FunctionalSensorBase (SensorType type, efidur_t timeoutPeriod)
 
- Protected Member Functions inherited from Sensor
 Sensor (SensorType type)
 
- Static Protected Attributes inherited from Sensor
static bool s_inhibitSensorTimeouts = false
 

Detailed Description

Definition at line 10 of file fuel_level_sensor.h.

Constructor & Destructor Documentation

◆ FuelLevelSensor()

FuelLevelSensor::FuelLevelSensor ( SensorType  type,
efidur_t  timeoutPeriod 
)

Definition at line 9 of file fuel_level_sensor.cpp.

10 : FunctionalSensorImpl(type, timeoutPeriod) {
12}
FuelLevelFunc m_FuelLevelFunc
SensorType type() const
Definition sensor.h:162
Here is the call graph for this function:

Member Function Documentation

◆ showInfo()

void FuelLevelSensor::showInfo ( const char sensorName) const
overridevirtual

Implements Sensor.

Definition at line 36 of file sensor_info_printing.cpp.

36 {
37 const auto value = get();
38 efiPrintf("Sensor \"%s\": Raw value: %.2f Valid: %s Converted value %.2f", sensorName, getRaw(), boolToString(value.Valid), value.Value);
39}
SensorResult get() const final override
const char * boolToString(bool value)
Definition efilib.cpp:19
Here is the call graph for this function:

Field Documentation

◆ m_FuelLevelFunc

FuelLevelFunc FuelLevelSensor::m_FuelLevelFunc
private

Definition at line 16 of file fuel_level_sensor.h.

Referenced by FuelLevelSensor().


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