Skip to content

Commit 2912754

Browse files
committed
added
1 parent 6b8d55d commit 2912754

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

example/commands2.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from scan import *
2+
3+
client = ScanClient('localhost')
4+
print client
5+
6+
print client.serverInfo()
7+
8+
# Assemble commands for a scan
9+
# Much more on that later...
10+
cmds = CommandSequence(
11+
Log('loc://w(42)', 'loc://r(-1)'),
12+
Set('loc://w(42)', 1.0),
13+
Log('loc://w(42)', 'loc://r(-1)'),
14+
Set('loc://r(-1)', 1.0, readback='loc://w(42)', tolerance=0.1),
15+
Log('loc://w(42)', 'loc://r(-1)'),
16+
Set('loc://w(42)', 50.0, readback='loc://r(-1)', readback_value=1.0, tolerance=0.1),
17+
Log('loc://w(42)', 'loc://r(-1)')
18+
)
19+
20+
print cmds
21+
22+
res = client.simulate(cmds)
23+
print res['simulation']
24+
25+
# Submit scan for execution
26+
id = client.submit(cmds, 'commands2.py')
27+
print id
28+
29+

0 commit comments

Comments
 (0)