#pragma once #include #include #include #include #include #include #include "json.hpp" using json = nlohmann::json; const std::string JSONPATH ="/opt/hgscannersdk.json"; static const std::string G100JSONPATH ="/opt/G100.json"; static const std::string G200JSONPATH ="/opt/G200.json"; static const std::string G300JSONPATH ="/opt/G300.json"; static const std::string G400JSONPATH ="/opt/G400.json"; class jsonconfig { public: static json loadjson(std::string path); static json load_json_from_text(const char* json_txt); static bool savejson(std::string path,json js); static json defaultjson(); private: json loadjson(); std::string DEVICEJSONPATH; public: jsonconfig(); jsonconfig(int devnum); ~jsonconfig(); std::string getdeviceparam(unsigned param_no); };