Source code for device_client.client_langmuir_gauge

from device_client import DeviceClient
from device.gauge_controller_tpg36x import GaugeController_TPG366


# SERIAL_NO = "44870877"
SERIAL_NO = "44878384"

description = """
#### Log data
Start pressure logging (all channels), returns a datafile when finished.
- *duration* = total time, use format: `5s` or `2m5s` or `1h2m5s`
- *interval* = time between samples in seconds, for example: `11.2`

Note: If stopped using **Stop**, the file will not appear here, but the data
still exists in ~/saved_data directory on one of the RaspberryPi.
"""

[docs] def connect(name, password, server): client = DeviceClient(name, password, title="6-channel Gauge Controller TPG366", description=description) hw = GaugeController_TPG366( serial_number=SERIAL_NO, log_callback=client.emit_log, logger="6channel", labels=["Paschen CMR", "Paschen TPR", "Resonance", "Langmuir", "Tube", "--"], ) client.register_command(hw.stop, "Stop") client.register_command(hw.log_pressure, "Log data", pass_self=True, inputs=[{"unit": "hms"}, {"unit": "s"}]) client.register_background_task(hw.update_frontend) client.keep_server_updated( check_readiness=hw.is_ready, check_readiness_interval=1, server_address=server, retry_on_error=True )