// // Created by Mr.V on 2024/1/26. // #ifndef TRAIN_RFID_CONFIGUTIL_H #define TRAIN_RFID_CONFIGUTIL_H #include #include #include namespace ai_matrix { struct BaseConfig { // com口名称 QString comName; // 波特率 int baud; // 股道编号 int trackName; // 磁钢顺序 QString magnetSteelOrder; // 上传识别结果标志 bool upResult; }; struct InterfaceConfig { // 接口服务器IP QString httpIp; // 接口服务器端口 int httpPort; // 获取token的方法 QString tokenPath; // 上传识别结果的方法 QString upResultPath; // 用户名 QString username; // 密码 QString password; }; }; class ConfigUtil { public: ConfigUtil(); ~ConfigUtil(); static bool readBaseConfig(const QString& configFile, QString &errorMessage, ai_matrix::BaseConfig &config); static bool readInterfaceConfig(const QString& configFile, QString &errorMessage, ai_matrix::InterfaceConfig &config); }; #endif //TRAIN_RFID_CONFIGUTIL_H