Example #1
0
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()
Example #2
0
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()
Example #3
0
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()
Example #4
0
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()
Example #5
0
 def __init__(self):
     self.sensor_model = 'DISK'
     self.tools = SysTools()