forked from TheThingsNetwork/lorawan-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatewayserver.proto
More file actions
91 lines (80 loc) · 3.44 KB
/
gatewayserver.proto
File metadata and controls
91 lines (80 loc) · 3.44 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
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
80
81
82
83
84
85
86
87
88
89
90
91
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "lorawan-stack/api/error.proto";
import "lorawan-stack/api/gateway.proto";
import "lorawan-stack/api/identifiers.proto";
import "lorawan-stack/api/messages.proto";
import "lorawan-stack/api/mqtt.proto";
import "lorawan-stack/api/regional.proto";
package ttn.lorawan.v3;
option go_package = "go.thethings.network/lorawan-stack/v3/pkg/ttnpb";
// GatewayUp may contain zero or more uplink messages and/or a status message for the gateway.
message GatewayUp {
// UplinkMessages received by the gateway.
repeated UplinkMessage uplink_messages = 1;
GatewayStatus gateway_status = 2;
TxAcknowledgment tx_acknowledgment = 3;
}
// GatewayDown contains downlink messages for the gateway.
message GatewayDown {
// DownlinkMessage for the gateway.
DownlinkMessage downlink_message = 1;
}
// The GtwGs service connects a gateway to a Gateway Server.
service GtwGs {
// Link the gateway to the Gateway Server.
rpc LinkGateway(stream GatewayUp) returns (stream GatewayDown);
// GetConcentratorConfig associated to the gateway.
rpc GetConcentratorConfig(google.protobuf.Empty) returns (ConcentratorConfig);
// Get the MQTT server address and the username for the gateway.
rpc GetMQTTConnectionInfo(GatewayIdentifiers) returns (MQTTConnectionInfo) {
option (google.api.http) = {
get: "/gs/gateways/{gateway_id}/mqtt-connection-info"
};
};
// Get the MQTTV2 server address and the username for the gateway.
rpc GetMQTTV2ConnectionInfo(GatewayIdentifiers) returns (MQTTConnectionInfo) {
option (google.api.http) = {
get: "/gs/gateways/{gateway_id}/mqttv2-connection-info"
};
};
}
message ScheduleDownlinkResponse {
google.protobuf.Duration delay = 1 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (validate.rules).duration.required = true];
}
message ScheduleDownlinkErrorDetails {
repeated ErrorDetails path_errors = 1;
}
// The NsGs service connects a Network Server to a Gateway Server.
service NsGs {
// ScheduleDownlink instructs the Gateway Server to schedule a downlink message.
// The Gateway Server may refuse if there are any conflicts in the schedule or
// if a duty cycle prevents the gateway from transmitting.
rpc ScheduleDownlink(DownlinkMessage) returns (ScheduleDownlinkResponse);
}
service Gs {
// Get statistics about the current gateway connection to the Gateway Server.
// This is not persisted between reconnects.
rpc GetGatewayConnectionStats(GatewayIdentifiers) returns (GatewayConnectionStats) {
option (google.api.http) = {
get: "/gs/gateways/{gateway_id}/connection/stats"
};
};
}