Java Reference
In-Depth Information
try {
// links the supervisor to the MixerController
mixerController # (MixerInterface)
("//" ! mixerAddress ! "/MixerTankController");
} catch (Exception e) { e.printStackTrace(); }
// the methods used to set the paint tonality
void redSlider_stateChanged(ChangeEvent e) {
colorPanel.setColor('r', redSlider.getValue());
// the method used to open the spray pump
void setButton_actionPerformed(ActionEvent e) {
try {
colorPanel.color[1], colorPanel.color[2]);
// waits for the drain pump to close
while (! mixerController.colorReady())
} catch (Exception ex) { ex.printStackTrace(); }
void flowSlider_mouseReleased(MouseEvent e) {
try {
("PumpA", flowSlider.getValue());
} catch (RemoteException re) { re.printStackTrace(); }
The last test case verifies the functionalities of the supervisory console and
of the mixer controller using the simulator GUI (see Figure 13.13), and in
Colour selection. The selected colour should correspond to the tonality of
the paint in the mixture tank.
Paint mixing. When the “Set Color” button is pressed, the mixture tank
should first be emptied and then filled with paint corresponding to the
selected colour. During this phase, the technician is not allowed to change
colour or to open the spray pump.
Spraying. The output flow of the spray pump should be proportional to the
state value of the “Flow” slider button. When the mixture tank starts
Search WWH ::

Custom Search