A Discrete-Event Network Simulator
API
BasicEnergyUpdateTest Class Reference

Test case of update remaining energy for BasicEnergySource and WifiRadioEnergyModel. More...

+ Collaboration diagram for BasicEnergyUpdateTest:

Public Member Functions

 BasicEnergyUpdateTest ()
 
virtual ~BasicEnergyUpdateTest ()
 
bool DoRun ()
 Performs some tests involving state updates and the relative energy consumption. More...
 

Private Member Functions

bool StateSwitchTest (WifiPhyState state)
 

Private Attributes

ObjectFactory m_deviceEnergyModel
 Device energy model factory. More...
 
ObjectFactory m_energySource
 Energy source factory. More...
 
double m_timeS
 Time in seconds. More...
 
double m_tolerance
 Tolerance for power estimation. More...
 

Detailed Description

Test case of update remaining energy for BasicEnergySource and WifiRadioEnergyModel.

Definition at line 44 of file basic-energy-model-test.cc.

Constructor & Destructor Documentation

◆ BasicEnergyUpdateTest()

BasicEnergyUpdateTest::BasicEnergyUpdateTest ( )

Definition at line 74 of file basic-energy-model-test.cc.

◆ ~BasicEnergyUpdateTest()

BasicEnergyUpdateTest::~BasicEnergyUpdateTest ( )
virtual

Definition at line 80 of file basic-energy-model-test.cc.

Member Function Documentation

◆ DoRun()

bool BasicEnergyUpdateTest::DoRun ( void  )

Performs some tests involving state updates and the relative energy consumption.

Returns
true is some error happened.

Definition at line 85 of file basic-energy-model-test.cc.

References CCA_BUSY, IDLE, RX, SLEEP, SWITCHING, and TX.

◆ StateSwitchTest()

Member Data Documentation

◆ m_deviceEnergyModel

ObjectFactory BasicEnergyUpdateTest::m_deviceEnergyModel
private

Device energy model factory.

Definition at line 71 of file basic-energy-model-test.cc.

◆ m_energySource

ObjectFactory BasicEnergyUpdateTest::m_energySource
private

Energy source factory.

Definition at line 70 of file basic-energy-model-test.cc.

◆ m_timeS

double BasicEnergyUpdateTest::m_timeS
private

Time in seconds.

Definition at line 67 of file basic-energy-model-test.cc.

◆ m_tolerance

double BasicEnergyUpdateTest::m_tolerance
private

Tolerance for power estimation.

Definition at line 68 of file basic-energy-model-test.cc.


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