]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/scpi-pps/protocol.h
scpi-pps: Simplify SCPI command handling.
[libsigrok.git] / src / hardware / scpi-pps / protocol.h
index 19902ccc0c40dfde72e9f1348b0c2809ebd531f6..247e41fb88a38fa8614c739932a9f6b8b0bd5679 100644 (file)
@@ -51,8 +51,6 @@ enum pps_scpi_cmds {
        SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE,
        SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD,
        SCPI_CMD_SET_OVER_CURRENT_PROTECTION_THRESHOLD,
-       SCPI_CMD_GET_OUTPUT_CHANNEL_CONFIG,
-       SCPI_CMD_SET_OUTPUT_CHANNEL_CONFIG,
 };
 
 /*
@@ -70,10 +68,8 @@ enum pps_features {
 };
 
 struct scpi_pps {
-       int vendor_id;
        char *vendor;
-       char *idn_vendor;
-       char *idn_model;
+       char *model;
        uint64_t features;
        const int32_t *devopts;
        unsigned int num_devopts;
@@ -130,7 +126,11 @@ struct dev_context {
        struct sr_channel *cur_channel;
 };
 
+const char *get_vendor(const char *raw_vendor);
+SR_PRIV char *scpi_cmd_get(const struct sr_dev_inst *sdi, int command);
 SR_PRIV int scpi_cmd(const struct sr_dev_inst *sdi, int command, ...);
+SR_PRIV int scpi_cmd_resp(const struct sr_dev_inst *sdi, GVariant **gvar,
+               const GVariantType *gvtype, int command, ...);
 SR_PRIV int scpi_pps_receive_data(int fd, int revents, void *cb_data);
 
 #endif