Public Member Functions | Protected Attributes

ChannelState Class Reference
[decider - decider modules]

Provides information about the current state of the channel: More...

#include <ChannelState.h>

List of all members.

Public Member Functions

 ChannelState (bool isIdle=false, double rssi=0.0)
 Creates and initializes a new ChannelState with the passed state.
bool isIdle () const
 Returns true if the channel is considered idle, meaning depends on the used decider.
double getRSSI () const
 Returns the current RSSI value of the channel.
std::string info () const
 Output for this ChannelState.

Protected Attributes

bool idle
 defines if the channel is currently idle
double rssi
 the current RSSI value of the channel

Detailed Description

Provides information about the current state of the channel:

idle/busy - is the physical currently receiving something? RSSI - the currently received signal strength indicator.

Definition at line 14 of file ChannelState.h.


Constructor & Destructor Documentation

ChannelState::ChannelState ( bool  isIdle = false,
double  rssi = 0.0 
) [inline]

Creates and initializes a new ChannelState with the passed state.

isIdle - defines if the channel is currently idle rssi - the current RSSI value of the channel

Definition at line 31 of file ChannelState.h.

                                                       :
    idle(isIdle), rssi(rssi) {}


Member Function Documentation

std::string ChannelState::info (  )  const [inline]

Output for this ChannelState.

Of the form "[<idle/busy> with rssi of x]".

Definition at line 50 of file ChannelState.h.

References idle, and rssi.

Referenced by Mac80211::beginNewCycle().

                         {
    std::stringstream os;
    if (idle) {
      os << "[idle with rssi of ";
    } else {
      os << "[busy with rssi of ";
    }
    os << rssi << "]";
    return os.str();
  }


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