Trait mav_sdk::grpc::mission::MissionService [−][src]
pub trait MissionService: Send + Sync + 'static {
type SubscribeMissionProgressStream: Stream<Item = Result<MissionProgressResponse, Status>> + Send + Sync + 'static;
Show 13 methods
fn upload_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<UploadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<UploadMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn cancel_mission_upload<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionUploadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionUploadResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn download_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<DownloadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<DownloadMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn cancel_mission_download<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionDownloadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionDownloadResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn start_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<StartMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<StartMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn pause_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<PauseMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<PauseMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn clear_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ClearMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn set_current_mission_item<'life0, 'async_trait>(
&'life0 self,
request: Request<SetCurrentMissionItemRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetCurrentMissionItemResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn is_mission_finished<'life0, 'async_trait>(
&'life0 self,
request: Request<IsMissionFinishedRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<IsMissionFinishedResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn subscribe_mission_progress<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeMissionProgressRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeMissionProgressStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<GetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn set_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<SetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn import_qgroundcontrol_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ImportQgroundcontrolMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ImportQgroundcontrolMissionResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with MissionServiceServer.
Associated Types
type SubscribeMissionProgressStream: Stream<Item = Result<MissionProgressResponse, Status>> + Send + Sync + 'static
type SubscribeMissionProgressStream: Stream<Item = Result<MissionProgressResponse, Status>> + Send + Sync + 'static
Server streaming response type for the SubscribeMissionProgress method.
Required methods
fn upload_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<UploadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<UploadMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn upload_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<UploadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<UploadMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Upload a list of mission items to the system.
The mission items are uploaded to a drone. Once uploaded the mission can be started and executed even if the connection is lost.
fn cancel_mission_upload<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionUploadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionUploadResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn cancel_mission_upload<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionUploadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionUploadResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Cancel an ongoing mission upload.
fn download_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<DownloadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<DownloadMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn download_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<DownloadMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<DownloadMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Download a list of mission items from the system (asynchronous).
Will fail if any of the downloaded mission items are not supported by the MAVSDK API.
fn cancel_mission_download<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionDownloadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionDownloadResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn cancel_mission_download<'life0, 'async_trait>(
&'life0 self,
request: Request<CancelMissionDownloadRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<CancelMissionDownloadResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Cancel an ongoing mission download.
fn start_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<StartMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<StartMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn start_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<StartMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<StartMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Start the mission.
A mission must be uploaded to the vehicle before this can be called.
fn pause_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<PauseMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<PauseMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn pause_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<PauseMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<PauseMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Pause the mission.
Pausing the mission puts the vehicle into HOLD mode. A multicopter should just hover at the spot while a fixedwing vehicle should loiter around the location where it paused.
fn clear_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ClearMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn clear_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ClearMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Clear the mission saved on the vehicle.
fn set_current_mission_item<'life0, 'async_trait>(
&'life0 self,
request: Request<SetCurrentMissionItemRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetCurrentMissionItemResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn set_current_mission_item<'life0, 'async_trait>(
&'life0 self,
request: Request<SetCurrentMissionItemRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetCurrentMissionItemResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Sets the mission item index to go to.
By setting the current index to 0, the mission is restarted from the beginning. If it is set to a specific index of a mission item, the mission will be set to this item.
Note that this is not necessarily true for general missions using MAVLink if loop counters are used.
fn is_mission_finished<'life0, 'async_trait>(
&'life0 self,
request: Request<IsMissionFinishedRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<IsMissionFinishedResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn is_mission_finished<'life0, 'async_trait>(
&'life0 self,
request: Request<IsMissionFinishedRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<IsMissionFinishedResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Check if the mission has been finished.
fn subscribe_mission_progress<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeMissionProgressRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeMissionProgressStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_mission_progress<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscribeMissionProgressRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeMissionProgressStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Subscribe to mission progress updates.
fn get_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<GetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<GetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Get whether to trigger Return-to-Launch (RTL) after mission is complete.
Before getting this option, it needs to be set, or a mission needs to be downloaded.
fn set_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<SetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn set_return_to_launch_after_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<SetReturnToLaunchAfterMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<SetReturnToLaunchAfterMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Set whether to trigger Return-to-Launch (RTL) after the mission is complete.
This will only take effect for the next mission upload, meaning that the mission may have to be uploaded again.
fn import_qgroundcontrol_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ImportQgroundcontrolMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ImportQgroundcontrolMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn import_qgroundcontrol_mission<'life0, 'async_trait>(
&'life0 self,
request: Request<ImportQgroundcontrolMissionRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ImportQgroundcontrolMissionResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Import a QGroundControl (QGC) mission plan.
The method will fail if any of the imported mission items are not supported by the MAVSDK API.