12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef FROMSUPERBRAIN_H
- #define FROMSUPERBRAIN_H
- #include <string>
- #include "spdlog/spdlog.h"
- struct AlgorithmInfo;
- struct DeviceInfo;
- class FromSuperBrain
- {
- public:
- FromSuperBrain();
- ~FromSuperBrain();
- /* 初始化地址信息 */
- void initSuperBrain(const std::string& url, const std::string& appKey, const std::string& appSecret);
- /* 获取token */
- bool getToken();
- /* 获取算法列表 */
- bool getTaskTypeList(std::vector<AlgorithmInfo>& vecInfo);
- /* 获取设备列表信息 */
- bool getDeviceList(std::vector<DeviceInfo>& vecInfo);
- /* 图片识别 */
- bool imageRecognition();
- private:
- std::shared_ptr<spdlog::logger> m_logger = nullptr;
- std::string m_url;
- std::string m_username;
- std::string m_password;
- std::string m_appKey; /* 授权码 */
- std::string m_appSecret; /* 授权码 */
- std::string m_token; /* token */
- const std::string m_tokenPath = "/external/broadcastToken"; /* 获取token数据 */
- const std::string m_taskTypeListPath = "/external/getTaskTypeList"; /* 获取任务类型数据 */
- const std::string m_deviceListPath = "/external/getBaseDeviceList"; /* 获取设备列表数据 */
- const std::string m_imageRecognitionPath = "/external/imageIdentify"; /* 图片识别 */
- };
- #endif /* FROMSUPERBRAIN_H */
|