public class NonStrictLogicGate extends LogicGate
On each firing, produce an output token with a value that is equal to the specified logic operator of the input(s) if that output can be determined. The functions are:
NOTE: All operators have a single input port, which is a multiport, and a single output port, which is not a multiport. All ports have type boolean.
This actor is nonstrict. That is, it does not require that each input channel have a token upon firing. If the output can be determined from the known inputs, the output will be produced. If the output can not be determined in the given firing, no output will be produced. If all of the inputs are known and absent, the output will be made known and absent. At most one token is consumed on each input channel.
| Red (pwhitake) |
| Red (pwhitake) |
Entity.ContainedObjectsIterator_AND, _function, _negate, _OR, _XOR, logicinput, output_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
NonStrictLogicGate(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_allInputsKnown()
Return true if all inputs are known.
|
protected BooleanToken |
_readInputs()
Read the inputs, and return the logic function applied to
all the are known and present.
|
void |
fire()
Consume at most one input token from each input channel,
and produce a token on the output port if it can be determined.
|
boolean |
isStrict()
Return false.
|
void |
preinitialize()
Override the base class to declare that the output
does not depend on the input in a firing.
|
_updateFunction, attributeChanged_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, iterate, newReceiver, outputPortList, postfire, prefire, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup_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, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, iterate, postfire, prefire, stop, stopFire, terminateaddInitializable, initialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic NonStrictLogicGate(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container - The container.name - The name of this actor.IllegalActionException - If the actor cannot be contained
by the proposed container.NameDuplicationException - If the container already has an
actor with this name.public void fire()
throws IllegalActionException
fire in interface Executablefire in class LogicGateIllegalActionException - If there is no director.public boolean isStrict()
isStrict in interface ExecutableisStrict in class AtomicActor<TypedIOPort>public void preinitialize()
throws IllegalActionException
preinitialize in interface Initializablepreinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If the superclass throws it.protected boolean _allInputsKnown()
throws IllegalActionException
IllegalActionException - If it fails.protected BooleanToken _readInputs() throws IllegalActionException
IllegalActionException - If reading inputs fails.