Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #403 from TheThingsNetwork/develop
Browse files Browse the repository at this point in the history
v2.1.0 Release
  • Loading branch information
htdvisser authored Jan 10, 2017
2 parents e17566e + 47c74df commit 6c1fe6a
Show file tree
Hide file tree
Showing 354 changed files with 1,049 additions and 534 deletions.
1 change: 0 additions & 1 deletion .env/ttnctl.yml.dev-example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
discovery-address: localhost:1900
auth-server: https://preview.account.thethingsnetwork.org
router-id: dev
handler-id: dev
mqtt-address: localhost:1883
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SHELL = bash

GIT_BRANCH = $(or $(CI_BUILD_REF_NAME) ,`git rev-parse --abbrev-ref HEAD 2>/dev/null`)
GIT_COMMIT = $(or $(CI_BUILD_REF), `git rev-parse HEAD 2>/dev/null`)
GIT_TAG = $(shell git describe --abbrev=0 --tags)
GIT_TAG = $(shell git describe --abbrev=0 --tags 2>/dev/null)
BUILD_DATE = $(or $(CI_BUILD_DATE), `date -u +%Y-%m-%dT%H:%M:%SZ`)
GO_PATH = $(shell echo $(GOPATH) | awk -F':' '{print $$1}')
PARENT_DIRECTORY= $(shell dirname $(PWD))
Expand Down Expand Up @@ -51,6 +51,7 @@ api/%.pb.go: api/%.proto
$(PROTOC)$<

protodoc: $(PROTO_FILES)
protoc $(PROTOC_IMPORTS) --ttndoc_out=logtostderr=true,.lorawan.DevAddrManager=all:$(GO_SRC) `pwd`/api/protocol/lorawan/device_address.proto
protoc $(PROTOC_IMPORTS) --ttndoc_out=logtostderr=true,.handler.ApplicationManager=all:$(GO_SRC) `pwd`/api/handler/handler.proto
protoc $(PROTOC_IMPORTS) --ttndoc_out=logtostderr=true,.discovery.Discovery=all:$(GO_SRC) `pwd`/api/discovery/discovery.proto

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can check your `ttnctl` configuration by running `ttnctl config`. It should
config file: /home/your-user/.ttnctl.yml
data dir: /home/your-user/.ttnctl
auth-server: https://preview.account.thethingsnetwork.org
auth-server: https://account.thethingsnetwork.org
discovery-address: localhost:1900
router-id: dev
handler-id: dev
Expand Down
2 changes: 1 addition & 1 deletion amqp/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/client_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/downlink.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/downlink_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/publisher.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/publisher_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/routing_keys.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/routing_keys_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/subscriber.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/subscriber_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/uplink.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/uplink_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
2 changes: 1 addition & 1 deletion amqp/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package amqp
Expand Down
4 changes: 2 additions & 2 deletions api/API_AUTHENTICATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can authenticate to the gRPC endpoint by supplying a `key` field in the Meta

```go
md := metadata.Pairs(
"key", "ttn-account-preview.n4BAoKOGuK2hj7MXg_OVtpLO0BTJI8lLzt66UsvTlUvZPsi6FADOptnmSH3e3PuQzbLLEUhXxYhkxr34xyUqBQ",
"key", "ttn-account-v2.n4BAoKOGuK2hj7MXg_OVtpLO0BTJI8lLzt66UsvTlUvZPsi6FADOptnmSH3e3PuQzbLLEUhXxYhkxr34xyUqBQ",
)
ctx := metadata.NewContext(context.Background(), md)
```
Expand All @@ -56,5 +56,5 @@ For HTTP Endpoints, you should supply the `Authorization` header: `Authorization
**Example:**

```
Authorization: Key ttn-account-preview.n4BAoKOGuK2hj7MXg_OVtpLO0BTJI8lLzt66UsvTlUvZPsi6FADOptnmSH3e3PuQzbLLEUhXxYhkxr34xyUqBQ
Authorization: Key ttn-account-v2.n4BAoKOGuK2hj7MXg_OVtpLO0BTJI8lLzt66UsvTlUvZPsi6FADOptnmSH3e3PuQzbLLEUhXxYhkxr34xyUqBQ
```
2 changes: 1 addition & 1 deletion api/api.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

syntax = "proto3";
Expand Down
15 changes: 9 additions & 6 deletions api/broker/broker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 26 additions & 4 deletions api/broker/broker.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

syntax = "proto3";
Expand All @@ -14,10 +14,15 @@ package broker;
option go_package = "github.com/TheThingsNetwork/ttn/api/broker";

message DownlinkOption {
// String that identifies this downlink option in the Router
string identifier = 1;
// ID of the gateway where this downlink should be sent
string gateway_id = 2;
uint32 score = 3; // lower is better, 0 is best
int64 deadline = 4; // deadline time at server represented as the number of nanoseconds elapsed since January 1, 1970 UTC
// Score of this downlink option. Lower is better.
uint32 score = 3;
// deadline time at server represented as Unix nanoseconds
int64 deadline = 4;

protocol.TxConfiguration protocol_config = 5;
gateway.TxConfiguration gateway_config = 6;
}
Expand All @@ -26,11 +31,14 @@ message DownlinkOption {
message UplinkMessage {
bytes payload = 1;
protocol.Message message = 2;

// NOTE: For LoRaWAN, the Router doesn't know the DevEUI/ID and AppEUI/ID

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];
string app_id = 13;
string dev_id = 14;

protocol.RxMetadata protocol_metadata = 21;
gateway.RxMetadata gateway_metadata = 22;
repeated DownlinkOption downlink_options = 31;
Expand All @@ -40,40 +48,49 @@ message UplinkMessage {
message DownlinkMessage {
bytes payload = 1;
protocol.Message message = 2;

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];
string app_id = 13;
string dev_id = 14;

DownlinkOption downlink_option = 21;
}

//sent to the Router, used as Template
// sent to the Router, used as Template
message DeviceActivationResponse {
bytes payload = 1;
protocol.Message message = 2;

DownlinkOption downlink_option = 11;
}

// sent to the Handler
message DeduplicatedUplinkMessage {
bytes payload = 1;
protocol.Message message = 2;

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];
string app_id = 13;
string dev_id = 14;

protocol.RxMetadata protocol_metadata = 21;
repeated gateway.RxMetadata gateway_metadata = 22;

int64 server_time = 23;

DownlinkMessage response_template = 31;
}

// received from the Router
message DeviceActivationRequest {
bytes payload = 1;
protocol.Message message = 2;

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];

protocol.RxMetadata protocol_metadata = 21;
gateway.RxMetadata gateway_metadata = 22;
protocol.ActivationMetadata activation_metadata = 23;
Expand All @@ -84,20 +101,25 @@ message DeviceActivationRequest {
message DeduplicatedDeviceActivationRequest {
bytes payload = 1;
protocol.Message message = 2;

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];
string app_id = 13;
string dev_id = 14;

protocol.RxMetadata protocol_metadata = 21;
repeated gateway.RxMetadata gateway_metadata = 22;
protocol.ActivationMetadata activation_metadata = 23;

int64 server_time = 24;

DeviceActivationResponse response_template = 31;
}

message ActivationChallengeRequest {
bytes payload = 1;
protocol.Message message = 2;

bytes dev_eui = 11 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.DevEUI"];
bytes app_eui = 12 [(gogoproto.customtype) = "github.com/TheThingsNetwork/ttn/core/types.AppEUI"];
string app_id = 13;
Expand Down
2 changes: 1 addition & 1 deletion api/broker/client_streams.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker
Expand Down
2 changes: 1 addition & 1 deletion api/broker/communication_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker
Expand Down
2 changes: 1 addition & 1 deletion api/broker/message_marshaling.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker
Expand Down
2 changes: 1 addition & 1 deletion api/broker/message_marshaling_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker
Expand Down
2 changes: 1 addition & 1 deletion api/broker/server_streams.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker
Expand Down
3 changes: 3 additions & 0 deletions api/broker/validation.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package broker

import (
Expand Down
3 changes: 3 additions & 0 deletions api/context.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package api

import "context"
Expand Down
2 changes: 1 addition & 1 deletion api/dial.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package api
Expand Down
2 changes: 1 addition & 1 deletion api/discovery/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2016 The Things Network
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package discovery
Expand Down
3 changes: 3 additions & 0 deletions api/discovery/dial.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2017 The Things Network
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

package discovery

import (
Expand Down
Loading

0 comments on commit 6c1fe6a

Please sign in to comment.