ptolemy.domains.wireless.lib
Class SetProperties
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.wireless.lib.SetProperties
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class SetProperties
- extends TypedAtomicActor
On each firing, this actor reads at most one token from the payload
and properties input ports, outputs the payload on the
output port, and set the outsideTransmitProperties of the
wireless output port connected to the output port with the specified
transmit properties received from the properties input port. If
there is no token received on the properties input port, this actor
will not modify the outsideTransmitProperties of the connected
wirelessIOPort, i.e. the payload will be transmitted with the previous
transmit properties.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: SetProperties.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Yang Zhao, Edward A. Lee
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Field Summary |
TypedIOPort |
output
Output port that output the received payload. |
TypedIOPort |
payload
Input port that receives the payload to be transmitted. |
TypedIOPort |
properties
Input port that receives the properties to be used for transmission
on the connected wireless output port. |
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
SetProperties(CompositeEntity container,
java.lang.String name)
Construct an actor with the specified container and name. |
Method Summary |
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace. |
void |
fire()
reads one token from the payload input port, and simply output
the token on the output port. |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, 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, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
payload
public TypedIOPort payload
- Input port that receives the payload to be transmitted.
output
public TypedIOPort output
- Output port that output the received payload. This has the same type as
the payload port.
properties
public TypedIOPort properties
- Input port that receives the properties to be used for transmission
on the connected wireless output port. The type of this port
is a record type.
SetProperties
public SetProperties(CompositeEntity container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
- Construct an actor with the specified container and name.
- Parameters:
container
- The container.name
- The name.
- Throws:
IllegalActionException
- If the entity cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Clone the actor into the specified workspace. This calls the
base class and then resets the type constraints.
- Overrides:
clone
in class AtomicActor
- Parameters:
workspace
- The workspace for the new object.
- Returns:
- A new actor.
- Throws:
java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.- See Also:
NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
fire
public void fire()
throws IllegalActionException
- reads one token from the payload input port, and simply output
the token on the output port. If there is token at the properties
input port, read the properties value and use it to set the
outsideTransmitProperties of the connected wireless output port.
- Specified by:
fire
in interface Executable
- Overrides:
fire
in class AtomicActor
- Throws:
IllegalActionException
- If the specified port is not
an instance of WirelessIOPort, or if there is no such port.