-int daemon(int argc, char *argv[])
-{
- msg_task_t task = NULL;
- task = MSG_task_create("deamon", 100*MSG_get_host_speed(MSG_host_self()), 0, NULL);
- XBT_INFO(" Execute deamon");
- MSG_task_execute(task);
- XBT_INFO(" I'm done. See you!");
- return 0;
-}
-
-int commTX(int argc, char *argv[])
-{
- msg_task_t task = NULL;
- char mailbox[80];
- sprintf(mailbox, "comm");
- XBT_INFO(" Start TX");
- task = MSG_task_create("COMM", 0, 100000000, NULL);
- MSG_task_isend(task, mailbox);
- // We should wait a bit (if not the process will end before the communication, leading to an exception at the other side).
- MSG_process_sleep(30);
- XBT_INFO(" TX done");
- return 0;
-}
-
-int commRX(int argc, char *argv[])
-{
- msg_task_t task = NULL;
- char mailbox[80];
- sprintf(mailbox, "comm");
- XBT_INFO(" Start RX");
- msg_error_t error = MSG_task_receive(&(task), mailbox);
- if (error==MSG_OK) {
- XBT_INFO(" Receive message: %s", task->name);
- } else if (error==MSG_HOST_FAILURE) {
- XBT_INFO(" Receive message: HOST_FAILURE");
- } else if (error==MSG_TRANSFER_FAILURE) {
- XBT_INFO(" Receive message: TRANSFERT_FAILURE");
- } else {
- XBT_INFO(" Receive message: %d", error);
- }
- XBT_INFO(" RX Done");
- return 0;
-}
-
-/** Main function */