public class AbstractStation extends StationWriter implements Rejecting
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
broken
True if this station is broken.
|
Parameter |
inJunction
True if this is an input junction.
|
TypedIOPort |
input
The input port, which is a multiport.
|
Parameter |
lineSymbol
The line symbol, which is a string.
|
Parameter |
neighbors
The neighbors of this station.
|
TypedIOPort |
output
The output port, which is a multiport consisting of RecordTokens.
|
Parameter |
settlingTime
The settling time.
|
Parameter |
stationId
The station ID.
|
_flushValue, _writer, fileName
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
AbstractStation(CompositeEntity container,
java.lang.String name)
Create a new actor in the specified container with the specified
name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_setIcon(int id)
Change the color of the inner box in station to show the moving train.
|
void |
attributeChanged(Attribute attribute)
This method handles changing in the broken and symbol parameter of the station.
|
void |
declareDelayDependency()
Set the dependency between all output ports and all input
ports of this actor.
|
void |
fire()
Do nothing.
|
void |
initialize()
Initialize this actor.
|
boolean |
reject(Token token,
IOPort port)
Return true if the token cannot be accepted at the specified port.
|
_writeToken, _writingToFile, clone, preinitialize, wrapup
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public TypedIOPort input
public TypedIOPort output
public Parameter stationId
public Parameter settlingTime
public Parameter lineSymbol
public Parameter inJunction
public Parameter broken
public Parameter neighbors
public AbstractStation(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor within the container.IllegalActionException
- If this actor cannot be contained
by the proposed container (see the setContainer() method).NameDuplicationException
- If the name coincides with
an entity already in the container.public boolean reject(Token token, IOPort port)
Rejecting
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class StationWriter
attribute
- The attribute that has changed.IllegalActionException
- If the specified attribute
is fileName and the previously
opened file cannot be closed.public void declareDelayDependency() throws IllegalActionException
AtomicActor
TimeDelay
,
where output ports depend on input ports with a time delay,
this method should be overridden.
Protected method _declareDelayDependency() should be used
to declare dependency between input and output ports for
this actor.declareDelayDependency
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base
class, derived classes should throw this exception if the
delay dependency cannot be computed.AtomicActor.getCausalityInterface()
,
AtomicActor._declareDelayDependency(IOPort, IOPort, double)
public void fire() throws IllegalActionException
AtomicActor
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public void initialize() throws IllegalActionException
StationWriter
initialize
in interface Initializable
initialize
in class StationWriter
IllegalActionException
- If a derived class throws it.protected void _setIcon(int id) throws IllegalActionException
id
- The train ID or -1 to indicate no train.IllegalActionException