+
Point of view
All features
class TERMINAL_SETTINGS
Summary
Terminal settings for serial communication lines. see termios.h in POSIX
Direct parents
Insert list: DISPOSABLE
Class invariant
Overview
Creation features
{FILE_STREAM}
Features
{FILE_STREAM}
{ANY}
{}
make (a_fd: POINTER, a_fs: FILE_STREAM)
effective procedure
require
  • valid_stream: a_fs /= Void
  • valid_file_descriptor: not a_fd.is_null = a_fs /= Void and then a_fs.is_connected
ensure
dispose
effective procedure
Action to be executed just before garbage collection reclaims an object.
set_speed (a_speed: INTEGER_32)
effective procedure
{ANY}
set input and output communication speed to a_speed
require
set_input_speed (a_speed: INTEGER_32)
effective procedure
{ANY}
set input communication speed to a_speed baud
require
set_output_speed (a_speed: INTEGER_32)
effective procedure
{ANY}
set output communication speed to a_speed baud
require
output_speed: INTEGER_32
effective function
{ANY}
return the currently configured output speed
ensure
input_speed: INTEGER_32
effective function
{ANY}
return the currently configured input speed
ensure
drain
effective procedure
{ANY}
wait until all data in tx buffer is transmitted
require
associated_stream: FILE_STREAM
writable attribute
{ANY}
the file stream associated with the terminal settings
fd: POINTER
writable attribute
{ANY}
pointer to the underlaying FILE handle
last_error: INTEGER_32
writable attribute
{ANY}
last error code
last_error_description: STRING
effective function
{ANY}
error_string_storage: STRING
writable attribute
{ANY}
is_valid_speed (a_speed: INTEGER_32): BOOLEAN
effective function
{ANY}
check if a given terminal speed is valid some day we might want to consider non-standard baudrates with termios2
termios: POINTER
writable attribute
{}
decode_speed (a_speed: INTEGER_32): INTEGER_32
effective function
{}
internal helper to convert POSIX speed constants to numeric values
ensure
encode_speed (a_speed: INTEGER_32): INTEGER_32
effective function
{}
internal helper to convert baud rates to POSIX speed constants
require
termios_tcgetattr (a_fd: POINTER, a_termios: POINTER): INTEGER_32
{}
low level tcgetattr in termios.h
termios_tcsetattr (a_fd: POINTER, a_termios: POINTER): INTEGER_32
{}
low level tcsetattr in termios.h
termios_cfgetispeed (a_termios: POINTER): INTEGER_32
{}
low level cfgetispeed in termios.h
termios_cfgetospeed (a_termios: POINTER): INTEGER_32
{}
low level cfgetospeed in termios.h
termios_cfsetispeed (a_termios: POINTER, s_speed: INTEGER_32): INTEGER_32
{}
low level cfsetispeed in termios.h
termios_cfsetospeed (a_termios: POINTER, s_speed: INTEGER_32): INTEGER_32
{}
low level cfsetospeed in termios.h
termios_tctrain (a_fp: POINTER): INTEGER_32
{}
low level tctrain in termios.h
termios_allocate: POINTER
{}
allocate a internal termios struct
termios_free (a_termios: POINTER)
{}
allocate a internal termios struct
termios_strerror (a_errno: INTEGER_32): POINTER
{}
allocate a internal termios struct
termios_b50: INTEGER_32
{}
termios_b75: INTEGER_32
{}
termios_b110: INTEGER_32
{}
termios_b134: INTEGER_32
{}
termios_b150: INTEGER_32
{}
termios_b200: INTEGER_32
{}
termios_b300: INTEGER_32
{}
termios_b600: INTEGER_32
{}
termios_b1200: INTEGER_32
{}
termios_b1800: INTEGER_32
{}
termios_b2400: INTEGER_32
{}
termios_b4800: INTEGER_32
{}
termios_b9600: INTEGER_32
{}
termios_b19200: INTEGER_32
{}
termios_b38400: INTEGER_32
{}
termios_b57600: INTEGER_32
{}
termios_b115200: INTEGER_32
{}
termios_b230400: INTEGER_32
{}