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/] [ZtexUsbWriter.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>ZtexUsbWriter</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="ZtexUsbWriter";
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/ZtexUsbReader.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
38
<li>Next Class</li>
39
</ul>
40
<ul class="navList">
41
<li><a href="../index.html?ztex/ZtexUsbWriter.html" target="_top">Frames</a></li>
42
<li><a href="ZtexUsbWriter.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 ZtexUsbWriter" class="title">Class ZtexUsbWriter</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.ZtexUsbWriter</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">ZtexUsbWriter</span>
98
extends java.lang.Object</pre>
99
<div class="block">A helper class to implement asynchronous bulk and interrupt write transfers.</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/ZtexUsbWriter.html#ZtexUsbWriter(org.usb4java.DeviceHandle,%20int,%20boolean,%20int,%20int)">ZtexUsbWriter</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 writer 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/ZtexUsbWriter.html#ZtexUsbWriter(ztex.Ztex1,%20int,%20boolean,%20int,%20int)">ZtexUsbWriter</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 writer 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/ZtexUsbWriter.html#ZtexUsbWriter(ztex.Ztex1v1,%20int,%20int)">ZtexUsbWriter</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 writer 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/ZtexUsbWriter.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/ZtexUsbWriter.html#byteCount()">byteCount</a></strong>()</code>
166
<div class="block">Return the number of bytes transmitted.</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/ZtexUsbWriter.html#cancel()">cancel</a></strong>()</code>
172
<div class="block">Cancels all pending transfers, also see <a href="../ztex/ZtexUsbWriter.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/ZtexUsbWriter.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/ZtexUsbWriter.html#transmitBuffer(byte[],%20int)">transmitBuffer</a></strong>(byte[]&nbsp;buf,
184
              int&nbsp;timeout)</code>
185
<div class="block">Transmit the next buffer.</div>
186
</td>
187
</tr>
188
<tr class="rowColor">
189
<td class="colFirst"><code>int</code></td>
190
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbWriter.html#transmitBuffer(byte[],%20int,%20int)">transmitBuffer</a></strong>(byte[]&nbsp;buf,
191
              int&nbsp;maxLen,
192
              int&nbsp;timeout)</code>
193
<div class="block">Transmit the next buffer.</div>
194
</td>
195
</tr>
196
<tr class="altColor">
197
<td class="colFirst"><code>boolean</code></td>
198
<td class="colLast"><code><strong><a href="../ztex/ZtexUsbWriter.html#wait(int)">wait</a></strong>(int&nbsp;timeout)</code>
199
<div class="block">Waits until all pending transfers are finished or canceled.</div>
200
</td>
201
</tr>
202
</table>
203
<ul class="blockList">
204
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
205
<!--   -->
206
</a>
207
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
208
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
209
</ul>
210
</li>
211
</ul>
212
</li>
213
</ul>
214
</div>
215
<div class="details">
216
<ul class="blockList">
217
<li class="blockList">
218
<!-- ========= CONSTRUCTOR DETAIL ======== -->
219
<ul class="blockList">
220
<li class="blockList"><a name="constructor_detail">
221
<!--   -->
222
</a>
223
<h3>Constructor Detail</h3>
224
<a name="ZtexUsbWriter(org.usb4java.DeviceHandle, int, boolean, int, int)">
225
<!--   -->
226
</a>
227
<ul class="blockList">
228
<li class="blockList">
229
<h4>ZtexUsbWriter</h4>
230
<pre>public&nbsp;ZtexUsbWriter(org.usb4java.DeviceHandle&nbsp;p_handle,
231
             int&nbsp;p_ep,
232
             boolean&nbsp;p_isInt,
233
             int&nbsp;p_bufNum,
234
             int&nbsp;p_bufSize)</pre>
235
<div class="block">Creates the writer for a given USB device and endpoint number.</div>
236
<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 are 2MByte to 8MByte.</dd></dl>
237
</li>
238
</ul>
239
<a name="ZtexUsbWriter(ztex.Ztex1, int, boolean, int, int)">
240
<!--   -->
241
</a>
242
<ul class="blockList">
243
<li class="blockList">
244
<h4>ZtexUsbWriter</h4>
245
<pre>public&nbsp;ZtexUsbWriter(<a href="../ztex/Ztex1.html" title="class in ztex">Ztex1</a>&nbsp;ztex,
246
             int&nbsp;p_ep,
247
             boolean&nbsp;p_isInt,
248
             int&nbsp;p_bufNum,
249
             int&nbsp;p_bufSize)</pre>
250
<div class="block">Creates the writer from a given ZTEX device and endpoint number.</div>
251
<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>
252
</li>
253
</ul>
254
<a name="ZtexUsbWriter(ztex.Ztex1v1, int, int)">
255
<!--   -->
256
</a>
257
<ul class="blockListLast">
258
<li class="blockList">
259
<h4>ZtexUsbWriter</h4>
260
<pre>public&nbsp;ZtexUsbWriter(<a href="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</a>&nbsp;ztex,
261
             int&nbsp;p_bufNum,
262
             int&nbsp;p_bufSize)
263
              throws <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
264
                     <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
265
                     <a href="../ztex/CapabilityException.html" title="class in ztex">CapabilityException</a></pre>
266
<div class="block">Creates the writer for the input endpoint of the default interface of a ZTEX device.</div>
267
<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>
268
<dt><span class="strong">Throws:</span></dt>
269
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code></dd>
270
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd>
271
<dd><code><a href="../ztex/CapabilityException.html" title="class in ztex">CapabilityException</a></code></dd></dl>
272
</li>
273
</ul>
274
</li>
275
</ul>
276
<!-- ============ METHOD DETAIL ========== -->
277
<ul class="blockList">
278
<li class="blockList"><a name="method_detail">
279
<!--   -->
280
</a>
281
<h3>Method Detail</h3>
282
<a name="transmitBuffer(byte[], int, int)">
283
<!--   -->
284
</a>
285
<ul class="blockList">
286
<li class="blockList">
287
<h4>transmitBuffer</h4>
288
<pre>public&nbsp;int&nbsp;transmitBuffer(byte[]&nbsp;buf,
289
                 int&nbsp;maxLen,
290
                 int&nbsp;timeout)
291
                   throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
292
<div class="block">Transmit the next buffer.</div>
293
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The byte array which contains the data.</dd><dd><code>maxLen</code> - Maximum amount of data to transmit. If it is larger than the buffer size the last bytes are ignored.</dd><dd><code>timeout</code> - Timeout in ms. If timeout occurs the function returns -1.</dd>
294
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes transmitted or -1 if timeout occurs.</dd>
295
<dt><span class="strong">Throws:</span></dt>
296
<dd><code>UsbExecption</code> - if an error occurred.</dd>
297
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
298
</li>
299
</ul>
300
<a name="transmitBuffer(byte[], int)">
301
<!--   -->
302
</a>
303
<ul class="blockList">
304
<li class="blockList">
305
<h4>transmitBuffer</h4>
306
<pre>public&nbsp;int&nbsp;transmitBuffer(byte[]&nbsp;buf,
307
                 int&nbsp;timeout)
308
                   throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
309
<div class="block">Transmit the next buffer.</div>
310
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The byte array which contains the data. If the array is larger than the buffer size the last bytes are ignored.</dd><dd><code>timeout</code> - Timeout in ms. If timeout occurs the function returns -1.</dd>
311
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes transmitted or -1 if timeout occurs.</dd>
312
<dt><span class="strong">Throws:</span></dt>
313
<dd><code>UsbExecption</code> - if an error occurred.</dd>
314
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
315
</li>
316
</ul>
317
<a name="byteCount()">
318
<!--   -->
319
</a>
320
<ul class="blockList">
321
<li class="blockList">
322
<h4>byteCount</h4>
323
<pre>public&nbsp;long&nbsp;byteCount()</pre>
324
<div class="block">Return the number of bytes transmitted.</div>
325
<dl><dt><span class="strong">Returns:</span></dt><dd>The number of bytes transmitted.</dd></dl>
326
</li>
327
</ul>
328
<a name="bufSize()">
329
<!--   -->
330
</a>
331
<ul class="blockList">
332
<li class="blockList">
333
<h4>bufSize</h4>
334
<pre>public&nbsp;int&nbsp;bufSize()</pre>
335
<div class="block">Return the buffer size.</div>
336
<dl><dt><span class="strong">Returns:</span></dt><dd>The buffer size.</dd></dl>
337
</li>
338
</ul>
339
<a name="cancel()">
340
<!--   -->
341
</a>
342
<ul class="blockList">
343
<li class="blockList">
344
<h4>cancel</h4>
345
<pre>public&nbsp;void&nbsp;cancel()
346
            throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
347
<div class="block">Cancels all pending transfers, also see <a href="../ztex/ZtexUsbWriter.html#cancelWait(int)"><code>cancelWait(int)</code></a>.</div>
348
<dl><dt><span class="strong">Throws:</span></dt>
349
<dd><code>UsbExecption</code> - if an error occurred.</dd>
350
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
351
</li>
352
</ul>
353
<a name="wait(int)">
354
<!--   -->
355
</a>
356
<ul class="blockList">
357
<li class="blockList">
358
<h4>wait</h4>
359
<pre>public&nbsp;boolean&nbsp;wait(int&nbsp;timeout)
360
             throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
361
<div class="block">Waits until all pending transfers are finished or canceled.</div>
362
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - Timeout in ms</dd>
363
<dt><span class="strong">Returns:</span></dt><dd>True if all transfers are finished or cancelled</dd>
364
<dt><span class="strong">Throws:</span></dt>
365
<dd><code>UsbExecption</code> - if an error occurred.</dd>
366
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
367
</li>
368
</ul>
369
<a name="cancelWait(int)">
370
<!--   -->
371
</a>
372
<ul class="blockListLast">
373
<li class="blockList">
374
<h4>cancelWait</h4>
375
<pre>public&nbsp;boolean&nbsp;cancelWait(int&nbsp;timeout)
376
                   throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
377
<div class="block">Cancels all pending transfers and waits until transfers are canceled.</div>
378
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>timeout</code> - Timeout in ms</dd>
379
<dt><span class="strong">Returns:</span></dt><dd>True if all transfers or cancelled.</dd>
380
<dt><span class="strong">Throws:</span></dt>
381
<dd><code>UsbExecption</code> - if an error occurred.</dd>
382
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code></dd></dl>
383
</li>
384
</ul>
385
</li>
386
</ul>
387
</li>
388
</ul>
389
</div>
390
</div>
391
<!-- ========= END OF CLASS DATA ========= -->
392
<!-- ======= START OF BOTTOM NAVBAR ====== -->
393
<div class="bottomNav"><a name="navbar_bottom">
394
<!--   -->
395
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
396
<!--   -->
397
</a>
398
<ul class="navList" title="Navigation">
399
<li><a href="../ztex/package-summary.html">Package</a></li>
400
<li class="navBarCell1Rev">Class</li>
401
<li><a href="package-tree.html">Tree</a></li>
402
<li><a href="../deprecated-list.html">Deprecated</a></li>
403
<li><a href="../index-all.html">Index</a></li>
404
<li><a href="../help-doc.html">Help</a></li>
405
</ul>
406
</div>
407
<div class="subNav">
408
<ul class="navList">
409
<li><a href="../ztex/ZtexUsbReader.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
410
<li>Next Class</li>
411
</ul>
412
<ul class="navList">
413
<li><a href="../index.html?ztex/ZtexUsbWriter.html" target="_top">Frames</a></li>
414
<li><a href="ZtexUsbWriter.html" target="_top">No Frames</a></li>
415
</ul>
416
<ul class="navList" id="allclasses_navbar_bottom">
417
<li><a href="../allclasses-noframe.html">All Classes</a></li>
418
</ul>
419
<div>
420
<script type="text/javascript"><!--
421
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
422
  if(window==top) {
423
    allClassesLink.style.display = "block";
424
  }
425
  else {
426
    allClassesLink.style.display = "none";
427
  }
428
  //-->
429
</script>
430
</div>
431
<div>
432
<ul class="subNavList">
433
<li>Summary:&nbsp;</li>
434
<li>Nested&nbsp;|&nbsp;</li>
435
<li>Field&nbsp;|&nbsp;</li>
436
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
437
<li><a href="#method_summary">Method</a></li>
438
</ul>
439
<ul class="subNavList">
440
<li>Detail:&nbsp;</li>
441
<li>Field&nbsp;|&nbsp;</li>
442
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
443
<li><a href="#method_detail">Method</a></li>
444
</ul>
445
</div>
446
<a name="skip-navbar_bottom">
447
<!--   -->
448
</a></div>
449
<!-- ======== END OF BOTTOM NAVBAR ======= -->
450
</body>
451
</html>

powered by: WebSVN 2.1.0

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