Skip to content

Commit 801fb0a

Browse files
committed
update readme, documentation
1 parent abac790 commit 801fb0a

File tree

2 files changed

+67
-22
lines changed

2 files changed

+67
-22
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ make test
3333
## Stack
3434

3535
* [collector](https://github.com/hkparker/collector): go application to sniff 802.11 frames and send them to Wave via websocket
36-
* [gin](https://github.com/gin-gonic/gin): web framework in go
37-
* [gorilla/websocket](https://github.com/gorilla/websocket): websocket support for gin
36+
* [gin](https://github.com/gin-gonic/gin): web framework
37+
* [gorilla/websocket](https://github.com/gorilla/websocket): websocket library
3838
* [gorm](https://github.com/jinzhu/gorm): ORM for go used for postgres
3939
* [postgres](https://github.com/postgres/postgres): storage of persistent data
40-
* [react-bootstrap](https://github.com/react-bootstrap/react-bootstrap): bootstrap markup library built with react
41-
* [vavigraphjs](https://github.com/anvaka/VivaGraphJS): graphing library with webgl support

doc/visualizer.md

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,75 @@
22

33
## Events
44

5-
### Adding Resources
5+
Events are streamed from a websocket connection to `/streams/visualizer`. All events are JSON representations of the Go type `map[string]string`.
6+
7+
### Adding Items
8+
9+
The following events are recieved when a new item should be added to the visualization.
10+
11+
##### NewDevice
12+
13+
This event instructs views to add a new device to the visualization.
614

715
```js
816
{
9-
"NewDevices": [
10-
{
11-
"MAC": "11:22:33:44:55:66",
12-
"VendorByes": "",
13-
"IsAP": "false",
14-
}
15-
// ...
16-
],
17-
"NewNetworks": [
18-
{
19-
"": ""
20-
}
21-
// ...
22-
]
23-
// ...
17+
"type": "NewDevice",
18+
"MAC": "11:22:33:44:55:66",
19+
"VendorByes": "",
20+
"IsAP": "false",
2421
}
2522
```
2623

27-
### Updating Resources
24+
##### NewAssociation
25+
26+
This event instructs views to associate two devices on the graph.
27+
28+
```js
29+
{
30+
"type": "NewAssociation",
31+
"MAC1": "11:22:33:44:55:66",
32+
"MAC2": "11:22:33:44:55:66",
33+
}
34+
```
35+
36+
### Updating Items
37+
38+
##### UpdateAssociation
39+
40+
```js
41+
{
42+
"type": "UpdateAssociation",
43+
"MAC1": "11:22:33:44:55:66",
44+
"MAC2": "11:22:33:44:55:66",
45+
"MAC1Tx": "16325"
46+
}
47+
```
48+
49+
### Drawing Events
50+
51+
These events are one time animations that do not impact the state of the graph.
52+
53+
##### AnimateNullProbeRequest
54+
55+
This animation indicates a device has probed for any available network.
56+
57+
```js
58+
{
59+
"type": "AnimateNullProbeRequest",
60+
"MAC1": "11:22:33:44:55:66",
61+
}
62+
```
63+
64+
##### AnimateProbeRequest
65+
66+
This animation indicates a device has probed for a specific SSID.
67+
68+
```js
69+
{
70+
"type": "AnimateProbeRequest",
71+
"MAC1": "11:22:33:44:55:66",
72+
"SSID": "wifi"
73+
}
74+
```
2875

29-
### Removing Resources
76+
### Removing Items

0 commit comments

Comments
 (0)