module documentation

Diagnostics Module

This provides some diagnostic features.

The heart beat runs continuously, flashing the on board led.

Class HeartBeat Heart Beat
Function log_event Log event report.
def log_event(report): ΒΆ

Log event report.

This logs an event report as generated by Device.report_event().

The event is logged using print - defaults to REPL out. The log level is controlled via sys.argv item 1.

The first item may be set to a string of characters. Each character enables logging reports from a specific source as identified in the base Device class.

characters are:
  • w: wifi
  • m: MQTT
  • l: local RailCom detector
  • d: block occupancy detector
  • g: global detector

E.g. setting the first argument to 'wm' will log both wifi and mqtt events. Settings are case sensitive and must be lower case.

Parameters
reportthe report as generated by the source object.