| 249 | } |
| 250 | |
| 251 | bool QPilotOSMachine::tcp_recv(const std::string& ip, const unsigned short& port, const string& task_id, std::string& resp) |
| 252 | { |
| 253 | TCPClient tcp_client; |
| 254 | |
| 255 | tcp_client.init(ip.c_str(), port + 1, task_id); |
| 256 | tcp_client.send_data(task_id, TCPMsg::TcpMsgType::TASK_ID_MSG); |
| 257 | tcp_client.run_heart_thread(); |
| 258 | |
| 259 | const bool b_recv_result_ok = tcp_client.wait_recv_task_result(resp, task_id); |
| 260 | tcp_client.stop_heart_thread(); |
| 261 | return b_recv_result_ok; |
| 262 | } |
| 263 | |
| 264 | PilotQVM::ErrorCode QPilotOSMachine::parser_probability_result(const std::string& json_msg, std::vector<std::map<std::string, double>>& result) |
| 265 | { |
no test coverage detected