1 /* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #include "simgrid/msg.h"
10 #include "broadcaster.h"
13 /** @addtogroup MSG_examples
15 * - <b>chainsend: MSG implementation of a file broadcasting system, similar to Kastafior (from Kadeploy).</b>.
18 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_chainsend, "Messages specific for chainsend");
20 int main(int argc, char *argv[])
22 msg_error_t res = MSG_OK;
24 MSG_init(&argc, argv);
26 MSG_create_environment(argv[1]);
28 /* Trace categories */
29 TRACE_category_with_color("host0", "0 0 1");
30 TRACE_category_with_color("host1", "0 1 0");
31 TRACE_category_with_color("host2", "0 1 1");
32 TRACE_category_with_color("host3", "1 0 0");
33 TRACE_category_with_color("host4", "1 0 1");
34 TRACE_category_with_color("host5", "0 0 0");
35 TRACE_category_with_color("host6", "1 1 0");
36 TRACE_category_with_color("host7", "1 1 1");
37 TRACE_category_with_color("host8", "0 1 0");
39 /* Application deployment */
40 MSG_function_register("broadcaster", broadcaster);
41 MSG_function_register("peer", peer);
43 MSG_launch_application(argv[2]);
47 XBT_INFO("Total simulation time: %e", MSG_get_clock());