cz.zcu.fav.kiv.jsimcasestudies.watersystem
Interface CommonControlInterface

All Known Implementing Classes:
ModelInterface

public interface CommonControlInterface

An interface shared between the control program and the model of its environment. Once defined (together with other abstract interfaces), the control program and the environment model can be developed in parallel without having any knowledge about each other. The interface defines methods that the real control program will use in order to communicate with its environment. The model of environment must provide its own implementation of these methods that (may) affect or reflect the model's data.

Version:
1.0 from 2004-03-18
Author:
Cesar ALLAIN, Jarda KACER

Method Summary
 InterruptControllerInterface getInterruptControllerAddress()
          Returns the reference to the interrupt controller object.
 int readOutputFlow()
          Reads the Output Flow register of the main water tank.
 boolean readPump(int sourceNo)
          Reads the Pump IS On flag of a water source.
 boolean readSourceLevelHigh(int sourceNo)
          Reads the Source Level High flag of a water source.
 boolean readSourceLevelLow(int sourceNo)
          Reads the Source Level Low flag of a water source.
 boolean readWaterStationLevelHigh()
          Reads the Source Level High flag of the main water tank.
 boolean readWaterStationLevelLow()
          Reads the Source Level Low flag of the main water tank.
 boolean setPump(int sourceNo, boolean newState)
          Sets the Pump Is On flag of a water source.
 

Method Detail

readSourceLevelLow

public boolean readSourceLevelLow(int sourceNo)
Reads the Source Level Low flag of a water source.

Parameters:
sourceNo - Number of the source whose flag has to be read.
Returns:
The value of the Source Level Low flag of the specified source.

readSourceLevelHigh

public boolean readSourceLevelHigh(int sourceNo)
Reads the Source Level High flag of a water source.

Parameters:
sourceNo - Number of the source whose flag has to be read.
Returns:
The value of the Source Level High flag of the specified source.

readPump

public boolean readPump(int sourceNo)
Reads the Pump IS On flag of a water source.

Parameters:
sourceNo - Number of the source whose flag has to be read.
Returns:
The value of the Pump Is On flag of the specified source.

setPump

public boolean setPump(int sourceNo,
                       boolean newState)
Sets the Pump Is On flag of a water source.

Parameters:
sourceNo - Number of the source whose flag has to be set.
Returns:
The old value of the Pump Is On flag of the specified source.

readWaterStationLevelLow

public boolean readWaterStationLevelLow()
Reads the Source Level Low flag of the main water tank.

Returns:
The value of the Source Level Low flag of the main water tank.

readWaterStationLevelHigh

public boolean readWaterStationLevelHigh()
Reads the Source Level High flag of the main water tank.

Returns:
The value of the Source Level High flag of the main water tank.

readOutputFlow

public int readOutputFlow()
Reads the Output Flow register of the main water tank.

Returns:
The value of the Output Flow register of the main water tank.

getInterruptControllerAddress

public InterruptControllerInterface getInterruptControllerAddress()
Returns the reference to the interrupt controller object.

Returns:
The reference to the interrupt controller object.


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