pyvisa / pyvisa-sim

A PyVISA backend that simulates a large part of the "Virtual Instrument Software Architecture" (VISA_)
https://pyvisa-sim.readthedocs.io/en/latest/
MIT License
70 stars 39 forks source link

Check for existence of GPIB secondary address #59

Closed Satertek closed 2 years ago

Satertek commented 2 years ago

Check for existence of GPIB secondary address prior setting VI_ATTR_GPIB_SECONDARY_ADDR attribute Resolves #58

MatthieuDartiailh commented 2 years ago

Actually VISA defines VI_NO_SEC_ADDR that should be returned if there is no secondary address so you could add an else branch.

Satertek commented 2 years ago

Added, and ended up just reusing this block of code to keep it under the column limit :smiley:

MatthieuDartiailh commented 2 years ago

Thanks !

jenshnielsen commented 2 years ago

Would it be possible to get a release to pypi that includes this fix?

MatthieuDartiailh commented 2 years ago

I will do my best to do it later this week. Feel free to ping me if you see nothing.

MatthieuDartiailh commented 2 years ago

The release is on PyPI