Daemon, Driver and Config Inventory#
This page is the concrete inventory the COO specification asks each instrument
to provide: what daemons exist, what hardware each owns, which driver it uses,
and what it exposes. It describes the current main branch and needs updating
whenever a daemon is added.
Daemon inventory#
Daemons are split by reusability, not by subsystem. daemons/generic/ holds
daemons whose behaviour is fully determined by config and which are therefore
shared across subsystems; daemons/<subsystem>/ holds daemons tied to one
subsystem’s hardware or to mechanism-specific logic. hspower/pdu is the one
exception to that rule: it is as config-driven as the generic daemons, but
every instance of it belongs to the hspower service, so it sits there with
its pdu_models/ capability files.
Daemon |
Driver |
Hardware |
Deployed instances |
|---|---|---|---|
|
|
Thorlabs FW102C filter wheel |
|
|
|
Lakeshore 336/224 temperature controller |
|
|
|
SRS PTC10 thermal controller |
|
|
|
Inficon VGC502 vacuum gauge controller |
|
|
|
PI C-663 / C-863 / E-754 motion controllers |
|
|
|
Newport SMC100PP ADC prism rotators |
|
|
|
Sunpower cryocooler |
|
|
|
Thorlabs PPC102 piezo gimbal mount |
|
|
|
Standa SMC8 (libximc) attenuator |
|
|
|
Eaton EMAT08-10 networked PDU |
|
Thirty-five instances are currently defined under systemd/instances/,
running twelve distinct daemon scripts — the config-driven design paying off
directly.
Subsystem view#
hsfei — Front End Instrument#
The FEI is the most complete subsystem, covering the pickoff and acquisition path, the ADC, the PIAA gimbal mounts, and the ATC (acquisition and tracking camera) environment.
Instance |
Mechanism |
|---|---|
|
FEI pickoff |
|
mask selector (two daisy-chained PI stages, H and V) |
|
lens selector mechanism |
|
ATC lens stage |
|
ATC pickoff stage |
|
atmospheric dispersion corrector, two prism rotators |
|
PIAA gimbal mounts, blue and red |
|
ATC filter wheel |
|
ATC temperature control |
|
ATC vacuum pressure |
|
ATC cryocooler |
hscal — Calibration#
The calibration unit covers the HK (red) and YJ (blue) calibration paths and the gas cell.
Instance |
Mechanism |
|---|---|
|
HK calibration filter wheels |
|
YJ calibration filter wheels |
|
gas cell filter wheel |
|
gas cell heaters |
|
etalon thermal control |
|
HK etalon attenuator |
hspower — power distribution#
Every Eaton PDU in the instrument is one hspower/pdu instance, and they all
live in this one service rather than with the subsystem they power, so that
outlet control is in a single place. Each is named for where the unit is.
Instance |
PDU |
|---|---|
|
FEI, two units ( |
|
CAL, four units |
|
FIB |
|
BSPEC ( |
|
RSPEC |
The addresses for the CAL, FIB and RSPEC units are not documented anywhere in
the repo yet, so those configs carry a TODO and no ip_address; such an
instance starts and serves its keywords, reporting missing PDU connection parameters through its error keyword, and connects once an address is
filled in. outlet_count is likewise a placeholder of 8 in every config
until each unit is confirmed as an EMAT-08 or an EMAT-10 — it decides how
many outlet keyword blocks the daemon registers.
The Telnet login is not in the configs. They name the environment variables
holding it (hardware.username_env, hardware.password_env, both pointing
at HISPEC_PDU_* today), which systemd supplies from root-only
/etc/hispec/secrets.env — the same arrangement the keygrabber uses for its
InfluxDB token. An inline hardware.username / hardware.password still
works for a bench test and logs a warning against committing it.
Placeholder subsystems#
daemons/hscryo, daemons/hstt and daemons/hscam exist as empty
placeholders for the cryostat, tip-tilt and detector subsystems. The
spectrograph itself has no daemon directory yet.
Keyword inventory#
Keywords every daemon has#
Inherited from LibbyDaemon and registered without the daemon asking:
Keyword |
Type |
Access |
Meaning |
|---|---|---|---|
|
int |
read |
Whole seconds since the daemon started serving. |
|
string |
read / clear |
The most recent message passed to |
|
service |
read |
Registered keyword names, |
|
service |
read |
Full metadata for one keyword: type, access, units, description, timeout. |
Registered by HISPEC daemons themselves, by near-universal convention:
Keyword |
Type |
Access |
Meaning |
|---|---|---|---|
|
bool |
read / write |
Whether the daemon holds a live connection to its controller. Writing |
|
string |
read |
Last error string recorded by the daemon’s own error state. |
|
trigger |
write |
Stop this daemon gracefully. |
Per-daemon keywords#
Motion daemons (pi-daemon, adc, filterwheel, smc8_attenuator)
share a vocabulary:
Keyword |
Meaning |
|---|---|
|
Current position in the mechanism’s configured units. Writable to move. |
|
Current position as a configured name; writable to move to a named position. |
|
Motion in progress. |
|
Stage has been homed. Writable to home. |
|
Servo loop closed. Writable. |
|
Daemon-enforced limits, writable at runtime. |
|
Controller limits, read-only. |
|
Trigger — stop motion on all axes. |
Multi-axis daemons suffix the per-axis keywords and add an aggregate. A
mechanism with more than one stage registers positionvalue<suffix>,
ismoving<suffix> and so on — the PI daemon uses the stage name from config
(positionvalueh, positionvaluev for the mask selector), the ADC uses the
stage number (positionvalue1, positionvalue2). Alongside those, the daemon
registers unsuffixed consolidated keywords covering the whole mechanism:
isreferenced is true when all stages are referenced and writing it homes
every stage, ismoving is true when any stage is moving, isloopclosed
aggregates likewise and one write closes every loop. A single-stage config
registers the bare names directly, so a client that only cares about the
mechanism as a whole uses the same keyword either way.
Thermal daemons (lakeshore, srsthermal) generate their keywords from
config. Each entry in sensors: produces one read-only temperature keyword
under the name the config chose; each entry in heaters: produces a writable
setpoint plus, for the Lakeshore, <name>_output, <name>_status and one
keyword per PID term.
atccryo exposes cryocooler state — cold_head_temp, reject_temp,
target_temp, measured_power, commanded_power, control_mode,
cooler_error — plus pid_<term> keywords for the control loop.
inficon exposes pressure1, pressure2, temperature, units and
units_code.
piaa-gimbalmount carries the largest keyword set: X/Y positions in both
position and voltage units, per-axis and combined loop-closed state, and a full
soft/hard limit matrix in both units — softmaxx, softminvolty, hardmaxx
and so on.
pdu registers device-level keywords (model, manufacturer, firmware,
serial, outletcount, status) plus a per-outlet block —
outletstate<n>, outletname<n>, outletcurrent<n>, outletpower<n>,
outletenergy<n>, outletautorestart<n>, outletswitchable<n>,
resetstatistics<n> — with the set of outlets and their capabilities read from
pdu_models/*.yaml.
Config inventory#
config/<subsystem>/<instance>.yaml, one file per instance, forty-four
files at present — thirty-five of them backing a deployed systemd instance.
config/example/ holds templates for daemons not yet deployed.
Config is the source of truth for:
Parameter group |
Owner |
Runtime mutability |
|---|---|---|
|
config only |
fixed at startup |
|
config only |
fixed at startup |
|
config, overridable |
writable via |
|
controller, or config where the controller cannot report them |
read-only |
|
config only |
fixed at startup |
|
config only |
fixed at startup; determines which keywords exist |
|
config only |
fixed at startup |
The one writable-at-runtime group is soft limits. A runtime change to
softmin/softmax lives only in the daemon process and is lost on restart,
which is worth knowing before relying on one during AIT.
Adding a daemon#
The mechanics, in the order they are done:
Add the vendor driver as a submodule under
src/hispec/driver/if it is not already vendored.If an existing daemon covers the hardware, skip to step 4 — most new mechanisms need no new Python.
Otherwise write
daemons/<subsystem>/<name>: subclassHispecDaemon, register keywords inon_start, disconnect inon_stop, and give it anargparse-c/--configentry point that callsfrom_config_file(...)thenserve().Add
config/<subsystem>/<instance>.yaml.Add
systemd/instances/<instance>.envnaming the script and the deployed config path.Add the row to the instance table in Running the HISPEC Daemons with systemd and to the daemon inventory above.