Skip to content

Add event handling for TCPIP instruments, allowing SRQ interrupts. Closes #544#577

Open
SimonMerrett wants to merge 2 commits intopyvisa:mainfrom
SimonMerrett:events
Open

Add event handling for TCPIP instruments, allowing SRQ interrupts. Closes #544#577
SimonMerrett wants to merge 2 commits intopyvisa:mainfrom
SimonMerrett:events

Conversation

@SimonMerrett
Copy link
Copy Markdown

My second attempt at providing the event handling I would like to see for instruments capable of sending SRQ service requests. @MatthieuDartiailh helpfully advised on the approach and reviewed my previous PR but I did not and do not have enough Python skill to take that review into action. I have done my best in this PR to provide the feature but actually was able to test it on hardware which took 5 measurements at 1Hz and returned SRQ. I have attached Wireshark pcap showing the communication of a successful test (measurement results are not retrieved during the test).
pyvisa-py_srq.zip

I used an agentic workflow in opencode to plan, code, test, review. Some of the wider-reaching changes were bound up in reviewer recommendations for robustness, such as compatibility "tweaks" in attributes.py. Everything is up for editing but with this PR I am happy that it should pass some degree of testing (the agents were testing against the built-in tests and added their own for the event aspects). I am also more confident because I was able to take my script for my instrument and test the functionality was there, that measurements were taken, SRQ was sent properly as far as I can tell (not a hidden python thread polling the instrument status registers, like one of the earlier agents tried to sneak in).

Please go easy on the feedback and feel free to edit! If you agree that this is closer to the mark than #547 I will close that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event handlers - is it possible for TCPIP INSTR resource?

1 participant