-
Notifications
You must be signed in to change notification settings - Fork 5
/
burst.go
30 lines (25 loc) · 1.12 KB
/
burst.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2017-2020 The ivi developers. All rights reserved.
// Project site: https://github.com/gotmc/ivi
// Use of this source code is governed by a MIT-style license that
// can be found in the LICENSE.txt file for the project.
package ds345
import (
"github.com/gotmc/ivi/fgen"
)
// Make sure that the ds345 driver implements the IviFgenBurst capability
// group.
var _ fgen.BurstChannel = (*Channel)(nil)
// BurstCount returns the number of waveform cycles that the function generator
// produces after it receives a trigger. BurstCount is the getter for the
// read-write IviFgenBurst Attribute Burst Count described in Section 17.2.1 of
// IVI-4.3: IviFgen Class Specification.
func (ch *Channel) BurstCount() (int, error) {
return ch.QueryInt("BCNT?\n")
}
// SetBurstCount sets the number of waveform cycles that the function generator
// produces after it receives a trigger. SetBurstCount is the setter for the
// read-write IviFgenBurst Attribute Burst Count described in Section 17.2.1 of
// IVI-4.3: IviFgen Class Specification.
func (ch *Channel) SetBurstCount(count int) error {
return ch.Set("BCNT %d\n", count)
}