Class ChannelState
- 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.ChannelState
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class ChannelState extends MACActorBase
This actor updates the channel state based on the information from PHY and NAV (Network Allocation Vector). To speed up simulation, slot events in 802.11 are not generated here.- Since:
- Ptolemy II 4.0
- Version:
- ChannelState.java,v 1.21 2004/04/22 19:46:18 ellen_zh Exp
- Author:
- Yang Zhao
- 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
channelStatus
The input port for channel status message from the physical layer.TypedIOPort
fromFilterMpdu
The input port for setNav message from FilterMpdu.TypedIOPort
fromValidateMpdu
The input port for messages from ValidateMpdu process.TypedIOPort
toTransmission
The output port that produces messages that indicate the channel status.-
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 ChannelState(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
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, declareDelayDependency, 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
-
channelStatus
public TypedIOPort channelStatus
The input port for channel status message from the physical layer. This has undeclared type.
-
fromValidateMpdu
public TypedIOPort fromValidateMpdu
The input port for messages from ValidateMpdu process. Two types of messages: UseIfs and RtsTimeout
-
fromFilterMpdu
public TypedIOPort fromFilterMpdu
The input port for setNav message from FilterMpdu.
-
toTransmission
public TypedIOPort toTransmission
The output port that produces messages that indicate the channel status.
-
-
Constructor Detail
-
ChannelState
public ChannelState(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)
-
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.
-
-