Class MACActorBase
- 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
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
Backoff
,ChannelState
,DataPump
,FilterMpdu
,RxCoordination
,TxCoordination
,ValidateMpdu
public class MACActorBase extends NetworkActorBase
This is a base class designed for the MAC actors. Since these actors largely share a set of parameters, we would like to declare them here to avoid repeatly do the same amount of work in every MAC actor. FIXME: Currently, the parameters in this actor are extracted from the ChannelState component... This actor also defines a set of constant that are widely used in the OMNET c++ classes. Based on this, it is relatively easy to translate a OMNET class to a actor here.- Since:
- Ptolemy II 4.0
- Version:
- MACActorBase.java,v 1.22 2004/04/22 19:46:17 ellen_zh Exp
- Author:
- Yang Zhao
- Pt.AcceptedRating:
- Red (pjb2e)
- Pt.ProposedRating:
- Yellow (eal)
-
-
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 protected int
_aCWmax
protected int
_aCWmin
protected int
_aPlcpHeaderLength
protected int
_aPreambleLength
protected int
_aRxPlcpDelay
protected int
_aRxRfDelay
protected int
_aRxTxTurnaroundTime
protected int
_aSifsTime
protected int
_aSlotTime
protected int
_dot11LongRetryLimit
protected int
_dot11ShortRetryLimit
protected int
_dotllRTSThreshold
protected Attribute
_mBkIP
The flag indicating whether backoff is in progress.protected int
_mBrate
protected int
_sAckCtsLng
protected Attribute
_tNavEnd
The time that NAV ends or reservation ends.Parameter
aCWmax
The maximum size of the contention window, in units of aSlotTime.Parameter
aCWmin
The minimum size of the contention window, in units of aSlotTime.Parameter
aPlcpHeaderLength
The size of the PLCP header in a frame.Parameter
aPreambleLength
The size of the Preamble header in a frame.Parameter
aRxPlcpDelay
The nominal time that the PLCP uses to deliver a bit from the PMD receive path to the MAC.Parameter
aRxRfDelay
The nominal time between the end of a symbol at the air interface to the issuance of a PMD-DATA.indicate to the PLCP.Parameter
aRxTxTurnaroundTime
Time needed for a transceiver to go from receiving to transmittingParameter
aSifsTime
The parameter for SIFS (Short Inter Frame Space).Parameter
aSlotTime
The time unit for the backoff timeprotected static int
Backoff
protected static java.lang.String[]
BackoffDoneMsgFields
protected static int
BkDone
protected static int
Cancel
protected static int
ClearNav
protected static int
ControlCh
protected static int
ControlType
protected static java.lang.String[]
CSMsgFields
protected static int
DataCh
protected static int
DataType
Parameter
dot11LongRetryLimit
The maximum number of retransmissions for RTSParameter
dot11ShortRetryLimit
The maximum number of retransmissions for MPDUsParameter
dotllRTSThreshold
The threshold for the length of a MPDU, below which a RTS is not necessary.protected static java.lang.String[]
getBackoffMsgFields
protected static int
GotAckMsg
protected static int
GotCts
protected static java.lang.String[]
GotCtsMsgFields
static int
mac_broadcast_addr
Parameter
mBrate
The radio data rate in the unit of Mbpsprotected static int
misc
protected static int
NeedAck
protected static java.lang.String[]
NeedAckMessageFields
protected static int
nosrc
protected static int
PCcheck
protected static int
PCmax
protected static int
PCmin
protected static int
PCremove
protected static int
PCremove2
protected static int
PCrequest
protected static int
PCresponse
protected static int
PduRequest
protected static int
RtsTimeout
protected static java.lang.String[]
RtsTimeoutMsgFields
protected static int
RxIndicate
protected static java.lang.String[]
RxIndicateMessageFields
protected static int
RxMpdu
protected static java.lang.String[]
RxMpduMsgFields
Parameter
sAckCtsLng
The size of a CTS/Ack messageprotected static int
SetNav
protected static java.lang.String[]
SetNavMessageFields
protected static int
Slot
protected static int
startRsp
protected static int
TxConfirm
protected static java.lang.String[]
TxConfirmMsgFields
protected static java.lang.String[]
TxDataMsgFields
protected static int
TxRequest
protected static java.lang.String[]
TxRequestMsgFields
protected static java.lang.String[]
TxStartMsgFields
protected static int
UseDifs
protected static int
UseEifs
protected static java.lang.String[]
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 MACActorBase(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 protected void
_setAttribute(Attribute attribute, Token token)
void
attributeChanged(Attribute attribute)
If the specified attribute is changed, check that a positive number is given.protected int
getID()
Check whether this has a id attribute.-
Methods inherited from class ptolemy.domains.wireless.lib.network.NetworkActorBase
cancelTimer, initialize, setTimer, whoTimeout
-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, fire, 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
fire, 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
-
aSifsTime
public Parameter aSifsTime
The parameter for SIFS (Short Inter Frame Space). This time is used to separate transmissions belong to a single dialog. This Value is fixed per PHY and is calculated base on the time that takes for the transmitting part to switch back to receive mode.
-
aPreambleLength
public Parameter aPreambleLength
The size of the Preamble header in a frame. The Preamble header contains synchronization information and timing information for the frame.
-
aPlcpHeaderLength
public Parameter aPlcpHeaderLength
The size of the PLCP header in a frame. The PLCP header contains logical information for the physical layer to decode the frame.
-
aRxTxTurnaroundTime
public Parameter aRxTxTurnaroundTime
Time needed for a transceiver to go from receiving to transmitting
-
sAckCtsLng
public Parameter sAckCtsLng
The size of a CTS/Ack message
-
mBrate
public Parameter mBrate
The radio data rate in the unit of Mbps
-
aSlotTime
public Parameter aSlotTime
The time unit for the backoff time
-
aRxRfDelay
public Parameter aRxRfDelay
The nominal time between the end of a symbol at the air interface to the issuance of a PMD-DATA.indicate to the PLCP.
-
aRxPlcpDelay
public Parameter aRxPlcpDelay
The nominal time that the PLCP uses to deliver a bit from the PMD receive path to the MAC.
-
aCWmin
public Parameter aCWmin
The minimum size of the contention window, in units of aSlotTime.
-
aCWmax
public Parameter aCWmax
The maximum size of the contention window, in units of aSlotTime.
-
dot11ShortRetryLimit
public Parameter dot11ShortRetryLimit
The maximum number of retransmissions for MPDUs
-
dot11LongRetryLimit
public Parameter dot11LongRetryLimit
The maximum number of retransmissions for RTS
-
dotllRTSThreshold
public Parameter dotllRTSThreshold
The threshold for the length of a MPDU, below which a RTS is not necessary.
-
mac_broadcast_addr
public static final int mac_broadcast_addr
- See Also:
- Constant Field Values
-
_aSifsTime
protected int _aSifsTime
-
_aPreambleLength
protected int _aPreambleLength
-
_aPlcpHeaderLength
protected int _aPlcpHeaderLength
-
_aRxTxTurnaroundTime
protected int _aRxTxTurnaroundTime
-
_sAckCtsLng
protected int _sAckCtsLng
-
_mBrate
protected int _mBrate
-
_aSlotTime
protected int _aSlotTime
-
_aRxRfDelay
protected int _aRxRfDelay
-
_aRxPlcpDelay
protected int _aRxPlcpDelay
-
_aCWmin
protected int _aCWmin
-
_aCWmax
protected int _aCWmax
-
_dot11ShortRetryLimit
protected int _dot11ShortRetryLimit
-
_dot11LongRetryLimit
protected int _dot11LongRetryLimit
-
_dotllRTSThreshold
protected int _dotllRTSThreshold
-
_tNavEnd
protected Attribute _tNavEnd
The time that NAV ends or reservation ends.
-
_mBkIP
protected Attribute _mBkIP
The flag indicating whether backoff is in progress.
-
TxStartMsgFields
protected static final java.lang.String[] TxStartMsgFields
-
TxDataMsgFields
protected static final java.lang.String[] TxDataMsgFields
-
RtsTimeoutMsgFields
protected static final java.lang.String[] RtsTimeoutMsgFields
-
RxMpduMsgFields
protected static final java.lang.String[] RxMpduMsgFields
-
UseIfsMsgFields
protected static final java.lang.String[] UseIfsMsgFields
-
RxIndicateMessageFields
protected static final java.lang.String[] RxIndicateMessageFields
-
NeedAckMessageFields
protected static final java.lang.String[] NeedAckMessageFields
-
SetNavMessageFields
protected static final java.lang.String[] SetNavMessageFields
-
CSMsgFields
protected static final java.lang.String[] CSMsgFields
-
TxRequestMsgFields
protected static final java.lang.String[] TxRequestMsgFields
-
TxConfirmMsgFields
protected static final java.lang.String[] TxConfirmMsgFields
-
BackoffDoneMsgFields
protected static final java.lang.String[] BackoffDoneMsgFields
-
getBackoffMsgFields
protected static final java.lang.String[] getBackoffMsgFields
-
GotCtsMsgFields
protected static final java.lang.String[] GotCtsMsgFields
-
NeedAck
protected static final int NeedAck
- See Also:
- Constant Field Values
-
RxIndicate
protected static final int RxIndicate
- See Also:
- Constant Field Values
-
TxConfirm
protected static final int TxConfirm
- See Also:
- Constant Field Values
-
PduRequest
protected static final int PduRequest
- See Also:
- Constant Field Values
-
BkDone
protected static final int BkDone
- See Also:
- Constant Field Values
-
Backoff
protected static final int Backoff
- See Also:
- Constant Field Values
-
Slot
protected static final int Slot
- See Also:
- Constant Field Values
-
Cancel
protected static final int Cancel
- See Also:
- Constant Field Values
-
TxRequest
protected static final int TxRequest
- See Also:
- Constant Field Values
-
UseEifs
protected static final int UseEifs
- See Also:
- Constant Field Values
-
UseDifs
protected static final int UseDifs
- See Also:
- Constant Field Values
-
SetNav
protected static final int SetNav
- See Also:
- Constant Field Values
-
ClearNav
protected static final int ClearNav
- See Also:
- Constant Field Values
-
RtsTimeout
protected static final int RtsTimeout
- See Also:
- Constant Field Values
-
nosrc
protected static final int nosrc
- See Also:
- Constant Field Values
-
misc
protected static final int misc
- See Also:
- Constant Field Values
-
RxMpdu
protected static final int RxMpdu
- See Also:
- Constant Field Values
-
startRsp
protected static final int startRsp
- See Also:
- Constant Field Values
-
PCresponse
protected static final int PCresponse
- See Also:
- Constant Field Values
-
PCrequest
protected static final int PCrequest
- See Also:
- Constant Field Values
-
PCcheck
protected static final int PCcheck
- See Also:
- Constant Field Values
-
PCremove
protected static final int PCremove
- See Also:
- Constant Field Values
-
PCremove2
protected static final int PCremove2
- See Also:
- Constant Field Values
-
PCmax
protected static final int PCmax
- See Also:
- Constant Field Values
-
PCmin
protected static final int PCmin
- See Also:
- Constant Field Values
-
ControlType
protected static final int ControlType
- See Also:
- Constant Field Values
-
DataType
protected static final int DataType
- See Also:
- Constant Field Values
-
GotAckMsg
protected static final int GotAckMsg
- See Also:
- Constant Field Values
-
GotCts
protected static final int GotCts
- See Also:
- Constant Field Values
-
ControlCh
protected static final int ControlCh
- See Also:
- Constant Field Values
-
DataCh
protected static final int DataCh
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MACActorBase
public MACActorBase(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
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
If the specified attribute is changed, check that a positive number is given. Otherwise, defer to the base class.- Overrides:
attributeChanged
in classNamedObj
- Parameters:
attribute
- The attribute that changed.- Throws:
IllegalActionException
- If the change is not acceptable to this container.
-
getID
protected int getID()
Check whether this has a id attribute. If yes, return the value of it; if no, return the default value -2.- Returns:
- return the value of the id attribute of -2 if no such an attribute.
-
_setAttribute
protected void _setAttribute(Attribute attribute, Token token) throws IllegalActionException
- Throws:
IllegalActionException
-
-