Skip to content

0z0sk0/gohislip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gohislip

Go library with HiSLIP implementation.

About

HiSLIP — is a TCP-based protocol for remote control of Test & Measurement instruments (such as oscilloscopes, power supplies, multimeters, spectrum analyzers etc.)

Protocol of HiSLIP, you can see here.

Installation

Via go get command:

go get https://github.com/0z0sk0/gohislip

Resource

First of all, you need to create a resource:

resource := gohislip.NewHislipResource()

In source, it's just an embedded type of internal resource.Resource, which contains session data.

Connect

To connection you need to use Connect method, which supports the patterns of HiSLIP address:

err := resource.Connect("TCPIP0::127.0.0.1::hislip0::INSTR") // default 4880 port
err := resource.Connect("TCPIP0::127.0.0.1::hislip0,4881::INSTR")

Write

err := resource.Write("SYSTem:PRESet")
if err != nil {
  ...
}

Query

response, err := resource.Query("SERVice:PORT:COUNt?")
if err != nil {
  ...
}

Examples

See /examples folder.

Contributing

gohislip is open source. If you want to help out with the project please feel free to join in.

All contributions (bug reports, code, doc, ideas, etc.) are welcome.

Please use the github issue tracker and pull request features.

License

gohislip includes code covered by the MIT license.

For license details please see the LICENSE file.

Authors

Created by 0Z0SK0 [email protected]

See the AUTHORS file for full list of contributors.

About

Go HiSLiP implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages