Class DataPump
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity<T>
-
- ptolemy.actor.AtomicActor<TypedIOPort>
-
- ptolemy.actor.TypedAtomicActor
-
- ptolemy.domains.wireless.lib.network.NetworkActorBase
-
- ptolemy.domains.wireless.lib.network.mac.MACActorBase
-
- ptolemy.domains.wireless.lib.network.mac.DataPump
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class DataPump extends MACActorBase
This actor works in the Transmission block in IEEE 802.11 Mac. For every TxRequest from the Protocol_Control block, this actor sends a PhyTxStart request to the physical layer. Upon receiving the PhyTxStart confirmation, it sends data to the physical layer. After the data has been sent, it sends PhyTxEnd request to the physical layer and sends TxConfirm to the source of the original TxRequest after receiving PhyTxEnd confirmation from the physical layer.Both TxCoordination and RxCoordination in the Protocol_Control can send TxRequest and require TxConfirm. This actor uses a pair of input and output ports to tell the source of the TxRequest and the destination of the TxConfirm.
- Since:
- Ptolemy II 4.0
- Version:
- DataPump.java,v 1.18 2004/04/22 19:46:18 ellen_zh Exp
- Author:
- Yang Zhao, Charlie Zhong and Xiaojun Liu
- Pt.AcceptedRating:
- Red (pjb2e)
- Pt.ProposedRating:
- Red (ellen_zh)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.domains.wireless.lib.network.NetworkActorBase
NetworkActorBase.Timer
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description TypedIOPort
fromReception
The input port for the channel status massage from the reception block.TypedIOPort
PHYLayerConfirm
The input port for transmission conformation from the physical layer, including transmission start confirmation, transmitting data confirmation and transmission end confirmation.TypedIOPort
RXTXConfirm
The output port for transmission confirmation to the Protocol_Control Rx_Coordination block.TypedIOPort
RXTXRequest
The input port for transmission request from the Protocol_Control Rx_Coordination block.TypedIOPort
toBackoff
The output port sending the the channel status to the Backoff block.TypedIOPort
toPHYLayer
The output port that send transmission request to the physical layer, including transmission start request, transmitting data request and transmission end request.TypedIOPort
TXTXConfirm
The output port for transmission confirmation to the Protocol_Control Tx_Coordination block.TypedIOPort
TXTXRequest
The input port for transmission request from the Protocol_Control Tx_Coordination block.-
Fields inherited from class ptolemy.domains.wireless.lib.network.mac.MACActorBase
_aCWmax, _aCWmin, _aPlcpHeaderLength, _aPreambleLength, _aRxPlcpDelay, _aRxRfDelay, _aRxTxTurnaroundTime, _aSifsTime, _aSlotTime, _dot11LongRetryLimit, _dot11ShortRetryLimit, _dotllRTSThreshold, _mBkIP, _mBrate, _sAckCtsLng, _tNavEnd, aCWmax, aCWmin, aPlcpHeaderLength, aPreambleLength, aRxPlcpDelay, aRxRfDelay, aRxTxTurnaroundTime, aSifsTime, aSlotTime, Backoff, BackoffDoneMsgFields, BkDone, Cancel, ClearNav, ControlCh, ControlType, CSMsgFields, DataCh, DataType, dot11LongRetryLimit, dot11ShortRetryLimit, dotllRTSThreshold, getBackoffMsgFields, GotAckMsg, GotCts, GotCtsMsgFields, mac_broadcast_addr, mBrate, misc, NeedAck, NeedAckMessageFields, nosrc, PCcheck, PCmax, PCmin, PCremove, PCremove2, PCrequest, PCresponse, PduRequest, RtsTimeout, RtsTimeoutMsgFields, RxIndicate, RxIndicateMessageFields, RxMpdu, RxMpduMsgFields, sAckCtsLng, SetNav, SetNavMessageFields, Slot, startRsp, TxConfirm, TxConfirmMsgFields, TxDataMsgFields, TxRequest, TxRequestMsgFields, TxStartMsgFields, UseDifs, UseEifs, UseIfsMsgFields
-
Fields inherited from class ptolemy.domains.wireless.lib.network.NetworkActorBase
_timersSet, Ack, AckPacket, appl_data_msg, appl_interest_msg, Busy, cNetwDataMessageFields, cNetwInterestMessageFields, Cts, Data, DataPacket, Error, Gilbert, Idle, netw_data_msg, netw_interest_msg, NoError, PCRequestMsgFields, PCResponseMsgFields, Rts, RtsPacket, RxData, Rxdelay, RxEnd, RxStart, StartRspMsgFields, Timeout, Turnaround, TxData, TxEnd, TxStart, TxStartConfirm, UNKNOWN
-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description DataPump(CompositeEntity container, java.lang.String name)
Construct an actor with the specified name and container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Clone the object into the specified workspace.void
declareDelayDependency()
Override the base class to declare that the TXTXConfirm and RXTXConfirm output ports do not depend on the TXTXRequest and RXTXRequest in a firing.void
fire()
The main functionvoid
initialize()
Initialize the private variables.-
Methods inherited from class ptolemy.domains.wireless.lib.network.mac.MACActorBase
_setAttribute, attributeChanged, getID
-
Methods inherited from class ptolemy.domains.wireless.lib.network.NetworkActorBase
cancelTimer, setTimer, whoTimeout
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, 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
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
TXTXRequest
public TypedIOPort TXTXRequest
The input port for transmission request from the Protocol_Control Tx_Coordination block.
-
RXTXRequest
public TypedIOPort RXTXRequest
The input port for transmission request from the Protocol_Control Rx_Coordination block.
-
fromReception
public TypedIOPort fromReception
The input port for the channel status massage from the reception block.
-
PHYLayerConfirm
public TypedIOPort PHYLayerConfirm
The input port for transmission conformation from the physical layer, including transmission start confirmation, transmitting data confirmation and transmission end confirmation.
-
TXTXConfirm
public TypedIOPort TXTXConfirm
The output port for transmission confirmation to the Protocol_Control Tx_Coordination block.
-
RXTXConfirm
public TypedIOPort RXTXConfirm
The output port for transmission confirmation to the Protocol_Control Rx_Coordination block.
-
toPHYLayer
public TypedIOPort toPHYLayer
The output port that send transmission request to the physical layer, including transmission start request, transmitting data request and transmission end request.
-
toBackoff
public TypedIOPort toBackoff
The output port sending the the channel status to the Backoff block.
-
-
Constructor Detail
-
DataPump
public DataPump(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct an actor with the specified name and container. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. This constructor write-synchronizes on the workspace.- Parameters:
container
- The container.name
- The name of the actor.- Throws:
IllegalActionException
- If the container is incompatible with this actor.NameDuplicationException
- If the name coincides with an actor already in the container.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the object into the specified workspace. The new object is not added to the directory of that workspace (you must do this yourself if you want it there). The result is an object with no container.- Overrides:
clone
in classTypedAtomicActor
- Parameters:
workspace
- The workspace for the cloned object.- Returns:
- The new Attribute.
- Throws:
java.lang.CloneNotSupportedException
- Not thrown in this base class- See Also:
NamedObj.exportMoML(Writer, int, String)
,NamedObj.setDeferringChangeRequests(boolean)
-
declareDelayDependency
public void declareDelayDependency() throws IllegalActionException
Override the base class to declare that the TXTXConfirm and RXTXConfirm output ports do not depend on the TXTXRequest and RXTXRequest in a firing.- Overrides:
declareDelayDependency
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If the causality interface cannot be computed.- See Also:
AtomicActor.getCausalityInterface()
,AtomicActor._declareDelayDependency(IOPort, IOPort, double)
-
fire
public void fire() throws IllegalActionException
The main function- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If an error occurs reading or writing inputs or outputs.
-
initialize
public void initialize() throws IllegalActionException
Initialize the private variables.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classNetworkActorBase
- Throws:
IllegalActionException
- If thrown by the base class.
-
-