A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-sleep.cc File Reference
#include "ns3/basic-energy-source-helper.h"
#include "ns3/command-line.h"
#include "ns3/config.h"
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
#include "ns3/mobility-model.h"
#include "ns3/on-off-helper.h"
#include "ns3/packet-sink-helper.h"
#include "ns3/string.h"
#include "ns3/wifi-net-device.h"
#include "ns3/wifi-radio-energy-model-helper.h"
#include "ns3/wifi-utils.h"
#include "ns3/yans-wifi-channel.h"
#include "ns3/yans-wifi-helper.h"
+ Include dependency graph for wifi-sleep.cc:

Go to the source code of this file.

Functions

template<int node>
void PhyStateTrace (std::string context, Time start, Time duration, WifiPhyState state)
 PHY state trace sink.
 
template<int node>
void RemainingEnergyTrace (double oldValue, double newValue)
 Remaining energy trace sink.
 

Detailed Description

Usage

$ ./ns3 run "wifi-sleep [Program Options]"

Program Options

--dataRate
Data rate [1Mbps]
--packetSize
size of application packet sent [1000]
--duration
duration (seconds) of the experiment [10]
--initialEnergy
Initial Energy (Joule) of each node [7.5]
--voltage
Supply voltage (Joule) [3]
--txPowerStart
Minimum available transmission level (dbm) [0]
--txPowerEnd
Maximum available transmission level (dbm) [15]
--nTxPowerLevels
Number of transmission power levels available between txPowerStart and txPowerEnd included [16]
--txPowerLevel
Transmission power level [0]
--idleCurrent
The radio Idle current in Ampere [0.273]
--txCurrent
The radio Tx current in Ampere [0.38]
--verbose
turn on all WifiNetDevice log components [false]

Definition in file wifi-sleep.cc.

Function Documentation

◆ PhyStateTrace()

template<int node>
void PhyStateTrace ( std::string  context,
Time  start,
Time  duration,
WifiPhyState  state 
)

PHY state trace sink.

Template Parameters
nodeThe node ID this trace belongs to.
Parameters
contextThe context
startStart time for the current state
durationDuratio of the current state
stateState

Definition at line 98 of file wifi-sleep.cc.

References ns3::Time::GetSeconds(), and ns3::Simulator::Now().

+ Here is the call graph for this function:

◆ RemainingEnergyTrace()

template<int node>
void RemainingEnergyTrace ( double  oldValue,
double  newValue 
)

Remaining energy trace sink.

Template Parameters
nodeThe node ID this trace belongs to.
Parameters
oldValueOld value.
newValueNew value.

Definition at line 77 of file wifi-sleep.cc.

References ns3::Time::GetSeconds(), and ns3::Simulator::Now().

+ Here is the call graph for this function: