42 : _backend(configured_backend)
48 PX4_ERR(
"LogWriterFile allocation failed");
56 PX4_ERR(
"LogWriterMavlink allocation failed");
65 PX4_ERR(
"alloc failed");
72 PX4_ERR(
"failed to create writer thread (%i)", ret);
79 PX4_ERR(
"mavlink init failed");
163 int ret_file = 0, ret_mavlink = 0;
uint8_t Backend
bitfield to specify a backend
void start_log(LogType type, const char *filename)
void thread_stop()
stop all running threads and wait for them to exit
LogType
Defines different log (file) types.
static constexpr Backend BackendFile
LogWriterMavlink * _log_writer_mavlink_for_write
int write_message(LogType type, void *ptr, size_t size, uint64_t dropout_start=0)
Write a single ulog message (including header).
void start_log_file(LogType type, const char *filename)
bool is_started(LogType type) const
whether logging is currently active or not (any of the selected backends).
int thread_start()
start the thread
void stop_log_file(LogType type)
LogWriterFile * _log_writer_file_for_write
pointer that is used for writing, to temporarily select write backends
Writes logging data to a file.
LogWriter(Backend configured_backend, size_t file_buffer_size)
int write_message(LogType type, void *ptr, size_t size, uint64_t dropout_start=0)
LogWriterMavlink * _log_writer_mavlink
bool is_started(LogType type) const
LogWriterFile * _log_writer_file
void select_write_backend(Backend sel_backend)
Select a backend, so that future calls to write_message() only write to the selected sel_backend...
Writes logging data to uORB, and then sent via mavlink.
int write_message(void *ptr, size_t size)
static constexpr Backend BackendMavlink
void stop_log(LogType type)