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