-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.go
79 lines (71 loc) · 1.51 KB
/
device.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package main
import wazihub "github.com/j-forster/Wazihub-API"
type Acceleration struct {
X, Y, Z float32
}
type Force [6]int32
type Avg struct {
Min, Mean, Max Acceleration
Force, Force2 Force
AValues int32
PValues, P2Values int32
Packets, Dropps int64
}
type ValuesPerSecond struct {
Values, Dropps int64
}
var device = &wazihub.Device{
Id: wazihub.CurrentDeviceId(),
Name: "MEKOB-P",
Domain: "MEKOB-P",
Sensors: []*wazihub.Sensor{
&wazihub.Sensor{
Id: "acc0",
Name: "Acceleration 1",
SensingDevice: "AccelerationSensor",
Unit: "m/s",
},
&wazihub.Sensor{
Id: ".acc0",
Name: "Condensed Acceleration 1",
SensingDevice: "AccelerationSensor",
Unit: "m/s",
},
&wazihub.Sensor{
Id: "acc-vps",
Name: "Acceleration Values/Sec",
SensingDevice: "Counter",
Unit: "Values/Sec",
},
&wazihub.Sensor{
Id: "event",
Name: "Device Events",
SensingDevice: "String",
Unit: "",
},
&wazihub.Sensor{
Id: "position",
Name: "Position",
SensingDevice: "Zigpos",
Unit: "",
},
&wazihub.Sensor{
Id: "gps",
Name: "GPS Position",
SensingDevice: "GPS",
Unit: "",
},
},
Actuators: []*wazihub.Actuator{
&wazihub.Actuator{
Id: "event",
Name: "Device Events",
},
},
}
type EventError struct {
Error string
}
type EventStart struct {
NumDevices int
}