forked from gotmc/ivi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ivi.go
25 lines (21 loc) · 752 Bytes
/
ivi.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
// 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 ivi
// Instrument provides the interface required for all IVI Instruments.
type Instrument interface {
Read(p []byte) (n int, err error)
Write(p []byte) (n int, err error)
StringWriter
Querier
}
// StringWriter provides the interface to write a string.
type StringWriter interface {
WriteString(s string) (n int, err error)
}
// Querier provides the interface to query using a given string and provide the
// resultant string.
type Querier interface {
Query(s string) (value string, err error)
}