agentland.device.light
Class X10DimmableLightAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.device.DeviceAgent
|
+--agentland.device.light.LightAgent
|
+--agentland.device.light.X10LightAgent
|
+--agentland.device.light.X10DimmableLightAgent
- All Implemented Interfaces:
- Agent, Device, DimmableLight, Good, Light, Managed, MetagluePrimitives, Remote, Serializable, Spy, X10DimmableLight, X10Light
- public class X10DimmableLightAgent
- extends X10LightAgent
- implements X10DimmableLight
- See Also:
- Serialized Form
Method Summary |
boolean |
brighten(int delta)
Brightens the standingDimmableLamp
Throws DimmableLampException if not in this range |
boolean |
dim(int delta)
Dims the standingDimmableLamp
Throws DimmableLampException if not in this range |
UncertainValue |
level()
Returns the dim level of this light (in percent) |
void |
resetState()
Resets the default state |
boolean |
setLevel(int level)
Dims the standingDimmableLamp to a value between 0 (dimmest) and 100 (brightest)
Throws DimmableLampException if not in this range |
boolean |
turnOff()
dims the light from the current dimness state to off |
boolean |
turnOn()
turns on and dims the lights up to the highest level |
Methods inherited from class agentland.device.DeviceAgent |
addName, createStateChangeNotification, ensureState, getDefaultStateName, getName, getNames, getState, getState, getStateNames, hasName, quietException, resetAllStates, resetName, resetState, setDefaultStateName, setName, setState, throwException, updateState, updateState, updateState, updateState, updateState, updateState, updateState, updateState |
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, buildEHAFor, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getOldLogs, getProperties, getProxyHandlerClass, getSociety, installAPH, log, log, lookupClass, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
Methods inherited from interface agentland.device.light.Light |
isOn |
Methods inherited from interface agentland.device.Device |
addName, getName, getNames, getState, getState, getStateNames, hasName, resetAllStates, resetName, resetState, setName, setState |
Methods inherited from interface agentland.util.Spy |
tell |
X10DimmableLightAgent
public X10DimmableLightAgent()
throws RemoteException
resetState
public void resetState()
throws RemoteException
- Description copied from class:
DeviceAgent
- Resets the default state
- Specified by:
resetState
in interface Device
- Overrides:
resetState
in class X10LightAgent
turnOn
public boolean turnOn()
throws RemoteException
- turns on and dims the lights up to the highest level
- Specified by:
turnOn
in interface Light
- Overrides:
turnOn
in class X10LightAgent
turnOff
public boolean turnOff()
throws RemoteException
- dims the light from the current dimness state to off
- Specified by:
turnOff
in interface Light
- Overrides:
turnOff
in class X10LightAgent
setLevel
public boolean setLevel(int level)
throws RemoteException
- Dims the standingDimmableLamp to a value between 0 (dimmest) and 100 (brightest)
Throws DimmableLampException if not in this range
- Specified by:
setLevel
in interface DimmableLight
dim
public boolean dim(int delta)
throws RemoteException
- Dims the standingDimmableLamp
Throws DimmableLampException if not in this range
- Specified by:
dim
in interface DimmableLight
brighten
public boolean brighten(int delta)
throws RemoteException
- Brightens the standingDimmableLamp
Throws DimmableLampException if not in this range
- Specified by:
brighten
in interface DimmableLight
level
public UncertainValue level()
throws RemoteException
- Description copied from interface:
DimmableLight
- Returns the dim level of this light (in percent)
- Specified by:
level
in interface DimmableLight