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()
26 p_updateMechanism = UM_UNDEFINED;
28 double shareResources(double now);
29 void updateActionsState(double now, double delta);
30 Action *communicate(RoutingEdge *src, RoutingEdge *dst, double size, double rate);
31 void gapRemove(Action *action);
37 class NetworkConstantLink : public NetworkCm02Link {
39 NetworkConstantLink(NetworkCm02Model *model, const char* name, xbt_dict_t properties);
41 void updateState(tmgr_trace_event_t event_type, double value, double date);
42 double getBandwidth();
50 class NetworkConstantAction : public NetworkCm02Action {
52 NetworkConstantAction(NetworkConstantModel *model_, double size, double latency)
53 : NetworkCm02Action(model_, size, false)
57 if (m_latency <= 0.0) {
58 p_stateSet = getModel()->getDoneActionSet();
59 p_stateSet->push_back(*this);
65 void setCategory(const char *category);
73 #endif /* NETWORK_CONSTANT_HPP_ */