Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3] cosmetics, variable names should start with lowercase
[simgrid.git] / src / surf / ns3 / ns3_simulator.h
1 /* Copyright (c) 2007, 2008, 2009, 2010. 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 "ns3/helper-module.h"
14 #include "ns3/simulator-module.h"
15 #include "ns3/node-module.h"
16 #include "ns3/helper-module.h"
17 #include "ns3/global-routing-module.h"
18 #include "ns3/tcp-socket-factory.h"
19
20 using namespace ns3;
21 using namespace std;
22
23 struct MySocket{
24   uint32_t bufferedBytes;
25   uint32_t sentBytes;
26   uint32_t remaining;
27   uint32_t totalBytes;
28   uint32_t last_amount_sent;
29   char finished;
30   void* action;
31 };
32
33 //Simulator s;
34 class NS3Sim {
35
36 private:
37
38 public:
39         NS3Sim();
40         ~NS3Sim();
41         void create_flow_NS3(Ptr<Node> src,
42                                                 Ptr<Node> dst,
43                                                 uint16_t port_number,
44                                                 double start,
45                                                 const char *addr,
46                                                 uint32_t TotalBytes,
47                                                 void * action);
48         void simulator_stop(double min);
49         void simulator_start(void);
50         void* get_action_from_socket(void *socket);
51         double get_remains_from_socket(void *socket);
52         double get_last_amount_sent_from_socket(void *socket);
53         void reset_last_amount_sent_from_socket(void *socket);
54         char get_finished(void *socket);
55 };
56
57 #endif                          /* __cplusplus */
58
59 #endif