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

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--cz.zcu.fav.kiv.jsim.JSimProcess
              |
              +--cz.zcu.fav.kiv.jsimcasestudies.watersystem.model.TimerProcess
All Implemented Interfaces:
java.lang.Comparable, cz.zcu.fav.kiv.jsim.gui.JSimDisplayable, java.lang.Runnable

class TimerProcess
extends cz.zcu.fav.kiv.jsim.JSimProcess

Simple dynamic model of HW timer. This process is responsible for periodic time signals issued as interrupts to the control program part.

Version:
1.3 from 2004-05-03
Author:
St.R.

Field Summary
private static double BASE_PERIOD_MULTIPLIER
          Multiplier of the model's base period.
private  double basePeriod
          The model's base period of updates.
private  InterruptController ic
          Interrupt controller object.
 
Fields inherited from class cz.zcu.fav.kiv.jsim.JSimProcess
INT_REQUESTS_TO_IGNORE, myParent, semaphoreIAmCurrentlyBlockedOn, STATE_ACTIVE, STATE_BLOCKEDONMESSAGERECEIVE, STATE_BLOCKEDONMESSAGESEND, STATE_BLOCKEDONSEMAPHORE, STATE_NEW, STATE_PASSIVE, STATE_SCHEDULED, STATE_TERMINATED
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected TimerProcess(cz.zcu.fav.kiv.jsim.JSimSimulation simulation, InterruptController ic, double basePeriod)
          Constructs a new process that simulates HW timer.
 
Method Summary
protected  void life()
          Simulates periodical time interrupts
 
Methods inherited from class cz.zcu.fav.kiv.jsim.JSimProcess
activate, blockOnSemaphore, cancel, compareTo, copyToMessageClipboard, createDetailedInfoWindow, equals, error, getDetailedInformationArray, getMessageBox, getNumber, getObjectListItemDescription, getParent, getPrivateLock, getSenderIAmWaitingFor, getScheduleTime, getState, getStateAsString, getStateAsString, hasBeenStarted, hasEmptyMessageClipboard, hashCode, hold, isIdle, message, messageNoNL, passivate, reactivate, readFromClipboard, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, receiveMessageWithoutBlocking, run, sendMessageWithBlocking, sendMessageWithBlocking, sendMessageWithBlocking, sendMessageWithoutBlocking, sendMessageWithoutBlocking, sendMessageWithoutBlocking, start, toString, unblockFromSemaphore, wait
 
Methods inherited from class java.lang.Thread
activeCount, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, checkAccess, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BASE_PERIOD_MULTIPLIER

private static final double BASE_PERIOD_MULTIPLIER
Multiplier of the model's base period. The product of this multiplier and the model's base period will be used as a parameter to the hold() method.

See Also:
Constant Field Values

basePeriod

private final double basePeriod
The model's base period of updates.


ic

private InterruptController ic
Interrupt controller object.

Constructor Detail

TimerProcess

protected TimerProcess(cz.zcu.fav.kiv.jsim.JSimSimulation simulation,
                       InterruptController ic,
                       double basePeriod)
                throws cz.zcu.fav.kiv.jsim.JSimSimulationAlreadyTerminatedException,
                       cz.zcu.fav.kiv.jsim.JSimInvalidParametersException,
                       cz.zcu.fav.kiv.jsim.JSimTooManyProcessesException
Constructs a new process that simulates HW timer.

Parameters:
simulation - The overall simulation.
ic - Interrupt object (flag) sets with any sensor change
basePeriod - The model's base period.
Method Detail

life

protected void life()
Simulates periodical time interrupts

Overrides:
life in class cz.zcu.fav.kiv.jsim.JSimProcess


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