-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2023. 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. */
const MBoxes& mbox_;
const ScenarioContext& ctx_;
- sg4::CommPtr do_put(CommType type, double& send_value)
+ sg4::CommPtr do_put(CommType type, double& send_value) const
{
switch (type) {
case CommType::EAGER_SYNC:
DIE_IMPOSSIBLE;
}
- void send_message(const Scenario& s)
+ void send_message(const Scenario& s) const
{
std::string scenario_string = to_string(s);
XBT_DEBUG("Will try: %s", scenario_string.c_str());
{
}
- void operator()()
+ void operator()() const
{
run_++;
XBT_DEBUG("Host %i starts run %i and scenario %zu.", id_, run_, scenario_);
DIE_IMPOSSIBLE;
}
- void receive_message(const Scenario& s)
+ void receive_message(const Scenario& s) const
{
sg4::CommPtr comm = nullptr;
CommType type = s.type;
: id_(id), other_host_(other_host), mbox_(mbox), ctx_(ctx)
{
}
- void operator()()
+ void operator()() const
{
run_++;
XBT_DEBUG("Host %i starts run %i and scenario %zu.", id_, run_, scenario_);
});
sg4::Link::on_state_change_cb(
- [](sg4::Link const& link) { XBT_DEBUG("Link %s is now %s", link.get_cname(), link.is_on() ? "ON " : "OFF"); });
+ [](sg4::Link const& lnk) { XBT_DEBUG("Link %s is now %s", lnk.get_cname(), lnk.is_on() ? "ON " : "OFF"); });
e.run_until(end_time);