nidaqlib.system¶
nidaqlib.system ¶
System discovery — :func:list_devices, :func:list_physical_channels.
Wraps :class:nidaqmx.system.System.local() enough to drive helpful CLI
commands and basic preflight validation; not a clone of NI MAX (design
doc §19).
DeviceInfo
dataclass
¶
DeviceInfo(
*,
name,
product_type,
serial_number,
ai_physical_channels,
ao_physical_channels,
di_lines,
do_lines,
ci_physical_channels,
co_physical_channels,
)
Snapshot of one NI device's identity and physical channel inventory.
Populated by :func:~nidaqlib.system.discovery.list_devices. Frozen so
consumers can pass it around without worrying about staleness — re-call
discovery to refresh.
list_devices ¶
Enumerate visible NI devices and their physical-channel inventories.
Returns:
| Name | Type | Description |
|---|---|---|
One |
list[DeviceInfo]
|
class: |
list[DeviceInfo]
|
is present. |
Raises:
| Type | Description |
|---|---|
NIDaqBackendError
|
NI raised an unexpected error during enumeration. |
NIDaqDependencyError
|
|
Source code in src/nidaqlib/system/discovery.py
list_physical_channels ¶
Return AI physical channel names for device (e.g. "Dev1").
For inventories of AO / DI / DO / counters, use :func:list_devices and
inspect the returned :class:DeviceInfo.
Raises:
| Type | Description |
|---|---|
NIDaqBackendError
|
NI rejected the request (e.g. unknown device). |