FromSuperBrain.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef FROMSUPERBRAIN_H
  2. #define FROMSUPERBRAIN_H
  3. #include <string>
  4. #include "spdlog/spdlog.h"
  5. struct AlgorithmInfo;
  6. struct DeviceInfo;
  7. class FromSuperBrain
  8. {
  9. public:
  10. FromSuperBrain();
  11. ~FromSuperBrain();
  12. /* 获取token */
  13. bool getToken();
  14. /* 获取算法列表 */
  15. bool getTaskTypeList(std::vector<AlgorithmInfo>& vecInfo);
  16. /* 获取设备列表信息 */
  17. bool getDeviceList(std::vector<DeviceInfo>& vecInfo);
  18. /* 图片识别 */
  19. bool imageRecognition();
  20. private:
  21. std::shared_ptr<spdlog::logger> m_logger = nullptr;
  22. std::string m_url;
  23. std::string m_username;
  24. std::string m_password;
  25. std::string m_appKey; /* 授权码 */
  26. std::string m_appSecret; /* 授权码 */
  27. std::string m_token; /* token */
  28. const std::string m_tokenPath = "/external/broadcastToken"; /* 获取token数据 */
  29. const std::string m_taskTypeListPath = "/external/getTaskTypeList"; /* 获取任务类型数据 */
  30. const std::string m_deviceListPath = "/external/getBaseDeviceList"; /* 获取设备列表数据 */
  31. const std::string m_imageRecognitionPath = "/external/imageIdentify"; /* 图片识别 */
  32. };
  33. #endif /* FROMSUPERBRAIN_H */