sbp.client.loggers.json_logger module¶
-
class
sbp.client.loggers.json_logger.
JSONBinLogger
(handle, tags={}, dispatcher=None)[source]¶ Bases:
sbp.client.loggers.base_logger.BaseLogger
The
JSONLogger
logs JSON records without expanding the fields.
-
class
sbp.client.loggers.json_logger.
JSONLogIterator
(handle, dispatcher=<function dispatch>)[source]¶ Bases:
sbp.client.loggers.base_logger.LogIterator
The
JSONLogIterator
is an iterator for reading JSON logs of SBP data.- filename : string
- Path to file to read SBP messages from.
-
next
()[source]¶ Return the next record tuple from log file containing JSON-serialized SBP. 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.
- Tuple(sbp MSG object, {‘time’:’ISO 8601 time’})
- Second item is for metadata. There used to be multiple fields and there could be more in the future.
In practice it seems like a lot of times JSONLogIterator objects return iterators instead of tuples due to weird usage of the class.
-
class
sbp.client.loggers.json_logger.
JSONLogger
(handle, tags={}, dispatcher=None)[source]¶ Bases:
sbp.client.loggers.base_logger.BaseLogger
The
JSONLogger
logs JSON records.