StuBS
GuardedKeyboard Class Reference

syscall interface for keyboard. More...

#include <syscall/guarded_keyboard.h>

Inheritance diagram for GuardedKeyboard:
[legend]
Collaboration diagram for GuardedKeyboard:
[legend]

Public Member Functions

 GuardedKeyboard ()
 
Key getKey ()
 Application interface to retrieve a Key.
 
- Public Member Functions inherited from Keyboard
 Keyboard ()
 Constructor.
 
void plugin ()
 Initialization of the keyboard.
 
bool prologue () override
 Prologue of keyboard interrupts.
 
void epilogue () override
 Epilogue of keyboard interrupts.
 
Key getKey ()
 Application interface to retrieve a Key.
 
- Public Member Functions inherited from Gate
 Gate ()
 Constructor.
 
virtual ~Gate ()
 Destructor.
 
bool is_queued () const
 Status about the epilogue.
 
void set_queued (bool val)
 Set epilogue status.
 

Private Member Functions

 GuardedKeyboard (const GuardedKeyboard &)=delete
 
GuardedKeyboardoperator= (const GuardedKeyboard &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from Queue< T, ContainerType >::Node
 Node ()
 

Detailed Description

syscall interface for keyboard.

Guarded interface to the Keyboard used by user applications.

Implements the system call interface for class Keyboard. All methods provided by this class are wrappers for the respective method from the base class, which provide additional synchronization by using the class Guarded.

Constructor & Destructor Documentation

◆ GuardedKeyboard() [1/2]

GuardedKeyboard::GuardedKeyboard ( const GuardedKeyboard )
privatedelete

◆ GuardedKeyboard() [2/2]

GuardedKeyboard::GuardedKeyboard ( )
inline

Member Function Documentation

◆ operator=()

GuardedKeyboard & GuardedKeyboard::operator= ( const GuardedKeyboard )
privatedelete

◆ getKey()

Key GuardedKeyboard::getKey ( )
inline

Application interface to retrieve a Key.

This method returns one pressed key (as an Key object). If no key has been pressed, the calling application thread is blocked until a key is available – this is achieved by using a Semaphore.

Returns
Pressed key
Todo:
Implement Method
Note
This method is equal to the correspondent method in base class Keyboard, with the only difference that the call will be protected by a Guarded object.
Todo:
Implement method

The documentation for this class was generated from the following file: