defines for STATUS bytes
[rigol] / usbtmc.h
index 1fa1046009aa2f791e6019983b6e339a9d001966..3734ff5d3aa0a4d11517f39d9e31c422e8cdbcbf 100644 (file)
--- a/usbtmc.h
+++ b/usbtmc.h
@@ -56,6 +56,17 @@ struct usbtmc_capabilities {
 #define USB488_CAP_DEV_RL1             (1<<1)
 #define USB488_CAP_DEV_DT1             (1<<0)
 
+#define USBTMC_STATUS_SUCCESS          0x01
+#define USBTMC_STATUS_PENDING          0x02
+#define USBTMC_STATUS_FAILED           0x80
+#define USBTMC_STATUS_TRANS_NIP                0x81
+#define USBTMC_STATUS_SPLIT_NIP                0x82
+#define USBTMC_STATUS_SPLIT_IP         0x83
+
+#define USBTMC_STATUS_SUCC(x)  (x == USBTMC_STATUS_SUCCESS)
+#define USBTMC_STATUS_WARN(x)  ((x > USBTMC_STATUS_SUCCESS) && (x < USBTMC_STATUS_FAILED))
+#define USBTMC_STATUS_FAIL(x)  (x >= USBTMC_STATUS_FAILED)
+
 int usbtmc_sendscpi(struct scope *sc, char* cmd, unsigned char *resp, int resplen);
 struct scope * usbtmc_initscope(void);
 void usbtmc_close(struct scope *sc);
Impressum, Datenschutz