SerialLogger

class utils.SerialLogger

Bases: object

Log specifically designed for the serial data.

Methods Summary

add_message(rxtx, message) Add a serial message to the log.
rx(message) Shortcut to add_message for RX
tail(nlines) Return the tail of the logg file
tx(message) Shortcut to add_message for TX

Methods Documentation

add_message(rxtx: str, message: str)

Add a serial message to the log.

Parameters:
  • rxtx – Was the message received (rx) or sent (tx)
  • message – Message to record
rx(message: str)

Shortcut to add_message for RX

Parameters:message – Message to record (as RX)
tail(nlines: int = 15)

Return the tail of the logg file

Parameters:nlines – Number of lines to return
Returns:lines seporated with newlines
Return type:str
tx(message: str)

Shortcut to add_message for TX

Parameters:message – Message to record (as TX)