-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add kwarg to instrument constructor on server #303
Conversation
add a reference to the instrument server that created the instrument
use the change proposed in #303 to make this driver work with loops
The extra kwarg added in this pull request breaks qcodes unless the base instrument class is updated as well to accomodate for this extra kwarg
A usecase for this new kwarg can be found in #66 |
Current coverage is 82.82% (diff: 100%)@@ master #303 diff @@
==========================================
Files 34 34
Lines 3615 3615
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 2994 2994
Misses 621 621
Partials 0 0
|
@damazter, Do I understand correctly that this means that an instrument (A) can find any other instrument (B) that lives on the same server (by its name) without the need for ins B to have existed at creation time (of ins A)? If so I think this is a great addition as it removes the need for using shared kwargs as long as one ensures that the required instruments exist on the same server. |
@AdriaanRol Your second comment is correct as well, but this doesn't mean that the entire shared_kwargs framework becomes irrelevant, because you would still need that to communicate between different servers. (see http://qdev-dk.github.io/Qcodes/user/tutorial.html# at meta instrument) |
Looking at this again, I think it is possible to do it by name as well by doing something like reference = none
for inst in server.instruments:
if inst.name == the_name_you_want:
reference = inst |
superseded by #323 |
Changes proposed in this pull request:
Add a kwarg to the constructor of instrument that contains a reference to the
instrumentserver
that created the instruments.This will enable that all instruments on the same server can find each other via the instrument server and can talk to eachother
@giulioungaretti
add a reference to the instrument server that created the instrument