#include <console.h>
Inheritance diagram for Console:
Public Types | |
enum | Console_state { DISABLED = 0, INENABLED = 1, OUTENABLED = 2 } |
enum | Console_attr { INVALID = 0, OUT = 0x1, IN = 0x2, DIRECT = 0x4, UART = 0x8, UX = 0x10, PUSH = 0x20, GZIP = 0x40, BUFFER = 0x80, DEBUG = 0x100 } |
Public Member Functions | |
virtual void | state (Mword new_state) |
modify console state | |
virtual int | write (char const *str, size_t len) |
Write a string of len chacters to the output. | |
virtual int | getchar (bool blocking=true) |
read a charcater from the input. | |
virtual int | char_avail () const |
Is input available? | |
virtual Mword | get_attributes () const |
Console attributes. | |
virtual | ~Console () |
Mword | state () const |
get current console state | |
const char * | str_mode () const |
const char * | str_state () const |
const char * | str_attr (Mword bit) const |
Static Public Member Functions | |
static void | disable_all () |
Disables the stdout, stdin, and stderr console. | |
Static Public Attributes | |
static Console * | stdout = 0 |
stdout for libc glue. | |
static Console * | stderr = 0 |
stderr for libc glue. | |
static Console * | stdin = 0 |
stdin for libc glue. | |
Protected Attributes | |
Mword | _state |
This abstract interface can be implemented for virtually every text input or output device.
|
|
|
|
|
|
Is input available? This method can be implemented. It must return -1 if no information is available, 1 if at least one character is avialable, and 0 if no charachter is available. Reimplemented in Filter_console, Kdb_cons, Mux_console, Push_console, and Uart. |
|
Disables the stdout, stdin, and stderr console.
|
|
Console attributes.
Reimplemented in Filter_console, Console_buffer, Jdb_gzip, Kdb_cons, Keyb, Mux_console, Push_console, Uart, and Vga_console. |
|
read a charcater from the input.
Reimplemented in Filter_console, Console_buffer, Kdb_cons, Kconsole, Keyb, Mux_console, Push_console, Uart, and Vga_console. |
|
get current console state
|
|
modify console state
Reimplemented in Jdb_gzip. |
|
|
|
|
|
|
|
Write a string of len chacters to the output.
Reimplemented in Filter_console, Console_buffer, Jdb_gzip, Kdb_cons, Keyb, Mux_console, Push_console, Uart, and Vga_console. |
|
|
|
stderr for libc glue.
|
|
stdin for libc glue.
|
|
stdout for libc glue.
|