struct sr_dev_inst *sdi;
const char *usbtmc_prefix = "/dev/usbtmc";
const char *tcp_prefix = "tcp/";
- gchar **tokens, *address, *port;
+ const char *vxi_prefix = "vxi/";
+ gchar **tokens, *address, *port, *instrument;
struct sr_scpi_dev_inst *scpi;
struct sr_scpi_hw_info *hw_info;
struct sr_probe *probe;
g_strfreev(tokens);
if (!scpi)
return SR_ERR_MALLOC;
+ } else if (HAVE_RPC && !strncmp(resource, vxi_prefix, strlen(vxi_prefix))) {
+ sr_dbg("Opening VXI connection %s.", resource);
+ tokens = g_strsplit(resource + strlen(tcp_prefix), "/", 0);
+ address = tokens[0];
+ instrument = tokens[1];
+ if (!address) {
+ sr_err("Invalid parameters.");
+ g_strfreev(tokens);
+ return SR_ERR_ARG;
+ }
+ scpi = scpi_vxi_dev_inst_new(address, instrument);
+ g_strfreev(tokens);
+ if (!scpi)
+ return SR_ERR_MALLOC;
} else {
sr_dbg("Opening serial device %s.", resource);
if (!(scpi = scpi_serial_dev_inst_new(resource, serialcomm)))