FNSS ns-3 adapter
ns-3 adapter for the Fast Network Simulation Setup (FNSS) toolchain
 All Classes Files Functions Typedefs Pages
fnss-simulation.h
1 #ifndef FNSS_SIMULATION_H
2 #define FNSS_SIMULATION_H
3 
4 #include "ns3/topology.h"
5 #include "ns3/event-schedule.h"
6 #include "ns3/fnss-event.h"
7 
8 #include "ns3/core-module.h"
9 #include "ns3/internet-module.h"
10 #include "ns3/applications-module.h"
11 #include "ns3/point-to-point-module.h"
12 
13 #include <string>
14 #include <map>
15 #include <list>
16 
17 namespace ns3 {
18 
23 public:
29  FNSSSimulation(const std::string &file);
30 
36  FNSSSimulation(const fnss::Topology &topology);
37 
45  void scheduleEvents(const std::string &file);
46 
54  void scheduleEvents(const fnss::EventSchedule &schedule);
55 
61  void assignIPv4Addresses(const Ipv4Address &base = Ipv4Address("10.0.0.0"));
62 
69  PointToPointHelper& getP2PHHelper();
70 
77  Ptr<Node> getNode(const std::string &id) const;
78 
85  std::list<NetDeviceContainer> getAllEdgeDevices() const;
86 
94  std::map <std::string, Ptr <Application> > getApplications(const std::string &id) const;
95 
96 private:
97  void applyProperties(Ptr <Object> target, const fnss::PropertyContainer &properties);
98 
99  void buildTopology(const fnss::Topology &topology);
100 
101  void doEvents(const fnss::EventSchedule &schedule);
102 
103  typedef struct {
104  Ptr <Node> m_ptr;
105  std::map <std::string, Ptr <Application> > m_applications;
106  } NodesValue;
107 
108  typedef std::map<std::string, NodesValue> NodesMap;
109  NodesMap m_nodes;
110 
111  std::list<NetDeviceContainer> m_links;
112 
113  PointToPointHelper m_p2p;
114 
115  std::list<Ptr<EventImpl> > track;
116  std::list<Ptr<FNSSEvent> > track2;
117 };
118 }
119 
120 #endif //FNSS_SIMULATION_H
Definition: event-schedule.h:21
std::map< std::string, Ptr< Application > > getApplications(const std::string &id) const
Definition: fnss-simulation.cc:57
Definition: topology.h:22
std::list< NetDeviceContainer > getAllEdgeDevices() const
Definition: fnss-simulation.cc:42
void assignIPv4Addresses(const Ipv4Address &base=Ipv4Address("10.0.0.0"))
Definition: fnss-simulation.cc:46
Definition: fnss-simulation.h:22
FNSSSimulation(const std::string &file)
Definition: fnss-simulation.cc:19
PointToPointHelper & getP2PHHelper()
Definition: fnss-simulation.cc:33
Definition: property-container.h:15
void scheduleEvents(const std::string &file)
Definition: fnss-simulation.cc:24
Ptr< Node > getNode(const std::string &id) const
Definition: fnss-simulation.cc:37