diff options
| author | Loic Guegan <manzerberdes@gmx.com> | 2019-04-12 14:48:47 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerberdes@gmx.com> | 2019-04-12 14:48:47 +0200 |
| commit | cb10ad2490706fc87f19ef556f36aee679887ad6 (patch) | |
| tree | a93d1ca9194eea7fb10633a315d177ef6e2d0ba4 /ns3-simulator/main.cc | |
| parent | 927283437161307a23a954b42297412ba03a619c (diff) | |
Refactoring
Diffstat (limited to 'ns3-simulator/main.cc')
| -rw-r--r-- | ns3-simulator/main.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ns3-simulator/main.cc b/ns3-simulator/main.cc index 0c5c405..0e21632 100644 --- a/ns3-simulator/main.cc +++ b/ns3-simulator/main.cc @@ -3,6 +3,9 @@ NS_LOG_COMPONENT_DEFINE ("WIFISensorsSimulator"); +/** + * To get more details about functions please have a look at modules/modules.hpp + */ int main(int argc, char* argv[]){ uint32_t sensorsFrequency=1; @@ -20,22 +23,19 @@ int main(int argc, char* argv[]){ //LogComponentEnable("UdpEchoClientApplication", LOG_LEVEL_INFO); //LogComponentEnable("PacketSink", LOG_LEVEL_INFO); - // Setup Simulations - CloudInfos cloud=buildEdgeAndCloud(nbHop); - Cell c=createCell(sensorsNumber,cloud.first.Get(0)); - applyScenarios(c,sensorsPktSize,sensorsFrequency,cloud); // Send data from Sensors to Cloud - // setupEnergy(c); - Ipv4GlobalRoutingHelper::PopulateRoutingTables (); - - + // ---------- Setup Simulations ---------- + CloudInfos cloud=createCloud(nbHop,5,2); // Create cloud P2P node chain o--o--o--o--o + Cell cell=createCell(sensorsNumber,cloud.first.Get(0)); // Use first cloud node as Access Point + setupScenario(cell,cloud,sensorsPktSize,sensorsFrequency); // Send data from Sensors to Cloud + setupCellEnergy(cell); + // Don't forget the following + Ipv4GlobalRoutingHelper::PopulateRoutingTables (); - // Run simulators + // Run Simulations Simulator::Stop (Seconds (20)); Simulator::Run (); - Simulator::Destroy (); // Destroy - + Simulator::Destroy (); - return(0); } |
