/* 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. */
#include "simgrid/s4u.hpp"
/* 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. */
#include "simgrid/s4u.hpp"
simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name(src), [mailbox, dest, data_size]() {
double start_time = simgrid::s4u::Engine::get_clock();
simgrid::s4u::Actor::create("sender", simgrid::s4u::Host::by_name(src), [mailbox, dest, data_size]() {
double start_time = simgrid::s4u::Engine::get_clock();
double end_time = simgrid::s4u::Engine::get_clock();
XBT_INFO("Actual result: Sending %d bytes from '%s' to '%s' takes %f seconds.", data_size,
simgrid::s4u::this_actor::get_host()->get_cname(), dest, end_time - start_time);
});
simgrid::s4u::Actor::create("receiver", simgrid::s4u::Host::by_name(dest), [mailbox]() { mailbox->get(); });
double end_time = simgrid::s4u::Engine::get_clock();
XBT_INFO("Actual result: Sending %d bytes from '%s' to '%s' takes %f seconds.", data_size,
simgrid::s4u::this_actor::get_host()->get_cname(), dest, end_time - start_time);
});
simgrid::s4u::Actor::create("receiver", simgrid::s4u::Host::by_name(dest), [mailbox]() { mailbox->get(); });
- auto* l = (simgrid::kernel::resource::NetworkWifiLink*)simgrid::s4u::Link::by_name("AP1")->get_impl();
- l->set_host_rate(simgrid::s4u::Host::by_name(src), 0);
+ auto* ap1 = simgrid::s4u::Link::by_name("AP1");
+ ap1->set_host_wifi_rate(simgrid::s4u::Host::by_name(src), 0);
+ ap1->set_host_wifi_rate(simgrid::s4u::Host::by_name(dest), 0);