#ifndef CLIENT_H #define CLIENT_H #define CPPHTTPLIB_OPENSSL_SUPPORT #include #include #include #include #include #include #include using namespace std; class FanClass // 风机类 { public: int errorCode; int fanId; double angle; // 角度 double distance; // 相对距离 QString errorInfo; QString fanCode; QString flangeState; QString headroomState; QString gyroState; }; class FanManage // 所有风机管理类 { public: std::map allFans; // 所有风机 std::vector interruptedFans; // 通讯中断 std::vector standbyFans; // 待机等风 std::vector normalFans; // 正常运行 std::vector hutdownFans; // 停机维护 std::vector failureFans; // 故障停机 std::vector runFans; // 启动 }; class HTTPClient { private: httplib::Headers header; string loginIndex; string fanListIndex; string headroomDetailIndex; string gyroDetailIndex; string featureHistoryIndex; public: httplib::Client client; HTTPClient(); FanManage getFanList(); QString getFlangeList(int fanId); QString getHeadroomList(int fanId); QString getGyroList(int fanId); QString getHistoryList(int fanId); }; extern HTTPClient httpClient; #endif // CLIENT_H