visa-rs
Safe rust bindings for VISA(Virtual Instrument Software Architecture) library
Most documentation comes from NI-VISA Product Documentation
Requirements
This crate needs to link to an installed visa library, for example, NI-VISA.
You can specify path of visa64.lib
file (or visa32.lib
on 32-bit systems) by setting environment variable LIB_VISA_PATH
.
On Windows, the default installation path will be added if no path is specified.
Example
use CString;
use ;
use ;
let rm = new?; //open default resource manager
let expr = new.unwrap.into; //expr used to match resource name
let rsc = rm.find_res?; // find the first resource matched
let mut instr = rm.open?; //open a session to resource
instr.write_all.unwrap; //write message
let mut buf_reader = new;
let mut buf = String new;
buf_reader.read_line.unwrap; //read response
eprintln!;
Ok
License: MIT OR Apache-2.0