|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthades.simulator.SimObject
hades.models.gates.GenericGate
hades.models.io.Ipin
hades.models.io.PulseSwitch
PulseSwitch - a simple subclass of Ipin that models an 'pulse' switch. Also, a PulseSwitch object is automatically interpreted as an input for a hierarchical Design - like a standard-CAD 'ipin'.
The default pulse duration is 0.1 seconds.
Field Summary | |
protected double |
t_pulse
|
protected double |
t_pulseDefault
|
Fields inherited from class hades.models.io.Ipin |
bindkey, delay, output_0, output_1, output_U, output_X, output_Z, port_toplevel, port_Y, showOnOff, startValue, state |
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 | |
PulseSwitch()
PulseSwitch(): simple constructor |
Method Summary | |
void |
configure()
configure: display a dialog to specify the Ipin instance name, initial output value, and gate propagation delay. |
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. |
double |
getPulseDuration()
|
boolean |
initialize(java.lang.String s)
initialize an Ipin from a String, which contains the integer version id, and optionally the pulse width (in seconds). |
void |
keyPressed(java.awt.event.KeyEvent ke)
react to a KeyEvent. |
void |
mouseOrKeyPressed(boolean isShiftDown)
|
void |
mousePressed(java.awt.event.MouseEvent me)
handle a mouse click on this IpinWithBindkey's graphical symbol. |
void |
setPulseDuration(double t)
|
void |
setPulseDuration(java.lang.String s)
|
java.lang.String |
toString()
toString() - the usual info method |
void |
write(java.io.PrintWriter ps)
write the versionID and the start value of this Ipin (the latter as StdLogic1164.getChar() value), e.g. |
Methods inherited from class hades.models.io.Ipin |
assign, getBindkey, getDelay, getStartValue, getToolTip, initDisplay, mouseOrKeyEvent, schedule, setBindkey, setDelay, setName, setStartState, setStartValue, setSymbol, setValueAtTime, showState, wakeup |
Methods inherited from class hades.models.gates.GenericGate |
copy, scheduleEvent, scheduleEventAfter, scheduleOutputValue, scheduleOutputValueAfter, setDelay |
Methods inherited from class hades.simulator.SimObject |
constructDynamicSymbol, getClassLoader, getDebug, getEditor, getExternalResources, getFullName, getName, getParent, getPort, getPorts, getPropertySheet, getResourceAsStream, getSimulator, getSymbol, getSymbolResourceName, getVersionId, isVisible, message, 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 |
Methods inherited from interface hades.simulator.Wakeable |
wakeup |
Methods inherited from interface hades.simulator.Assignable |
assign |
Field Detail |
protected double t_pulseDefault
protected double t_pulse
Constructor Detail |
public PulseSwitch()
Method Detail |
public double getPulseDuration()
public void setPulseDuration(double t)
public void setPulseDuration(java.lang.String s)
public void mousePressed(java.awt.event.MouseEvent me)
Ipin
mousePressed
in class Ipin
public void keyPressed(java.awt.event.KeyEvent ke)
SimObject
At the moment this is actually called from KeyHandler.keyTyped(), but this naming mismatch is not considered critical...
keyPressed
in class Ipin
public void mouseOrKeyPressed(boolean isShiftDown)
public void elaborate(java.lang.Object arg)
elaborate
in interface Simulatable
elaborate
in class Ipin
arg
- This parameter is ignored by PulseSwitchpublic void evaluate(java.lang.Object arg)
evaluate
in interface Simulatable
evaluate
in class Ipin
public void configure()
Ipin
configure
in class Ipin
public void write(java.io.PrintWriter ps)
Ipin
write
in class Ipin
public boolean initialize(java.lang.String s)
initialize
in class Ipin
public java.lang.String toString()
toString
in class SimObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |