1 /* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_KERNEL_RESOURCE_NETWORKMODELINTF_HPP
7 #define SIMGRID_KERNEL_RESOURCE_NETWORKMODELINTF_HPP
9 #include <simgrid/s4u/Link.hpp>
10 #include <simgrid/s4u/NetZone.hpp>
12 #include <unordered_set>
19 /** @ingroup SURF_interface
20 * @brief Network Model interface class
21 * @details Defines the methods that a Network model must implement
23 class XBT_PUBLIC NetworkModelIntf {
25 using NetworkFactorCb = double(double size, const std::vector<s4u::Link*>& links,
26 const std::unordered_set<s4u::NetZone*>& netzones);
27 virtual void set_lat_factor_cb(const std::function<NetworkFactorCb>& cb) = 0;
28 virtual void set_bw_factor_cb(const std::function<NetworkFactorCb>& cb) = 0;
31 } // namespace resource
33 } // namespace simgrid
35 #endif /* SIMGRID_KERNEL_RESOURCE_NETWORKMODELINTF_HPP */