1 /* Copyright (c) 2013-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "network_cm02.hpp"
9 #ifndef NETWORK_CONSTANT_HPP_
10 #define NETWORK_CONSTANT_HPP_
15 class NetworkConstantModel;
16 class NetworkConstantAction;
21 class NetworkConstantModel : public NetworkCm02Model {
23 NetworkConstantModel()
24 : NetworkCm02Model("constant time network")
26 p_updateMechanism = UM_UNDEFINED;
28 double shareResources(double now);
29 void updateActionsState(double now, double delta);
30 Action *communicate(RoutingEdge *src, RoutingEdge *dst,
31 double size, double rate);
32 void gapRemove(Action *action);
38 class NetworkConstantLink : public NetworkCm02Link {
40 NetworkConstantLink(NetworkCm02Model *model, const char* name, xbt_dict_t properties);
42 void updateState(tmgr_trace_event_t event_type, double value, double date);
43 double getBandwidth();
51 class NetworkConstantAction : public NetworkCm02Action {
53 NetworkConstantAction(NetworkConstantModel *model_, double size, double latency)
54 : NetworkCm02Action(model_, size, false)
58 if (m_latency <= 0.0) {
59 p_stateSet = getModel()->getDoneActionSet();
60 p_stateSet->push_back(*this);
66 void setCategory(const char *category);
74 #endif /* NETWORK_CONSTANT_HPP_ */