|
INET Framework for OMNeT++/OMNEST
|
Base class for Ethernet MAC implementations.
More...
#include <EthernetMacBase.h>
Base class for Ethernet MAC implementations.
◆ anonymous enum
| Enumerator |
|---|
| NUM_OF_ETHERDESCRS | |
◆ MacReceiveState
| Enumerator |
|---|
| RX_IDLE_STATE | |
| RECEIVING_STATE | |
| RX_COLLISION_STATE | |
| RX_RECONNECT_STATE | |
◆ MacTransmitState
| Enumerator |
|---|
| TX_IDLE_STATE | |
| WAIT_IFG_STATE | |
| SEND_IFG_STATE | |
| TRANSMITTING_STATE | |
| JAMMING_STATE | |
| BACKOFF_STATE | |
| PAUSE_STATE | |
◆ SelfMsgKindValues
| Enumerator |
|---|
| ENDIFG | |
| ENDRECEPTION | |
| ENDBACKOFF | |
| ENDTRANSMISSION | |
| ENDJAMMING | |
| ENDPAUSE | |
◆ EthernetMacBase()
| inet::EthernetMacBase::EthernetMacBase |
( |
| ) |
|
◆ ~EthernetMacBase()
| inet::EthernetMacBase::~EthernetMacBase |
( |
| ) |
|
|
virtual |
◆ addPaddingAndSetFcs()
Inserts padding in front of FCS and calculate FCS.
666 B paddingLength = requiredMinBytes -
ETHER_FCS_BYTES -
B(packet->getByteLength());
667 if (paddingLength >
B(0)) {
668 const auto& ethPadding = makeShared<EthernetPadding>();
669 ethPadding->setChunkLength(paddingLength);
670 packet->insertAtBack(ethPadding);
673 switch (ethFcs->getFcsMode()) {
675 ethFcs->setFcs(0xC00DC00DL);
678 ethFcs->setFcs(0xBAADBAADL);
681 auto ethBytes = packet->peekDataAsBytes();
682 auto bufferLength =
B(ethBytes->getChunkLength()).get();
683 auto buffer =
new uint8_t[bufferLength];
685 ethBytes->copyToBuffer(buffer, bufferLength);
687 auto computedFcs =
ethernetCRC(buffer, bufferLength);
689 ethFcs->setFcs(computedFcs);
693 throw cRuntimeError(
"Unknown FCS mode: %d", (
int)(ethFcs->getFcsMode()));
696 packet->insertAtBack(ethFcs);
Referenced by inet::EthernetMac::handleUpperPacket(), and inet::EthernetCsmaMac::handleUpperPacket().
◆ changeReceptionState()
| void inet::EthernetMacBase::changeReceptionState |
( |
MacReceiveState |
newState | ) |
|
|
protected |
◆ changeTransmissionState()
| void inet::EthernetMacBase::changeTransmissionState |
( |
MacTransmitState |
newState | ) |
|
|
protected |
Referenced by inet::EthernetMac::beginSendFrames(), inet::EthernetCsmaMac::beginSendFrames(), inet::EthernetCsmaMac::fillIFGInBurst(), inet::EthernetCsmaMac::handleEndBackoffPeriod(), inet::EthernetMac::handleEndIFGPeriod(), inet::EthernetCsmaMac::handleEndIFGPeriod(), inet::EthernetMac::handleEndPausePeriod(), inet::EthernetCsmaMac::handleRetransmission(), processConnectDisconnect(), inet::EthernetMac::scheduleEndIFGPeriod(), inet::EthernetCsmaMac::scheduleEndIFGPeriod(), inet::EthernetMac::scheduleEndPausePeriod(), inet::EthernetCsmaMac::scheduleEndPausePeriod(), inet::EthernetCsmaMac::sendJamSignal(), inet::EthernetMac::startFrameTransmission(), and inet::EthernetCsmaMac::startFrameTransmission().
◆ configureNetworkInterface()
| void inet::EthernetMacBase::configureNetworkInterface |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ cutEthernetSignalEnd()
| void inet::EthernetMacBase::cutEthernetSignalEnd |
( |
EthernetSignalBase * |
signal, |
|
|
simtime_t |
duration |
|
) |
| |
|
protectedvirtual |
701 ASSERT(duration <= signal->getDuration());
702 if (duration == signal->getDuration())
704 int64_t newBitLength = duration.dbl() * signal->getBitrate();
705 if (
auto packet = check_and_cast_nullable<Packet *>(signal->decapsulate())) {
707 if (newBitLength < packet->getBitLength()) {
709 packet->setBackOffset(
B(newBitLength / 8));
711 packet->setBitError(
true);
713 signal->encapsulate(packet);
715 signal->setBitError(
true);
716 signal->setBitLength(newBitLength);
717 signal->setDuration(duration);
Referenced by inet::EthernetCsmaMac::sendJamSignal().
◆ decapsulate()
| void inet::EthernetMacBase::decapsulate |
( |
Packet * |
packet | ) |
|
|
protectedvirtual |
◆ dropFrameNotForUs()
◆ encapsulate()
| void inet::EthernetMacBase::encapsulate |
( |
Packet * |
packet | ) |
|
|
protectedvirtual |
◆ finish()
| void inet::EthernetMacBase::finish |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ getMacAddress()
| virtual MacAddress inet::EthernetMacBase::getMacAddress |
( |
| ) |
|
|
inlinevirtual |
◆ getProvider()
Returns the passive packet source from where packets are pulled or nullptr if the connected module doesn't implement the interface.
The gate parameter must be a valid gate of this module.
Implements inet::queueing::IActivePacketSink.
◆ getReceiveState()
◆ getTransmitState()
◆ getTxRate()
| double inet::EthernetMacBase::getTxRate |
( |
| ) |
|
|
inline |
◆ handleCrashOperation()
◆ handlePullPacketProcessed()
| void inet::EthernetMacBase::handlePullPacketProcessed |
( |
Packet * |
packet, |
|
|
cGate * |
gate, |
|
|
bool |
successful |
|
) |
| |
|
overridevirtual |
Notifies about the completion of the packet processing for a packet that was pulled earlier independently whether the packet is passed or streamed.
This method is called, for example, when a previously pulled packet is failed to be processed successfully. It allows the sink to retry the operation.
The gate parameter must be a valid gate of this module. The packet must not be nullptr.
Implements inet::queueing::IActivePacketSink.
735 throw cRuntimeError(
"Not supported callback");
◆ handleStartOperation()
◆ handleStopOperation()
◆ initialize()
| void inet::EthernetMacBase::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
◆ initializeFlags()
| void inet::EthernetMacBase::initializeFlags |
( |
| ) |
|
|
protectedvirtual |
◆ initializeStatistics()
| void inet::EthernetMacBase::initializeStatistics |
( |
| ) |
|
|
protectedvirtual |
◆ isActive()
| bool inet::EthernetMacBase::isActive |
( |
| ) |
|
|
inline |
◆ numInitStages()
| virtual int inet::EthernetMacBase::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ printParameters()
| void inet::EthernetMacBase::printParameters |
( |
| ) |
|
|
protectedvirtual |
558 << (
duplexMode ?
"full-duplex" :
"half-duplex") << endl
560 <<
"frameBursting: " << (
frameBursting ?
"on" :
"off") << endl
◆ processAtHandleMessageFinished()
| void inet::EthernetMacBase::processAtHandleMessageFinished |
( |
| ) |
|
|
virtual |
◆ processConnectDisconnect()
| void inet::EthernetMacBase::processConnectDisconnect |
( |
| ) |
|
|
protectedvirtual |
◆ readChannelParameters()
| void inet::EthernetMacBase::readChannelParameters |
( |
bool |
errorWhenAsymmetric | ) |
|
|
protectedvirtual |
Calculates datarates, etc.
Verifies the datarates on the incoming/outgoing channels, and throws error when they differ and the parameter errorWhenAsymmetric is true.
Reimplemented in inet::EthernetCsmaMac.
493 cDatarateChannel *outTrChannel = check_and_cast_nullable<cDatarateChannel *>(
physOutGate->findTransmissionChannel());
494 cDatarateChannel *inTrChannel = check_and_cast_nullable<cDatarateChannel *>(
physInGate->findIncomingTransmissionChannel());
498 if (
connected && ((!outTrChannel) || (!inTrChannel)))
499 throw cRuntimeError(
"Ethernet phys gate must be connected using a transmission channel");
501 double txRate = outTrChannel ? outTrChannel->getNominalDatarate() : 0.0;
502 double rxRate = inTrChannel ? inTrChannel->getNominalDatarate() : 0.0;
504 bool rxDisabled = !inTrChannel || inTrChannel->isDisabled();
505 bool txDisabled = !outTrChannel || outTrChannel->isDisabled();
507 if (errorWhenAsymmetric && (rxDisabled != txDisabled))
508 throw cRuntimeError(
"The enablements of the input/output channels differ (rx=%s vs tx=%s)", rxDisabled ?
"off" :
"on", txDisabled ?
"off" :
"on");
513 bool dataratesDiffer;
516 dataratesDiffer =
false;
526 outTrChannel->subscribe(POST_MODEL_CHANGE,
this);
528 dataratesDiffer = (txRate != rxRate);
533 if (errorWhenAsymmetric && dataratesDiffer)
534 throw cRuntimeError(
"The input/output datarates differ (rx=%g bps vs tx=%g bps)", rxRate, txRate);
539 if (txRate == etherDescr.txrate) {
548 throw cRuntimeError(
"Invalid transmission rate %g bps on channel %s at module %s",
Referenced by inet::EthernetMac::handleMessageWhenUp(), handleStartOperation(), inet::EthernetCsmaMac::readChannelParameters(), and refreshConnection().
◆ receiveSignal()
| void inet::EthernetMacBase::receiveSignal |
( |
cComponent * |
src, |
|
|
simsignal_t |
signalId, |
|
|
cObject * |
obj, |
|
|
cObject * |
details |
|
) |
| |
|
overrideprotectedvirtual |
Reimplemented from inet::MacProtocolBase.
326 Enter_Method(
"%s", cComponent::getSignalName(signalID));
330 if (signalID == POST_MODEL_CHANGE) {
331 if (
auto gcobj =
dynamic_cast<cPostPathCreateNotification *
>(obj)) {
335 else if (
auto gcobj =
dynamic_cast<cPostPathCutNotification *
>(obj)) {
340 cPostParameterChangeNotification *gcobj =
static_cast<cPostParameterChangeNotification *
>(obj);
◆ refreshConnection()
| void inet::EthernetMacBase::refreshConnection |
( |
| ) |
|
|
protectedvirtual |
◆ refreshDisplay()
| void inet::EthernetMacBase::refreshDisplay |
( |
| ) |
const |
|
overrideprotectedvirtual |
604 getDisplayString().setTagArg(
"i", 1, color);
606 if (!strcmp(getParentModule()->getNedTypeName(),
"inet.linklayer.ethernet.EthernetInterface"))
607 getParentModule()->getDisplayString().setTagArg(
"i", 1, color);
610 static std::string result;
622 result =
txQueue !=
nullptr ? std::to_string(
txQueue->getNumPackets()) :
"";
626 result =
"not connected";
628 char datarateText[40];
631 sprintf(datarateText,
"%gGbps", datarate / 1e9);
632 else if (datarate >= 1e6)
633 sprintf(datarateText,
"%gMbps", datarate / 1e6);
634 else if (datarate >= 1e3)
635 sprintf(datarateText,
"%gkbps", datarate / 1e3);
637 sprintf(datarateText,
"%gbps", datarate);
638 result = datarateText;
642 throw cRuntimeError(
"Unknown directive: %c", directive);
644 return result.c_str();
646 getDisplayString().setTagArg(
"t", 0, text);
◆ txFinished()
| void inet::EthernetMacBase::txFinished |
( |
| ) |
|
|
protectedvirtual |
◆ verifyCrcAndLength()
| bool inet::EthernetMacBase::verifyCrcAndLength |
( |
Packet * |
packet | ) |
|
|
protected |
Verify ethernet packet: check FCS and payload length.
399 auto ethHeader = packet->peekAtFront<EthernetMacHeader>();
400 const auto& ethTrailer = packet->peekAtBack<EthernetFcs>(
ETHER_FCS_BYTES);
402 switch (ethTrailer->getFcsMode()) {
406 EV_ERROR <<
"incorrect FCS in ethernet frame\n";
409 bool isFcsBad =
false;
411 auto ethBytes = packet->peekDataAt<BytesChunk>(
B(0), packet->getDataLength() - ethTrailer->getChunkLength());
412 auto bufferLength =
B(ethBytes->getChunkLength()).get();
413 auto buffer =
new uint8_t[bufferLength];
415 ethBytes->copyToBuffer(buffer, bufferLength);
417 auto computedFcs =
ethernetCRC(buffer, bufferLength);
419 isFcsBad = (computedFcs != ethTrailer->getFcs());
425 throw cRuntimeError(
"invalid FCS mode in ethernet frame");
428 b payloadLength =
B(ethHeader->getTypeOrLength());
430 return payloadLength <= packet->getDataLength() - (ethHeader->getChunkLength() + ethTrailer->getChunkLength());
Referenced by inet::EthernetCsmaMac::frameReceptionComplete(), and inet::EthernetMac::processMsgFromNetwork().
◆ channelsDiffer
| bool inet::EthernetMacBase::channelsDiffer = false |
|
protected |
◆ connected
| bool inet::EthernetMacBase::connected = false |
|
protected |
Referenced by handleCrashOperation(), inet::EthernetCsmaMac::handleSignalFromNetwork(), inet::EthernetMac::handleUpperPacket(), inet::EthernetCsmaMac::handleUpperPacket(), initialize(), initializeFlags(), processAtHandleMessageFinished(), inet::EthernetCsmaMac::processConnectDisconnect(), processConnectDisconnect(), inet::EthernetMac::processMsgFromNetwork(), inet::EthernetCsmaMac::readChannelParameters(), readChannelParameters(), and refreshConnection().
◆ curEtherDescr
| const EtherDescr* inet::EthernetMacBase::curEtherDescr = nullptr |
|
protected |
Referenced by inet::EthernetCsmaMac::calculateMinFrameLength(), inet::EthernetCsmaMac::canContinueBurst(), EthernetMacBase(), inet::EthernetCsmaMac::fillIFGInBurst(), inet::EthernetCsmaMac::handleRetransmission(), inet::EthernetCsmaMac::handleSignalFromNetwork(), printParameters(), inet::EthernetCsmaMac::processConnectDisconnect(), inet::EthernetCsmaMac::processMsgFromNetwork(), inet::EthernetCsmaMac::readChannelParameters(), readChannelParameters(), inet::EthernetMac::scheduleEndIFGPeriod(), inet::EthernetCsmaMac::scheduleEndIFGPeriod(), inet::EthernetMac::scheduleEndPausePeriod(), inet::EthernetCsmaMac::scheduleEndPausePeriod(), inet::EthernetCsmaMac::sendJamSignal(), inet::EthernetMac::startFrameTransmission(), and inet::EthernetCsmaMac::startFrameTransmission().
◆ curTxSignal
◆ displayStringTextFormat
| const char* inet::EthernetMacBase::displayStringTextFormat = nullptr |
|
protected |
◆ duplexMode
| bool inet::EthernetMacBase::duplexMode = false |
|
protected |
Referenced by inet::EthernetCsmaMac::calculateMinFrameLength(), finish(), inet::EthernetCsmaMac::frameReceptionComplete(), inet::EthernetCsmaMac::handleCanPullPacketChanged(), inet::EthernetCsmaMac::handleEndRxPeriod(), inet::EthernetCsmaMac::handleEndTxPeriod(), inet::EthernetCsmaMac::handleMessageWhenUp(), inet::EthernetCsmaMac::handleSignalFromNetwork(), inet::EthernetMac::initializeFlags(), inet::EthernetCsmaMac::initializeFlags(), initializeFlags(), printParameters(), inet::EthernetCsmaMac::processConnectDisconnect(), inet::EthernetMac::processMsgFromNetwork(), inet::EthernetCsmaMac::processMsgFromNetwork(), inet::EthernetCsmaMac::readChannelParameters(), inet::EthernetMac::startFrameTransmission(), and inet::EthernetCsmaMac::startFrameTransmission().
◆ endIfgTimer
| cMessage* inet::EthernetMacBase::endIfgTimer = nullptr |
|
protected |
◆ endPauseTimer
| cMessage* inet::EthernetMacBase::endPauseTimer = nullptr |
|
protected |
◆ endTxTimer
| cMessage* inet::EthernetMacBase::endTxTimer = nullptr |
|
protected |
◆ etherDescrs
◆ fcsMode
◆ frameBursting
| bool inet::EthernetMacBase::frameBursting = false |
|
protected |
◆ lastTxFinishTime
| simtime_t inet::EthernetMacBase::lastTxFinishTime |
|
protected |
◆ nullEtherDescr
◆ numBytesReceivedOK
| unsigned long inet::EthernetMacBase::numBytesReceivedOK = 0 |
|
protected |
◆ numBytesSent
| unsigned long inet::EthernetMacBase::numBytesSent = 0 |
|
protected |
◆ numDroppedBitError
| unsigned long inet::EthernetMacBase::numDroppedBitError = 0 |
|
protected |
◆ numDroppedIfaceDown
| unsigned long inet::EthernetMacBase::numDroppedIfaceDown = 0 |
|
protected |
◆ numDroppedNotForUs
| unsigned long inet::EthernetMacBase::numDroppedNotForUs = 0 |
|
protected |
◆ numDroppedPkFromHLIfaceDown
| unsigned long inet::EthernetMacBase::numDroppedPkFromHLIfaceDown = 0 |
|
protected |
◆ numFramesFromHL
| unsigned long inet::EthernetMacBase::numFramesFromHL = 0 |
|
protected |
◆ numFramesPassedToHL
| unsigned long inet::EthernetMacBase::numFramesPassedToHL = 0 |
|
protected |
◆ numFramesReceivedOK
| unsigned long inet::EthernetMacBase::numFramesReceivedOK = 0 |
|
protected |
◆ numFramesSent
| unsigned long inet::EthernetMacBase::numFramesSent = 0 |
|
protected |
◆ numPauseFramesRcvd
| unsigned long inet::EthernetMacBase::numPauseFramesRcvd = 0 |
|
protected |
◆ numPauseFramesSent
| unsigned long inet::EthernetMacBase::numPauseFramesSent = 0 |
|
protected |
◆ pauseUnitsRequested
| int inet::EthernetMacBase::pauseUnitsRequested = 0 |
|
protected |
◆ physInGate
| cGate* inet::EthernetMacBase::physInGate = nullptr |
|
protected |
◆ physOutGate
| cGate* inet::EthernetMacBase::physOutGate = nullptr |
|
protected |
◆ promiscuous
| bool inet::EthernetMacBase::promiscuous = false |
|
protected |
◆ receiveState
Referenced by changeReceptionState(), inet::EthernetCsmaMac::handleCanPullPacketChanged(), inet::EthernetCsmaMac::handleEndBackoffPeriod(), inet::EthernetCsmaMac::handleEndRxPeriod(), inet::EthernetCsmaMac::handleEndTxPeriod(), inet::EthernetCsmaMac::handleMessageWhenUp(), initialize(), inet::EthernetCsmaMac::printState(), inet::EthernetCsmaMac::processDetectedCollision(), inet::EthernetCsmaMac::processMsgFromNetwork(), refreshDisplay(), and inet::EthernetCsmaMac::startFrameTransmission().
◆ receptionStateChangedSignal
| simsignal_t inet::EthernetMacBase::receptionStateChangedSignal = registerSignal("receptionStateChanged") |
|
staticprotected |
◆ rxPausePkUnitsSignal
| simsignal_t inet::EthernetMacBase::rxPausePkUnitsSignal = registerSignal("rxPausePkUnits") |
|
staticprotected |
◆ rxPkOkSignal
| simsignal_t inet::EthernetMacBase::rxPkOkSignal = registerSignal("rxPkOk") |
|
staticprotected |
◆ sendRawBytes
| bool inet::EthernetMacBase::sendRawBytes = false |
|
protected |
◆ SPEED_OF_LIGHT_IN_CABLE
| const double inet::EthernetMacBase::SPEED_OF_LIGHT_IN_CABLE = 200000000.0 |
|
static |
◆ transmissionChannel
| cChannel* inet::EthernetMacBase::transmissionChannel = nullptr |
|
protected |
◆ transmissionStateChangedSignal
| simsignal_t inet::EthernetMacBase::transmissionStateChangedSignal = registerSignal("transmissionStateChanged") |
|
staticprotected |
◆ transmitState
Referenced by changeTransmissionState(), inet::EthernetMac::handleCanPullPacketChanged(), inet::EthernetCsmaMac::handleCanPullPacketChanged(), inet::EthernetCsmaMac::handleEndBackoffPeriod(), inet::EthernetMac::handleEndIFGPeriod(), inet::EthernetCsmaMac::handleEndIFGPeriod(), inet::EthernetCsmaMac::handleEndJammingPeriod(), inet::EthernetMac::handleEndPausePeriod(), inet::EthernetCsmaMac::handleEndPausePeriod(), inet::EthernetCsmaMac::handleEndRxPeriod(), inet::EthernetMac::handleEndTxPeriod(), inet::EthernetCsmaMac::handleEndTxPeriod(), inet::EthernetCsmaMac::handleMessageWhenUp(), inet::EthernetMac::handleUpperPacket(), initialize(), inet::EthernetCsmaMac::printState(), inet::EthernetCsmaMac::processMsgFromNetwork(), inet::EthernetMac::processPauseCommand(), inet::EthernetCsmaMac::processReceivedControlFrame(), and refreshDisplay().
◆ txPausePkUnitsSignal
| simsignal_t inet::EthernetMacBase::txPausePkUnitsSignal = registerSignal("txPausePkUnits") |
|
staticprotected |
The documentation for this class was generated from the following files:
opp_component_ptr< NetworkInterface > networkInterface
Definition: MacProtocolBase.h:30
@ ENDIFG
Definition: EthernetMacBase.h:56
static const EtherDescr nullEtherDescr
Definition: EthernetMacBase.h:82
unsigned long numFramesSent
Definition: EthernetMacBase.h:115
static const MacAddress MULTICAST_PAUSE_ADDRESS
The special multicast PAUSE MAC address, 01:80:C2:00:00:01.
Definition: MacAddress.h:37
State operationalState
Definition: OperationalMixin.h:23
unsigned long numDroppedPkFromHLIfaceDown
Definition: EthernetMacBase.h:120
@ ENDTRANSMISSION
Definition: EthernetMacBase.h:59
const B MIN_ETHERNET_FRAME_BYTES
Definition: Ethernet.h:22
unsigned long numBytesSent
Definition: EthernetMacBase.h:117
unsigned long numDroppedIfaceDown
Definition: EthernetMacBase.h:121
cChannel * transmissionChannel
Definition: EthernetMacBase.h:95
const B ETHER_FCS_BYTES
Definition: Ethernet.h:59
bool isIeee8023Header(const EthernetMacHeader &hdr)
Definition: EthernetMacHeader_m.h:229
const b INTERFRAME_GAP_BITS
Definition: Ethernet.h:24
void changeReceptionState(MacReceiveState newState)
Definition: EthernetMacBase.cc:655
virtual void dropCurrentTxFrame(PacketDropDetails &details)
Definition: MacProtocolBase.cc:99
@ ENDJAMMING
Definition: EthernetMacBase.h:60
@ FCS_COMPUTED
Definition: FcsMode_m.h:59
unsigned long numFramesFromHL
Definition: EthernetMacBase.h:119
cGate * physOutGate
Definition: EthernetMacBase.h:97
@ ETHERTYPE_FLOW_CONTROL
Definition: EtherType_m.h:92
@ WAIT_IFG_STATE
Definition: EthernetMacBase.h:36
@ FCS_DECLARED_CORRECT
Definition: FcsMode_m.h:57
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
unsigned long numBytesReceivedOK
Definition: EthernetMacBase.h:118
bool promiscuous
Definition: EthernetMacBase.h:90
double slotTime
Definition: EthernetMacBase.h:76
@ ENDRECEPTION
Definition: EthernetMacBase.h:57
unsigned long numPauseFramesSent
Definition: EthernetMacBase.h:126
double txrate
Definition: EthernetMacBase.h:69
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
int lowerLayerInGateId
Definition: MacProtocolBase.h:26
@ RECEIVING_STATE
Definition: EthernetMacBase.h:47
simtime_t lastTxFinishTime
Definition: EthernetMacBase.h:103
@ PAUSE_STATE
Definition: EthernetMacBase.h:41
@ BACKOFF_STATE
Definition: EthernetMacBase.h:40
intscale< b, 1, 8 > B
Definition: Units.h:1168
virtual void refreshConnection()
Definition: EthernetMacBase.cc:435
uint32_t ethernetCRC(const unsigned char *buf, unsigned int bufsize, uint32_t crc)
Definition: EthernetCRC.cc:58
static simsignal_t transmissionStateChangedSignal
Definition: EthernetMacBase.h:132
virtual MacAddress getMacAddress()
Definition: EthernetMacBase.h:142
Packet * currentTxFrame
Currently transmitted frame if any.
Definition: MacProtocolBase.h:35
virtual void readChannelParameters(bool errorWhenAsymmetric)
Calculates datarates, etc.
Definition: EthernetMacBase.cc:485
cMessage * endPauseTimer
Definition: EthernetMacBase.h:109
static const Protocol ethernetMac
Definition: Protocol.h:65
bool sendRawBytes
Definition: EthernetMacBase.h:86
@ ENDBACKOFF
Definition: EthernetMacBase.h:58
int upperLayerInGateId
Gate ids.
Definition: MacProtocolBase.h:24
unsigned long numDroppedNotForUs
Definition: EthernetMacBase.h:123
cMessage * endTxTimer
Definition: EthernetMacBase.h:107
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
virtual void processConnectDisconnect()
Definition: EthernetMacBase.cc:347
bool connected
Definition: EthernetMacBase.h:89
virtual void receiveSignal(cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
Definition: MacProtocolBase.cc:151
value< int64_t, units::b > b
Definition: Units.h:1241
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
cGate * physInGate
Definition: EthernetMacBase.h:96
@ FCS_DECLARED_INCORRECT
Definition: FcsMode_m.h:58
unsigned long numDroppedBitError
Definition: EthernetMacBase.h:122
virtual void initialize(int stage) override
Definition: MacProtocolBase.cc:37
@ JAMMING_STATE
Definition: EthernetMacBase.h:39
cMessage * endIfgTimer
Definition: EthernetMacBase.h:108
@ RX_COLLISION_STATE
Definition: EthernetMacBase.h:48
static const Protocol ethernetPhy
Definition: Protocol.h:66
virtual void delayActiveOperationFinish(simtime_t timeout)
Definition: OperationalMixinImpl.h:161
bool duplexMode
Definition: EthernetMacBase.h:91
@ INTERFACE_DOWN
Definition: Simsignals_m.h:72
virtual void initializeStatistics()
Definition: EthernetMacBase.cc:247
queueing::IPacketQueue * getQueue(cGate *gate) const
Definition: MacProtocolBase.cc:157
virtual void startActiveOperationExtraTimeOrFinish(simtime_t extraTime)
Definition: OperationalMixinImpl.h:179
#define Enter_Method(...)
Definition: SelfDoc.h:71
bool channelsDiffer
Definition: EthernetMacBase.h:100
@ RX_IDLE_STATE
Definition: EthernetMacBase.h:46
static const EtherDescr etherDescrs[NUM_OF_ETHERDESCRS]
Definition: EthernetMacBase.h:81
const char * displayStringTextFormat
Definition: EthernetMacBase.h:85
@ SEND_IFG_STATE
Definition: EthernetMacBase.h:37
int lowerLayerOutGateId
Definition: MacProtocolBase.h:27
static simsignal_t receptionStateChangedSignal
Definition: EthernetMacBase.h:133
virtual Packet * dequeuePacket()
Definition: MacProtocolBase.cc:175
EthernetSignalBase * curTxSignal
Definition: EthernetMacBase.h:112
FcsMode parseFcsMode(const char *fcsModeString)
Definition: FcsMode.cc:14
static const MacAddress UNSPECIFIED_ADDRESS
The unspecified MAC address, 00:00:00:00:00:00.
Definition: MacAddress.h:31
opp_component_ptr< queueing::IPacketQueue > txQueue
Messages received from upper layer and to be transmitted later.
Definition: MacProtocolBase.h:38
bool frameBursting
Definition: EthernetMacBase.h:92
unsigned long numPauseFramesRcvd
Definition: EthernetMacBase.h:125
MacReceiveState receiveState
Definition: EthernetMacBase.h:102
virtual void refreshDisplay() const override
Definition: OperationalMixinImpl.h:200
@ ENDPAUSE
Definition: EthernetMacBase.h:61
int pauseUnitsRequested
Definition: EthernetMacBase.h:104
virtual bool canDequeuePacket() const
Definition: MacProtocolBase.cc:170
MacTransmitState transmitState
Definition: EthernetMacBase.h:101
@ NOT_ADDRESSED_TO_US
Definition: Simsignals_m.h:76
@ TRANSMITTING_STATE
Definition: EthernetMacBase.h:38
unsigned long numFramesReceivedOK
Definition: EthernetMacBase.h:116
unsigned long numFramesPassedToHL
Definition: EthernetMacBase.h:124
@ TX_IDLE_STATE
Definition: EthernetMacBase.h:35
@ RX_RECONNECT_STATE
Definition: EthernetMacBase.h:49
virtual void initializeFlags()
Definition: EthernetMacBase.cc:229
FcsMode fcsMode
Definition: EthernetMacBase.h:87
const EtherDescr * curEtherDescr
Definition: EthernetMacBase.h:88
@ NUM_OF_ETHERDESCRS
Definition: EthernetMacBase.h:65
void changeTransmissionState(MacTransmitState newState)
Definition: EthernetMacBase.cc:649