1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-1999. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter Device- and Class- Specific Functions Manager |
---|
10 | |
---|
11 | @section Introduction |
---|
12 | |
---|
13 | The device- and class- specific functions manager is ... |
---|
14 | |
---|
15 | The directives provided by the device- and class- specific functions |
---|
16 | manager are: |
---|
17 | |
---|
18 | @itemize @bullet |
---|
19 | @item @code{cfgetispeed} - Reads terminal input baud rate |
---|
20 | @item @code{cfgetospeed} - Reads terminal output baud rate |
---|
21 | @item @code{cfsetispeed} - Sets terminal input baud rate |
---|
22 | @item @code{cfsetospeed} - Set terminal output baud rate |
---|
23 | @item @code{tcgetattr} - Gets terminal attributes |
---|
24 | @item @code{tcsetattr} - Set terminal attributes |
---|
25 | @item @code{tcsendbreak} - Sends a break to a terminal |
---|
26 | @item @code{tcdrain} - Waits for all output to be transmitted to the terminal |
---|
27 | @item @code{tcflush} - Discards terminal data |
---|
28 | @item @code{tcflow} - Suspends/restarts terminal output |
---|
29 | @item @code{tcgetpgrp} - Gets foreground process group ID |
---|
30 | @item @code{tcsetpgrp} - Sets foreground process group ID |
---|
31 | @end itemize |
---|
32 | |
---|
33 | @section Background |
---|
34 | |
---|
35 | There is currently no text in this section. |
---|
36 | |
---|
37 | @section Operations |
---|
38 | |
---|
39 | There is currently no text in this section. |
---|
40 | |
---|
41 | @section Directives |
---|
42 | |
---|
43 | This section details the device- and class- specific functions manager's |
---|
44 | directives. A subsection is dedicated to each of this manager's directives |
---|
45 | and describes the calling sequence, related constants, usage, |
---|
46 | and status codes. |
---|
47 | |
---|
48 | @c |
---|
49 | @c |
---|
50 | @c |
---|
51 | @page |
---|
52 | @subsection cfgetispeed - Reads terminal input baud rate |
---|
53 | |
---|
54 | @findex cfgetispeed |
---|
55 | @cindex reads terminal input baud rate |
---|
56 | |
---|
57 | @subheading CALLING SEQUENCE: |
---|
58 | |
---|
59 | @ifset is-C |
---|
60 | @example |
---|
61 | #include <termios.h> |
---|
62 | |
---|
63 | int cfgetispeed( |
---|
64 | const struct termios *p |
---|
65 | ); |
---|
66 | @end example |
---|
67 | @end ifset |
---|
68 | |
---|
69 | @ifset is-Ada |
---|
70 | @end ifset |
---|
71 | |
---|
72 | @subheading STATUS CODES: |
---|
73 | |
---|
74 | The @code{cfgetispeed()} function returns a code for baud rate. |
---|
75 | |
---|
76 | @subheading DESCRIPTION: |
---|
77 | |
---|
78 | The @code{cfsetispeed()} function stores a code for the terminal speed |
---|
79 | stored in a struct termios. The codes are defined in @code{<termios.h>} |
---|
80 | by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, |
---|
81 | B1800, B2400, B4800, B9600, B19200, and B38400. |
---|
82 | |
---|
83 | The @code{cfsetispeed()} function does not do anything to the hardware. |
---|
84 | It merely stores a value for use by @code{tcsetattr()}. |
---|
85 | |
---|
86 | @subheading NOTES: |
---|
87 | |
---|
88 | Baud rates are defined by symbols, such as B110, B1200, B2400. The actual |
---|
89 | number returned for any given speed may change from system to system. |
---|
90 | |
---|
91 | @c |
---|
92 | @c |
---|
93 | @c |
---|
94 | @page |
---|
95 | @subsection cfgetospeed - Reads terminal output baud rate |
---|
96 | |
---|
97 | @findex cfgetospeed |
---|
98 | @cindex reads terminal output baud rate |
---|
99 | |
---|
100 | @subheading CALLING SEQUENCE: |
---|
101 | |
---|
102 | @ifset is-C |
---|
103 | @example |
---|
104 | #include <termios.h> |
---|
105 | |
---|
106 | int cfgetospeed( |
---|
107 | const struct termios *p |
---|
108 | ); |
---|
109 | @end example |
---|
110 | @end ifset |
---|
111 | |
---|
112 | @ifset is-Ada |
---|
113 | @end ifset |
---|
114 | |
---|
115 | @subheading STATUS CODES: |
---|
116 | |
---|
117 | The @code{cfgetospeed()} function returns the termios code for the baud rate. |
---|
118 | |
---|
119 | @subheading DESCRIPTION: |
---|
120 | |
---|
121 | The @code{cfgetospeed()} function returns a code for the terminal speed |
---|
122 | stored in a @code{struct termios}. The codes are defined in @code{<termios.h>} |
---|
123 | by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, |
---|
124 | B2400, B4800, B9600, B19200, and B38400. |
---|
125 | |
---|
126 | The @code{cfgetospeed()} function does not do anything to the hardware. |
---|
127 | It merely returns the value stored by a previous call to @code{tcgetattr()}. |
---|
128 | |
---|
129 | @subheading NOTES: |
---|
130 | |
---|
131 | Baud rates are defined by symbols, such as B110, B1200, B2400. The actual |
---|
132 | number returned for any given speed may change from system to system. |
---|
133 | |
---|
134 | @c |
---|
135 | @c |
---|
136 | @c |
---|
137 | @page |
---|
138 | @subsection cfsetispeed - Sets terminal input baud rate |
---|
139 | |
---|
140 | @findex cfsetispeed |
---|
141 | @cindex sets terminal input baud rate |
---|
142 | |
---|
143 | @subheading CALLING SEQUENCE: |
---|
144 | |
---|
145 | @ifset is-C |
---|
146 | @example |
---|
147 | #include <termios.h> |
---|
148 | |
---|
149 | int cfsetispeed( |
---|
150 | struct termios *p, |
---|
151 | speed_t speed |
---|
152 | ); |
---|
153 | @end example |
---|
154 | @end ifset |
---|
155 | |
---|
156 | @ifset is-Ada |
---|
157 | @end ifset |
---|
158 | |
---|
159 | @subheading STATUS CODES: |
---|
160 | |
---|
161 | The @code{cfsetispeed()} function returns a zero when successful and |
---|
162 | returns -1 when an error occurs. |
---|
163 | |
---|
164 | @subheading DESCRIPTION: |
---|
165 | |
---|
166 | The @code{cfsetispeed()} function stores a code for the terminal speed |
---|
167 | stored in a struct termios. The codes are defined in @code{<termios.h>} |
---|
168 | by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, |
---|
169 | B1800, B2400, B4800, B9600, B19200, and B38400. |
---|
170 | |
---|
171 | @subheading NOTES: |
---|
172 | |
---|
173 | This function merely stores a value in the @code{termios} structure. It |
---|
174 | does not change the terminal speed until a @code{tcsetattr()} is done. |
---|
175 | It does not detect impossible terminal speeds. |
---|
176 | |
---|
177 | @c |
---|
178 | @c |
---|
179 | @c |
---|
180 | @page |
---|
181 | @subsection cfsetospeed - Sets terminal output baud rate |
---|
182 | |
---|
183 | @findex cfsetospeed |
---|
184 | @cindex sets terminal output baud rate |
---|
185 | |
---|
186 | @subheading CALLING SEQUENCE: |
---|
187 | |
---|
188 | @ifset is-C |
---|
189 | @example |
---|
190 | #include <termios.h> |
---|
191 | |
---|
192 | int cfsetospeed( |
---|
193 | struct termios *p, |
---|
194 | speed_t speed |
---|
195 | ); |
---|
196 | @end example |
---|
197 | @end ifset |
---|
198 | |
---|
199 | @ifset is-Ada |
---|
200 | @end ifset |
---|
201 | |
---|
202 | @subheading STATUS CODES: |
---|
203 | |
---|
204 | The @code{cfsetospeed()} function returns a zero when successful and |
---|
205 | returns -1 when an error occurs. |
---|
206 | |
---|
207 | |
---|
208 | @subheading DESCRIPTION: |
---|
209 | |
---|
210 | The @code{cfsetospeed()} function stores a code for the terminal speed stored |
---|
211 | in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the |
---|
212 | macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, |
---|
213 | B4800, B9600, B19200, and B38400. |
---|
214 | |
---|
215 | The @code{cfsetospeed()} function does not do anything to the hardware. It |
---|
216 | merely stores a value for use by @code{tcsetattr()}. |
---|
217 | |
---|
218 | @subheading NOTES: |
---|
219 | |
---|
220 | This function merely stores a value in the @code{termios} structure. |
---|
221 | It does not change the terminal speed until a @code{tcsetattr()} is done. |
---|
222 | It does not detect impossible terminal speeds. |
---|
223 | |
---|
224 | @c |
---|
225 | @c |
---|
226 | @c |
---|
227 | @page |
---|
228 | @subsection tcgetattr - Gets terminal attributes |
---|
229 | |
---|
230 | @findex tcgetattr |
---|
231 | @cindex gets terminal attributes |
---|
232 | |
---|
233 | @subheading CALLING SEQUENCE: |
---|
234 | |
---|
235 | @ifset is-C |
---|
236 | @example |
---|
237 | #include <termios.h> |
---|
238 | #include <unistd.h> |
---|
239 | |
---|
240 | int tcgetattr( |
---|
241 | int fildes, |
---|
242 | struct termios *p |
---|
243 | ); |
---|
244 | @end example |
---|
245 | @end ifset |
---|
246 | |
---|
247 | @ifset is-Ada |
---|
248 | @end ifset |
---|
249 | |
---|
250 | @subheading STATUS CODES: |
---|
251 | |
---|
252 | @table @b |
---|
253 | @item EBADF |
---|
254 | Invalid file descriptor |
---|
255 | |
---|
256 | @item ENOOTY |
---|
257 | Terminal control function attempted for a file that is not a terminal. |
---|
258 | @end table |
---|
259 | |
---|
260 | @subheading DESCRIPTION: |
---|
261 | |
---|
262 | The @code{tcgetattr()} gets the parameters associated with the terminal |
---|
263 | referred to by @code{fildes} and stores them into the @code{termios()} |
---|
264 | structure pointed to by @code{termios_p}. |
---|
265 | |
---|
266 | @subheading NOTES: |
---|
267 | |
---|
268 | NONE |
---|
269 | |
---|
270 | @c |
---|
271 | @c |
---|
272 | @c |
---|
273 | @page |
---|
274 | @subsection tcsetattr - Set terminal attributes |
---|
275 | |
---|
276 | @findex tcsetattr |
---|
277 | @cindex set terminal attributes |
---|
278 | |
---|
279 | @subheading CALLING SEQUENCE: |
---|
280 | |
---|
281 | @ifset is-C |
---|
282 | @example |
---|
283 | #include <termios.h> |
---|
284 | #include <unistd.h> |
---|
285 | |
---|
286 | int tcsetattr( |
---|
287 | int fildes, |
---|
288 | int options, |
---|
289 | const struct termios *tp |
---|
290 | ); |
---|
291 | @end example |
---|
292 | @end ifset |
---|
293 | |
---|
294 | @ifset is-Ada |
---|
295 | @end ifset |
---|
296 | |
---|
297 | @subheading STATUS CODES: |
---|
298 | |
---|
299 | @table @b |
---|
300 | @item E |
---|
301 | The |
---|
302 | |
---|
303 | @end table |
---|
304 | |
---|
305 | @subheading DESCRIPTION: |
---|
306 | |
---|
307 | @subheading NOTES: |
---|
308 | |
---|
309 | @c |
---|
310 | @c |
---|
311 | @c |
---|
312 | @page |
---|
313 | @subsection tcsendbreak - Sends a break to a terminal |
---|
314 | |
---|
315 | @findex tcsendbreak |
---|
316 | @cindex sends a break to a terminal |
---|
317 | |
---|
318 | @subheading CALLING SEQUENCE: |
---|
319 | |
---|
320 | @ifset is-C |
---|
321 | @example |
---|
322 | int tcsendbreak( |
---|
323 | ); |
---|
324 | @end example |
---|
325 | @end ifset |
---|
326 | |
---|
327 | @ifset is-Ada |
---|
328 | @end ifset |
---|
329 | |
---|
330 | @subheading STATUS CODES: |
---|
331 | |
---|
332 | @table @b |
---|
333 | @item E |
---|
334 | The |
---|
335 | |
---|
336 | @end table |
---|
337 | |
---|
338 | @subheading DESCRIPTION: |
---|
339 | |
---|
340 | @subheading NOTES: |
---|
341 | |
---|
342 | This routine is not currently supported by RTEMS but could be |
---|
343 | in a future version. |
---|
344 | |
---|
345 | @c |
---|
346 | @c |
---|
347 | @c |
---|
348 | @page |
---|
349 | @subsection tcdrain - Waits for all output to be transmitted to the terminal. |
---|
350 | |
---|
351 | @findex tcdrain |
---|
352 | @cindex waits for all output to be transmitted to the terminal. |
---|
353 | |
---|
354 | @subheading CALLING SEQUENCE: |
---|
355 | |
---|
356 | @ifset is-C |
---|
357 | @example |
---|
358 | #include <termios.h> |
---|
359 | #include <unistd.h> |
---|
360 | |
---|
361 | int tcdrain( |
---|
362 | int fildes |
---|
363 | ); |
---|
364 | @end example |
---|
365 | @end ifset |
---|
366 | |
---|
367 | @ifset is-Ada |
---|
368 | @end ifset |
---|
369 | |
---|
370 | @subheading STATUS CODES: |
---|
371 | |
---|
372 | @table @b |
---|
373 | @item EBADF |
---|
374 | Invalid file descriptor |
---|
375 | |
---|
376 | @item EINTR |
---|
377 | Function was interrupted by a signal |
---|
378 | |
---|
379 | @item ENOTTY |
---|
380 | Terminal control function attempted for a file that is not a terminal. |
---|
381 | |
---|
382 | @end table |
---|
383 | |
---|
384 | @subheading DESCRIPTION: |
---|
385 | |
---|
386 | The @code{tcdrain()} function waits until all output written to |
---|
387 | @code{fildes} has been transmitted. |
---|
388 | |
---|
389 | @subheading NOTES: |
---|
390 | |
---|
391 | NONE |
---|
392 | |
---|
393 | @c |
---|
394 | @c |
---|
395 | @c |
---|
396 | @page |
---|
397 | @subsection tcflush - Discards terminal data |
---|
398 | |
---|
399 | @findex tcflush |
---|
400 | @cindex discards terminal data |
---|
401 | |
---|
402 | @subheading CALLING SEQUENCE: |
---|
403 | |
---|
404 | @ifset is-C |
---|
405 | @example |
---|
406 | int tcflush( |
---|
407 | ); |
---|
408 | @end example |
---|
409 | @end ifset |
---|
410 | |
---|
411 | @ifset is-Ada |
---|
412 | @end ifset |
---|
413 | |
---|
414 | @subheading STATUS CODES: |
---|
415 | |
---|
416 | @table @b |
---|
417 | @item E |
---|
418 | The |
---|
419 | |
---|
420 | @end table |
---|
421 | |
---|
422 | @subheading DESCRIPTION: |
---|
423 | |
---|
424 | @subheading NOTES: |
---|
425 | |
---|
426 | This routine is not currently supported by RTEMS but could be |
---|
427 | in a future version. |
---|
428 | |
---|
429 | @c |
---|
430 | @c |
---|
431 | @c |
---|
432 | @page |
---|
433 | @subsection tcflow - Suspends/restarts terminal output. |
---|
434 | |
---|
435 | @findex tcflow |
---|
436 | @cindex suspends/restarts terminal output. |
---|
437 | |
---|
438 | @subheading CALLING SEQUENCE: |
---|
439 | |
---|
440 | @ifset is-C |
---|
441 | @example |
---|
442 | int tcflow( |
---|
443 | ); |
---|
444 | @end example |
---|
445 | @end ifset |
---|
446 | |
---|
447 | @ifset is-Ada |
---|
448 | @end ifset |
---|
449 | |
---|
450 | @subheading STATUS CODES: |
---|
451 | |
---|
452 | @table @b |
---|
453 | @item E |
---|
454 | The |
---|
455 | |
---|
456 | @end table |
---|
457 | |
---|
458 | @subheading DESCRIPTION: |
---|
459 | |
---|
460 | @subheading NOTES: |
---|
461 | |
---|
462 | This routine is not currently supported by RTEMS but could be |
---|
463 | in a future version. |
---|
464 | |
---|
465 | @c |
---|
466 | @c |
---|
467 | @c |
---|
468 | @page |
---|
469 | @subsection tcgetpgrp - Gets foreground process group ID |
---|
470 | |
---|
471 | @findex tcgetpgrp |
---|
472 | @cindex gets foreground process group id |
---|
473 | |
---|
474 | @subheading CALLING SEQUENCE: |
---|
475 | |
---|
476 | @ifset is-C |
---|
477 | @example |
---|
478 | int tcgetpgrp( |
---|
479 | ); |
---|
480 | @end example |
---|
481 | @end ifset |
---|
482 | |
---|
483 | @ifset is-Ada |
---|
484 | @end ifset |
---|
485 | |
---|
486 | @subheading STATUS CODES: |
---|
487 | |
---|
488 | @table @b |
---|
489 | @item E |
---|
490 | The |
---|
491 | |
---|
492 | @end table |
---|
493 | |
---|
494 | @subheading DESCRIPTION: |
---|
495 | |
---|
496 | @subheading NOTES: |
---|
497 | |
---|
498 | This routine is not currently supported by RTEMS but could be |
---|
499 | in a future version. |
---|
500 | |
---|
501 | @c |
---|
502 | @c |
---|
503 | @c |
---|
504 | @page |
---|
505 | @subsection tcsetpgrp - Sets foreground process group ID |
---|
506 | |
---|
507 | @findex tcsetpgrp |
---|
508 | @cindex sets foreground process group id |
---|
509 | |
---|
510 | @subheading CALLING SEQUENCE: |
---|
511 | |
---|
512 | @ifset is-C |
---|
513 | @example |
---|
514 | int tcsetpgrp( |
---|
515 | ); |
---|
516 | @end example |
---|
517 | @end ifset |
---|
518 | |
---|
519 | @ifset is-Ada |
---|
520 | @end ifset |
---|
521 | |
---|
522 | @subheading STATUS CODES: |
---|
523 | |
---|
524 | @table @b |
---|
525 | @item E |
---|
526 | The |
---|
527 | |
---|
528 | @end table |
---|
529 | |
---|
530 | @subheading DESCRIPTION: |
---|
531 | |
---|
532 | @subheading NOTES: |
---|
533 | |
---|
534 | This routine is not currently supported by RTEMS but could be |
---|
535 | in a future version. |
---|
536 | |
---|
537 | |
---|