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

Server streaming response type for the SubscribeMissionProgress method.

Required methods

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.

Cancel an ongoing mission upload.

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.

Cancel an ongoing mission download.

Start the mission.

A mission must be uploaded to the vehicle before this can be called.

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.

Clear the mission saved on the vehicle.

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.

Check if the mission has been finished.

Subscribe to mission progress updates.

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.

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.

Import a QGroundControl (QGC) mission plan.

The method will fail if any of the imported mission items are not supported by the MAVSDK API.

Implementors