Public Member Functions | Protected Types | Protected Attributes

Decider Class Reference
[decider - decider modules]

The basic Decider class. More...

#include <Decider.h>

Inherited by BaseDecider, DeciderUWBIRED, and ThresholdDecider.

Collaboration diagram for Decider:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Decider (DeciderToPhyInterface *phy)
 Initializes the Decider with a pointer to its PhyLayer.
virtual simtime_t processSignal (AirFrame *frame)
 This function processes a AirFrame given by the PhyLayer and returns the time point when Decider wants to be given the AirFrame again.
virtual ChannelState getChannelState ()
 A function that returns information about the channel state.
virtual simtime_t handleChannelSenseRequest (ChannelSenseRequest *request)
 This function is called by the PhyLayer to hand over a ChannelSenseRequest.
virtual void finish ()
 Method to be called by an OMNeT-module during its own finish(), to enable a decider to do some things.
virtual void channelChanged (int newChannel)
 Called by phy layer to indicate that the channel this radio currently listens to has changed.

Protected Types

typedef
DeciderToPhyInterface::AirFrameVector 
AirFrameVector
 Defines what an AirFrameVector shall be here.

Protected Attributes

DeciderToPhyInterfacephy
 A pointer to the physical layer of this Decider.
const simtime_t notAgain
 simtime that tells the Phy-Layer not to pass an AirFrame again

Detailed Description

The basic Decider class.

The Deciders tasks are: 1. decide which packets should be handed up to the MAC Layer (primary task) 2. decide whether the channel is busy/idle at a time point or during a time interval (channel sensing)

BasePhyLayer hands every receiving AirFrame several times to the "processSignal()"-function and is returned a time point when to do so again.

Definition at line 68 of file Decider.h.


Member Function Documentation

virtual void Decider::channelChanged ( int  newChannel  )  [inline, virtual]

Called by phy layer to indicate that the channel this radio currently listens to has changed.

Sub-classing deciders which support multiple channels should override this method to handle the effects of channel changes on ongoing receptions.

Parameters:
newChannel The new channel the radio has changed to.

Reimplemented in Decider80211MultiChannel, and Decider802154Narrow.

Definition at line 134 of file Decider.h.

Referenced by BasePhyLayer::setCurrentRadioChannel().

{}

ChannelState Decider::getChannelState (  )  [virtual]

A function that returns information about the channel state.

It is an alternative for the MACLayer in order to obtain information immediately (in contrast to sending a ChannelSenseRequest, i.e. sending a cMessage over the OMNeT-control-channel)

Reimplemented in BaseDecider, DeciderUWBIRED, SNRThresholdDecider, and ThresholdDecider.

Definition at line 16 of file Decider.cc.

Referenced by BasePhyLayer::getChannelState().

                                      {

  return ChannelState();
}

simtime_t Decider::handleChannelSenseRequest ( ChannelSenseRequest *  request  )  [virtual]

This function is called by the PhyLayer to hand over a ChannelSenseRequest.

The MACLayer is able to send a ChannelSenseRequest to the PhyLayer that calls this function with it and is returned a time point when to re-call this function with the specific ChannelSenseRequest.

The Decider puts the result (ChannelState) to the ChannelSenseRequest and "answers" by calling the "sendControlMsg"-function on the DeciderToPhyInterface, i.e. telling the PhyLayer to send it back.

Reimplemented in BaseDecider, DeciderUWBIRED, and ThresholdDecider.

Definition at line 21 of file Decider.cc.

Referenced by BasePhyLayer::handleChannelSenseRequest().

                                                                         {

  return -1;
}


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