rusEFI
The most advanced open source ECU
|
#include <sensor.h>
Public Member Functions | |
bool | Register () |
virtual void | showInfo (const char *sensorName) const =0 |
const char * | getSensorName () const |
virtual SensorResult | get () const =0 |
virtual bool | hasSensor () const |
virtual float | getRaw () const |
virtual bool | isRedundant () const |
void | unregister () |
SensorType | type () const |
Static Public Member Functions | |
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) |
Protected Member Functions | |
Sensor (SensorType type) | |
Static Protected Attributes | |
static bool | s_inhibitSensorTimeouts = false |
Private Member Functions | |
constexpr size_t | getIndex () |
Static Private Member Functions | |
static constexpr size_t | getIndex (SensorType type) |
static SensorRegistryEntry * | getEntryForType (SensorType type) |
Private Attributes | |
const SensorType | m_type |
|
inlineexplicitprotected |
|
pure virtual |
Implemented in FunctionPointerSensor, LuaOverrideSensor, StoredValueSensor, GearDetector, FallbackSensor, ProxySensor, RedundantFordTps, and RedundantSensor.
Referenced by HpfpQuantity::calcPI(), canDashboardHaltech(), canMazdaRX8(), check(), NitrousController::checkLuaGauge(), EtbController::checkStatus(), WallFuelController::computeBeta(), WallFuelController::computeTau(), ThrottleModelBase::estimateThrottleFlow(), SensorReader< TSensorType >::get(), LuaOverrideSensor::get(), FallbackSensor::get(), ProxySensor::get(), RedundantFordTps::get(), RedundantSensor::get(), AcController::getAcState(), getAdvanceCorrections(), AlphaNAirmass::getAirmass(), getBaroCorrection(), BoostController::getBoostTemperatureCorrection(), getCltFuelCorrection(), getCltTimingCorrection(), ShortTermFuelTrim::getCorrectionState(), getCrankingFuel3(), InjectorModelWithConfig::getDeadtime(), InjectorModelWithConfig::getFuelDifferentialPressure(), InjectorModelWithConfig::getFuelPressure(), getIatFuelCorrection(), IdleController::getIdlePosition(), InjectorModelWithConfig::getInjectionDuration(), ClosedLoopFuelCellImpl::getLambdaError(), IFuelComputer::getLoadOverride(), MafAirmass::getMaf(), SpeedDensityAirmass::getMap(), getOrZero(), PrimeController::getPrimeDuration(), getRunningAdvance(), getSanitizedPedal(), getSensor(), BoostController::getSetpoint(), DfcoController::getState(), FanController::getState(), FuelComputer::getStoichiometricRatio(), IFuelComputer::getTCharge(), getThrottleInletPressure(), AirmassVeModelBase::getVe(), initMapDecoder(), LambdaMonitorBase::isCurrentlyGood(), Engine::isInShutdownMode(), LaunchControlBase::isInsideTpsCondition(), TransmissionControllerBase::isShiftCompleted(), kLineThread(), AlternatorController::observePlant(), BoostController::observePlant(), EtbController::observePlant(), HpfpController::onFastCallback(), EngineState::periodicFastCallback(), populateFrame(), populateFrame(), populateFrame(), TransmissionControllerBase::postState(), printMAPInfo(), readGppwmChannel(), recalculateAuxValveTiming(), TwoPinDcMotor::set(), Gm4l6xTransmissionController::set32State(), Generic4TransmissionController::setTccState(), AutomaticGearController::update(), NitrousController::updateAfrConditionSatisfied(), VvlController::updateAfrConditionSatisfied(), ShiftTorqueReductionController::updateAppConditionSatisfied(), NitrousController::updateCltConditionSatisfied(), VvlController::updateCltConditionSatisfied(), NitrousController::updateMapConditionSatisfied(), VvlController::updateMapConditionSatisfied(), NitrousController::updateRpmConditionSatisfied(), VvlController::updateRpmConditionSatisfied(), NitrousController::updateSpeedConditionSatisfied(), LimpManager::updateState(), updateTempSensors(), updateThrottles(), NitrousController::updateTpsConditionSatisfied(), VvlController::updateTpsConditionSatisfied(), and updateTunerStudioState().
|
static |
Definition at line 166 of file sensor.cpp.
|
staticprivate |
Definition at line 148 of file sensor.cpp.
Referenced by get(), getRaw(), getSensorOfType(), hasSensor(), isRedundant(), resetMockValue(), setInvalidMockValue(), setMockValue(), and showInfo().
|
inlineconstexprprivate |
Definition at line 177 of file sensor.h.
Referenced by getEntryForType(), getIndex(), Register(), and unregister().
|
inlinestaticconstexprprivate |
|
inlinestatic |
Definition at line 83 of file sensor.h.
Referenced by adjustCrankPhase(), canDashboardBmwE46(), canDashboardBmwE90(), canDashboardFiat(), canDashboardGenesisCoupe(), canDashboardHaltech(), canDashboardHondaK(), canDashboardNissanVQ(), canDashboardVAG(), canDashboardVagMqb(), canDashboardW202(), canMazdaRX8(), EtbController::checkStatus(), GearDetector::computeGearboxRatio(), configureRusefiLuaHooks(), TriggerCentral::decodeMapCam(), TriggerDecoderBase::decodeTriggerEvent(), EtbImpl< TBase >::doAutocal(), AcController::getAcState(), getBaroCorrection(), BoostController::getClosedLoopImpl(), getCrankingFuel3(), GearDetector::getDriveshaftRpm(), getFuelALSCorrection(), IdleController::getIdlePosition(), KnockController::getKnockThreshold(), ShortTermFuelTrim::getLearningState(), getLoad(), getMaxAirflowAtMap(), KnockController::getMaximumRetard(), BoostController::getOpenLoop(), getPostCrankingFuelCorrection(), getRunningAdvance(), AlternatorController::getSetpoint(), BoostController::getSetpoint(), VvtController::getSetpoint(), EtbController::getSetpointEtb(), IgnitionState::getSparkDwell(), ShiftTorqueReductionController::getSparkSkipRatio(), DfcoController::getState(), ShiftTorqueReductionController::getTorqueReductionIgnitionRetard(), TpsAccelEnrichment::getTpsEnrichment(), getVeLoadAxis(), handleGetDataRequest(), initElectronicThrottle(), initNewSensors(), AntilagSystemBase::isALSMaxCLTCondition(), AntilagSystemBase::isALSMaxThrottleIntentCondition(), AntilagSystemBase::isALSMinCLTCondition(), LambdaMonitorBase::isCurrentlyGood(), isIgnVoltage(), LaunchControlBase::isInsideSpeedCondition(), LaunchControlBase::isLaunchRpmRetardCondition(), isPrimeInjectionPulseSkipped(), isShiftTorqueBelowTemperatureThreshold(), TriggerCentral::isToothExpectedNow(), SpeedDensityAirmass::logAndGetFallback(), lua_getAirmass(), HpfpController::onFastCallback(), BoostController::onFastCallback(), VvtController::onFastCallback(), WallFuelController::onFastCallback(), KnockControllerBase::onFastCallback(), LimpManager::onFastCallback(), MapAveragingModule::onFastCallback(), TachometerModule::onFastCallback(), ThrottleModelBase::onSlowCallback(), TripOdometer::onSlowCallback(), onTdcCallback(), InjectionEvent::onTriggerTooth(), EngineState::periodicFastCallback(), Engine::periodicSlowCallback(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), populateFrame(), TriggerDecoderBase::printGaps(), printMAPInfo(), readGppwmChannel(), reportWave(), LambdaMonitorBase::restoreConditionsMet(), sendWidebandInfo(), StepperMotorBase::setInitialPosition(), speedoUpdate(), startDwellByTurningSparkPinHigh(), tdcMarkCallback(), AntilagSystemBase::update(), DynoView::update(), LaunchControlBase::update(), GenericGearController::update(), updateEgtSensors(), updateFuelSensors(), updateLambda(), updateMiscSensors(), updatePressures(), updateRawSensors(), LimpManager::updateRevLimit(), ShiftTorqueReductionController::updateRpmConditionSatisfied(), Engine::updateSlowSensors(), LimpManager::updateState(), updateThrottles(), ShiftTorqueReductionController::updateTimeConditionSatisfied(), updateTunerStudioState(), updateVehicleSpeed(), and updateVrThresholdPwm().
|
inlinevirtual |
Reimplemented in FunctionalSensorImpl< ConverterType >, FunctionalSensorImpl< FuelLevelFunc >, and FunctionalSensorImpl< SensorConverter >.
Definition at line 148 of file sensor.h.
Referenced by EtbImpl< TBase >::doAutocal(), grabPedalIsUp(), grabPedalIsWideOpen(), grapTps1PrimaryIsClosed(), grapTps1PrimaryIsOpen(), lua_getSensorRaw(), sendQcBenchRawAnalogValues(), updateRawSensors(), and updateThrottles().
|
static |
Definition at line 177 of file sensor.cpp.
|
inline |
Definition at line 130 of file sensor.h.
Referenced by check(), getSensorName(), HellaOilLevelSensor::init(), FrequencySensor::initIfValid(), AdcSubscription::PrintInfo(), FallbackSensor::showInfo(), ProxySensor::showInfo(), RedundantFordTps::showInfo(), RedundantSensor::showInfo(), and showInfo().
|
static |
|
static |
Definition at line 158 of file sensor.cpp.
Referenced by ProxySensor::isRedundant().
|
inlinevirtual |
Reimplemented in ProxySensor.
Definition at line 141 of file sensor.h.
Referenced by check(), WallFuelController::computeBeta(), GearDetector::computeGearboxRatio(), WallFuelController::computeTau(), doInitElectronicThrottle(), getBaroCorrection(), getCrankingFuel3(), InjectorModelWithConfig::getFuelDifferentialPressure(), InjectorModelWithConfig::getInjectionDuration(), MafAirmass::getMaf(), DfcoController::getState(), FuelComputer::getStoichiometricRatio(), getThrottleInletPressure(), ProxySensor::hasSensor(), EtbController::init(), initAuxValves(), initBaro(), isIgnVoltage(), lua_hasSensor(), printMAPInfo(), LimpManager::updateState(), and updateThrottles().
|
static |
Definition at line 189 of file sensor.cpp.
|
static |
Definition at line 232 of file sensor.cpp.
|
inlinevirtual |
Reimplemented in ProxySensor, RedundantFordTps, RedundantSensor, and SentTps.
Definition at line 155 of file sensor.h.
Referenced by EtbController::checkStatus(), and EtbController::init().
|
static |
Definition at line 183 of file sensor.cpp.
Referenced by ProxySensor::isRedundant().
bool Sensor::Register | ( | ) |
Definition at line 131 of file sensor.cpp.
Referenced by commonInitEngineController(), configureTempSensor(), enableTriggerStimulator(), HellaOilLevelSensor::init(), initAuxSensors(), initBaro(), initCanVssSupport(), initFlexSensor(), initFluidPressure(), initFluidPressure(), initFuelLevel(), GearDetector::initGearDetector(), FrequencySensor::initIfValid(), initLambda(), initMaf(), initMap(), initOverrideSensors(), initRangeSensors(), initSentLinearSensor(), initTps(), initVbatt(), onEcuStartDoSomethingTriggerInputPins(), and registerCanSensor().
|
static |
Definition at line 219 of file sensor.cpp.
Referenced by initSensorCli().
|
static |
Definition at line 211 of file sensor.cpp.
|
static |
Definition at line 139 of file sensor.cpp.
|
static |
Definition at line 195 of file sensor.cpp.
|
static |
Definition at line 203 of file sensor.cpp.
Referenced by initMapDecoder(), initNewSensors(), and initSensorCli().
|
static |
Definition at line 237 of file sensor.cpp.
Referenced by initSensorCli(), and printSensorInfo().
|
pure virtual |
Implemented in FunctionPointerSensor, RpmCalculator, LuaOverrideSensor, GearDetector, MapAverager, CanSensorBase, FallbackSensor, FuelLevelSensor, FunctionalSensor, ProxySensor, StoredValueSensor, FrequencySensor, Lps25Sensor, RedundantFordTps, and RedundantSensor.
Referenced by initSensorCli().
|
static |
Definition at line 247 of file sensor.cpp.
|
inline |
Definition at line 162 of file sensor.h.
Referenced by AemXSeriesWideband::acceptFrame(), get(), getEntryForType(), getIndex(), getOrZero(), getRaw(), getSensorName(), getSensorOfType(), hasSensor(), isRedundant(), AemXSeriesWideband::refreshSmoothedLambda(), AemXSeriesWideband::refreshState(), resetMockValue(), setInvalidMockValue(), setMockValue(), and showInfo().
void Sensor::unregister | ( | ) |
Definition at line 135 of file sensor.cpp.
Referenced by deinitAuxSensors(), deInitFlexSensor(), deinitTps(), onEcuStartDoSomethingTriggerInputPins(), and GearDetector::~GearDetector().
|
private |
Definition at line 174 of file sensor.h.
Referenced by getIndex(), getSensorName(), and type().
|
staticprotected |
Definition at line 171 of file sensor.h.
Referenced by StoredValueSensor::get(), and inhibitTimeouts().