1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-1998. |
---|
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 | @page |
---|
49 | @subsection cfgetispeed - Reads terminal input baud rate |
---|
50 | |
---|
51 | @subheading CALLING SEQUENCE: |
---|
52 | |
---|
53 | @ifset is-C |
---|
54 | @example |
---|
55 | #include <termios.h> |
---|
56 | |
---|
57 | int cfgetispeed( |
---|
58 | const struct termios *p |
---|
59 | ); |
---|
60 | @end example |
---|
61 | @end ifset |
---|
62 | |
---|
63 | @ifset is-Ada |
---|
64 | @end ifset |
---|
65 | |
---|
66 | @subheading STATUS CODES: |
---|
67 | |
---|
68 | The @code{cfgetispeed()} function returns a code for baud rate. |
---|
69 | |
---|
70 | @subheading DESCRIPTION: |
---|
71 | |
---|
72 | The @code{cfsetispeed()} function stores a code for the terminal speed |
---|
73 | stored in a struct termios. The codes are defined in @code{<termios.h>} |
---|
74 | by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, |
---|
75 | B1800, B2400, B4800, B9600, B19200, and B38400. |
---|
76 | |
---|
77 | The @code{cfsetispeed()} function does not do anything to the hardware. |
---|
78 | It merely stores a value for use by @code{tcsetattr()}. |
---|
79 | |
---|
80 | @subheading NOTES: |
---|
81 | |
---|
82 | Baud rates are defined by symbols, such as B110, B1200, B2400. The actual |
---|
83 | number returned for any given speed may change from system to system. |
---|
84 | |
---|
85 | @page |
---|
86 | @subsection cfgetospeed - Reads terminal output baud rate |
---|
87 | |
---|
88 | @subheading CALLING SEQUENCE: |
---|
89 | |
---|
90 | @ifset is-C |
---|
91 | @example |
---|
92 | #include <termios.h> |
---|
93 | |
---|
94 | int cfgetospeed( |
---|
95 | const struct termios *p |
---|
96 | ); |
---|
97 | @end example |
---|
98 | @end ifset |
---|
99 | |
---|
100 | @ifset is-Ada |
---|
101 | @end ifset |
---|
102 | |
---|
103 | @subheading STATUS CODES: |
---|
104 | |
---|
105 | The @code{cfgetospeed()} function returns the termios code for the baud rate. |
---|
106 | |
---|
107 | @subheading DESCRIPTION: |
---|
108 | |
---|
109 | The @code{cfgetospeed()} function returns a code for the terminal speed |
---|
110 | stored in a @code{struct termios}. The codes are defined in @code{<termios.h>} |
---|
111 | by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, |
---|
112 | B2400, B4800, B9600, B19200, and B38400. |
---|
113 | |
---|
114 | The @code{cfgetospeed()} function does not do anything to the hardware. |
---|
115 | It merely returns the value stored by a previous call to @code{tcgetattr()}. |
---|
116 | |
---|
117 | @subheading NOTES: |
---|
118 | |
---|
119 | Baud reates are defined by symbols, such as B110, B1200, B2400. The actual |
---|
120 | number returned for any given speed may change from system to system. |
---|
121 | |
---|
122 | @page |
---|
123 | @subsection cfsetispeed - Sets terminal input baud rate |
---|
124 | |
---|
125 | @subheading CALLING SEQUENCE: |
---|
126 | |
---|
127 | @ifset is-C |
---|
128 | @example |
---|
129 | #include <termios.h> |
---|
130 | |
---|
131 | int cfsetispeed( |
---|
132 | struct termios *p, |
---|
133 | speed_t speed |
---|
134 | ); |
---|
135 | @end example |
---|
136 | @end ifset |
---|
137 | |
---|
138 | @ifset is-Ada |
---|
139 | @end ifset |
---|
140 | |
---|
141 | @subheading STATUS CODES: |
---|
142 | |
---|
143 | The @code{cfsetispeed()} function returns a zero when successful and |
---|
144 | returns -1 when an error occurs. |
---|
145 | |
---|
146 | @subheading DESCRIPTION: |
---|
147 | |
---|
148 | The @code{cfsetispeed()} function stores a code for the terminal speed |
---|
149 | stored in a struct termios. The codes are defined in @code{<termios.h>} |
---|
150 | by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, |
---|
151 | B1800, B2400, B4800, B9600, B19200, and B38400. |
---|
152 | |
---|
153 | @subheading NOTES: |
---|
154 | |
---|
155 | This function merely stores a value in the @code{termios} structure. It |
---|
156 | does not change the terminal speed until a @code{tcsetattr()} is done. |
---|
157 | It does not detect impossible terminal speeds. |
---|
158 | |
---|
159 | @page |
---|
160 | @subsection cfsetospeed - Sets terminal output baud rate |
---|
161 | |
---|
162 | @subheading CALLING SEQUENCE: |
---|
163 | |
---|
164 | @ifset is-C |
---|
165 | @example |
---|
166 | #include <termios.h> |
---|
167 | |
---|
168 | int cfsetospeed( |
---|
169 | struct termios *p, |
---|
170 | speed_t speed |
---|
171 | ); |
---|
172 | @end example |
---|
173 | @end ifset |
---|
174 | |
---|
175 | @ifset is-Ada |
---|
176 | @end ifset |
---|
177 | |
---|
178 | @subheading STATUS CODES: |
---|
179 | |
---|
180 | The @code{cfsetospeed()} function returns a zero when successful and |
---|
181 | returns -1 when an error occurs. |
---|
182 | |
---|
183 | |
---|
184 | @subheading DESCRIPTION: |
---|
185 | |
---|
186 | The @code{cfsetospeed()} function stores a code for the terminal speed stored |
---|
187 | in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the |
---|
188 | macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, |
---|
189 | B4800, B9600, B19200, and B38400. |
---|
190 | |
---|
191 | The @code{cfsetospeed()} function does not do anything to the hardware. It |
---|
192 | merely stores a value for use by @code{tcsetattr()}. |
---|
193 | |
---|
194 | @subheading NOTES: |
---|
195 | |
---|
196 | This function merely stores a value in the @code{termios} structure. |
---|
197 | It does not change the terminal speed until a @code{tcsetattr()} is done. |
---|
198 | It does not detect impossible terminal speeds. |
---|
199 | |
---|
200 | @page |
---|
201 | @subsection tcgetattr - Gets terminal attributes |
---|
202 | |
---|
203 | @subheading CALLING SEQUENCE: |
---|
204 | |
---|
205 | @ifset is-C |
---|
206 | @example |
---|
207 | #include <termios.h> |
---|
208 | #include <unistd.h> |
---|
209 | |
---|
210 | int tcgetattr( |
---|
211 | int fildes, |
---|
212 | struct termios *p |
---|
213 | ); |
---|
214 | @end example |
---|
215 | @end ifset |
---|
216 | |
---|
217 | @ifset is-Ada |
---|
218 | @end ifset |
---|
219 | |
---|
220 | @subheading STATUS CODES: |
---|
221 | |
---|
222 | @table @b |
---|
223 | @item EBADF |
---|
224 | Invalid file descriptor |
---|
225 | |
---|
226 | @item ENOOTY |
---|
227 | Terminal control function attempted for a file that is not a terminal. |
---|
228 | @end table |
---|
229 | |
---|
230 | @subheading DESCRIPTION: |
---|
231 | |
---|
232 | The @code{tcgetattr()} gets the parameters associated with the terminal |
---|
233 | referred to by @code{fildes} and stores them into the @code{termios()} |
---|
234 | structure pointed to by @code{termios_p}. |
---|
235 | |
---|
236 | @subheading NOTES: |
---|
237 | |
---|
238 | NONE |
---|
239 | |
---|
240 | @page |
---|
241 | @subsection tcsetattr - Set terminal attributes |
---|
242 | |
---|
243 | @subheading CALLING SEQUENCE: |
---|
244 | |
---|
245 | @ifset is-C |
---|
246 | @example |
---|
247 | #include <termios.h> |
---|
248 | #include <unistd.h> |
---|
249 | |
---|
250 | int tcsetattr( |
---|
251 | int fildes, |
---|
252 | int options, |
---|
253 | const struct termios *tp |
---|
254 | ); |
---|
255 | @end example |
---|
256 | @end ifset |
---|
257 | |
---|
258 | @ifset is-Ada |
---|
259 | @end ifset |
---|
260 | |
---|
261 | @subheading STATUS CODES: |
---|
262 | |
---|
263 | @table @b |
---|
264 | @item E |
---|
265 | The |
---|
266 | |
---|
267 | @end table |
---|
268 | |
---|
269 | @subheading DESCRIPTION: |
---|
270 | |
---|
271 | @subheading NOTES: |
---|
272 | |
---|
273 | @page |
---|
274 | @subsection tcsendbreak - Sends a break to a terminal |
---|
275 | |
---|
276 | @subheading CALLING SEQUENCE: |
---|
277 | |
---|
278 | @ifset is-C |
---|
279 | @example |
---|
280 | int tcsendbreak( |
---|
281 | ); |
---|
282 | @end example |
---|
283 | @end ifset |
---|
284 | |
---|
285 | @ifset is-Ada |
---|
286 | @end ifset |
---|
287 | |
---|
288 | @subheading STATUS CODES: |
---|
289 | |
---|
290 | @table @b |
---|
291 | @item E |
---|
292 | The |
---|
293 | |
---|
294 | @end table |
---|
295 | |
---|
296 | @subheading DESCRIPTION: |
---|
297 | |
---|
298 | @subheading NOTES: |
---|
299 | |
---|
300 | This routine is not currently supported by RTEMS but could be |
---|
301 | in a future version. |
---|
302 | |
---|
303 | @page |
---|
304 | @subsection tcdrain - Waits for all output to be transmitted to the terminal. |
---|
305 | |
---|
306 | @subheading CALLING SEQUENCE: |
---|
307 | |
---|
308 | @ifset is-C |
---|
309 | @example |
---|
310 | #include <termios.h> |
---|
311 | #include <unistd.h> |
---|
312 | |
---|
313 | int tcdrain( |
---|
314 | int fildes |
---|
315 | ); |
---|
316 | @end example |
---|
317 | @end ifset |
---|
318 | |
---|
319 | @ifset is-Ada |
---|
320 | @end ifset |
---|
321 | |
---|
322 | @subheading STATUS CODES: |
---|
323 | |
---|
324 | @table @b |
---|
325 | @item EBADF |
---|
326 | Invalid file descriptor |
---|
327 | |
---|
328 | @item EINTR |
---|
329 | Function was interrupted by a signal |
---|
330 | |
---|
331 | @item ENOTTY |
---|
332 | Terminal control function attempted for a file that is not a terminal. |
---|
333 | |
---|
334 | @end table |
---|
335 | |
---|
336 | @subheading DESCRIPTION: |
---|
337 | |
---|
338 | The @code{tcdrain()} function waits until all output written to |
---|
339 | @code{fildes} has been transmitted. |
---|
340 | |
---|
341 | @subheading NOTES: |
---|
342 | |
---|
343 | NONE |
---|
344 | |
---|
345 | @page |
---|
346 | @subsection tcflush - Discards terminal data |
---|
347 | |
---|
348 | @subheading CALLING SEQUENCE: |
---|
349 | |
---|
350 | @ifset is-C |
---|
351 | @example |
---|
352 | int tcflush( |
---|
353 | ); |
---|
354 | @end example |
---|
355 | @end ifset |
---|
356 | |
---|
357 | @ifset is-Ada |
---|
358 | @end ifset |
---|
359 | |
---|
360 | @subheading STATUS CODES: |
---|
361 | |
---|
362 | @table @b |
---|
363 | @item E |
---|
364 | The |
---|
365 | |
---|
366 | @end table |
---|
367 | |
---|
368 | @subheading DESCRIPTION: |
---|
369 | |
---|
370 | @subheading NOTES: |
---|
371 | |
---|
372 | This routine is not currently supported by RTEMS but could be |
---|
373 | in a future version. |
---|
374 | |
---|
375 | @page |
---|
376 | @subsection tcflow - Suspends/restarts terminal output. |
---|
377 | |
---|
378 | @subheading CALLING SEQUENCE: |
---|
379 | |
---|
380 | @ifset is-C |
---|
381 | @example |
---|
382 | int tcflow( |
---|
383 | ); |
---|
384 | @end example |
---|
385 | @end ifset |
---|
386 | |
---|
387 | @ifset is-Ada |
---|
388 | @end ifset |
---|
389 | |
---|
390 | @subheading STATUS CODES: |
---|
391 | |
---|
392 | @table @b |
---|
393 | @item E |
---|
394 | The |
---|
395 | |
---|
396 | @end table |
---|
397 | |
---|
398 | @subheading DESCRIPTION: |
---|
399 | |
---|
400 | @subheading NOTES: |
---|
401 | |
---|
402 | This routine is not currently supported by RTEMS but could be |
---|
403 | in a future version. |
---|
404 | |
---|
405 | @page |
---|
406 | @subsection tcgetpgrp - Gets foreground process group ID |
---|
407 | |
---|
408 | @subheading CALLING SEQUENCE: |
---|
409 | |
---|
410 | @ifset is-C |
---|
411 | @example |
---|
412 | int tcgetpgrp( |
---|
413 | ); |
---|
414 | @end example |
---|
415 | @end ifset |
---|
416 | |
---|
417 | @ifset is-Ada |
---|
418 | @end ifset |
---|
419 | |
---|
420 | @subheading STATUS CODES: |
---|
421 | |
---|
422 | @table @b |
---|
423 | @item E |
---|
424 | The |
---|
425 | |
---|
426 | @end table |
---|
427 | |
---|
428 | @subheading DESCRIPTION: |
---|
429 | |
---|
430 | @subheading NOTES: |
---|
431 | |
---|
432 | This routine is not currently supported by RTEMS but could be |
---|
433 | in a future version. |
---|
434 | |
---|
435 | @page |
---|
436 | @subsection tcsetpgrp - Sets foreground process group ID |
---|
437 | |
---|
438 | @subheading CALLING SEQUENCE: |
---|
439 | |
---|
440 | @ifset is-C |
---|
441 | @example |
---|
442 | int tcsetpgrp( |
---|
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 | |
---|