forked from TheThingsArchive/server-shared
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared.go
More file actions
34 lines (30 loc) · 1.09 KB
/
shared.go
File metadata and controls
34 lines (30 loc) · 1.09 KB
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
package shared
import (
"time"
)
type GatewayStatus struct {
Eui string `json:"eui"`
Time time.Time `json:"time"`
Latitude *float64 `json:"latitude,omitempty"`
Longitude *float64 `json:"longitude,omitempty"`
Altitude *float64 `json:"altitude,omitempty"`
RxCount *uint `json:"rxCount,omitempty"`
RxOk *uint `json:"rxOk,omitempty"`
RxForwarded *uint `json:"rxForwarded,omitempty"`
AckRatio *float64 `json:"ackRatio,omitempty"`
DatagramsReceived *uint `json:"datagramsReceived,omitempty"`
DatagramsSent *uint `json:"datagramsSent,omitempty"`
}
type RxPacket struct {
GatewayEui string `json:"gatewayEui"`
NodeEui string `json:"nodeEui"`
Time time.Time `json:"time"`
RawData string `json:"rawData"`
Data string `json:"data,omitempty"`
Rssi *int `json:"rssi,omitempty"`
Snr *float64 `json:"lsnr,omitempty"`
}
type ConsumerQueues struct {
GatewayStatuses chan *GatewayStatus
RxPackets chan *RxPacket
}