Topology.cc (9799:5aed42e54180) Topology.cc (9869:a204694db4f9)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 75 unchanged lines hidden (view full) ---

84 i != ext_links.end(); ++i) {
85 BasicExtLink *ext_link = (*i);
86 AbstractController *abs_cntrl = ext_link->params()->ext_node;
87 BasicRouter *router = ext_link->params()->int_node;
88
89 // Store the ExtLink pointers for later
90 m_ext_link_vector.push_back(ext_link);
91
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 75 unchanged lines hidden (view full) ---

84 i != ext_links.end(); ++i) {
85 BasicExtLink *ext_link = (*i);
86 AbstractController *abs_cntrl = ext_link->params()->ext_node;
87 BasicRouter *router = ext_link->params()->int_node;
88
89 // Store the ExtLink pointers for later
90 m_ext_link_vector.push_back(ext_link);
91
92 int ext_idx1 = abs_cntrl->params()->cntrl_id;
92 int machine_base_idx = MachineType_base_number(
93 string_to_MachineType(abs_cntrl->getName()));
94 int ext_idx1 = machine_base_idx + abs_cntrl->getVersion();
93 int ext_idx2 = ext_idx1 + m_nodes;
94 int int_idx = router->params()->router_id + 2*m_nodes;
95
96 // create the internal uni-directional links in both directions
97 // the first direction is marked: In
98 addLink(ext_idx1, int_idx, ext_link, LinkDirection_In);
99 // the first direction is marked: Out
100 addLink(int_idx, ext_idx2, ext_link, LinkDirection_Out);

--- 233 unchanged lines hidden ---
95 int ext_idx2 = ext_idx1 + m_nodes;
96 int int_idx = router->params()->router_id + 2*m_nodes;
97
98 // create the internal uni-directional links in both directions
99 // the first direction is marked: In
100 addLink(ext_idx1, int_idx, ext_link, LinkDirection_In);
101 // the first direction is marked: Out
102 addLink(int_idx, ext_idx2, ext_link, LinkDirection_Out);

--- 233 unchanged lines hidden ---