ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

EnergyModel Class Reference

#include <energy-model.h>

Inheritance diagram for EnergyModel:

TclObject List of all members.

Public Types

enum  SleepState { WAITING = 0, POWERSAVING = 1, INROUTE = 2 }

Public Member Functions

 EnergyModel (MobileNode *n, double energy, double l1, double l2)
double energy () const
double initialenergy () const
double level1 () const
double level2 () const
void setenergy (double e)
virtual void DecrTxEnergy (double txtime, double P_tx)
virtual void DecrRcvEnergy (double rcvtime, double P_rcv)
virtual void DecrIdleEnergy (double idletime, double P_idle)
virtual double MaxTxtime (double P_tx)
virtual double MaxRcvtime (double P_rcv)
virtual double MaxIdletime (double P_idle)
void add_neighbor (u_int32_t)
void scan_neighbor ()
int getneighbors ()
double level1 ()
double level2 ()
int sleep ()
int state ()
float state_start_time ()
float & max_inroute_time ()
int & adaptivefidelity ()
int & powersavingflag ()
bool & node_on ()
float & total_sndtime ()
float & total_rcvtime ()
float & total_sleeptime ()
AdaptiveFidelityEntityafe ()
int & maxttl ()
virtual void set_node_sleep (int)
virtual void set_node_state (int)
virtual void add_rcvtime (float t)
virtual void add_sndtime (float t)
void start_powersaving ()

Protected Attributes

double energy_
double initialenergy_
double level1_
double level2_
struct {
   int   neighbor_cnt_
   neighbor_list_item *   head
int sleep_mode_
float total_sleeptime_
float total_rcvtime_
float total_sndtime_
int powersavingflag_
float last_time_gosleep
float max_inroute_time_
int maxttl_
int state_
float state_start_time_
int adaptivefidelity_
bool node_on_

Member Enumeration Documentation

enum EnergyModel::SleepState

Enumeration values:

Constructor & Destructor Documentation

EnergyModel::EnergyModel MobileNode   n,
double    energy,
double    l1,
double    l2

Member Function Documentation

int& EnergyModel::adaptivefidelity   [inline]

void EnergyModel::add_neighbor u_int32_t   

virtual void EnergyModel::add_rcvtime float    t [inline, virtual]

virtual void EnergyModel::add_sndtime float    t [inline, virtual]

AdaptiveFidelityEntity* EnergyModel::afe   [inline]

void EnergyModel::DecrIdleEnergy double    idletime,
double    P_idle

void EnergyModel::DecrRcvEnergy double    rcvtime,
double    P_rcv

void EnergyModel::DecrTxEnergy double    txtime,
double    P_tx

double EnergyModel::energy   const [inline]

int EnergyModel::getneighbors   [inline]

double EnergyModel::initialenergy   const [inline]

double EnergyModel::level1   [inline]

double EnergyModel::level1   const [inline]

double EnergyModel::level2   [inline]

double EnergyModel::level2   const [inline]

float& EnergyModel::max_inroute_time   [inline]

virtual double EnergyModel::MaxIdletime double    P_idle [inline, virtual]

virtual double EnergyModel::MaxRcvtime double    P_rcv [inline, virtual]

int& EnergyModel::maxttl   [inline]

virtual double EnergyModel::MaxTxtime double    P_tx [inline, virtual]

bool& EnergyModel::node_on   [inline]

int& EnergyModel::powersavingflag   [inline]

void EnergyModel::scan_neighbor  

void EnergyModel::set_node_sleep int    [virtual]

void EnergyModel::set_node_state int    [virtual]

void EnergyModel::setenergy double    e [inline]

int EnergyModel::sleep   [inline]

void EnergyModel::start_powersaving  

int EnergyModel::state   [inline]

float EnergyModel::state_start_time   [inline]

float& EnergyModel::total_rcvtime   [inline]

float& EnergyModel::total_sleeptime   [inline]

float& EnergyModel::total_sndtime   [inline]

Member Data Documentation

int EnergyModel::adaptivefidelity_ [protected]

AdaptiveFidelityEntity* EnergyModel::afe_ [protected]

double EnergyModel::energy_ [protected]

neighbor_list_item* EnergyModel::head [protected]

double EnergyModel::initialenergy_ [protected]

float EnergyModel::last_time_gosleep [protected]

double EnergyModel::level1_ [protected]

double EnergyModel::level2_ [protected]

float EnergyModel::max_inroute_time_ [protected]

int EnergyModel::maxttl_ [protected]

int EnergyModel::neighbor_cnt_ [protected]

struct { ... } EnergyModel::neighbor_list [protected]

MobileNode* EnergyModel::node_ [protected]

bool EnergyModel::node_on_ [protected]

int EnergyModel::powersavingflag_ [protected]

int EnergyModel::sleep_mode_ [protected]

SoftNeighborHandler* EnergyModel::snh_ [protected]

int EnergyModel::state_ [protected]

float EnergyModel::state_start_time_ [protected]

float EnergyModel::total_rcvtime_ [protected]

float EnergyModel::total_sleeptime_ [protected]

float EnergyModel::total_sndtime_ [protected]

The documentation for this class was generated from the following files:
This document is generated by doxygen.