Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove one of the many pimple: HostModel::p_cpuModel
[simgrid.git] / src / surf / ns3 / ns3_simulator.h
1 /* Copyright (c) 2007-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _NS3_SIM_H
8 #define _NS3_SIM_H
9
10 #ifdef __cplusplus
11
12 #include "ns3/core-module.h"
13 #include "my-point-to-point-helper.h"
14
15 #include "ns3/node.h"
16 #include "ns3/global-route-manager.h"
17 #include "ns3/csma-helper.h"
18 #include "ns3/internet-stack-helper.h"
19 #include "ns3/ipv4-address-helper.h"
20 #include "ns3/point-to-point-helper.h"
21 #include "ns3/packet-sink-helper.h"
22 #include "ns3/inet-socket-address.h"
23 #include "ns3/tcp-socket-factory.h"
24
25 using namespace ns3;
26 using namespace std;
27
28 struct MySocket{
29   uint32_t bufferedBytes;
30   uint32_t sentBytes;
31   uint32_t remaining;
32   uint32_t totalBytes;
33   char finished;
34   void* action;
35 };
36
37 //Simulator s;
38 class NS3Sim {
39
40 private:
41
42 public:
43   NS3Sim();
44   ~NS3Sim();
45   void create_flow_NS3(Ptr<Node> src,
46             Ptr<Node> dst,
47             uint16_t port_number,
48             double start,
49             const char *addr,
50             uint32_t TotalBytes,
51             void * action);
52   void simulator_start(double min);
53   void* get_action_from_socket(void *socket);
54   double get_remains_from_socket(void *socket);
55   double get_sent_from_socket(void *socket);
56   char get_finished(void *socket);
57 };
58
59 #endif                          /* __cplusplus */
60
61 #endif