device_config
Typed loader for fluid-control device configuration.
Parses a raw instrument-configuration mapping once and exposes the
component-scoped values consumed by
PressureOverLiquidControl as typed
attributes, keeping configuration-parsing concerns out of the engine.
DeviceConfig
Component-scoped view over a fluid-control instrument configuration.
Resolves a single component from a full instrument-configuration mapping and exposes the derived values required to initialise the engine.
Attributes:
| Name | Type | Description |
|---|---|---|
component_id |
str
|
Key identifying the component within the config. |
raw |
dict
|
The unmodified component-configuration mapping. Shared by reference with the engine so in-place calibration edits stay visible. |
active_channels |
list[int]
|
Active valve-terminal indices. |
active_valve_count |
int
|
Number of active valve terminals. |
channel_count |
int
|
Declared fluid-channel count for the component. |
pressure_interface |
InterfaceConfig
|
Pressure-controller connection. |
valve_interface |
InterfaceConfig
|
Valve-controller connection. |
valve_error_handling |
bool
|
Whether every valve enables error handling. |
Source code in src/fluid_control/device_config.py
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
calibration
property
Return the live calibration mapping (liquid class -> process -> data).
__init__(config, component_id)
Parse a component configuration from a full instrument config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict
|
Full instrument-configuration mapping. A
|
required |
component_id
|
str
|
Key identifying the component inside
|
required |
Source code in src/fluid_control/device_config.py
build_pressures()
Compute the per-liquid-class, per-process pressure mapping.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
|
dict
|
calibration mapping. |
Source code in src/fluid_control/device_config.py
flow_coefficients(liquid_class, process)
Return the flow-coefficient mapping for a liquid class and process.
liquid_classes()
volume_offset_coefficients(liquid_class, process)
Return the volume-offset-coefficient mapping for a liquid class and process.
InterfaceConfig
dataclass
Connection parameters for a hardware control module.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Control-module name (e.g. |
interface_type |
str
|
Transport identifier (e.g. |
ip |
str
|
Host address of the controller. |
port |
int
|
TCP port of the controller. |
unit_id |
int
|
Modbus unit / slave id of the controller. |