Package mgui.models.updaters
Class PulseTrainUpdater
java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.models.updaters.SimpleEnvironmentUpdater
mgui.models.updaters.PulseTrainUpdater
- All Implemented Interfaces:
AttributeObject
,InterfaceObject
,NamedObject
,TreeObject
,CleanableObject
,DynamicModelUpdater
public class PulseTrainUpdater extends SimpleEnvironmentUpdater
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PulseTrainUpdater.CurrentPulse
-
Field Summary
Fields Modifier and Type Field Description protected double
clock
java.util.ArrayList<PulseTrainUpdater.CurrentPulse>
pulses
Fields inherited from class mgui.models.updaters.SimpleEnvironmentUpdater
attributes
Fields inherited from class mgui.interfaces.AbstractInterfaceObject
isDestroyed, tree_nodes
-
Constructor Summary
Constructors Constructor Description PulseTrainUpdater()
PulseTrainUpdater(boolean repeat, double rate)
-
Method Summary
Modifier and Type Method Description PulseTrainUpdater.CurrentPulse
addPulse(int index, double delay, double duration, double amplitude)
protected boolean
doUpdate(DynamicModelEnvironment c, double timeStep)
double
getRate()
boolean
getRepeat()
protected void
init()
void
removePulse(PulseTrainUpdater.CurrentPulse pulse)
void
reset()
void
setRate(double rate)
void
setRepeat(boolean repeat)
void
setTreeNode(InterfaceTreeNode treeNode)
Sets the children for this node'sInterfaceTreeNode
.java.lang.String
toString()
protected void
updateRepeat()
Methods inherited from class mgui.models.updaters.SimpleEnvironmentUpdater
getAttribute, getAttributes, getAttributeValue, setAttribute, setAttributes, test, update
Methods inherited from class mgui.interfaces.AbstractInterfaceObject
clean, destroy, getName, getTreeLabel, isDestroyed, issueTreeNode, setName, updateTreeNodes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mgui.interfaces.NamedObject
getName, setName
-
Field Details
-
pulses
-
clock
protected double clock
-
-
Constructor Details
-
PulseTrainUpdater
public PulseTrainUpdater() -
PulseTrainUpdater
public PulseTrainUpdater(boolean repeat, double rate)
-
-
Method Details
-
init
protected void init()- Overrides:
init
in classSimpleEnvironmentUpdater
-
reset
public void reset() -
setRepeat
public void setRepeat(boolean repeat) -
getRepeat
public boolean getRepeat() -
setRate
public void setRate(double rate) -
getRate
public double getRate() -
addPulse
public PulseTrainUpdater.CurrentPulse addPulse(int index, double delay, double duration, double amplitude) -
removePulse
-
doUpdate
- Specified by:
doUpdate
in classSimpleEnvironmentUpdater
-
updateRepeat
protected void updateRepeat() -
setTreeNode
Description copied from interface:TreeObject
Sets the children for this node'sInterfaceTreeNode
.- Specified by:
setTreeNode
in interfaceTreeObject
- Overrides:
setTreeNode
in classSimpleEnvironmentUpdater
-
toString
public java.lang.String toString()- Overrides:
toString
in classSimpleEnvironmentUpdater
-