#ifndef ConfigBase_H_ #define ConfigBase_H_ #include #define CONFIGBASE_VERSION 4 enum CONFIG_TYPE_ { ConfigType_Analysisy_Common_XL, ConfigType_Check_XL, ConfigType_Image_In, ConfigType_Image_out, ConfigType_BloB, ConfigType_Count, }; struct ImageInfo { int width; int height; int channels; ImageInfo() { width = 0; height = 0; channels = 0; } void copy(ImageInfo tem) { this->width = tem.width; this->height = tem.height; this->channels = tem.channels; } void print(std::string str) { printf("%s width=%d height=%d channels=%d\n", str.c_str(), width, height, channels); } }; class ConfigBase { protected: ConfigBase() {} public: // delete camera interface ~ConfigBase() {} static ConfigBase *GetInstance(); // 获取参数更新状态 true 有更新 virtual bool GetConfigUpdataStatus(int nConfigType, int nidx) = 0; // 复制想使用的参数 virtual int GetConfig(int nConfigType, void *pconfig) = 0; // 更新参数 pconfig 参数指针,nConfigType 需要更新的参数类型 返回:0 成功 其他异常 virtual int UpdateConfig(void *pconfig, int nConfigType) = 0; virtual int UpdateJSONConfig(void *pconfig, int nConfigType) = 0; // 返回检测版本信息 virtual std::string GetVersion() = 0; // 返回错误信息 virtual std::string GetErrorInfo() = 0; }; #endif