agentland.device
Class CrossPointMuxAgent

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.BaseMuxAgent
                                                  |
                                                  +--agentland.device.CrossPointMuxAgent
All Implemented Interfaces:
Agent, BaseMux, Connectable, CrossPointMux, Device, Good, Managed, MetagluePrimitives, Mux, NamedMux, Remote, Serializable, Spy

public class CrossPointMuxAgent
extends BaseMuxAgent
implements CrossPointMux

Agent for controlling CrossPoint VGA mux

See Also:
BaseMuxAgent, CrossPointMux, Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Field Summary
protected  int numInputs
           
protected  int numOutputs
           
 
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
CrossPointMuxAgent()
           
 
Method Summary
 boolean connect(int in, int out)
           
 UncertainValue getInput(int out)
          Returns the number of input tied to the specified output We override this method as implemented in BaseMux -- instead of checking our state we actually query the mux and get an answer that we are quite sure of
 int getNumInputs()
          Gets the number of inputs the mux can take.
 int getNumOutputs()
          Gets the number of outputs the mux can take.
 boolean loadDefaults()
           
 
Methods inherited from class agentland.device.BaseMuxAgent
connect, connectionSet, findPositionInVector, getInputName, getInputs, getOutputName, getOutputs, getVectorIndex, resetNames, resolveInputName, resolveOutputName, setInputName, setOutputName
 
Methods inherited from class agentland.device.DeviceAgent
addName, createStateChangeNotification, ensureState, getDefaultNames, getDefaultStateName, getName, getNames, getState, 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, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, 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, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agentland.device.NamedMux
connect, getInputName, getInputs, getOutputName, getOutputs, resetNames, setInputName, setOutputName
 
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, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Field Detail

numInputs

protected int numInputs

numOutputs

protected int numOutputs
Constructor Detail

CrossPointMuxAgent

public CrossPointMuxAgent()
                   throws RemoteException
Method Detail

connect

public boolean connect(int in,
                       int out)
                throws RemoteException
Specified by:
connect in interface Mux

loadDefaults

public boolean loadDefaults()
                     throws RemoteException
Specified by:
loadDefaults in interface Mux

getInput

public UncertainValue getInput(int out)
                        throws RemoteException
Returns the number of input tied to the specified output We override this method as implemented in BaseMux -- instead of checking our state we actually query the mux and get an answer that we are quite sure of
Specified by:
getInput in interface Mux
Overrides:
getInput in class BaseMuxAgent
Parameters:
out - output to be checked
Returns:
input number that is connected to that output

getNumInputs

public int getNumInputs()
                 throws RemoteException
Gets the number of inputs the mux can take.
Specified by:
getNumInputs in interface NamedMux
Returns:
the number of inputs
Throws:
RemoteException - if an error occurs

getNumOutputs

public int getNumOutputs()
                  throws RemoteException
Gets the number of outputs the mux can take.
Specified by:
getNumOutputs in interface NamedMux
Returns:
the number of outputs
Throws:
RemoteException - if an error occurs