Skip to content

temperature_controller_view

frog.gui.temperature_controller_view ¤

Provides a widget for interacting with temperature controllers.

Attributes¤

Classes¤

TemperatureControllerControl(name, temperature_idx, allow_update) ¤

Bases: DevicePanel

A widget to interact with temperature controllers.

Create a new TemperatureControllerControl.

Parameters:

Name Type Description Default
name str

Name of the blackbody the temperature controller is controlling

required
temperature_idx int

Index of the blackbody on the temperature monitor

required
allow_update bool

Whether to allow modifying the temperature

required
Source code in frog/gui/temperature_controller_view.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
def __init__(self, name: str, temperature_idx: int, allow_update: bool) -> None:
    """Create a new TemperatureControllerControl.

    Args:
        name: Name of the blackbody the temperature controller is controlling
        temperature_idx: Index of the blackbody on the temperature monitor
        allow_update: Whether to allow modifying the temperature
    """
    super().__init__(
        f"{TEMPERATURE_CONTROLLER_TOPIC}.{name}_bb",
        f"Temperature controller ({name} BB)",
    )
    self._name = name
    self._poll_interval = 1000 * TEMPERATURE_CONTROLLER_POLL_INTERVAL
    self._temperature_idx = temperature_idx

    layout = self._create_controls(allow_update)
    self.setLayout(layout)

    self.setSizePolicy(
        QSizePolicy.Policy.Preferred,
        QSizePolicy.Policy.Fixed,
    )

    pub.subscribe(
        self._begin_polling,
        f"device.opened.{TEMPERATURE_CONTROLLER_TOPIC}.{name}_bb",
    )
    pub.subscribe(
        self._update_controls,
        f"device.{TEMPERATURE_CONTROLLER_TOPIC}.{name}_bb.response",
    )
    pub.subscribe(
        self._update_pt100, f"device.{TEMPERATURE_MONITOR_TOPIC}.data.response"
    )
Functions¤