Monitor¶
Description
-
class
tpg_256a_pressure_monitor.Monitor.Monitor(device: tpg_256a_pressure_monitor.TPG_256A.TPG_256A, name: str = 'Monitor Thread', database_flag: bool = False, database_config_file: str = None, terminal_flag: bool = False, table_name: str = 'pressure')[source]¶ Manages a background
threadwhich logs data from the TPG-256Adevice.Attributes
Listof data labels to save.Database usage
flag.Databaseobject.TPG-256 Ahandler.Flagto signal the thread to stop.Name of the PostgreSQL table where data will be saved.
Terminal output
flag.Methods
Initializes the
Monitorobject.Ensures the
databaseis ready to accept data from the TPG-256Adevice.Prints the retrieved data to the terminal.
Monitoring method start upon object creation.
Saves the latest pressure data to the PostgreSQL
database.Clears the
run_flagto signal the background thread to stop.