Repository navigation
[0.3.0] - 2026-05-15
Unified API (v1)
Cross-library API alignment with the sibling instrument libraries
(alicatlib, sartoriuslib, watlowlib). No deprecation aliases —
old names are removed.
Added
find_devices() -> list[DiscoveryResult](replaceslist_devices())
withDiscoveryResult/NIDaqDiscoveryResultmatching the shared
§B shape (ok,port,address=None,protocol=None,device_info,
error,elapsed_s). Never raises — enumeration failures surface as
a singleok=Falserow.Recording[T]wrapper (stream,summary,rate_hz) replaces the
(stream, summary)tuple fromrecord()/record_polled(). Sync
facade mirrors this asSyncRecording[T].PollSourceProtocol andPollSourceAdapter(session)for wrapping a
polledDaqSessioninto the uniformpoll(names) -> Mapping[str, DeviceResult[DaqReading]]shape.record_polled()accepts any
PollSourcein addition to the existing session/manager sources.NIDaqTransientError— new exception class for retry-safe NI codes.
Initial set:{-200279, -200284}. Extend via PR as new codes surface.DaqSession.snapshot()returningNIDaqSnapshot(extends new
DeviceSnapshotshared base). I/O-free — built from the cached
DeviceInfocaptured at configure time.TaskStateenum (CREATED/CONFIGURED/RUNNING/STOPPED/
CLOSED), exposed onDaqSession.task_state()andNIDaqSnapshot.DaqSession.recoverable_error_countpublic counter, incremented when
the recorder swallows aNIDaqTransientErrorunder
ErrorPolicy.RETURN. Resets on everyconfigure().nidaqlib.reading_to_rowandnidaqlib.block_to_rowspromoted to
top-level public exports.block_to_rowsreturns
list[dict[str, ScalarValue]]directly with per-samplet_mono_ns
/t_utcreconstructed fromblock.block_period_ns.nidaqlib.units.to_pint(unit)— lossy-by-design unit-string helper
coveringTemperatureUnitsplus a passthrough table for common
voltage / current / frequency / pressure strings.ProtocolKind(StrEnum)(no members) — stub type carried on
ErrorContext.protocolfor cross-library shape uniformity.nidaqlib.testing.NIDaqFakeBackendalias forFakeDaqBackend.
Changed (breaking)
list_devicesremoved. Usefind_devices(); returns
list[DiscoveryResult]instead oflist[DeviceInfo].nidaqlib.sinks.base.reading_to_rowprivate path removed.
Import fromnidaqlibdirectly.block_to_long_rowsrenamed in place toblock_to_rowsand
promoted to top-level. Return type changes fromIterator[DaqSample]
tolist[dict[str, ScalarValue]].DaqSampleclass removed. No internal caller remains after
block_to_rowsreturns dicts; row-oriented sinks accept
Sequence[DaqReading]only.DaqReading/DaqBlocktimestamp standardization:- Renamed
monotonic_ns→t_mono_nson both. - Added
t_utc: datetimeandt_midpoint_mono_ns: int | None. - Removed
DaqReading.midpoint_at(nowt_utc). - Added
DaqBlock.block_period_ns: int | None; removed
DaqBlock.dt_s(useblock_period_ns / 1e9). DaqBlock.sample_rate_hzis now a@propertyderived from
block_period_ns.- Block provenance fields (
task_started_at,t0,read_started_at,
read_finished_at,elapsed_s) retained.
- Renamed
ErrorContext.operationrenamed tocommand_name. All ~30 call
sites updated. New base fields:port,address=None,
protocol=None(alwaysNonefor NI).- NI error code
-200284reclassified fromNIDaqTimeoutErrorto
NIDaqTransientError. Callers catchingNIDaqTimeoutErrorfor this
code switch toNIDaqTransientError(or the common base
NIDaqError). DeviceResult.namefield removed. The mapping key already names
the task. New classmethod factoriesDeviceResult.success(value)/
DeviceResult.failure(error).record()andrecord_polled()yieldRecording(stream, summary, rate_hz)instead of(stream, summary)tuples. Sync wrappers
yieldSyncRecording[T].- Sink simplification:
SampleSinkProtocol andsample_to_row
removed.SqliteSinkandPostgresSinkdroptable_samples(only
table_readingsandtable_blocksremain).
Fixed
find_devicesno longer raises on cDAQ chassis modules that return
-200197("Device does not support this property") when queried for
compact_daq_chassis_device. Discovery now swallows the per-row
failure and returnsNonefor the optionalchassisfield.