Java Reference
In-Depth Information
else if (tankState.equals(FULL)
&& tankLevel < # MAXIMUM) {
...
}
else if (tankState.equals(NOTFULL)
&& tankLevel < # MEDIUM) {
tankState # NOTEMPTY;
if (automatic && ! mixing) {
// opens the colour tank pumps in order
// to refill the mixture tank
redController.openPump("PumpB", redColorFlow);
greenController.openPump
("PumpB", greenColorFlow);
blueController.openPump("PumpB", blueColorFlow);
}
}
else if (tankState.equals(NOTEMPTY)
&& tankLevel < # 0) { ...
if (mixing) {
// the mixture tank is now empty; opens the
// color tank pumps in order to fill the mixture
// tank
redController.openPump("PumpB", redColorFlow);
greenController.openPump
("PumpB", greenColorFlow);
blueController.openPump("PumpB", blueColorFlow);
}
}
}
} catch (Exception ex) { ex.printStackTrace(); }
}
Class Supervisor implements the supervisory console. It is simply a
graphical user interface that allows the technician to set the desired paint
tonality and to open the spray pump.
package scada.supervisor;
import scada.controller.MixerInterface;
import java.awt.*;
import java.rmi.*;
public class Supervisor extends JFrame {
private MixerInterface mixerController # null ;
// the graphical components
ColorPanel colorPanel # new ColorPanel();
. . .
public Supervisor(String mixerAddress) {
Search WWH ::




Custom Search