Discovery & capabilities¶
Enumerate boards and subsystems and introspect what each one can do before you configure a task. See the Discovery & capabilities guide.
dtollib.system ¶
System-level discovery + capability query.
Public surface:
- :func:
find_devices— enumerate every installed DT-Open Layers board. - :func:
find_subsystems— enumerate subsystems on a given board. - :class:
CapabilitySet— typed view over an HDASS's reported caps. - :class:
BoardInfo, :class:SubsystemInfo, :class:DeviceInfo— immutable result dataclasses.
Discovery / lifecycle / capability surface; :class:CapabilitySet extends as new
capability flags become relevant (e.g. OLSSC_SUP_PAUSE for continuous streaming).
Design reference: docs/design.md §20.
BoardInfo
dataclass
¶
One DT-Open Layers board as reported by olDaEnumBoardsEx.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Board name passed to :func: |
model |
str
|
Model identifier from |
driver_name |
str
|
Kernel-mode driver name from the registry
(e.g. |
instance |
int
|
Driver instance number; non-zero when multiple boards of the same model are installed. |
CapabilitySet
dataclass
¶
CapabilitySet(
*,
supports_singlevalue,
supports_continuous,
supports_simultaneous_sh,
supports_simultaneous_da,
supports_multisensor,
supports_singleended,
supports_dma,
supports_autocal,
supports_singlevalue_autorange,
supports_inprocess_flush,
supports_interleaved_cjc_in_stream,
returns_floats,
supports_thermocouples=False,
supports_ctmode_measure=False,
supports_quadrature_decoder=False,
supports_mute=False,
supports_wrp_waveform=False,
supports_put_single_values=False,
supports_synchronous_digitalio=False,
current_outputs=False,
max_digitaliolist_value=0,
resolution=0,
num_channels,
cgl_depth,
max_throughput_hz,
ranges=tuple(),
gains=tuple(),
)
Consolidated capability view for one HDASS.
All fields are populated at construction time from the SDK; the typed view is then used in lieu of raw flag queries throughout the codebase.
Attributes:
| Name | Type | Description |
|---|---|---|
supports_singlevalue |
bool
|
|
supports_continuous |
bool
|
|
supports_simultaneous_sh |
bool
|
|
supports_simultaneous_da |
bool
|
|
supports_multisensor |
bool
|
|
supports_singleended |
bool
|
|
supports_dma |
bool
|
|
supports_autocal |
bool
|
|
supports_singlevalue_autorange |
bool
|
|
supports_inprocess_flush |
bool
|
|
supports_interleaved_cjc_in_stream |
bool
|
|
returns_floats |
bool
|
|
supports_thermocouples |
bool
|
|
supports_ctmode_measure |
bool
|
|
supports_quadrature_decoder |
bool
|
|
supports_mute |
bool
|
|
supports_wrp_waveform |
bool
|
|
supports_put_single_values |
bool
|
|
supports_synchronous_digitalio |
bool
|
|
current_outputs |
bool
|
|
max_digitaliolist_value |
int
|
|
resolution |
int
|
|
num_channels |
int
|
|
cgl_depth |
int
|
|
max_throughput_hz |
float | None
|
|
ranges |
tuple[tuple[float, float], ...]
|
Supported input ranges as |
gains |
tuple[float, ...]
|
Supported programmable-gain values from
|
supports_simultaneous ¶
True if either AI or AO simultaneous-sample-hold is supported.
DeviceInfo
dataclass
¶
A single device endpoint = board + one subsystem.
Mirrors the nidaqlib :class:DeviceInfo shape so cross-instrument
experiment scripts that loop over find_devices() see the same
field names. Discovery populates board + subsystem_type +
element; single-value sessions construct a :class:DeviceInfo
per open subsystem.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Human-readable device identifier; typically
|
board |
BoardInfo
|
Owning :class: |
subsystem_type |
SubsystemType
|
Typed subsystem kind. |
element |
int
|
Element index of the subsystem on the board. |
SubsystemInfo
dataclass
¶
SubsystemInfo(
*,
type,
element,
num_channels,
supports_singlevalue,
supports_continuous,
supports_simultaneous_sh,
supports_multisensor,
supports_dma,
returns_floats,
max_throughput_hz,
cgl_depth,
)
One subsystem on a board, as reported by capability queries.
The capability-query surface populates the boolean-cap fields and
the two most common integer fields (num_channels, cgl_depth).
Sensor-list capabilities, range lists, etc. are not yet populated.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
SubsystemType
|
Typed subsystem kind. |
element |
int
|
Element index — |
num_channels |
int
|
Number of physical channels on the subsystem
( |
supports_singlevalue |
bool
|
|
supports_continuous |
bool
|
|
supports_simultaneous_sh |
bool
|
|
supports_multisensor |
bool
|
|
supports_dma |
bool
|
|
returns_floats |
bool
|
|
max_throughput_hz |
float | None
|
|
cgl_depth |
int
|
|
find_devices
async
¶
Enumerate every installed DT-Open Layers board.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
DtolBackend | None
|
Backend to query. Defaults to a freshly-constructed
:class: |
None
|
Returns:
| Type | Description |
|---|---|
list[BoardInfo]
|
List of :class: |
list[BoardInfo]
|
installed or the SDK is unavailable. |
Source code in src/dtollib/system/discovery.py
find_subsystems
async
¶
Enumerate subsystems on a board.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
board
|
BoardInfo | str
|
A :class: |
required |
backend
|
DtolBackend | None
|
Backend to query. Defaults to a freshly-constructed
:class: |
None
|
Returns:
| Type | Description |
|---|---|
list[SubsystemInfo]
|
List of :class: |
list[SubsystemInfo]
|
the failure is logged. |
Source code in src/dtollib/system/discovery.py
query_capabilities ¶
Build a :class:CapabilitySet for hdass from SDK queries.
Composition order matters per the SDK manual: olDaGetSSCaps
is queried first to establish which downstream queries are valid.
The boolean / integer / float caps below are each queried
individually; subsystems that don't support a particular cap
return an error from olDaGetSSCaps which we map to the
"feature absent" default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api
|
OpenLayersApi
|
Bound :class: |
required |
hdass
|
int
|
Subsystem handle. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Immutable |
CapabilitySet
|
class: |
CapabilitySet
|
queries. |