1、添加配置文件读、写、解析类Configfile(使用libconfig.h++);
2、打开相机时,通过Configfile读取和解析配置文件,并使用; 3、修复一些代码逻辑bug;
This commit is contained in:
40
Header_Files/configfile.h
Normal file
40
Header_Files/configfile.h
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// Created by tangchao on 2022/6/28.
|
||||
//
|
||||
|
||||
#ifndef XIMEAIMAGERECORDER_CONFIGFILE_H
|
||||
#define XIMEAIMAGERECORDER_CONFIGFILE_H
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <cstdlib>
|
||||
#include <libconfig.h++>
|
||||
|
||||
using namespace std;
|
||||
using namespace libconfig;
|
||||
|
||||
class Configfile
|
||||
{
|
||||
|
||||
public:
|
||||
Configfile();
|
||||
void setConfigfilePath(string configfilePath);
|
||||
int parseConfigfile();
|
||||
|
||||
bool getBin(int &bin);
|
||||
bool getEffectiveWindow(int &width, int &offsetx, int &height, int &offsety);
|
||||
bool getGainOffset(float &gain, float &offset);
|
||||
|
||||
int createConfigFile();
|
||||
int updateConfigFile();
|
||||
|
||||
private:
|
||||
string m_configfilePath;
|
||||
Config cfg;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //XIMEAIMAGERECORDER_CONFIGFILE_H
|
Reference in New Issue
Block a user