xbt_die("There is no routes!");
XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
//save them in trace file
xbt_die("There is no routes!");
XBT_DEBUG("Have get_onelink_routes, found %ld routes",onelink_routes->used);
//save them in trace file
unsigned int iter;
xbt_dynar_foreach(onelink_routes, iter, onelink) {
char *src = onelink->p_src->getName();
unsigned int iter;
xbt_dynar_foreach(onelink_routes, iter, onelink) {
char *src = onelink->p_src->getName();
if (ns3_initialize(xbt_cfg_get_string(_sg_cfg_set, "ns3/TcpModel"))) {
xbt_die("Impossible to initialize NS3 interface");
}
if (ns3_initialize(xbt_cfg_get_string(_sg_cfg_set, "ns3/TcpModel"))) {
xbt_die("Impossible to initialize NS3 interface");
}
return new NetworkNS3Link(this, name, properties, bw_initial, lat_initial);
}
return new NetworkNS3Link(this, name, properties, bw_initial, lat_initial);
}
{
xbt_dynar_t route = NULL;
routing_get_route_and_latency(src, dst, &route, NULL);
{
xbt_dynar_t route = NULL;
routing_get_route_and_latency(src, dst, &route, NULL);
double size, double rate)
{
XBT_DEBUG("Communicate from %s to %s", src->getName(), dst->getName());
double size, double rate)
{
XBT_DEBUG("Communicate from %s to %s", src->getName(), dst->getName());
ns3_create_flow(src->getName(), dst->getName(), surf_get_clock(), size, action);
ns3_create_flow(src->getName(), dst->getName(), surf_get_clock(), size, action);
xbt_dict_foreach(dict_socket,cursor,key,data){
xbt_dict_foreach(dict_socket,cursor,key,data){
XBT_DEBUG("Processing socket %p (action %p)",data,action);
action->setRemains(action->getCost() - ns3_get_socket_sent(data));
XBT_DEBUG("Processing socket %p (action %p)",data,action);
action->setRemains(action->getCost() - ns3_get_socket_sent(data));
routing_get_route_and_latency (action->p_srcElm, action->p_dstElm, &route, NULL);
unsigned int i;
for (i = 0; i < xbt_dynar_length (route); i++){
routing_get_route_and_latency (action->p_srcElm, action->p_dstElm, &route, NULL);
unsigned int i;
for (i = 0; i < xbt_dynar_length (route); i++){
xbt_dynar_pop(socket_to_destroy,&key);
void *data = xbt_dict_get (dict_socket, key);
xbt_dynar_pop(socket_to_destroy,&key);
void *data = xbt_dict_get (dict_socket, key);
XBT_DEBUG ("Removing socket %p of action %p", key, action);
xbt_dict_remove(dict_socket, key);
}
XBT_DEBUG ("Removing socket %p of action %p", key, action);
xbt_dict_remove(dict_socket, key);
}
-NetworkNS3Link::NetworkNS3Link(NetworkNS3ModelPtr model, const char *name, xbt_dict_t props,
+NetworkNS3Link::NetworkNS3Link(NetworkNS3Model *model, const char *name, xbt_dict_t props,
double bw_initial, double lat_initial)
: Link(model, name, props)
, p_lat(bprintf("%f", lat_initial))
double bw_initial, double lat_initial)
: Link(model, name, props)
, p_lat(bprintf("%f", lat_initial))