Skip to content

Commit 3ab9a42

Browse files
committed
Merge branch 'release/v0.2.3'
2 parents 8479d3f + 721e263 commit 3ab9a42

File tree

5 files changed

+160
-118
lines changed

5 files changed

+160
-118
lines changed

README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ specified via XML.
2020
[5]: https://github.com/adjacentlink/opentestpoint
2121

2222
Currently Flask SocketIO and some of its dependencies are not
23-
available in all distribution repositories. The recommended approach
24-
is to install emane-node-view using a Python virtualenv. An
25-
installation script that satisfies most use cases is provided
26-
(`install-virtualenv.sh`).
23+
available in all distribution repositories. For those distros, the
24+
recommended approach is to install emane-node-view using a Python
25+
virtualenv. An installation script that satisfies most use cases is
26+
provided (`install-virtualenv.sh`).
2727

2828
The follow EMANE and OpenTestPoint packages are required:
2929

@@ -43,7 +43,9 @@ a single JavaScript file.
4343

4444
## Install the latest stable Node LTS
4545

46-
1. Installing NODE LTS 10.x
46+
Example shown for Node LTS 10.x:
47+
48+
1. Installing NODE
4749

4850
On Fedora/CentOS:
4951

@@ -65,12 +67,20 @@ a single JavaScript file.
6567
$ sudo npm install browserify -g
6668
```
6769
68-
## Install emane-node-view in a virtualenv
70+
## Install emane-node-view Dependencies
71+
72+
For distros with flask and flask-socketio packages available, such as
73+
Fedora >= 33:
74+
75+
```
76+
$ sudo dnf install python3-flask python3-flask-socketio
77+
```
6978
70-
Create a Python virtualenv with flask, flask-socketio and
71-
emane-node-view installed. The virtualenv is created with
72-
`--system-site-packages` to allow access to EMANE and OpenTestPoint
73-
plugins that have been [installed][7] via your system package manager.
79+
For distros without flask and flask-socketio packages, create a Python
80+
virtualenv with flask, flask-socketio and emane-node-view
81+
installed. The virtualenv is created with `--system-site-packages` to
82+
allow access to EMANE and OpenTestPoint plugins that have been
83+
[installed][7] via your system package manager.
7484
7585
[7]: https://github.com/adjacentlink/emane/wiki/Install
7686
@@ -248,18 +258,27 @@ by `emane-node-view-publisher`. You must specify a unique algorithm
248258
`name`, the OpenTestPoint measurement `probe` to subscribe, and the
249259
`measurement` within the probe to process.
250260

251-
Three special local variables are used to communicate information to
261+
Six special local variables are used to communicate information to
252262
and from link detection code:
253263

254264
1. `_blob`: Serialized OpenTestPoint measurement specified with the
255265
`measurement` attribute. (in)
256266

257-
2. `_cookie`: A variable that is passed to the link detection code to
267+
2. `_name`: OpenTestPoint measurement name specified with the
268+
`measurement` attribute. (in)
269+
270+
3. `_tag`: OpenTestPoint measurement publisher tag. (in)
271+
272+
4. `_cookie`: A variable that is passed to the link detection code to
258273
store any state information. Each instance of the link detection
259274
algorithm has a unique `_cookie`. (in/out)
260275

261-
3. `_links`: A list of NEM ids that represent the links seen by the
262-
node. (out)
276+
5. `_gcookie`: A variable that is passed to the link detection code to
277+
store any global state information. All link detection algorithm
278+
instances share the same `_gcookie`. (in/out)
279+
280+
6. `_links`: A list of NEM ids or 2-tuples (NEM id, link color)
281+
that represent the links seen by the node. (out)
263282

264283
For the simple link detection algorithm shown, a node is considered to
265284
have a link to a remote node if that node has received an over-the-air

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%AC_COPYRIGHT([
2-
Copyright (c) 2019 - Adjacent Link LLC, Bridgewater, New Jersey
2+
Copyright (c) 2019,2021 - Adjacent Link LLC, Bridgewater, New Jersey
33
All rights reserved.
44
55
Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@
3232
See toplevel COPYING for more information.
3333
])
3434

35-
AC_INIT([emane-node-view],0.2.2,[labs at adjacentlink dot com])
35+
AC_INIT([emane-node-view],0.2.3,[labs at adjacentlink dot com])
3636

3737
AC_CONFIG_SRCDIR([emane_node_view])
3838

emane_node_view/static/app.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019 - Adjacent Link LLC, Bridgewater, New Jersey
2+
* Copyright (c) 2019,2021 - Adjacent Link LLC, Bridgewater, New Jersey
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -187,15 +187,20 @@ socket.on("connect", function(event) {
187187
{
188188
for(var j = 0; j < obj[i].links.length; ++j)
189189
{
190-
if(node_markers.has(obj[i].links[j]))
190+
if(node_markers.has(obj[i].links[j].remote))
191191
{
192192
var a = node_markers.get(obj[i].id).getLatLng();
193-
var b = node_markers.get(obj[i].links[j]).getLatLng();
193+
var b = node_markers.get(obj[i].links[j].remote).getLatLng();
194194
var bounds = L.latLngBounds(a,b);
195+
var link_color = obj[i].link_color;
196+
if(obj[i].links[j].hasOwnProperty('color'))
197+
{
198+
link_color = obj[i].links[j].color;
199+
}
195200
polylines.push(L.polyline([a,bounds.getCenter()],
196-
{color: obj[i].link_color}).addTo(link_layer_group));
201+
{color: link_color}).addTo(link_layer_group));
197202
polylines.push(L.polyline([bounds.getCenter(),b],
198-
{color: obj[i].link_color, dashArray: '5'}).addTo(link_layer_group));
203+
{color: link_color, dashArray: '5'}).addTo(link_layer_group));
199204
}
200205
}
201206
}

emane_node_view/static/package-lock.json

Lines changed: 41 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)