1 /* Copyright (c) 2013-2018. 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 NETWORK_CONSTANT_HPP_
7 #define NETWORK_CONSTANT_HPP_
11 #include "network_interface.hpp"
20 class XBT_PRIVATE NetworkConstantModel;
21 class XBT_PRIVATE NetworkConstantAction;
26 class NetworkConstantModel : public NetworkModel {
28 kernel::resource::Action* communicate(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double size,
29 double rate) override;
30 double next_occuring_event(double now) override;
31 void update_actions_state(double now, double delta) override;
33 LinkImpl* createLink(const std::string& name, double bw, double lat,
34 e_surf_link_sharing_policy_t policy) override;
40 class NetworkConstantAction : public NetworkAction {
42 NetworkConstantAction(NetworkConstantModel *model_, double size, double latency);
43 ~NetworkConstantAction();
44 double initialLatency_;
45 void update_remains_lazy(double now) override;
51 #endif /* NETWORK_CONSTANT_HPP_ */