Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr/gitroot/simgrid/simgrid
[simgrid.git] / examples / msg / chainsend / broadcaster.h
index e0c026c..e9aca94 100644 (file)
@@ -1,13 +1,13 @@
-#ifndef KADEPLOY_BROADCASTER_H
-#define KADEPLOY_BROADCASTER_H
+/* Copyright (c) 2012-2015. The SimGrid Team.
+ * All rights reserved.                                                     */
 
-#include "msg/msg.h"
-#include "xbt/sysdep.h"
+/* 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. */
 
-/* Create a log channel to have nice outputs. */
-#include "xbt/log.h"
-#include "xbt/asserts.h"
+#ifndef BROADCASTER_H
+#define BROADCASTER_H
 
+#include "xbt/dynar.h"
 #include "messages.h"
 #include "iterator.h"
 #include "common.h"
@@ -15,9 +15,9 @@
 /* Connection parameters */
 #define MAX_PENDING_SENDS 10
 
-/* ``File'' details */
-#define PIECE_SIZE 16384
-#define PIECE_COUNT 50
+/* Default values for the ``file'' details */
+#define PIECE_SIZE 65536
+#define PIECE_COUNT 16384
 
 /* Broadcaster struct */
 typedef struct s_broadcaster {
@@ -33,13 +33,11 @@ typedef struct s_broadcaster {
 xbt_dynar_t build_hostlist_from_hostcount(int hostcount); 
 
 /* Broadcaster: helper functions */
-broadcaster_t broadcaster_init(xbt_dynar_t host_list);
+broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count);
 int broadcaster_build_chain(broadcaster_t bc);
 int broadcaster_send_file(broadcaster_t bc);
-int broadcaster_finish(broadcaster_t bc);
-static void broadcaster_destroy(broadcaster_t bc);
 
 /* Tasks */
 int broadcaster(int argc, char *argv[]);
 
-#endif /* KADEPLOY_BROADCASTER_H */
+#endif /* BROADCASTER_H */