INET Framework for OMNeT++/OMNEST
inet::AckingMac Class Reference

Implements a simplified ideal MAC. More...

#include <AckingMac.h>

Inheritance diagram for inet::AckingMac:
inet::MacProtocolBase inet::IMacProtocol inet::queueing::IActivePacketSink inet::LayeredProtocolBase inet::OperationalBase inet::OperationalMixin< cSimpleModule > inet::ILifecycle

Public Member Functions

 AckingMac ()
 
virtual ~AckingMac ()
 
virtual queueing::IPassivePacketSourcegetProvider (cGate *gate) override
 Returns the passive packet source from where packets are pulled or nullptr if the connected module doesn't implement the interface. More...
 
virtual void handleCanPullPacketChanged (cGate *gate) override
 Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate. More...
 
virtual void handlePullPacketProcessed (Packet *packet, cGate *gate, bool successful) override
 Notifies about the completion of the packet processing for a packet that was pulled earlier independently whether the packet is passed or streamed. More...
 
- Public Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual ~OperationalMixin ()
 }@ More...
 
- Public Member Functions inherited from inet::ILifecycle
virtual ~ILifecycle ()
 
- Public Member Functions inherited from inet::IMacProtocol
virtual ~IMacProtocol ()
 
- Public Member Functions inherited from inet::queueing::IActivePacketSink
virtual ~IActivePacketSink ()
 

Protected Member Functions

virtual void configureNetworkInterface () override
 implements MacBase functions More...
 
virtual void startTransmitting ()
 
virtual bool dropFrameNotForUs (Packet *frame)
 
virtual void encapsulate (Packet *msg)
 
virtual void decapsulate (Packet *frame)
 
virtual void acked (Packet *packet)
 
virtual void receiveSignal (cComponent *src, simsignal_t id, intval_t value, cObject *details) override
 
virtual void handleUpperPacket (Packet *packet) override
 implements MacProtocolBase functions More...
 
virtual void handleLowerPacket (Packet *packet) override
 
virtual void handleSelfMessage (cMessage *message) override
 
virtual void handleStartOperation (LifecycleOperation *operation) override
 
virtual void handleStopOperation (LifecycleOperation *operation) override
 
virtual void handleCrashOperation (LifecycleOperation *operation) override
 
virtual int numInitStages () const override
 
virtual void initialize (int stage) override
 
virtual void processUpperPacket ()
 
- Protected Member Functions inherited from inet::MacProtocolBase
 MacProtocolBase ()
 
virtual ~MacProtocolBase ()
 
virtual void registerInterface ()
 
virtual MacAddress parseMacAddressParameter (const char *addrstr)
 
virtual void deleteCurrentTxFrame ()
 
virtual void dropCurrentTxFrame (PacketDropDetails &details)
 
virtual void handleMessageWhenDown (cMessage *msg) override
 
virtual void sendUp (cMessage *message)
 
virtual void sendDown (cMessage *message)
 
virtual bool isUpperMessage (cMessage *message) const override
 
virtual bool isLowerMessage (cMessage *message) const override
 
virtual bool isInitializeStage (int stage) const override
 
virtual bool isModuleStartStage (int stage) const override
 
virtual bool isModuleStopStage (int stage) const override
 
virtual void flushQueue (PacketDropDetails &details)
 should clear queue and emit signal "packetDropped" with entire packets More...
 
virtual void clearQueue ()
 should clear queue silently More...
 
virtual void receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override
 
queueing::IPacketQueuegetQueue (cGate *gate) const
 
virtual bool canDequeuePacket () const
 
virtual PacketdequeuePacket ()
 
- Protected Member Functions inherited from inet::LayeredProtocolBase
virtual void handleMessageWhenUp (cMessage *message) override
 
virtual void handleUpperMessage (cMessage *message)
 
virtual void handleLowerMessage (cMessage *message)
 
virtual void handleUpperCommand (cMessage *message)
 
virtual void handleLowerCommand (cMessage *message)
 
- Protected Member Functions inherited from inet::OperationalMixin< cSimpleModule >
virtual int numInitStages () const override
 
virtual void refreshDisplay () const override
 
virtual void handleMessage (cMessage *msg) override
 
virtual bool handleOperationStage (LifecycleOperation *operation, IDoneCallback *doneCallback) override
 Perform one stage of a lifecycle operation. More...
 
virtual State getInitialOperationalState () const
 Returns initial operational state: OPERATING or NOT_OPERATING. More...
 
virtual void handleActiveOperationTimeout (cMessage *message)
 
virtual bool isUp () const
 utility functions More...
 
virtual bool isDown () const
 
virtual void setOperationalState (State newState)
 
virtual void scheduleOperationTimeout (simtime_t timeout)
 
virtual void setupActiveOperation (LifecycleOperation *operation, IDoneCallback *doneCallback, State)
 
virtual void delayActiveOperationFinish (simtime_t timeout)
 
virtual void startActiveOperationExtraTime (simtime_t delay=SIMTIME_ZERO)
 
virtual void startActiveOperationExtraTimeOrFinish (simtime_t extraTime)
 
virtual void finishActiveOperation ()
 

Protected Attributes

int headerLength = 0
 
double bitrate = 0
 
bool promiscuous = false
 
bool fullDuplex = false
 
bool useAck = true
 
physicallayer::IRadioradio = nullptr
 
physicallayer::IRadio::TransmissionState transmissionState = physicallayer::IRadio::TRANSMISSION_STATE_UNDEFINED
 
simtime_t ackTimeout
 
cMessage * ackTimeoutMsg = nullptr
 
- Protected Attributes inherited from inet::MacProtocolBase
int upperLayerInGateId = -1
 Gate ids. More...
 
int upperLayerOutGateId = -1
 
int lowerLayerInGateId = -1
 
int lowerLayerOutGateId = -1
 
opp_component_ptr< NetworkInterfacenetworkInterface
 
opp_component_ptr< cModule > hostModule
 
PacketcurrentTxFrame = nullptr
 Currently transmitted frame if any. More...
 
opp_component_ptr< queueing::IPacketQueuetxQueue
 Messages received from upper layer and to be transmitted later. More...
 
- Protected Attributes inherited from inet::OperationalMixin< cSimpleModule >
State operationalState
 
simtime_t lastChange
 
Operation activeOperation
 
cMessage * activeOperationTimeout
 
cMessage * activeOperationExtraTimer
 

Additional Inherited Members

- Protected Types inherited from inet::OperationalMixin< cSimpleModule >
enum  State
 

Detailed Description

Implements a simplified ideal MAC.

See the NED file for details.

Constructor & Destructor Documentation

◆ AckingMac()

inet::AckingMac::AckingMac ( )
30 {
31 }

◆ ~AckingMac()

inet::AckingMac::~AckingMac ( )
virtual
34 {
35  cancelAndDelete(ackTimeoutMsg);
36 }

Member Function Documentation

◆ acked()

void inet::AckingMac::acked ( Packet packet)
protectedvirtual
178 {
179  Enter_Method("acked");
180  ASSERT(useAck);
181 
182  if (currentTxFrame == nullptr)
183  throw cRuntimeError("Unexpected ACK received");
184 
185  EV_DEBUG << "AckingMac::acked(" << frame->getFullName() << ") is accepted\n";
186  cancelEvent(ackTimeoutMsg);
190 }

Referenced by handleLowerPacket().

◆ configureNetworkInterface()

void inet::AckingMac::configureNetworkInterface ( )
overrideprotectedvirtual

implements MacBase functions

Implements inet::MacProtocolBase.

65 {
66  MacAddress address = parseMacAddressParameter(par("address"));
67 
68  // data rate
69  networkInterface->setDatarate(bitrate);
70 
71  // generate a link-layer address to be used as interface token for IPv6
72  networkInterface->setMacAddress(address);
73  networkInterface->setInterfaceToken(address.formInterfaceIdentifier());
74 
75  // MTU: typical values are 576 (Internet de facto), 1500 (Ethernet-friendly),
76  // 4000 (on some point-to-point links), 4470 (Cisco routers default, FDDI compatible)
77  networkInterface->setMtu(par("mtu"));
78 
79  // capabilities
80  networkInterface->setMulticast(true);
81  networkInterface->setBroadcast(true);
82 }

◆ decapsulate()

void inet::AckingMac::decapsulate ( Packet frame)
protectedvirtual
240 {
241  const auto& macHeader = packet->popAtFront<AckingMacHeader>();
242  auto macAddressInd = packet->addTagIfAbsent<MacAddressInd>();
243  macAddressInd->setSrcAddress(macHeader->getSrc());
244  macAddressInd->setDestAddress(macHeader->getDest());
245  packet->addTagIfAbsent<InterfaceInd>()->setInterfaceId(networkInterface->getInterfaceId());
246  auto payloadProtocol = ProtocolGroup::ethertype.getProtocol(macHeader->getNetworkProtocol());
247  packet->addTagIfAbsent<DispatchProtocolReq>()->setProtocol(payloadProtocol);
248  packet->addTagIfAbsent<PacketProtocolTag>()->setProtocol(payloadProtocol);
249 }

◆ dropFrameNotForUs()

bool inet::AckingMac::dropFrameNotForUs ( Packet frame)
protectedvirtual
213 {
214  auto macHeader = packet->peekAtFront<AckingMacHeader>();
215  // Current implementation does not support the configuration of multicast
216  // MAC address groups. We rather accept all multicast frames (just like they were
217  // broadcasts) and pass it up to the higher layer where they will be dropped
218  // if not needed.
219  // All frames must be passed to the upper layer if the interface is
220  // in promiscuous mode.
221 
222  if (macHeader->getDest().equals(networkInterface->getMacAddress()))
223  return false;
224 
225  if (macHeader->getDest().isBroadcast())
226  return false;
227 
228  if (promiscuous || macHeader->getDest().isMulticast())
229  return false;
230 
231  EV << "Frame '" << packet->getName() << "' not destined to us, discarding\n";
232  PacketDropDetails details;
233  details.setReason(NOT_ADDRESSED_TO_US);
234  emit(packetDroppedSignal, packet, &details);
235  delete packet;
236  return true;
237 }

◆ encapsulate()

void inet::AckingMac::encapsulate ( Packet msg)
protectedvirtual
193 {
194  auto macHeader = makeShared<AckingMacHeader>();
195  macHeader->setChunkLength(B(headerLength));
196  auto macAddressReq = packet->getTag<MacAddressReq>();
197  macHeader->setSrc(macAddressReq->getSrcAddress());
198  macHeader->setDest(macAddressReq->getDestAddress());
199  MacAddress dest = macAddressReq->getDestAddress();
200  if (dest.isBroadcast() || dest.isMulticast() || dest.isUnspecified())
201  macHeader->setSrcModuleId(-1);
202  else
203  macHeader->setSrcModuleId(getId());
204  macHeader->setNetworkProtocol(ProtocolGroup::ethertype.getProtocolNumber(packet->getTag<PacketProtocolTag>()->getProtocol()));
205  packet->insertAtFront(macHeader);
206  auto macAddressInd = packet->addTagIfAbsent<MacAddressInd>();
207  macAddressInd->setSrcAddress(macHeader->getSrc());
208  macAddressInd->setDestAddress(macHeader->getDest());
209  packet->getTagForUpdate<PacketProtocolTag>()->setProtocol(&Protocol::ackingMac);
210 }

◆ getProvider()

queueing::IPassivePacketSource * inet::AckingMac::getProvider ( cGate *  gate)
overridevirtual

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.

252 {
253  return (gate->getId() == upperLayerInGateId) ? txQueue.get() : nullptr;
254 }

◆ handleCanPullPacketChanged()

void inet::AckingMac::handleCanPullPacketChanged ( cGate *  gate)
overridevirtual

Notifies about a change in the possibility of pulling some packet from the passive packet source at the given gate.

This method is called, for example, when a new packet is inserted into a queue. It allows the sink to pull a new packet from the queue.

The gate parameter must be a valid gate of this module.

Implements inet::queueing::IActivePacketSink.

257 {
258  Enter_Method("handleCanPullPacketChanged");
259  if (currentTxFrame == nullptr // not an active transmission
261  && canDequeuePacket()
262  )
264 }

◆ handleCrashOperation()

void inet::AckingMac::handleCrashOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Reimplemented from inet::MacProtocolBase.

294 {
296  if (useAck) {
297  cancelEvent(ackTimeoutMsg);
298  }
299 }

◆ handleLowerPacket()

void inet::AckingMac::handleLowerPacket ( Packet packet)
overrideprotectedvirtual

Reimplemented from inet::LayeredProtocolBase.

131 {
132  auto macHeader = packet->peekAtFront<AckingMacHeader>();
133  if (packet->hasBitError()) {
134  EV << "Received frame '" << packet->getName() << "' contains bit errors or collision, dropping it\n";
135  PacketDropDetails details;
136  details.setReason(INCORRECTLY_RECEIVED);
137  emit(packetDroppedSignal, packet, &details);
138  delete packet;
139  return;
140  }
141 
142  if (!dropFrameNotForUs(packet)) {
143  // send Ack if needed
144  auto dest = macHeader->getDest();
145  bool needsAck = !(dest.isBroadcast() || dest.isMulticast() || dest.isUnspecified()); // same condition as in sender
146  if (needsAck) {
147  int senderModuleId = macHeader->getSrcModuleId();
148  AckingMac *senderMac = check_and_cast<AckingMac *>(getSimulation()->getModule(senderModuleId));
149  if (senderMac->useAck)
150  senderMac->acked(packet);
151  }
152 
153  // decapsulate and attach control info
154  decapsulate(packet);
155  EV << "Passing up contained packet '" << packet->getName() << "' to higher layer\n";
156  sendUp(packet);
157  }
158 }

◆ handlePullPacketProcessed()

void inet::AckingMac::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.

267 {
268  Enter_Method("handlePullPacketProcessed");
269  throw cRuntimeError("Not supported callback");
270 }

◆ handleSelfMessage()

void inet::AckingMac::handleSelfMessage ( cMessage *  message)
overrideprotectedvirtual

Reimplemented from inet::LayeredProtocolBase.

161 {
162  if (message == ackTimeoutMsg) {
163  EV_DETAIL << "AckingMac: timeout: " << currentTxFrame->getFullName() << " is lost\n";
164  // packet lost
166  PacketDropDetails details;
167  details.setReason(OTHER_PACKET_DROP);
168  dropCurrentTxFrame(details);
171  }
172  else {
174  }
175 }

◆ handleStartOperation()

void inet::AckingMac::handleStartOperation ( LifecycleOperation operation)
overrideprotectedvirtual

◆ handleStopOperation()

void inet::AckingMac::handleStopOperation ( LifecycleOperation operation)
overrideprotectedvirtual

Reimplemented from inet::MacProtocolBase.

286 {
288  if (useAck) {
289  cancelEvent(ackTimeoutMsg);
290  }
291 }

◆ handleUpperPacket()

void inet::AckingMac::handleUpperPacket ( Packet packet)
overrideprotectedvirtual

implements MacProtocolBase functions

Reimplemented from inet::LayeredProtocolBase.

122 {
123  EV << "Received " << packet << " for transmission\n";
125  throw cRuntimeError("AckingMac already in transmit state when packet arrived from upper layer");
126  currentTxFrame = packet;
128 }

◆ initialize()

void inet::AckingMac::initialize ( int  stage)
overrideprotectedvirtual

Reimplemented from inet::MacProtocolBase.

39 {
41  if (stage == INITSTAGE_LOCAL) {
42  bitrate = par("bitrate");
43  headerLength = par("headerLength");
44  promiscuous = par("promiscuous");
45  fullDuplex = par("fullDuplex");
46  useAck = par("useAck");
47  ackTimeout = par("ackTimeout");
48 
49  cModule *radioModule = gate("lowerLayerOut")->getPathEndGate()->getOwnerModule();
50  radioModule->subscribe(IRadio::transmissionStateChangedSignal, this);
51  radio = check_and_cast<IRadio *>(radioModule);
53 
55  }
56  else if (stage == INITSTAGE_LINK_LAYER) {
59  if (useAck)
60  ackTimeoutMsg = new cMessage("link-break");
61  }
62 }

◆ numInitStages()

virtual int inet::AckingMac::numInitStages ( ) const
inlineoverrideprotectedvirtual
72 { return NUM_INIT_STAGES; }

◆ processUpperPacket()

void inet::AckingMac::processUpperPacket ( )
protectedvirtual
273 {
274  auto packet = dequeuePacket();
275  handleUpperPacket(packet);
276 
277 }

◆ receiveSignal()

void inet::AckingMac::receiveSignal ( cComponent *  src,
simsignal_t  id,
intval_t  value,
cObject *  details 
)
overrideprotectedvirtual
85 {
86  Enter_Method("%s", cComponent::getSignalName(signalID));
87 
89  IRadio::TransmissionState newRadioTransmissionState = static_cast<IRadio::TransmissionState>(value);
92  transmissionState = newRadioTransmissionState;
93  if (currentTxFrame == nullptr && canDequeuePacket())
95  }
96  else
97  transmissionState = newRadioTransmissionState;
98  }
99 }

◆ startTransmitting()

void inet::AckingMac::startTransmitting ( )
protectedvirtual
102 {
103  // if there's any control info, remove it; then encapsulate the packet
104  MacAddress dest = currentTxFrame->getTag<MacAddressReq>()->getDestAddress();
105  Packet *msg = currentTxFrame;
106  if (useAck && !dest.isBroadcast() && !dest.isMulticast() && !dest.isUnspecified()) { // unicast
107  msg = currentTxFrame->dup();
108  scheduleAfter(ackTimeout, ackTimeoutMsg);
109  }
110  else
111  currentTxFrame = nullptr;
112 
113  encapsulate(msg);
114 
115  // send
116  EV << "Starting transmission of " << msg << endl;
118  sendDown(msg);
119 }

Member Data Documentation

◆ ackTimeout

simtime_t inet::AckingMac::ackTimeout
protected

◆ ackTimeoutMsg

cMessage* inet::AckingMac::ackTimeoutMsg = nullptr
protected

◆ bitrate

double inet::AckingMac::bitrate = 0
protected

◆ fullDuplex

bool inet::AckingMac::fullDuplex = false
protected

◆ headerLength

int inet::AckingMac::headerLength = 0
protected

◆ promiscuous

bool inet::AckingMac::promiscuous = false
protected

◆ radio

physicallayer::IRadio* inet::AckingMac::radio = nullptr
protected

◆ transmissionState

◆ useAck

bool inet::AckingMac::useAck = true
protected

Referenced by handleLowerPacket().


The documentation for this class was generated from the following files:
inet::MacProtocolBase::networkInterface
opp_component_ptr< NetworkInterface > networkInterface
Definition: MacProtocolBase.h:30
inet::AckingMac::ackTimeout
simtime_t ackTimeout
Definition: AckingMac.h:38
inet::physicallayer::IRadio::setRadioMode
virtual void setRadioMode(RadioMode radioMode)=0
Changes the current radio mode.
inet::MacProtocolBase::handleCrashOperation
virtual void handleCrashOperation(LifecycleOperation *operation) override
Definition: MacProtocolBase.cc:142
inet::AckingMac::bitrate
double bitrate
Definition: AckingMac.h:30
inet::physicallayer::IRadio::RADIO_MODE_TRANSCEIVER
@ RADIO_MODE_TRANSCEIVER
The radio is prepared for simultaneous frame reception and transmission, power consumption is low whe...
Definition: IRadio.h:111
inet::MacProtocolBase::sendUp
virtual void sendUp(cMessage *message)
Definition: MacProtocolBase.cc:59
inet::AckingMac::headerLength
int headerLength
Definition: AckingMac.h:29
inet::linkBrokenSignal
simsignal_t linkBrokenSignal
Definition: Simsignals.cc:22
inet::AckingMac::startTransmitting
virtual void startTransmitting()
Definition: AckingMac.cc:101
inet::INCORRECTLY_RECEIVED
@ INCORRECTLY_RECEIVED
Definition: Simsignals_m.h:71
inet::AckingMac::handleUpperPacket
virtual void handleUpperPacket(Packet *packet) override
implements MacProtocolBase functions
Definition: AckingMac.cc:121
inet::AckingMac::encapsulate
virtual void encapsulate(Packet *msg)
Definition: AckingMac.cc:192
DispatchProtocolReq
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
inet::MacProtocolBase::dropCurrentTxFrame
virtual void dropCurrentTxFrame(PacketDropDetails &details)
Definition: MacProtocolBase.cc:99
inet::AckingMac::decapsulate
virtual void decapsulate(Packet *frame)
Definition: AckingMac.cc:239
inet::physicallayer::IRadio::transmissionStateChangedSignal
static simsignal_t transmissionStateChangedSignal
This signal is emitted when the radio transmission state of the radio is changed.
Definition: IRadio.h:60
inet::MacProtocolBase::handleStopOperation
virtual void handleStopOperation(LifecycleOperation *operation) override
Definition: MacProtocolBase.cc:130
inet::physicallayer::IRadio::RADIO_MODE_TRANSMITTER
@ RADIO_MODE_TRANSMITTER
The radio is prepared for frame transmission, frame reception is not possible, power consumption is l...
Definition: IRadio.h:104
inet::packetDroppedSignal
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
inet::physicallayer::IRadio::getTransmissionState
virtual TransmissionState getTransmissionState() const =0
Returns the current radio transmission state.
inet::AckingMac::dropFrameNotForUs
virtual bool dropFrameNotForUs(Packet *frame)
Definition: AckingMac.cc:212
PacketProtocolTag
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
inet::units::units::B
intscale< b, 1, 8 > B
Definition: Units.h:1168
inet::Packet::dup
virtual Packet * dup() const override
Definition: Packet.h:171
inet::physicallayer::IRadio::RADIO_MODE_RECEIVER
@ RADIO_MODE_RECEIVER
The radio is prepared for frame reception, frame transmission is not possible, power consumption is l...
Definition: IRadio.h:97
inet::LayeredProtocolBase::handleSelfMessage
virtual void handleSelfMessage(cMessage *message)
Definition: LayeredProtocolBase.cc:46
inet::MacProtocolBase::currentTxFrame
Packet * currentTxFrame
Currently transmitted frame if any.
Definition: MacProtocolBase.h:35
inet::AckingMac::fullDuplex
bool fullDuplex
Definition: AckingMac.h:32
inet::MacProtocolBase::sendDown
virtual void sendDown(cMessage *message)
Definition: MacProtocolBase.cc:66
inet::MacProtocolBase::upperLayerInGateId
int upperLayerInGateId
Gate ids.
Definition: MacProtocolBase.h:24
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::physicallayer::IRadio::TRANSMISSION_STATE_TRANSMITTING
@ TRANSMISSION_STATE_TRANSMITTING
The radio medium is busy, the radio is currently transmitting a signal.
Definition: IRadio.h:171
inet::OTHER_PACKET_DROP
@ OTHER_PACKET_DROP
Definition: Simsignals_m.h:84
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::AckingMac::transmissionState
physicallayer::IRadio::TransmissionState transmissionState
Definition: AckingMac.h:36
inet::MacProtocolBase::deleteCurrentTxFrame
virtual void deleteCurrentTxFrame()
Definition: MacProtocolBase.cc:93
inet::MacProtocolBase::initialize
virtual void initialize(int stage) override
Definition: MacProtocolBase.cc:37
inet::Protocol::ackingMac
static const Protocol ackingMac
Definition: Protocol.h:122
inet::MacProtocolBase::getQueue
queueing::IPacketQueue * getQueue(cGate *gate) const
Definition: MacProtocolBase.cc:157
Enter_Method
#define Enter_Method(...)
Definition: SelfDoc.h:71
inet::physicallayer::IRadio::TransmissionState
TransmissionState
This enumeration specifies the transmission state of the radio.
Definition: IRadio.h:155
inet::AckingMac::promiscuous
bool promiscuous
Definition: AckingMac.h:31
inet::MacProtocolBase::dequeuePacket
virtual Packet * dequeuePacket()
Definition: MacProtocolBase.cc:175
inet::Packet::getTag
const Ptr< const TagBase > getTag(int index) const
Returns the packet tag at the given index.
Definition: Packet.h:1261
inet::Packet::getFullName
virtual const char * getFullName() const override
Returns the full name of the packet.
Definition: Packet.cc:290
inet::MacProtocolBase::parseMacAddressParameter
virtual MacAddress parseMacAddressParameter(const char *addrstr)
Definition: MacProtocolBase.cc:24
inet::AckingMac::AckingMac
AckingMac()
Definition: AckingMac.cc:29
inet::ProtocolGroup::getProtocol
const Protocol * getProtocol(int protocolNumber) const
Definition: ProtocolGroup.cc:31
inet::MacProtocolBase::txQueue
opp_component_ptr< queueing::IPacketQueue > txQueue
Messages received from upper layer and to be transmitted later.
Definition: MacProtocolBase.h:38
inet::physicallayer::IRadio::TRANSMISSION_STATE_UNDEFINED
@ TRANSMISSION_STATE_UNDEFINED
The transmission state is undefined or meaningless.
Definition: IRadio.h:160
inet::AckingMac::processUpperPacket
virtual void processUpperPacket()
Definition: AckingMac.cc:272
inet::physicallayer::IRadio::TRANSMISSION_STATE_IDLE
@ TRANSMISSION_STATE_IDLE
The radio is not transmitting a signal on the radio medium.
Definition: IRadio.h:166
inet::MacProtocolBase::canDequeuePacket
virtual bool canDequeuePacket() const
Definition: MacProtocolBase.cc:170
inet::NOT_ADDRESSED_TO_US
@ NOT_ADDRESSED_TO_US
Definition: Simsignals_m.h:76
inet::AckingMac::ackTimeoutMsg
cMessage * ackTimeoutMsg
Definition: AckingMac.h:39
inet::AckingMac::radio
physicallayer::IRadio * radio
Definition: AckingMac.h:35
inet::INITSTAGE_LINK_LAYER
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.
inet::AckingMac::useAck
bool useAck
Definition: AckingMac.h:33
inet::ProtocolGroup::ethertype
static ProtocolGroup ethertype
Definition: ProtocolGroup.h:40