Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tcsetattr(3)



     cfsetospeed(3)             DG/UX 4.30              cfsetospeed(3)



     NAME
          cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed - Baud
          rate functions.

     FUNCTIONS
          cfgetispeed(), cfgetospeed(), cfsetispeed(), cfsetospeed()

     SYNOPSIS
          #include <termios.h>

          speed_t cfgetospeed (termios_p)
          struct termios *termios_p;

          int cfsetospeed (termios_p, speed)
          struct termios *termios_p;
          speed_t speed;

          speed_t cfgetispeed (termios_p)
          struct termios *termios_p;

          int cfsetispeed (termios_p, speed)
          struct termios *termios_p;
          speed_t speed;

     DESCRIPTION
          The following interfaces are provided for getting and
          setting the values of the input and output baud rates in the
          termios structure.  The effects on the terminal device
          described below do not become effective until the
          tcsetattr() function is successfully called.

          The input and output baud rates are stored in the termios
          structure.  The values shown in the table "termios Baud Rate
          Values" are supported.  The name symbols in this table are
          defined in <termios.h>.

                         termios Baud Rate Values

               Name   Description             Name    Description

               B0     Hang up                B600     600 baud
               B50    50 baud                B1200    1200 baud
               B75    75 baud                B1800    1800 baud
               B110   110 baud               B2400    2400 baud
               B134   134.5 baud             B4800    4800 baud
               B150   150 baud               B9600    9600 baud
               B200   200 baud               B19200   19200 baud
               B300   300 baud               B38400   38400 baud







     Licensed material--property of copyright holder(s)         Page 1





     cfsetospeed(3)             DG/UX 4.30              cfsetospeed(3)





          The type speed_t shall be defined in <termios.h> and shall
          be an unsigned integral type.

          The termios_p argument is a pointer to a termios structure.

          cfgetospeed() returns the output baud rate stored in the
          termios structure pointed to by termios_p.

          cfsetospeed() sets the output baud rate stored in the
          termios structure pointed to by termios_p to speed.  The
          zero baud rate, B0, is used to terminate the connection.  If
          B0 is specified, the modem control lines shall no longer be
          asserted.  Normally, this will disconnect the line.

          cfgetispeed() returns the input baud rate stored in the
          termios structure.

          cfsetispeed() sets the input baud rate stored in the termios
          structure to speed.  If the input baud rate is set to zero,
          the input baud rate will be specified by the value of the
          output baud rate.  Both cfsetispeed() and cfsetospeed()
          return a value of zero if successful and -1 to indicate an
          error.  Attempts to set unsupported baud rates shall be
          ignored, and it is implementation-defined whether an error
          is returned by any or all of cfsetispeed(), cfsetospeed(),
          or tcsetattr().  This refers both to changes to baud rates
          not supported by the hardware, and to changes setting the
          input and output baud rates to different values if the
          hardware does not support this.

     RETURNS
          See DESCRIPTION.

     ERRORS
          This standard does not specify any error conditions that are
          required to be detected for the cfgetispeed(),
          cfgetospeed(), cfsetispeed(), or cfsetospeed() functions.
          Some errors may be detected under implementation-defined
          conditions.

     SEE ALSO
          tcsetattr(3)

     COPYRIGHTS
          Portions of this text are reprinted from IEEE Std 1003.1-
          1988, Portable Operating System Interface for Computer
          Environment, copyright © 1988 by the Institute of Electrical
          and Electronics Engineers, Inc., with the permission of the
          IEEE Standards Department.  To purchase IEEE Standards, call
          800/678-IEEE.



     Licensed material--property of copyright holder(s)         Page 2





     cfsetospeed(3)             DG/UX 4.30              cfsetospeed(3)



          In the event of a discrepancy between the electronic and the
          original printed version, the original version takes
          precedence.

     STANDARDS
          Attempts to set unsupported baud rates will be ignored, and
          will not cause any error to be returned by the functions
          cfsetispeed() or cfsetospeed().

          There are no implementation-defined conditions under which
          the cfsetispeed() or cfsetospeed() functions will detect
          additional errors.











































     Licensed material--property of copyright holder(s)         Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026