Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / src / surf / network_constant.hpp
1 /* Copyright (c) 2013-2023. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 #ifndef NETWORK_CONSTANT_HPP_
7 #define NETWORK_CONSTANT_HPP_
8
9 #include "src/kernel/resource/NetworkModel.hpp"
10
11 namespace simgrid::kernel::resource {
12
13 class NetworkConstantModel : public NetworkModel {
14 public:
15   using NetworkModel::NetworkModel;
16   Action* communicate(s4u::Host* src, s4u::Host* dst, double size, double rate, bool streamed) override;
17   double next_occurring_event(double now) override;
18   void update_actions_state(double now, double delta) override;
19
20   StandardLinkImpl* create_link(const std::string& name, const std::vector<double>& bws) override;
21   StandardLinkImpl* create_wifi_link(const std::string& name, const std::vector<double>& bws) override;
22 };
23
24 class NetworkConstantAction final : public NetworkAction {
25 public:
26   NetworkConstantAction(NetworkConstantModel* model_, s4u::Host& src, s4u::Host& dst, double size);
27   void update_remains_lazy(double now) override;
28 };
29
30 } // namespace simgrid::kernel::resource
31
32 #endif /* NETWORK_CONSTANT_HPP_ */