-
Notifications
You must be signed in to change notification settings - Fork 0
/
ttgate-defs.go
31 lines (25 loc) · 1.28 KB
/
ttgate-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
// Copyright 2017 Inca Roads LLC. 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
// TTGateReq is the heartbeat data structure passed from TTGATE to TTSERVE
type TTGateReq struct {
// Message info
Payload []byte `json:"payload,omitempty"`
// Message-related info generated by the gateway
Snr float64 `json:"gateway_lora_snr,omitempty"`
ReceivedAt string `json:"gateway_received,omitempty"`
// Gateway info
Longitude float64 `json:"gateway_longitude,omitempty"`
Latitude float64 `json:"gateway_latitude,omitempty"`
Altitude int32 `json:"gateway_altitude,omitempty"`
Location string `json:"gateway_location,omitempty"`
GatewayID string `json:"gateway_id,omitempty"`
GatewayName string `json:"gateway_name,omitempty"`
GatewayRegion string `json:"gateway_region,omitempty"`
MessagesReceived uint32 `json:"gateway_msgs_received,omitempty"`
DevicesSeen string `json:"gateway_devices,omitempty"`
IPInfo IPInfoData `json:"gateway_ipinfo,omitempty"`
// Service Info, when this message is being routed service-to-service
Transport string `json:"service_transport,omitempty"`
}