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 theoldaapi*.dllhandle: 15 discovery/lifecycle/capability functions plus ~17 single-value configuration + read functions. - :func:
declare_olmem— binds the buffer/version/error helpers on theolmem*.dllhandle.
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 ¶
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: |
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: |
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 | |
declare_olmem ¶
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: |
required |
Source code in src/dtollib/capi/prototypes.py
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 | |
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 ¶
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 ( |
|
driver |
Driver name ( |
|
instance |
Board instance integer. |
|
registry_path |
Registry path string. |
Source code in src/dtollib/capi/api.py
OpenLayersApi ¶
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:
- Allocate output-pointer storage (e.g.
hdass = HDASS()). - Call the prototype with :func:
byrefas needed. - Hand the returned
statusto :func:check. - 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: |
required |
Source code in src/dtollib/capi/api.py
abort ¶
alloc_buffer ¶
olDmCallocBuffer / olDmMallocBuffer — allocate an HBUF.
Source code in src/dtollib/capi/api.py
code_to_volts ¶
olDaCodeToVolts — oracle for the vectorised converter.
Source code in src/dtollib/capi/api.py
config ¶
copy_buffer ¶
olDmCopyBuffer — copy an HBUF's valid samples into a host buffer.
Source code in src/dtollib/capi/api.py
copy_from_buffer ¶
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
copy_to_buffer ¶
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
enum_boards ¶
Enumerate board names via olDaEnumBoards.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of board name strings (e.g. |
Source code in src/dtollib/capi/api.py
enum_boards_ex ¶
Enumerate boards with registry info via olDaEnumBoardsEx.
Returns:
| Name | Type | Description |
|---|---|---|
One |
list[BoardEnumRow]
|
class: |
Source code in src/dtollib/capi/api.py
enum_channel_caps ¶
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
enum_ss_caps ¶
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 |
list[tuple[float, float]]
|
value, in SDK enumeration order. |
Source code in src/dtollib/capi/api.py
enum_subsystems ¶
Enumerate HDASS handles on a device via olDaEnumSubSystems.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hdrvr
|
int
|
Device handle from :meth: |
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]
|
|
Source code in src/dtollib/capi/api.py
flush_buffers ¶
olDaFlushBuffers — clear Ready + Done queues.
free_buffer ¶
get_board_info ¶
Query model and driver for a board by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Board name as returned by :meth: |
required |
Returns:
| Type | Description |
|---|---|
tuple[str, str]
|
Two-tuple |
Source code in src/dtollib/capi/api.py
get_buffer ¶
olDaGetBuffer — pop an HBUF from the Done queue (or None).
Source code in src/dtollib/capi/api.py
get_buffer_data_bits ¶
olDmGetDataBits — ADC resolution in bits.
Source code in src/dtollib/capi/api.py
get_buffer_data_width ¶
olDmGetDataWidth — bytes per sample (2 for int16, 4 for int32).
Source code in src/dtollib/capi/api.py
get_buffer_max_samples ¶
olDmGetMaxSamples — maximum sample count the HBUF can hold.
Source code in src/dtollib/capi/api.py
get_buffer_ptr ¶
olDmGetBufferPtr — raw data pointer (as int) into the HBUF.
Source code in src/dtollib/capi/api.py
get_buffer_size ¶
olDmGetBufferSize — capacity in samples.
Source code in src/dtollib/capi/api.py
get_buffer_valid_samples ¶
olDmGetValidSamples — samples actually filled by the SDK.
Source code in src/dtollib/capi/api.py
get_cjc_temperature ¶
olDaGetCjcTemperature — cold-junction temperature, °C.
Source code in src/dtollib/capi/api.py
get_clock_frequency ¶
olDaGetClockFrequency — readback (SDK may quantise the request).
Source code in src/dtollib/capi/api.py
get_dass ¶
Acquire a subsystem handle via olDaGetDASS.
Source code in src/dtollib/capi/api.py
get_dev_caps ¶
Query a device-level integer capability.
Source code in src/dtollib/capi/api.py
get_encoding ¶
olDaGetEncoding — one of the OL_ENC_* constants.
Source code in src/dtollib/capi/api.py
get_oldaapi_version ¶
Return the oldaapi*.dll version string.
Source code in src/dtollib/capi/api.py
get_olmem_version ¶
Return the olmem*.dll version string.
Source code in src/dtollib/capi/api.py
get_queue_size ¶
olDaGetQueueSize — Ready / Inprocess / Done queue depth.
Source code in src/dtollib/capi/api.py
get_range ¶
olDaGetRange — configured (max_volts, min_volts) of the subsystem.
Source code in src/dtollib/capi/api.py
get_resolution ¶
olDaGetResolution — ADC resolution in bits.
Source code in src/dtollib/capi/api.py
get_single_float ¶
olDaGetSingleFloat — engineering-unit read of one channel.
Source code in src/dtollib/capi/api.py
get_single_floats ¶
olDaGetSingleFloats — simultaneous engineering-unit read.
Source code in src/dtollib/capi/api.py
get_single_value ¶
olDaGetSingleValue — raw-code read of one channel.
Source code in src/dtollib/capi/api.py
get_single_value_ex ¶
olDaGetSingleValueEx — autoranging raw-code read.
Source code in src/dtollib/capi/api.py
get_single_values ¶
olDaGetSingleValues — simultaneous raw-code read of every channel.
Source code in src/dtollib/capi/api.py
get_ss_caps ¶
Query a subsystem integer capability via olDaGetSSCaps.
Source code in src/dtollib/capi/api.py
get_ss_caps_ex ¶
Query a subsystem floating-point capability via olDaGetSSCapsEx.
Source code in src/dtollib/capi/api.py
get_ss_list ¶
olDaGetSSList — obtain a simultaneous-start list handle for hdrvr.
Source code in src/dtollib/capi/api.py
get_ss_state ¶
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
initialize ¶
Open the named board; return its HDRVR as an integer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Board name to open (e.g. |
required |
Returns:
| Type | Description |
|---|---|
int
|
HDRVR handle as a Python int. Pass back into other |
int
|
|
Source code in src/dtollib/capi/api.py
is_running ¶
olDaIsRunning — non-blocking running-state probe.
Source code in src/dtollib/capi/api.py
measure_frequency ¶
olDaMeasureFrequency — measured input frequency (Hz) for channel.
Source code in src/dtollib/capi/api.py
mute ¶
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
put_buffer ¶
olDaPutBuffer — push an HBUF onto the Ready queue.
put_dass_to_ss_list ¶
olDaPutDassToSSList — add a subsystem to the simultaneous-start list.
Source code in src/dtollib/capi/api.py
put_single_value ¶
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
put_single_values ¶
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
read_bridge_sensor_hardware_teds ¶
olDaReadBridgeSensorHardwareTeds — read on-sensor TEDS into a dict.
Source code in src/dtollib/capi/api.py
read_bridge_sensor_virtual_teds ¶
olDaReadBridgeSensorVirtualTeds — read a virtual-TEDS file into a dict.
Source code in src/dtollib/capi/api.py
read_events ¶
olDaReadEvents — current counter value for channel.
Source code in src/dtollib/capi/api.py
read_strain_gage_hardware_teds ¶
olDaReadStrainGageHardwareTeds — read on-sensor TEDS into a dict.
Source code in src/dtollib/capi/api.py
read_strain_gage_virtual_teds ¶
olDaReadStrainGageVirtualTeds — read a virtual-TEDS file into a dict.
Source code in src/dtollib/capi/api.py
realloc_buffer ¶
olDmReAllocBuffer — resize an existing HBUF.
Source code in src/dtollib/capi/api.py
release_dass ¶
Release a subsystem handle via olDaReleaseDASS.
release_ss_list ¶
olDaReleaseSSList — release the simultaneous-start list handle.
Source code in src/dtollib/capi/api.py
set_bridge_configuration ¶
olDaSetBridgeConfiguration — generic bridge wiring.
Source code in src/dtollib/capi/api.py
set_cascade_mode ¶
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
set_channel_list_entry ¶
olDaSetChannelListEntry — bind a physical channel at a list index.
Source code in src/dtollib/capi/api.py
set_channel_list_entry_inhibit ¶
olDaSetChannelListEntryInhibit — skip an entry while still scanned.
Source code in src/dtollib/capi/api.py
set_channel_list_size ¶
olDaSetChannelListSize — set the channel-list length.
Source code in src/dtollib/capi/api.py
set_channel_range ¶
olDaSetChannelRange — per-channel voltage range.
Source code in src/dtollib/capi/api.py
set_channel_type ¶
olDaSetChannelType — single-ended / differential / pseudo-diff.
Source code in src/dtollib/capi/api.py
set_clock_frequency ¶
olDaSetClockFrequency — internal-clock rate setpoint.
Source code in src/dtollib/capi/api.py
set_clock_source ¶
olDaSetClockSource — internal vs external clock selector.
Source code in src/dtollib/capi/api.py
set_coupling_type ¶
olDaSetCouplingType — DC (0) / AC (1) coupling.
Source code in src/dtollib/capi/api.py
set_ct_clock_frequency ¶
Counter clock rate setpoint.
Shares the generic olDaSetClockFrequency (no
olDaSetCTClockFrequency export exists).
Source code in src/dtollib/capi/api.py
set_ct_clock_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
set_ct_mode ¶
olDaSetCTMode — counter/timer operation mode (OL_CTMODE_*).
Source code in src/dtollib/capi/api.py
set_data_flow ¶
olDaSetDataFlow — set the subsystem data-flow mode.
Source code in src/dtollib/capi/api.py
set_digital_io_list_entry ¶
olDaSetDigitalIOListEntry — bind a digital port at a list slot.
Source code in src/dtollib/capi/api.py
set_dma_usage ¶
olDaSetDmaUsage — number of DMA channels to claim.
Source code in src/dtollib/capi/api.py
set_excitation_current_source ¶
olDaSetExcitationCurrentSource — INTERNAL/EXTERNAL/DISABLED.
Source code in src/dtollib/capi/api.py
set_excitation_current_value ¶
olDaSetExcitationCurrentValue — drive current in amps.
Source code in src/dtollib/capi/api.py
set_external_clock_divider ¶
olDaSetExternalClockDivider — external-clock prescaler.
Source code in src/dtollib/capi/api.py
set_gain_list_entry ¶
olDaSetGainListEntry — add channel + gain at list position.
Source code in src/dtollib/capi/api.py
set_gate_type ¶
olDaSetGateType — gate-enable logic (OL_GATE_*).
Source code in src/dtollib/capi/api.py
set_measure_start_edge ¶
olDaSetMeasureStartEdge — edge that starts edge-to-edge timing.
Source code in src/dtollib/capi/api.py
set_measure_stop_edge ¶
olDaSetMeasureStopEdge — edge that stops edge-to-edge timing.
Source code in src/dtollib/capi/api.py
set_multi_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
set_multiscan_count ¶
olDaSetMultiscanCount — channel-list scans per trigger.
Source code in src/dtollib/capi/api.py
set_pulse_type ¶
olDaSetPulseType — pulse output polarity (OL_PULSETYPE_*).
Source code in src/dtollib/capi/api.py
set_pulse_width ¶
olDaSetPulseWidth — duty cycle (rate gen) or pulse width (one-shot).
Source code in src/dtollib/capi/api.py
set_range ¶
olDaSetRange — subsystem-wide range (no per-channel override).
Source code in src/dtollib/capi/api.py
set_retrigger ¶
olDaSetRetrigger — retrigger source for EXTRA mode (OL_TRG_*).
Source code in src/dtollib/capi/api.py
set_retrigger_frequency ¶
olDaSetRetriggerFrequency — internal retrigger rate for INTERNAL mode.
Source code in src/dtollib/capi/api.py
set_retrigger_mode ¶
olDaSetRetriggerMode — retrigger mode (OL_RETRIG_*).
Source code in src/dtollib/capi/api.py
set_return_cjc_in_stream ¶
olDaSetReturnCjcTemperatureInStream — interleave CJC into the continuous stream.
Source code in src/dtollib/capi/api.py
set_rtd_a ¶
olDaSetRtdA — Callendar-Van Dusen coefficient A.
Source code in src/dtollib/capi/api.py
set_rtd_b ¶
olDaSetRtdB — Callendar-Van Dusen coefficient B.
Source code in src/dtollib/capi/api.py
set_rtd_c ¶
olDaSetRtdC — Callendar-Van Dusen coefficient C.
Source code in src/dtollib/capi/api.py
set_rtd_r0 ¶
olDaSetRtdR0 — RTD resistance at 0 °C.
Source code in src/dtollib/capi/api.py
set_rtd_type ¶
olDaSetRtdType — RTD curve (OL_RTD_TYPE_* selector).
Source code in src/dtollib/capi/api.py
set_stop_on_error ¶
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
set_strain_bridge_configuration ¶
olDaSetStrainBridgeConfiguration — strain-gage wiring.
Source code in src/dtollib/capi/api.py
set_strain_excitation_voltage ¶
olDaSetStrainExcitationVoltage — subsystem-wide (no channel).
Source code in src/dtollib/capi/api.py
set_strain_excitation_voltage_source ¶
olDaSetStrainExcitationVoltageSource — subsystem-wide (no channel).
Source code in src/dtollib/capi/api.py
set_strain_shunt_resistor ¶
olDaSetStrainShuntResistor — engage the shunt-cal resistor.
Source code in src/dtollib/capi/api.py
set_synchronous_digital_io_usage ¶
olDaSetSynchronousDigitalIOUsage — scan-synchronised digital I/O.
Source code in src/dtollib/capi/api.py
set_thermistor_a ¶
olDaSetThermistorA — Steinhart-Hart coefficient A.
Source code in src/dtollib/capi/api.py
set_thermistor_b ¶
olDaSetThermistorB — Steinhart-Hart coefficient B.
Source code in src/dtollib/capi/api.py
set_thermistor_c ¶
olDaSetThermistorC — Steinhart-Hart coefficient C.
Source code in src/dtollib/capi/api.py
set_thermocouple_type ¶
olDaSetThermocoupleType — TC letter designation.
Source code in src/dtollib/capi/api.py
set_trigger ¶
olDaSetTrigger — start-trigger selector.
Source code in src/dtollib/capi/api.py
set_trigger_threshold_channel ¶
olDaSetTriggerThresholdChannel — analog-threshold monitor channel.
Source code in src/dtollib/capi/api.py
set_trigger_threshold_level ¶
olDaSetTriggerThresholdLevel — analog-threshold voltage.
Source code in src/dtollib/capi/api.py
set_triggered_scan_usage ¶
olDaSetTriggeredScanUsage — enable/disable triggered scan mode.
Source code in src/dtollib/capi/api.py
set_wnd_handle ¶
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
set_wrap_mode ¶
olDaSetWrapMode — NONE / SINGLE / MULTIPLE.
Source code in src/dtollib/capi/api.py
simultaneous_pre_start ¶
olDaSimultaneousPrestart — arm every subsystem in the list.
Source code in src/dtollib/capi/api.py
simultaneous_start ¶
olDaSimultaneousStart — start every subsystem in the list at once.
Source code in src/dtollib/capi/api.py
start ¶
stop ¶
olDaStop — orderly stop; blocks until current buffer fills.
terminate ¶
Close the device handle previously returned by :meth:initialize.
unmute ¶
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
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
volts_to_code ¶
olDaVoltsToCode — oracle for AO write paths.
Source code in src/dtollib/capi/api.py
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
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
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
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
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
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
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.