void get_graph(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
std::map<std::string, xbt_edge_t>* edges) override;
- virtual RouteCreationArgs* newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
- NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
- bool symmetrical, bool change_order);
protected:
- void getRouteCheckParams(NetPoint* src, NetPoint* dst);
- void addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+ virtual RouteCreationArgs* new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+ NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+ bool symmetrical, bool change_order);
+ void get_route_check_params(NetPoint* src, NetPoint* dst);
+ void add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+ std::vector<resource::LinkImpl*>& link_list, bool symmetrical);
+
+ // deprecated
+ XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::new_extended_route()") virtual RouteCreationArgs* newExtendedRoute(
+ RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+ std::vector<resource::LinkImpl*>& link_list, bool symmetrical, bool change_order)
+ {
+ return new_extended_route(hierarchy, src, dst, gw_src, gw_dst, link_list, symmetrical, change_order);
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::get_route_check_params()") void getRouteCheckParams(NetPoint* src,
+ NetPoint* dst)
+ {
+ get_route_check_params(src, dst);
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use RoutedZone::add_route_check_params()") void addRouteCheckParams(
+ NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+ bool symmetrical)
+ {
+ add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
+ }
};
} // namespace routing
} // namespace kernel
void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
{
- getRouteCheckParams(src, dst);
+ get_route_check_params(src, dst);
int src_id = src->id();
int dst_id = dst->id();
const char* srcName = src->get_cname();
const char* dstName = dst->get_cname();
- addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+ add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
/* Create the topology graph */
if (not route_graph_)
* nodes */
/* Add the route to the base */
- RouteCreationArgs* e_route = newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+ RouteCreationArgs* e_route = new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
new_route(src->id(), dst->id(), e_route);
// Symmetrical YES
gw_dst = gw_tmp;
}
RouteCreationArgs* link_route_back =
- newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+ new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
new_route(dst->id(), src->id(), link_route_back);
}
}
{
unsigned int table_size = get_table_size();
- getRouteCheckParams(src, dst);
+ get_route_check_params(src, dst);
/* create a result route */
std::vector<RouteCreationArgs*> route_stack;
/* set the size of table routing */
unsigned int table_size = get_table_size();
- addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+ add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
if (not link_table_) {
/* Create Cost, Predecessor and Link tables */
dst->get_cname());
TO_FLOYD_LINK(src->id(), dst->id()) =
- newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
+ new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 1);
TO_FLOYD_PRED(src->id(), dst->id()) = src->id();
TO_FLOYD_COST(src->id(), dst->id()) = (TO_FLOYD_LINK(src->id(), dst->id()))->link_list.size();
src->get_cname(), gw_dst->get_cname());
TO_FLOYD_LINK(dst->id(), src->id()) =
- newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
+ new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, 0);
TO_FLOYD_PRED(dst->id(), src->id()) = dst->id();
TO_FLOYD_COST(dst->id(), src->id()) =
(TO_FLOYD_LINK(dst->id(), src->id()))->link_list.size(); /* count of links, old model assume 1 */
void FullZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
- addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
+ add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
unsigned int table_size = get_table_size();
/* Add the route to the base */
TO_ROUTE_FULL(src->id(), dst->id()) =
- newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
+ new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true);
if (symmetrical == true && src != dst) {
if (gw_dst && gw_src) {
dst->get_cname(), src->get_cname());
TO_ROUTE_FULL(dst->id(), src->id()) =
- newExtendedRoute(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
+ new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, false);
}
}
}
/* ************************************************************************** */
/* ************************* GENERIC AUX FUNCTIONS ************************** */
/* change a route containing link names into a route containing link entities */
-RouteCreationArgs* RoutedZone::newExtendedRoute(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
- NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
- bool symmetrical, bool change_order)
+RouteCreationArgs* RoutedZone::new_extended_route(RoutingMode hierarchy, NetPoint* src, NetPoint* dst, NetPoint* gw_src,
+ NetPoint* gw_dst, std::vector<resource::LinkImpl*>& link_list,
+ bool symmetrical, bool change_order)
{
RouteCreationArgs* result = new RouteCreationArgs();
return result;
}
-void RoutedZone::getRouteCheckParams(NetPoint* src, NetPoint* dst)
+void RoutedZone::get_route_check_params(NetPoint* src, NetPoint* dst)
{
xbt_assert(src, "Cannot find a route from nullptr to %s", dst->get_cname());
xbt_assert(dst, "Cannot find a route from %s to nullptr", src->get_cname());
"%s@%s). Please report that bug.",
src->get_cname(), dst->get_cname(), src_as->get_cname(), dst_as->get_cname(), get_cname());
}
-void RoutedZone::addRouteCheckParams(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
- std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
+void RoutedZone::add_route_check_params(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+ std::vector<resource::LinkImpl*>& link_list, bool symmetrical)
{
const char* srcName = src->get_cname();
const char* dstName = dst->get_cname();