ch.aplu.ftcontroller
Class Lamp

java.lang.Object
  extended by ch.aplu.ftcontroller.Lamp

public class Lamp
extends java.lang.Object

Class to handle the 8 lamps (or other devices) at output ports O1..O8.


Method Summary
 int getNumber()
          Returns number of lamp (1..8).
 Lamp off()
          Turns the lamp off.
 Lamp on()
          Turns the lamp on with current intensity.
 Lamp setIntensity(int intensity)
          Sets the intensity of the lamp.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNumber

public int getNumber()
Returns number of lamp (1..8).

Returns:
the number of the lamp

setIntensity

public Lamp setIntensity(int intensity)
Sets the intensity of the lamp. If the lamp is turned on, the intensity is modified immediately. Default value: 8.

Parameters:
intensity - the intensity value 1..8 (0 is lowest)
Returns:
a reference to the motor to allow chaining

on

public Lamp on()
Turns the lamp on with current intensity.

Returns:
a reference to the lamp to allow chaining.

off

public Lamp off()
Turns the lamp off.

Returns:
a reference to the lamp to allow chaining.