1、任务类型ObtainingDepthInformation兼容功能:获取植被和升降台的平均深度信息并写入文件:3DPlantPhenotypeScenario\plant_depth_values.txt和3DPlantPhenotypeScenario\LiftingPlatform_depth_values.txt
42 lines
986 B
C++
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
|