X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/9c6f9565824d2cc3389e87f13ee9a0308d615807..c4e7c13743a9d1e8dfa5dc27d4b2fa3aaf1557ab:/deployment.cpp?ds=inline 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); }