Files
HPPA/HPPA/DepthValueLogger.h
tangchao0503 abdb27b228 add,计划采集18,上海农科院3D植物表型:
1、任务类型ObtainingDepthInformation兼容功能:获取植被和升降台的平均深度信息并写入文件:3DPlantPhenotypeScenario\plant_depth_values.txt和3DPlantPhenotypeScenario\LiftingPlatform_depth_values.txt
2026-08-11 17:27:18 +08:00

42 lines
986 B
C++

#ifndef DEPTH_VALUE_LOGGER_H
#define DEPTH_VALUE_LOGGER_H
#include <QObject>
#include <QString>
enum class DepthValueType
{
Plant,
LiftingPlatform
};
class DepthValueLogger : public QObject
{
Q_OBJECT
public:
static DepthValueLogger& instance();
void appendDepthValue(double depthValue, DepthValueType type);
double readLatestDepthValue(DepthValueType type) const;
bool hasValidDepthValue(DepthValueType type) const;
void appendPlantDepthValue(double depthValue);
void appendLiftingPlatformDepthValue(double depthValue);
double readLatestPlantDepthValue() const;
double readLatestLiftingPlatformDepthValue() const;
signals:
void depthValueLogged(double value, DepthValueType type);
private:
DepthValueLogger();
~DepthValueLogger();
DepthValueLogger(const DepthValueLogger&) = delete;
DepthValueLogger& operator=(const DepthValueLogger&) = delete;
QString getLogFilePath(DepthValueType type) const;
};
#endif