All Packages Class Hierarchy This Package Previous Next Index
Class edu.cmu.owl.bo.control.luxmate.LuxmateWrapper
edu.cmu.owl.bo.control.luxmate.LuxmateWrapper
- public class LuxmateWrapper
This class is the Java wrapper for our luxmate server. This class contains
mostly native calls. This class is a singleton.
- Version:
- 1.0
-
getInstance(int, WrapperListener)
- This static method is the one responsible for enforcing the singleton pattern.
-
lightBrighten(int, float)
- This method brightens the specified light.
-
lightDim(int, float)
- This method dims the specified light.
-
lightError(int)
- This method signals that a light error has occurred
-
lightGetCurrentLevel(int)
- This method returns the current level of the light
-
lightIsFaulty(int)
- This method determines whether the specified light is faulty.
-
lightIsOn(int)
- This method determines whether the specified light is on or not
-
lightRepaired(int)
- This method signals that a light has been repaired
-
lightSetCurrentLevel(int, float)
- This method sets the light to a specific level
-
lightTurnOff(int)
- This method turns the light off.
-
lightTurnOn(int)
- This method turns the specified light on.
-
pull()
- This method is used to pull the LuxmateNativeWrapper.
-
sensorError(int)
- This method signals that a sensor error has occurred
-
sensorGetCurrentLevel(int)
- This method sets the sensor to a specific level
-
sensorIsFaulty(int)
- This method determines whether the specified sensor is faulty.
-
sensorRepaired(int)
- This method signals that a sensor has been repaired
-
turnedOff(int)
- This method signals that the specified light has been turned off
-
turnedOn(int)
- This method signals that the specified light has been turned on
getInstance
public static LuxmateWrapper getInstance(int id,
WrapperListener listener)
- This static method is the one responsible for enforcing the singleton pattern.
Only this method can be used to get the instance of the class.
- Parameters:
- id - the id of the actuator whose events we wish to listen to
- listener - the listener implementation (written by the client)
- Returns:
- the single instance of the class
lightTurnOn
public native void lightTurnOn(int id)
- This method turns the specified light on.
- Parameters:
- id - the luxmate id of the light
lightTurnOff
public native void lightTurnOff(int id)
- This method turns the light off.
- Parameters:
- id - the luxmate id of the light
lightDim
public native void lightDim(int id,
float reln)
- This method dims the specified light.
- Parameters:
- id - the luxmate id of the light
- reln - the amount by which to dim the light
lightBrighten
public native void lightBrighten(int id,
float reln)
- This method brightens the specified light.
- Parameters:
- id - the luxmate id of the light
- reln - the amount by which to brighten the light
lightIsFaulty
public native boolean lightIsFaulty(int id)
- This method determines whether the specified light is faulty.
- Parameters:
- id - the luxmate id of the light
- Returns:
- whether the light is faulty or not
lightIsOn
public native boolean lightIsOn(int id)
- This method determines whether the specified light is on or not
- Parameters:
- id - the luxmate id of the light
- Returns:
- whether the light is on or not
lightGetCurrentLevel
public native float lightGetCurrentLevel(int id)
- This method returns the current level of the light
- Parameters:
- id - the luxmate id of the light
- Returns:
- the current level of the light
lightSetCurrentLevel
public native void lightSetCurrentLevel(int id,
float value)
- This method sets the light to a specific level
- Parameters:
- id - the luxmate id of the light
- value - the value at which to set the light
pull
protected native synchronized void pull()
- This method is used to pull the LuxmateNativeWrapper. This method
will hopefully be deprecated in the future.
sensorGetCurrentLevel
public native float sensorGetCurrentLevel(int id)
- This method sets the sensor to a specific level
- Parameters:
- id - the luxmate id of the sensor
- value - the value at which to set the sensor
sensorIsFaulty
public native boolean sensorIsFaulty(int id)
- This method determines whether the specified sensor is faulty.
- Parameters:
- id - the luxmate id of the sensor
- Returns:
- whether the sensor is faulty or not
turnedOn
public void turnedOn(int id)
- This method signals that the specified light has been turned on
- Parameters:
- id - the id of the light
turnedOff
public void turnedOff(int id)
- This method signals that the specified light has been turned off
- Parameters:
- id - the id of the light
lightError
public void lightError(int id)
- This method signals that a light error has occurred
- Parameters:
- id - the id of the specified light
lightRepaired
public void lightRepaired(int id)
- This method signals that a light has been repaired
- Parameters:
- id - the id of the light
sensorError
public void sensorError(int id)
- This method signals that a sensor error has occurred
- Parameters:
- id - the id of the sensor
sensorRepaired
public void sensorRepaired(int id)
- This method signals that a sensor has been repaired
- Parameters:
- id - the id of the sensor
All Packages Class Hierarchy This Package Previous Next Index