mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-20 21:53:11 +00:00
api: Refactor meta/meta.proto to streams/meta.proto.
This commit is contained in:
parent
09e1ae0263
commit
ec0ecf2044
2
api/csharp/Chirpstack.Api.csproj
vendored
2
api/csharp/Chirpstack.Api.csproj
vendored
@ -22,7 +22,7 @@
|
||||
<Protobuf Include="../proto/api/request_log.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
|
||||
<Protobuf Include="../proto/api/relay.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
|
||||
<Protobuf Include="../proto/integration/integration.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
|
||||
<Protobuf Include="../proto/meta/meta.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
|
||||
<Protobuf Include="../proto/streams/meta.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
|
||||
<Protobuf Include="/googleproto/google/api/*.proto" ProtoRoot="/googleproto" OutputDir="Chirpstack/" CompileOutputs="false" />
|
||||
</ItemGroup>
|
||||
|
||||
|
8
api/go/Makefile
vendored
8
api/go/Makefile
vendored
@ -1,8 +1,8 @@
|
||||
.PHONY: requirements common gw api integration meta
|
||||
.PHONY: requirements common gw api integration streams
|
||||
|
||||
PROTOC_ARGS := -I=/googleapis -I=../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative
|
||||
|
||||
all: requirements common gw api integration meta
|
||||
all: requirements common gw api integration streams
|
||||
|
||||
requirements:
|
||||
go mod download
|
||||
@ -32,5 +32,5 @@ api:
|
||||
integration:
|
||||
protoc ${PROTOC_ARGS} integration/integration.proto
|
||||
|
||||
meta:
|
||||
protoc ${PROTOC_ARGS} meta/meta.proto
|
||||
streams:
|
||||
protoc ${PROTOC_ARGS} streams/meta.proto
|
||||
|
179
api/go/meta/meta.pb.go → api/go/streams/meta.pb.go
vendored
179
api/go/meta/meta.pb.go → api/go/streams/meta.pb.go
vendored
@ -2,9 +2,9 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v3.21.9
|
||||
// source: meta/meta.proto
|
||||
// source: streams/meta.proto
|
||||
|
||||
package meta
|
||||
package streams
|
||||
|
||||
import (
|
||||
common "github.com/chirpstack/chirpstack/api/go/v4/common"
|
||||
@ -46,7 +46,7 @@ type UplinkMeta struct {
|
||||
func (x *UplinkMeta) Reset() {
|
||||
*x = UplinkMeta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_meta_meta_proto_msgTypes[0]
|
||||
mi := &file_streams_meta_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -59,7 +59,7 @@ func (x *UplinkMeta) String() string {
|
||||
func (*UplinkMeta) ProtoMessage() {}
|
||||
|
||||
func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_meta_meta_proto_msgTypes[0]
|
||||
mi := &file_streams_meta_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -72,7 +72,7 @@ func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use UplinkMeta.ProtoReflect.Descriptor instead.
|
||||
func (*UplinkMeta) Descriptor() ([]byte, []int) {
|
||||
return file_meta_meta_proto_rawDescGZIP(), []int{0}
|
||||
return file_streams_meta_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *UplinkMeta) GetDevEui() string {
|
||||
@ -150,7 +150,7 @@ type DownlinkMeta struct {
|
||||
func (x *DownlinkMeta) Reset() {
|
||||
*x = DownlinkMeta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_meta_meta_proto_msgTypes[1]
|
||||
mi := &file_streams_meta_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -163,7 +163,7 @@ func (x *DownlinkMeta) String() string {
|
||||
func (*DownlinkMeta) ProtoMessage() {}
|
||||
|
||||
func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_meta_meta_proto_msgTypes[1]
|
||||
mi := &file_streams_meta_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -176,7 +176,7 @@ func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DownlinkMeta.ProtoReflect.Descriptor instead.
|
||||
func (*DownlinkMeta) Descriptor() ([]byte, []int) {
|
||||
return file_meta_meta_proto_rawDescGZIP(), []int{1}
|
||||
return file_streams_meta_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DownlinkMeta) GetDevEui() string {
|
||||
@ -235,82 +235,83 @@ func (x *DownlinkMeta) GetGatewayId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_meta_meta_proto protoreflect.FileDescriptor
|
||||
var File_streams_meta_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_meta_meta_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x67, 0x77,
|
||||
0x2f, 0x67, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x55, 0x70,
|
||||
0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f,
|
||||
0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75,
|
||||
0x69, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x78,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x0a, 0x07,
|
||||
0x72, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
|
||||
0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x06, 0x72, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x68, 0x79, 0x5f, 0x70,
|
||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70, 0x68, 0x79, 0x50, 0x61, 0x79, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16,
|
||||
0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65,
|
||||
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61,
|
||||
0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74,
|
||||
0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x82, 0x03, 0x0a, 0x0c, 0x44, 0x6f, 0x77,
|
||||
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76,
|
||||
0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45,
|
||||
0x75, 0x69, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f,
|
||||
0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
|
||||
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
|
||||
0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x54,
|
||||
0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a,
|
||||
0x16, 0x70, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74,
|
||||
0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70,
|
||||
0x68, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
||||
0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x79,
|
||||
0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70, 0x70, 0x6c, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62,
|
||||
0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c,
|
||||
0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0c,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54, 0x79, 0x70,
|
||||
0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
|
||||
0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x42, 0x68, 0x0a,
|
||||
0x16, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x42, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72,
|
||||
0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34,
|
||||
0x2f, 0x6d, 0x65, 0x74, 0x61, 0xaa, 0x02, 0x0f, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61,
|
||||
0x63, 0x6b, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
var file_streams_meta_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x0b, 0x67, 0x77, 0x2f, 0x67, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a,
|
||||
0x0a, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x64,
|
||||
0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65,
|
||||
0x76, 0x45, 0x75, 0x69, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e,
|
||||
0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x29, 0x0a, 0x07, 0x72, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x10, 0x2e, 0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x78, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x06, 0x72, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x68,
|
||||
0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70, 0x68, 0x79, 0x50,
|
||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x33, 0x0a, 0x16, 0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x62,
|
||||
0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x13, 0x6d, 0x61, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65,
|
||||
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x61, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64,
|
||||
0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b,
|
||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x82, 0x03, 0x0a, 0x0c,
|
||||
0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07,
|
||||
0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
|
||||
0x65, 0x76, 0x45, 0x75, 0x69, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61,
|
||||
0x73, 0x74, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x10, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75,
|
||||
0x70, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x33, 0x0a, 0x16, 0x70, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
|
||||
0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x13, 0x70, 0x68, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
|
||||
0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
|
||||
0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50,
|
||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||
0x30, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d,
|
||||
0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64,
|
||||
0x42, 0x74, 0x0a, 0x19, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x42, 0x0c, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73,
|
||||
0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x73, 0xaa, 0x02, 0x12, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_meta_meta_proto_rawDescOnce sync.Once
|
||||
file_meta_meta_proto_rawDescData = file_meta_meta_proto_rawDesc
|
||||
file_streams_meta_proto_rawDescOnce sync.Once
|
||||
file_streams_meta_proto_rawDescData = file_streams_meta_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_meta_meta_proto_rawDescGZIP() []byte {
|
||||
file_meta_meta_proto_rawDescOnce.Do(func() {
|
||||
file_meta_meta_proto_rawDescData = protoimpl.X.CompressGZIP(file_meta_meta_proto_rawDescData)
|
||||
func file_streams_meta_proto_rawDescGZIP() []byte {
|
||||
file_streams_meta_proto_rawDescOnce.Do(func() {
|
||||
file_streams_meta_proto_rawDescData = protoimpl.X.CompressGZIP(file_streams_meta_proto_rawDescData)
|
||||
})
|
||||
return file_meta_meta_proto_rawDescData
|
||||
return file_streams_meta_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_meta_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_meta_meta_proto_goTypes = []interface{}{
|
||||
var file_streams_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_streams_meta_proto_goTypes = []interface{}{
|
||||
(*UplinkMeta)(nil), // 0: meta.UplinkMeta
|
||||
(*DownlinkMeta)(nil), // 1: meta.DownlinkMeta
|
||||
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
||||
@ -318,7 +319,7 @@ var file_meta_meta_proto_goTypes = []interface{}{
|
||||
(common.MType)(0), // 4: common.MType
|
||||
(*gw.DownlinkTxInfo)(nil), // 5: gw.DownlinkTxInfo
|
||||
}
|
||||
var file_meta_meta_proto_depIdxs = []int32{
|
||||
var file_streams_meta_proto_depIdxs = []int32{
|
||||
2, // 0: meta.UplinkMeta.tx_info:type_name -> gw.UplinkTxInfo
|
||||
3, // 1: meta.UplinkMeta.rx_info:type_name -> gw.UplinkRxInfo
|
||||
4, // 2: meta.UplinkMeta.message_type:type_name -> common.MType
|
||||
@ -331,13 +332,13 @@ var file_meta_meta_proto_depIdxs = []int32{
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_meta_meta_proto_init() }
|
||||
func file_meta_meta_proto_init() {
|
||||
if File_meta_meta_proto != nil {
|
||||
func init() { file_streams_meta_proto_init() }
|
||||
func file_streams_meta_proto_init() {
|
||||
if File_streams_meta_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_meta_meta_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_streams_meta_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UplinkMeta); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -349,7 +350,7 @@ func file_meta_meta_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_meta_meta_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_streams_meta_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DownlinkMeta); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -366,18 +367,18 @@ func file_meta_meta_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_meta_meta_proto_rawDesc,
|
||||
RawDescriptor: file_streams_meta_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_meta_meta_proto_goTypes,
|
||||
DependencyIndexes: file_meta_meta_proto_depIdxs,
|
||||
MessageInfos: file_meta_meta_proto_msgTypes,
|
||||
GoTypes: file_streams_meta_proto_goTypes,
|
||||
DependencyIndexes: file_streams_meta_proto_depIdxs,
|
||||
MessageInfos: file_streams_meta_proto_msgTypes,
|
||||
}.Build()
|
||||
File_meta_meta_proto = out.File
|
||||
file_meta_meta_proto_rawDesc = nil
|
||||
file_meta_meta_proto_goTypes = nil
|
||||
file_meta_meta_proto_depIdxs = nil
|
||||
File_streams_meta_proto = out.File
|
||||
file_streams_meta_proto_rawDesc = nil
|
||||
file_streams_meta_proto_goTypes = nil
|
||||
file_streams_meta_proto_depIdxs = nil
|
||||
}
|
8
api/js/Makefile
vendored
8
api/js/Makefile
vendored
@ -1,4 +1,4 @@
|
||||
.PHONY: requirements common gw api integration meta
|
||||
.PHONY: requirements common gw api integration streams
|
||||
|
||||
PROTOC_PATH := ./node_modules/grpc-tools/bin/protoc
|
||||
PROTOC_GEN_TS_PATH := ./node_modules/.bin/protoc-gen-ts
|
||||
@ -6,7 +6,7 @@ PROTOC_GEN_GRPC_PATH := ./node_modules/.bin/grpc_tools_node_protoc_plugin
|
||||
PROTOC_ARGS := -I=/googleapis -I=../proto --plugin=protoc-gen-ts=$(PROTOC_GEN_TS_PATH) --plugin=protoc-gen-grpc=$(PROTOC_GEN_GRPC_PATH) --js_out=import_style=commonjs,binary:. --ts_out=service=grpc-node,mode=grpc-js:.
|
||||
PROTOC_GRPC_ARGS := $(PROTOC_ARGS) --grpc_out=grpc_js:.
|
||||
|
||||
all: requirements common gw api integration meta google-api
|
||||
all: requirements common gw api integration streams google-api
|
||||
|
||||
requirements:
|
||||
yarn install
|
||||
@ -34,8 +34,8 @@ api:
|
||||
integration:
|
||||
protoc ${PROTOC_ARGS} ../proto/integration/integration.proto
|
||||
|
||||
meta:
|
||||
protoc ${PROTOC_ARGS} ../proto/meta/meta.proto
|
||||
streams:
|
||||
protoc ${PROTOC_ARGS} ../proto/streams/meta.proto
|
||||
|
||||
google-api:
|
||||
protoc $(PROTOC_ARGS) /googleapis/google/api/*.proto
|
||||
|
@ -1,5 +1,5 @@
|
||||
// package: meta
|
||||
// file: meta/meta.proto
|
||||
// file: streams/meta.proto
|
||||
|
||||
import * as jspb from "google-protobuf";
|
||||
import * as common_common_pb from "../common/common_pb";
|
@ -1,4 +1,4 @@
|
||||
// source: meta/meta.proto
|
||||
// source: streams/meta.proto
|
||||
/**
|
||||
* @fileoverview
|
||||
* @enhanceable
|
62
api/proto/meta/meta.proto
vendored
62
api/proto/meta/meta.proto
vendored
@ -1,62 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package meta;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/meta";
|
||||
option java_package = "io.chirpstack.api.meta";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "MetaProto";
|
||||
option csharp_namespace = "Chirpstack.Meta";
|
||||
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
|
||||
message UplinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
}
|
||||
|
||||
message DownlinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// Multicast Group ID (UUID).
|
||||
string multicast_group_id = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 8;
|
||||
}
|
61
api/proto/streams/meta.proto
vendored
Normal file
61
api/proto/streams/meta.proto
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package meta;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/streams";
|
||||
option java_package = "io.chirpstack.api.streams";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "StreamsProto";
|
||||
option csharp_namespace = "Chirpstack.Streams";
|
||||
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
message UplinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
}
|
||||
|
||||
message DownlinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// Multicast Group ID (UUID).
|
||||
string multicast_group_id = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 8;
|
||||
}
|
8
api/python/Makefile
vendored
8
api/python/Makefile
vendored
@ -1,10 +1,10 @@
|
||||
.PHONY: requirements common gw api integration meta
|
||||
.PHONY: requirements common gw api integration streams
|
||||
|
||||
PROTOC := python -m grpc_tools.protoc
|
||||
PROTOC_ARGS := -I=/googleapis -I=proto --python_out=src --grpc_python_out=src --pyi_out=src
|
||||
PACKAGE_NAME := import \"chirpstack-api/
|
||||
|
||||
all: requirements pre-build common gw api integration meta
|
||||
all: requirements pre-build common gw api integration streams
|
||||
|
||||
requirements:
|
||||
pip install grpcio-tools
|
||||
@ -43,5 +43,5 @@ api:
|
||||
integration:
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/integration/integration.proto
|
||||
|
||||
meta:
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/meta/meta.proto
|
||||
streams:
|
||||
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/streams/meta.proto
|
||||
|
@ -1 +0,0 @@
|
||||
from .meta_pb2 import *
|
31
api/python/src/chirpstack_api/meta/meta_pb2.py
vendored
31
api/python/src/chirpstack_api/meta/meta_pb2.py
vendored
@ -1,31 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/meta/meta.proto
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf.internal import builder as _builder
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_common__pb2
|
||||
from chirpstack_api.gw import gw_pb2 as chirpstack__api_dot_gw_dot_gw__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63hirpstack-api/meta/meta.proto\x12\x04meta\x1a\"chirpstack-api/common/common.proto\x1a\x1a\x63hirpstack-api/gw/gw.proto\"\xf0\x01\n\nUplinkMeta\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\x12!\n\x07tx_info\x18\x02 \x01(\x0b\x32\x10.gw.UplinkTxInfo\x12!\n\x07rx_info\x18\x03 \x03(\x0b\x32\x10.gw.UplinkRxInfo\x12\x1e\n\x16phy_payload_byte_count\x18\x04 \x01(\r\x12\x1e\n\x16mac_command_byte_count\x18\x05 \x01(\r\x12&\n\x1e\x61pplication_payload_byte_count\x18\x06 \x01(\r\x12#\n\x0cmessage_type\x18\x07 \x01(\x0e\x32\r.common.MType\"\x81\x02\n\x0c\x44ownlinkMeta\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\x12\x1a\n\x12multicast_group_id\x18\x02 \x01(\t\x12#\n\x07tx_info\x18\x03 \x01(\x0b\x32\x12.gw.DownlinkTxInfo\x12\x1e\n\x16phy_payload_byte_count\x18\x04 \x01(\r\x12\x1e\n\x16mac_command_byte_count\x18\x05 \x01(\r\x12&\n\x1e\x61pplication_payload_byte_count\x18\x06 \x01(\r\x12#\n\x0cmessage_type\x18\x07 \x01(\x0e\x32\r.common.MType\x12\x12\n\ngateway_id\x18\x08 \x01(\tBh\n\x16io.chirpstack.api.metaB\tMetaProtoP\x01Z/github.com/chirpstack/chirpstack/api/go/v4/meta\xaa\x02\x0f\x43hirpstack.Metab\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.meta.meta_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
DESCRIPTOR._serialized_options = b'\n\026io.chirpstack.api.metaB\tMetaProtoP\001Z/github.com/chirpstack/chirpstack/api/go/v4/meta\252\002\017Chirpstack.Meta'
|
||||
_globals['_UPLINKMETA']._serialized_start=105
|
||||
_globals['_UPLINKMETA']._serialized_end=345
|
||||
_globals['_DOWNLINKMETA']._serialized_start=348
|
||||
_globals['_DOWNLINKMETA']._serialized_end=605
|
||||
# @@protoc_insertion_point(module_scope)
|
46
api/python/src/chirpstack_api/meta/meta_pb2.pyi
vendored
46
api/python/src/chirpstack_api/meta/meta_pb2.pyi
vendored
@ -1,46 +0,0 @@
|
||||
from chirpstack_api.common import common_pb2 as _common_pb2
|
||||
from chirpstack_api.gw import gw_pb2 as _gw_pb2
|
||||
from google.protobuf.internal import containers as _containers
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
||||
|
||||
DESCRIPTOR: _descriptor.FileDescriptor
|
||||
|
||||
class UplinkMeta(_message.Message):
|
||||
__slots__ = ["dev_eui", "tx_info", "rx_info", "phy_payload_byte_count", "mac_command_byte_count", "application_payload_byte_count", "message_type"]
|
||||
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
|
||||
TX_INFO_FIELD_NUMBER: _ClassVar[int]
|
||||
RX_INFO_FIELD_NUMBER: _ClassVar[int]
|
||||
PHY_PAYLOAD_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MAC_COMMAND_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
APPLICATION_PAYLOAD_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MESSAGE_TYPE_FIELD_NUMBER: _ClassVar[int]
|
||||
dev_eui: str
|
||||
tx_info: _gw_pb2.UplinkTxInfo
|
||||
rx_info: _containers.RepeatedCompositeFieldContainer[_gw_pb2.UplinkRxInfo]
|
||||
phy_payload_byte_count: int
|
||||
mac_command_byte_count: int
|
||||
application_payload_byte_count: int
|
||||
message_type: _common_pb2.MType
|
||||
def __init__(self, dev_eui: _Optional[str] = ..., tx_info: _Optional[_Union[_gw_pb2.UplinkTxInfo, _Mapping]] = ..., rx_info: _Optional[_Iterable[_Union[_gw_pb2.UplinkRxInfo, _Mapping]]] = ..., phy_payload_byte_count: _Optional[int] = ..., mac_command_byte_count: _Optional[int] = ..., application_payload_byte_count: _Optional[int] = ..., message_type: _Optional[_Union[_common_pb2.MType, str]] = ...) -> None: ...
|
||||
|
||||
class DownlinkMeta(_message.Message):
|
||||
__slots__ = ["dev_eui", "multicast_group_id", "tx_info", "phy_payload_byte_count", "mac_command_byte_count", "application_payload_byte_count", "message_type", "gateway_id"]
|
||||
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
|
||||
MULTICAST_GROUP_ID_FIELD_NUMBER: _ClassVar[int]
|
||||
TX_INFO_FIELD_NUMBER: _ClassVar[int]
|
||||
PHY_PAYLOAD_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MAC_COMMAND_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
APPLICATION_PAYLOAD_BYTE_COUNT_FIELD_NUMBER: _ClassVar[int]
|
||||
MESSAGE_TYPE_FIELD_NUMBER: _ClassVar[int]
|
||||
GATEWAY_ID_FIELD_NUMBER: _ClassVar[int]
|
||||
dev_eui: str
|
||||
multicast_group_id: str
|
||||
tx_info: _gw_pb2.DownlinkTxInfo
|
||||
phy_payload_byte_count: int
|
||||
mac_command_byte_count: int
|
||||
application_payload_byte_count: int
|
||||
message_type: _common_pb2.MType
|
||||
gateway_id: str
|
||||
def __init__(self, dev_eui: _Optional[str] = ..., multicast_group_id: _Optional[str] = ..., tx_info: _Optional[_Union[_gw_pb2.DownlinkTxInfo, _Mapping]] = ..., phy_payload_byte_count: _Optional[int] = ..., mac_command_byte_count: _Optional[int] = ..., application_payload_byte_count: _Optional[int] = ..., message_type: _Optional[_Union[_common_pb2.MType, str]] = ..., gateway_id: _Optional[str] = ...) -> None: ...
|
@ -1,4 +0,0 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
"""Client and server classes corresponding to protobuf-defined services."""
|
||||
import grpc
|
||||
|
14
api/rust/build.rs
vendored
14
api/rust/build.rs
vendored
@ -13,7 +13,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
std::fs::create_dir_all(out_dir.join("gw")).unwrap();
|
||||
std::fs::create_dir_all(out_dir.join("internal")).unwrap();
|
||||
std::fs::create_dir_all(out_dir.join("integration")).unwrap();
|
||||
std::fs::create_dir_all(out_dir.join("meta")).unwrap();
|
||||
std::fs::create_dir_all(out_dir.join("streams")).unwrap();
|
||||
std::fs::create_dir_all(out_dir.join("api")).unwrap();
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
@ -136,25 +136,25 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.build(&[".integration"])?;
|
||||
}
|
||||
|
||||
// meta
|
||||
// streams
|
||||
tonic_build::configure()
|
||||
.out_dir(out_dir.join("meta"))
|
||||
.file_descriptor_set_path(out_dir.join("meta").join("proto_descriptor.bin"))
|
||||
.out_dir(out_dir.join("streams"))
|
||||
.file_descriptor_set_path(out_dir.join("streams").join("proto_descriptor.bin"))
|
||||
.compile_well_known_types(true)
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.compile(
|
||||
&[cs_dir.join("meta").join("meta.proto").to_str().unwrap()],
|
||||
&[cs_dir.join("streams").join("meta.proto").to_str().unwrap()],
|
||||
&[proto_dir.join("chirpstack").to_str().unwrap()],
|
||||
)?;
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
{
|
||||
let descriptor_set = std::fs::read(out_dir.join("meta").join("proto_descriptor.bin"))?;
|
||||
let descriptor_set = std::fs::read(out_dir.join("streams").join("proto_descriptor.bin"))?;
|
||||
pbjson_build::Builder::new()
|
||||
.register_descriptors(&descriptor_set)?
|
||||
.ignore_unknown_fields()
|
||||
.out_dir(out_dir.join("meta"))
|
||||
.out_dir(out_dir.join("streams"))
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.build(&[".meta"])?;
|
||||
|
62
api/rust/proto/chirpstack/meta/meta.proto
vendored
62
api/rust/proto/chirpstack/meta/meta.proto
vendored
@ -1,62 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package meta;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/meta";
|
||||
option java_package = "io.chirpstack.api.meta";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "MetaProto";
|
||||
option csharp_namespace = "Chirpstack.Meta";
|
||||
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
|
||||
message UplinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
}
|
||||
|
||||
message DownlinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// Multicast Group ID (UUID).
|
||||
string multicast_group_id = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 8;
|
||||
}
|
61
api/rust/proto/chirpstack/streams/meta.proto
vendored
Normal file
61
api/rust/proto/chirpstack/streams/meta.proto
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package meta;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/streams";
|
||||
option java_package = "io.chirpstack.api.streams";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "StreamsProto";
|
||||
option csharp_namespace = "Chirpstack.Streams";
|
||||
|
||||
import "common/common.proto";
|
||||
import "gw/gw.proto";
|
||||
|
||||
message UplinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// TX meta-data.
|
||||
gw.UplinkTxInfo tx_info = 2;
|
||||
|
||||
// RX meta-data.
|
||||
repeated gw.UplinkRxInfo rx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
}
|
||||
|
||||
message DownlinkMeta {
|
||||
// Device EUI (EUI64).
|
||||
string dev_eui = 1;
|
||||
|
||||
// Multicast Group ID (UUID).
|
||||
string multicast_group_id = 2;
|
||||
|
||||
// TX meta-data.
|
||||
gw.DownlinkTxInfo tx_info = 3;
|
||||
|
||||
// PHYPayload byte count.
|
||||
uint32 phy_payload_byte_count = 4;
|
||||
|
||||
// MAC-Command byte count.
|
||||
uint32 mac_command_byte_count = 5;
|
||||
|
||||
// Application payload byte count.
|
||||
uint32 application_payload_byte_count = 6;
|
||||
|
||||
// Message type.
|
||||
common.MType message_type = 7;
|
||||
|
||||
// Gateway ID (EUI64).
|
||||
string gateway_id = 8;
|
||||
}
|
2
api/rust/src/lib.rs
vendored
2
api/rust/src/lib.rs
vendored
@ -6,4 +6,4 @@ pub mod gw;
|
||||
pub mod integration;
|
||||
#[cfg(feature = "internal")]
|
||||
pub mod internal;
|
||||
pub mod meta;
|
||||
pub mod streams;
|
||||
|
3
api/rust/src/meta.rs
vendored
3
api/rust/src/meta.rs
vendored
@ -1,3 +0,0 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/meta/meta.rs"));
|
||||
#[cfg(feature = "json")]
|
||||
include!(concat!(env!("OUT_DIR"), "/meta/meta.serde.rs"));
|
3
api/rust/src/streams.rs
vendored
Normal file
3
api/rust/src/streams.rs
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/meta.rs"));
|
||||
#[cfg(feature = "json")]
|
||||
include!(concat!(env!("OUT_DIR"), "/streams/meta.serde.rs"));
|
@ -13,7 +13,7 @@ use crate::storage::{
|
||||
device_profile, device_queue, device_session, downlink_frame, multicast, tenant,
|
||||
};
|
||||
use crate::{framelog, integration, metalog};
|
||||
use chirpstack_api::{api, common, gw, integration as integration_pb, internal, meta};
|
||||
use chirpstack_api::{api, common, gw, integration as integration_pb, internal, streams};
|
||||
|
||||
pub struct TxAck {
|
||||
downlink_tx_ack: gw::DownlinkTxAck,
|
||||
@ -706,7 +706,7 @@ impl TxAck {
|
||||
let dfi = self.downlink_frame_item.as_ref().unwrap();
|
||||
let phy = self.phy_payload.as_ref().unwrap();
|
||||
|
||||
let dm = meta::DownlinkMeta {
|
||||
let dm = streams::DownlinkMeta {
|
||||
dev_eui: if !df.dev_eui.is_empty() {
|
||||
EUI64::from_slice(&df.dev_eui)?.to_string()
|
||||
} else {
|
||||
|
@ -4,9 +4,9 @@ use tokio::task;
|
||||
|
||||
use crate::config;
|
||||
use crate::storage::{get_redis_conn, redis_key};
|
||||
use chirpstack_api::meta;
|
||||
use chirpstack_api::streams;
|
||||
|
||||
pub async fn log_uplink(up: &meta::UplinkMeta) -> Result<()> {
|
||||
pub async fn log_uplink(up: &streams::UplinkMeta) -> Result<()> {
|
||||
task::spawn_blocking({
|
||||
let up = up.clone();
|
||||
move || -> Result<()> {
|
||||
@ -32,7 +32,7 @@ pub async fn log_uplink(up: &meta::UplinkMeta) -> Result<()> {
|
||||
.await?
|
||||
}
|
||||
|
||||
pub async fn log_downlink(down: &meta::DownlinkMeta) -> Result<()> {
|
||||
pub async fn log_downlink(down: &streams::DownlinkMeta) -> Result<()> {
|
||||
task::spawn_blocking({
|
||||
let down = down.clone();
|
||||
move || -> Result<()> {
|
||||
|
@ -14,7 +14,7 @@ use crate::storage::{
|
||||
device::{self, DeviceClass},
|
||||
device_queue, device_session, downlink_frame, get_redis_conn, redis_key,
|
||||
};
|
||||
use chirpstack_api::{api, gw, integration as integration_pb, internal, meta};
|
||||
use chirpstack_api::{api, gw, integration as integration_pb, internal, streams};
|
||||
use lrwn::EUI64;
|
||||
|
||||
lazy_static! {
|
||||
@ -393,7 +393,7 @@ pub fn enabled_class(dev_eui: EUI64, c: DeviceClass) -> Validator {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn uplink_meta_log(um: meta::UplinkMeta) -> Validator {
|
||||
pub fn uplink_meta_log(um: streams::UplinkMeta) -> Validator {
|
||||
Box::new(move || {
|
||||
let um = um.clone();
|
||||
Box::pin(async move {
|
||||
@ -413,7 +413,7 @@ pub fn uplink_meta_log(um: meta::UplinkMeta) -> Validator {
|
||||
for (k, v) in &stream_id.map {
|
||||
assert_eq!("up", k);
|
||||
if let redis::Value::Data(b) = v {
|
||||
let pl = meta::UplinkMeta::decode(&mut Cursor::new(b)).unwrap();
|
||||
let pl = streams::UplinkMeta::decode(&mut Cursor::new(b)).unwrap();
|
||||
assert_eq!(um, pl);
|
||||
} else {
|
||||
panic!("Invalid payload");
|
||||
|
@ -11,7 +11,7 @@ use crate::storage::{
|
||||
device_keys, device_profile, gateway, reset_redis, tenant,
|
||||
};
|
||||
use crate::{config, gateway::backend as gateway_backend, integration, region, test, uplink};
|
||||
use chirpstack_api::{common, gw, internal, meta};
|
||||
use chirpstack_api::{common, gw, internal, streams};
|
||||
use lrwn::keys::get_js_int_key;
|
||||
use lrwn::{AES128Key, EUI64};
|
||||
|
||||
@ -564,7 +564,7 @@ async fn test_lorawan_10() {
|
||||
}),
|
||||
assert::enabled_class(dev.dev_eui.clone(), DeviceClass::A),
|
||||
assert::device_queue_items(dev.dev_eui.clone(), vec![]),
|
||||
assert::uplink_meta_log(meta::UplinkMeta {
|
||||
assert::uplink_meta_log(streams::UplinkMeta {
|
||||
dev_eui: dev.dev_eui.to_string(),
|
||||
tx_info: Some(tx_info.clone()),
|
||||
rx_info: vec![rx_info.clone()],
|
||||
|
@ -20,7 +20,7 @@ use crate::storage::{
|
||||
device_gateway, device_profile, device_queue, device_session, fields, metrics, tenant,
|
||||
};
|
||||
use crate::{codec, config, downlink, framelog, integration, maccommand, metalog, region};
|
||||
use chirpstack_api::{api, integration as integration_pb, internal, meta};
|
||||
use chirpstack_api::{api, integration as integration_pb, internal, streams};
|
||||
use lrwn::{AES128Key, EUI64};
|
||||
|
||||
pub struct Data {
|
||||
@ -733,7 +733,7 @@ impl Data {
|
||||
trace!("Logging uplink meta");
|
||||
|
||||
if let lrwn::Payload::MACPayload(mac_pl) = &self.phy_payload.payload {
|
||||
let um = meta::UplinkMeta {
|
||||
let um = streams::UplinkMeta {
|
||||
dev_eui: self.device.as_ref().unwrap().dev_eui.to_string(),
|
||||
tx_info: Some(self.uplink_frame_set.tx_info.clone()),
|
||||
rx_info: self.uplink_frame_set.rx_info_set.clone(),
|
||||
|
@ -31,7 +31,7 @@ use crate::storage::{
|
||||
use crate::{
|
||||
config, devaddr::get_random_dev_addr, downlink, framelog, integration, metalog, region,
|
||||
};
|
||||
use chirpstack_api::{api, common, integration as integration_pb, internal, meta};
|
||||
use chirpstack_api::{api, common, integration as integration_pb, internal, streams};
|
||||
|
||||
pub struct JoinRequest {
|
||||
uplink_frame_set: UplinkFrameSet,
|
||||
@ -768,7 +768,7 @@ impl JoinRequest {
|
||||
async fn log_uplink_meta(&self) -> Result<()> {
|
||||
trace!("Logging uplink meta");
|
||||
|
||||
let um = meta::UplinkMeta {
|
||||
let um = streams::UplinkMeta {
|
||||
dev_eui: self.device.as_ref().unwrap().dev_eui.to_string(),
|
||||
tx_info: Some(self.uplink_frame_set.tx_info.clone()),
|
||||
rx_info: self.uplink_frame_set.rx_info_set.clone(),
|
||||
|
@ -16,7 +16,7 @@ use crate::storage::{
|
||||
};
|
||||
use crate::{config, devaddr::get_random_dev_addr, integration, metalog, region};
|
||||
use backend::{PRStartAnsPayload, PRStartReqPayload};
|
||||
use chirpstack_api::{common, integration as integration_pb, internal, meta};
|
||||
use chirpstack_api::{common, integration as integration_pb, internal, streams};
|
||||
use lrwn::{keys, AES128Key, DevAddr, NetID};
|
||||
|
||||
pub struct JoinRequest {
|
||||
@ -555,7 +555,7 @@ impl JoinRequest {
|
||||
async fn log_uplink_meta(&self) -> Result<()> {
|
||||
trace!("Logging uplink meta");
|
||||
|
||||
let req = meta::UplinkMeta {
|
||||
let req = streams::UplinkMeta {
|
||||
dev_eui: self.device.as_ref().unwrap().dev_eui.to_string(),
|
||||
tx_info: Some(self.uplink_frame_set.tx_info.clone()),
|
||||
rx_info: self.uplink_frame_set.rx_info_set.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user