Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
mavros::std_plugins::FTPRequest Class Reference

FTP Request message abstraction class. More...

Inheritance diagram for mavros::std_plugins::FTPRequest:
Inheritance graph
[legend]

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 : uint8_t {
  kErrNone, kErrFail, kErrFailErrno, kErrInvalidDataSize,
  kErrInvalidSession, kErrNoSessionsAvailable, kErrEOF, kErrUnknownCommand,
  kErrFailFileExists, kErrFailFileProtected
}
 Error codes returned in Nak response. More...
 
enum  Opcode : uint8_t {
  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_valid (UAS *uas)
 Decode and check target system. More...
 
 FTPRequest ()
 
 FTPRequest (Opcode op, uint8_t session=0)
 
uint8_t get_target_system_id ()
 
PayloadHeaderheader ()
 
uint8_t * raw_payload ()
 
void send (UAS *uas, uint16_t seqNumber)
 Encode and send message. More...
 
void set_data_string (std::string &s)
 Copy string to payload. More...
 

Static Public Attributes

static const uint8_t DATA_MAXSZ = 251 - sizeof(PayloadHeader)
 payload.size() - header bytes More...
 
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 48 of file ftp.cpp.


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


mavros
Author(s): Vladimir Ermakov
autogenerated on Mon Jul 8 2019 03:20:11