diff options
author | daniel <danieruru@gmail.com> | 2013-01-05 16:49:20 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-05 16:49:20 +0900 |
commit | e5656b476c9168cfe7852bce4e2ce59876a45d12 (patch) | |
tree | 3af6cb402f4716dd227a9ebf126261cf8727399c /libvxi11client/libvxi11client.c | |
parent | c70c87d3865c9e591b08c2d49cccbc776a136fab (diff) |
complete the stubs in the client..
Diffstat (limited to 'libvxi11client/libvxi11client.c')
-rw-r--r-- | libvxi11client/libvxi11client.c | 48 |
1 files changed, 31 insertions, 17 deletions
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(¶ms, 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(¶ms, 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(¶ms, 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(¶ms, 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(¶ms, 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(¶ms, 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(¶ms, 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(¶ms, 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() { |