-
Notifications
You must be signed in to change notification settings - Fork 0
/
helium-defs.go
51 lines (46 loc) · 1.89 KB
/
helium-defs.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
// Copyright 2020 Blues Inc. All rights reserved.
// Use of this source code is governed by licenses granted by the
// copyright holder including that found in the LICENSE file.
package main
type heliumLabel struct {
ID string `json:"id"`
Name string `json:"name"`
OrganizationID string `json:"organization_id"`
}
type heliumMetadata struct {
ADRAllowed bool `json:"adr_allowed"`
CFListEnabled bool `json:"cf_list_enabled"`
MultiBuy int32 `json:"multi_buy"`
OrganizationID string `json:"organization_id"`
Labels []heliumLabel `json:"labels"`
}
type heliumHotspot struct {
Channel uint32 `json:"channel"`
Frequency float64 `json:"frequency"`
HoldTime uint32 `json:"hold_time"`
ID string `json:"id"`
Lat float64 `json:"lat"`
Lon float64 `json:"long"`
Name string `json:"name"`
ReportedAtEpochMs int64 `json:"reported_at"`
RSSI float64 `json:"rssi"`
SNR float64 `json:"snr"`
Spreading string `json:"spreading"`
Status string `json:"status"`
}
type heliumUplinkMessage struct {
AppEUI string `json:"app_eui"`
DeviceEUI string `json:"dev_eui"`
DeviceAddr string `json:"devaddr"`
DownlinkURL string `json:"downlink_url"`
FrameCount uint32 `json:"fcnt"`
Hotspots []heliumHotspot `json:"hotspots"`
ID string `json:"id"`
Name string `json:"name"`
Payload []byte `json:"payload"`
PayloadLen uint32 `json:"payload_size"`
Port uint32 `json:"port"`
ReportedAtEpochMs int64 `json:"reported_at"`
UUID string `json:"uuid"`
Metadata heliumMetadata `json:"metadata"`
}