• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Embedded Systems Software
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2025/26
      • Systemprogrammierung 2
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
      • Projekt angewandte Systemsoftwaretechnik
      • Aktuelle Entwicklung in Verteilten und Objektorientierten Betriebssystemen (für Bachelor-/Masterarbeit)
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Assembler Crashkurs
              • C++ Crashkurs
                • Entwicklungsumgebung
                  • FAQ
                    • Ruhmeshalle

                  Aufgabe 2: Unterbrechungen

                  Public Member Functions | Static Public Member Functions | List of all members
                  TextStream Class Reference
                  I/O subsystem

                  Output text (form different data type sources) on screen in text mode. More...

                  #include <device/textstream.h>

                  + Inheritance diagram for TextStream:
                  [legend]
                  + Collaboration diagram for TextStream:
                  [legend]

                  Public Member Functions

                   TextStream (unsigned from_col, unsigned to_col, unsigned from_row, unsigned to_row, bool use_cursor=false)
                   Constructor of a text window. More...
                   
                   TextStream (void)
                   Default constructor. More...
                   
                  void flush () override
                   Output the buffer contents of the base class Stringbuffer. More...
                   
                  - Public Member Functions inherited from OutputStream
                   OutputStream ()
                   Default constructor. Initial number system is decimal.
                   
                  virtual ~OutputStream ()
                   Destructor.
                   
                  virtual void flush ()=0
                   Clears the buffer. More...
                   
                  OutputStream & operator<< (char c)
                   Print a single character. More...
                   
                  OutputStream & operator<< (unsigned char c)
                   Print a single character. More...
                   
                  OutputStream & operator<< (const char *string)
                   Printing a null-terminated string. More...
                   
                  OutputStream & operator<< (bool b)
                   Print a boolean value. More...
                   
                  OutputStream & operator<< (short ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (unsigned short ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (int ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (unsigned int ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (long ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (unsigned long ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (long long ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (unsigned long long ival)
                   Print an integral number in radix base More...
                   
                  OutputStream & operator<< (const void *ptr)
                   Print a pointer as hexadecimal number. More...
                   
                  OutputStream & operator<< (OutputStream &(*f)(OutputStream &))
                   Calls one of the manipulator functions. More...
                   
                  - Public Member Functions inherited from Stringbuffer
                  virtual ~Stringbuffer ()
                   Destructor (nothing to do here)
                   
                  - Public Member Functions inherited from TextWindow
                   TextWindow (unsigned from_col, unsigned to_col, unsigned from_row, unsigned to_row, bool use_cursor=false)
                   Constructor of a text window. More...
                   
                  void setPos (unsigned rel_x, unsigned rel_y)
                   Set the cursor position in the window. More...
                   
                  void setPos (int rel_x, int rel_y)
                   Set the cursor position in the window. More...
                   
                  void getPos (unsigned &rel_x, unsigned &rel_y) const
                   Get the current cursor position in the window. More...
                   
                  void getPos (int &rel_x, int &rel_y) const
                   Get the current cursor position in the window. More...
                   
                  void print (const char *string, size_t length, Attribute attrib=TextMode::Attribute())
                   Display multiple characters in the window. More...
                   
                  void reset (char character=' ', Attribute attrib=TextMode::Attribute())
                   Delete all contents in the window and reset the cursor. More...
                   

                  Static Public Member Functions

                  static void arrange (TextStream &kout, TextStream dout[8])
                   Automatic arrangement of the output windows (depending on the cores) More...
                   
                  - Static Public Member Functions inherited from TextMode
                  static void setCursor (unsigned abs_x, unsigned abs_y)
                   Set the keyboard hardware cursor to absolute screen position. More...
                   
                  static void getCursor (unsigned &abs_x, unsigned &abs_y)
                   Retrieve the keyboard hardware cursor position on screen. More...
                   
                  static void show (unsigned abs_x, unsigned abs_y, char character, Attribute attrib=Attribute())
                   Basic output of a character at a specific position on the screen. More...
                   
                  static void show (int abs_x, int abs_y, char character, Attribute attrib=Attribute())
                   Basic output of a character at a specific position on the screen. More...
                   
                  static void showMouse (unsigned abs_x, unsigned abs_y)
                   Show the mouse cursor by switching foreground and background of the cell at cursor position. More...
                   

                  Additional Inherited Members

                  - Public Types inherited from TextMode
                  enum  Color {
                    BLACK ,
                    BLUE ,
                    GREEN ,
                    CYAN ,
                    RED ,
                    MAGENTA ,
                    BROWN ,
                    LIGHT_GREY ,
                    DARK_GREY ,
                    LIGHT_BLUE ,
                    LIGHT_GREEN ,
                    LIGHT_CYAN ,
                    LIGHT_RED ,
                    LIGHT_MAGENTA ,
                    YELLOW ,
                    WHITE
                  }
                   CGA color palette. More...
                   
                  - Public Attributes inherited from OutputStream
                  int base
                   Number system used for printing integral numbers (one of 2, 8, 10, or 16)
                   
                  - Static Public Attributes inherited from TextMode
                  static const unsigned ROWS = 25
                   Visible rows in text mode.
                   
                  static const unsigned COLUMNS = 80
                   Visible columns in text mode.
                   
                  - Protected Member Functions inherited from Stringbuffer
                   Stringbuffer ()
                   Constructor; Marks the buffer as empty.
                   
                  void put (char c)
                   Inserts a character into the buffer. More...
                   
                  virtual void flush ()=0
                   Flush the buffer contents. More...
                   
                  - Protected Member Functions inherited from TextMode
                   TextMode ()
                   Default constructor.
                   
                  - Protected Attributes inherited from Stringbuffer
                  char buffer [80]
                   buffer containing characters that will be printed upon flush()
                   
                  long unsigned pos
                   current position in the buffer
                   
                  - Protected Attributes inherited from TextWindow
                  unsigned from_col
                   Start column position (inclusive) of window.
                   
                  unsigned to_col
                   End column position (exclusive) of window.
                   
                  unsigned from_row
                   Start row position (inclusive) of window.
                   
                  unsigned to_row
                   End row position (exclusive) of window.
                   
                  bool use_cursor
                   use hardware cursor More...
                   
                  unsigned pos_x
                   Software cursor column.
                   
                  unsigned pos_y
                   Software cursor row.
                   
                  - Static Protected Attributes inherited from TextMode
                  static Cell *const TEXT_BUFFER_BASE = reinterpret_cast<TextMode::Cell *>(0xb8000)
                   Base address for linear text buffer in video memory.
                   
                  static unsigned mouse_x = 0
                   Last reported column of mouse cursor.
                   
                  static unsigned mouse_y = 0
                   Last reported row of mouse cursor.
                   
                  static Attribute mouse_attrib
                   (Previous) attributes of cell at mouse cursor
                   

                  Detailed Description

                  Output text (form different data type sources) on screen in text mode.

                  Allows the output of different data types as strings on the TextMode screen of a PC. To achieve this, TextStream is derived from both OutputStream and TextWindow and only implements the method TextStream::flush(). Further formatting or special effects are implemented in TextWindow.

                  Constructor & Destructor Documentation

                  TextStream::TextStream ( unsigned  from_col,
                  unsigned  to_col,
                  unsigned  from_row,
                  unsigned  to_row,
                  bool  use_cursor = false 
                  )
                  inline

                  Constructor of a text window.

                  Creates a virtual, rectangular text window on the screen. The coordinates to construct the window are absolute positions in the TextMode screen.

                  Note
                  Overlapping windows are neither supported nor prevented – better just try to avoid construction windows with overlapping coordinates!
                  Warning
                  Don't use the hardware cursor in more than one window!
                  Parameters
                  from_colText Window starts in column from_col, the first (leftmost) possible column is 0
                  to_colText Window extends to the right to column to_col (exclusive). This column has to be strictly greater than from_col, the maximum allowed value is TextMode::COLUMNS (rightmost)
                  from_rowText Window starts in row from_row, the first possible (uppermost) row is 0
                  to_rowText Window extends down to row to_row (exclusive). This row has to be strictly greater than from_row, the maximum allowed value is TextMode::ROWS (bottom-most)
                  use_cursorSpecifies whether the hardware cursor (true) or a software cursor/variable (false) should be used to store the current position
                  TextStream::TextStream ( void  )
                  inline

                  Default constructor.

                  Since each core in MPStuBS has its own debug window, but the number of available cores might be different on each system, the arrangement can be done automatically.

                  However, there is one problem: The number of CPUs is only known after evaluating the ACPI MADT table (which is done in APIC::init(), called during kernel_init()), but global constructors like ‘kout’ are executed earlier.

                  Therefore this constructor assigns each window 2 separate lines for the output, the actual window split is later done by calling TextStream::arrange() in main().

                  Member Function Documentation

                  void TextStream::arrange ( TextStream &  kout,
                  TextStream  dout[8] 
                  )
                  static

                  Automatic arrangement of the output windows (depending on the cores)

                  After the system information has been read out, the number of available cores can be queried with Core::count(). This information helps to automatically arrange the windows without wasting screen area by pre-saving it for non-existent cores.

                  Parameters
                  koutPointer to the object for the main output window
                  doutPointer to an array with with debug windows for each core
                  void TextStream::flush ( )
                  overridevirtual

                  Output the buffer contents of the base class Stringbuffer.

                  The method is automatically called when the buffer is full, but can also be called explicitly to force output of the current buffer.

                  Implements OutputStream.


                  The documentation for this class was generated from the following files:
                  • device/textstream.h
                  • device/textstream.cc
                  Friedrich-Alexander-Universität
                  Erlangen-Nürnberg

                  Schlossplatz 4
                  91054 Erlangen
                  • Impressum
                  • Datenschutz
                  • Barrierefreiheit
                  • Facebook
                  • RSS Feed
                  • Xing
                  Nach oben