41 lines
705 B
C++
41 lines
705 B
C++
//
|
|
// 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
|