cz.zcu.fav.kiv.jsimcasestudies.watersystem.model
Class InterruptController

java.lang.Object
  |
  +--cz.zcu.fav.kiv.jsimcasestudies.watersystem.model.InterruptController
All Implemented Interfaces:
InterruptControllerInterface

public class InterruptController
extends java.lang.Object
implements InterruptControllerInterface

Simple data model of HW interrupt controller device with a given number of interrupt levels. Control program binds its service routine by calling bindInterrupt(). Environment model side issues interrupt by calling setInterrupt(); Nested service of interrupts is not assumed, i.e. interrupt level has not here a meaning of interrupt priority.

Version:
1.0 from 2004-04-30
Author:
St.R.

Field Summary
(package private)  InterruptEntryInterface[] iEVector
           
(package private)  boolean[] iMaskVector
           
 int nLevels
           
 
Constructor Summary
InterruptController(int nLevels, boolean iniMask)
          constructor
 
Method Summary
 void bindInterrupt(int level, InterruptEntryInterface ie)
          Binds the address of an interrupt service routine to a level of interrupt.
 void maskInterrupt(int level, boolean maskValue)
          Set a value of the mask.
 void setInterrupt(int level)
          Issues the interrupt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nLevels

public int nLevels

iEVector

InterruptEntryInterface[] iEVector

iMaskVector

boolean[] iMaskVector
Constructor Detail

InterruptController

public InterruptController(int nLevels,
                           boolean iniMask)
constructor

Parameters:
nLevels - Number of interrupt levels
iniMask - Initial setting of the mask
Method Detail

bindInterrupt

public void bindInterrupt(int level,
                          InterruptEntryInterface ie)
Binds the address of an interrupt service routine to a level of interrupt. Used from the control program side.

Specified by:
bindInterrupt in interface InterruptControllerInterface
Parameters:
level - Interrupt level
ie - Interrupt entry (service routine)

maskInterrupt

public void maskInterrupt(int level,
                          boolean maskValue)
Set a value of the mask. Used from the control program side.

Specified by:
maskInterrupt in interface InterruptControllerInterface
Parameters:
level - Interrupt level
maskValue - New value of the mask

setInterrupt

public void setInterrupt(int level)
Issues the interrupt. Used from the environment model side.

Parameters:
level - Interrupt level


Copyright © 2000-2004 University of West Bohemia, FAV-KIV. All Rights Reserved. Build date 20040510