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 typedef NetworkConstantModel *NetworkConstantModelPtr;
18 class NetworkConstantAction;
19 typedef NetworkConstantAction *NetworkConstantActionPtr;
24 class NetworkConstantModel : public NetworkCm02Model {
26 NetworkConstantModel()
27 : NetworkCm02Model("constant time network")
29 p_updateMechanism = UM_UNDEFINED;
31 double shareResources(double now);
32 void updateActionsState(double now, double delta);
33 ActionPtr communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
34 double size, double rate);
35 void gapRemove(ActionPtr action);
41 class NetworkConstantLink : public NetworkCm02Link {
43 NetworkConstantLink(NetworkCm02ModelPtr model, const char* name, xbt_dict_t properties);
45 void updateState(tmgr_trace_event_t event_type, double value, double date);
46 double getBandwidth();
54 class NetworkConstantAction : public NetworkCm02Action {
56 NetworkConstantAction(NetworkConstantModelPtr model_, double size, double latency)
57 : NetworkCm02Action(model_, size, false)
61 if (m_latency <= 0.0) {
62 p_stateSet = getModel()->getDoneActionSet();
63 p_stateSet->push_back(*this);
70 void setCategory(const char *category);
78 #endif /* NETWORK_CONSTANT_HPP_ */