Public Member Functions | Protected Member Functions | Protected Attributes

UWBIRMac Class Reference
[IEEE 802.15.4A - Classes that implement the IEEE 802.15.4A UWB PHY.macLayer - MAC layer modules]

This class provides helper function for MAC modules that use the UWB-IR IEEE 802.15.4A model. More...

#include <UWBIRMac.h>

Inherits BaseMacLayer.

Inherited by AlohaMacLayer.

Collaboration diagram for UWBIRMac:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void initialize (int stage)
 Initialization of the module and some variables.
virtual void finish ()
 Called when the simulation has finished.

Protected Member Functions

void prepareData (UWBIRMacPkt *packet, IEEE802154A::config cfg=IEEE802154A::cfg_mandatory_4M)
void handleLowerMsg (cPacket *msg)
bool validatePacket (UWBIRMacPkt *mac)
void initCounters ()

Protected Attributes

bool debug
 Debug switch for all other modules.
bool stats
bool trace
bool rsDecoder
bool packetsAlwaysValid
double totalRxBits
double errRxBits
MacToPhyInterfacephy
 Handler to the physical layer.
Packet packet
int catPacket
int prf
cOutVector packetsBER
cOutVector dataLengths
cOutVector erroneousSymbols
cOutVector sentPulses
cOutVector receivedPulses
cOutVector meanPacketBER
cOutVector packetSuccessRate
cOutVector packetSuccessRateNoRS
cOutVector ber
cStdDev meanBER
cOutVector RSErrorRate
cOutVector success
cOutVector successNoRS
long nbReceivedPacketsNoRS
long nbReceivedPacketsRS
long nbSentPackets
long nbSymbolErrors
long nbSymbolsReceived
long nbHandledRxPackets
long nbFramesDropped

Detailed Description

This class provides helper function for MAC modules that use the UWB-IR IEEE 802.15.4A model.

Just before sending down a packet to the UWBIRPhyLayer, call prepareData(UWBIRMacPkt* packet). Just after receiving a packet from the UWBIRPhyLayer, call validatePacket(UWBIRMacPkt* packet) and check the returned bool value to know if the packet could be decoded successfully.

Definition at line 64 of file UWBIRMac.h.


Member Function Documentation

void UWBIRMac::initialize ( int  stage  )  [virtual]

Initialization of the module and some variables.

First we have to initialize the module from which we derived ours, in this case BaseLayer.

Reimplemented from BaseMacLayer.

Reimplemented in AlohaMacLayer.

Definition at line 42 of file UWBIRMac.cc.

References debug, Blackboard::getCategory(), phy, and BaseModule::utility.

                                   {
  BaseMacLayer::initialize(stage);
  if (stage == 0) {
    debug = par("debug").boolValue();
    stats = par("stats").boolValue();
    trace = par("trace").boolValue();
    prf = par("PRF");
    assert(prf == 4 || prf == 16);
    packetsAlwaysValid = par("packetsAlwaysValid");
    rsDecoder = par("RSDecoder").boolValue();
    phy = FindModule<MacToPhyInterface*>::findSubModule(
        this->getParentModule());
    initCounters();
    catPacket = utility->getCategory(&packet);
  }
}


The documentation for this class was generated from the following files: