Class Plugbox

Class Plugbox

Placement in the overall structure

Module
machine
Base classes
None
Derived classes
None
Time of creation
Task 2
Files
plugbox.h plugbox.cc

Description

This class represents the object-oriented abstraction of the interrupt vector table. For this purpose it has a field (64 elements) in which Gate objects can be registered for all interrupts to be potentially handled. When an interrupt occurs, the handling function trigger() of the corresponding gate object is then called.

Public constants

timer = 32
Interrupt number of the timer module
keyboard = 33
Interrupt number of the keyboard

Public methods

Plugbox ()
In the constructor, the global known Panic object panic is registered for all interrupts and exceptions, which provides a minimal interrupt handling.
void assign (unsigned int slot, Gate& gate)
Plug in a handler routine at the interrupt number slot, provided in the form of a Gate object.
Gate& report (unsigned int slot)
Retrieve the Gate object for the specified slot.