| 61 | } |
| 62 | |
| 63 | MaaTaskId RemoteTasker::post_recognition(const std::string& reco_type, const json::value& reco_param, const cv::Mat& image) |
| 64 | { |
| 65 | TaskerPostRecognitionReverseRequest req { |
| 66 | .tasker_id = tasker_id_, |
| 67 | .reco_type = reco_type, |
| 68 | .reco_param = reco_param, |
| 69 | .image = server_.send_image(image), |
| 70 | }; |
| 71 | |
| 72 | auto resp_opt = server_.send_and_recv<TaskerPostRecognitionReverseResponse>(req); |
| 73 | if (!resp_opt) { |
| 74 | return MaaInvalidId; |
| 75 | } |
| 76 | |
| 77 | return resp_opt->task_id; |
| 78 | } |
| 79 | |
| 80 | MaaTaskId RemoteTasker::post_action( |
| 81 | const std::string& action_type, |
no test coverage detected