Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / src / surf / gtnets / gtnets_simulator.h
index 04490f2..9549978 100644 (file)
@@ -1,5 +1,5 @@
-/*     $Id$     */
-/* Copyright (c) 2007 Kayo Fujiwara. All rights reserved.                  */
+/* Copyright (c) 2007-2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -26,6 +26,7 @@
 #include "tcp-newreno.h"
 #include "event.h"
 #include "routing-manual.h"
+#include "red.h"
 
 using namespace std;
 
@@ -34,6 +35,7 @@ class GTSim {
 
 public:
   GTSim();
+  GTSim(int WindowSize);
   ~GTSim();
 public:
   int add_link(int id, double bandwidth, double latency);
@@ -42,13 +44,15 @@ public:
   int add_router(int id);
   int create_flow(int src, int dst, long datasize, void *metadata);
   double get_time_to_next_flow_completion();
-  int run_until_next_flow_completion(void ***metadata, int *number_of_flows);
+  int run_until_next_flow_completion(void ***metadata,
+                                     int *number_of_flows);
   int run(double deltat);
   // returns the total received by the TCPServer peer of the given action
   double gtnets_get_flow_rx(void *metadata);
   void create_gtnets_topology();
   void print_topology();
   void set_jitter(double);
+  void set_jitter_seed(int);
 private:
   void add_nodes();
   void node_connect();
@@ -58,22 +62,23 @@ private:
   Simulator *sim_;
   GTNETS_Topology *topo_;
   RoutingManual *rm_;
+  REDQueue *red_queue_;
   int nnode_;
   int is_topology_;
   int nflow_;
   double jitter_;
-  Uniform *uniform_jitter_;
+  int jitter_seed_;
+   map < int, Uniform * >uniform_jitter_generator_;
 
-    map < int, TCPServer * >gtnets_servers_;
-    map < int, TCPSend * >gtnets_clients_;
-    map < int, Linkp2p * >gtnets_links_;
-    map < int, Node * >gtnets_nodes_;
-  //added by pedro in order to get statistics
-    map < void *, int >gtnets_action_to_flow_;
+   map < int, TCPServer * >gtnets_servers_;
+   map < int, TCPSend * >gtnets_clients_;
+   map < int, Linkp2p * >gtnets_links_;
+   map < int, Node * >gtnets_nodes_;
+   map < void *, int >gtnets_action_to_flow_;
 
-    map < int, void *>gtnets_metadata_;
+   map < int, void *>gtnets_metadata_;
 };
 
-#endif /* __cplusplus */
+#endif                          /* __cplusplus */
 
 #endif