Beat Küng
0e3d660ccd
logger refactor: add ulog_ prefix to struct names and header length
2016-06-02 07:32:49 +02:00
Beat Küng
034772056a
logger: prepare for replay: add replayed file to the log, use _replayed as file name suffix
2016-06-02 07:32:49 +02:00
Beat Küng
069dd01cb0
logger: subscribe to mavlink_log messages and write them to the log
2016-06-02 07:32:49 +02:00
Beat Küng
659ac8faf2
refactor logger: use static fields & move them to source file
...
avoids multiple declarations of...
2016-06-02 07:32:49 +02:00
Beat Küng
cd7c955067
logger: -t param: fall back to px4_clock_gettime if there's no gps fix
2016-05-22 13:31:35 +02:00
Beat Küng
a9930c2173
logger: avoid logging the padding if it's at the end of a message format
2016-05-22 13:31:35 +02:00
Beat Küng
bd96afa00b
logger: use int32_t for utc_offset instead of uint32_t
2016-05-22 13:31:35 +02:00
Beat Küng
623fe7ca2c
logger + uorb msg template: rm msg name from o_fields to save space
...
Instead we use o_name to get the topic name. Now the topic names are not
upper case anymore in the log format. This makes it more consistent, eg.
if used as a nested topic
2016-05-22 13:31:35 +02:00
Beat Küng
4f8d16cc4d
logger: log dropout events
2016-05-22 13:31:35 +02:00
Beat Küng
c13247e14f
logger: log all known formats, add ADD_LOGGED_MSG message
...
this is needed for nested topics.
2016-05-22 13:31:35 +02:00
Beat Küng
2d037d1a1c
logger: add an MSG_HEADER_LEN to clarify meaning
2016-05-22 13:31:35 +02:00
Beat Küng
df803fc4b9
logger: remove redundant format_len from message_format_s
2016-05-22 13:31:35 +02:00
Beat Küng
971e97745f
logger: reorder message header fields (for alignment)
2016-05-22 13:31:35 +02:00
Beat Küng
0ddd7a408c
logger: write "sys_name" and "time_ref_utc" info to log file
2016-05-22 13:31:35 +02:00
Beat Küng
908f7eb47f
logger: remove some comments, logging output
2016-05-22 13:31:35 +02:00
Beat Küng
1719d9a957
logger: add a file magic
2016-05-22 13:31:35 +02:00
Daniel Agar
97bcea292e
logger.cpp fix style
2016-05-14 11:27:07 +02:00
Beat Küng
4b8152465d
logger: unsubscribe from all topics when logger exits
2016-05-14 11:27:07 +02:00
Beat Küng
0f30bfa0ac
logger: fix -e parameter (logger immediately stopped again after start)
2016-05-14 11:27:07 +02:00
Beat Küng
fcf7e8b78c
logger: -e option only logs until disarm, add -f option to log until shutdown
2016-05-14 11:27:07 +02:00
Beat Küng
fc51f81bf5
logger: add free space check (need at least 50MB to start)
2016-05-14 11:27:07 +02:00
Beat Küng
fe2b80ffb8
logger: add '-t' option to use GPS date/time for file and dir name
2016-05-14 11:27:07 +02:00
Beat Küng
9da2eac3d3
logger: remove unneeded start parameters (-x & -a)
2016-05-14 11:27:07 +02:00
Beat Küng
ec6c53eb60
logger: correct cleanup in case 'logger start' fails
2016-05-14 11:27:07 +02:00
Beat Küng
a0beef3204
logger: output error on failed to get log file name
2016-05-14 11:27:07 +02:00
Beat Küng
d7f0808316
logger: create _vehicle_status_sub & _parameter_update_sub on stack
...
Since it's only used in run().
2016-05-14 11:27:07 +02:00
Beat Küng
4f0573d612
logger: reset _write_dropouts after status output
2016-05-14 11:27:07 +02:00
Beat Küng
d5dcbf01d0
logger: add copyright to files
2016-05-14 11:27:07 +02:00
Beat Küng
04f301619f
refactor LogWriter: remove friend class Logger and use the public interface
2016-05-14 11:27:07 +02:00
Beat Küng
dde96dd4d7
logger: allocate _vehicle_status_sub & _parameter_update_sub on the logger thread
...
This makes sure the file descriptors are closed in the right thread.
Before on NuttX, when stopping the logger, orb unsubscribe failed due to
this.
2016-05-14 11:27:07 +02:00
Beat Küng
9a02dbdd66
logger: extend status ouput, disable DBGPRINT for now
2016-05-14 11:27:07 +02:00
Beat Küng
4ce658ab99
logger: move _writer.lock() call after write_changed_parameters()
...
write_changed_parameters() also takes the lock and thus would deadlock
otherwise.
2016-05-14 11:27:07 +02:00
Daniel Agar
3de7fbb0a9
logger and uORBTest_UnitTest astyle
2016-05-14 11:27:07 +02:00
Beat Küng
1edf03767a
logger: KB/s -> kB/s
2016-05-14 11:27:07 +02:00
Beat Küng
eabc43d78c
orb structs: add padding bytes to align the structs where necessary
...
This is required for the logger, we just manually add the padding bytes
what would otherwise be done by the compiler. Additionally we reorder
the fields by type, so that padding is only necessary for nested types.
2016-05-14 11:27:07 +02:00
Daniel Agar
69c1ce1714
WIP logger serialization
2016-05-14 11:27:07 +02:00
Beat Küng
8f5cb4084d
logger: use non-scientific format for status output
2016-05-14 11:27:07 +02:00
Beat Küng
4edc0d9ea9
fix logger: add forgotten unlock in Logger::write_info
2016-05-14 11:27:07 +02:00
Beat Küng
63bd2cebf9
refactor logger: add a write_wait method to avoid code duplication
2016-05-14 11:27:07 +02:00
Mark Whitehorn
c7e7026f47
remove code obsoleted by move of log buffer
2016-05-14 11:27:07 +02:00
Mark Whitehorn
4e50f271d6
use C99 print format for size_t
2016-05-14 11:27:07 +02:00
Beat Küng
8b5a325644
logger: remove _log_buffer from Logger, initialize it in the writer instead
...
it's not used in the logger, so don't store it there. It is accessed via
LogWriter::write.
This also makes sure the buffer size is >= _min_write_chunk and handles
allocation failure properly.
2016-05-14 11:27:07 +02:00
Beat Küng
04f38b9197
fix Logger::add_topic: 0 is a valid file descriptor
2016-05-14 11:27:07 +02:00
Beat Küng
d0d2664efa
logger: use %zu to print type size_t, use PX4_INFO instead of printf
2016-05-14 11:27:07 +02:00
Beat Küng
dd22445768
Logger::add_topic: error handling if orb_subscribe or _subscriptions.push_back fail
2016-05-14 11:27:07 +02:00
Beat Küng
e9f257c15f
logger: fix wrong default buffer size in usage string
2016-05-14 11:27:07 +02:00
Beat Küng
84015e5c01
logger: proper error handling if writer thread creation fails
2016-05-14 11:27:07 +02:00
Mark Whitehorn
72263eaa97
correct msg_size offset to 3 for all records (must be same)
2016-05-14 11:27:07 +02:00
Mark Whitehorn
9dbbe8cd8d
log changes to parameters
2016-05-14 11:27:07 +02:00
Mark Whitehorn
e5e523aa9e
size_t is different in posix build
2016-05-14 11:27:07 +02:00