| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
View mesh networks described in a JSON file. This tool is meant to visualize mesh network simulations for research. Interactions with the graph (selection, deletion, etc.) and custom commands can be passed to external programs. The view is updated as soon as the JSON file is changed.
Features:
Usage: graph-viewer [<arguments>] <graph-file>
Arguments:
The supported JSON formats are NetJSON and a very similar format used by the Meshviewer project that is used by most Freifunk communities.
Minimal graph example:
{
"links": [{"source": "a", "target": "b"}]
}
More elaborate example:
{
"nodes": [
{
"id": "a"
},
{
"id": "b",
"x": 52.5162,
"y": 13.3777,
"label": "Label",
"name": "Name",
"radius": 12,
"color": "#DAA520",
"clients": 5
}
],
"links": [
{
"source": "a",
"target": "b",
"target_tq": 1,
"source_tq": 1,
"color": "#7CFC00",
"label": "Link A/B"
}
]
}
Note:
MeshGraphViewer is written in an unholy combination of C and JavaScript. Build with d3js, leafletjs and libmicrohttpd.
Requirements:
Build:
make
This should create a single standalone program called graph-viewer.
Add new buttons using the configuration file config.json and pass it to grap-viewer via the --config argument. Other available options like colors etc. can be gathered from the internal index.html default config object.
In the command line, the variables %selected_nodes% and %selected_links% will be expanded to a comma separated list.
MeshGraphViewer can be used to interact with MeshnetLab, a mesh network simulation and test framework. This allows to run a virtual mesh network that can be viewed, edited and controlled via MeshGraphViewer. The connection between both is handled with meshnet-lab-bridge.py.
Example with an initial empty graph.
Installation
apt install libmicrohttpd-dev xxd mkdir project cd project git clone https://github.com/mwarning/meshnet-lab/ git clone https://github.com/mwarning/MeshGraphViewer/ cd MeshGraphviewer make
Run
cd project/MeshGraphviewer
echo '{"nodes": [], "links": []}' > graph.json
sudo ./meshnet-lab-bridge.py ../meshnet-lab /tmp/sim_connector.sock ./graph.json
# switch to a new termial, same working directory
./graph-viewer --call unix:///tmp/sim_connector.sock --config config.json ./graph.json
Access MeshgraphViewer via the browser (https://localhost:8000). Use the buttons there to add nodes (running batman-adv) and links.
Shut down the simulation afterwards in the meshnet-lab folder:
./software.py clear ./network.py clear
The code of the MeshGraphViewer is based on the MeshViewer project.
AGPL-3.0-or-later
| Back | FazBrowse Home | New Git URL |