Instrument#
- class Instrument(
- name: str,
- publishers: list[Publisher] | None = None,
- background_config: BackgroundDaemonConfig | None = None,
- legacy_naming: bool = False,
- **kwargs,
Bases:
objectBase class for Nominal instrument interfaces. Owns publishing and the background daemon.
Initialize an Instrument.
- Parameters:
name – Channel-name prefix for published data.
publishers – Publishers that receive emitted Measurement/Command data.
background_config – Background-daemon settings; default if omitted.
legacy_naming – When True, publish channels under their pre-v1.0 names (e.g.
main.ch1_vinstead ofmain.ch1.voltagefor PSU) for dashboards or recorded datasets keyed on those names. The setting is all-or-nothing per instrument. PSU, ELoad, I2C, InstroScope, and DAQ digital channels honor the flag; the categories with no v1.0 rename (DMM, Modbus, DAQ analog and relay channels) ignore it. Scheduled for removal in v2.0.**kwargs – Default tags applied to every emitted
MeasurementorCommand. Passdataset_rid="<rid>"to auto-create a NominalCorePublisher (uses the on-disk ‘default’ Nominal credential).
Attributes
Seconds between background daemon iterations (0 = no wait). |
|
Return an insertion-ordered snapshot of all published channel names. |
Methods
Append |
|
Register a publisher to receive this instrument's Measurement/Command data. |
|
Stop the background daemon and close every publisher. |
|
Replace all daemon functions with a single |
|
Return the most recent |
|
Return the most recent sample for |
|
No-op base hook. |
|
Fan |
|
Start the background daemon thread. |
|
Signal the background daemon to stop and join it. |
|
Build a single-channel |
|
Build a single-channel |