Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
7f3108c3
Commit
7f3108c3
authored
Jun 27, 2016
by
Christoph Storm
Browse files
fix for graph generation
parent
87f211cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/DefaultTopologyComponent.java
View file @
7f3108c3
...
...
@@ -519,6 +519,11 @@ public class DefaultTopologyComponent implements TopologyComponent {
if
(
isDistanceBased
)
{
// Build neighbors solely based on an assumed range
for
(
MacLayer
mac
:
topoView
.
getAllMacs
())
{
//Fix Christoph Storm:
// Do not take offline nodes into account, unless told to do so...
if
(
onlyOnline
&&
!
currentView
.
containsNode
(
mac
.
getHost
().
getId
())){
continue
;
}
// Consider all nodes as potential neighbors
for
(
MacLayer
neighborMac
:
topoView
.
getAllMacs
())
{
// create, but do NOT add the node object
...
...
@@ -541,6 +546,11 @@ public class DefaultTopologyComponent implements TopologyComponent {
}
else
{
// Build neighborhoods based on underlay neighbors (1-hop)
for
(
MacLayer
mac
:
topoView
.
getAllMacs
())
{
// Fix Christoph Storm:
// Do not take offline nodes into account, unless told to do so...
if
(
onlyOnline
&&
!
currentView
.
containsNode
(
mac
.
getHost
().
getId
())){
continue
;
}
// Rely on underlay for neighbors
List
<
MacAddress
>
neighbors
=
topoView
.
getNeighbors
(
mac
.
getMacAddress
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment