File: group__brlapi__protocol.html

package info (click to toggle)
brltty 3.4.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,268 kB
  • ctags: 4,537
  • sloc: ansic: 54,295; sh: 3,470; makefile: 793; tcl: 398; yacc: 300; awk: 57; python: 29
file content (682 lines) | stat: -rw-r--r-- 23,235 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>BrlAPI&apos;s protocol</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>BrlAPI's protocol</h1>Instructions and constants for <em>BrlAPI</em> 's protocol. 
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a4">BRLAPI_MAXPACKETSIZE</a>&nbsp;&nbsp;&nbsp;512</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a5">BRLPACKET_AUTHKEY</a>&nbsp;&nbsp;&nbsp;'K'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a6">BRLPACKET_BYE</a>&nbsp;&nbsp;&nbsp;'B'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a7">BRLPACKET_GETDRIVERID</a>&nbsp;&nbsp;&nbsp;'d'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a8">BRLPACKET_GETDRIVERNAME</a>&nbsp;&nbsp;&nbsp;'n'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a9">BRLPACKET_GETDISPLAYSIZE</a>&nbsp;&nbsp;&nbsp;'s'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a10">BRLPACKET_GETTTY</a>&nbsp;&nbsp;&nbsp;'t'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a11">BRLPACKET_LEAVETTY</a>&nbsp;&nbsp;&nbsp;'L'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a12">BRLPACKET_KEY</a>&nbsp;&nbsp;&nbsp;'k'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a13">BRLPACKET_COMMAND</a>&nbsp;&nbsp;&nbsp;'c'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a14">BRLPACKET_MASKKEYS</a>&nbsp;&nbsp;&nbsp;'m'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a15">BRLPACKET_UNMASKKEYS</a>&nbsp;&nbsp;&nbsp;'u'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a16">BRLPACKET_WRITE</a>&nbsp;&nbsp;&nbsp;'W'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a17">BRLPACKET_WRITEDOTS</a>&nbsp;&nbsp;&nbsp;'D'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a18">BRLPACKET_STATWRITE</a>&nbsp;&nbsp;&nbsp;'S'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a19">BRLPACKET_GETRAW</a>&nbsp;&nbsp;&nbsp;'*'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a20">BRLPACKET_LEAVERAW</a>&nbsp;&nbsp;&nbsp;'#'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a21">BRLPACKET_PACKET</a>&nbsp;&nbsp;&nbsp;'p'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a22">BRLPACKET_ACK</a>&nbsp;&nbsp;&nbsp;'A'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a23">BRLPACKET_ERROR</a>&nbsp;&nbsp;&nbsp;'E'</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a24">BRLRAW_MAGIC</a>&nbsp;&nbsp;&nbsp;(0xdeadbeefL)</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef uint32_t&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a0">brl_type_t</a></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a2">brlapi_writePacket</a> (int fd, <a class="el" href="group__brlapi__protocol.html#a0">brl_type_t</a> type, const void *buf, size_t size)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a3">brlapi_readPacket</a> (int fd, <a class="el" href="group__brlapi__protocol.html#a0">brl_type_t</a> *type, void *buf, size_t size)</td></tr>
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td nowrap align=right valign=top>pthread_mutex_t&nbsp;</td><td valign=bottom><a class="el" href="group__brlapi__protocol.html#a1">brlapi_fd_mutex</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
These are defines for the protocol between <em>BrlAPI</em> 's server and clients. Understanding is not needed to use the <em>BrlAPI</em> library, so reading this is not needed unless really wanting to connect to <em>BrlAPI</em> without <em>BrlAPI</em> 's library. <hr><h2>Define Documentation</h2>
<a name="a4" doxytag="brlapi.h::BRLAPI_MAXPACKETSIZE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLAPI_MAXPACKETSIZE&nbsp;&nbsp;&nbsp;512
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maximum packet size for packets exchanged on sockets and with braille terminal     </td>
  </tr>
</table>
<a name="a22" doxytag="brlapi.h::BRLPACKET_ACK"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_ACK&nbsp;&nbsp;&nbsp;'A'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Acknowledgement     </td>
  </tr>
</table>
<a name="a5" doxytag="brlapi.h::BRLPACKET_AUTHKEY"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_AUTHKEY&nbsp;&nbsp;&nbsp;'K'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Authentication key     </td>
  </tr>
</table>
<a name="a6" doxytag="brlapi.h::BRLPACKET_BYE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_BYE&nbsp;&nbsp;&nbsp;'B'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Bye     </td>
  </tr>
</table>
<a name="a13" doxytag="brlapi.h::BRLPACKET_COMMAND"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_COMMAND&nbsp;&nbsp;&nbsp;'c'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
braille command     </td>
  </tr>
</table>
<a name="a23" doxytag="brlapi.h::BRLPACKET_ERROR"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_ERROR&nbsp;&nbsp;&nbsp;'E'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Error in protocol     </td>
  </tr>
</table>
<a name="a9" doxytag="brlapi.h::BRLPACKET_GETDISPLAYSIZE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_GETDISPLAYSIZE&nbsp;&nbsp;&nbsp;'s'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Dimensions of brl display     </td>
  </tr>
</table>
<a name="a7" doxytag="brlapi.h::BRLPACKET_GETDRIVERID"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_GETDRIVERID&nbsp;&nbsp;&nbsp;'d'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Ask which driver is used     </td>
  </tr>
</table>
<a name="a8" doxytag="brlapi.h::BRLPACKET_GETDRIVERNAME"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_GETDRIVERNAME&nbsp;&nbsp;&nbsp;'n'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Ask which driver is used     </td>
  </tr>
</table>
<a name="a19" doxytag="brlapi.h::BRLPACKET_GETRAW"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_GETRAW&nbsp;&nbsp;&nbsp;'*'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enter in raw mode     </td>
  </tr>
</table>
<a name="a10" doxytag="brlapi.h::BRLPACKET_GETTTY"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_GETTTY&nbsp;&nbsp;&nbsp;'t'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
asks for a specified tty     </td>
  </tr>
</table>
<a name="a12" doxytag="brlapi.h::BRLPACKET_KEY"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_KEY&nbsp;&nbsp;&nbsp;'k'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
braille key     </td>
  </tr>
</table>
<a name="a20" doxytag="brlapi.h::BRLPACKET_LEAVERAW"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_LEAVERAW&nbsp;&nbsp;&nbsp;'#'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Leave raw mode     </td>
  </tr>
</table>
<a name="a11" doxytag="brlapi.h::BRLPACKET_LEAVETTY"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_LEAVETTY&nbsp;&nbsp;&nbsp;'L'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
release the tty     </td>
  </tr>
</table>
<a name="a14" doxytag="brlapi.h::BRLPACKET_MASKKEYS"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_MASKKEYS&nbsp;&nbsp;&nbsp;'m'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Mask a key-range     </td>
  </tr>
</table>
<a name="a21" doxytag="brlapi.h::BRLPACKET_PACKET"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_PACKET&nbsp;&nbsp;&nbsp;'p'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Raw packets     </td>
  </tr>
</table>
<a name="a18" doxytag="brlapi.h::BRLPACKET_STATWRITE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_STATWRITE&nbsp;&nbsp;&nbsp;'S'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write Status Cells     </td>
  </tr>
</table>
<a name="a15" doxytag="brlapi.h::BRLPACKET_UNMASKKEYS"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_UNMASKKEYS&nbsp;&nbsp;&nbsp;'u'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Unmask key range     </td>
  </tr>
</table>
<a name="a16" doxytag="brlapi.h::BRLPACKET_WRITE"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_WRITE&nbsp;&nbsp;&nbsp;'W'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write On Braille Display     </td>
  </tr>
</table>
<a name="a17" doxytag="brlapi.h::BRLPACKET_WRITEDOTS"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLPACKET_WRITEDOTS&nbsp;&nbsp;&nbsp;'D'
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Write Dots On Braille Display     </td>
  </tr>
</table>
<a name="a24" doxytag="brlapi.h::BRLRAW_MAGIC"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define BRLRAW_MAGIC&nbsp;&nbsp;&nbsp;(0xdeadbeefL)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Magic number to give when sending a BRLPACKET_GETRAW packet     </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a name="a0" doxytag="brlapi.h::brl_type_t"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef uint32_t brl_type_t
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
type for packet type. Only unsigned can cross networks, 32bits     </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a3" doxytag="brlapi.h::brlapi_readPacket"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int brlapi_readPacket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__brlapi__protocol.html#a0">brl_type_t</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>size</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Read a packet from <em>BrlAPI</em> server
<p>
This function is for internal use, but one might use it if one really knows what one is doing...
<p>
<em>type</em> is where the function will store the packet type; it should always be one of the above defined BRLPACKET_* (or else something very nasty must have happened :/).
<p>
The syntax is the same as read()'s.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
packet's size, -2 if <code>EOF</code> occurred, -1 on error </dl>    </td>
  </tr>
</table>
<a name="a2" doxytag="brlapi.h::brlapi_writePacket"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int brlapi_writePacket </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__brlapi__protocol.html#a0">brl_type_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>type</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>size</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Send a packet to <em>BrlAPI</em> server
<p>
This function is for internal use, but one might use it if one really knows what one is doing...
<p>
<em>type</em> should only be one of the above defined BRLPACKET_*.
<p>
The syntax is the same as write()'s.
<p>
<dl compact><dt><b>Returns: </b></dt><dd>
0 on success, -1 on failure </dl>    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a name="a1" doxytag="brlapi.h::brlapi_fd_mutex"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> pthread_mutex_t brlapi_fd_mutex
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Mutex for protecting concurrent fd access
<p>
In order to regulate concurrent access to the library's file descriptor and requests to / answers from <em>BrlAPI</em> server, every function of the library locks this mutex, namely
<p>
<ul>
<li><a class="el" href="group__brlapi__connection.html#a0">brlapi_initializeConnection()</a><li><a class="el" href="group__brlapi__connection.html#a1">brlapi_closeConnection()</a><li><a class="el" href="group__brlapi__raw.html#a0">brlapi_getRaw()</a><li><a class="el" href="group__brlapi__raw.html#a1">brlapi_leaveRaw()</a><li><a class="el" href="group__brlapi__raw.html#a2">brlapi_sendRaw()</a><li><a class="el" href="group__brlapi__raw.html#a3">brlapi_recvRaw()</a><li><a class="el" href="group__brlapi__info.html#a0">brlapi_getDriverId()</a><li><a class="el" href="group__brlapi__info.html#a1">brlapi_getDriverName()</a><li><a class="el" href="group__brlapi__info.html#a2">brlapi_getDisplaySize()</a><li><a class="el" href="group__brlapi__tty.html#a0">brlapi_getTty()</a><li><a class="el" href="group__brlapi__tty.html#a1">brlapi_leaveTty()</a><li>brlapi_write*()<li>brlapi_(un)?ignorekeys()<li>brlapi_read*()</ul>
If both these functions and <a class="el" href="group__brlapi__protocol.html#a2">brlapi_writePacket()</a> or <a class="el" href="group__brlapi__protocol.html#a3">brlapi_readPacket()</a> are used in a multithreaded application, this mutex must be locked before calling <a class="el" href="group__brlapi__protocol.html#a2">brlapi_writePacket()</a> or <a class="el" href="group__brlapi__protocol.html#a3">brlapi_readPacket()</a>, and unlocked afterwards.     </td>
  </tr>
</table>
<hr><address style="align: right;"><small>Generated on Thu Jan 15 13:21:28 2004 for BrlAPI by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>