You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/tutorial.rst
+51-50Lines changed: 51 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ In this tutorial we'll walk through *****
11
11
Writing a Driver
12
12
----------------
13
13
14
-
Write a simple driver example
14
+
Write a simple driver example
15
15
with commented code
16
16
- add parameter
17
17
- add validator
@@ -35,12 +35,15 @@ Explain the mock mock
35
35
.. todo:: missing
36
36
37
37
38
-
Composite Instruments
39
-
---------------------
40
-
The concept of a composite instrument is that of having
38
+
.. __metainstrument :
39
+
40
+
Meta Instruments
41
+
---------------------
42
+
The concept of a meta instrument is that of having
41
43
two separate Instrument, real or virtual, whose actions can
42
-
the be controlled from the composite instrument.
43
-
In the following example we will create two dummy instruments and a composite instruments.
44
+
the be controlled from the meta instrument.
45
+
In the following example we will create two dummy instruments and a meta instruments.
46
+
>>>>>>> docs: add Meta instrument.
44
47
All the instruments will live on a InstrumentServer.
45
48
46
49
@@ -64,43 +67,46 @@ First we create an instrument:
64
67
defsetx(self, val):
65
68
self.x=val
66
69
67
-
Then we create the composite instrument, this will hold any of the base
70
+
Then we create the meta instrument, this will hold any of the base
68
71
instruments.
69
-
Since we want the composite instrument to be able to talk to the base instrumetns
72
+
Since we want the meta instrument to be able to talk to the base instruments
70
73
we need to include a list of them as shared_kwargs.
71
74
72
75
73
-
.. note:: Every InstrumentServer needs to have identical shared_kwargs among all the instruments loaded there. That's because these args get loaded into the server when it's created, then passed on to each instrument that's loaded there during its construction on the server side.
76
+
.. note:: Every InstrumentServer needs to have identical shared_kwargs among all the instruments loaded there. That's because these args get loaded into the server when it's created, then passed on to each instrument that's loaded there during its construction on the server side.
74
77
75
78
.. code:: python
76
79
77
-
classbase1base2(Instrument):
80
+
classMeta(Instrument):
78
81
shared_kwargs = ['instruments']
79
82
80
83
# Instruments will be a list of RemoteInstrument objects, which can be
81
84
# given to a server on creation but not later on, so it needs to be
0 commit comments