FtpServer

class mavsdk.ftp_server.FtpServer(async_plugin_manager)

Bases: AsyncBase

Provide files or directories to transfer.

Generated by dcsdkgen - MAVSDK FtpServer API

name = 'FtpServer'
async set_root_dir(path)

Set root directory.

This is the directory that can then be accessed by a client. The directory needs to exist when this is called. The permissions are the same as the file permission for the user running the server. The root directory can’t be changed while an FTP process is in progress.

Parameters:

path (std::string) – Absolute path of folder

Raises:

FtpServerError – If the request fails. The error contains the reason for the failure.

exception mavsdk.ftp_server.FtpServerError(result, origin, *params)

Bases: Exception

Raised when a FtpServerResult is a fail code

class mavsdk.ftp_server.FtpServerResult(result, result_str)

Bases: object

Result type.

Parameters:
  • result (Result) – Result enum value

  • result_str (std::string) – Human-readable English string describing the result

class Result(value)

Bases: Enum

Possible results returned for FTP server requests.

Values

UNKNOWN

Unknown result

SUCCESS

Request succeeded

DOES_NOT_EXIST

Directory does not exist

BUSY

Operations in progress

BUSY = 3
DOES_NOT_EXIST = 2
SUCCESS = 1
UNKNOWN = 0