1 /* Copyright (c) 2004-2015. 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. */
9 #include "network_interface.hpp"
10 #include "src/surf/ns3/ns3_interface.h"
12 #ifndef NETWORK_NS3_HPP_
13 #define NETWORK_NS3_HPP_
22 class XBT_PRIVATE NetworkNS3Model;
23 class XBT_PRIVATE NetworkNS3Action;
32 XBT_PRIVATE void net_define_callbacks(void);
41 class NetworkNS3Model : public NetworkModel {
46 Link* createLink(const char *name,
47 double bw_initial, tmgr_trace_t bw_trace,
48 double lat_initial, tmgr_trace_t lat_trace,
49 tmgr_trace_t state_trace,
50 e_surf_link_sharing_policy_t policy,
51 xbt_dict_t properties) override;
52 xbt_dynar_t getRoute(NetCard *src, NetCard *dst);
53 Action *communicate(NetCard *src, NetCard *dst, double size, double rate);
54 double next_occuring_event(double now) override;
55 bool next_occuring_event_isIdempotent() {return false;}
56 void updateActionsState(double now, double delta) override;
62 class NetworkNS3Link : public Link {
64 NetworkNS3Link(NetworkNS3Model *model, const char *name, xbt_dict_t props,
65 double bw_initial, double lat_initial);
68 void apply_event(tmgr_trace_iterator_t event, double value) override;
69 void updateBandwidth(double value) override {THROW_UNIMPLEMENTED;}
70 void updateLatency(double value) override {THROW_UNIMPLEMENTED;}
79 class NetworkNS3Action : public NetworkAction {
81 NetworkNS3Action(Model *model, double cost, bool failed);
83 #ifdef HAVE_LATENCY_BOUND_TRACKING
84 int getLatencyLimited();
101 #endif /* NETWORK_NS3_HPP_ */