You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# ifndef ConfigInstance_H_
# define ConfigInstance_H_
# include "JsonCoversion.h"
# include <stdio.h>
# include <mutex>
# include <string.h>
# include <thread>
# include "ConfigBase.h"
# include "Define.h"
# include "JsonConfig.h"
# include "CheckConfigDefine.h"
class ConfigInstance : public ConfigBase
{
public :
ConfigInstance ( ) ;
~ ConfigInstance ( ) ;
int GetConfigIdx ( ) ;
bool GetConfigUpdataStatus ( int nConfigType , int nidx ) ;
// 获取想使用的参数
int GetConfig ( int nConfigType , void * pconfig ) ;
// 更新参数 pconfig 参数指针, nConfigType 需要更新的参数类型 返回: 0 成功 其他异常
int UpdateConfig ( void * pconfig , int nConfigType ) ;
int UpdateJSONConfig ( void * pconfig , int nConfigType ) ;
// 返回检测版本信息
std : : string GetVersion ( ) ;
// 返回错误信息
std : : string GetErrorInfo ( ) ;
private :
// updata analysis cofnig
int Updata_analysis ( Json : : Value json_value ) ;
int Updata_Check ( Json : : Value json_value ) ;
// 设置 参数更新状态
int SetStatus ( int nConfigType ) ;
// 成员变量
private :
int m_ErrorValue ; // 错误代码
std : : mutex mutex_status ;
bool m_USER_ConfigUpdataStatusList [ ConfigType_Count ] [ MAX_USER_COUNT ] ;
AnalysisyConfigST m_AnalysisyConfig ;
CheckConfigST m_CheckConfig ;
std : : mutex mtx_GetIdx ; //
int m_nCurIdx ;
} ;
# endif