X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/9c6f9565824d2cc3389e87f13ee9a0308d615807..ba8a9c5fbc92dc95fc99d8078b3474fd2fd5a043:/deployment.cpp diff --git a/deployment.cpp b/deployment.cpp index db02f0d..a0fad27 100644 --- a/deployment.cpp +++ b/deployment.cpp @@ -1,9 +1,29 @@ #include "deployment.h" -namespace { +#include +#include +#include +#include +#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); }