Raw reads should use `RawDataWidthInBits` on DAQmx versions that support it
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 592
- Forks
- 199
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 10
Description
Problem to Solve
Raw read methods like InStream.read and InStream.read_into do a lot of work to calculate the raw sample size, but this code is incomplete and does not account for these cases:
- DIO and CI channels
- Compressed AI data
- Reading before the task is verified
Proposed Solution
NI-DAQmx 24.5 or 24.8 added support for a new internal attribute, RawDataWidthInBits, which indicates the raw data size in bits. I think the corresponding C API function name is DAQmxGetRawDataWidthInBits. If this function is available, nidaqmx-python should use it instead of calculating based on AI channel attributes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the InStream.read and InStream.read_into entry points and trace how raw sample size is currently calculated. Check the availability and behavior of DAQmxGetRawDataWidthInBits/RawDataWidthInBits across supported NI-DAQmx versions, including DIO, CI, compressed AI data, and reads before task verification. Done means supported versions use the attribute while incompatible versions remain functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100