summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client')
-rw-r--r--libvxi11client/client.c4
-rw-r--r--libvxi11client/libvxi11client.c48
-rw-r--r--libvxi11client/libvxi11client.h4
3 files changed, 39 insertions, 17 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c
index e25c037..fe023c7 100644
--- a/libvxi11client/client.c
+++ b/libvxi11client/client.c
@@ -14,5 +14,9 @@ int main() {
vxi11_unlock();
vxi11_remote();
vxi11_local();
+ vxi11_readstatusbyte();
+ vxi11_create_intr_chan();
+ vxi11_destroy_intr_chan();
+ vxi11_docmd();
vxi11_close();
}
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index bfe56fa..41ad046 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -23,7 +23,11 @@ void vxi11_open(char* address, char* device) {
}
void vxi11_readstatusbyte() {
-
+ if (clnt == NULL)
+ return;
+ Device_GenericParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout =
+ VXI11_DEFAULT_TIMEOUT };
+ Device_ReadStbResp* resp = device_readstb_1(&params, clnt);
}
void vxi11_write() {
@@ -33,8 +37,8 @@ void vxi11_write() {
char* IDENTIFY = "*IDN?";
- Device_WriteParms
- params = {.lid = link, .io_timeout = VXI11_DEFAULT_TIMEOUT, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .flags = 0x0};
+ Device_WriteParms params = { .lid = link, .io_timeout = VXI11_DEFAULT_TIMEOUT,
+ .lock_timeout = VXI11_DEFAULT_TIMEOUT, .flags = 0x0 };
params.data.data_len = sizeof(IDENTIFY);
params.data.data_val = IDENTIFY;
@@ -46,54 +50,62 @@ void vxi11_read() {
return;
}
- Device_ReadParms
- params = {.lid = link, .requestSize = 256, .io_timeout = VXI11_DEFAULT_TIMEOUT, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .flags = 0x0, .termChar = 0x0};
+ Device_ReadParms params = { .lid = link, .requestSize = 256, .io_timeout = VXI11_DEFAULT_TIMEOUT, .lock_timeout =
+ VXI11_DEFAULT_TIMEOUT, .flags = 0x0, .termChar = 0x0 };
Device_ReadResp* resp = device_read_1(&params, clnt);
}
void vxi11_docmd() {
+ if (clnt == NULL)
+ return;
+ Device_DocmdParms params = { .lid = link, .flags = 0x0, .io_timeout = VXI11_DEFAULT_TIMEOUT, .lock_timeout =
+ VXI11_DEFAULT_TIMEOUT, .cmd = 0, .network_order = 0, .datasize = 0 };
+
+ params.data_in.data_in_len = 0;
+ params.data_in.data_in_val = NULL;
+
+ Device_DocmdResp* resp = device_docmd_1(&params, clnt);
}
void vxi11_trigger() {
if (clnt == NULL)
return;
- Device_GenericParms
- params = {.lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout=VXI11_DEFAULT_TIMEOUT};
+ Device_GenericParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout =
+ VXI11_DEFAULT_TIMEOUT };
device_trigger_1(&params, clnt);
}
void vxi11_clear() {
if (clnt == NULL)
return;
- Device_GenericParms
- params = {.lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout=VXI11_DEFAULT_TIMEOUT};
+ Device_GenericParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout =
+ VXI11_DEFAULT_TIMEOUT };
device_clear_1(&params, clnt);
}
void vxi11_remote() {
if (clnt == NULL)
return;
- Device_GenericParms
- params = {.lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout=VXI11_DEFAULT_TIMEOUT};
+ Device_GenericParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout =
+ VXI11_DEFAULT_TIMEOUT };
device_remote_1(&params, clnt);
}
void vxi11_local() {
if (clnt == NULL)
return;
- Device_GenericParms
- params = {.lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout=VXI11_DEFAULT_TIMEOUT};
+ Device_GenericParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT, .io_timeout =
+ VXI11_DEFAULT_TIMEOUT };
device_local_1(&params, clnt);
}
void vxi11_lock() {
if (clnt == NULL)
return;
- Device_LockParms
- params = {.lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT};
+ Device_LockParms params = { .lid = link, .flags = 0x0, .lock_timeout = VXI11_DEFAULT_TIMEOUT };
device_lock_1(&params, clnt);
}
@@ -106,13 +118,15 @@ void vxi11_unlock() {
void vxi11_create_intr_chan() {
if (clnt == NULL)
return;
-
+ Device_RemoteFunc remotefunc = { .hostAddr = 0x0, .hostPort = 0x0, .progNum = 0x0, .progVers = 0x0, .progFamily =
+ DEVICE_TCP };
+ create_intr_chan_1(&remotefunc, clnt);
}
void vxi11_destroy_intr_chan() {
if (clnt == NULL)
return;
-
+ destroy_intr_chan_1(NULL, clnt);
}
void vxi11_abort() {
diff --git a/libvxi11client/libvxi11client.h b/libvxi11client/libvxi11client.h
index bf951dd..4b2f781 100644
--- a/libvxi11client/libvxi11client.h
+++ b/libvxi11client/libvxi11client.h
@@ -8,6 +8,10 @@ void vxi11_read();
void vxi11_lock();
void vxi11_unlock();
void vxi11_local();
+void vxi11_readstatusbyte();
void vxi11_remote();
+void vxi11_create_intr_chan();
+void vxi11_destroy_intr_chan();
+void vxi11_docmd();
void vxi11_close();