Skip to content

dummy_temperature_controller

frog.hardware.plugins.temperature.dummy_temperature_controller ¤

Provides a dummy TC4820 device.

Classes¤

DummyTemperatureController(name, temperature_params=NoiseParameters(35.0, 0.1), power_params=NoiseParameters(40.0, 2.0), alarm_status=0, initial_set_point=Decimal(70)) ¤

Bases: TemperatureControllerBase

A dummy temperature controller device which produces random noise.

Create a new DummyTemperatureController.

Parameters:

Name Type Description Default
name str

The name of the device, to distinguish it from others

required
temperature_params NoiseParameters

The parameters for temperature's NoiseProducer

NoiseParameters(35.0, 0.1)
power_params NoiseParameters

The parameters for power's NoiseProducer

NoiseParameters(40.0, 2.0)
alarm_status int

The value of the alarm status used forever (0 is no error)

0
initial_set_point Decimal

What the temperature set point is initially

Decimal(70)
Source code in frog/hardware/plugins/temperature/dummy_temperature_controller.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def __init__(
    self,
    name: str,
    temperature_params: NoiseParameters = NoiseParameters(35.0, 0.1),
    power_params: NoiseParameters = NoiseParameters(40.0, 2.0),
    alarm_status: int = 0,
    initial_set_point: Decimal = Decimal(70),
) -> None:
    """Create a new DummyTemperatureController.

    Args:
        name: The name of the device, to distinguish it from others
        temperature_params: The parameters for temperature's NoiseProducer
        power_params: The parameters for power's NoiseProducer
        alarm_status: The value of the alarm status used forever (0 is no error)
        initial_set_point: What the temperature set point is initially
    """
    self._temperature_producer = NoiseProducer.from_parameters(
        temperature_params, type=Decimal
    )
    self._power_producer = NoiseProducer.from_parameters(power_params, type=int)
    self._alarm_status = alarm_status
    self._set_point = initial_set_point

    super().__init__(name)
Attributes¤
alarm_status property ¤

The current error status of the system.

A value of zero indicates that no error has occurred.

power property ¤

The current power output of the device.

set_point property writable ¤

The set point temperature (in degrees).

In other words, this indicates the temperature the device is aiming towards.

temperature property ¤

The current temperature reported by the device.

Functions¤