INET Framework for OMNeT++/OMNEST
|
A simplified version of EtherMAC. More...
#include <EtherMACFullDuplex.h>
Public Member Functions | |
EtherMACFullDuplex () | |
Public Member Functions inherited from inet::EtherMACBase | |
EtherMACBase () | |
virtual | ~EtherMACBase () |
virtual MACAddress | getMACAddress () |
double | getTxRate () |
bool | isActive () |
MACTransmitState | getTransmitState () |
MACReceiveState | getReceiveState () |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
Public Member Functions inherited from inet::MACBase | |
MACBase () | |
virtual | ~MACBase () |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Member Functions | |
virtual int | numInitStages () const override |
virtual void | initialize (int stage) override |
virtual void | initializeStatistics () override |
virtual void | initializeFlags () override |
virtual void | handleMessage (cMessage *msg) override |
virtual void | finish () override |
virtual void | handleEndIFGPeriod () |
virtual void | handleEndTxPeriod () |
virtual void | handleEndPausePeriod () |
virtual void | handleSelfMessage (cMessage *msg) |
virtual void | startFrameTransmission () |
virtual void | processFrameFromUpperLayer (EtherFrame *frame) |
virtual void | processMsgFromNetwork (cPacket *pk) |
virtual void | processReceivedDataFrame (EtherFrame *frame) |
virtual void | processPauseCommand (int pauseUnits) |
virtual void | scheduleEndIFGPeriod () |
virtual void | scheduleEndPausePeriod (int pauseUnits) |
virtual void | beginSendFrames () |
Protected Member Functions inherited from inet::EtherMACBase | |
virtual void | initializeMACAddress () |
virtual void | initializeQueueModule () |
virtual bool | dropFrameNotForUs (EtherFrame *frame) |
Checks destination address and drops the frame when frame is not for us; returns true if frame is dropped. More... | |
virtual void | readChannelParameters (bool errorWhenAsymmetric) |
Calculates datarates, etc. More... | |
virtual void | printParameters () |
virtual void | getNextFrameFromQueue () |
virtual void | requestNextFrameFromExtQueue () |
virtual void | processConnectDisconnect () |
virtual EtherPhyFrame * | encapsulate (EtherFrame *phyFrame) |
virtual EtherFrame * | decapsulate (EtherPhyFrame *phyFrame) |
virtual InterfaceEntry * | createInterfaceEntry () override |
should create InterfaceEntry More... | |
virtual void | flushQueue () override |
should clear queue and emit signal "dropPkFromHLIfaceDown" with entire packets More... | |
virtual void | clearQueue () override |
should clear queue silently More... | |
virtual bool | isUpperMsg (cMessage *msg) override |
should return true if the msg arrived from upper layer, else return false More... | |
virtual void | refreshDisplay () const override |
virtual void | receiveSignal (cComponent *src, simsignal_t signalId, cObject *obj, cObject *details) override |
virtual void | refreshConnection () |
Protected Member Functions inherited from inet::MACBase | |
void | registerInterface () |
virtual void | updateOperationalFlag (bool isNodeUp) |
virtual bool | isNodeUp () |
virtual void | handleMessageWhenDown (cMessage *msg) |
Protected Attributes | |
simtime_t | totalSuccessfulRxTime |
Protected Attributes inherited from inet::EtherMACBase | |
const EtherDescr * | curEtherDescr = nullptr |
MACAddress | address |
bool | connected = false |
bool | disabled = false |
bool | promiscuous = false |
bool | duplexMode = false |
bool | frameBursting = false |
MacQueue | txQueue |
cChannel * | transmissionChannel = nullptr |
cGate * | physInGate = nullptr |
cGate * | physOutGate = nullptr |
cGate * | upperLayerInGate = nullptr |
bool | channelsDiffer = false |
MACTransmitState | transmitState = (MACTransmitState)-1 |
MACReceiveState | receiveState = (MACReceiveState)-1 |
simtime_t | lastTxFinishTime |
int | pauseUnitsRequested = 0 |
EtherFrame * | curTxFrame = nullptr |
cMessage * | endTxMsg = nullptr |
cMessage * | endIFGMsg = nullptr |
cMessage * | endPauseMsg = nullptr |
unsigned long | numFramesSent = 0 |
unsigned long | numFramesReceivedOK = 0 |
unsigned long | numBytesSent = 0 |
unsigned long | numBytesReceivedOK = 0 |
unsigned long | numFramesFromHL = 0 |
unsigned long | numDroppedPkFromHLIfaceDown = 0 |
unsigned long | numDroppedIfaceDown = 0 |
unsigned long | numDroppedBitError = 0 |
unsigned long | numDroppedNotForUs = 0 |
unsigned long | numFramesPassedToHL = 0 |
unsigned long | numPauseFramesRcvd = 0 |
unsigned long | numPauseFramesSent = 0 |
Protected Attributes inherited from inet::MACBase | |
cModule * | hostModule = nullptr |
bool | isOperational = false |
InterfaceEntry * | interfaceEntry = nullptr |
Additional Inherited Members | |
Public Types inherited from inet::EtherMACBase | |
enum | MACTransmitState { TX_IDLE_STATE = 1, WAIT_IFG_STATE, SEND_IFG_STATE, TRANSMITTING_STATE, JAMMING_STATE, BACKOFF_STATE, PAUSE_STATE } |
enum | MACReceiveState { RX_IDLE_STATE = 1, RECEIVING_STATE, RX_COLLISION_STATE, RX_RECONNECT_STATE } |
Static Public Attributes inherited from inet::EtherMACBase | |
static const double | SPEED_OF_LIGHT_IN_CABLE = 200000000.0 |
static simsignal_t | dropPkIfaceDownSignal = registerSignal("dropPkIfaceDown") |
static simsignal_t | dropPkFromHLIfaceDownSignal = registerSignal("dropPkFromHLIfaceDown") |
Protected Types inherited from inet::EtherMACBase | |
enum | SelfMsgKindValues { ENDIFG = 100, ENDRECEPTION, ENDBACKOFF, ENDTRANSMISSION, ENDJAMMING, ENDPAUSE } |
enum | { NUM_OF_ETHERDESCRS = 6 } |
Static Protected Attributes inherited from inet::EtherMACBase | |
static const EtherDescr | etherDescrs [NUM_OF_ETHERDESCRS] |
static const EtherDescr | nullEtherDescr |
static simsignal_t | txPkSignal = registerSignal("txPk") |
static simsignal_t | rxPkOkSignal = registerSignal("rxPkOk") |
static simsignal_t | txPausePkUnitsSignal = registerSignal("txPausePkUnits") |
static simsignal_t | rxPausePkUnitsSignal = registerSignal("rxPausePkUnits") |
static simsignal_t | rxPkFromHLSignal = registerSignal("rxPkFromHL") |
static simsignal_t | dropPkNotForUsSignal = registerSignal("dropPkNotForUs") |
static simsignal_t | dropPkBitErrorSignal = registerSignal("dropPkBitError") |
static simsignal_t | packetSentToLowerSignal = registerSignal("packetSentToLower") |
static simsignal_t | packetReceivedFromLowerSignal = registerSignal("packetReceivedFromLower") |
static simsignal_t | packetSentToUpperSignal = registerSignal("packetSentToUpper") |
static simsignal_t | packetReceivedFromUpperSignal = registerSignal("packetReceivedFromUpper") |
static simsignal_t | transmitStateSignal = registerSignal("transmitState") |
static simsignal_t | receiveStateSignal = registerSignal("receiveState") |
A simplified version of EtherMAC.
Since modern Ethernets typically operate over duplex links where's no contention, the original CSMA/CD algorithm is no longer needed. This simplified implementation doesn't contain CSMA/CD, frames are just simply queued up and sent out one by one.
|
protectedvirtual |
Referenced by handleEndIFGPeriod(), handleEndPausePeriod(), and initialize().
|
overrideprotectedvirtual |
Reimplemented from inet::EtherMACBase.
|
protectedvirtual |
Referenced by handleSelfMessage().
|
protectedvirtual |
Referenced by handleSelfMessage().
|
protectedvirtual |
Referenced by handleSelfMessage().
|
overrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage().
|
overrideprotectedvirtual |
Reimplemented from inet::EtherMACBase.
|
overrideprotectedvirtual |
Reimplemented from inet::EtherMACBase.
|
overrideprotectedvirtual |
Reimplemented from inet::EtherMACBase.
|
inlineoverrideprotectedvirtual |
Reimplemented from inet::EtherMACBase.
|
protectedvirtual |
Referenced by handleMessage().
|
protectedvirtual |
Referenced by handleMessage().
|
protectedvirtual |
Referenced by processMsgFromNetwork().
|
protectedvirtual |
Referenced by processMsgFromNetwork().
|
protectedvirtual |
Referenced by handleEndTxPeriod().
|
protectedvirtual |
Referenced by handleEndTxPeriod(), and processPauseCommand().
|
protectedvirtual |
Referenced by beginSendFrames(), and processFrameFromUpperLayer().
|
protected |
Referenced by finish(), initializeStatistics(), and processMsgFromNetwork().