agentland.device.light
Class X10LightAgent

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
All Implemented Interfaces:
Agent, Device, Good, Light, Managed, MetagluePrimitives, Remote, Serializable, Spy, X10Light
Direct Known Subclasses:
X10DimmableLightAgent

public class X10LightAgent
extends LightAgent
implements X10Light

See Also:
Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Field Summary
protected  char housecode
           
protected  int module
           
protected  X10 x10
           
 
Fields inherited from class agentland.device.DeviceAgent
defaultState, fName, names, states
 
Fields inherited from class agentland.resource.ManagedAgent
rm, society
 
Fields inherited from class agentland.util.GoodAgent
alert, notifier
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
X10LightAgent()
           
 
Method Summary
protected  String[] getDefaultNames()
          Override this method to set the default names for your device; this method is only called if we cannot defrost names set previously
 UncertainValue isOn()
           
 void resetState()
          Resets the default state
protected  void setX10Settings(char housecode, int module)
           
 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 class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agentland.device.Device
addName, getName, getNames, getState, getState, getStateNames, hasName, resetAllStates, resetName, resetState, setName, setState
 
Methods inherited from interface agentland.resource.Managed
getNeed, replace, replace, resources, yank, yank
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, getOldLogs, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Field Detail

x10

protected X10 x10

housecode

protected char housecode

module

protected int module
Constructor Detail

X10LightAgent

public X10LightAgent()
              throws RemoteException
Method Detail

getDefaultNames

protected String[] getDefaultNames()
Description copied from class: DeviceAgent
Override this method to set the default names for your device; this method is only called if we cannot defrost names set previously
Overrides:
getDefaultNames in class DeviceAgent
Following copied from class: agentland.device.DeviceAgent
Returns:
a Vector value

setX10Settings

protected void setX10Settings(char housecode,
                              int module)
                       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 DeviceAgent

turnOn

public boolean turnOn()
               throws RemoteException
turns on and dims the lights up to the highest level
Specified by:
turnOn in interface Light

turnOff

public boolean turnOff()
                throws RemoteException
dims the light from the current dimness state to off
Specified by:
turnOff in interface Light

isOn

public UncertainValue isOn()
                    throws RemoteException
Specified by:
isOn in interface Light