dm_tty_open Function

public function dm_tty_open(tty, path, baud_rate, byte_size, parity, stop_bits) result(rc)

Uses

    • unix
  • proc~~dm_tty_open~~UsesGraph proc~dm_tty_open dm_tty_open unix unix proc~dm_tty_open->unix

Opens TTY/PTS device in set access mode and applies serial port attributes. The arguments baud_rate, byte_size, parity, and stop_bits must be valid enumerators.

The function returns the following error codes:

  • E_EXIST if the TTY is already connected.
  • E_INVALID if the TTY parameters or flags are invalid.
  • E_IO if opening the TTY failed.
  • E_SYSTEM if setting the TTY attributes or flushing the buffers failed.

Arguments

Type IntentOptional Attributes Name
type(tty_type), intent(inout) :: tty

TTY type.

character(len=*), intent(in), optional :: path

Device path.

integer, intent(in), optional :: baud_rate

Baud rate enumerator (TTY_B*).

integer, intent(in), optional :: byte_size

Byte size enumerator (TTY_BYTE_SIZE*).

integer, intent(in), optional :: parity

Parity enumerator (TTY_PARITY_*).

integer, intent(in), optional :: stop_bits

Stop bits enumerator (TTY_STOP_BITS*).

Return Value integer


Calls

proc~~dm_tty_open~~CallsGraph proc~dm_tty_open dm_tty_open c_open c_open proc~dm_tty_open->c_open proc~dm_is_error dm_is_error proc~dm_tty_open->proc~dm_is_error proc~dm_tty_flush dm_tty_flush proc~dm_tty_open->proc~dm_tty_flush proc~dm_tty_is_connected dm_tty_is_connected proc~dm_tty_open->proc~dm_tty_is_connected proc~dm_tty_is_valid_baud_rate dm_tty_is_valid_baud_rate proc~dm_tty_open->proc~dm_tty_is_valid_baud_rate proc~dm_tty_is_valid_byte_size dm_tty_is_valid_byte_size proc~dm_tty_open->proc~dm_tty_is_valid_byte_size proc~dm_tty_is_valid_parity dm_tty_is_valid_parity proc~dm_tty_open->proc~dm_tty_is_valid_parity proc~dm_tty_is_valid_stop_bits dm_tty_is_valid_stop_bits proc~dm_tty_open->proc~dm_tty_is_valid_stop_bits proc~dm_tty_set_attributes dm_tty_set_attributes proc~dm_tty_open->proc~dm_tty_set_attributes c_tcflush c_tcflush proc~dm_tty_flush->c_tcflush c_cc c_cc proc~dm_tty_set_attributes->c_cc c_cfsetispeed c_cfsetispeed proc~dm_tty_set_attributes->c_cfsetispeed c_cfsetospeed c_cfsetospeed proc~dm_tty_set_attributes->c_cfsetospeed c_ioctl c_ioctl proc~dm_tty_set_attributes->c_ioctl c_tcgetattr c_tcgetattr proc~dm_tty_set_attributes->c_tcgetattr c_tcsetattr c_tcsetattr proc~dm_tty_set_attributes->c_tcsetattr interface~dm_to_signed dm_to_signed proc~dm_tty_set_attributes->interface~dm_to_signed interface~dm_to_unsigned dm_to_unsigned proc~dm_tty_set_attributes->interface~dm_to_unsigned proc~dm_tty_set_blocking dm_tty_set_blocking proc~dm_tty_set_attributes->proc~dm_tty_set_blocking proc~dm_uint16_to_int32 dm_uint16_to_int32 interface~dm_to_signed->proc~dm_uint16_to_int32 proc~dm_uint32_to_int64 dm_uint32_to_int64 interface~dm_to_signed->proc~dm_uint32_to_int64 proc~dm_int32_to_uint16 dm_int32_to_uint16 interface~dm_to_unsigned->proc~dm_int32_to_uint16 proc~dm_int64_to_uint32 dm_int64_to_uint32 interface~dm_to_unsigned->proc~dm_int64_to_uint32 c_fcntl c_fcntl proc~dm_tty_set_blocking->c_fcntl