Project

General

Profile

Bug #5002

topologyReader.ApplyOspfMetric() doesn't work unless ndn::StackHelper is installed

Added by Klaus Schneider 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/18/2019
Due date:
% Done:

0%

Estimated time:

Description

The following code does not apply the link metrics as intended:

  AnnotatedTopologyReader topologyReader{};
  topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-" + topoName + ".txt");
  topologyReader.Read();
  topologyReader.ApplyOspfMetric();

  ndn::StackHelper stackHelper{};
  stackHelper.InstallAll();

Rather one has two write the code like this:

  AnnotatedTopologyReader topologyReader{};
  topologyReader.SetFileName("src/ndnSIM/examples/topologies/topo-" + topoName + ".txt");
  topologyReader.Read();

  ndn::StackHelper stackHelper{};
  stackHelper.InstallAll();

  // IMPORTANT: Has to be run after StackHelper!
  topologyReader.ApplyOspfMetric();

Also available in: Atom PDF