summaryrefslogtreecommitdiff
path: root/libvxi11client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r--libvxi11client/client.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c
index 747947b..eb224f2 100644
--- a/libvxi11client/client.c
+++ b/libvxi11client/client.c
@@ -1,5 +1,5 @@
-#include "vxi11.h"
#include <stdio.h>
+#include "libvxi11client.h"
#define IDENTIFY "*IDN?"
@@ -25,17 +25,17 @@ int main(int argc, char *argv[]) {
int err = 0;
- if ((err = vxi11_open(argv[1])) > 0) {
+ if ((err = vxi11_open(argv[1], NULL)) > 0) {
// write some bytes
- int byteswritten = vxi11_write(IDENTIFY, sizeof(IDENTIFY));
+ int byteswritten = vxi11_write(IDENTIFY, sizeof(IDENTIFY), false);
if (byteswritten >= 0)
printf("Wrote %d bytes\n", byteswritten);
else
printf("Error writing data\n");
// read some bytes
- int bytesread = vxi11_read();
+ int bytesread = vxi11_read(NULL, 0, false, false, 0);
if (bytesread >= 0)
printf("Read %d bytes\n", bytesread);
else
@@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
// docmd
if ((err = vxi11_docmd(0x00)) > 0)
- printf("did command, should fail! %d\n");
+ printf("did command, should fail!\n");
else
printf("Error calling docmd; %s\n", geterrorstring(err));
@@ -101,4 +101,5 @@ int main(int argc, char *argv[]) {
printf("Error opening device; %s\n", geterrorstring(err));
exit(1);
}
+ return 0;
}