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 { kErrNone, kErrFail, kErrFailErrno, kErrInvalidDataSize, kErrInvalidSession, kErrNoSessionsAvailable, kErrEOF, kErrUnknownCommand } |
Error codes returned in Nak response. More... | |
enum | Opcode { kCmdNone, kCmdTerminateSession, kCmdResetSessions, kCmdListDirectory, kCmdOpenFileRO, kCmdReadFile, kCmdCreateFile, kCmdWriteFile, kCmdRemoveFile, kCmdCreateDirectory, kCmdRemoveDirectory, kCmdOpenFileWO, kCmdTruncateFile, kCmdRename, kCmdCalcFileCRC32, 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 () |
PayloadHeader * | header () |
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' |
FTP Request message abstraction class.