This class is the interface for a Decider to the BasePhyLayer. More...
#include <DeciderToPhyInterface.h>
Inherited by BasePhyLayer.
Public Types | |
typedef std::list< AirFrame * > | AirFrameVector |
Type for container of AirFrames. | |
Public Member Functions | |
virtual void | getChannelInfo (simtime_t from, simtime_t to, AirFrameVector &out)=0 |
Fills the passed AirFrameVector with all AirFrames that intersect with the time interval [from, to]. | |
virtual ConstMapping * | getThermalNoise (simtime_t from, simtime_t to)=0 |
Returns a Mapping which defines the thermal noise in the passed time frame (in mW). | |
virtual void | sendControlMsg (cMessage *msg)=0 |
Called by the Decider to send a control message to the MACLayer. | |
virtual void | sendUp (AirFrame *packet, DeciderResult *result)=0 |
Called to send an AirFrame with DeciderResult to the MACLayer. | |
virtual simtime_t | getSimTime ()=0 |
Returns the current simulation time. | |
virtual void | cancelScheduledMessage (cMessage *msg)=0 |
Tells the PhyLayer to cancel a scheduled message (AirFrame or ControlMessage). | |
virtual void | rescheduleMessage (cMessage *msg, simtime_t t)=0 |
Tells the PhyLayer to reschedule a message (AirFrame or ControlMessage). | |
virtual void | drawCurrent (double amount, int activity)=0 |
Enables the Decider to draw Power from the phy layers power accounts. | |
virtual BaseUtility * | getUtility ()=0 |
Returns a pointer to the hosts utility-module. | |
virtual BaseWorldUtility * | getWorldUtility ()=0 |
Returns a pointer to the simulations world-utility-module. | |
virtual void | recordScalar (const char *name, double value, const char *unit=NULL)=0 |
Utility method to enable a Decider, which isn't an OMNeT-module, to use the OMNeT-method 'recordScalar' with the help of and through its interface to BasePhyLayer. | |
virtual int | getCurrentRadioChannel ()=0 |
Returns the channel currently used by the radio. |
This class is the interface for a Decider to the BasePhyLayer.
The Decider can do the following things using it:
Definition at line 37 of file DeciderToPhyInterface.h.
typedef std::list<AirFrame*> DeciderToPhyInterface::AirFrameVector |
Type for container of AirFrames.
Used as out-value in "getChannelInfo" method.
Definition at line 45 of file DeciderToPhyInterface.h.
virtual void DeciderToPhyInterface::cancelScheduledMessage | ( | cMessage * | msg | ) | [pure virtual] |
Tells the PhyLayer to cancel a scheduled message (AirFrame or ControlMessage).
Used by the Decider if it doesn't need to handle an AirFrame or ControlMessage again anymore.
Referenced by BaseDecider::channelStateChanged().
virtual void DeciderToPhyInterface::drawCurrent | ( | double | amount, | |
int | activity | |||
) | [pure virtual] |
Enables the Decider to draw Power from the phy layers power accounts.
Does nothing if no Battery module in simulation is present.
Referenced by Decider80211Battery::setChannelIdleStatus().
virtual ConstMapping* DeciderToPhyInterface::getThermalNoise | ( | simtime_t | from, | |
simtime_t | to | |||
) | [pure virtual] |
Returns a Mapping which defines the thermal noise in the passed time frame (in mW).
The implementing class of this method keeps ownership of the Mapping.
Referenced by BaseDecider::calculateRSSIMapping().
virtual void DeciderToPhyInterface::recordScalar | ( | const char * | name, | |
double | value, | |||
const char * | unit = NULL | |||
) | [pure virtual] |
Utility method to enable a Decider, which isn't an OMNeT-module, to use the OMNeT-method 'recordScalar' with the help of and through its interface to BasePhyLayer.
The method-signature is taken from OMNeTs 'ccomponent.h' but made pure virtual here. See the original method-description below:
Records a double into the scalar result file.
Referenced by DeciderUWBIRED::finish(), and Decider802154Narrow::finish().
virtual void DeciderToPhyInterface::rescheduleMessage | ( | cMessage * | msg, | |
simtime_t | t | |||
) | [pure virtual] |
Tells the PhyLayer to reschedule a message (AirFrame or ControlMessage).
Used by the Decider if it has to handle an AirFrame or an control message earlier than it has returned to the PhyLayer the last time the Decider handled that message.
Referenced by BaseDecider::channelStateChanged().
virtual void DeciderToPhyInterface::sendControlMsg | ( | cMessage * | msg | ) | [pure virtual] |
Called by the Decider to send a control message to the MACLayer.
This function can be used to answer a ChannelSenseRequest to the MACLayer
Referenced by SNRThresholdDecider::answerCSR(), BaseDecider::answerCSR(), DeciderUWBIRED::handleChannelSenseRequest(), Decider802154Narrow::processSignalEnd(), Decider80211::processSignalEnd(), and Decider802154Narrow::processSignalHeader().
virtual void DeciderToPhyInterface::sendUp | ( | AirFrame * | packet, | |
DeciderResult * | result | |||
) | [pure virtual] |
Called to send an AirFrame with DeciderResult to the MACLayer.
When a packet is completely received and not noise, the Decider call this function to send the packet together with the corresponding DeciderResult up to MACLayer
Referenced by ThresholdDecider::handleSignalOver(), SNRThresholdDecider::processSignalEnd(), Decider802154Narrow::processSignalEnd(), Decider80211::processSignalEnd(), and BaseDecider::processSignalEnd().