PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <mavlink_log_handler.h>
Public Types | |
enum | { LOG_HANDLER_IDLE, LOG_HANDLER_LISTING, LOG_HANDLER_SENDING_DATA } |
Public Member Functions | |
LogListHelper () | |
~LogListHelper () | |
bool | get_entry (int idx, uint32_t &size, uint32_t &date, char *filename=0, int filename_len=0) |
bool | open_for_transmit () |
size_t | get_log_data (uint8_t len, uint8_t *buffer) |
Static Public Member Functions | |
static void | delete_all (const char *dir) |
Public Attributes | |
int | next_entry |
int | last_entry |
int | log_count |
int | current_status |
uint16_t | current_log_index |
uint32_t | current_log_size |
uint32_t | current_log_data_offset |
uint32_t | current_log_data_remaining |
FILE * | current_log_filep |
char | current_log_filename [128] |
Private Member Functions | |
void | _init () |
bool | _get_session_date (const char *path, const char *dir, time_t &date) |
void | _scan_logs (FILE *f, const char *dir, time_t &date) |
bool | _get_log_time_size (const char *path, const char *file, time_t &date, uint32_t &size) |
Definition at line 50 of file mavlink_log_handler.h.
anonymous enum |
Enumerator | |
---|---|
LOG_HANDLER_IDLE | |
LOG_HANDLER_LISTING | |
LOG_HANDLER_SENDING_DATA |
Definition at line 65 of file mavlink_log_handler.h.
LogListHelper::LogListHelper | ( | ) |
Definition at line 335 of file mavlink_log_handler.cpp.
References _init().
LogListHelper::~LogListHelper | ( | ) |
Definition at line 350 of file mavlink_log_handler.cpp.
|
private |
Definition at line 560 of file mavlink_log_handler.cpp.
References stat_file().
Referenced by _scan_logs().
|
private |
Definition at line 502 of file mavlink_log_handler.cpp.
References stat_file().
Referenced by _init().
|
private |
Definition at line 443 of file mavlink_log_handler.cpp.
References _get_session_date(), _scan_logs(), current_log_filename, f(), kLogData, kLogRoot, kTmpData, log_count, PX4LOG_DIRECTORY, and PX4LOG_WARN.
Referenced by LogListHelper().
|
private |
Definition at line 529 of file mavlink_log_handler.cpp.
References _get_log_time_size(), log_count, and PX4LOG_REGULAR_FILE.
Referenced by _init().
|
static |
Definition at line 592 of file mavlink_log_handler.cpp.
References PX4LOG_DIRECTORY, PX4LOG_REGULAR_FILE, and PX4LOG_WARN.
Referenced by MavlinkLogHandler::_log_request_erase().
bool LogListHelper::get_entry | ( | int | idx, |
uint32_t & | size, | ||
uint32_t & | date, | ||
char * | filename = 0 , |
||
int | filename_len = 0 |
||
) |
Definition at line 359 of file mavlink_log_handler.cpp.
References f(), file, and kLogData.
Referenced by MavlinkLogHandler::_log_request_data(), and MavlinkLogHandler::_log_send_listing().
size_t LogListHelper::get_log_data | ( | uint8_t | len, |
uint8_t * | buffer | ||
) |
Definition at line 417 of file mavlink_log_handler.cpp.
References current_log_data_offset, current_log_filename, current_log_filep, and PX4LOG_WARN.
Referenced by MavlinkLogHandler::_log_send_data().
bool LogListHelper::open_for_transmit | ( | ) |
Definition at line 398 of file mavlink_log_handler.cpp.
References current_log_filename, current_log_filep, and PX4LOG_WARN.
Referenced by MavlinkLogHandler::_log_request_data().
uint32_t LogListHelper::current_log_data_offset |
Definition at line 78 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_data(), MavlinkLogHandler::_log_send_data(), and get_log_data().
uint32_t LogListHelper::current_log_data_remaining |
Definition at line 79 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_data(), and MavlinkLogHandler::_log_send_data().
char LogListHelper::current_log_filename[128] |
Definition at line 81 of file mavlink_log_handler.h.
Referenced by _init(), MavlinkLogHandler::_log_request_data(), get_log_data(), and open_for_transmit().
FILE* LogListHelper::current_log_filep |
Definition at line 80 of file mavlink_log_handler.h.
Referenced by get_log_data(), and open_for_transmit().
uint16_t LogListHelper::current_log_index |
Definition at line 76 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_data(), and MavlinkLogHandler::_log_send_data().
uint32_t LogListHelper::current_log_size |
Definition at line 77 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_data().
int LogListHelper::current_status |
Definition at line 75 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_data(), MavlinkLogHandler::_log_request_list(), MavlinkLogHandler::_log_send_data(), MavlinkLogHandler::_log_send_listing(), MavlinkLogHandler::get_size(), and MavlinkLogHandler::send().
int LogListHelper::last_entry |
Definition at line 72 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_list(), and MavlinkLogHandler::_log_send_listing().
int LogListHelper::log_count |
Definition at line 73 of file mavlink_log_handler.h.
Referenced by _init(), MavlinkLogHandler::_log_request_data(), MavlinkLogHandler::_log_request_list(), MavlinkLogHandler::_log_send_listing(), and _scan_logs().
int LogListHelper::next_entry |
Definition at line 71 of file mavlink_log_handler.h.
Referenced by MavlinkLogHandler::_log_request_list(), and MavlinkLogHandler::_log_send_listing().