|
INET Framework for OMNeT++/OMNEST
|
Implementation of B-MAC (called also Berkeley MAC, Low Power Listening or LPL).
More...
#include <BMac.h>
Implementation of B-MAC (called also Berkeley MAC, Low Power Listening or LPL).
The protocol works as follows: each node is allowed to sleep for slotDuration. After waking up, it first checks the channel for ongoing transmissions. If a transmission is catched (a preamble is received), the node stays awake for at most slotDuration and waits for the actual data packet. If a node wants to send a packet, it first sends preambles for at least slotDuration, thus waking up all nodes in its transmission radius and then sends out the data packet. If a mac-level ack is required, then the receiver sends the ack immediately after receiving the packet (no preambles) and the sender waits for some time more before going back to sleep.
B-MAC is designed for low traffic, low power communication in WSN and is one of the most widely used protocols (e.g. it is part of TinyOS). The finite state machine of the protocol is given in the below figure:
B-MAC Layer - finite state machine
A paper describing this implementation can be found at: http://www.omnet-workshop.org/2011/uploads/slides/OMNeT_WS2011_S5_C1_Foerster.pdf
- Author
- Anna Foerster
◆ States
MAC states.
The MAC states help to keep track what the MAC is actually trying to do. INIT – node has just started and its status is unclear SLEEP – node sleeps, but accepts packets from the network layer CCA – Clear Channel Assessment - MAC checks whether medium is busy SEND_PREAMBLE – node sends preambles to wake up all nodes WAIT_DATA – node has received at least one preamble from another node and wiats for the actual data packet SEND_DATA – node has sent enough preambles and sends the actual data packet WAIT_TX_DATA_OVER – node waits until the data packet sending is ready WAIT_ACK – node has sent the data packet and waits for ack from the receiving node SEND_ACK – node send an ACK back to the sender WAIT_ACK_TX – node waits until the transmission of the ack packet is over
| Enumerator |
|---|
| INIT | |
| SLEEP | |
| CCA | |
| SEND_PREAMBLE | |
| WAIT_DATA | |
| SEND_DATA | |
| WAIT_TX_DATA_OVER | |
| WAIT_ACK | |
| SEND_ACK | |
| WAIT_ACK_TX | |
◆ BMac() [1/2]
| inet::BMac::BMac |
( |
const BMac & |
| ) |
|
|
private |
Copy constructor is not allowed.
◆ BMac() [2/2]
◆ ~BMac()
◆ attachSignal()
| void inet::BMac::attachSignal |
( |
Packet * |
macPkt | ) |
|
|
protected |
Internal function to attach a signal to the packet.
563 simtime_t duration = macPkt->getBitLength() /
bitrate;
565 macPkt->setDuration(duration);
◆ configureNetworkInterface()
| void inet::BMac::configureNetworkInterface |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ decapsulate()
| void inet::BMac::decapsulate |
( |
Packet * |
packet | ) |
|
|
protected |
648 const auto& bmacHeader = packet->popAtFront<BMacDataFrameHeader>();
649 packet->addTagIfAbsent<MacAddressInd>()->setSrcAddress(bmacHeader->getSrcAddr());
650 packet->addTagIfAbsent<InterfaceInd>()->setInterfaceId(
networkInterface->getInterfaceId());
655 EV_DETAIL <<
" message decapsulated " << endl;
◆ encapsulate()
| void inet::BMac::encapsulate |
( |
Packet * |
packet | ) |
|
|
protected |
660 auto pkt = makeShared<BMacDataFrameHeader>();
666 auto dest = packet->getTag<MacAddressReq>()->getDestAddress();
667 EV_DETAIL <<
"CInfo removed, mac addr=" << dest << endl;
669 pkt->setDestAddr(dest);
672 delete packet->removeControlInfo();
678 packet->insertAtFront(pkt);
679 EV_DETAIL <<
"pkt encapsulated\n";
◆ finish()
| void inet::BMac::finish |
( |
| ) |
|
|
overridevirtual |
Delete all dynamically allocated objects of the module.
◆ 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.
◆ handleCanPullPacketChanged()
| void inet::BMac::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.
704 rescheduleAfter(dblrand() * 0.1f,
wakeup);
◆ handleCommand()
| virtual void inet::BMac::handleCommand |
( |
cMessage * |
msg | ) |
|
|
inlineprotectedvirtual |
◆ handleLowerPacket()
| void inet::BMac::handleLowerPacket |
( |
Packet * |
packet | ) |
|
|
overridevirtual |
Handle messages from lower layer.
Handle BMAC preambles and received data packets.
Reimplemented from inet::LayeredProtocolBase.
500 if (packet->hasBitError()) {
501 EV <<
"Received " << packet <<
" contains bit errors or collision, dropping it\n";
502 PacketDropDetails details;
509 const auto& hdr = packet->peekAtFront<BMacHeaderBase>();
510 packet->setKind(hdr->getType());
◆ handlePullPacketProcessed()
| void inet::BMac::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.
711 throw cRuntimeError(
"Not supported callback");
◆ handleSelfMessage()
| void inet::BMac::handleSelfMessage |
( |
cMessage * |
msg | ) |
|
|
overridevirtual |
Handle self messages such as timers.
Handle own messages: BMAC_WAKEUP: wake up the node, check the channel for some time.
BMAC_CHECK_CHANNEL: if the channel is free, check whether there is something in the queue and switch the radio to TX. When switched to TX, the node will start sending preambles for a full slot duration. If the channel is busy, stay awake to receive message. Schedule a timeout to handle false alarms. BMAC_SEND_PREAMBLES: sending of preambles over. Next time the data packet will be send out (single one). BMAC_TIMEOUT_DATA: timeout the node after a false busy channel alarm. Go back to sleep.
Reimplemented from inet::LayeredProtocolBase.
212 EV_DETAIL <<
"State INIT, message BMAC_START, new state SLEEP" << endl;
222 EV_DETAIL <<
"State SLEEP, message BMAC_WAKEUP, new state CCA" << endl;
235 EV_DETAIL <<
"State CCA, message CCA_TIMEOUT, new state"
236 " SEND_PREAMBLE" << endl;
244 EV_DETAIL <<
"State CCA, message CCA_TIMEOUT, new state SLEEP"
256 EV_DETAIL <<
"State CCA, message BMAC_PREAMBLE received, new state"
257 " WAIT_DATA" << endl;
269 EV_DETAIL <<
"State CCA, message BMAC_DATA, new state WAIT_DATA"
274 scheduleAfter(SIMTIME_ZERO, msg);
280 EV_DETAIL <<
"State CCA, message BMAC_ACK, new state CCA" << endl;
288 EV_DETAIL <<
"State SEND_PREAMBLE, message BMAC_SEND_PREAMBLE, new"
289 " state SEND_PREAMBLE" << endl;
297 EV_DETAIL <<
"State SEND_PREAMBLE, message BMAC_STOP_PREAMBLES, new"
298 " state SEND_DATA" << endl;
309 EV_DETAIL <<
"State SEND_DATA, message BMAC_SEND_PREAMBLE or"
310 " BMAC_RESEND_DATA, new state WAIT_TX_DATA_OVER" << endl;
314 throw cRuntimeError(
"Model error: incomplete transmission exists");
328 EV_DETAIL <<
"State WAIT_TX_DATA_OVER, message BMAC_DATA_TX_OVER,"
329 " new state WAIT_ACK" << endl;
335 EV_DETAIL <<
"State WAIT_TX_DATA_OVER, message BMAC_DATA_TX_OVER,"
336 " new state SLEEP" << endl;
350 EV_DETAIL <<
"State WAIT_ACK, message BMAC_ACK_TIMEOUT, new state"
351 " SEND_DATA" << endl;
358 EV_DETAIL <<
"State WAIT_ACK, message BMAC_ACK_TIMEOUT, new state"
362 PacketDropDetails details;
374 EV_DETAIL <<
"State WAIT_ACK, message BMAC_DATA or BMAC_PREMABLE, new"
375 " state WAIT_ACK" << endl;
380 EV_DETAIL <<
"State WAIT_ACK, message BMAC_ACK" << endl;
381 auto packet = check_and_cast<Packet *>(msg);
382 const MacAddress src = packet->peekAtFront<BMacControlFrame>()->getSrcAddr();
385 <<
", and ACK came from : " << src << endl;
387 EV_DETAIL <<
"New state SLEEP" << endl;
405 EV_DETAIL <<
"State WAIT_DATA, message BMAC_PREAMBLE, new state"
406 " WAIT_DATA" << endl;
413 EV_DETAIL <<
"State WAIT_DATA, message BMAC_ACK, new state WAIT_DATA"
421 auto packet = check_and_cast<Packet *>(msg);
422 const auto bmacHeader = packet->peekAtFront<BMacDataFrameHeader>();
423 const MacAddress& dest = bmacHeader->getDestAddr();
424 const MacAddress& src = bmacHeader->getSrcAddr();
425 if ((dest == address) || dest.isBroadcast()) {
426 EV_DETAIL <<
"Local delivery " << packet << endl;
431 EV_DETAIL <<
"Received " << packet <<
" is not for us, dropping frame." << endl;
432 PacketDropDetails details;
442 EV_DETAIL <<
"State WAIT_DATA, message BMAC_DATA, new state"
449 EV_DETAIL <<
"State WAIT_DATA, message BMAC_DATA, new state SLEEP"
458 EV_DETAIL <<
"State WAIT_DATA, message BMAC_DATA_TIMEOUT, new state"
469 EV_DETAIL <<
"State SEND_ACK, message BMAC_SEND_ACK, new state"
470 " WAIT_ACK_TX" << endl;
480 EV_DETAIL <<
"State WAIT_ACK_TX, message BMAC_ACK_TX_OVER, new state"
491 throw cRuntimeError(
"Undefined event of type %d in state %d (radio mode %d, radio reception state %d, radio transmission state %d)!",
◆ handleUpperPacket()
| void inet::BMac::handleUpperPacket |
( |
Packet * |
packet | ) |
|
|
overridevirtual |
Handle messages from upper layer.
Check whether the queue is not full: if yes, print a warning and drop the packet.
Then initiate sending of the packet, if the node is sleeping. Do nothing, if node is working.
Reimplemented from inet::LayeredProtocolBase.
151 throw cRuntimeError(
"Model error: this module should pull packet from upper queue, direct incoming packet not accepted");
◆ initialize()
| void inet::BMac::initialize |
( |
int |
stage | ) |
|
|
overridevirtual |
◆ numInitStages()
| virtual int inet::BMac::numInitStages |
( |
| ) |
const |
|
inlineoverridevirtual |
Initialization of the module and some variables.
◆ operator=()
| BMac& inet::BMac::operator= |
( |
const BMac & |
| ) |
|
|
private |
Assignment operator is not allowed.
◆ receiveSignal()
| void inet::BMac::receiveSignal |
( |
cComponent * |
source, |
|
|
simsignal_t |
signalID, |
|
|
intval_t |
value, |
|
|
cObject * |
details |
|
) |
| |
|
overridevirtual |
Handle control messages from lower layer.
530 Enter_Method(
"%s", cComponent::getSignalName(signalID));
540 scheduleAfter(SIMTIME_ZERO,
send_ack);
◆ refreshDisplay()
| void inet::BMac::refreshDisplay |
( |
| ) |
const |
|
overridevirtual |
Change the color of the node for animation purposes.
579 dispStr.setTagArg(
"t", 0,
"INIT");
583 dispStr.setTagArg(
"t", 0,
"SLEEP");
587 dispStr.setTagArg(
"t", 0,
"CCA");
593 dispStr.setTagArg(
"t", 0,
"SEND");
600 dispStr.setTagArg(
"t", 0,
"WAIT");
604 dispStr.setTagArg(
"t", 0,
"");
◆ scheduleWakeUp()
| void inet::BMac::scheduleWakeUp |
( |
| ) |
|
|
protected |
◆ sendDataPacket()
| void inet::BMac::sendDataPacket |
( |
| ) |
|
|
protected |
Internal function to send the first packet in the queue.
522 const auto& hdr = pkt->peekAtFront<BMacDataFrameHeader>();
◆ sendMacAck()
| void inet::BMac::sendMacAck |
( |
| ) |
|
|
protected |
Internal function to send an ACK.
Send one short preamble packet immediately.
179 auto ack = makeShared<BMacControlFrame>();
185 auto packet =
new Packet(
"BMacAck");
187 packet->insertAtFront(ack);
◆ sendPreamble()
| void inet::BMac::sendPreamble |
( |
| ) |
|
|
protected |
Internal function to send one preamble.
Send one short preamble packet immediately.
159 auto preamble = makeShared<BMacControlFrame>();
165 auto packet =
new Packet(
"Preamble");
167 packet->insertAtFront(preamble);
◆ ack_timeout
| cMessage* inet::BMac::ack_timeout = nullptr |
|
protected |
◆ ack_tx_over
| cMessage* inet::BMac::ack_tx_over = nullptr |
|
protected |
◆ animation
| bool inet::BMac::animation = false |
|
protected |
Animate (colorize) the nodes.
The color of the node reflects its basic status (not the exact state!) BLACK - node is sleeping GREEN - node is receiving YELLOW - node is sending
◆ bitrate
| double inet::BMac::bitrate = 0 |
|
protected |
The bitrate of transmission.
◆ cca_timeout
| cMessage* inet::BMac::cca_timeout = nullptr |
|
protected |
◆ checkInterval
| double inet::BMac::checkInterval = 0 |
|
protected |
◆ ctrlFrameLength
| b inet::BMac::ctrlFrameLength = b(0) |
|
protected |
◆ data_timeout
| cMessage* inet::BMac::data_timeout = nullptr |
|
protected |
◆ data_tx_over
| cMessage* inet::BMac::data_tx_over = nullptr |
|
protected |
◆ headerLength
| b inet::BMac::headerLength = b(0) |
|
protected |
◆ lastDataPktDestAddr
◆ lastDataPktSrcAddr
◆ macState
The current state of the protocol.
◆ maxTxAttempts
| int inet::BMac::maxTxAttempts = 0 |
|
protected |
Maximum transmission attempts per data packet, when ACKs are used.
◆ nbDroppedDataPackets
| long inet::BMac::nbDroppedDataPackets = 0 |
|
protected |
◆ nbMissedAcks
| long inet::BMac::nbMissedAcks = 0 |
|
protected |
◆ nbRecvdAcks
| long inet::BMac::nbRecvdAcks = 0 |
|
protected |
◆ nbRxDataPackets
| long inet::BMac::nbRxDataPackets = 0 |
|
protected |
◆ nbRxPreambles
| long inet::BMac::nbRxPreambles = 0 |
|
protected |
◆ nbTxAcks
| long inet::BMac::nbTxAcks = 0 |
|
protected |
◆ nbTxDataPackets
| long inet::BMac::nbTxDataPackets = 0 |
|
protected |
◆ nbTxPreambles
| long inet::BMac::nbTxPreambles = 0 |
|
protected |
◆ radio
◆ resend_data
| cMessage* inet::BMac::resend_data = nullptr |
|
protected |
◆ send_ack
| cMessage* inet::BMac::send_ack = nullptr |
|
protected |
◆ send_preamble
| cMessage* inet::BMac::send_preamble = nullptr |
|
protected |
◆ slotDuration
| double inet::BMac::slotDuration = 0 |
|
protected |
The duration of the slot in secs.
◆ start_bmac
| cMessage* inet::BMac::start_bmac = nullptr |
|
protected |
◆ stats
| bool inet::BMac::stats = false |
|
protected |
Gather stats at the end of the simulation.
◆ stop_preambles
| cMessage* inet::BMac::stop_preambles = nullptr |
|
protected |
◆ transmissionState
◆ txAttempts
| int inet::BMac::txAttempts = 0 |
|
protected |
◆ useMacAcks
| bool inet::BMac::useMacAcks = false |
|
protected |
Use MAC level acks or not.
◆ wakeup
| cMessage* inet::BMac::wakeup = nullptr |
|
protected |
The documentation for this class was generated from the following files:
opp_component_ptr< NetworkInterface > networkInterface
Definition: MacProtocolBase.h:30
@ WAIT_ACK_TX
Definition: BMac.h:138
@ BMAC_CCA_TIMEOUT
Definition: BMacHeader_m.h:83
@ SLEEP
Definition: BMac.h:130
long nbTxAcks
Definition: BMac.h:105
virtual void sendUp(cMessage *message)
Definition: MacProtocolBase.cc:59
@ BMAC_WAKE_UP
Definition: BMacHeader_m.h:81
bool isBroadcast() const
Returns true if this is the broadcast address (hex ff:ff:ff:ff:ff:ff).
Definition: MacAddress.h:121
simsignal_t linkBrokenSignal
Definition: Simsignals.cc:22
cMessage * stop_preambles
Definition: BMac.h:152
long nbRxDataPackets
Definition: BMac.h:100
@ BMAC_DATA
Definition: BMacHeader_m.h:76
@ INCORRECTLY_RECEIVED
Definition: Simsignals_m.h:71
cMessage * ack_timeout
Definition: BMac.h:145
bool animation
Animate (colorize) the nodes.
Definition: BMac.h:170
void sendDataPacket()
Internal function to send the first packet in the queue.
Definition: BMac.cc:516
static const Protocol bmac
Definition: Protocol.h:56
cMessage * data_timeout
Definition: BMac.h:154
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
@ RADIO_MODE_SLEEP
The radio is sleeping, frame reception or transmission is not possible, power consumption is minimal,...
Definition: IRadio.h:90
@ SEND_PREAMBLE
Definition: BMac.h:132
@ INIT
Definition: BMac.h:129
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down DispatchProtocolReq
Definition: IUdp-gates.txt:25
virtual void dropCurrentTxFrame(PacketDropDetails &details)
Definition: MacProtocolBase.cc:99
MacAddress lastDataPktSrcAddr
Definition: BMac.h:158
@ BMAC_PREAMBLE
Definition: BMacHeader_m.h:75
cMessage * ack_tx_over
Definition: BMac.h:150
void sendPreamble()
Internal function to send one preamble.
Definition: BMac.cc:157
static simsignal_t transmissionStateChangedSignal
This signal is emitted when the radio transmission state of the radio is changed.
Definition: IRadio.h:60
int txAttempts
Definition: BMac.h:160
@ SEND_DATA
Definition: BMac.h:134
@ RADIO_MODE_TRANSMITTER
The radio is prepared for frame transmission, frame reception is not possible, power consumption is l...
Definition: IRadio.h:104
simsignal_t packetDroppedSignal
Definition: Simsignals.cc:85
removed DscpReq Ipv4ControlInfo Ipv6ControlInfo up L3AddressInd DispatchProtocolReq L4PortInd Ipv4ControlInfo Ipv6ControlInfo down PacketProtocolTag
Definition: IUdp-gates.txt:25
double checkInterval
The duration of CCA.
Definition: BMac.h:179
virtual void handleSelfMessage(cMessage *) override
Handle self messages such as timers.
Definition: BMac.cc:207
@ WAIT_DATA
Definition: BMac.h:133
cMessage * wakeup
Definition: BMac.h:147
virtual Packet * dup() const override
Definition: Packet.h:171
@ RADIO_MODE_RECEIVER
The radio is prepared for frame reception, frame transmission is not possible, power consumption is l...
Definition: IRadio.h:97
ModuleRefByPar< physicallayer::IRadio > radio
The radio.
Definition: BMac.h:93
b headerLength
Length of the header.
Definition: BMac.h:174
MacAddress lastDataPktDestAddr
Definition: BMac.h:159
@ BMAC_START_BMAC
Definition: BMacHeader_m.h:80
Packet * currentTxFrame
Currently transmitted frame if any.
Definition: MacProtocolBase.h:35
long nbRxPreambles
Definition: BMac.h:101
double bitrate
The bitrate of transmission.
Definition: BMac.h:177
virtual void sendDown(cMessage *message)
Definition: MacProtocolBase.cc:66
physicallayer::IRadio::TransmissionState transmissionState
Definition: BMac.h:94
int upperLayerInGateId
Gate ids.
Definition: MacProtocolBase.h:24
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
@ BMAC_STOP_PREAMBLES
Definition: BMacHeader_m.h:86
@ TRANSMISSION_STATE_TRANSMITTING
The radio medium is busy, the radio is currently transmitting a signal.
Definition: IRadio.h:171
cMessage * send_ack
Definition: BMac.h:148
cMessage * start_bmac
Definition: BMac.h:146
@ BMAC_ACK_TIMEOUT
Definition: BMacHeader_m.h:79
@ OTHER_PACKET_DROP
Definition: Simsignals_m.h:84
value< int64_t, units::b > b
Definition: Units.h:1241
long nbMissedAcks
Definition: BMac.h:102
long nbTxDataPackets
Definition: BMac.h:98
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
double slotDuration
The duration of the slot in secs.
Definition: BMac.h:172
@ BMAC_ACK_TX_OVER
Definition: BMacHeader_m.h:84
cMessage * cca_timeout
Definition: BMac.h:149
@ WAIT_ACK
Definition: BMac.h:136
@ SEND_ACK
Definition: BMac.h:137
virtual void deleteCurrentTxFrame()
Definition: MacProtocolBase.cc:93
virtual void initialize(int stage) override
Definition: MacProtocolBase.cc:37
cMessage * resend_data
Definition: BMac.h:144
States macState
The current state of the protocol.
Definition: BMac.h:141
@ WAIT_TX_DATA_OVER
Definition: BMac.h:135
@ BMAC_DATA_TX_OVER
Definition: BMacHeader_m.h:87
@ BMAC_SEND_ACK
Definition: BMacHeader_m.h:82
void sendMacAck()
Internal function to send an ACK.
Definition: BMac.cc:177
queueing::IPacketQueue * getQueue(cGate *gate) const
Definition: MacProtocolBase.cc:157
b ctrlFrameLength
Definition: BMac.h:175
#define Enter_Method(...)
Definition: SelfDoc.h:71
void attachSignal(Packet *macPkt)
Internal function to attach a signal to the packet.
Definition: BMac.cc:560
TransmissionState
This enumeration specifies the transmission state of the radio.
Definition: IRadio.h:155
cMessage * send_preamble
Definition: BMac.h:151
virtual Packet * dequeuePacket()
Definition: MacProtocolBase.cc:175
void scheduleWakeUp()
Definition: BMac.cc:683
long nbTxPreambles
Definition: BMac.h:99
static const MacAddress BROADCAST_ADDRESS
The broadcast MAC address, ff:ff:ff:ff:ff:ff.
Definition: MacAddress.h:34
RadioMode
This enumeration specifies the requested operational mode of the radio.
Definition: IRadio.h:79
@ BMAC_ACK
Definition: BMacHeader_m.h:77
virtual MacAddress parseMacAddressParameter(const char *addrstr)
Definition: MacProtocolBase.cc:24
@ BMAC_DATA_TIMEOUT
Definition: BMacHeader_m.h:88
@ BMAC_SEND_PREAMBLE
Definition: BMacHeader_m.h:85
const Protocol * getProtocol(int protocolNumber) const
Definition: ProtocolGroup.cc:31
opp_component_ptr< queueing::IPacketQueue > txQueue
Messages received from upper layer and to be transmitted later.
Definition: MacProtocolBase.h:38
void decapsulate(Packet *packet)
Definition: BMac.cc:646
int maxTxAttempts
Maximum transmission attempts per data packet, when ACKs are used.
Definition: BMac.h:184
@ TRANSMISSION_STATE_IDLE
The radio is not transmitting a signal on the radio medium.
Definition: IRadio.h:166
bool useMacAcks
Use MAC level acks or not.
Definition: BMac.h:181
void encapsulate(Packet *packet)
Definition: BMac.cc:658
virtual bool canDequeuePacket() const
Definition: MacProtocolBase.cc:170
@ NOT_ADDRESSED_TO_US
Definition: Simsignals_m.h:76
cMessage * data_tx_over
Definition: BMac.h:153
long nbDroppedDataPackets
Definition: BMac.h:104
INET_API InitStage INITSTAGE_LINK_LAYER
Initialization of link-layer protocols.
@ CCA
Definition: BMac.h:131
static ProtocolGroup ethertype
Definition: ProtocolGroup.h:40
static simsignal_t radioModeChangedSignal
This signal is emitted when the radio mode of the radio is changed.
Definition: IRadio.h:42
@ BMAC_RESEND_DATA
Definition: BMacHeader_m.h:78
long nbRecvdAcks
Definition: BMac.h:103