Developing lightweight computation at the DSG edge

Commit 0acf83d2 authored by p4u's avatar p4u
Browse files

Graph links which are 0 in some direction (rx or tx) are not printed

parent 7be9549f
...@@ -45,10 +45,14 @@ $Id$ ...@@ -45,10 +45,14 @@ $Id$
var key = (data[i].globalId < data[i].links[j].globalId) var key = (data[i].globalId < data[i].links[j].globalId)
? data[i].globalId + '|' + data[i].links[j].globalId ? data[i].globalId + '|' + data[i].links[j].globalId
: data[i].links[j].globalId + '|' + data[i].globalId; : data[i].links[j].globalId + '|' + data[i].globalId;
if (!seen[key])
var rxRate = data[i].links[j].rxRate;
var txRate = data[i].links[j].txRate;
if (!seen[key] && rxRate>0 && txRate>0)
{ {
g.addEdge(data[i].globalId, data[i].links[j].globalId, g.addEdge(data[i].globalId, data[i].links[j].globalId,
{ label: data[i].links[j].rxRate + '/' + data[i].links[j].txRate, { label: rxRate + '/' + txRate,
directed: false, stroke: '#aaaaaa', fill: '#ffffff', directed: false, stroke: '#aaaaaa', fill: '#ffffff',
'label-style': { 'font-size': 10 }}); 'label-style': { 'font-size': 10 }});
seen[key] = true; seen[key] = true;
...@@ -75,7 +79,7 @@ $Id$ ...@@ -75,7 +79,7 @@ $Id$
layouter.layout(); layouter.layout();
renderer.draw(); renderer.draw();
} }
} }
); );
//]]></script> //]]></script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment