sbp.client.loggers.base_logger module

class sbp.client.loggers.base_logger.BaseLogger(handle, tags={}, dispatcher=None)[source]

Bases: object

The BaseLogger provides log helper functions and context management.

handle
: filehandle
File to log to.
close()[source]
dispatch(msg)[source]
flush()[source]
class sbp.client.loggers.base_logger.LogIterator(handle, dispatcher=<function dispatch>)[source]

Bases: object

The :class: LogIterator provides an abstract interface for reading serialized logs of SBP data.

handle
: filehandle
File to read SBP messages from.
close()[source]
dispatch(msg, line=None)[source]
flush()[source]
next()[source]

Return the next record tuple from the log file. If an unknown SBP message type is found, it’ll return the raw SBP. If EOF, throws exception and then returns to start of file.

(float, float, object)
(elapsed msec since beginning of log, UTC timestamp, msg)