feat(instrodaq): add support for sw timed background daemon - #325
feat(instrodaq): add support for sw timed background daemon#325maxleblang wants to merge 26 commits into
Conversation
|
Claude finished @maxleblang's task in 2m 56s —— View job ReviewArchitecture/ergonomics: Solid fit with repo conventions. SW timing is added entirely in Minor, left inline:
Nothing else stood out: |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
This is the previous daq_read_analog_sw_timed.py examples
Merge origin/main into instro-524-sw-timed-background-daemon Resolved conflicts in instro/daq/daq.py; sw-timed start/stop now sets the _running guard added on main, and the running-guard tests configure hw timing before start(background=False). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> @
Greptile SummaryThis PR adds software-timed background acquisition to
Confidence Score: 4/5The invalid software-timed start paths should raise before merging so callers cannot mistake a no-op for a successfully started acquisition. Both background-free software acquisition branches merely log and return, leaving callers with no programmatic indication that continuous acquisition never started. Files Needing Attention: instro/daq/daq.py, tests/daq/test_daq_drivers.py Important Files Changed
|
|
Closes #305 |
configure_ai_hw_sample_rate -> configure_hw_sample_rate configure_ai_sw_sample_rate -> configure_sw_sample_rate DAQDriverBase.configure_ai_hw_timing -> configure_hw_timing Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ic names" This reverts commit c0d190c.
Summary
This PR adds support for running a background daemon that is running software timed acquisition. The user can now configure a software timing sample rate and have a background daemon acquire samples from the DAQ at the defined rate (the work time of the daq read is the ceiling for sw sample rate).
We also add new examples highlighting this new functionality. Additionally, for DAQs that support multiple
InstroDAQconfigurations (NIDAQ) we support configuring a hw timed and a sw timed background daemon that can run in parallel.Here are the 6 scenarios a user can now configure and start an
InstroDAQinstance, and what they result in:start()-> DAQ hw timed acquisition started and background daemon startedstart(background=False)-> DAQ hw timed acquisition startedstart()-> background daemon started at specified sample ratestart(background=False)-> ERROR RAISED: sw timed continuous acquisition can't be started with no background daemonstart()-> background daemon started at default (1 Hz) sample ratestart(background=False)-> ERROR RAISED: sw timed continuous acquisition can't be started with no background daemonCloses INSTRO-524
Type of change
fix)feat)feat!/fix!)refactor)docs)chore)Verification
New examples behaved as expected. Test suite passes and new NIDAQ hardware test passes as well.
Tests
Checklist
feat(driver): add support for Keysight E36300)Notes for reviewers
This has only been tested on an NI cDAQ and a LabJack T4. I also need test validation on a MCC and Keysight just to ensure the background software acquisition works as expected. This just entails running the
daq_read_analog_sw_timed.pyexample for both these DAQs and ensuring that data is being read properly via software acquisition in the background.