class DiskSensor: def __init__(self): self.sensor_model = 'DISK' self.tools = SysTools() def take_reading(self) -> dict: """Attempts to read in the sensor data""" return self.tools.get_disk_data()
class CPUSensor: """ CPU use sensor """ def __init__(self): self.sensor_model = 'CPU' self.tools = SysTools() def take_reading(self) -> dict: """Attempts to read in the sensor data""" return self.tools.get_cpu_percent()
class CPUTempSensor: """ CPU temperature sensor """ def __init__(self): self.sensor_model = 'CPU' self.tools = SysTools() def take_reading(self) -> dict: """Attempts to read in the sensor data""" return self.tools.get_system_temps()
class MEMSensor: """ Memory use sensor """ def __init__(self): self.sensor_model = 'MEM' self.tools = SysTools() def take_reading(self) -> dict: """Attempts to read in the sensor data""" return self.tools.get_mem_data()
def __init__(self): self.sensor_model = 'DISK' self.tools = SysTools()