1// ExamplePollScopeData is similar to ExamplePollDemodSample,
2// but it subscribes and polls scope data.
3public static void ExamplePollScopeData(string dev = DEFAULT_DEVICE)
4{
5 ziDotNET daq = connect(dev);
6 SkipForDeviceFamily(daq, dev, "HDAWG");
7
8 resetDeviceToDefault(daq, dev);
9
10 String enablePath = String.Format("/{0}/scopes/0/enable", dev);
11 daq.setInt(enablePath, 1);
12 String path = String.Format("/{0}/scopes/0/wave", dev);
13 daq.subscribe(path);
14 Lookup lookup = daq.poll(1, 100, 0, 1);
15 UInt64 timeStamp = lookup[path][0].scopeWaves[0].header.timeStamp;
16 UInt64 sampleCount = lookup[path][0].scopeWaves[0].header.totalSamples;
17 daq.disconnect();
18
19 AssertNotEqual(0ul, timeStamp);
20 AssertNotEqual(0ul, sampleCount);
21}