SCPI_CMD_GET_DIG_CHAN_NAME,
};
+enum scpi_transport_layer {
+ SCPI_TRANSPORT_LIBGPIB,
+ SCPI_TRANSPORT_SERIAL,
+ SCPI_TRANSPORT_RAW_TCP,
+ SCPI_TRANSPORT_RIGOL_TCP,
+ SCPI_TRANSPORT_USBTMC,
+ SCPI_TRANSPORT_VISA,
+ SCPI_TRANSPORT_VXI,
+};
+
struct scpi_command {
int command;
const char *string;
struct sr_scpi_dev_inst {
const char *name;
const char *prefix;
+ enum scpi_transport_layer transport;
int priv_size;
GSList *(*scan)(struct drv_context *drvc);
int (*dev_inst_new)(void *priv, struct drv_context *drvc,
SR_PRIV const struct sr_scpi_dev_inst scpi_libgpib_dev = {
.name = "GPIB",
.prefix = "libgpib",
+ .transport = SCPI_TRANSPORT_LIBGPIB,
.priv_size = sizeof(struct scpi_gpib),
.dev_inst_new = scpi_gpib_dev_inst_new,
.open = scpi_gpib_open,
SR_PRIV const struct sr_scpi_dev_inst scpi_serial_dev = {
.name = "serial",
.prefix = "",
+ .transport = SCPI_TRANSPORT_SERIAL,
.priv_size = sizeof(struct scpi_serial),
.scan = scpi_serial_scan,
.dev_inst_new = scpi_serial_dev_inst_new,
SR_PRIV const struct sr_scpi_dev_inst scpi_tcp_raw_dev = {
.name = "RAW TCP",
.prefix = "tcp-raw",
+ .transport = SCPI_TRANSPORT_RAW_TCP,
.priv_size = sizeof(struct scpi_tcp),
.dev_inst_new = scpi_tcp_dev_inst_new,
.open = scpi_tcp_open,
SR_PRIV const struct sr_scpi_dev_inst scpi_tcp_rigol_dev = {
.name = "RIGOL TCP",
.prefix = "tcp-rigol",
+ .transport = SCPI_TRANSPORT_RIGOL_TCP,
.priv_size = sizeof(struct scpi_tcp),
.dev_inst_new = scpi_tcp_dev_inst_new,
.open = scpi_tcp_open,
SR_PRIV const struct sr_scpi_dev_inst scpi_usbtmc_libusb_dev = {
.name = "USBTMC",
.prefix = "usbtmc",
+ .transport = SCPI_TRANSPORT_USBTMC,
.priv_size = sizeof(struct scpi_usbtmc_libusb),
.scan = scpi_usbtmc_libusb_scan,
.dev_inst_new = scpi_usbtmc_libusb_dev_inst_new,
SR_PRIV const struct sr_scpi_dev_inst scpi_visa_dev = {
.name = "VISA",
.prefix = "visa",
+ .transport = SCPI_TRANSPORT_VISA,
.priv_size = sizeof(struct scpi_visa),
.dev_inst_new = scpi_visa_dev_inst_new,
.open = scpi_visa_open,
SR_PRIV const struct sr_scpi_dev_inst scpi_vxi_dev = {
.name = "VXI",
.prefix = "vxi",
+ .transport = SCPI_TRANSPORT_VXI,
.priv_size = sizeof(struct scpi_vxi),
.dev_inst_new = scpi_vxi_dev_inst_new,
.open = scpi_vxi_open,