Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
146 f9daq 1
------------------------------------------------------------------------------
2
vxi11_1.08 - 3/09/2009
3
 
4
Added a sanity check for link->maxRecvSize to make sure it's >0. This gets 
5
around a bug in some versions of the Agilent Infiniium scope software.
6
 
7
Changed the erroneous strncpy() to memcpy() in vxi11_send, as we could be
8
sending binary data (not just strings).
9
 
10
Changed a lot of char *'s to const char *'s in an attempt to get rid of
11
pedantic gcc compiler warnings.
12
 
13
------------------------------------------------------------------------------
14
vxi11_1.07 - 9/10/2007
15
 
16
Minor change to vxi11_receive_data_block(), this fn now copes with instruments
17
that return just "#0" (for whatever reason). Suggestion by Jarek Sadowski,
18
gratefully received.
19
 
20
------------------------------------------------------------------------------
21
vxi11_1.06 - 31/08/2007
22
 
23
Bug fix in vxi11_receive(), to ensure that no more than "len" bytes are ever 
24
received (and so avoiding a segmentation fault). This was a bug introduced in 
25
release 1.04 whilst making some other changes to the vxi11_receive() fn.
26
 
27
Many thanks to Rob Penny for spotting the bug and providing a patch.
28
 
29
------------------------------------------------------------------------------
30
vxi11_1.05 - 11/07/2007
31
 
32
Added the ability to specify a "device name" when calling vxi11_open_device().
33
For regular VXI11-based instruments, such as scopes and AFGs, the device name
34
is usually "hard wired" to be "inst0", and up to now this has been hard wired
35
into the vxi11_user code. However, devices such as LAN to GPIB gateways need
36
some way of distinguishing between different devices... they are a single
37
client (one IP address), with multiple devices.
38
 
39
The vxi11_user fn, vxi11_open_device(), now takes a third argument
40
(char *device).
41
This gets passed to the core vxi11_open_device() fn (the one that deals with
42
separate clients and links), and the core vxi11_open_link() fn; these two
43
core functions have also had an extra parameter added accordingly. In order
44
to not break the API, a wrapper function is provided in the form of the
45
original vxi11_open_device() fn, that just takes 2 arguments
46
(char *ip, CLINK *clink), this then passes "inst0" as the device argument.
47
Backwards-compatible wrappers for the core functions have NOT been provided.
48
These are generally not used from userland anyway. Hopefully this won't
49
upset anyone!
50
 
51
vxi11_cmd, the simple test utility, has also been updated. You can now,
52
optionally, pass the device_name as a second argument (after the ip
53
address). The source has been renamed to vxi11_cmd.cc (from vxi11_cmd.c), as
54
it is C++ code not C.
55
 
56
Some minor tidying up in vxi11_user.h
57
 
58
With thanks to Oliver Schulz for bringing LAN to GPIB gateways to my
59
attention, for suggesting changes to the vxi11_user library to allow them to
60
be accommodated, and for tidying some things up.
61
 
62
------------------------------------------------------------------------------
63
vxi11_1.04 - 10/07/2007
64
 
65
Patch applied, which was kindly provided by Robert Larice. This sorts out
66
the confusion (on my part) about the structures returned by the rpcgen
67
generated *_1() functions... these are statically allocated temporary structs,
68
apparently. In the words of Robert Larice:
69
 
70
******
71
Hello Dr. Sharples,
72
 
73
  I'm sending some patches for your nice gem "vxi11_1.03"
74
 
75
  In the source code there were some strange comments, concerning
76
   a commented free() around ... Manfred S. ...
77
  and some notes, suggesting you had trouble to get more than one link
78
    working.
79
 
80
  I think thats caused by some misuse of the rpcgen generated subroutines.
81
  1) those rpcgen generated *_1 functions returned pointers to
82
       statically allocated temporary structs.
83
     those where meant to be instantly copied to the user's space,
84
       which wasn't done
85
     thus instead of
86
       Device_ReadResp  *read_resp;
87
       read_resp = device_read_1(...)
88
     one should have written someting like:
89
       Device_ReadResp  *read_resp;
90
       read_resp = malloc(...)
91
       memcpy(read_resp, device_read_1(...), ...)
92
  2) but a better fix is to use the rpcgen -M Flag
93
       which allows to pass the memory space as a third argument
94
     so one can write
95
       Device_ReadResp  *read_resp;
96
       read_resp = malloc(...)
97
       device_read_1(..., read_resp, ...)
98
     furthermore this is now automatically thread save
99
  3) the rpcgen function device_read_1
100
       expects a target buffer to be passed via read_resp
101
     which was not done.
102
  4) the return value of vxi11_receive() was computed incorrectly
103
  5) minor,  Makefile typo's
104
      CFLAGS versus
105
      CLFAGS
106
 
107
******
108
 
109
Robert didn't have more than one device to try the patch with, but I've just
110
tried it and everything seems fine. So I've removed all references to the
111
VXI11_ENABLE_MULTIPLE_CLIENTS global variable, and removed the call to
112
vxi11_open_link() from the vxi11_send() fn. There has been an associated
113
tidying of functions, and removal of some comments.
114
 
115
Thanks once again to Robert Larice for the patch and the explanation!
116
 
117
------------------------------------------------------------------------------
118
vxi11_1.03 - 29/01/2007
119
 
120
Some bug-fixes (thanks to Manfred S.), and extra awareness of the
121
possibility that instruments could time out after receiving a query WITHOUT
122
causing an error condition. In some cases (prior to these changes) this
123
could have resulted in a segmentation fault.
124
 
125
Specifically:
126
 
127
(1) removed call to ANSI free() fn in vxi11_receive, which according to
128
    Manfred S. "is not necessary and wrong (crashes)".
129
 
130
(2) added extra check in vxi11_receive() to see if read_resp==NULL.
131
    read_resp can apparently be NULL if (eg) you send an instrument a
132
    query, but the instrument is so busy with something else for so long
133
    that it forgets the original query. So this extra check is for that
134
    situation, and vxi11_receive returns -VXI11_NULL_READ_RESP to the
135
    calling function.
136
 
137
(3) vxi11_send_and_receive() is now aware of the possibility of being
138
    returned -VXI11_NULL_READ_RESP. If so, it re-sends the query, until
139
    either getting a "regular" read error (read_resp->error!=0) or a
140
    successful read.
141
 
142
(4) Similar to (2)... added extra check in vxi11_send() to see if
143
    write_resp==NULL. If so, return -VXI11_NULL_WRITE_RESP. As with (3),
144
    send_and_receive() is now aware of this possibility.
145
 
146
------------------------------------------------------------------------------
147
vxi11_1.02 - 25/08/2006
148
 
149
Important changes to the core vxi11_send() function, which should be
150
invisible to the user.
151
 
152
For those interested, the function now takes note of the value of
153
link->maxRecvSize, which is the maximum number of bytes that the vxi11
154
intrument you're talking to can receive in one go. For many instruments
155
this may be a few kB, which isn't a problem for sending short commands;
156
however, sending large chunks of data (for example sending waveforms
157
to instruments) may exceed this maxRecvSize. The core vxi11_send() function
158
has been re-written to ensure that only a maximum of [maxRecvSize] bytes are
159
written in one go... the function sits in a loop until all the message/
160
data is written.
161
 
162
Also tidied up some of the return values (specifically with regard to
163
vxi11_send() and vxi11_send_data_block() ).
164
 
165
------------------------------------------------------------------------------
166
vxi11_1.01 - 06/07/2006
167
 
168
Fair few changes since v1.00, all in vxi11_user.c and vxi11_user.h
169
 
170
Found I was having problems talking to multiple links on the same
171
client, if I created a different client for each one. So introduced
172
a few global variables to keep track of all the ip addresses of
173
clients that the library is asked to create, and only creating new
174
clients if the ip address is different. This puts a limit of how
175
many unique ip addresses (clients) a single process can connect to.
176
Set this value at 256 (should hopefully be enough!).
177
 
178
Next I found that talking to different clients on different ip
179
addresses didn't work. It turns out that create_link_1() creates
180
a static structure. This this link is associated with a given
181
client (and hence a given IP address), then the only way I could
182
think of making things work was to add a call to an
183
vxi11_open_link() function before each send command (no idea what
184
this adds to overheads and it's very messy!) - at least I was
185
able to get this to only happen when we are using more than one
186
client/ip address.
187
 
188
Also, while I was at it, I re-ordered the functions a little -
189
starts with core user functions, extra user functions, then core
190
library functions at the end. Added a few more comments. Tidied
191
up. Left some debugging info in, but commented out.
192
 
193
------------------------------------------------------------------------------
194
vxi11_1.00 - 23/06/2006
195
 
196
Initial release.
197
 
198
------------------------------------------------------------------------------
199