All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.owl.bo.control.server.LuxmateLightControllerImpl
edu.cmu.owl.bo.control.server.ControllableObject
|
+----edu.cmu.owl.bo.control.server.LuxmateLightControllerImpl
- public class LuxmateLightControllerImpl
- extends ControllableObject
- implements LightController
This class is the Luxmate Implementation of a Light Fixture. This class needs to implement
a listener for luxmate wrapper in order to notify for events
- Version:
- 1.0
-
LuxmateLightControllerImpl(LuxmateLightingFixture)
- This constructor instantiates an object of this class.
-
addListener(LightEventListener)
- This method adds a listener to the events of this light
-
brighten(int)
- This method brightens the light by reln
-
dim(int)
- This method dims the light by reln
-
getCurrentLevel()
- This method returns the current level of this light
-
isFaulty()
- This method returns whether this light is faulty or not
-
isOn()
- This method returns whether the light is on
-
removeListener(LightEventListener)
- This method removes a listener of the events of this light
-
setCurrentLevel(float)
- This method sets the level of the light
-
turnOff()
- This method turns this light off.
-
turnOn()
- This method turns this light on.
LuxmateLightControllerImpl
public LuxmateLightControllerImpl(LuxmateLightingFixture peer) throws RemoteException
- This constructor instantiates an object of this class.
- Parameters:
- peer - the OwlObject peer for this light
- Throws: RemoteException
- if the remote communication fails
turnOn
public void turnOn() throws RemoteException
- This method turns this light on.
- Throws: RemoteException
- if the remote communication fails
turnOff
public void turnOff() throws RemoteException
- This method turns this light off.
- Throws: RemoteException
- if the remote communication fails
dim
public void dim(int reln) throws RemoteException
- This method dims the light by reln
- Parameters:
- reln - the value by which to dim the lights
- Throws: RemoteException
- if the remote communication fails
brighten
public void brighten(int reln) throws RemoteException
- This method brightens the light by reln
- Parameters:
- reln - the value by which to dim the lights
- Throws: RemoteException
- if the remote communication fails
isOn
public boolean isOn() throws RemoteException
- This method returns whether the light is on
- Returns:
- whether the light is on or not
- Throws: RemoteException
- if the remote communication fails
getCurrentLevel
public float getCurrentLevel() throws RemoteException
- This method returns the current level of this light
- Returns:
- the current level of this light
- Throws: RemoteException
- if the remote communication fails
isFaulty
public boolean isFaulty() throws RemoteException
- This method returns whether this light is faulty or not
- Returns:
- whether this light is faulty or not
- Throws: RemoteException
- if the remote communication fails
setCurrentLevel
public void setCurrentLevel(float level) throws RemoteException
- This method sets the level of the light
- Parameters:
- level - the desired level to which to set the light
- Throws: RemoteException
- if the remote communication fails
addListener
public synchronized void addListener(LightEventListener listener) throws RemoteException
- This method adds a listener to the events of this light
- Parameters:
- listener - the client implementation of the listener
- Throws: RemoteException
- if the remote communication fails
removeListener
public synchronized void removeListener(LightEventListener listener) throws RemoteException
- This method removes a listener of the events of this light
- Parameters:
- listener - the client implementation of the listener to remove
- Throws: RemoteException
- if the remote communication fails
All Packages Class Hierarchy This Package Previous Next Index