sensor.py 488 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
"""Sensor Module:
    provide the core functionalities related to measuring power, energy,
    temperature and other information about the local node, using our internal
    version of the coolr code.

    This module should be the only one interfacing with coolr.
"""
import random


class SensorManager:
    """Performs sensor reading and basic data aggregation."""

    def __init__(self):
        pass

    def do_update(self):
        return {'total_power': random.randrange(0, 34)}