hades.models.rtlib.io
Class Constant

java.lang.Object
  extended byhades.simulator.SimObject
      extended byhades.models.rtlib.GenericRtlibObject
          extended byhades.models.rtlib.io.Constant
All Implemented Interfaces:
java.lang.Cloneable, ContextToolTip, java.io.Serializable, Simulatable, Wakeable
Direct Known Subclasses:
SmallConstant

public class Constant
extends GenericRtlibObject

Constant - a SimObject that generates an (editable but constant) StdLogicVector value.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class hades.models.rtlib.GenericRtlibObject
GenericRtlibObject.BinaryValueLabelFormatter, GenericRtlibObject.DecimalValueLabelFormatter, GenericRtlibObject.DINColorSource, GenericRtlibObject.FlexibleLabelFormatter, GenericRtlibObject.HexValueLabelFormatter
 
Field Summary
protected  Port port_Y
           
 
Fields inherited from class hades.models.rtlib.GenericRtlibObject
BINARY, DECIMAL, defaultdelay, delay, enableAnimationFlag, HEX, labelFormatter, n_bits, valueLabel, vector, vector_000, vector_111, vector_UUU, vector_XXX, vector_ZZZ, vectorOutputPort
 
Fields inherited from class hades.simulator.SimObject
classloader, console, debug, editor, name, parent, ports, propertySheet, simulator, symbol, versionId, visible
 
Constructor Summary
Constant()
           
 
Method Summary
 void constructPorts()
           
 void elaborate(java.lang.Object arg)
          elaborate(): This method is called by the simulation engine to initialize this RTLIB object for simulation.
 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.
protected  void initValueLabel()
           
 void mousePressed(java.awt.event.MouseEvent me)
          mousePressed: increment (click) or decrement (shift+click) the output value of this IpinVector, using the sequence 0xFFF -> 0xZZZ -> oxXXX 0xUUU -> 0x000 -> 0x001 ...
 void updateSymbol()
           
 
Methods inherited from class hades.models.rtlib.GenericRtlibObject
assign, configure, constructStandardValues, copy, getDelay, getEnableAnimationFlag, getFormattedValue, getNumberFormat, getValue, getWidth, initialize, isConnected, scheduleAfter, scheduleAfter, scheduleVectorOutputPort, setDelay, setDelay, setEnableAnimationFlag, setEnableAnimationFlag, setFormattedValue, setNumberFormat, setNumberFormat, setSymbol, setValue, setValue, setWidth, setWidth, toString, wakeup, wakeupAfter, 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, needsDynamicSymbol, needsExternalResources, setClassLoader, setConsole, setDebug, setEditor, setName, 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

port_Y

protected Port port_Y
Constructor Detail

Constant

public Constant()
Method Detail

constructPorts

public void constructPorts()
Overrides:
constructPorts in class GenericRtlibObject

initValueLabel

protected void initValueLabel()
Overrides:
initValueLabel in class GenericRtlibObject

elaborate

public void elaborate(java.lang.Object arg)
Description copied from class: GenericRtlibObject
elaborate(): This method is called by the simulation engine to initialize this RTLIB object for simulation.

GenericRtlibObject just calls updateSymbol() to initialize its graphical representation. Probably, most RTLIB classes won't need to override this method.

Specified by:
elaborate in interface Simulatable
Overrides:
elaborate in class GenericRtlibObject

evaluate

public void evaluate(java.lang.Object arg)
Description copied from interface: Simulatable
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 object argument

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
mousePressed: increment (click) or decrement (shift+click) the output value of this IpinVector, using the sequence 0xFFF -> 0xZZZ -> oxXXX 0xUUU -> 0x000 -> 0x001 ... 0xFFF on wraparound.

Overrides:
mousePressed in class SimObject

updateSymbol

public void updateSymbol()
Overrides:
updateSymbol in class GenericRtlibObject

getToolTip

public java.lang.String getToolTip(java.awt.Point position,
                                   long millis)
construct a (short) tool tip message.

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