APM:Libraries
|
#include <DataFlash_MAVLink.h>
Classes | |
struct | _stats |
struct | dm_block |
struct | dm_block_queue |
Public Member Functions | |
DataFlash_MAVLink (DataFlash_Class &front, DFMessageWriter_DFLogStart *writer) | |
void | Init () override |
bool | logging_started () const override |
void | stop_logging () override |
bool | _WritePrioritisedBlock (const void *pBuffer, uint16_t size, bool is_critical) override |
bool | CardInserted (void) const override |
void | EraseAll () override |
bool | NeedPrep () override |
void | Prep () override |
uint16_t | find_last_log (void) override |
void | get_log_boundaries (uint16_t log_num, uint16_t &start_page, uint16_t &end_page) override |
void | get_log_info (uint16_t log_num, uint32_t &size, uint32_t &time_utc) override |
int16_t | get_log_data (uint16_t log_num, uint16_t page, uint32_t offset, uint16_t len, uint8_t *data) override |
uint16_t | get_num_logs (void) override |
void | push_log_blocks () override |
void | remote_log_block_status_msg (mavlink_channel_t chan, mavlink_message_t *msg) override |
![]() | |
FUNCTOR_TYPEDEF (vehicle_startup_message_Log_Writer, void) | |
DataFlash_Backend (DataFlash_Class &front, class DFMessageWriter_DFLogStart *writer) | |
vehicle_startup_message_Log_Writer | vehicle_message_writer () |
void | internal_error () |
bool | WriteBlock (const void *pBuffer, uint16_t size) |
bool | WriteCriticalBlock (const void *pBuffer, uint16_t size) |
bool | WritePrioritisedBlock (const void *pBuffer, uint16_t size, bool is_critical) |
void | set_mission (const AP_Mission *mission) |
virtual void | PrepForArming () |
void | Log_Fill_Format (const struct LogStructure *structure, struct log_Format &pkt) |
void | Log_Fill_Format_Units (const struct LogStructure *s, struct log_Format_Units &pkt) |
virtual void | flush (void) |
virtual void | periodic_tasks () |
uint8_t | num_types () const |
const struct LogStructure * | structure (uint8_t structure) const |
uint8_t | num_units () const |
const struct UnitStructure * | unit (uint8_t unit) const |
uint8_t | num_multipliers () const |
const struct MultiplierStructure * | multiplier (uint8_t multiplier) const |
void | Log_Write_EntireMission (const AP_Mission &mission) |
bool | Log_Write_Format (const struct LogStructure *structure) |
bool | Log_Write_MavCmd (uint16_t cmd_total, const mavlink_mission_item_t &mav_cmd) |
bool | Log_Write_Message (const char *message) |
bool | Log_Write_Mission_Cmd (const AP_Mission &mission, const AP_Mission::Mission_Command &cmd) |
bool | Log_Write_Mode (uint8_t mode, uint8_t reason=0) |
bool | Log_Write_Parameter (const char *name, float value) |
bool | Log_Write_Parameter (const AP_Param *ap, const AP_Param::ParamToken &token, enum ap_var_type type) |
uint32_t | num_dropped (void) const |
bool | Log_Write_Emit_FMT (uint8_t msg_type) |
bool | Log_Write (uint8_t msg_type, va_list arg_list, bool is_critical=false) |
virtual void | vehicle_was_disarmed () |
bool | Log_Write_Unit (const struct UnitStructure *s) |
bool | Log_Write_Multiplier (const struct MultiplierStructure *s) |
bool | Log_Write_Format_Units (const struct LogStructure *structure) |
Protected Member Functions | |
bool | WritesOK () const override |
![]() | |
bool | ShouldLog (bool is_critical) |
virtual bool | StartNewLogOK () const |
virtual bool | WriteBlockCheckStartupMessages () |
virtual void | WriteMoreStartupMessages () |
virtual void | start_new_log_reset_variables () |
Private Types | |
typedef struct dm_block_queue | dm_block_queue_t |
Private Member Functions | |
bool | send_log_block (struct dm_block &block) |
void | handle_ack (mavlink_channel_t chan, mavlink_message_t *msg, uint32_t seqno) |
void | handle_retry (uint32_t block_num) |
void | do_resends (uint32_t now) |
void | free_all_blocks () |
void | enqueue_block (dm_block_queue_t &queue, struct dm_block *block) |
bool | queue_has_block (dm_block_queue_t &queue, struct dm_block *block) |
struct dm_block * | dequeue_seqno (dm_block_queue_t &queue, uint32_t seqno) |
bool | free_seqno_from_queue (uint32_t seqno, dm_block_queue_t &queue) |
bool | send_log_blocks_from_queue (dm_block_queue_t &queue) |
uint8_t | stack_size (struct dm_block *stack) |
uint8_t | queue_size (dm_block_queue_t queue) |
bool | logging_enabled () const override |
bool | logging_failed () const override |
void | Log_Write_DF_MAV (DataFlash_MAVLink &df) |
uint32_t | bufferspace_available () override |
uint8_t | remaining_space_in_current_block () |
struct dm_block * | next_block () |
void | periodic_10Hz (uint32_t now) override |
void | periodic_1Hz (uint32_t now) override |
void | periodic_fullrate (uint32_t now) override |
void | stats_init () |
void | stats_reset () |
void | stats_collect () |
void | stats_log () |
uint16_t | start_new_log (void) override |
bool | ReadBlock (void *pkt, uint16_t size) override |
Private Attributes | |
struct dm_block * | _blocks_free |
dm_block_queue_t | _blocks_sent |
dm_block_queue_t | _blocks_pending |
dm_block_queue_t | _blocks_retry |
struct DataFlash_MAVLink::_stats | stats |
mavlink_channel_t | _chan |
uint8_t | _target_system_id |
uint8_t | _target_component_id |
const uint8_t | _max_blocks_per_send_blocks |
uint32_t | _next_seq_num |
uint16_t | _latest_block_len |
uint32_t | _last_response_time |
uint32_t | _last_send_time |
uint8_t | _next_block_number_to_resend |
bool | _sending_to_client |
uint8_t | _blockcount_free |
uint8_t | _blockcount |
struct dm_block * | _blocks |
struct dm_block * | _current_block |
uint32_t | _stats_last_collected_time |
uint32_t | _stats_last_logged_time |
uint8_t | mavlink_seq |
AP_HAL::Util::perf_counter_t | _perf_errors |
AP_HAL::Util::perf_counter_t | _perf_packing |
AP_HAL::Util::perf_counter_t | _perf_overruns |
AP_HAL::Semaphore * | semaphore |
Additional Inherited Members | |
![]() | |
DataFlash_Class & | _front |
DFMessageWriter_DFLogStart * | _startup_messagewriter |
bool | _writing_startup_messages |
uint8_t | _internal_errors |
uint32_t | _dropped |
bool | _initialised |
Definition at line 20 of file DataFlash_MAVLink.h.
|
private |
Definition at line 90 of file DataFlash_MAVLink.h.
|
inline |
|
overridevirtual |
Implements DataFlash_Backend.
Definition at line 129 of file DataFlash_MAVLink.cpp.
Referenced by logging_started().
|
overrideprivatevirtual |
Implements DataFlash_Backend.
Definition at line 60 of file DataFlash_MAVLink.cpp.
Referenced by _WritePrioritisedBlock().
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 47 of file DataFlash_MAVLink.h.
|
private |
Definition at line 79 of file DataFlash_MAVLink.cpp.
Referenced by free_seqno_from_queue(), handle_retry(), and send_log_blocks_from_queue().
|
private |
Definition at line 497 of file DataFlash_MAVLink.cpp.
Referenced by periodic_10Hz().
|
private |
Definition at line 69 of file DataFlash_MAVLink.cpp.
Referenced by _WritePrioritisedBlock(), handle_retry(), and send_log_blocks_from_queue().
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 50 of file DataFlash_MAVLink.h.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 56 of file DataFlash_MAVLink.h.
|
private |
Definition at line 195 of file DataFlash_MAVLink.cpp.
Referenced by handle_ack(), and Init().
|
private |
Definition at line 105 of file DataFlash_MAVLink.cpp.
Referenced by handle_ack().
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 57 of file DataFlash_MAVLink.h.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 59 of file DataFlash_MAVLink.h.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 58 of file DataFlash_MAVLink.h.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 60 of file DataFlash_MAVLink.h.
|
private |
Definition at line 230 of file DataFlash_MAVLink.cpp.
Referenced by remote_log_block_status_msg().
|
private |
Definition at line 292 of file DataFlash_MAVLink.cpp.
Referenced by remote_log_block_status_msg().
|
overridevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 26 of file DataFlash_MAVLink.cpp.
Referenced by DataFlash_MAVLink().
|
private |
Definition at line 327 of file DataFlash_MAVLink.cpp.
Referenced by stats_log().
|
inlineoverrideprivatevirtual |
Implements DataFlash_Backend.
Definition at line 123 of file DataFlash_MAVLink.h.
|
overrideprivatevirtual |
Implements DataFlash_Backend.
Definition at line 55 of file DataFlash_MAVLink.cpp.
Referenced by logging_enabled().
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 38 of file DataFlash_MAVLink.h.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 52 of file DataFlash_MAVLink.h.
|
private |
Definition at line 181 of file DataFlash_MAVLink.cpp.
Referenced by _WritePrioritisedBlock().
|
overrideprivatevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 530 of file DataFlash_MAVLink.cpp.
|
overrideprivatevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 535 of file DataFlash_MAVLink.cpp.
|
overrideprivatevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 547 of file DataFlash_MAVLink.cpp.
|
inlineoverridevirtual |
Implements DataFlash_Backend.
Definition at line 53 of file DataFlash_MAVLink.h.
|
overridevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 473 of file DataFlash_MAVLink.cpp.
Referenced by get_num_logs(), and periodic_fullrate().
|
private |
|
private |
Definition at line 393 of file DataFlash_MAVLink.cpp.
Referenced by stats_collect().
|
inlineoverrideprivatevirtual |
Implements DataFlash_Backend.
Definition at line 176 of file DataFlash_MAVLink.h.
|
private |
Definition at line 64 of file DataFlash_MAVLink.cpp.
Referenced by _WritePrioritisedBlock(), and bufferspace_available().
|
overridevirtual |
Reimplemented from DataFlash_Backend.
Definition at line 276 of file DataFlash_MAVLink.cpp.
Referenced by get_num_logs().
|
private |
Definition at line 553 of file DataFlash_MAVLink.cpp.
Referenced by do_resends(), and send_log_blocks_from_queue().
|
private |
Definition at line 452 of file DataFlash_MAVLink.cpp.
Referenced by push_log_blocks().
|
private |
Definition at line 385 of file DataFlash_MAVLink.cpp.
Referenced by queue_size(), and stats_collect().
|
inlineoverrideprivatevirtual |
Implements DataFlash_Backend.
Definition at line 173 of file DataFlash_MAVLink.h.
|
private |
Definition at line 398 of file DataFlash_MAVLink.cpp.
Referenced by periodic_10Hz().
|
private |
Definition at line 305 of file DataFlash_MAVLink.cpp.
Referenced by handle_ack(), and Init().
|
private |
Definition at line 353 of file DataFlash_MAVLink.cpp.
Referenced by periodic_1Hz().
|
private |
Definition at line 311 of file DataFlash_MAVLink.cpp.
Referenced by stats_init(), and stats_log().
|
overridevirtual |
Implements DataFlash_Backend.
Definition at line 222 of file DataFlash_MAVLink.cpp.
Referenced by handle_ack(), and logging_started().
|
overrideprotectedvirtual |
Implements DataFlash_Backend.
Definition at line 118 of file DataFlash_MAVLink.cpp.
Referenced by get_num_logs().
|
private |
Definition at line 153 of file DataFlash_MAVLink.h.
Referenced by DataFlash_MAVLink(), do_resends(), free_all_blocks(), and Init().
|
private |
Definition at line 152 of file DataFlash_MAVLink.h.
Referenced by bufferspace_available(), free_all_blocks(), free_seqno_from_queue(), next_block(), and stats_collect().
|
private |
Definition at line 154 of file DataFlash_MAVLink.h.
Referenced by free_all_blocks(), and Init().
|
private |
Definition at line 99 of file DataFlash_MAVLink.h.
Referenced by free_all_blocks(), free_seqno_from_queue(), next_block(), and stats_collect().
|
private |
Definition at line 101 of file DataFlash_MAVLink.h.
Referenced by _WritePrioritisedBlock(), free_all_blocks(), push_log_blocks(), and stats_collect().
|
private |
Definition at line 102 of file DataFlash_MAVLink.h.
Referenced by free_all_blocks(), handle_ack(), handle_retry(), Log_Write_DF_MAV(), push_log_blocks(), stats_collect(), and stats_log().
|
private |
Definition at line 100 of file DataFlash_MAVLink.h.
Referenced by do_resends(), free_all_blocks(), handle_ack(), handle_retry(), send_log_blocks_from_queue(), and stats_collect().
|
private |
Definition at line 126 of file DataFlash_MAVLink.h.
Referenced by handle_ack(), and send_log_block().
|
private |
Definition at line 155 of file DataFlash_MAVLink.h.
Referenced by _WritePrioritisedBlock(), and free_all_blocks().
|
private |
Definition at line 142 of file DataFlash_MAVLink.h.
Referenced by handle_ack(), handle_retry(), periodic_1Hz(), and stop_logging().
|
private |
Definition at line 143 of file DataFlash_MAVLink.h.
Referenced by periodic_1Hz(), and send_log_block().
|
private |
Definition at line 141 of file DataFlash_MAVLink.h.
Referenced by _WritePrioritisedBlock(), free_all_blocks(), next_block(), and remaining_space_in_current_block().
|
private |
Definition at line 138 of file DataFlash_MAVLink.h.
Referenced by send_log_blocks_from_queue().
|
private |
Definition at line 144 of file DataFlash_MAVLink.h.
|
private |
Definition at line 140 of file DataFlash_MAVLink.h.
Referenced by handle_ack(), Log_Write_DF_MAV(), and next_block().
|
private |
Definition at line 180 of file DataFlash_MAVLink.h.
|
private |
Definition at line 182 of file DataFlash_MAVLink.h.
|
private |
Definition at line 181 of file DataFlash_MAVLink.h.
Referenced by send_log_block().
|
private |
Definition at line 145 of file DataFlash_MAVLink.h.
Referenced by do_resends(), handle_ack(), handle_retry(), logging_failed(), periodic_1Hz(), push_log_blocks(), stop_logging(), and WritesOK().
|
private |
Definition at line 166 of file DataFlash_MAVLink.h.
|
private |
Definition at line 167 of file DataFlash_MAVLink.h.
|
private |
Definition at line 128 of file DataFlash_MAVLink.h.
Referenced by handle_ack(), and send_log_block().
|
private |
Definition at line 127 of file DataFlash_MAVLink.h.
Referenced by handle_ack(), and send_log_block().
|
private |
Definition at line 168 of file DataFlash_MAVLink.h.
Referenced by send_log_block().
|
private |
Definition at line 184 of file DataFlash_MAVLink.h.
Referenced by _WritePrioritisedBlock(), do_resends(), Init(), push_log_blocks(), remote_log_block_status_msg(), and stats_collect().
|
private |
Referenced by do_resends(), Log_Write_DF_MAV(), stats_collect(), stats_init(), stats_log(), and stats_reset().