OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [docs/] [java/] [ztex/] [ZtexUsbReader.html] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!-- NewPage -->
3
<html lang="de">
4
<head>
5
<!-- Generated by javadoc (version 1.7.0_79) on Wed Mar 22 19:20:13 CET 2017 -->
6
<title>ZtexUsbReader</title>
7
<meta name="date" content="2017-03-22">
8
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
9
</head>
10
<body>
11
<script type="text/javascript"><!--
12
    if (location.href.indexOf('is-external=true') == -1) {
13
        parent.document.title="ZtexUsbReader";
14
    }
15
//-->
16
</script>
17
<noscript>
18
<div>JavaScript is disabled on your browser.</div>
19
</noscript>
20
<!-- ========= START OF TOP NAVBAR ======= -->
21
<div class="topNav"><a name="navbar_top">
22
<!--   -->
23
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
24
<!--   -->
25
</a>
26
<ul class="navList" title="Navigation">
27
<li><a href="../ztex/package-summary.html">Package</a></li>
28
<li class="navBarCell1Rev">Class</li>
29
<li><a href="package-tree.html">Tree</a></li>
30
<li><a href="../deprecated-list.html">Deprecated</a></li>
31
<li><a href="../index-all.html">Index</a></li>
32
<li><a href="../help-doc.html">Help</a></li>
33
</ul>
34
</div>
35
<div class="subNav">
36
<ul class="navList">
37
<li><a href="../ztex/ZtexScanBus1.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
38
<li><a href="../ztex/ZtexUsbWriter.html" title="class in ztex"><span class="strong">Next Class</span></a></li>
39
</ul>
40
<ul class="navList">
41
<li><a href="../index.html?ztex/ZtexUsbReader.html" target="_top">Frames</a></li>
42
<li><a href="ZtexUsbReader.html" target="_top">No Frames</a></li>
43
</ul>
44
<ul class="navList" id="allclasses_navbar_top">
45
<li><a href="../allclasses-noframe.html">All Classes</a></li>
46
</ul>
47
<div>
48
<script type="text/javascript"><!--
49
  allClassesLink = document.getElementById("allclasses_navbar_top");
50
  if(window==top) {
51
    allClassesLink.style.display = "block";
52
  }
53
  else {
54
    allClassesLink.style.display = "none";
55
  }
56
  //-->
57
</script>
58
</div>
59
<div>
60
<ul class="subNavList">
61
<li>Summary:&nbsp;</li>
62
<li>Nested&nbsp;|&nbsp;</li>
63
<li>Field&nbsp;|&nbsp;</li>
64
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
65
<li><a href="#method_summary">Method</a></li>
66
</ul>
67
<ul class="subNavList">
68
<li>Detail:&nbsp;</li>
69
<li>Field&nbsp;|&nbsp;</li>
70
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
71
<li><a href="#method_detail">Method</a></li>
72
</ul>
73
</div>
74
<a name="skip-navbar_top">
75
<!--   -->
76
</a></div>
77
<!-- ========= END OF TOP NAVBAR ========= -->
78
<!-- ======== START OF CLASS DATA ======== -->
79
<div class="header">
80
<div class="subTitle">ztex</div>
81
<h2 title="Class ZtexUsbReader" class="title">Class ZtexUsbReader</h2>
82
</div>
83
<div class="contentContainer">
84
<ul class="inheritance">
85
<li>java.lang.Object</li>
86
<li>
87
<ul class="inheritance">
88
<li>ztex.ZtexUsbReader</li>
89
</ul>
90
</li>
91
</ul>
92
<div class="description">
93
<ul class="blockList">
94
<li class="blockList">
95
<hr>
96
<br>
97
<pre>public class <span class="strong">ZtexUsbReader</span>
98
extends java.lang.Object</pre>
99
<div class="block">A helper class to implement asynchronous bulk and interrupt read transfers. This class also has a speed test mode.</div>
100
</li>
101
</ul>
102
</div>
103
<div class="summary">
104
<ul class="blockList">
105
<li class="blockList">
106
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
107
<ul class="blockList">
108
<li class="blockList"><a name="constructor_summary">
109
<!--   -->
110
</a>
111
<h3>Constructor Summary</h3>
112
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
113
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
114
<tr>
115
<th class="colOne" scope="col">Constructor and Description</th>
116
</tr>
117
<tr class="altColor">
118
<td class="colOne"><code><strong><a href="../ztex/ZtexUsbReader.html#ZtexUsbReader(org.usb4java.DeviceHandle,%20int,%20boolean,%20int,%20int)">ZtexUsbReader</a></strong>(org.usb4java.DeviceHandle&nbsp;p_handle,
119
             int&nbsp;p_ep,
120
             boolean&nbsp;p_isInt,
121
             int&nbsp;p_bufNum,
122
             int&nbsp;p_bufSize)</code>
123
<div class="block">Creates the reader for a given USB device and endpoint number.</div>
124
</td>
125
</tr>
126
<tr class="rowColor">
127
<td class="colOne"><code><strong><a href="../ztex/ZtexUsbReader.html#ZtexUsbReader(ztex.Ztex1,%20int,%20boolean,%20int,%20int)">ZtexUsbReader</a></strong>(<a href="../ztex/Ztex1.html" title="class in ztex">Ztex1</a>&nbsp;ztex,
128
             int&nbsp;p_ep,
129
             boolean&nbsp;p_isInt,
130
             int&nbsp;p_bufNum,
131
             int&nbsp;p_bufSize)</code>
132
<div class="block">Creates the reader from a given ZTEX device and endpoint number.</div>
133
</td>
134
</tr>
135
<tr class="altColor">
136
<td class="colOne"><code><strong><a href="../ztex/ZtexUsbReader.html#ZtexUsbReader(ztex.Ztex1v1,%20int,%20int)">ZtexUsbReader</a></strong>(<a href="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</a>&nbsp;ztex,
137
             int&nbsp;p_bufNum,
138
             int&nbsp;p_bufSize)</code>
139
<div class="block">Creates the reader for the input endpoint of the default interface of a ZTEX device.</div>
140
</td>
141
</tr>
142
</table>
143
</li>
144
</ul>
145
<!-- ========== METHOD SUMMARY =========== -->
146
<ul class="blockList">
147
<li class="blockList"><a name="method_summary">
148
<!--   -->
149
</a>
150
<h3>Method Summary</h3>
151
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
152
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
153
<tr>
154
<th class="colFirst" scope="col">Modifier and Type</th>
155
<th class="colLast" scope="col">Method and Description</th>
156
</tr>
157
<tr class="altColor">
158
<td class="colFirst"><code>int</code></td>
159
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#bufSize()">bufSize</a></strong>()</code>
160
<div class="block">Return the buffer size.</div>
161
</td>
162
</tr>
163
<tr class="rowColor">
164
<td class="colFirst"><code>long</code></td>
165
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#byteCount()">byteCount</a></strong>()</code>
166
<div class="block">Return the number of bytes read since last <a href="../ztex/ZtexUsbReader.html#start(long)"><code>start(long)</code></a>.</div>
167
</td>
168
</tr>
169
<tr class="altColor">
170
<td class="colFirst"><code>void</code></td>
171
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#cancel()">cancel</a></strong>()</code>
172
<div class="block">Cancels all pending transfers, also see <a href="../ztex/ZtexUsbReader.html#cancelWait(int)"><code>cancelWait(int)</code></a>,</div>
173
</td>
174
</tr>
175
<tr class="rowColor">
176
<td class="colFirst"><code>boolean</code></td>
177
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#cancelWait(int)">cancelWait</a></strong>(int&nbsp;timeout)</code>
178
<div class="block">Cancels all pending transfers and waits until transfers are canceled.</div>
179
</td>
180
</tr>
181
<tr class="altColor">
182
<td class="colFirst"><code>int</code></td>
183
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#getBuffer(byte[],%20int)">getBuffer</a></strong>(byte[]&nbsp;buf,
184
         int&nbsp;timeout)</code>
185
<div class="block">Get the next buffer.</div>
186
</td>
187
</tr>
188
<tr class="rowColor">
189
<td class="colFirst"><code>void</code></td>
190
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbReader.html#start(long)">start</a></strong>(long&nbsp;maxCount)</code>
191
<div class="block">Start the reader.</div>
192
</td>
193
</tr>
194
</table>
195
<ul class="blockList">
196
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
197
<!--   -->
198
</a>
199
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
200
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
201
</ul>
202
</li>
203
</ul>
204
</li>
205
</ul>
206
</div>
207
<div class="details">
208
<ul class="blockList">
209
<li class="blockList">
210
<!-- ========= CONSTRUCTOR DETAIL ======== -->
211
<ul class="blockList">
212
<li class="blockList"><a name="constructor_detail">
213
<!--   -->
214
</a>
215
<h3>Constructor Detail</h3>
216
<a name="ZtexUsbReader(org.usb4java.DeviceHandle, int, boolean, int, int)">
217
<!--   -->
218
</a>
219
<ul class="blockList">
220
<li class="blockList">
221
<h4>ZtexUsbReader</h4>
222
<pre>public&nbsp;ZtexUsbReader(org.usb4java.DeviceHandle&nbsp;p_handle,
223
             int&nbsp;p_ep,
224
             boolean&nbsp;p_isInt,
225
             int&nbsp;p_bufNum,
226
             int&nbsp;p_bufSize)</pre>
227
<div class="block">Creates the reader for a given USB device and endpoint number.</div>
228
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p_handle</code> - The device handle used for communication (must be opened).</dd><dd><code>p_ep</code> - The input endpoint.</dd><dd><code>p_isInt</code> - True if it is an interrupt transfer.</dd><dd><code>p_bufSize</code> - size of each buffer. Typical values are 64KByte to 512KByte</dd><dd><code>p_bufNum</code> - number of buffer. Recommended queue size is 2MByte to 8MByte.</dd></dl>
229
</li>
230
</ul>
231
<a name="ZtexUsbReader(ztex.Ztex1, int, boolean, int, int)">
232
<!--   -->
233
</a>
234
<ul class="blockList">
235
<li class="blockList">
236
<h4>ZtexUsbReader</h4>
237
<pre>public&nbsp;ZtexUsbReader(<a href="../ztex/Ztex1.html" title="class in ztex">Ztex1</a>&nbsp;ztex,
238
             int&nbsp;p_ep,
239
             boolean&nbsp;p_isInt,
240
             int&nbsp;p_bufNum,
241
             int&nbsp;p_bufSize)</pre>
242
<div class="block">Creates the reader from a given ZTEX device and endpoint number.</div>
243
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ztex</code> - The ZTEX device.</dd><dd><code>p_ep</code> - The number of the input endpoint</dd><dd><code>p_isInt</code> - True if it is an interrupt transfer.</dd><dd><code>p_bufSize</code> - size of each buffer. Typical values are 64KByte to 512KByte</dd><dd><code>p_bufNum</code> - number of buffer. Recommended queue size is 2MByte to 8MByte.</dd></dl>
244
</li>
245
</ul>
246
<a name="ZtexUsbReader(ztex.Ztex1v1, int, int)">
247
<!--   -->
248
</a>
249
<ul class="blockListLast">
250
<li class="blockList">
251
<h4>ZtexUsbReader</h4>
252
<pre>public&nbsp;ZtexUsbReader(<a href="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</a>&nbsp;ztex,
253
             int&nbsp;p_bufNum,
254
             int&nbsp;p_bufSize)
255
              throws <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
256
                     <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
257
                     <a href="../ztex/CapabilityException.html" title="class in ztex">CapabilityException</a></pre>
258
<div class="block">Creates the reader for the input endpoint of the default interface of a ZTEX device.</div>
259
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ztex</code> - The ZTEX device.</dd><dd><code>p_bufSize</code> - size of each buffer. Typical values are 64KByte to 512KByte</dd><dd><code>p_bufNum</code> - number of buffer. Recommended queue size is 2MByte to 8MByte.</dd>
260
<dt><span class="strong">Throws:</span></dt>
261
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code></dd>
262
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd>
263
<dd><code><a href="../ztex/CapabilityException.html" title="class in ztex">CapabilityException</a></code></dd></dl>
264
</li>
265
</ul>
266
</li>
267
</ul>
268
<!-- ============ METHOD DETAIL ========== -->
269
<ul class="blockList">
270
<li class="blockList"><a name="method_detail">
271
<!--   -->
272
</a>
273
<h3>Method Detail</h3>
274
<a name="getBuffer(byte[], int)">
275
<!--   -->
276
</a>
277
<ul class="blockList">
278
<li class="blockList">
279
<h4>getBuffer</h4>
280
<pre>public&nbsp;int&nbsp;getBuffer(byte[]&nbsp;buf,
281
            int&nbsp;timeout)
282
              throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
283
<div class="block">Get the next buffer. This does not work in speed test mode, see see <a href="../ztex/ZtexUsbReader.html#start(long)"><code>start(long)</code></a>.</div>
284
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The byte array where to store the data.</dd><dd><code>timeout</code> - Timeout in ms. If timeout occurs the function returns -1.</dd>
285
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes read or -1 if timeout occurs.</dd>
286
<dt><span class="strong">Throws:</span></dt>
287
<dd><code>UsbExecption</code> - if an error occurred.</dd>
288
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
289
</li>
290
</ul>
291
<a name="byteCount()">
292
<!--   -->
293
</a>
294
<ul class="blockList">
295
<li class="blockList">
296
<h4>byteCount</h4>
297
<pre>public&nbsp;long&nbsp;byteCount()</pre>
298
<div class="block">Return the number of bytes read since last <a href="../ztex/ZtexUsbReader.html#start(long)"><code>start(long)</code></a>.</div>
299
<dl><dt><span class="strong">Returns:</span></dt><dd>The number of bytes read since last <a href="../ztex/ZtexUsbReader.html#start(long)"><code>start(long)</code></a>.</dd></dl>
300
</li>
301
</ul>
302
<a name="bufSize()">
303
<!--   -->
304
</a>
305
<ul class="blockList">
306
<li class="blockList">
307
<h4>bufSize</h4>
308
<pre>public&nbsp;int&nbsp;bufSize()</pre>
309
<div class="block">Return the buffer size.</div>
310
<dl><dt><span class="strong">Returns:</span></dt><dd>The buffer size.</dd></dl>
311
</li>
312
</ul>
313
<a name="cancel()">
314
<!--   -->
315
</a>
316
<ul class="blockList">
317
<li class="blockList">
318
<h4>cancel</h4>
319
<pre>public&nbsp;void&nbsp;cancel()
320
            throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
321
<div class="block">Cancels all pending transfers, also see <a href="../ztex/ZtexUsbReader.html#cancelWait(int)"><code>cancelWait(int)</code></a>,</div>
322
<dl><dt><span class="strong">Throws:</span></dt>
323
<dd><code>UsbExecption</code> - if an error occurred.</dd>
324
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
325
</li>
326
</ul>
327
<a name="cancelWait(int)">
328
<!--   -->
329
</a>
330
<ul class="blockList">
331
<li class="blockList">
332
<h4>cancelWait</h4>
333
<pre>public&nbsp;boolean&nbsp;cancelWait(int&nbsp;timeout)
334
                   throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
335
<div class="block">Cancels all pending transfers and waits until transfers are canceled.</div>
336
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - Timeout in ms</dd>
337
<dt><span class="strong">Returns:</span></dt><dd>True if all transfers are finished or cancelled</dd>
338
<dt><span class="strong">Throws:</span></dt>
339
<dd><code>UsbExecption</code> - if an error occurred.</dd>
340
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
341
</li>
342
</ul>
343
<a name="start(long)">
344
<!--   -->
345
</a>
346
<ul class="blockListLast">
347
<li class="blockList">
348
<h4>start</h4>
349
<pre>public&nbsp;void&nbsp;start(long&nbsp;maxCount)
350
           throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
351
<div class="block">Start the reader.
352
 The amount of buffers to be read is defined using the parameter maxCount.
353
 A value of 0 starts infinite reads, a value of -1 starts the reader in speed test mode.
354
 In this mode the buffer content is ignored and new read transfer are initiated immediately.</div>
355
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>maxCount</code> - Maximum amount of bytes to read or 0 for infinite transfers or <0 for speed test mode.</dd>
356
<dt><span class="strong">Throws:</span></dt>
357
<dd><code>UsbExecption</code> - if an error occurred.</dd>
358
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
359
</li>
360
</ul>
361
</li>
362
</ul>
363
</li>
364
</ul>
365
</div>
366
</div>
367
<!-- ========= END OF CLASS DATA ========= -->
368
<!-- ======= START OF BOTTOM NAVBAR ====== -->
369
<div class="bottomNav"><a name="navbar_bottom">
370
<!--   -->
371
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
372
<!--   -->
373
</a>
374
<ul class="navList" title="Navigation">
375
<li><a href="../ztex/package-summary.html">Package</a></li>
376
<li class="navBarCell1Rev">Class</li>
377
<li><a href="package-tree.html">Tree</a></li>
378
<li><a href="../deprecated-list.html">Deprecated</a></li>
379
<li><a href="../index-all.html">Index</a></li>
380
<li><a href="../help-doc.html">Help</a></li>
381
</ul>
382
</div>
383
<div class="subNav">
384
<ul class="navList">
385
<li><a href="../ztex/ZtexScanBus1.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
386
<li><a href="../ztex/ZtexUsbWriter.html" title="class in ztex"><span class="strong">Next Class</span></a></li>
387
</ul>
388
<ul class="navList">
389
<li><a href="../index.html?ztex/ZtexUsbReader.html" target="_top">Frames</a></li>
390
<li><a href="ZtexUsbReader.html" target="_top">No Frames</a></li>
391
</ul>
392
<ul class="navList" id="allclasses_navbar_bottom">
393
<li><a href="../allclasses-noframe.html">All Classes</a></li>
394
</ul>
395
<div>
396
<script type="text/javascript"><!--
397
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
398
  if(window==top) {
399
    allClassesLink.style.display = "block";
400
  }
401
  else {
402
    allClassesLink.style.display = "none";
403
  }
404
  //-->
405
</script>
406
</div>
407
<div>
408
<ul class="subNavList">
409
<li>Summary:&nbsp;</li>
410
<li>Nested&nbsp;|&nbsp;</li>
411
<li>Field&nbsp;|&nbsp;</li>
412
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
413
<li><a href="#method_summary">Method</a></li>
414
</ul>
415
<ul class="subNavList">
416
<li>Detail:&nbsp;</li>
417
<li>Field&nbsp;|&nbsp;</li>
418
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
419
<li><a href="#method_detail">Method</a></li>
420
</ul>
421
</div>
422
<a name="skip-navbar_bottom">
423
<!--   -->
424
</a></div>
425
<!-- ======== END OF BOTTOM NAVBAR ======= -->
426
</body>
427
</html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.