Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change name()/cname() to getName()/getCname() in surf::FileImpl.
[simgrid.git] / src / surf / network_constant.hpp
1 /* Copyright (c) 2013-2017. 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 <xbt/base.h>
10
11 #include "network_interface.hpp"
12
13 namespace simgrid {
14   namespace surf {
15
16     /***********
17      * Classes *
18      ***********/
19
20     class XBT_PRIVATE NetworkConstantModel;
21     class XBT_PRIVATE NetworkConstantAction;
22
23     /*********
24      * Model *
25      *********/
26     class NetworkConstantModel : public NetworkModel {
27     public:
28       Action* communicate(simgrid::s4u::Host* src, simgrid::s4u::Host* dst, double size, double rate) override;
29       double nextOccuringEvent(double now) override;
30       void updateActionsState(double now, double delta) override;
31
32       LinkImpl* createLink(const std::string& name, double bw, double lat,
33                            e_surf_link_sharing_policy_t policy) override;
34     };
35
36     /**********
37      * Action *
38      **********/
39     class NetworkConstantAction : public NetworkAction {
40     public:
41       NetworkConstantAction(NetworkConstantModel *model_, double size, double latency);
42       ~NetworkConstantAction();
43       double initialLatency_;
44     };
45
46   }
47 }
48
49 #endif /* NETWORK_CONSTANT_HPP_ */