bricknil.process

Super-class of all the Tasks in the event-loop

Classes

Process(name) Subclass this for anything going into the Async Event Loop

Members

class bricknil.process.Process(name)[source]

Bases: object

Subclass this for anything going into the Async Event Loop

This class keeps track of a unique numeric ID for each process, and its name. It also provides some utilty functions to log messages at various levels.

id

Process ID (unique)

Type:int
name

Human readable name for process (does not need to be unique)

Type:str
message(m: str, level=20)[source]

Print message m if its level is lower than the instance level

message_info(m)[source]

Helper function for logging messages at INFO level

message_debug(m)[source]

Helper function for logging messages at DEBUG level

message_error(m)[source]

Helper function for logging messages at ERROR level