Logo AND Algorithmique Numérique Distribuée

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