#include "deployment.h"
-namespace {
+#include <vector>
+#include <msg/msg.h>
+#include <xbt/dynar.h>
+#include <xbt/sysdep.h>
+#include "hostdata.h"
-}
void MY_launch_application()
{
+ xbt_assert(hostdata::size() >= 2);
+
+ const char* func = "simulation_main";
+ xbt_dynar_t p0_args = xbt_dynar_new(sizeof(const char*), NULL);
+ xbt_dynar_t p1_args = xbt_dynar_new(sizeof(const char*), NULL);
+
+ xbt_dynar_push_as(p0_args, const char*, "33");
+ xbt_dynar_push_as(p0_args, const char*, hostdata::at(1).get_name());
+
+ xbt_dynar_push_as(p1_args, const char*, "42");
+ xbt_dynar_push_as(p1_args, const char*, hostdata::at(0).get_name());
+
+ MSG_set_function(hostdata::at(0).get_name(), func, p0_args);
+ MSG_set_function(hostdata::at(1).get_name(), func, p1_args);
+
+ xbt_dynar_free(&p0_args);
+ xbt_dynar_free(&p1_args);
}