mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 09:27:45 +00:00
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
![]() |
|
||
|
|
||
|
#ifndef MODULES_HPP
|
||
|
#define MODULES_HPP
|
||
|
|
||
|
#include "ns3/command-line.h"
|
||
|
#include "ns3/config.h"
|
||
|
#include "ns3/string.h"
|
||
|
#include "ns3/log.h"
|
||
|
#include "ns3/yans-wifi-helper.h"
|
||
|
#include "ns3/ssid.h"
|
||
|
#include "ns3/mobility-helper.h"
|
||
|
#include "ns3/on-off-helper.h"
|
||
|
#include "ns3/yans-wifi-channel.h"
|
||
|
#include "ns3/mobility-model.h"
|
||
|
#include "ns3/packet-sink.h"
|
||
|
#include "ns3/packet-sink-helper.h"
|
||
|
#include "ns3/udp-echo-helper.h"
|
||
|
#include "ns3/tcp-westwood.h"
|
||
|
#include "ns3/internet-stack-helper.h"
|
||
|
#include "ns3/ipv4-address-helper.h"
|
||
|
#include "ns3/ipv4-global-routing-helper.h"
|
||
|
#include "ns3/constant-position-mobility-model.h"
|
||
|
#include "ns3/energy-module.h"
|
||
|
#include "ns3/wifi-radio-energy-model-helper.h"
|
||
|
#include "ns3/point-to-point-helper.h"
|
||
|
|
||
|
// C++ library
|
||
|
#include <iostream>
|
||
|
#include <utility> // To use std::pair
|
||
|
#include <iomanip>
|
||
|
|
||
|
using namespace ns3;
|
||
|
|
||
|
// Data types
|
||
|
typedef std::pair<NodeContainer,NodeContainer> CellNodes; // Format (APNode, SensorsNodes)
|
||
|
typedef std::pair<NetDeviceContainer,NetDeviceContainer> CellNetDevices; // Format (APNetDev, SensorsNetDev)
|
||
|
typedef std::pair<CellNodes,CellNetDevices> Cell;
|
||
|
typedef std::pair<Ipv4Address,int> EndPoint; // Format (IP,Port)
|
||
|
typedef std::pair<NodeContainer,EndPoint> CloudInfos; // Format (CloudHops,CloudEndPoint), here data sent to CloudEndPoint
|
||
|
// via CloudHops.Get(0) will flow throw all hops until the reaching the cloud
|
||
|
|
||
|
// Platform functions
|
||
|
Cell createCell(uint32_t nbSensors, Ptr<ns3::Node> ap);
|
||
|
CloudInfos buildEdgeAndCloud(int nbOp);
|
||
|
void applyScenarios(Cell cell,int sensorsPktSize, int sensorsSendInterval, CloudInfos cloudInfos);
|
||
|
|
||
|
// Energy functions
|
||
|
void setupEnergy(Cell cell);
|
||
|
|
||
|
|
||
|
// Callbacks
|
||
|
void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address &address);
|
||
|
void EnergyUpdated(std::string nodeName,double oldValue, double newValue);
|
||
|
|
||
|
#endif
|