#include <FTPManager.h>
|
| static constexpr const char * | mavlinkFTPScheme = "mftp" |
| |
| static constexpr int | kTestAckTimeoutMs = 10 |
| | Ack timeout used in unit tests (much shorter for faster tests)
|
| |
| static constexpr int | kTestOperationMaxWaitMs = 5000 |
| | Maximum wait time for FTP operations in unit tests (generous for multi-packet transfers)
|
| |
Definition at line 15 of file FTPManager.h.
◆ FTPManager()
| FTPManager::FTPManager |
( |
Vehicle * |
vehicle | ) |
|
◆ cancelDelete()
| void FTPManager::cancelDelete |
( |
| ) |
|
◆ cancelDownload()
| void FTPManager::cancelDownload |
( |
| ) |
|
◆ cancelListDirectory()
| void FTPManager::cancelListDirectory |
( |
| ) |
|
◆ cancelUpload()
| void FTPManager::cancelUpload |
( |
| ) |
|
Cancel the upload operation This will emit uploadComplete() when done, and if there's currently an upload in progress
Definition at line 236 of file FTPManager.cc.
◆ commandProgress
| void FTPManager::commandProgress |
( |
float |
value | ) |
|
|
signal |
◆ deleteComplete
| void FTPManager::deleteComplete |
( |
const QString & |
file, |
|
|
const QString & |
errorMsg |
|
) |
| |
|
signal |
◆ deleteFile()
| bool FTPManager::deleteFile |
( |
uint8_t |
fromCompId, |
|
|
const QString & |
fromURI |
|
) |
| |
Deletes a file on the vehicle.
- Parameters
-
| fromCompId | Component id of the component to delete from. If fromCompId is MAV_COMP_ID_ALL, then MAV_COMP_ID_AUTOPILOT1 is used. |
| fromURI | File path to delete on the component. May include mftp:// scheme and optional component id selector. |
- Returns
- true: process has started, false: error Signals deleteComplete
Definition at line 172 of file FTPManager.cc.
◆ download()
| bool FTPManager::download |
( |
uint8_t |
fromCompId, |
|
|
const QString & |
fromURI, |
|
|
const QString & |
toDir, |
|
|
const QString & |
fileName = "", |
|
|
bool |
checksize = true |
|
) |
| |
Downloads the specified file.
- Parameters
-
| fromCompId | Component id of the component to download from. If fromCompId is MAV_COMP_ID_ALL, then MAV_COMP_ID_AUTOPILOT1 is used. |
| fromURI | File to download from component, fully qualified path. May be in the format "mftp://[;comp=<id>]..." where the component id is specified. If component id is not specified, then the id set via fromCompId is used. |
| toDir | Local directory to download file to |
| filename | (optional) |
| checksize | (optional, default true) If true compare the filesize indicated in the open response with the transmitted filesize. If false the transmission is tftp style and the indicated filesize from MAVFTP fileopen response is ignored. This is used for the APM parameter download where the filesize is wrong due to a dynamic file creation on the vehicle. |
- Returns
- true: download has started, false: error, no download Signals downloadComplete, commandProgress
Definition at line 29 of file FTPManager.cc.
Referenced by ParameterManager::refreshAllParameters().
◆ downloadComplete
| void FTPManager::downloadComplete |
( |
const QString & |
file, |
|
|
const QString & |
errorMsg |
|
) |
| |
|
signal |
◆ listDirectory()
| bool FTPManager::listDirectory |
( |
uint8_t |
fromCompId, |
|
|
const QString & |
fromURI |
|
) |
| |
Get the directory listing of the specified directory.
- Parameters
-
| fromCompId | Component id of the component to download from. If fromCompId is MAV_COMP_ID_ALL, then MAV_COMP_ID_AUTOPILOT1 is used. |
| fromURI | Directory path to list from component. May be in the format "mftp://[;comp=<id>]..." where the component id is specified. If component id is not specified, then the id set via fromCompId is used. |
- Returns
- true: process has started, false: error Signals listDirectoryComplete
Definition at line 141 of file FTPManager.cc.
◆ listDirectoryComplete
| void FTPManager::listDirectoryComplete |
( |
const QStringList & |
dirList, |
|
|
const QString & |
errorMsg |
|
) |
| |
|
signal |
◆ upload()
| bool FTPManager::upload |
( |
uint8_t |
toCompId, |
|
|
const QString & |
toURI, |
|
|
const QString & |
fromFile |
|
) |
| |
Uploads a local file to the specified URI on the vehicle.
- Parameters
-
| toCompId | Component id of the component to upload to. If toCompId is MAV_COMP_ID_ALL, then MAV_COMP_ID_AUTOPILOT1 is used. |
| toURI | Destination file path on the vehicle, fully qualified. May include mftp:// scheme and optional component id selector. |
| fromFile | Local filesystem path of the file to upload. |
- Returns
- true: upload started, false: error, no upload Signals uploadComplete, commandProgress
Definition at line 84 of file FTPManager.cc.
◆ uploadComplete
| void FTPManager::uploadComplete |
( |
const QString & |
file, |
|
|
const QString & |
errorMsg |
|
) |
| |
|
signal |
◆ Vehicle
◆ kTestAckTimeoutMs
| constexpr int FTPManager::kTestAckTimeoutMs = 10 |
|
staticconstexpr |
Ack timeout used in unit tests (much shorter for faster tests)
Definition at line 262 of file FTPManager.h.
◆ kTestOperationMaxWaitMs
| constexpr int FTPManager::kTestOperationMaxWaitMs = 5000 |
|
staticconstexpr |
Maximum wait time for FTP operations in unit tests (generous for multi-packet transfers)
Definition at line 264 of file FTPManager.h.
◆ mavlinkFTPScheme
| constexpr const char* FTPManager::mavlinkFTPScheme = "mftp" |
|
staticconstexpr |
The documentation for this class was generated from the following files: