Struct mav_sdk::grpc::mission::MissionServiceClient [−][src]
pub struct MissionServiceClient<T> { /* fields omitted */ }
Expand description
Enable waypoint missions.
Implementations
impl<T> MissionServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + Sync + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> MissionServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + Sync + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> MissionServiceClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn upload_mission(
&mut self,
request: impl IntoRequest<UploadMissionRequest>
) -> Result<Response<UploadMissionResponse>, Status>
pub async fn upload_mission(
&mut self,
request: impl IntoRequest<UploadMissionRequest>
) -> Result<Response<UploadMissionResponse>, Status>
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.
pub async fn cancel_mission_upload(
&mut self,
request: impl IntoRequest<CancelMissionUploadRequest>
) -> Result<Response<CancelMissionUploadResponse>, Status>
pub async fn cancel_mission_upload(
&mut self,
request: impl IntoRequest<CancelMissionUploadRequest>
) -> Result<Response<CancelMissionUploadResponse>, Status>
Cancel an ongoing mission upload.
pub async fn download_mission(
&mut self,
request: impl IntoRequest<DownloadMissionRequest>
) -> Result<Response<DownloadMissionResponse>, Status>
pub async fn download_mission(
&mut self,
request: impl IntoRequest<DownloadMissionRequest>
) -> Result<Response<DownloadMissionResponse>, Status>
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.
pub async fn cancel_mission_download(
&mut self,
request: impl IntoRequest<CancelMissionDownloadRequest>
) -> Result<Response<CancelMissionDownloadResponse>, Status>
pub async fn cancel_mission_download(
&mut self,
request: impl IntoRequest<CancelMissionDownloadRequest>
) -> Result<Response<CancelMissionDownloadResponse>, Status>
Cancel an ongoing mission download.
pub async fn start_mission(
&mut self,
request: impl IntoRequest<StartMissionRequest>
) -> Result<Response<StartMissionResponse>, Status>
pub async fn start_mission(
&mut self,
request: impl IntoRequest<StartMissionRequest>
) -> Result<Response<StartMissionResponse>, Status>
Start the mission.
A mission must be uploaded to the vehicle before this can be called.
pub async fn pause_mission(
&mut self,
request: impl IntoRequest<PauseMissionRequest>
) -> Result<Response<PauseMissionResponse>, Status>
pub async fn pause_mission(
&mut self,
request: impl IntoRequest<PauseMissionRequest>
) -> Result<Response<PauseMissionResponse>, Status>
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.
pub async fn clear_mission(
&mut self,
request: impl IntoRequest<ClearMissionRequest>
) -> Result<Response<ClearMissionResponse>, Status>
pub async fn clear_mission(
&mut self,
request: impl IntoRequest<ClearMissionRequest>
) -> Result<Response<ClearMissionResponse>, Status>
Clear the mission saved on the vehicle.
pub async fn set_current_mission_item(
&mut self,
request: impl IntoRequest<SetCurrentMissionItemRequest>
) -> Result<Response<SetCurrentMissionItemResponse>, Status>
pub async fn set_current_mission_item(
&mut self,
request: impl IntoRequest<SetCurrentMissionItemRequest>
) -> Result<Response<SetCurrentMissionItemResponse>, Status>
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.
pub async fn is_mission_finished(
&mut self,
request: impl IntoRequest<IsMissionFinishedRequest>
) -> Result<Response<IsMissionFinishedResponse>, Status>
pub async fn is_mission_finished(
&mut self,
request: impl IntoRequest<IsMissionFinishedRequest>
) -> Result<Response<IsMissionFinishedResponse>, Status>
Check if the mission has been finished.
pub async fn subscribe_mission_progress(
&mut self,
request: impl IntoRequest<SubscribeMissionProgressRequest>
) -> Result<Response<Streaming<MissionProgressResponse>>, Status>
pub async fn subscribe_mission_progress(
&mut self,
request: impl IntoRequest<SubscribeMissionProgressRequest>
) -> Result<Response<Streaming<MissionProgressResponse>>, Status>
Subscribe to mission progress updates.
pub async fn get_return_to_launch_after_mission(
&mut self,
request: impl IntoRequest<GetReturnToLaunchAfterMissionRequest>
) -> Result<Response<GetReturnToLaunchAfterMissionResponse>, Status>
pub async fn get_return_to_launch_after_mission(
&mut self,
request: impl IntoRequest<GetReturnToLaunchAfterMissionRequest>
) -> Result<Response<GetReturnToLaunchAfterMissionResponse>, Status>
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.
pub async fn set_return_to_launch_after_mission(
&mut self,
request: impl IntoRequest<SetReturnToLaunchAfterMissionRequest>
) -> Result<Response<SetReturnToLaunchAfterMissionResponse>, Status>
pub async fn set_return_to_launch_after_mission(
&mut self,
request: impl IntoRequest<SetReturnToLaunchAfterMissionRequest>
) -> Result<Response<SetReturnToLaunchAfterMissionResponse>, Status>
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.
pub async fn import_qgroundcontrol_mission(
&mut self,
request: impl IntoRequest<ImportQgroundcontrolMissionRequest>
) -> Result<Response<ImportQgroundcontrolMissionResponse>, Status>
pub async fn import_qgroundcontrol_mission(
&mut self,
request: impl IntoRequest<ImportQgroundcontrolMissionRequest>
) -> Result<Response<ImportQgroundcontrolMissionResponse>, Status>
Import a QGroundControl (QGC) mission plan.
The method will fail if any of the imported mission items are not supported by the MAVSDK API.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for MissionServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for MissionServiceClient<T> where
T: Send,
impl<T> Sync for MissionServiceClient<T> where
T: Sync,
impl<T> Unpin for MissionServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for MissionServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request