mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 17:37:45 +00:00
Start some simulation tests
This commit is contained in:
parent
1399886f4d
commit
a6e70544bb
37 changed files with 53416 additions and 5509 deletions
|
@ -6,5 +6,11 @@ void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address
|
|||
}
|
||||
|
||||
void EnergyUpdated(std::string nodeName,double oldValue, double newValue){
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue-oldValue << "J" << " at time " << Simulator::Now ().GetSeconds () << "s");
|
||||
double currentTime=Simulator::Now ().GetSeconds ();
|
||||
double energyConsumes=newValue-oldValue;
|
||||
NS_LOG_UNCOND("Node " << nodeName << " consumes " << energyConsumes << "J" << " at time " << currentTime << "s");
|
||||
|
||||
NS_LOG_UNCOND("Node " << nodeName << " newVal " << newValue << "J" << " at time " << currentTime << "s");
|
||||
NS_LOG_UNCOND("Node " << nodeName << " oldValue " << oldValue << "J" << " at time " << currentTime << "s");
|
||||
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "ns3/point-to-point-helper.h"
|
||||
#include "ns3/ecofen-module.h"
|
||||
#include "ns3/node-list.h"
|
||||
#include "ns3/flow-monitor-module.h"
|
||||
|
||||
// C++ library
|
||||
#include <iostream> // Why not ?
|
||||
|
@ -33,11 +34,11 @@
|
|||
#include <iomanip> // To use std::setw
|
||||
|
||||
// ECOFEN
|
||||
#define ECOFEN_LOG_UNTIL 1
|
||||
#define ECOFEN_LOG_UNTIL 100
|
||||
#define ECOFEN_LOG_EVERY 0.1
|
||||
|
||||
// WIFI Energy Values
|
||||
#define BASICENERGYSOURCEINITIALENERGYJ 1000
|
||||
#define BASICENERGYSOURCEINITIALENERGYJ 2.9009
|
||||
#define BASICENERGYSUPPLYVOLTAGEV 3.3
|
||||
#define TXCURRENTA 0.38
|
||||
#define RXCURRENTA 0.313
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue