agentland.output
Class LynX10Agent

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.output.X10Agent
                                                  |
                                                  +--agentland.output.LynX10Agent
All Implemented Interfaces:
Agent, Device, Good, LynX10, Managed, MetagluePrimitives, Remote, Serializable, Spy, X10

public class LynX10Agent
extends X10Agent
implements LynX10

X10 agent for dealing wih contention for the X10 ports through the X10 TwoWay controller The Intelligent Room/HAL Project MIT Artificial Intelligence Laboratory Cambridge, MA

See Also:
Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
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
LynX10Agent()
          Simply ties the X10 agent to wonderbug so that it can be used.
 
Method Summary
 boolean brightenBy(char housecode, int module, int delta)
           
 boolean brightenTo(char housecode, int module, int level)
           
 boolean dimBy(char housecode, int module, int delta)
           
 boolean dimTo(char housecode, int module, int level)
           
 boolean fadeOff(char housecode, int module)
           
 void resetSerialX10()
          Closes the serial ir port, then tries to reopen it isomg ensureSrialIR
 boolean sendX10Command(String cmd)
           
 boolean turnOff(char housecode, int module)
           
 boolean turnOn(char housecode, int module)
           
 
Methods inherited from class agentland.output.X10Agent
brightenBy, brightenBy, brightenBy, brightenTo, brightenTo, brightenTo, defaultX10DimLevelState, defaultX10OnState, dimBy, dimBy, dimBy, dimTo, dimTo, dimTo, fadeOff, fadeOff, fadeOff, getDimState, getOnState, getState, turnOff, turnOff, turnOff, turnOn, turnOn, turnOn
 
Methods inherited from class agentland.device.DeviceAgent
addName, createStateChangeNotification, ensureState, getDefaultNames, getDefaultStateName, getName, getNames, getState, getStateNames, hasName, quietException, resetAllStates, resetName, resetState, 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.output.X10
brightenBy, brightenBy, brightenBy, brightenTo, brightenTo, brightenTo, dimBy, dimBy, dimBy, dimTo, dimTo, dimTo, fadeOff, fadeOff, fadeOff, getDimState, getOnState, turnOff, turnOff, turnOff, turnOn, turnOn, turnOn
 
Methods inherited from interface agentland.device.Device
addName, getName, getNames, getState, getState, getStateNames, hasName, resetAllStates, resetName, resetState, 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
 

Constructor Detail

LynX10Agent

public LynX10Agent()
            throws RemoteException
Simply ties the X10 agent to wonderbug so that it can be used. The actual SerialX10 object is retrieved.
Method Detail

resetSerialX10

public void resetSerialX10()
                    throws RemoteException
Closes the serial ir port, then tries to reopen it isomg ensureSrialIR
Specified by:
resetSerialX10 in interface X10

turnOn

public boolean turnOn(char housecode,
                      int module)
               throws RemoteException
Specified by:
turnOn in interface X10

turnOff

public boolean turnOff(char housecode,
                       int module)
                throws RemoteException
Specified by:
turnOff in interface X10

fadeOff

public boolean fadeOff(char housecode,
                       int module)
                throws RemoteException
Specified by:
fadeOff in interface X10

dimBy

public boolean dimBy(char housecode,
                     int module,
                     int delta)
              throws RemoteException
Specified by:
dimBy in interface X10

dimTo

public boolean dimTo(char housecode,
                     int module,
                     int level)
              throws RemoteException
Specified by:
dimTo in interface X10

brightenBy

public boolean brightenBy(char housecode,
                          int module,
                          int delta)
                   throws RemoteException
Specified by:
brightenBy in interface X10

brightenTo

public boolean brightenTo(char housecode,
                          int module,
                          int level)
                   throws RemoteException
Specified by:
brightenTo in interface X10

sendX10Command

public boolean sendX10Command(String cmd)
                       throws RemoteException
Specified by:
sendX10Command in interface LynX10