-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest.go
More file actions
35 lines (28 loc) · 799 Bytes
/
Copy pathrequest.go
File metadata and controls
35 lines (28 loc) · 799 Bytes
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
package main
const (
RequestTypeConnectionAttempt = 1
RequestTypeConnectionACK = 2
RequestTypeConnectionNACK = 3
RequestTypeGetSensorList = 4
RequestTypeAnswerSensorList = 5
RequestTypeGetSensorMeasurements = 6
RequestTypeAnswerSensorMeasurements = 7
)
type Request struct {
RequestType int
OriginUUID string
Data map[string]string
}
type SensorListEntry struct {
UUID string
DisplayName string
NextMeasurement int
}
type SensorUpdateRequestEntry struct {
UUID string
StartingAtMeasurement int
}
type SensorUpdateList struct {
SensorMetadata map[string]Sensor // Maps Sensor UUID -> Sensor meta data
SensorMeasurements map[string][]SensorMeasurement // Maps Sensor UUID -> Requested Sensor Measurements
}