-/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
static void dream_master()
{
XBT_INFO("Let's create a lazy guy."); /* - Create a lazy_guy process */
- simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::createActor("Lazy", simgrid::s4u::this_actor::getHost(), lazy_guy);
+ simgrid::s4u::ActorPtr lazy = simgrid::s4u::Actor::create("Lazy", simgrid::s4u::this_actor::get_host(), lazy_guy);
XBT_INFO("Let's wait a little bit...");
simgrid::s4u::this_actor::sleep_for(10); /* - Wait for 10 seconds */
XBT_INFO("Let's wake the lazy guy up! >:) BOOOOOUUUHHH!!!!");
simgrid::s4u::Engine e(&argc, argv);
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
- e.loadPlatform(argv[1]); /* - Load the platform description */
- std::vector<simgrid::s4u::Host*> list;
- e.getHostList(&list);
- simgrid::s4u::Actor::createActor("dream_master", list.front(), dream_master);
+ e.load_platform(argv[1]); /* - Load the platform description */
+ std::vector<simgrid::s4u::Host*> list = e.get_all_hosts();
+ simgrid::s4u::Actor::create("dream_master", list.front(), dream_master);
e.run(); /* - Run the simulation */