#pragma once /****************************************************** * 文件名 : SensorMannager.h * 类名 : * 作用 : * 作者 : xin * 邮箱 : renlixin@iris-rs.cn * 日期 : 2021-2-22 ******************************************************** * * * _ooOoo_ * * o8888888o * * 88" . "88 * * (| -_- |) * * O\ = /O * * ____/`---'\____ * * .' \\| |// `. * * / \\||| : |||// \ * * / _||||| -:- |||||- \ * * | | \\\ - /// | | * * | \_| ''\---/'' | | * * \ .-\__ `-` ___/-. / * * ___`. .' /--.--\ `. . __ * * ."" '< `.___\_<|>_/___.' >'"". * * | | : `- \`.;`\ _ /`;.`/ - ` : | | * * \ \ `-. \_ __\ /__ _/ .-` / / * * ======`-.____`-.___\_____/___.-`____.-'====== * * `=---=' * * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * * 佛祖保佑 长发永存 * * * ********************************************************/ #include #include "SensorBase.h" enum SensorType { QESENSOR = 1, }; class SensorMannager : public QObject { Q_OBJECT public: SensorMannager(QObject *parent=0 ); ~SensorMannager(); SensorBase *Sensor; //************************************ // Method: SensorOpt 自动优化 其中persent为默认优化到的目标 0到100 默认是100 // FullName: SensorMannager::SensorOpt // Access: public // Returns: void // Qualifier: // Parameter: int persent //************************************ void opensensor(); void CloseSensor(); long SensorOpt(int persent=100); long Getmaxvalue(float *arr, int start, int lenth); void SetnumbertoGot(int nscan); void GetSifData(QString outfilepath,bool isskyfirs = true); private: int Numberofscan; void writeonedatatoCSV(FILE *fp, STROnePlot plot); void WriteTitletoCSV(FILE *fp,QString sensname, int NmberofScan, float temp, QString wavestring, float skyshutter, float vegshutter); };