Classes | Public Types | Public Member Functions | Static Public Attributes
mavplugin::FTPRequest Class Reference

FTP Request message abstraction class. More...

List of all members.

Classes

struct  PayloadHeader
 This is the payload which is in mavlink_file_transfer_protocol_t.payload. We pad the structure ourselves to 32 bit alignment to avoid usage of any pack pragmas. More...

Public Types

enum  ErrorCode {
  kErrNone, kErrFail, kErrFailErrno, kErrInvalidDataSize,
  kErrInvalidSession, kErrNoSessionsAvailable, kErrEOF, kErrUnknownCommand,
  kErrFailFileExists, kErrFailFileProtected
}
 Error codes returned in Nak response. More...
enum  Opcode {
  kCmdNone, kCmdTerminateSession, kCmdResetSessions, kCmdListDirectory,
  kCmdOpenFileRO, kCmdReadFile, kCmdCreateFile, kCmdWriteFile,
  kCmdRemoveFile, kCmdCreateDirectory, kCmdRemoveDirectory, kCmdOpenFileWO,
  kCmdTruncateFile, kCmdRename, kCmdCalcFileCRC32, kCmdBurstReadFile,
  kRspAck = 128, kRspNak
}
 Command opcodes. More...

Public Member Functions

uint8_t * data ()
char * data_c ()
uint32_t * data_u32 ()
bool decode (UAS *uas, const mavlink_message_t *msg)
 Decode and check target system.
 FTPRequest ()
uint8_t get_target_system_id ()
PayloadHeaderheader ()
uint8_t * raw_payload ()
void send (UAS *uas, uint16_t seqNumber)
 Encode and send message.
void set_data_string (std::string &s)
 Copy string to payload.

Static Public Attributes

static const uint8_t DATA_MAXSZ = MAVLINK_MSG_FILE_TRANSFER_PROTOCOL_FIELD_PAYLOAD_LEN - sizeof(PayloadHeader)
static const char DIRENT_DIR = 'D'
static const char DIRENT_FILE = 'F'
static const char DIRENT_SKIP = 'S'

Detailed Description

FTP Request message abstraction class.

Note:
This class not portable, and works on little-endian machines only.

Definition at line 53 of file ftp.cpp.


The documentation for this class was generated from the following file:


mavros
Author(s): Vladimir Ermakov
autogenerated on Sat Jun 8 2019 19:55:20