rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
sensors
core
functional_sensor_impl.h
Go to the documentation of this file.
1
//
2
// Created by kifir on 12/20/24.
3
//
4
5
#pragma once
6
7
#include "
functional_sensor_base.h
"
8
9
template
<
class
ConverterType>
10
class
FunctionalSensorImpl
:
public
FunctionalSensorBase
{
11
public
:
12
FunctionalSensorImpl
(
SensorType
type
,
efidur_t
timeoutPeriod);
13
14
void
postRawValue
(
float
inputValue, efitick_t timestamp)
override
;
15
16
void
setFunction
(ConverterType& func);
17
18
ConverterType*
getFunction
()
const
;
19
20
float
getRaw
()
const
override
final
;
21
private
:
22
// Conversion function for this sensor
23
ConverterType*
m_function
=
nullptr
;
24
25
float
m_rawValue
= 0;
26
};
27
28
#include "
functional_sensor_impl.hpp
"
FunctionalSensorBase
Definition
functional_sensor_base.h:9
FunctionalSensorImpl
Definition
functional_sensor_impl.h:10
FunctionalSensorImpl::getFunction
ConverterType * getFunction() const
Definition
functional_sensor_impl.hpp:12
FunctionalSensorImpl::m_rawValue
float m_rawValue
Definition
functional_sensor_impl.h:25
FunctionalSensorImpl::setFunction
void setFunction(ConverterType &func)
Definition
functional_sensor_impl.hpp:7
FunctionalSensorImpl::getRaw
float getRaw() const override final
Definition
functional_sensor_impl.hpp:17
FunctionalSensorImpl::postRawValue
void postRawValue(float inputValue, efitick_t timestamp) override
Definition
functional_sensor_impl.hpp:22
FunctionalSensorImpl::m_function
ConverterType * m_function
Definition
functional_sensor_impl.h:23
Sensor::type
SensorType type() const
Definition
sensor.h:162
functional_sensor_base.h
functional_sensor_impl.hpp
efidur_t
efitick_t efidur_t
Definition
rusefi_types.h:42
SensorType
SensorType
Definition
sensor_type.h:18
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8