FTP Request message abstraction class. More...
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 () |
PayloadHeader * | header () |
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' |
FTP Request message abstraction class.