Skip to content

dtollib.capi

The hand-rolled ctypes binding to the DataAcq SDK. See Binding for the layout and the header-verification process.

prototypes

dtollib.capi.prototypes

ctypes prototype declarations for the DataAcq SDK surface.

Two declaration functions, applied once per :class:OpenLayersDlls instance:

  • :func:declare_oldaapi — binds the acquisition/discovery functions on the oldaapi*.dll handle: 15 discovery/lifecycle/capability functions plus ~17 single-value configuration + read functions.
  • :func:declare_olmem — binds the buffer/version/error helpers on the olmem*.dll handle.

Each prototype sets argtypes + restype explicitly. Skipping argtypes lets ctypes infer types from Python values at call time, which means a long Python int silently truncates an LPARAM without warning — exactly the §11.5 hazard this module exists to prevent.

The core olmem surface is only olDmGetVersion and olDmGetErrorString; the buffer-management functions accompany the continuous buffer pool.

Header-verification status: see docs/decisions.md.

declare_oldaapi

declare_oldaapi(dll)

Bind the discovery + single-value olDa* function prototypes on dll.

Mutates dll in place, setting argtypes + restype on every function in :data:DISCOVERY_OLDAAPI_FUNCTIONS + :data:SINGLE_VALUE_OLDAAPI_FUNCTIONS. Idempotent: calling twice on the same handle re-applies the same bindings.

Parameters:

Name Type Description Default
dll CDLL

Handle returned by :func:ctypes.WinDLL for oldaapi*.dll.

required

Raises:

Type Description
AttributeError

If a function in the listed sets is missing from the DLL. Indicates a wrong-version SDK or a corrupted install; the caller usually wraps this in a :class:~dtollib.errors.DtolDependencyError with installation guidance.

Source code in src/dtollib/capi/prototypes.py
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
def declare_oldaapi(dll: CDLL) -> None:  # noqa: PLR0915
    """Bind the discovery + single-value ``olDa*`` function prototypes on ``dll``.

    Mutates ``dll`` in place, setting ``argtypes`` + ``restype`` on
    every function in :data:`DISCOVERY_OLDAAPI_FUNCTIONS` +
    :data:`SINGLE_VALUE_OLDAAPI_FUNCTIONS`.  Idempotent: calling twice on
    the same handle re-applies the same bindings.

    Args:
        dll: Handle returned by :func:`ctypes.WinDLL` for
            ``oldaapi*.dll``.

    Raises:
        AttributeError: If a function in the listed sets is missing
            from the DLL.  Indicates a wrong-version SDK or a
            corrupted install; the caller usually wraps this in a
            :class:`~dtollib.errors.DtolDependencyError` with
            installation guidance.
    """
    # ===== Discovery / lifecycle / capability =============================

    # --- Version / error string ---
    f = dll.olDaGetVersion
    f.argtypes = [c_char_p, c_uint]
    f.restype = ECODE

    f = dll.olDaGetErrorString
    f.argtypes = [ECODE, c_char_p, c_uint]
    f.restype = ECODE

    # --- Board enumeration ---
    f = dll.olDaEnumBoards
    f.argtypes = [BOARD_ENUM_PROC, LPARAM]
    f.restype = ECODE

    f = dll.olDaEnumBoardsEx
    f.argtypes = [BOARD_ENUM_EX_PROC, LPARAM]
    f.restype = ECODE

    f = dll.olDaGetBoardInfo
    # (LPSTR lpszBoardName, LPSTR lpszModel, UINT model_size,
    #  LPSTR lpszDriver, UINT driver_size)
    f.argtypes = [c_char_p, c_char_p, c_uint, c_char_p, c_uint]
    f.restype = ECODE

    # --- Device lifecycle ---
    f = dll.olDaInitialize
    f.argtypes = [c_char_p, POINTER(HDRVR)]
    f.restype = ECODE

    f = dll.olDaTerminate
    f.argtypes = [HDRVR]
    f.restype = ECODE

    # --- Subsystem enumeration ---
    f = dll.olDaEnumSubSystems
    f.argtypes = [HDRVR, SS_ENUM_PROC, LPARAM]
    f.restype = ECODE

    # --- Capability queries ---
    f = dll.olDaGetDevCaps
    f.argtypes = [HDRVR, c_uint, c_uint, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDaGetDASS
    f.argtypes = [HDRVR, c_uint, c_uint, POINTER(HDASS)]
    f.restype = ECODE

    f = dll.olDaReleaseDASS
    f.argtypes = [HDASS]
    f.restype = ECODE

    f = dll.olDaGetSSCaps
    f.argtypes = [HDASS, c_uint, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDaGetSSCapsEx
    f.argtypes = [HDASS, c_uint, POINTER(c_double)]
    f.restype = ECODE

    f = dll.olDaEnumSSCaps
    f.argtypes = [HDASS, c_uint, SS_CAP_ENUM_PROC, LPARAM]
    f.restype = ECODE

    f = dll.olDaEnumChannelCaps
    f.argtypes = [HDASS, c_uint, c_uint, CHAN_CAP_ENUM_PROC, LPARAM]
    f.restype = ECODE

    # ===== Single-value configuration + read ==============================

    # --- Subsystem-level configuration ---

    f = dll.olDaSetDataFlow
    # (HDASS, UINT mode)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    # olDaSetStopOnError — absent in SDK V7.0.0.7; bind when present.
    optional_f = _try_bind(dll, "olDaSetStopOnError")
    if optional_f is not None:
        optional_f.argtypes = [HDASS, c_int]
        optional_f.restype = ECODE

    # --- Per-channel configuration ---

    f = dll.olDaSetChannelType
    # (HDASS, UINT channel_type)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetChannelRange
    # (HDASS, DBL gain, UINT channel)
    # NOTE: SDK manual signature varies by version; we use the
    # (DBL min, DBL max, UINT channel) variant per the C examples.
    f.argtypes = [HDASS, c_double, c_double, c_uint]
    f.restype = ECODE

    f = dll.olDaSetRange
    # (HDASS, DBL max, DBL min)
    f.argtypes = [HDASS, c_double, c_double]
    f.restype = ECODE

    f = dll.olDaSetGainListEntry
    # (HDASS, UINT list_index, UINT channel, DBL gain)
    f.argtypes = [HDASS, c_uint, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetMultiSensorType
    # (HDASS, UINT channel, UINT sensor_type)
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetThermocoupleType
    # (HDASS, UINT channel, UINT tc_type)
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetReturnCjcTemperatureInStream
    # (HDASS, BOOL enable)
    f.argtypes = [HDASS, c_int]
    f.restype = ECODE

    f = dll.olDaConfig
    # (HDASS)
    f.argtypes = [HDASS]
    f.restype = ECODE

    # --- State / lifecycle ---

    # olDaGetSSState — absent in SDK V7.0.0.7; bind when present.
    # DataAcqBackend.get_state derives state from is_running() instead.
    optional_f = _try_bind(dll, "olDaGetSSState")
    if optional_f is not None:
        optional_f.argtypes = [HDASS, POINTER(c_ulong)]
        optional_f.restype = ECODE

    f = dll.olDaStart
    f.argtypes = [HDASS]
    f.restype = ECODE

    f = dll.olDaStop
    f.argtypes = [HDASS]
    f.restype = ECODE

    f = dll.olDaAbort
    f.argtypes = [HDASS]
    f.restype = ECODE

    f = dll.olDaIsRunning
    # (HDASS, PBOOL out)
    f.argtypes = [HDASS, POINTER(c_int)]
    f.restype = ECODE

    # --- Single-value reads ---

    f = dll.olDaGetSingleValue
    # (HDASS, PLNG out, UINT channel, DBL gain)
    f.argtypes = [HDASS, POINTER(c_ulong), c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaGetSingleFloat
    # (HDASS, PFLT out, UINT channel, DBL gain)
    f.argtypes = [HDASS, POINTER(c_float), c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaGetSingleValueEx
    # Autoranging variant — same signature as olDaGetSingleValue.
    f.argtypes = [HDASS, POINTER(c_ulong), c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaGetSingleValues
    # (HDASS, PLNG out_array, DBL gain) — simultaneous SH
    f.argtypes = [HDASS, POINTER(c_ulong), c_double]
    f.restype = ECODE

    f = dll.olDaGetSingleFloats
    # (HDASS, PFLT out_array, DBL gain) — simultaneous SH + engineering
    f.argtypes = [HDASS, POINTER(c_float), c_double]
    f.restype = ECODE

    f = dll.olDaGetCjcTemperature
    # (HDASS, PFLT out, UINT channel)
    f.argtypes = [HDASS, POINTER(c_float), c_uint]
    f.restype = ECODE

    f = dll.olDaCodeToVolts
    # (HDASS, LNG code, PDBL out, DBL gain)
    f.argtypes = [HDASS, c_ulong, POINTER(c_double), c_double]
    f.restype = ECODE

    f = dll.olDaVoltsToCode
    # (HDASS, DBL volts, PLNG out, DBL gain)
    f.argtypes = [HDASS, c_double, POINTER(c_ulong), c_double]
    f.restype = ECODE

    # --- Input scaling (needed because olDaCodeToVolts returns ECODE=9
    #     "Invalid Encoding" on the DT9805/DT9806 AD; we convert ourselves). ---

    f = dll.olDaGetEncoding
    # (HDASS, PUINT out)
    f.argtypes = [HDASS, POINTER(c_uint)]
    f.restype = ECODE

    f = dll.olDaGetResolution
    # (HDASS, PUINT out_bits)
    f.argtypes = [HDASS, POINTER(c_uint)]
    f.restype = ECODE

    f = dll.olDaGetRange
    # (HDASS, PDBL out_max, PDBL out_min)
    f.argtypes = [HDASS, POINTER(c_double), POINTER(c_double)]
    f.restype = ECODE

    # ===== Continuous AI ===================================================

    # --- Continuous-mode channel-list configuration ---

    f = dll.olDaSetChannelListSize
    # (HDASS, UINT size)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetChannelListEntry
    # (HDASS, UINT list_index, UINT channel)
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetChannelListEntryInhibit
    # (HDASS, UINT list_index, BOOL inhibit)
    f.argtypes = [HDASS, c_uint, c_int]
    f.restype = ECODE

    # --- Clock configuration ---

    f = dll.olDaSetClockSource
    # (HDASS, UINT source)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetClockFrequency
    # (HDASS, DBL frequency_hz)
    f.argtypes = [HDASS, c_double]
    f.restype = ECODE

    f = dll.olDaGetClockFrequency
    # (HDASS, PDBL out_hz)
    f.argtypes = [HDASS, POINTER(c_double)]
    f.restype = ECODE

    f = dll.olDaSetExternalClockDivider
    # (HDASS, ULNG divider)
    f.argtypes = [HDASS, c_ulong]
    f.restype = ECODE

    # --- Trigger configuration ---

    f = dll.olDaSetTrigger
    # (HDASS, UINT trigger_kind)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetTriggerThresholdChannel
    # (HDASS, UINT channel)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetTriggerThresholdLevel
    # (HDASS, DBL level_volts)
    f.argtypes = [HDASS, c_double]
    f.restype = ECODE

    # --- Buffer / DMA configuration ---

    f = dll.olDaSetWrapMode
    # (HDASS, UINT mode)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetDmaUsage
    # (HDASS, UINT n_channels)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    # --- Notification ---
    #
    # Buffer-done events are delivered via olDaSetWndHandle + a Win32 message
    # pump (the olDaSetNotificationProcedure callback never fires on the
    # DT9805/06, SDK V7.0.0.7 — see docs/decisions.md).
    f = dll.olDaSetWndHandle
    # (HDASS, HWND hWnd, LPARAM lParam) — verified against OLDAAPI.H rev
    # SDK V7.0.0.7 (2026-05-28).
    f.argtypes = [HDASS, HWND, LPARAM]
    f.restype = ECODE

    f = dll.olDaGetQueueSize
    # (HDASS, UINT queue, PULNG out_size) — queue selector is the
    # OLx_QUE_* enum (0=Ready, 1=Inprocess, 2=Done).
    f.argtypes = [HDASS, c_uint, POINTER(c_ulong)]
    f.restype = ECODE

    # --- Buffer enqueue / dequeue ---

    f = dll.olDaPutBuffer
    # (HDASS, HBUF hbuf) — push onto the Ready queue.
    f.argtypes = [HDASS, HBUF]
    f.restype = ECODE

    f = dll.olDaGetBuffer
    # (HDASS, PHBUF out_hbuf) — pop from the Done queue.
    f.argtypes = [HDASS, POINTER(HBUF)]
    f.restype = ECODE

    f = dll.olDaFlushBuffers
    # (HDASS) — empty Ready + Done queues.
    f.argtypes = [HDASS]
    f.restype = ECODE

    # olDmCopyFromBuffer lives on the olmem DLL — declared in declare_olmem.

    # ===== Output surface (DT9806 AO / DO / DIO) ==========================

    f = dll.olDaPutSingleValue
    # (HDASS, LNG lValue, UINT uiChannel, DBL dGain) — one-shot code write.
    # OLDAAPI.H: ECODE olDaPutSingleValue(HDASS, LNG, UINT, DBL).
    f.argtypes = [HDASS, c_long, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaPutSingleValues
    # (HDASS, PLNG plValues, DBL dGain) — simultaneous code write across the
    # configured channel list.  OLDAAPI.H: ECODE olDaPutSingleValues(HDASS,
    # PLNG, DBL).
    f.argtypes = [HDASS, POINTER(c_long), c_double]
    f.restype = ECODE

    f = dll.olDaSetSynchronousDigitalIOUsage
    # (HDASS, BOOL fUse) — enable scan-synchronised digital I/O.
    f.argtypes = [HDASS, c_int]
    f.restype = ECODE

    f = dll.olDaSetDigitalIOListEntry
    # (HDASS, UINT uiEntry, UINT uiValue) — bind a digital port at a list slot.
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    # olDaMute / olDaUnMute are declared in OLDAAPI.H but are NOT exported
    # by oldaapi64.dll V7.0.0.7 (bench-confirmed 2026-05-28).  Bind them
    # optionally so a DLL build lacking them does not break backend init;
    # the AO mute path raises a clean capability error at call time.
    mute = _try_bind(dll, "olDaMute")
    if mute is not None:
        mute.argtypes = [HDASS]
        mute.restype = ECODE
    unmute = _try_bind(dll, "olDaUnMute")
    if unmute is not None:
        unmute.argtypes = [HDASS]
        unmute.restype = ECODE

    # ===== Counter/timer, tachometer, quadrature, sim-start ===============

    # --- Counter/timer configuration ---

    f = dll.olDaSetCTMode
    # (HDASS, UINT mode) — OL_CTMODE_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    # The C/T clock is configured through the generic olDaSetClockSource /
    # olDaSetClockFrequency (declared with the single-value setters): this
    # DLL exports no olDaSetCTClock* variants.  See
    # OpenLayersApi.set_ct_clock_*.

    f = dll.olDaSetGateType
    # (HDASS, UINT gate) — OL_GATE_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetPulseType
    # (HDASS, UINT polarity) — OL_PULSETYPE_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetPulseWidth
    # (HDASS, DBL duty_or_width) — duty cycle (0..1) for rate, width for one-shot.
    f.argtypes = [HDASS, c_double]
    f.restype = ECODE

    f = dll.olDaSetMeasureStartEdge
    # (HDASS, UINT edge) — OL_EDGE_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetMeasureStopEdge
    # (HDASS, UINT edge) — OL_EDGE_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetCascadeMode
    # (HDASS, BOOL cascade) — cascade two counters into a 32-bit counter.
    f.argtypes = [HDASS, c_int]
    f.restype = ECODE

    # --- Counter/timer read ---

    f = dll.olDaReadEvents
    # (HDASS, UINT channel, PULNG out_count)
    f.argtypes = [HDASS, c_uint, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDaMeasureFrequency
    # (HDASS, UINT channel, PDBL out_freq_hz)
    f.argtypes = [HDASS, c_uint, POINTER(c_double)]
    f.restype = ECODE

    # --- Triggered-scan retrigger ---

    f = dll.olDaSetTriggeredScanUsage
    # (HDASS, UINT enable)
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetMultiscanCount
    # (HDASS, ULNG count) — scans per trigger.
    f.argtypes = [HDASS, c_ulong]
    f.restype = ECODE

    f = dll.olDaSetRetriggerMode
    # (HDASS, UINT mode) — OL_RETRIG_* selector.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetRetrigger
    # (HDASS, UINT source) — retrigger source for EXTRA mode (OL_TRG_* selector).
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetRetriggerFrequency
    # (HDASS, DBL freq_hz) — internal retrigger rate for INTERNAL mode.
    f.argtypes = [HDASS, c_double]
    f.restype = ECODE

    # --- Simultaneous start (HSSLIST) ---

    f = dll.olDaGetSSList
    # (HDRVR, PHSSLIST out_list)
    f.argtypes = [HDRVR, POINTER(HSSLIST)]
    f.restype = ECODE

    f = dll.olDaPutDassToSSList
    # (HSSLIST, HDASS)
    f.argtypes = [HSSLIST, HDASS]
    f.restype = ECODE

    f = dll.olDaSimultaneousPrestart
    # (HSSLIST) — arm every subsystem in the list.  Header spelling is
    # "Prestart" (OLDAAPI.H:243), not "PreStart".
    f.argtypes = [HSSLIST]
    f.restype = ECODE

    f = dll.olDaSimultaneousStart
    # (HSSLIST) — start every subsystem in the list on one trigger.
    f.argtypes = [HSSLIST]
    f.restype = ECODE

    f = dll.olDaReleaseSSList
    # (HSSLIST) — release the simultaneous-start list handle.
    f.argtypes = [HSSLIST]
    f.restype = ECODE

    # ===== Multi-sensor configuration (DT9828/9829/9837) ==================
    #
    # OLDADEFS.H enum args (COUPLING_TYPE, EXCITATION_CURRENT_SRC,
    # STRAIN_GAGE_CONFIGURATION, BRIDGE_CONFIGURATION, OL_RTD_TYPE_*) are
    # plain C ints → c_uint here.

    # --- RTD ---

    f = dll.olDaSetRtdType
    # (HDASS, UINT channel, UINT rtd_type) — OL_RTD_TYPE_* selector.
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetRtdR0
    # (HDASS, UINT channel, DBL r0_ohms)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetRtdA
    # (HDASS, UINT channel, DBL a) — Callendar-Van Dusen A.
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetRtdB
    # (HDASS, UINT channel, DBL b)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetRtdC
    # (HDASS, UINT channel, DBL c)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    # --- Thermistor (Steinhart-Hart) ---

    f = dll.olDaSetThermistorA
    # (HDASS, UINT channel, DBL a)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetThermistorB
    # (HDASS, UINT channel, DBL b)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    f = dll.olDaSetThermistorC
    # (HDASS, UINT channel, DBL c)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    # --- Coupling + excitation current ---

    f = dll.olDaSetCouplingType
    # (HDASS, UINT channel, COUPLING_TYPE coupling) — DC=0, AC=1.
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetExcitationCurrentSource
    # (HDASS, UINT channel, EXCITATION_CURRENT_SRC src) — INTERNAL=0/EXTERNAL=1/DISABLED=2.
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetExcitationCurrentValue
    # (HDASS, UINT channel, DBL amps)
    f.argtypes = [HDASS, c_uint, c_double]
    f.restype = ECODE

    # --- Strain gage + bridge ---
    #
    # NOTE: the two strain *excitation* setters take NO channel argument —
    # excitation voltage is a subsystem-wide property (OLDAAPI.H:318/320).

    f = dll.olDaSetStrainExcitationVoltageSource
    # (HDASS, STRAIN_EXCITATION_VOLTAGE_SRC src) — INTERNAL=0/EXTERNAL=1.
    f.argtypes = [HDASS, c_uint]
    f.restype = ECODE

    f = dll.olDaSetStrainExcitationVoltage
    # (HDASS, DBL volts)
    f.argtypes = [HDASS, c_double]
    f.restype = ECODE

    f = dll.olDaSetStrainBridgeConfiguration
    # (HDASS, UINT channel, STRAIN_GAGE_CONFIGURATION cfg)
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    f = dll.olDaSetStrainShuntResistor
    # (HDASS, UINT channel, BOOL enabled)
    f.argtypes = [HDASS, c_uint, c_int]
    f.restype = ECODE

    f = dll.olDaSetBridgeConfiguration
    # (HDASS, UINT channel, BRIDGE_CONFIGURATION cfg)
    f.argtypes = [HDASS, c_uint, c_uint]
    f.restype = ECODE

    # --- Volts → engineering-unit conversions (pure, no HDASS) ---

    f = dll.olDaVoltsToStrain
    # (STRAIN_GAGE_CONFIGURATION cfg, DBL Vu, DBL Vs, DBL Vex, DBL GF,
    #  DBL Rg, DBL Rl, DBL Pr, DBL ShuntCorrection, PDBL out_strain)
    f.argtypes = [
        c_uint,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        POINTER(c_double),
    ]
    f.restype = ECODE

    f = dll.olDaVoltsToBridgeBasedSensor
    # (DBL Vu, DBL Vs, DBL Vex, DBL Tc, DBL Rg, DBL Rl, DBL RoInmV_V,
    #  DBL ShuntCorrection, PDBL out_value)
    f.argtypes = [
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        c_double,
        POINTER(c_double),
    ]
    f.restype = ECODE

    # --- TEDS readers (§8.B5) — output struct pointers (TedsApi.h) ---

    f = dll.olDaReadStrainGageHardwareTeds
    # (HDASS, UINT channel, PSTRAIN_GAGE_TEDS out)
    f.argtypes = [HDASS, c_uint, POINTER(STRAIN_GAGE_TEDS)]
    f.restype = ECODE

    f = dll.olDaReadStrainGageVirtualTeds
    # (PCHAR virtual_teds_filename, PSTRAIN_GAGE_TEDS out)
    f.argtypes = [c_char_p, POINTER(STRAIN_GAGE_TEDS)]
    f.restype = ECODE

    f = dll.olDaReadBridgeSensorHardwareTeds
    # (HDASS, UINT channel, PBRIDGE_SENSOR_TEDS out)
    f.argtypes = [HDASS, c_uint, POINTER(BRIDGE_SENSOR_TEDS)]
    f.restype = ECODE

    f = dll.olDaReadBridgeSensorVirtualTeds
    # (PCHAR virtual_teds_filename, PBRIDGE_SENSOR_TEDS out)
    f.argtypes = [c_char_p, POINTER(BRIDGE_SENSOR_TEDS)]
    f.restype = ECODE

declare_olmem

declare_olmem(dll)

Bind the olDm* function prototypes on dll.

The core olmem surface is the version + error-string helpers; the buffer-management functions (olDmAllocBuffer, olDmGetBufferPtr, etc.) accompany the continuous buffer pool.

Parameters:

Name Type Description Default
dll CDLL

Handle returned by :func:ctypes.WinDLL for olmem*.dll.

required
Source code in src/dtollib/capi/prototypes.py
def declare_olmem(dll: CDLL) -> None:
    """Bind the ``olDm*`` function prototypes on ``dll``.

    The core olmem surface is the version + error-string helpers; the
    buffer-management functions (``olDmAllocBuffer``,
    ``olDmGetBufferPtr``, etc.) accompany the continuous buffer pool.

    Args:
        dll: Handle returned by :func:`ctypes.WinDLL` for
            ``olmem*.dll``.
    """
    f = dll.olDmGetVersion
    f.argtypes = [c_char_p, c_uint]
    f.restype = ECODE

    f = dll.olDmGetErrorString
    f.argtypes = [ECODE, c_char_p, c_uint]
    f.restype = ECODE

    # ===== Buffer allocation + introspection ==============================

    f = dll.olDmCallocBuffer
    # (HGLOBAL hmem, HGLOBAL extra, ULNG n_samples, UINT bytes_per_sample,
    #  PHBUF out_hbuf) — zero-fills.
    f.argtypes = [c_ulong, c_ulong, c_ulong, c_uint, POINTER(HBUF)]
    f.restype = ECODE

    f = dll.olDmMallocBuffer
    # Same shape as Calloc but uninitialised.
    f.argtypes = [c_ulong, c_ulong, c_ulong, c_uint, POINTER(HBUF)]
    f.restype = ECODE

    f = dll.olDmReAllocBuffer
    # (HBUF hbuf, ULNG n_samples)
    f.argtypes = [HBUF, c_ulong]
    f.restype = ECODE

    f = dll.olDmFreeBuffer
    f.argtypes = [HBUF]
    f.restype = ECODE

    f = dll.olDmGetBufferPtr
    # (HBUF hbuf, PVOID *out_ptr) — returns the data pointer.
    f.argtypes = [HBUF, POINTER(c_char_p)]
    f.restype = ECODE

    f = dll.olDmGetBufferSize
    # (HBUF hbuf, PULNG out_n_samples)
    f.argtypes = [HBUF, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDmGetMaxSamples
    # (HBUF hbuf, PULNG out_max_samples)
    f.argtypes = [HBUF, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDmGetValidSamples
    # (HBUF hbuf, PULNG out_valid_samples)
    f.argtypes = [HBUF, POINTER(c_ulong)]
    f.restype = ECODE

    f = dll.olDmGetDataWidth
    # (HBUF hbuf, PUINT out_bytes_per_sample)
    f.argtypes = [HBUF, POINTER(c_uint)]
    f.restype = ECODE

    f = dll.olDmGetDataBits
    # (HBUF hbuf, PUINT out_resolution_bits)
    f.argtypes = [HBUF, POINTER(c_uint)]
    f.restype = ECODE

    f = dll.olDmCopyFromBuffer
    # (HBUF hbuf, PVOID dst, ULNG count, PULNG actual) — drain an
    # Inprocess HBUF without waiting.
    f.argtypes = [HBUF, c_char_p, c_ulong, POINTER(c_ulong)]
    f.restype = ECODE

    # ===== Host→buffer copy for continuous-AO waveform fill ===============

    f = dll.olDmCopyToBuffer
    # (HBUF hBuf, LPVOID lpAppBuffer, ULNG ulNumSamples) — fill an HBUF from
    # an application array.  Olmem.h: ECODE olDmCopyToBuffer(HBUF, LPVOID, ULNG).
    f.argtypes = [HBUF, c_void_p, c_ulong]
    f.restype = ECODE

    f = dll.olDmCopyBuffer
    # (HBUF, LPVOID) — copy an HBUF's valid samples into an application array.
    # Olmem.h: ECODE olDmCopyBuffer(HBUF, LPVOID).
    f.argtypes = [HBUF, c_void_p]
    f.restype = ECODE

api

dtollib.capi.api

Typed wrapper over the ctypes binding — :class:OpenLayersApi.

This is Layer 2 of the C-boundary stack (docs/design.md §10.3):

  • Layer 1 (:mod:dtollib.capi.prototypes) — raw ctypes signatures.
  • Layer 2 (this module) — output-pointer extraction + ECODE → typed-exception classification. One method per SDK function; every method routes through :func:~dtollib.capi.errors.check.
  • Layer 3 (:mod:dtollib.backend.dataacq) — session-level orchestration, capability cache, notification wrappers.

:class:OpenLayersApi does no state caching, no buffer-pool, no notification-wrapper management. It is a pure call shape. Anything that needs to hold onto a value across calls lives in :class:~dtollib.backend.dataacq.DataAcqBackend.

Discovery binds the 15 functions in :data:dtollib.capi.prototypes.DISCOVERY_OLDAAPI_FUNCTIONS plus the 2 in :data:dtollib.capi.prototypes.CORE_OLMEM_FUNCTIONS. Further capabilities extend the method surface; the AST-level test tests/unit/test_capi_api_check_invariant.py asserts the :func:~dtollib.capi.errors.check invariant on every new method.

BoardEnumRow

BoardEnumRow(
    *, name, driver="", instance=0, registry_path=""
)

One row emitted by :meth:OpenLayersApi.enum_boards_ex.

Plain attribute container (not a frozen dataclass) so the enumeration callback can construct rows quickly without spelling out keyword arguments. Higher layers re-shape these into the public :class:~dtollib.system.BoardInfo frozen dataclass.

Attributes:

Name Type Description
name

Board name (LPSTR lpszBoardName).

driver

Driver name (LPSTR lpszDriverName).

instance

Board instance integer.

registry_path

Registry path string.

Source code in src/dtollib/capi/api.py
def __init__(
    self,
    *,
    name: str,
    driver: str = "",
    instance: int = 0,
    registry_path: str = "",
) -> None:
    self.name = name
    self.driver = driver
    self.instance = instance
    self.registry_path = registry_path

OpenLayersApi

OpenLayersApi(dlls)

Typed wrapper over the DataAcq SDK ctypes binding.

Construction binds the discovery prototype set on both DLLs. Each public method on this class corresponds to one SDK function and follows the same pattern:

  1. Allocate output-pointer storage (e.g. hdass = HDASS()).
  2. Call the prototype with :func:byref as needed.
  3. Hand the returned status to :func:check.
  4. Return the extracted output (plain Python types — int, str, sequence, etc.).

The :func:check step is mandatory on every public method that returns a status: tests/unit/test_capi_api_check_invariant.py AST-walks this class and fails if a method body lacks a check(...) call.

No state caching: capability values, version strings, etc. are queried on every call. The session layer (:class:~dtollib.backend.dataacq.DataAcqBackend) caches results when caching is appropriate.

Bind discovery prototypes on dlls and capture the handle.

Parameters:

Name Type Description Default
dlls OpenLayersDlls

Loaded handle pair from :func:~dtollib.capi.loader.load_openlayers.

required
Source code in src/dtollib/capi/api.py
def __init__(self, dlls: OpenLayersDlls) -> None:
    """Bind discovery prototypes on ``dlls`` and capture the handle.

    Args:
        dlls: Loaded handle pair from
            :func:`~dtollib.capi.loader.load_openlayers`.
    """
    self._dlls = dlls
    declare_oldaapi(dlls.oldaapi)
    declare_olmem(dlls.olmem)

dlls property

dlls

Underlying loaded DLL handle pair (escape hatch).

abort

abort(hdass)

olDaAbort — immediate halt.

Source code in src/dtollib/capi/api.py
def abort(self, hdass: int) -> None:
    """``olDaAbort`` — immediate halt."""
    status = self._dlls.oldaapi.olDaAbort(HDASS(hdass))
    check(self._dlls, status, op="olDaAbort", source="oldaapi")

alloc_buffer

alloc_buffer(
    n_samples, sample_dtype_bytes, *, zero_init=True
)

olDmCallocBuffer / olDmMallocBuffer — allocate an HBUF.

Source code in src/dtollib/capi/api.py
def alloc_buffer(
    self,
    n_samples: int,
    sample_dtype_bytes: int,
    *,
    zero_init: bool = True,
) -> int:
    """``olDmCallocBuffer`` / ``olDmMallocBuffer`` — allocate an HBUF."""
    out = HBUF()
    fn = self._dlls.olmem.olDmCallocBuffer if zero_init else self._dlls.olmem.olDmMallocBuffer
    status = fn(0, 0, n_samples, sample_dtype_bytes, byref(out))
    op = "olDmCallocBuffer" if zero_init else "olDmMallocBuffer"
    check(
        self._dlls,
        status,
        op=op,
        source="olmem",
        extra={"n_samples": n_samples, "sample_dtype_bytes": sample_dtype_bytes},
    )
    return int(out.value or 0)

code_to_volts

code_to_volts(hdass, code, gain)

olDaCodeToVolts — oracle for the vectorised converter.

Source code in src/dtollib/capi/api.py
def code_to_volts(self, hdass: int, code: int, gain: float) -> float:
    """``olDaCodeToVolts`` — oracle for the vectorised converter."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaCodeToVolts(HDASS(hdass), code, byref(out), gain)
    check(
        self._dlls,
        status,
        op="olDaCodeToVolts",
        source="oldaapi",
        extra={"code": code, "gain": gain},
    )
    return float(out.value)

config

config(hdass)

olDaConfig — commit the configured state.

Source code in src/dtollib/capi/api.py
def config(self, hdass: int) -> None:
    """``olDaConfig`` — commit the configured state."""
    status = self._dlls.oldaapi.olDaConfig(HDASS(hdass))
    check(self._dlls, status, op="olDaConfig", source="oldaapi")

copy_buffer

copy_buffer(hbuf, n_samples, sample_dtype_bytes)

olDmCopyBuffer — copy an HBUF's valid samples into a host buffer.

Source code in src/dtollib/capi/api.py
def copy_buffer(self, hbuf: int, n_samples: int, sample_dtype_bytes: int) -> bytes:
    """``olDmCopyBuffer`` — copy an HBUF's valid samples into a host buffer."""
    size_bytes = n_samples * sample_dtype_bytes
    dst = ctypes.create_string_buffer(size_bytes)
    status = self._dlls.olmem.olDmCopyBuffer(HBUF(hbuf), ctypes.cast(dst, ctypes.c_void_p))
    check(
        self._dlls,
        status,
        op="olDmCopyBuffer",
        source="olmem",
        extra={"n_samples": n_samples},
    )
    return bytes(dst.raw[:size_bytes])

copy_from_buffer

copy_from_buffer(hbuf, n_samples, sample_dtype_bytes)

olDmCopyFromBuffer — drain the Inprocess HBUF without waiting.

Returns the actually-copied bytes; the SDK may transfer fewer samples than requested (device segment alignment).

Source code in src/dtollib/capi/api.py
def copy_from_buffer(
    self,
    hbuf: int,
    n_samples: int,
    sample_dtype_bytes: int,
) -> bytes:
    """``olDmCopyFromBuffer`` — drain the Inprocess HBUF without waiting.

    Returns the actually-copied bytes; the SDK may transfer fewer samples
    than requested (device segment alignment).
    """
    size_bytes = n_samples * sample_dtype_bytes
    dst = ctypes.create_string_buffer(size_bytes)
    actual = c_ulong(0)
    status = self._dlls.olmem.olDmCopyFromBuffer(
        HBUF(hbuf),
        ctypes.cast(dst, c_char_p),
        n_samples,
        byref(actual),
    )
    check(
        self._dlls,
        status,
        op="olDmCopyFromBuffer",
        source="olmem",
        extra={"requested_samples": n_samples, "actual_samples": int(actual.value)},
    )
    return bytes(dst.raw[: int(actual.value) * sample_dtype_bytes])

copy_to_buffer

copy_to_buffer(hbuf, data, n_samples)

olDmCopyToBuffer — fill an HBUF from a host byte buffer.

data is the little-endian sample payload; n_samples is the number of samples (not bytes) the SDK should copy in.

Source code in src/dtollib/capi/api.py
def copy_to_buffer(self, hbuf: int, data: bytes, n_samples: int) -> None:
    """``olDmCopyToBuffer`` — fill an HBUF from a host byte buffer.

    ``data`` is the little-endian sample payload; ``n_samples`` is the
    number of samples (not bytes) the SDK should copy in.
    """
    buf = ctypes.create_string_buffer(data, len(data))
    status = self._dlls.olmem.olDmCopyToBuffer(
        HBUF(hbuf), ctypes.cast(buf, ctypes.c_void_p), n_samples
    )
    check(
        self._dlls,
        status,
        op="olDmCopyToBuffer",
        source="olmem",
        extra={"n_samples": n_samples},
    )

enum_boards

enum_boards()

Enumerate board names via olDaEnumBoards.

Returns:

Type Description
list[str]

List of board name strings (e.g. ["DT9805(00)"]).

Source code in src/dtollib/capi/api.py
def enum_boards(self) -> list[str]:
    """Enumerate board names via ``olDaEnumBoards``.

    Returns:
        List of board name strings (e.g. ``["DT9805(00)"]``).
    """
    names: list[str] = []

    @BOARD_ENUM_PROC  # type: ignore[untyped-decorator]
    def _on_board(name: bytes, _lparam: int) -> int:  # pragma: no cover — driver invokes
        if name:
            names.append(name.decode("ascii", errors="replace"))
        return 1  # TRUE — continue enumeration

    status = self._dlls.oldaapi.olDaEnumBoards(_on_board, 0)
    check(self._dlls, status, op="olDaEnumBoards", source="oldaapi")
    return names

enum_boards_ex

enum_boards_ex()

Enumerate boards with registry info via olDaEnumBoardsEx.

Returns:

Name Type Description
One list[BoardEnumRow]

class:BoardEnumRow per enumerated board.

Source code in src/dtollib/capi/api.py
def enum_boards_ex(self) -> list[BoardEnumRow]:
    """Enumerate boards with registry info via ``olDaEnumBoardsEx``.

    Returns:
        One :class:`BoardEnumRow` per enumerated board.
    """
    rows: list[BoardEnumRow] = []

    @BOARD_ENUM_EX_PROC  # type: ignore[untyped-decorator]
    def _on_board(  # pragma: no cover — driver invokes
        name: bytes,
        driver: bytes,
        instance: int,
        registry: bytes,
        _lparam: int,
    ) -> int:
        if name:
            rows.append(
                BoardEnumRow(
                    name=name.decode("ascii", errors="replace"),
                    driver=(driver or b"").decode("ascii", errors="replace"),
                    instance=int(instance),
                    registry_path=(registry or b"").decode("ascii", errors="replace"),
                )
            )
        return 1

    status = self._dlls.oldaapi.olDaEnumBoardsEx(_on_board, 0)
    check(self._dlls, status, op="olDaEnumBoardsEx", source="oldaapi")
    return rows

enum_channel_caps

enum_channel_caps(hdass, channel, cap_id)

Enumerate per-channel capability values via olDaEnumChannelCaps.

The CHANNELCAPSPROC callback receives (uiEnumCap, uParam, dParam, lParam) — the enumerated value is the integer uParam (e.g. a supported multi-sensor type).

Source code in src/dtollib/capi/api.py
def enum_channel_caps(self, hdass: int, channel: int, cap_id: int) -> list[int]:
    """Enumerate per-channel capability values via ``olDaEnumChannelCaps``.

    The ``CHANNELCAPSPROC`` callback receives
    ``(uiEnumCap, uParam, dParam, lParam)`` — the enumerated value
    is the integer ``uParam`` (e.g. a supported multi-sensor type).
    """
    values: list[int] = []

    @CHAN_CAP_ENUM_PROC  # type: ignore[untyped-decorator]
    def _on_value(
        _cap: int, uparam: int, _dparam: float, _lparam: int
    ) -> int:  # pragma: no cover
        values.append(int(uparam))
        return 1

    status = self._dlls.oldaapi.olDaEnumChannelCaps(HDASS(hdass), channel, cap_id, _on_value, 0)
    check(
        self._dlls,
        status,
        op="olDaEnumChannelCaps",
        source="oldaapi",
        channel=channel,
        extra={"cap_id": cap_id},
    )
    return values

enum_ss_caps

enum_ss_caps(hdass, cap_id)

Enumerate discrete subsystem-capability values via olDaEnumSSCaps.

Used for capability IDs like OL_ENUM_RANGES / OL_ENUM_GAINS where the SDK exposes a list of supported values rather than a single integer. The CAPSPROC callback receives (uiEnumCap, dParam1, dParam2, lParam) — the first arg is the cap ID being listed, and the value(s) ride in the two doubles. For single-value caps (gains, filters, resolutions) only dParam1 is meaningful; for OL_ENUM_RANGES the pair is (max, min) matching :meth:get_range.

Returns:

Type Description
list[tuple[float, float]]

List of (dParam1, dParam2) tuples, one per enumerated

list[tuple[float, float]]

value, in SDK enumeration order.

Source code in src/dtollib/capi/api.py
def enum_ss_caps(self, hdass: int, cap_id: int) -> list[tuple[float, float]]:
    """Enumerate discrete subsystem-capability values via ``olDaEnumSSCaps``.

    Used for capability IDs like ``OL_ENUM_RANGES`` /
    ``OL_ENUM_GAINS`` where the SDK exposes a list of supported
    values rather than a single integer.  The ``CAPSPROC`` callback
    receives ``(uiEnumCap, dParam1, dParam2, lParam)`` — the first
    arg is the cap ID being listed, and the value(s) ride in the two
    doubles.  For single-value caps (gains, filters, resolutions)
    only ``dParam1`` is meaningful; for ``OL_ENUM_RANGES`` the pair
    is ``(max, min)`` matching :meth:`get_range`.

    Returns:
        List of ``(dParam1, dParam2)`` tuples, one per enumerated
        value, in SDK enumeration order.
    """
    values: list[tuple[float, float]] = []

    @SS_CAP_ENUM_PROC  # type: ignore[untyped-decorator]
    def _on_value(
        _cap: int, param1: float, param2: float, _lparam: int
    ) -> int:  # pragma: no cover
        values.append((float(param1), float(param2)))
        return 1

    status = self._dlls.oldaapi.olDaEnumSSCaps(HDASS(hdass), cap_id, _on_value, 0)
    check(
        self._dlls,
        status,
        op="olDaEnumSSCaps",
        source="oldaapi",
        extra={"cap_id": cap_id},
    )
    return values

enum_subsystems

enum_subsystems(hdrvr)

Enumerate HDASS handles on a device via olDaEnumSubSystems.

Parameters:

Name Type Description Default
hdrvr int

Device handle from :meth:initialize.

required

Returns:

Type Description
list[int]

List of HDASS handles (as Python ints) for every subsystem

list[int]

on the device. Caller queries each HDASS for its

list[int]

OLSS_* type via olDaGetSSCaps.

Source code in src/dtollib/capi/api.py
def enum_subsystems(self, hdrvr: int) -> list[int]:
    """Enumerate HDASS handles on a device via ``olDaEnumSubSystems``.

    Args:
        hdrvr: Device handle from :meth:`initialize`.

    Returns:
        List of HDASS handles (as Python ints) for every subsystem
        on the device.  Caller queries each HDASS for its
        ``OLSS_*`` type via ``olDaGetSSCaps``.
    """
    handles: list[int] = []

    @SS_ENUM_PROC  # type: ignore[untyped-decorator]
    def _on_subsys(hdass: int | None, _lparam: int) -> int:  # pragma: no cover
        if hdass is not None:
            handles.append(int(hdass))
        return 1

    status = self._dlls.oldaapi.olDaEnumSubSystems(HDRVR(hdrvr), _on_subsys, 0)
    check(self._dlls, status, op="olDaEnumSubSystems", source="oldaapi")
    return handles

flush_buffers

flush_buffers(hdass)

olDaFlushBuffers — clear Ready + Done queues.

Source code in src/dtollib/capi/api.py
def flush_buffers(self, hdass: int) -> None:
    """``olDaFlushBuffers`` — clear Ready + Done queues."""
    status = self._dlls.oldaapi.olDaFlushBuffers(HDASS(hdass))
    check(self._dlls, status, op="olDaFlushBuffers", source="oldaapi")

free_buffer

free_buffer(hbuf)

olDmFreeBuffer — release an HBUF.

Source code in src/dtollib/capi/api.py
def free_buffer(self, hbuf: int) -> None:
    """``olDmFreeBuffer`` — release an HBUF."""
    status = self._dlls.olmem.olDmFreeBuffer(HBUF(hbuf))
    check(self._dlls, status, op="olDmFreeBuffer", source="olmem")

get_board_info

get_board_info(name)

Query model and driver for a board by name.

Parameters:

Name Type Description Default
name str

Board name as returned by :meth:enum_boards.

required

Returns:

Type Description
tuple[str, str]

Two-tuple (model, driver_name).

Source code in src/dtollib/capi/api.py
def get_board_info(self, name: str) -> tuple[str, str]:
    """Query ``model`` and ``driver`` for a board by name.

    Args:
        name: Board name as returned by :meth:`enum_boards`.

    Returns:
        Two-tuple ``(model, driver_name)``.
    """
    model_buf = ctypes.create_string_buffer(_BOARD_MODEL_BUFFER_SIZE)
    driver_buf = ctypes.create_string_buffer(_BOARD_DRIVER_BUFFER_SIZE)
    status = self._dlls.oldaapi.olDaGetBoardInfo(
        name.encode("ascii"),
        model_buf,
        _BOARD_MODEL_BUFFER_SIZE,
        driver_buf,
        _BOARD_DRIVER_BUFFER_SIZE,
    )
    check(
        self._dlls,
        status,
        op="olDaGetBoardInfo",
        source="oldaapi",
        board=name,
    )
    return (
        model_buf.value.decode("ascii", errors="replace"),
        driver_buf.value.decode("ascii", errors="replace"),
    )

get_buffer

get_buffer(hdass)

olDaGetBuffer — pop an HBUF from the Done queue (or None).

Source code in src/dtollib/capi/api.py
def get_buffer(self, hdass: int) -> int | None:
    """``olDaGetBuffer`` — pop an HBUF from the Done queue (or None)."""
    out = HBUF()
    status = self._dlls.oldaapi.olDaGetBuffer(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaGetBuffer", source="oldaapi")
    handle = int(out.value or 0)
    return handle or None

get_buffer_data_bits

get_buffer_data_bits(hbuf)

olDmGetDataBits — ADC resolution in bits.

Source code in src/dtollib/capi/api.py
def get_buffer_data_bits(self, hbuf: int) -> int:
    """``olDmGetDataBits`` — ADC resolution in bits."""
    out = c_uint(0)
    status = self._dlls.olmem.olDmGetDataBits(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetDataBits", source="olmem")
    return int(out.value)

get_buffer_data_width

get_buffer_data_width(hbuf)

olDmGetDataWidth — bytes per sample (2 for int16, 4 for int32).

Source code in src/dtollib/capi/api.py
def get_buffer_data_width(self, hbuf: int) -> int:
    """``olDmGetDataWidth`` — bytes per sample (2 for int16, 4 for int32)."""
    out = c_uint(0)
    status = self._dlls.olmem.olDmGetDataWidth(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetDataWidth", source="olmem")
    return int(out.value)

get_buffer_max_samples

get_buffer_max_samples(hbuf)

olDmGetMaxSamples — maximum sample count the HBUF can hold.

Source code in src/dtollib/capi/api.py
def get_buffer_max_samples(self, hbuf: int) -> int:
    """``olDmGetMaxSamples`` — maximum sample count the HBUF can hold."""
    out = c_ulong(0)
    status = self._dlls.olmem.olDmGetMaxSamples(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetMaxSamples", source="olmem")
    return int(out.value)

get_buffer_ptr

get_buffer_ptr(hbuf)

olDmGetBufferPtr — raw data pointer (as int) into the HBUF.

Source code in src/dtollib/capi/api.py
def get_buffer_ptr(self, hbuf: int) -> int:
    """``olDmGetBufferPtr`` — raw data pointer (as int) into the HBUF."""
    out = c_char_p()
    status = self._dlls.olmem.olDmGetBufferPtr(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetBufferPtr", source="olmem")
    return int(ctypes.cast(out, ctypes.c_void_p).value or 0)

get_buffer_size

get_buffer_size(hbuf)

olDmGetBufferSize — capacity in samples.

Source code in src/dtollib/capi/api.py
def get_buffer_size(self, hbuf: int) -> int:
    """``olDmGetBufferSize`` — capacity in samples."""
    out = c_ulong(0)
    status = self._dlls.olmem.olDmGetBufferSize(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetBufferSize", source="olmem")
    return int(out.value)

get_buffer_valid_samples

get_buffer_valid_samples(hbuf)

olDmGetValidSamples — samples actually filled by the SDK.

Source code in src/dtollib/capi/api.py
def get_buffer_valid_samples(self, hbuf: int) -> int:
    """``olDmGetValidSamples`` — samples actually filled by the SDK."""
    out = c_ulong(0)
    status = self._dlls.olmem.olDmGetValidSamples(HBUF(hbuf), byref(out))
    check(self._dlls, status, op="olDmGetValidSamples", source="olmem")
    return int(out.value)

get_cjc_temperature

get_cjc_temperature(hdass, channel)

olDaGetCjcTemperature — cold-junction temperature, °C.

Source code in src/dtollib/capi/api.py
def get_cjc_temperature(self, hdass: int, channel: int) -> float:
    """``olDaGetCjcTemperature`` — cold-junction temperature, °C."""
    out = c_float(0.0)
    status = self._dlls.oldaapi.olDaGetCjcTemperature(HDASS(hdass), byref(out), channel)
    check(
        self._dlls,
        status,
        op="olDaGetCjcTemperature",
        source="oldaapi",
        channel=channel,
    )
    return float(out.value)

get_clock_frequency

get_clock_frequency(hdass)

olDaGetClockFrequency — readback (SDK may quantise the request).

Source code in src/dtollib/capi/api.py
def get_clock_frequency(self, hdass: int) -> float:
    """``olDaGetClockFrequency`` — readback (SDK may quantise the request)."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaGetClockFrequency(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaGetClockFrequency", source="oldaapi")
    return float(out.value)

get_dass

get_dass(hdrvr, subsys_type, element)

Acquire a subsystem handle via olDaGetDASS.

Source code in src/dtollib/capi/api.py
def get_dass(self, hdrvr: int, subsys_type: int, element: int) -> int:
    """Acquire a subsystem handle via ``olDaGetDASS``."""
    handle = HDASS()
    status = self._dlls.oldaapi.olDaGetDASS(HDRVR(hdrvr), subsys_type, element, byref(handle))
    check(
        self._dlls,
        status,
        op="olDaGetDASS",
        source="oldaapi",
        element=element,
        extra={"subsys_type": subsys_type},
    )
    return int(handle.value or 0)

get_dev_caps

get_dev_caps(hdrvr, subsys_type, cap_id)

Query a device-level integer capability.

Source code in src/dtollib/capi/api.py
def get_dev_caps(self, hdrvr: int, subsys_type: int, cap_id: int) -> int:
    """Query a device-level integer capability."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaGetDevCaps(HDRVR(hdrvr), subsys_type, cap_id, byref(out))
    check(
        self._dlls,
        status,
        op="olDaGetDevCaps",
        source="oldaapi",
        extra={"subsys_type": subsys_type, "cap_id": cap_id},
    )
    return int(out.value)

get_encoding

get_encoding(hdass)

olDaGetEncoding — one of the OL_ENC_* constants.

Source code in src/dtollib/capi/api.py
def get_encoding(self, hdass: int) -> int:
    """``olDaGetEncoding`` — one of the ``OL_ENC_*`` constants."""
    out = c_uint(0)
    status = self._dlls.oldaapi.olDaGetEncoding(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaGetEncoding", source="oldaapi")
    return int(out.value)

get_oldaapi_version

get_oldaapi_version()

Return the oldaapi*.dll version string.

Source code in src/dtollib/capi/api.py
def get_oldaapi_version(self) -> str:
    """Return the ``oldaapi*.dll`` version string."""
    buf = ctypes.create_string_buffer(_VERSION_BUFFER_SIZE)
    status = self._dlls.oldaapi.olDaGetVersion(buf, _VERSION_BUFFER_SIZE)
    check(self._dlls, status, op="olDaGetVersion", source="oldaapi")
    return buf.value.decode("ascii", errors="replace")

get_olmem_version

get_olmem_version()

Return the olmem*.dll version string.

Source code in src/dtollib/capi/api.py
def get_olmem_version(self) -> str:
    """Return the ``olmem*.dll`` version string."""
    buf = ctypes.create_string_buffer(_VERSION_BUFFER_SIZE)
    status = self._dlls.olmem.olDmGetVersion(buf, _VERSION_BUFFER_SIZE)
    check(self._dlls, status, op="olDmGetVersion", source="olmem")
    return buf.value.decode("ascii", errors="replace")

get_queue_size

get_queue_size(hdass, queue)

olDaGetQueueSize — Ready / Inprocess / Done queue depth.

Source code in src/dtollib/capi/api.py
def get_queue_size(self, hdass: int, queue: int) -> int:
    """``olDaGetQueueSize`` — Ready / Inprocess / Done queue depth."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaGetQueueSize(HDASS(hdass), queue, byref(out))
    check(
        self._dlls,
        status,
        op="olDaGetQueueSize",
        source="oldaapi",
        extra={"queue": queue},
    )
    return int(out.value)

get_range

get_range(hdass)

olDaGetRange — configured (max_volts, min_volts) of the subsystem.

Source code in src/dtollib/capi/api.py
def get_range(self, hdass: int) -> tuple[float, float]:
    """``olDaGetRange`` — configured ``(max_volts, min_volts)`` of the subsystem."""
    out_max = c_double(0.0)
    out_min = c_double(0.0)
    status = self._dlls.oldaapi.olDaGetRange(HDASS(hdass), byref(out_max), byref(out_min))
    check(self._dlls, status, op="olDaGetRange", source="oldaapi")
    return float(out_max.value), float(out_min.value)

get_resolution

get_resolution(hdass)

olDaGetResolution — ADC resolution in bits.

Source code in src/dtollib/capi/api.py
def get_resolution(self, hdass: int) -> int:
    """``olDaGetResolution`` — ADC resolution in bits."""
    out = c_uint(0)
    status = self._dlls.oldaapi.olDaGetResolution(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaGetResolution", source="oldaapi")
    return int(out.value)

get_single_float

get_single_float(hdass, channel, gain)

olDaGetSingleFloat — engineering-unit read of one channel.

Source code in src/dtollib/capi/api.py
def get_single_float(self, hdass: int, channel: int, gain: float) -> float:
    """``olDaGetSingleFloat`` — engineering-unit read of one channel."""
    out = c_float(0.0)
    status = self._dlls.oldaapi.olDaGetSingleFloat(HDASS(hdass), byref(out), channel, gain)
    check(
        self._dlls,
        status,
        op="olDaGetSingleFloat",
        source="oldaapi",
        channel=channel,
        extra={"gain": gain},
    )
    return float(out.value)

get_single_floats

get_single_floats(hdass, n_channels, gain)

olDaGetSingleFloats — simultaneous engineering-unit read.

Source code in src/dtollib/capi/api.py
def get_single_floats(self, hdass: int, n_channels: int, gain: float) -> list[float]:
    """``olDaGetSingleFloats`` — simultaneous engineering-unit read."""
    out = (c_float * n_channels)()
    status = self._dlls.oldaapi.olDaGetSingleFloats(HDASS(hdass), out, gain)
    check(
        self._dlls,
        status,
        op="olDaGetSingleFloats",
        source="oldaapi",
        extra={"n_channels": n_channels, "gain": gain},
    )
    return [float(v) for v in out]

get_single_value

get_single_value(hdass, channel, gain)

olDaGetSingleValue — raw-code read of one channel.

Source code in src/dtollib/capi/api.py
def get_single_value(self, hdass: int, channel: int, gain: float) -> int:
    """``olDaGetSingleValue`` — raw-code read of one channel."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaGetSingleValue(HDASS(hdass), byref(out), channel, gain)
    check(
        self._dlls,
        status,
        op="olDaGetSingleValue",
        source="oldaapi",
        channel=channel,
        extra={"gain": gain},
    )
    return int(out.value)

get_single_value_ex

get_single_value_ex(hdass, channel, gain)

olDaGetSingleValueEx — autoranging raw-code read.

Source code in src/dtollib/capi/api.py
def get_single_value_ex(self, hdass: int, channel: int, gain: float) -> int:
    """``olDaGetSingleValueEx`` — autoranging raw-code read."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaGetSingleValueEx(HDASS(hdass), byref(out), channel, gain)
    check(
        self._dlls,
        status,
        op="olDaGetSingleValueEx",
        source="oldaapi",
        channel=channel,
        extra={"gain": gain},
    )
    return int(out.value)

get_single_values

get_single_values(hdass, n_channels, gain)

olDaGetSingleValues — simultaneous raw-code read of every channel.

Source code in src/dtollib/capi/api.py
def get_single_values(self, hdass: int, n_channels: int, gain: float) -> list[int]:
    """``olDaGetSingleValues`` — simultaneous raw-code read of every channel."""
    out = (c_ulong * n_channels)()
    status = self._dlls.oldaapi.olDaGetSingleValues(HDASS(hdass), out, gain)
    check(
        self._dlls,
        status,
        op="olDaGetSingleValues",
        source="oldaapi",
        extra={"n_channels": n_channels, "gain": gain},
    )
    return [int(v) for v in out]

get_ss_caps

get_ss_caps(hdass, cap_id)

Query a subsystem integer capability via olDaGetSSCaps.

Source code in src/dtollib/capi/api.py
def get_ss_caps(self, hdass: int, cap_id: int) -> int:
    """Query a subsystem integer capability via ``olDaGetSSCaps``."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaGetSSCaps(HDASS(hdass), cap_id, byref(out))
    check(
        self._dlls,
        status,
        op="olDaGetSSCaps",
        source="oldaapi",
        extra={"cap_id": cap_id},
    )
    return int(out.value)

get_ss_caps_ex

get_ss_caps_ex(hdass, cap_id)

Query a subsystem floating-point capability via olDaGetSSCapsEx.

Source code in src/dtollib/capi/api.py
def get_ss_caps_ex(self, hdass: int, cap_id: int) -> float:
    """Query a subsystem floating-point capability via ``olDaGetSSCapsEx``."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaGetSSCapsEx(HDASS(hdass), cap_id, byref(out))
    check(
        self._dlls,
        status,
        op="olDaGetSSCapsEx",
        source="oldaapi",
        extra={"cap_id": cap_id},
    )
    return float(out.value)

get_ss_list

get_ss_list(hdrvr)

olDaGetSSList — obtain a simultaneous-start list handle for hdrvr.

Source code in src/dtollib/capi/api.py
def get_ss_list(self, hdrvr: int) -> int:
    """``olDaGetSSList`` — obtain a simultaneous-start list handle for ``hdrvr``."""
    out = HSSLIST()
    status = self._dlls.oldaapi.olDaGetSSList(HDRVR(hdrvr), byref(out))
    check(self._dlls, status, op="olDaGetSSList", source="oldaapi")
    return int(out.value or 0)

get_ss_state

get_ss_state(hdass)

olDaGetSSState — raw subsystem-state code.

Not exported from every SDK build (e.g. V7.0.0.7 omits it). Returns -1 when absent; DataAcqBackend.get_state then derives the state from olDaIsRunning plus locally-tracked transitions.

Source code in src/dtollib/capi/api.py
def get_ss_state(self, hdass: int) -> int:
    """``olDaGetSSState`` — raw subsystem-state code.

    Not exported from every SDK build (e.g. V7.0.0.7 omits it).
    Returns ``-1`` when absent; ``DataAcqBackend.get_state`` then
    derives the state from ``olDaIsRunning`` plus locally-tracked
    transitions.
    """
    fn = getattr(self._dlls.oldaapi, "olDaGetSSState", None)
    if fn is None:
        check(self._dlls, 0, op="olDaGetSSState(absent)", source="oldaapi")
        return -1
    out = c_ulong(0)
    status = fn(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaGetSSState", source="oldaapi")
    return int(out.value)

initialize

initialize(name)

Open the named board; return its HDRVR as an integer.

Parameters:

Name Type Description Default
name str

Board name to open (e.g. "DT9805(00)").

required

Returns:

Type Description
int

HDRVR handle as a Python int. Pass back into other

int

OpenLayersApi methods that take an HDRVR.

Source code in src/dtollib/capi/api.py
def initialize(self, name: str) -> int:
    """Open the named board; return its HDRVR as an integer.

    Args:
        name: Board name to open (e.g. ``"DT9805(00)"``).

    Returns:
        HDRVR handle as a Python int.  Pass back into other
        ``OpenLayersApi`` methods that take an HDRVR.
    """
    handle = HDRVR()
    status = self._dlls.oldaapi.olDaInitialize(name.encode("ascii"), byref(handle))
    check(self._dlls, status, op="olDaInitialize", source="oldaapi", board=name)
    return int(handle.value or 0)

is_running

is_running(hdass)

olDaIsRunning — non-blocking running-state probe.

Source code in src/dtollib/capi/api.py
def is_running(self, hdass: int) -> bool:
    """``olDaIsRunning`` — non-blocking running-state probe."""
    out = c_int(0)
    status = self._dlls.oldaapi.olDaIsRunning(HDASS(hdass), byref(out))
    check(self._dlls, status, op="olDaIsRunning", source="oldaapi")
    return bool(out.value)

measure_frequency

measure_frequency(hdass, channel)

olDaMeasureFrequency — measured input frequency (Hz) for channel.

Source code in src/dtollib/capi/api.py
def measure_frequency(self, hdass: int, channel: int) -> float:
    """``olDaMeasureFrequency`` — measured input frequency (Hz) for ``channel``."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaMeasureFrequency(HDASS(hdass), channel, byref(out))
    check(self._dlls, status, op="olDaMeasureFrequency", source="oldaapi", channel=channel)
    return float(out.value)

mute

mute(hdass)

olDaMute — hold the D/A output at its current value.

Raises :class:DtolCapabilityError if this DLL build does not export olDaMute (e.g. V7.0.0.7).

Source code in src/dtollib/capi/api.py
def mute(self, hdass: int) -> None:
    """``olDaMute`` — hold the D/A output at its current value.

    Raises :class:`DtolCapabilityError` if this DLL build does not
    export ``olDaMute`` (e.g. V7.0.0.7).
    """
    if not hasattr(self._dlls.oldaapi, "olDaMute"):
        raise DtolCapabilityError(
            "olDaMute is not exported by this DataAcq DLL build; "
            "continuous-AO mute is unavailable.",
            context=ErrorContext(operation="olDaMute"),
        )
    status = self._dlls.oldaapi.olDaMute(HDASS(hdass))
    check(self._dlls, status, op="olDaMute", source="oldaapi")

put_buffer

put_buffer(hdass, hbuf)

olDaPutBuffer — push an HBUF onto the Ready queue.

Source code in src/dtollib/capi/api.py
def put_buffer(self, hdass: int, hbuf: int) -> None:
    """``olDaPutBuffer`` — push an HBUF onto the Ready queue."""
    status = self._dlls.oldaapi.olDaPutBuffer(HDASS(hdass), HBUF(hbuf))
    check(self._dlls, status, op="olDaPutBuffer", source="oldaapi")

put_dass_to_ss_list

put_dass_to_ss_list(hsslist, hdass)

olDaPutDassToSSList — add a subsystem to the simultaneous-start list.

Source code in src/dtollib/capi/api.py
def put_dass_to_ss_list(self, hsslist: int, hdass: int) -> None:
    """``olDaPutDassToSSList`` — add a subsystem to the simultaneous-start list."""
    status = self._dlls.oldaapi.olDaPutDassToSSList(HSSLIST(hsslist), HDASS(hdass))
    check(self._dlls, status, op="olDaPutDassToSSList", source="oldaapi")

put_single_value

put_single_value(hdass, channel, value, gain)

olDaPutSingleValue — one-shot raw-code write to one channel.

value is a device code, not volts; callers convert via :meth:volts_to_code (or the subsystem's float path) first.

Source code in src/dtollib/capi/api.py
def put_single_value(self, hdass: int, channel: int, value: int, gain: float) -> None:
    """``olDaPutSingleValue`` — one-shot raw-code write to one channel.

    ``value`` is a device code, not volts; callers convert via
    :meth:`volts_to_code` (or the subsystem's float path) first.
    """
    status = self._dlls.oldaapi.olDaPutSingleValue(HDASS(hdass), c_long(value), channel, gain)
    check(
        self._dlls,
        status,
        op="olDaPutSingleValue",
        source="oldaapi",
        channel=channel,
        extra={"value": value, "gain": gain},
    )

put_single_values

put_single_values(hdass, values, gain)

olDaPutSingleValues — simultaneous raw-code write across channels.

values are device codes in channel-list order; only valid on subsystems advertising simultaneous D/A update.

Source code in src/dtollib/capi/api.py
def put_single_values(self, hdass: int, values: list[int], gain: float) -> None:
    """``olDaPutSingleValues`` — simultaneous raw-code write across channels.

    ``values`` are device codes in channel-list order; only valid on
    subsystems advertising simultaneous D/A update.
    """
    arr = (c_long * len(values))(*values)
    status = self._dlls.oldaapi.olDaPutSingleValues(HDASS(hdass), arr, gain)
    check(
        self._dlls,
        status,
        op="olDaPutSingleValues",
        source="oldaapi",
        extra={"n_channels": len(values), "gain": gain},
    )

read_bridge_sensor_hardware_teds

read_bridge_sensor_hardware_teds(hdass, channel)

olDaReadBridgeSensorHardwareTeds — read on-sensor TEDS into a dict.

Source code in src/dtollib/capi/api.py
def read_bridge_sensor_hardware_teds(self, hdass: int, channel: int) -> dict[str, object]:
    """``olDaReadBridgeSensorHardwareTeds`` — read on-sensor TEDS into a dict."""
    out = BRIDGE_SENSOR_TEDS()
    status = self._dlls.oldaapi.olDaReadBridgeSensorHardwareTeds(
        HDASS(hdass), channel, byref(out)
    )
    check(
        self._dlls,
        status,
        op="olDaReadBridgeSensorHardwareTeds",
        source="oldaapi",
        channel=channel,
    )
    return _teds_to_dict(out)

read_bridge_sensor_virtual_teds

read_bridge_sensor_virtual_teds(path)

olDaReadBridgeSensorVirtualTeds — read a virtual-TEDS file into a dict.

Source code in src/dtollib/capi/api.py
def read_bridge_sensor_virtual_teds(self, path: str) -> dict[str, object]:
    """``olDaReadBridgeSensorVirtualTeds`` — read a virtual-TEDS file into a dict."""
    out = BRIDGE_SENSOR_TEDS()
    status = self._dlls.oldaapi.olDaReadBridgeSensorVirtualTeds(
        path.encode("utf-8"), byref(out)
    )
    check(self._dlls, status, op="olDaReadBridgeSensorVirtualTeds", source="oldaapi")
    return _teds_to_dict(out)

read_events

read_events(hdass, channel)

olDaReadEvents — current counter value for channel.

Source code in src/dtollib/capi/api.py
def read_events(self, hdass: int, channel: int) -> int:
    """``olDaReadEvents`` — current counter value for ``channel``."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaReadEvents(HDASS(hdass), channel, byref(out))
    check(self._dlls, status, op="olDaReadEvents", source="oldaapi", channel=channel)
    return int(out.value)

read_strain_gage_hardware_teds

read_strain_gage_hardware_teds(hdass, channel)

olDaReadStrainGageHardwareTeds — read on-sensor TEDS into a dict.

Source code in src/dtollib/capi/api.py
def read_strain_gage_hardware_teds(self, hdass: int, channel: int) -> dict[str, object]:
    """``olDaReadStrainGageHardwareTeds`` — read on-sensor TEDS into a dict."""
    out = STRAIN_GAGE_TEDS()
    status = self._dlls.oldaapi.olDaReadStrainGageHardwareTeds(
        HDASS(hdass), channel, byref(out)
    )
    check(
        self._dlls,
        status,
        op="olDaReadStrainGageHardwareTeds",
        source="oldaapi",
        channel=channel,
    )
    return _teds_to_dict(out)

read_strain_gage_virtual_teds

read_strain_gage_virtual_teds(path)

olDaReadStrainGageVirtualTeds — read a virtual-TEDS file into a dict.

Source code in src/dtollib/capi/api.py
def read_strain_gage_virtual_teds(self, path: str) -> dict[str, object]:
    """``olDaReadStrainGageVirtualTeds`` — read a virtual-TEDS file into a dict."""
    out = STRAIN_GAGE_TEDS()
    status = self._dlls.oldaapi.olDaReadStrainGageVirtualTeds(path.encode("utf-8"), byref(out))
    check(self._dlls, status, op="olDaReadStrainGageVirtualTeds", source="oldaapi")
    return _teds_to_dict(out)

realloc_buffer

realloc_buffer(hbuf, n_samples)

olDmReAllocBuffer — resize an existing HBUF.

Source code in src/dtollib/capi/api.py
def realloc_buffer(self, hbuf: int, n_samples: int) -> None:
    """``olDmReAllocBuffer`` — resize an existing HBUF."""
    status = self._dlls.olmem.olDmReAllocBuffer(HBUF(hbuf), n_samples)
    check(
        self._dlls,
        status,
        op="olDmReAllocBuffer",
        source="olmem",
        extra={"n_samples": n_samples},
    )

release_dass

release_dass(hdass)

Release a subsystem handle via olDaReleaseDASS.

Source code in src/dtollib/capi/api.py
def release_dass(self, hdass: int) -> None:
    """Release a subsystem handle via ``olDaReleaseDASS``."""
    status = self._dlls.oldaapi.olDaReleaseDASS(HDASS(hdass))
    check(self._dlls, status, op="olDaReleaseDASS", source="oldaapi")

release_ss_list

release_ss_list(hsslist)

olDaReleaseSSList — release the simultaneous-start list handle.

Source code in src/dtollib/capi/api.py
def release_ss_list(self, hsslist: int) -> None:
    """``olDaReleaseSSList`` — release the simultaneous-start list handle."""
    status = self._dlls.oldaapi.olDaReleaseSSList(HSSLIST(hsslist))
    check(self._dlls, status, op="olDaReleaseSSList", source="oldaapi")

set_bridge_configuration

set_bridge_configuration(hdass, channel, config)

olDaSetBridgeConfiguration — generic bridge wiring.

Source code in src/dtollib/capi/api.py
def set_bridge_configuration(self, hdass: int, channel: int, config: int) -> None:
    """``olDaSetBridgeConfiguration`` — generic bridge wiring."""
    status = self._dlls.oldaapi.olDaSetBridgeConfiguration(HDASS(hdass), channel, config)
    check(
        self._dlls,
        status,
        op="olDaSetBridgeConfiguration",
        source="oldaapi",
        channel=channel,
        extra={"config": config},
    )

set_cascade_mode

set_cascade_mode(hdass, cascade)

olDaSetCascadeMode — cascade two counters into one 32-bit counter.

Takes a UINT selector (OL_CT_CASCADE / OL_CT_SINGLE), not a BOOL — bench-confirmed 2026-05-28 (both accepted with ec 0; a raw 1/0 is the wrong family).

Source code in src/dtollib/capi/api.py
def set_cascade_mode(self, hdass: int, cascade: bool) -> None:
    """``olDaSetCascadeMode`` — cascade two counters into one 32-bit counter.

    Takes a UINT selector (``OL_CT_CASCADE`` / ``OL_CT_SINGLE``), not a
    BOOL — bench-confirmed 2026-05-28 (both accepted with ec 0; a raw
    ``1``/``0`` is the wrong family).
    """
    selector = OL_CT_CASCADE if cascade else OL_CT_SINGLE
    status = self._dlls.oldaapi.olDaSetCascadeMode(HDASS(hdass), selector)
    check(
        self._dlls,
        status,
        op="olDaSetCascadeMode",
        source="oldaapi",
        extra={"cascade": cascade, "selector": selector},
    )

set_channel_list_entry

set_channel_list_entry(hdass, list_index, channel)

olDaSetChannelListEntry — bind a physical channel at a list index.

Source code in src/dtollib/capi/api.py
def set_channel_list_entry(self, hdass: int, list_index: int, channel: int) -> None:
    """``olDaSetChannelListEntry`` — bind a physical channel at a list index."""
    status = self._dlls.oldaapi.olDaSetChannelListEntry(HDASS(hdass), list_index, channel)
    check(
        self._dlls,
        status,
        op="olDaSetChannelListEntry",
        source="oldaapi",
        channel=channel,
        extra={"list_index": list_index},
    )

set_channel_list_entry_inhibit

set_channel_list_entry_inhibit(hdass, list_index, inhibit)

olDaSetChannelListEntryInhibit — skip an entry while still scanned.

Source code in src/dtollib/capi/api.py
def set_channel_list_entry_inhibit(
    self,
    hdass: int,
    list_index: int,
    inhibit: bool,
) -> None:
    """``olDaSetChannelListEntryInhibit`` — skip an entry while still scanned."""
    status = self._dlls.oldaapi.olDaSetChannelListEntryInhibit(
        HDASS(hdass), list_index, 1 if inhibit else 0
    )
    check(
        self._dlls,
        status,
        op="olDaSetChannelListEntryInhibit",
        source="oldaapi",
        extra={"list_index": list_index, "inhibit": inhibit},
    )

set_channel_list_size

set_channel_list_size(hdass, size)

olDaSetChannelListSize — set the channel-list length.

Source code in src/dtollib/capi/api.py
def set_channel_list_size(self, hdass: int, size: int) -> None:
    """``olDaSetChannelListSize`` — set the channel-list length."""
    status = self._dlls.oldaapi.olDaSetChannelListSize(HDASS(hdass), size)
    check(
        self._dlls,
        status,
        op="olDaSetChannelListSize",
        source="oldaapi",
        extra={"size": size},
    )

set_channel_range

set_channel_range(hdass, channel, min_val, max_val)

olDaSetChannelRange — per-channel voltage range.

Source code in src/dtollib/capi/api.py
def set_channel_range(
    self,
    hdass: int,
    channel: int,
    min_val: float,
    max_val: float,
) -> None:
    """``olDaSetChannelRange`` — per-channel voltage range."""
    status = self._dlls.oldaapi.olDaSetChannelRange(HDASS(hdass), min_val, max_val, channel)
    check(
        self._dlls,
        status,
        op="olDaSetChannelRange",
        source="oldaapi",
        channel=channel,
        extra={"min_val": min_val, "max_val": max_val},
    )

set_channel_type

set_channel_type(hdass, channel_type)

olDaSetChannelType — single-ended / differential / pseudo-diff.

Source code in src/dtollib/capi/api.py
def set_channel_type(self, hdass: int, channel_type: int) -> None:
    """``olDaSetChannelType`` — single-ended / differential / pseudo-diff."""
    status = self._dlls.oldaapi.olDaSetChannelType(HDASS(hdass), channel_type)
    check(
        self._dlls,
        status,
        op="olDaSetChannelType",
        source="oldaapi",
        extra={"channel_type": channel_type},
    )

set_clock_frequency

set_clock_frequency(hdass, frequency_hz)

olDaSetClockFrequency — internal-clock rate setpoint.

Source code in src/dtollib/capi/api.py
def set_clock_frequency(self, hdass: int, frequency_hz: float) -> None:
    """``olDaSetClockFrequency`` — internal-clock rate setpoint."""
    status = self._dlls.oldaapi.olDaSetClockFrequency(HDASS(hdass), frequency_hz)
    check(
        self._dlls,
        status,
        op="olDaSetClockFrequency",
        source="oldaapi",
        extra={"frequency_hz": frequency_hz},
    )

set_clock_source

set_clock_source(hdass, source)

olDaSetClockSource — internal vs external clock selector.

Source code in src/dtollib/capi/api.py
def set_clock_source(self, hdass: int, source: int) -> None:
    """``olDaSetClockSource`` — internal vs external clock selector."""
    status = self._dlls.oldaapi.olDaSetClockSource(HDASS(hdass), source)
    check(
        self._dlls,
        status,
        op="olDaSetClockSource",
        source="oldaapi",
        extra={"clock_source": source},
    )

set_coupling_type

set_coupling_type(hdass, channel, coupling)

olDaSetCouplingType — DC (0) / AC (1) coupling.

Source code in src/dtollib/capi/api.py
def set_coupling_type(self, hdass: int, channel: int, coupling: int) -> None:
    """``olDaSetCouplingType`` — DC (0) / AC (1) coupling."""
    status = self._dlls.oldaapi.olDaSetCouplingType(HDASS(hdass), channel, coupling)
    check(
        self._dlls,
        status,
        op="olDaSetCouplingType",
        source="oldaapi",
        channel=channel,
        extra={"coupling": coupling},
    )

set_ct_clock_frequency

set_ct_clock_frequency(hdass, frequency_hz)

Counter clock rate setpoint.

Shares the generic olDaSetClockFrequency (no olDaSetCTClockFrequency export exists).

Source code in src/dtollib/capi/api.py
def set_ct_clock_frequency(self, hdass: int, frequency_hz: float) -> None:
    """Counter clock rate setpoint.

    Shares the generic ``olDaSetClockFrequency`` (no
    ``olDaSetCTClockFrequency`` export exists).
    """
    status = self._dlls.oldaapi.olDaSetClockFrequency(HDASS(hdass), frequency_hz)
    check(
        self._dlls,
        status,
        op="olDaSetClockFrequency",
        source="oldaapi",
        extra={"frequency_hz": frequency_hz},
    )

set_ct_clock_source

set_ct_clock_source(hdass, source)

Counter clock source (OL_CLK_*).

The DLL exports no olDaSetCTClockSource; the C/T subsystem shares the generic olDaSetClockSource (bench-confirmed 2026-05-28, SDK V7.0.0.7).

Source code in src/dtollib/capi/api.py
def set_ct_clock_source(self, hdass: int, source: int) -> None:
    """Counter clock source (``OL_CLK_*``).

    The DLL exports no ``olDaSetCTClockSource``; the C/T subsystem
    shares the generic ``olDaSetClockSource`` (bench-confirmed
    2026-05-28, SDK V7.0.0.7).
    """
    status = self._dlls.oldaapi.olDaSetClockSource(HDASS(hdass), source)
    check(
        self._dlls,
        status,
        op="olDaSetClockSource",
        source="oldaapi",
        extra={"clock_source": source},
    )

set_ct_mode

set_ct_mode(hdass, mode)

olDaSetCTMode — counter/timer operation mode (OL_CTMODE_*).

Source code in src/dtollib/capi/api.py
def set_ct_mode(self, hdass: int, mode: int) -> None:
    """``olDaSetCTMode`` — counter/timer operation mode (``OL_CTMODE_*``)."""
    status = self._dlls.oldaapi.olDaSetCTMode(HDASS(hdass), mode)
    check(self._dlls, status, op="olDaSetCTMode", source="oldaapi", extra={"mode": mode})

set_data_flow

set_data_flow(hdass, mode)

olDaSetDataFlow — set the subsystem data-flow mode.

Source code in src/dtollib/capi/api.py
def set_data_flow(self, hdass: int, mode: int) -> None:
    """``olDaSetDataFlow`` — set the subsystem data-flow mode."""
    status = self._dlls.oldaapi.olDaSetDataFlow(HDASS(hdass), mode)
    check(
        self._dlls,
        status,
        op="olDaSetDataFlow",
        source="oldaapi",
        extra={"mode": mode},
    )

set_digital_io_list_entry

set_digital_io_list_entry(hdass, entry, value)

olDaSetDigitalIOListEntry — bind a digital port at a list slot.

Source code in src/dtollib/capi/api.py
def set_digital_io_list_entry(self, hdass: int, entry: int, value: int) -> None:
    """``olDaSetDigitalIOListEntry`` — bind a digital port at a list slot."""
    status = self._dlls.oldaapi.olDaSetDigitalIOListEntry(HDASS(hdass), entry, value)
    check(
        self._dlls,
        status,
        op="olDaSetDigitalIOListEntry",
        source="oldaapi",
        extra={"entry": entry, "value": value},
    )

set_dma_usage

set_dma_usage(hdass, n_channels)

olDaSetDmaUsage — number of DMA channels to claim.

Source code in src/dtollib/capi/api.py
def set_dma_usage(self, hdass: int, n_channels: int) -> None:
    """``olDaSetDmaUsage`` — number of DMA channels to claim."""
    status = self._dlls.oldaapi.olDaSetDmaUsage(HDASS(hdass), n_channels)
    check(
        self._dlls,
        status,
        op="olDaSetDmaUsage",
        source="oldaapi",
        extra={"n_channels": n_channels},
    )

set_excitation_current_source

set_excitation_current_source(hdass, channel, source)

olDaSetExcitationCurrentSource — INTERNAL/EXTERNAL/DISABLED.

Source code in src/dtollib/capi/api.py
def set_excitation_current_source(self, hdass: int, channel: int, source: int) -> None:
    """``olDaSetExcitationCurrentSource`` — INTERNAL/EXTERNAL/DISABLED."""
    status = self._dlls.oldaapi.olDaSetExcitationCurrentSource(HDASS(hdass), channel, source)
    check(
        self._dlls,
        status,
        op="olDaSetExcitationCurrentSource",
        source="oldaapi",
        channel=channel,
        extra={"source": source},
    )

set_excitation_current_value

set_excitation_current_value(hdass, channel, amps)

olDaSetExcitationCurrentValue — drive current in amps.

Source code in src/dtollib/capi/api.py
def set_excitation_current_value(self, hdass: int, channel: int, amps: float) -> None:
    """``olDaSetExcitationCurrentValue`` — drive current in amps."""
    status = self._dlls.oldaapi.olDaSetExcitationCurrentValue(HDASS(hdass), channel, amps)
    check(
        self._dlls,
        status,
        op="olDaSetExcitationCurrentValue",
        source="oldaapi",
        channel=channel,
        extra={"amps": amps},
    )

set_external_clock_divider

set_external_clock_divider(hdass, divider)

olDaSetExternalClockDivider — external-clock prescaler.

Source code in src/dtollib/capi/api.py
def set_external_clock_divider(self, hdass: int, divider: int) -> None:
    """``olDaSetExternalClockDivider`` — external-clock prescaler."""
    status = self._dlls.oldaapi.olDaSetExternalClockDivider(HDASS(hdass), divider)
    check(
        self._dlls,
        status,
        op="olDaSetExternalClockDivider",
        source="oldaapi",
        extra={"divider": divider},
    )

set_gain_list_entry

set_gain_list_entry(hdass, list_index, channel, gain)

olDaSetGainListEntry — add channel + gain at list position.

Source code in src/dtollib/capi/api.py
def set_gain_list_entry(
    self,
    hdass: int,
    list_index: int,
    channel: int,
    gain: float,
) -> None:
    """``olDaSetGainListEntry`` — add channel + gain at list position."""
    status = self._dlls.oldaapi.olDaSetGainListEntry(HDASS(hdass), list_index, channel, gain)
    check(
        self._dlls,
        status,
        op="olDaSetGainListEntry",
        source="oldaapi",
        channel=channel,
        extra={"list_index": list_index, "gain": gain},
    )

set_gate_type

set_gate_type(hdass, gate)

olDaSetGateType — gate-enable logic (OL_GATE_*).

Source code in src/dtollib/capi/api.py
def set_gate_type(self, hdass: int, gate: int) -> None:
    """``olDaSetGateType`` — gate-enable logic (``OL_GATE_*``)."""
    status = self._dlls.oldaapi.olDaSetGateType(HDASS(hdass), gate)
    check(self._dlls, status, op="olDaSetGateType", source="oldaapi", extra={"gate": gate})

set_measure_start_edge

set_measure_start_edge(hdass, edge)

olDaSetMeasureStartEdge — edge that starts edge-to-edge timing.

Source code in src/dtollib/capi/api.py
def set_measure_start_edge(self, hdass: int, edge: int) -> None:
    """``olDaSetMeasureStartEdge`` — edge that starts edge-to-edge timing."""
    status = self._dlls.oldaapi.olDaSetMeasureStartEdge(HDASS(hdass), edge)
    check(
        self._dlls,
        status,
        op="olDaSetMeasureStartEdge",
        source="oldaapi",
        extra={"edge": edge},
    )

set_measure_stop_edge

set_measure_stop_edge(hdass, edge)

olDaSetMeasureStopEdge — edge that stops edge-to-edge timing.

Source code in src/dtollib/capi/api.py
def set_measure_stop_edge(self, hdass: int, edge: int) -> None:
    """``olDaSetMeasureStopEdge`` — edge that stops edge-to-edge timing."""
    status = self._dlls.oldaapi.olDaSetMeasureStopEdge(HDASS(hdass), edge)
    check(
        self._dlls,
        status,
        op="olDaSetMeasureStopEdge",
        source="oldaapi",
        extra={"edge": edge},
    )

set_multi_sensor_type

set_multi_sensor_type(hdass, channel, sensor_type)

olDaSetMultiSensorType — re-type a MULTI_SENSOR channel.

MUST precede any per-type setter on the channel — docs/design.md §8.5a. Silent wrong-data bug otherwise.

Callers should gate this on capabilities.supports_multisensor; subsystems that don't support it will return OLNOTSUPPORTED (ECODE 36) and propagate as a typed exception.

Source code in src/dtollib/capi/api.py
def set_multi_sensor_type(
    self,
    hdass: int,
    channel: int,
    sensor_type: int,
) -> None:
    """``olDaSetMultiSensorType`` — re-type a MULTI_SENSOR channel.

    MUST precede any per-type setter on the channel — docs/design.md
    §8.5a.  Silent wrong-data bug otherwise.

    Callers should gate this on ``capabilities.supports_multisensor``;
    subsystems that don't support it will return ``OLNOTSUPPORTED``
    (ECODE 36) and propagate as a typed exception.
    """
    status = self._dlls.oldaapi.olDaSetMultiSensorType(HDASS(hdass), channel, sensor_type)
    check(
        self._dlls,
        status,
        op="olDaSetMultiSensorType",
        source="oldaapi",
        channel=channel,
        extra={"sensor_type": sensor_type},
    )

set_multiscan_count

set_multiscan_count(hdass, count)

olDaSetMultiscanCount — channel-list scans per trigger.

Source code in src/dtollib/capi/api.py
def set_multiscan_count(self, hdass: int, count: int) -> None:
    """``olDaSetMultiscanCount`` — channel-list scans per trigger."""
    status = self._dlls.oldaapi.olDaSetMultiscanCount(HDASS(hdass), count)
    check(
        self._dlls,
        status,
        op="olDaSetMultiscanCount",
        source="oldaapi",
        extra={"count": count},
    )

set_pulse_type

set_pulse_type(hdass, polarity)

olDaSetPulseType — pulse output polarity (OL_PULSETYPE_*).

Source code in src/dtollib/capi/api.py
def set_pulse_type(self, hdass: int, polarity: int) -> None:
    """``olDaSetPulseType`` — pulse output polarity (``OL_PULSETYPE_*``)."""
    status = self._dlls.oldaapi.olDaSetPulseType(HDASS(hdass), polarity)
    check(
        self._dlls,
        status,
        op="olDaSetPulseType",
        source="oldaapi",
        extra={"polarity": polarity},
    )

set_pulse_width

set_pulse_width(hdass, duty_or_width)

olDaSetPulseWidth — duty cycle (rate gen) or pulse width (one-shot).

Source code in src/dtollib/capi/api.py
def set_pulse_width(self, hdass: int, duty_or_width: float) -> None:
    """``olDaSetPulseWidth`` — duty cycle (rate gen) or pulse width (one-shot)."""
    status = self._dlls.oldaapi.olDaSetPulseWidth(HDASS(hdass), duty_or_width)
    check(
        self._dlls,
        status,
        op="olDaSetPulseWidth",
        source="oldaapi",
        extra={"duty_or_width": duty_or_width},
    )

set_range

set_range(hdass, max_val, min_val)

olDaSetRange — subsystem-wide range (no per-channel override).

Source code in src/dtollib/capi/api.py
def set_range(self, hdass: int, max_val: float, min_val: float) -> None:
    """``olDaSetRange`` — subsystem-wide range (no per-channel override)."""
    status = self._dlls.oldaapi.olDaSetRange(HDASS(hdass), max_val, min_val)
    check(
        self._dlls,
        status,
        op="olDaSetRange",
        source="oldaapi",
        extra={"min_val": min_val, "max_val": max_val},
    )

set_retrigger

set_retrigger(hdass, source)

olDaSetRetrigger — retrigger source for EXTRA mode (OL_TRG_*).

Source code in src/dtollib/capi/api.py
def set_retrigger(self, hdass: int, source: int) -> None:
    """``olDaSetRetrigger`` — retrigger source for EXTRA mode (``OL_TRG_*``)."""
    status = self._dlls.oldaapi.olDaSetRetrigger(HDASS(hdass), source)
    check(
        self._dlls,
        status,
        op="olDaSetRetrigger",
        source="oldaapi",
        extra={"retrigger_source": source},
    )

set_retrigger_frequency

set_retrigger_frequency(hdass, frequency_hz)

olDaSetRetriggerFrequency — internal retrigger rate for INTERNAL mode.

Source code in src/dtollib/capi/api.py
def set_retrigger_frequency(self, hdass: int, frequency_hz: float) -> None:
    """``olDaSetRetriggerFrequency`` — internal retrigger rate for INTERNAL mode."""
    status = self._dlls.oldaapi.olDaSetRetriggerFrequency(HDASS(hdass), frequency_hz)
    check(
        self._dlls,
        status,
        op="olDaSetRetriggerFrequency",
        source="oldaapi",
        extra={"frequency_hz": frequency_hz},
    )

set_retrigger_mode

set_retrigger_mode(hdass, mode)

olDaSetRetriggerMode — retrigger mode (OL_RETRIG_*).

Source code in src/dtollib/capi/api.py
def set_retrigger_mode(self, hdass: int, mode: int) -> None:
    """``olDaSetRetriggerMode`` — retrigger mode (``OL_RETRIG_*``)."""
    status = self._dlls.oldaapi.olDaSetRetriggerMode(HDASS(hdass), mode)
    check(
        self._dlls,
        status,
        op="olDaSetRetriggerMode",
        source="oldaapi",
        extra={"mode": mode},
    )

set_return_cjc_in_stream

set_return_cjc_in_stream(hdass, enable)

olDaSetReturnCjcTemperatureInStream — interleave CJC into the continuous stream.

Source code in src/dtollib/capi/api.py
def set_return_cjc_in_stream(self, hdass: int, enable: bool) -> None:
    """``olDaSetReturnCjcTemperatureInStream`` — interleave CJC into the continuous stream."""
    status = self._dlls.oldaapi.olDaSetReturnCjcTemperatureInStream(
        HDASS(hdass), 1 if enable else 0
    )
    check(
        self._dlls,
        status,
        op="olDaSetReturnCjcTemperatureInStream",
        source="oldaapi",
        extra={"enable": enable},
    )

set_rtd_a

set_rtd_a(hdass, channel, a)

olDaSetRtdA — Callendar-Van Dusen coefficient A.

Source code in src/dtollib/capi/api.py
def set_rtd_a(self, hdass: int, channel: int, a: float) -> None:
    """``olDaSetRtdA`` — Callendar-Van Dusen coefficient A."""
    status = self._dlls.oldaapi.olDaSetRtdA(HDASS(hdass), channel, a)
    check(
        self._dlls,
        status,
        op="olDaSetRtdA",
        source="oldaapi",
        channel=channel,
        extra={"a": a},
    )

set_rtd_b

set_rtd_b(hdass, channel, b)

olDaSetRtdB — Callendar-Van Dusen coefficient B.

Source code in src/dtollib/capi/api.py
def set_rtd_b(self, hdass: int, channel: int, b: float) -> None:
    """``olDaSetRtdB`` — Callendar-Van Dusen coefficient B."""
    status = self._dlls.oldaapi.olDaSetRtdB(HDASS(hdass), channel, b)
    check(
        self._dlls,
        status,
        op="olDaSetRtdB",
        source="oldaapi",
        channel=channel,
        extra={"b": b},
    )

set_rtd_c

set_rtd_c(hdass, channel, c)

olDaSetRtdC — Callendar-Van Dusen coefficient C.

Source code in src/dtollib/capi/api.py
def set_rtd_c(self, hdass: int, channel: int, c: float) -> None:
    """``olDaSetRtdC`` — Callendar-Van Dusen coefficient C."""
    status = self._dlls.oldaapi.olDaSetRtdC(HDASS(hdass), channel, c)
    check(
        self._dlls,
        status,
        op="olDaSetRtdC",
        source="oldaapi",
        channel=channel,
        extra={"c": c},
    )

set_rtd_r0

set_rtd_r0(hdass, channel, r0_ohms)

olDaSetRtdR0 — RTD resistance at 0 °C.

Source code in src/dtollib/capi/api.py
def set_rtd_r0(self, hdass: int, channel: int, r0_ohms: float) -> None:
    """``olDaSetRtdR0`` — RTD resistance at 0 °C."""
    status = self._dlls.oldaapi.olDaSetRtdR0(HDASS(hdass), channel, r0_ohms)
    check(
        self._dlls,
        status,
        op="olDaSetRtdR0",
        source="oldaapi",
        channel=channel,
        extra={"r0_ohms": r0_ohms},
    )

set_rtd_type

set_rtd_type(hdass, channel, rtd_type)

olDaSetRtdType — RTD curve (OL_RTD_TYPE_* selector).

Source code in src/dtollib/capi/api.py
def set_rtd_type(self, hdass: int, channel: int, rtd_type: int) -> None:
    """``olDaSetRtdType`` — RTD curve (``OL_RTD_TYPE_*`` selector)."""
    status = self._dlls.oldaapi.olDaSetRtdType(HDASS(hdass), channel, rtd_type)
    check(
        self._dlls,
        status,
        op="olDaSetRtdType",
        source="oldaapi",
        channel=channel,
        extra={"rtd_type": rtd_type},
    )

set_stop_on_error

set_stop_on_error(hdass, stop)

olDaSetStopOnError — orthogonal to recorder ErrorPolicy.

Not exported from every SDK build (e.g. V7.0.0.7 omits it). When absent, the subsystem keeps the SDK-side default; the recorder's ErrorPolicy still drives stop-on-overrun behaviour at the dtollib layer, so the SDK setting is informational only.

Source code in src/dtollib/capi/api.py
def set_stop_on_error(self, hdass: int, stop: bool) -> None:
    """``olDaSetStopOnError`` — orthogonal to recorder ``ErrorPolicy``.

    Not exported from every SDK build (e.g. V7.0.0.7 omits it).
    When absent, the subsystem keeps the SDK-side default; the
    recorder's ``ErrorPolicy`` still drives stop-on-overrun behaviour
    at the dtollib layer, so the SDK setting is informational only.
    """
    fn = getattr(self._dlls.oldaapi, "olDaSetStopOnError", None)
    if fn is None:
        check(self._dlls, 0, op="olDaSetStopOnError(absent)", source="oldaapi")
        return
    status = fn(HDASS(hdass), 1 if stop else 0)
    check(
        self._dlls,
        status,
        op="olDaSetStopOnError",
        source="oldaapi",
        extra={"stop": stop},
    )

set_strain_bridge_configuration

set_strain_bridge_configuration(hdass, channel, config)

olDaSetStrainBridgeConfiguration — strain-gage wiring.

Source code in src/dtollib/capi/api.py
def set_strain_bridge_configuration(self, hdass: int, channel: int, config: int) -> None:
    """``olDaSetStrainBridgeConfiguration`` — strain-gage wiring."""
    status = self._dlls.oldaapi.olDaSetStrainBridgeConfiguration(HDASS(hdass), channel, config)
    check(
        self._dlls,
        status,
        op="olDaSetStrainBridgeConfiguration",
        source="oldaapi",
        channel=channel,
        extra={"config": config},
    )

set_strain_excitation_voltage

set_strain_excitation_voltage(hdass, volts)

olDaSetStrainExcitationVoltage — subsystem-wide (no channel).

Source code in src/dtollib/capi/api.py
def set_strain_excitation_voltage(self, hdass: int, volts: float) -> None:
    """``olDaSetStrainExcitationVoltage`` — subsystem-wide (no channel)."""
    status = self._dlls.oldaapi.olDaSetStrainExcitationVoltage(HDASS(hdass), volts)
    check(
        self._dlls,
        status,
        op="olDaSetStrainExcitationVoltage",
        source="oldaapi",
        extra={"volts": volts},
    )

set_strain_excitation_voltage_source

set_strain_excitation_voltage_source(hdass, source)

olDaSetStrainExcitationVoltageSource — subsystem-wide (no channel).

Source code in src/dtollib/capi/api.py
def set_strain_excitation_voltage_source(self, hdass: int, source: int) -> None:
    """``olDaSetStrainExcitationVoltageSource`` — subsystem-wide (no channel)."""
    status = self._dlls.oldaapi.olDaSetStrainExcitationVoltageSource(HDASS(hdass), source)
    check(
        self._dlls,
        status,
        op="olDaSetStrainExcitationVoltageSource",
        source="oldaapi",
        extra={"source": source},
    )

set_strain_shunt_resistor

set_strain_shunt_resistor(hdass, channel, enabled)

olDaSetStrainShuntResistor — engage the shunt-cal resistor.

Source code in src/dtollib/capi/api.py
def set_strain_shunt_resistor(self, hdass: int, channel: int, enabled: bool) -> None:
    """``olDaSetStrainShuntResistor`` — engage the shunt-cal resistor."""
    status = self._dlls.oldaapi.olDaSetStrainShuntResistor(
        HDASS(hdass), channel, 1 if enabled else 0
    )
    check(
        self._dlls,
        status,
        op="olDaSetStrainShuntResistor",
        source="oldaapi",
        channel=channel,
        extra={"enabled": enabled},
    )

set_synchronous_digital_io_usage

set_synchronous_digital_io_usage(hdass, use)

olDaSetSynchronousDigitalIOUsage — scan-synchronised digital I/O.

Source code in src/dtollib/capi/api.py
def set_synchronous_digital_io_usage(self, hdass: int, use: bool) -> None:
    """``olDaSetSynchronousDigitalIOUsage`` — scan-synchronised digital I/O."""
    status = self._dlls.oldaapi.olDaSetSynchronousDigitalIOUsage(HDASS(hdass), 1 if use else 0)
    check(
        self._dlls,
        status,
        op="olDaSetSynchronousDigitalIOUsage",
        source="oldaapi",
        extra={"use": use},
    )

set_thermistor_a

set_thermistor_a(hdass, channel, a)

olDaSetThermistorA — Steinhart-Hart coefficient A.

Source code in src/dtollib/capi/api.py
def set_thermistor_a(self, hdass: int, channel: int, a: float) -> None:
    """``olDaSetThermistorA`` — Steinhart-Hart coefficient A."""
    status = self._dlls.oldaapi.olDaSetThermistorA(HDASS(hdass), channel, a)
    check(
        self._dlls,
        status,
        op="olDaSetThermistorA",
        source="oldaapi",
        channel=channel,
        extra={"a": a},
    )

set_thermistor_b

set_thermistor_b(hdass, channel, b)

olDaSetThermistorB — Steinhart-Hart coefficient B.

Source code in src/dtollib/capi/api.py
def set_thermistor_b(self, hdass: int, channel: int, b: float) -> None:
    """``olDaSetThermistorB`` — Steinhart-Hart coefficient B."""
    status = self._dlls.oldaapi.olDaSetThermistorB(HDASS(hdass), channel, b)
    check(
        self._dlls,
        status,
        op="olDaSetThermistorB",
        source="oldaapi",
        channel=channel,
        extra={"b": b},
    )

set_thermistor_c

set_thermistor_c(hdass, channel, c)

olDaSetThermistorC — Steinhart-Hart coefficient C.

Source code in src/dtollib/capi/api.py
def set_thermistor_c(self, hdass: int, channel: int, c: float) -> None:
    """``olDaSetThermistorC`` — Steinhart-Hart coefficient C."""
    status = self._dlls.oldaapi.olDaSetThermistorC(HDASS(hdass), channel, c)
    check(
        self._dlls,
        status,
        op="olDaSetThermistorC",
        source="oldaapi",
        channel=channel,
        extra={"c": c},
    )

set_thermocouple_type

set_thermocouple_type(hdass, channel, tc_type)

olDaSetThermocoupleType — TC letter designation.

Source code in src/dtollib/capi/api.py
def set_thermocouple_type(
    self,
    hdass: int,
    channel: int,
    tc_type: int,
) -> None:
    """``olDaSetThermocoupleType`` — TC letter designation."""
    status = self._dlls.oldaapi.olDaSetThermocoupleType(HDASS(hdass), channel, tc_type)
    check(
        self._dlls,
        status,
        op="olDaSetThermocoupleType",
        source="oldaapi",
        channel=channel,
        extra={"tc_type": tc_type},
    )

set_trigger

set_trigger(hdass, trigger_kind)

olDaSetTrigger — start-trigger selector.

Source code in src/dtollib/capi/api.py
def set_trigger(self, hdass: int, trigger_kind: int) -> None:
    """``olDaSetTrigger`` — start-trigger selector."""
    status = self._dlls.oldaapi.olDaSetTrigger(HDASS(hdass), trigger_kind)
    check(
        self._dlls,
        status,
        op="olDaSetTrigger",
        source="oldaapi",
        extra={"trigger_kind": trigger_kind},
    )

set_trigger_threshold_channel

set_trigger_threshold_channel(hdass, channel)

olDaSetTriggerThresholdChannel — analog-threshold monitor channel.

Source code in src/dtollib/capi/api.py
def set_trigger_threshold_channel(self, hdass: int, channel: int) -> None:
    """``olDaSetTriggerThresholdChannel`` — analog-threshold monitor channel."""
    status = self._dlls.oldaapi.olDaSetTriggerThresholdChannel(HDASS(hdass), channel)
    check(
        self._dlls,
        status,
        op="olDaSetTriggerThresholdChannel",
        source="oldaapi",
        channel=channel,
    )

set_trigger_threshold_level

set_trigger_threshold_level(hdass, level)

olDaSetTriggerThresholdLevel — analog-threshold voltage.

Source code in src/dtollib/capi/api.py
def set_trigger_threshold_level(self, hdass: int, level: float) -> None:
    """``olDaSetTriggerThresholdLevel`` — analog-threshold voltage."""
    status = self._dlls.oldaapi.olDaSetTriggerThresholdLevel(HDASS(hdass), level)
    check(
        self._dlls,
        status,
        op="olDaSetTriggerThresholdLevel",
        source="oldaapi",
        extra={"level": level},
    )

set_triggered_scan_usage

set_triggered_scan_usage(hdass, enable)

olDaSetTriggeredScanUsage — enable/disable triggered scan mode.

Source code in src/dtollib/capi/api.py
def set_triggered_scan_usage(self, hdass: int, enable: bool) -> None:
    """``olDaSetTriggeredScanUsage`` — enable/disable triggered scan mode."""
    status = self._dlls.oldaapi.olDaSetTriggeredScanUsage(HDASS(hdass), 1 if enable else 0)
    check(
        self._dlls,
        status,
        op="olDaSetTriggeredScanUsage",
        source="oldaapi",
        extra={"enable": enable},
    )

set_wnd_handle

set_wnd_handle(hdass, hwnd, context=0)

olDaSetWndHandle — route buffer-done messages to hwnd.

The SDK posts OLDA_WM_* messages (buffer-done, overrun, etc.) to the given window. hwnd is owned by the message-pump thread in :class:~dtollib.backend._message_window.MessageWindow; pass 0 to detach. This is the only buffer-done mechanism that works on the DT9805/06 (the notification-procedure callback never fires — docs/decisions.md).

Source code in src/dtollib/capi/api.py
def set_wnd_handle(self, hdass: int, hwnd: int, context: int = 0) -> None:
    """``olDaSetWndHandle`` — route buffer-done messages to ``hwnd``.

    The SDK posts ``OLDA_WM_*`` messages (buffer-done, overrun, etc.) to
    the given window. ``hwnd`` is owned by the message-pump thread in
    :class:`~dtollib.backend._message_window.MessageWindow`; pass ``0`` to
    detach. This is the only buffer-done mechanism that works on the
    DT9805/06 (the notification-procedure callback never fires —
    docs/decisions.md).
    """
    status = self._dlls.oldaapi.olDaSetWndHandle(HDASS(hdass), HWND(hwnd), context)
    check(
        self._dlls,
        status,
        op="olDaSetWndHandle",
        source="oldaapi",
        extra={"context": context},
    )

set_wrap_mode

set_wrap_mode(hdass, mode)

olDaSetWrapMode — NONE / SINGLE / MULTIPLE.

Source code in src/dtollib/capi/api.py
def set_wrap_mode(self, hdass: int, mode: int) -> None:
    """``olDaSetWrapMode`` — NONE / SINGLE / MULTIPLE."""
    status = self._dlls.oldaapi.olDaSetWrapMode(HDASS(hdass), mode)
    check(
        self._dlls,
        status,
        op="olDaSetWrapMode",
        source="oldaapi",
        extra={"wrap_mode": mode},
    )

simultaneous_pre_start

simultaneous_pre_start(hsslist)

olDaSimultaneousPrestart — arm every subsystem in the list.

Source code in src/dtollib/capi/api.py
def simultaneous_pre_start(self, hsslist: int) -> None:
    """``olDaSimultaneousPrestart`` — arm every subsystem in the list."""
    status = self._dlls.oldaapi.olDaSimultaneousPrestart(HSSLIST(hsslist))
    check(self._dlls, status, op="olDaSimultaneousPrestart", source="oldaapi")

simultaneous_start

simultaneous_start(hsslist)

olDaSimultaneousStart — start every subsystem in the list at once.

Source code in src/dtollib/capi/api.py
def simultaneous_start(self, hsslist: int) -> None:
    """``olDaSimultaneousStart`` — start every subsystem in the list at once."""
    status = self._dlls.oldaapi.olDaSimultaneousStart(HSSLIST(hsslist))
    check(self._dlls, status, op="olDaSimultaneousStart", source="oldaapi")

start

start(hdass)

olDaStart — begin acquisition.

Source code in src/dtollib/capi/api.py
def start(self, hdass: int) -> None:
    """``olDaStart`` — begin acquisition."""
    status = self._dlls.oldaapi.olDaStart(HDASS(hdass))
    check(self._dlls, status, op="olDaStart", source="oldaapi")

stop

stop(hdass)

olDaStop — orderly stop; blocks until current buffer fills.

Source code in src/dtollib/capi/api.py
def stop(self, hdass: int) -> None:
    """``olDaStop`` — orderly stop; blocks until current buffer fills."""
    status = self._dlls.oldaapi.olDaStop(HDASS(hdass))
    check(self._dlls, status, op="olDaStop", source="oldaapi")

terminate

terminate(hdrvr)

Close the device handle previously returned by :meth:initialize.

Source code in src/dtollib/capi/api.py
def terminate(self, hdrvr: int) -> None:
    """Close the device handle previously returned by :meth:`initialize`."""
    status = self._dlls.oldaapi.olDaTerminate(HDRVR(hdrvr))
    check(self._dlls, status, op="olDaTerminate", source="oldaapi")

unmute

unmute(hdass)

olDaUnMute — release a muted D/A output.

Raises :class:DtolCapabilityError if this DLL build does not export olDaUnMute.

Source code in src/dtollib/capi/api.py
def unmute(self, hdass: int) -> None:
    """``olDaUnMute`` — release a muted D/A output.

    Raises :class:`DtolCapabilityError` if this DLL build does not
    export ``olDaUnMute``.
    """
    if not hasattr(self._dlls.oldaapi, "olDaUnMute"):
        raise DtolCapabilityError(
            "olDaUnMute is not exported by this DataAcq DLL build; "
            "continuous-AO mute is unavailable.",
            context=ErrorContext(operation="olDaUnMute"),
        )
    status = self._dlls.oldaapi.olDaUnMute(HDASS(hdass))
    check(self._dlls, status, op="olDaUnMute", source="oldaapi")

volts_to_bridge_based_sensor

volts_to_bridge_based_sensor(
    v_unstrained,
    v_strained,
    v_excitation,
    temperature_coefficient,
    gage_resistance,
    lead_resistance,
    rated_output_mv_per_v,
    shunt_correction,
)

olDaVoltsToBridgeBasedSensor — bridge volts → engineering. Pure.

Source code in src/dtollib/capi/api.py
def volts_to_bridge_based_sensor(
    self,
    v_unstrained: float,
    v_strained: float,
    v_excitation: float,
    temperature_coefficient: float,
    gage_resistance: float,
    lead_resistance: float,
    rated_output_mv_per_v: float,
    shunt_correction: float,
) -> float:
    """``olDaVoltsToBridgeBasedSensor`` — bridge volts → engineering. Pure."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaVoltsToBridgeBasedSensor(
        v_unstrained,
        v_strained,
        v_excitation,
        temperature_coefficient,
        gage_resistance,
        lead_resistance,
        rated_output_mv_per_v,
        shunt_correction,
        byref(out),
    )
    check(self._dlls, status, op="olDaVoltsToBridgeBasedSensor", source="oldaapi")
    return float(out.value)

volts_to_code

volts_to_code(hdass, volts, gain)

olDaVoltsToCode — oracle for AO write paths.

Source code in src/dtollib/capi/api.py
def volts_to_code(self, hdass: int, volts: float, gain: float) -> int:
    """``olDaVoltsToCode`` — oracle for AO write paths."""
    out = c_ulong(0)
    status = self._dlls.oldaapi.olDaVoltsToCode(HDASS(hdass), volts, byref(out), gain)
    check(
        self._dlls,
        status,
        op="olDaVoltsToCode",
        source="oldaapi",
        extra={"volts": volts, "gain": gain},
    )
    return int(out.value)

volts_to_strain

volts_to_strain(
    config,
    v_unstrained,
    v_strained,
    v_excitation,
    gage_factor,
    gage_resistance,
    lead_resistance,
    poisson_ratio,
    shunt_correction,
)

olDaVoltsToStrain — bridge volts → strain (ε). Pure, no HDASS.

Source code in src/dtollib/capi/api.py
def volts_to_strain(
    self,
    config: int,
    v_unstrained: float,
    v_strained: float,
    v_excitation: float,
    gage_factor: float,
    gage_resistance: float,
    lead_resistance: float,
    poisson_ratio: float,
    shunt_correction: float,
) -> float:
    """``olDaVoltsToStrain`` — bridge volts → strain (ε). Pure, no HDASS."""
    out = c_double(0.0)
    status = self._dlls.oldaapi.olDaVoltsToStrain(
        config,
        v_unstrained,
        v_strained,
        v_excitation,
        gage_factor,
        gage_resistance,
        lead_resistance,
        poisson_ratio,
        shunt_correction,
        byref(out),
    )
    check(self._dlls, status, op="olDaVoltsToStrain", source="oldaapi")
    return float(out.value)

continuous_method_names

continuous_method_names()

Names of continuous-mode public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level check(...) invariant runs over the continuous-mode surface too.

Source code in src/dtollib/capi/api.py
def continuous_method_names() -> Iterable[str]:
    """Names of continuous-mode public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level ``check(...)`` invariant runs over the continuous-mode surface too.
    """
    return (
        # Continuous-mode configuration
        "set_channel_list_size",
        "set_channel_list_entry",
        "set_channel_list_entry_inhibit",
        "set_clock_source",
        "set_clock_frequency",
        "get_clock_frequency",
        "set_external_clock_divider",
        "set_trigger",
        "set_trigger_threshold_channel",
        "set_trigger_threshold_level",
        "set_wrap_mode",
        "set_dma_usage",
        # Notification + runtime
        "set_wnd_handle",
        "get_queue_size",
        # Buffer enqueue / dequeue
        "put_buffer",
        "get_buffer",
        "flush_buffers",
        "copy_from_buffer",
        # olmem buffer allocation + introspection
        "alloc_buffer",
        "realloc_buffer",
        "free_buffer",
        "get_buffer_ptr",
        "get_buffer_size",
        "get_buffer_max_samples",
        "get_buffer_valid_samples",
        "get_buffer_data_width",
        "get_buffer_data_bits",
    )

counter_method_names

counter_method_names()

Names of counter/timer public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level check(...) invariant runs over the counter/timer + simultaneous-start surface.

Source code in src/dtollib/capi/api.py
def counter_method_names() -> Iterable[str]:
    """Names of counter/timer public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level ``check(...)`` invariant runs over the counter/timer +
    simultaneous-start surface.
    """
    return (
        # Counter/timer configuration
        "set_ct_mode",
        "set_ct_clock_source",
        "set_ct_clock_frequency",
        "set_gate_type",
        "set_pulse_type",
        "set_pulse_width",
        "set_measure_start_edge",
        "set_measure_stop_edge",
        "set_cascade_mode",
        # Counter/timer read
        "read_events",
        "measure_frequency",
        # Triggered-scan retrigger
        "set_triggered_scan_usage",
        "set_multiscan_count",
        "set_retrigger_mode",
        "set_retrigger",
        "set_retrigger_frequency",
        # Simultaneous start
        "get_ss_list",
        "put_dass_to_ss_list",
        "simultaneous_pre_start",
        "simultaneous_start",
        "release_ss_list",
    )

discovery_method_names

discovery_method_names()

Names of discovery / lifecycle / capability public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level invariant runs over a known method set.

Source code in src/dtollib/capi/api.py
def discovery_method_names() -> Iterable[str]:
    """Names of discovery / lifecycle / capability public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level invariant runs over a known method set.
    """
    return (
        "get_oldaapi_version",
        "get_olmem_version",
        "enum_boards",
        "enum_boards_ex",
        "get_board_info",
        "initialize",
        "terminate",
        "enum_subsystems",
        "get_dev_caps",
        "get_dass",
        "release_dass",
        "get_ss_caps",
        "get_ss_caps_ex",
        "enum_ss_caps",
        "enum_channel_caps",
    )

multi_sensor_method_names

multi_sensor_method_names()

Names of multi-sensor public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level check(...) invariant runs over the multi-sensor surface.

Source code in src/dtollib/capi/api.py
def multi_sensor_method_names() -> Iterable[str]:
    """Names of multi-sensor public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level ``check(...)`` invariant runs over the multi-sensor surface.
    """
    return (
        # RTD
        "set_rtd_type",
        "set_rtd_r0",
        "set_rtd_a",
        "set_rtd_b",
        "set_rtd_c",
        # Thermistor
        "set_thermistor_a",
        "set_thermistor_b",
        "set_thermistor_c",
        # Coupling + excitation current
        "set_coupling_type",
        "set_excitation_current_source",
        "set_excitation_current_value",
        # Strain + bridge
        "set_strain_excitation_voltage_source",
        "set_strain_excitation_voltage",
        "set_strain_bridge_configuration",
        "set_strain_shunt_resistor",
        "set_bridge_configuration",
        # Volts → engineering conversions
        "volts_to_strain",
        "volts_to_bridge_based_sensor",
        # TEDS readers
        "read_strain_gage_hardware_teds",
        "read_strain_gage_virtual_teds",
        "read_bridge_sensor_hardware_teds",
        "read_bridge_sensor_virtual_teds",
    )

output_method_names

output_method_names()

Names of output public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level check(...) invariant runs over the output surface.

Source code in src/dtollib/capi/api.py
def output_method_names() -> Iterable[str]:
    """Names of output public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level ``check(...)`` invariant runs over the output surface.
    """
    return (
        "put_single_value",
        "put_single_values",
        "set_synchronous_digital_io_usage",
        "set_digital_io_list_entry",
        "mute",
        "unmute",
        "copy_to_buffer",
        "copy_buffer",
    )

single_value_method_names

single_value_method_names()

Names of single-value public OpenLayersApi methods.

Consumed by tests/unit/test_capi_api_check_invariant.py so the AST-level invariant runs over the single-value surface too.

Source code in src/dtollib/capi/api.py
def single_value_method_names() -> Iterable[str]:
    """Names of single-value public ``OpenLayersApi`` methods.

    Consumed by ``tests/unit/test_capi_api_check_invariant.py`` so the
    AST-level invariant runs over the single-value surface too.
    """
    return (
        "set_data_flow",
        "set_stop_on_error",
        "set_channel_type",
        "set_channel_range",
        "set_range",
        "set_gain_list_entry",
        "set_multi_sensor_type",
        "set_thermocouple_type",
        "set_return_cjc_in_stream",
        "config",
        "get_ss_state",
        "start",
        "stop",
        "abort",
        "is_running",
        "get_single_value",
        "get_single_float",
        "get_single_value_ex",
        "get_single_values",
        "get_single_floats",
        "get_cjc_temperature",
        "code_to_volts",
        "volts_to_code",
    )