testArduino/mission/Controller/ArduinoTCSTemperatureSensor.h

45 lines
1.3 KiB
C++

#ifndef ARDUINOTCSTEMPERATURESENSOR_H_
#define ARDUINOTCSTEMPERATURESENSOR_H_
#include <fsfw/datapool/DataSet.h>
//#include <fsfw/datapool/PoolVariable.h>
//#include <fsfw/datapool/PoolVariableIF.h>
#include <fsfw/thermal/AbstractTemperatureSensor.h>
#include <fsfw/thermal/ThermalModuleIF.h>
class ArduinoTCSTemperatureSensor: public AbstractTemperatureSensor {
public:
struct Parameters {
float lowerLimit;
float upperLimit;
};
private:
void setInvalid();
protected:
Parameters parameters;
float *inputTemperature;
PoolVariableIF *poolVariable;
PoolVariable<float> outputTemperature;
virtual float calculateOutputTemperature(float inputTemperature);
void doChildOperation() override;
public:
ArduinoTCSTemperatureSensor(object_id_t setObjectid,
float *inputTemperature, PoolVariableIF *poolVariable,
uint8_t vectorIndex, Parameters parameters, uint32_t datapoolId,
DataSet *outputSet, ThermalModuleIF *thermalModule);
virtual ~ArduinoTCSTemperatureSensor();
float getTemperature() override;
bool isValid() override;
virtual void resetOldState() override;
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) override;
};
#endif /* ARDUINOTCSTEMPERATURESENSOR_H_ */