orangeqs.juice.fridge.protocols#

Protocols that fridge backend device drivers must conform to.

These are runtime_checkable structural protocols, not base classes: a driver class does not need to inherit from anything here, it only needs to implement the matching attributes and methods.

Module Contents#

Classes#

HeaterProtocol

Interface a heater device driver must implement.

ThermometryProtocol

Interface a thermometry unit driver must implement.

CompressorProtocol

Interface a pulse tube compressor driver must implement.

GHSProtocol

Interface a gas handling system driver must implement.

API#

class orangeqs.juice.fridge.protocols.HeaterProtocol#

Bases: typing.Protocol

Interface a heater device driver must implement.

property enabled: bool#

Whether the heater is currently enabled.

property power_setting: float#

Current power setting of the heater.

property output_power: float#

Current output power of the heater.

property datapoints: collections.abc.Sequence[orangeqs.juice.messaging.Event]#

Point representation of the heater’s current state.

async on() → bool#

Turn the heater on.

async off() → bool#

Turn the heater off.

async set_power(power: float) → bool#

Set the power setting of the heater.

async update() → bool#

Update the heater state.

class orangeqs.juice.fridge.protocols.ThermometryProtocol#

Bases: typing.Protocol

Interface a thermometry unit driver must implement.

property temperatures: collections.abc.Sequence[orangeqs.juice.fridge.data_structures.TemperaturePoint]#

Current temperature measurements.

async update() → bool#

Update the temperature readings.

class orangeqs.juice.fridge.protocols.CompressorProtocol#

Bases: typing.Protocol

Interface a pulse tube compressor driver must implement.

property enabled: bool#

Whether the compressor is currently enabled.

property datapoints: collections.abc.Sequence[orangeqs.juice.messaging.Event]#

Point representation of the compressor’s current state.

async on() → bool#

Start the compressor.

async off() → bool#

Stop the compressor.

async update() → bool#

Update the compressor state.

class orangeqs.juice.fridge.protocols.GHSProtocol#

Bases: typing.Protocol

Interface a gas handling system driver must implement.

property valve_states: dict[str, bool]#

Current states of all valves in the GHS.

property pump_states: dict[str, bool]#

Current states of all pumps in the GHS.

property datapoints: collections.abc.Sequence[orangeqs.juice.messaging.Event]#

Point representation of the GHS’s current state.

async open_valve(valve_id: str) → bool#

Open a valve.

async close_valve(valve_id: str) → bool#

Close a valve.

async start_pump(pump_id: str) → bool#

Start a pump.

async stop_pump(pump_id: str) → bool#

Stop a pump.

async start_condense_helium() → bool#

Start helium condensation.

async start_recover_helium() → bool#

Start helium recovery.

async update() → bool#

Update the GHS state.