Skip to content

temperature_monitor_view

frog.gui.temperature_monitor_view ¤

Provides a widget to show the current temperatures.

Attributes¤

Classes¤

TemperatureMonitorControl(num_channels=NUM_TEMPERATURE_MONITOR_CHANNELS) ¤

Bases: DevicePanel

Widgets to view the current temperatures.

Creates the widgets to monitor the current temperatures.

Parameters:

Name Type Description Default
num_channels int

Number of Pt 100 channels being monitored

NUM_TEMPERATURE_MONITOR_CHANNELS
Source code in frog/gui/temperature_monitor_view.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
def __init__(self, num_channels: int = NUM_TEMPERATURE_MONITOR_CHANNELS) -> None:
    """Creates the widgets to monitor the current temperatures.

    Args:
        num_channels: Number of Pt 100 channels being monitored
    """
    super().__init__(TEMPERATURE_MONITOR_TOPIC, "Temperature monitor")

    self._num_channels = num_channels
    self._poll_interval = 1000 * TEMPERATURE_MONITOR_POLL_INTERVAL

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

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

    pub.subscribe(
        self._update_pt100s, f"device.{TEMPERATURE_MONITOR_TOPIC}.data.response"
    )

    self._begin_polling()
Functions¤