hades.models.io
Class Opin

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.gates.GenericGate
          extended byhades.models.io.Opin
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, OutputConnector, java.io.Serializable, Simulatable
Direct Known Subclasses:
OpinLarge, OpinVertical, OpinWithLabel

public class Opin
extends GenericGate
implements OutputConnector

Opin - a simple subclass of GenericGate that models an output pin for connection through the design hierarchy that additionally displays its value like a (red/green/yellow) LED.

See Also:
Serialized Form

Field Summary
protected  PortStdLogic1164 port_A
           
protected  PortStdLogic1164 port_toplevel
           
protected  ColoredCircle showOnOff
           
protected  StdLogic1164 value
           
 
Fields inherited from class hades.models.gates.GenericGate
t_delay
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
Opin()
          Opin(): simple constructor
 
Method Summary
 void elaborate(java.lang.Object arg)
          elaborate(): This method is called by the simulation engine to initialize the simulation object.
 void evaluate(java.lang.Object arg)
          evaluate(): called by the simulation engine on all events that concern this object.
 java.lang.String getToolTip(java.awt.Point position, long millis)
          construct a (short) tool tip message for a logic gate with name, class name, and gate delay.
protected  void initDisplay()
           
 void setName(java.lang.String name)
          set the name of this SimObject.
 void setSymbol(Symbol s)
           
protected  void showState(StdLogic1164 value)
           
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class hades.models.gates.GenericGate
configure, copy, getDelay, initialize, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay, setDelay, write
 
Methods inherited from class hades.simulator.SimObject
constructDynamicSymbol, getBindkey, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, keyPressed, message, mousePressed, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setParent, setPorts, setSimulator, setVersionId, setVisible, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface hades.simulator.Simulatable
message
 

Field Detail

value

protected StdLogic1164 value

port_A

protected PortStdLogic1164 port_A

port_toplevel

protected PortStdLogic1164 port_toplevel

showOnOff

protected ColoredCircle showOnOff
Constructor Detail

Opin

public Opin()
Opin(): simple constructor

Method Detail

setSymbol

public void setSymbol(Symbol s)
Overrides:
setSymbol in class SimObject

setName

public void setName(java.lang.String name)
Description copied from class: SimObject
set the name of this SimObject. If there is a Symbol for this SimObject, we also try to set the InstanceLabel in the Symbol.

To avoid consistency problems, when the user changes a SimObject's name interactively, we also try to enforce a unique name.

Overrides:
setName in class SimObject

initDisplay

protected void initDisplay()

elaborate

public void elaborate(java.lang.Object arg)
elaborate(): This method is called by the simulation engine to initialize the simulation object.

Specified by:
elaborate in interface Simulatable
Overrides:
elaborate in class GenericGate
Parameters:
arg - This parameter is ignored by Opin

evaluate

public void evaluate(java.lang.Object arg)
evaluate(): called by the simulation engine on all events that concern this object. The object is responsible for updating its internal state and for scheduling all pending output events.

Specified by:
evaluate in interface Simulatable
Overrides:
evaluate in class SimObject
Parameters:
arg - An arbitrary and unused object

showState

protected void showState(StdLogic1164 value)

getToolTip

public java.lang.String getToolTip(java.awt.Point position,
                                   long millis)
Description copied from class: GenericGate
construct a (short) tool tip message for a logic gate with name, class name, and gate delay.

Specified by:
getToolTip in interface ContextToolTip
Overrides:
getToolTip in class GenericGate

toString

public java.lang.String toString()
toString() - the usual info method

Overrides:
toString in class SimObject