Implement support for quick device measurement metrics.

This commit is contained in:
Orne Brocaar 2022-06-28 15:05:42 +01:00
parent 4fa9341139
commit a01f8565fd
73 changed files with 8695 additions and 3833 deletions

1074
api/go/api/device.pb.go vendored

File diff suppressed because it is too large Load Diff

View File

@ -51,8 +51,12 @@ type DeviceServiceClient interface {
GetActivation(ctx context.Context, in *GetDeviceActivationRequest, opts ...grpc.CallOption) (*GetDeviceActivationResponse, error)
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
GetRandomDevAddr(ctx context.Context, in *GetRandomDevAddrRequest, opts ...grpc.CallOption) (*GetRandomDevAddrResponse, error)
// GetStats returns the device stats.
GetStats(ctx context.Context, in *GetDeviceStatsRequest, opts ...grpc.CallOption) (*GetDeviceStatsResponse, error)
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
GetMetrics(ctx context.Context, in *GetDeviceMetricsRequest, opts ...grpc.CallOption) (*GetDeviceMetricsResponse, error)
// GetLinkMetrics returns the device link metrics.
// This includes uplinks, downlinks, RSSI, SNR, etc...
GetLinkMetrics(ctx context.Context, in *GetDeviceLinkMetricsRequest, opts ...grpc.CallOption) (*GetDeviceLinkMetricsResponse, error)
// Enqueue adds the given item to the downlink queue.
Enqueue(ctx context.Context, in *EnqueueDeviceQueueItemRequest, opts ...grpc.CallOption) (*EnqueueDeviceQueueItemResponse, error)
// FlushQueue flushes the downlink device-queue.
@ -195,9 +199,18 @@ func (c *deviceServiceClient) GetRandomDevAddr(ctx context.Context, in *GetRando
return out, nil
}
func (c *deviceServiceClient) GetStats(ctx context.Context, in *GetDeviceStatsRequest, opts ...grpc.CallOption) (*GetDeviceStatsResponse, error) {
out := new(GetDeviceStatsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetStats", in, out, opts...)
func (c *deviceServiceClient) GetMetrics(ctx context.Context, in *GetDeviceMetricsRequest, opts ...grpc.CallOption) (*GetDeviceMetricsResponse, error) {
out := new(GetDeviceMetricsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetLinkMetrics(ctx context.Context, in *GetDeviceLinkMetricsRequest, opts ...grpc.CallOption) (*GetDeviceLinkMetricsResponse, error) {
out := new(GetDeviceLinkMetricsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetLinkMetrics", in, out, opts...)
if err != nil {
return nil, err
}
@ -263,8 +276,12 @@ type DeviceServiceServer interface {
GetActivation(context.Context, *GetDeviceActivationRequest) (*GetDeviceActivationResponse, error)
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
GetRandomDevAddr(context.Context, *GetRandomDevAddrRequest) (*GetRandomDevAddrResponse, error)
// GetStats returns the device stats.
GetStats(context.Context, *GetDeviceStatsRequest) (*GetDeviceStatsResponse, error)
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
GetMetrics(context.Context, *GetDeviceMetricsRequest) (*GetDeviceMetricsResponse, error)
// GetLinkMetrics returns the device link metrics.
// This includes uplinks, downlinks, RSSI, SNR, etc...
GetLinkMetrics(context.Context, *GetDeviceLinkMetricsRequest) (*GetDeviceLinkMetricsResponse, error)
// Enqueue adds the given item to the downlink queue.
Enqueue(context.Context, *EnqueueDeviceQueueItemRequest) (*EnqueueDeviceQueueItemResponse, error)
// FlushQueue flushes the downlink device-queue.
@ -320,8 +337,11 @@ func (UnimplementedDeviceServiceServer) GetActivation(context.Context, *GetDevic
func (UnimplementedDeviceServiceServer) GetRandomDevAddr(context.Context, *GetRandomDevAddrRequest) (*GetRandomDevAddrResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRandomDevAddr not implemented")
}
func (UnimplementedDeviceServiceServer) GetStats(context.Context, *GetDeviceStatsRequest) (*GetDeviceStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
func (UnimplementedDeviceServiceServer) GetMetrics(context.Context, *GetDeviceMetricsRequest) (*GetDeviceMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented")
}
func (UnimplementedDeviceServiceServer) GetLinkMetrics(context.Context, *GetDeviceLinkMetricsRequest) (*GetDeviceLinkMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLinkMetrics not implemented")
}
func (UnimplementedDeviceServiceServer) Enqueue(context.Context, *EnqueueDeviceQueueItemRequest) (*EnqueueDeviceQueueItemResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Enqueue not implemented")
@ -597,20 +617,38 @@ func _DeviceService_GetRandomDevAddr_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceStatsRequest)
func _DeviceService_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetStats(ctx, in)
return srv.(DeviceServiceServer).GetMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetStats",
FullMethod: "/api.DeviceService/GetMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetStats(ctx, req.(*GetDeviceStatsRequest))
return srv.(DeviceServiceServer).GetMetrics(ctx, req.(*GetDeviceMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetLinkMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceLinkMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetLinkMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetLinkMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetLinkMetrics(ctx, req.(*GetDeviceLinkMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -733,8 +771,12 @@ var DeviceService_ServiceDesc = grpc.ServiceDesc{
Handler: _DeviceService_GetRandomDevAddr_Handler,
},
{
MethodName: "GetStats",
Handler: _DeviceService_GetStats_Handler,
MethodName: "GetMetrics",
Handler: _DeviceService_GetMetrics_Handler,
},
{
MethodName: "GetLinkMetrics",
Handler: _DeviceService_GetLinkMetrics_Handler,
},
{
MethodName: "Enqueue",

View File

@ -75,6 +75,66 @@ func (CodecRuntime) EnumDescriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{0}
}
type MeasurementKind int32
const (
// Unknown (in which case it is not tracked).
MeasurementKind_UNKNOWN MeasurementKind = 0
// Incrementing counters that never decrease (these are not reset on each reading).
MeasurementKind_COUNTER MeasurementKind = 1
// Counters that do get reset upon reading.
MeasurementKind_ABSOLUTE MeasurementKind = 2
// E.g. a temperature value.
MeasurementKind_GAUGE MeasurementKind = 3
// E.g. a firmware version, true / false value.
MeasurementKind_STRING MeasurementKind = 4
)
// Enum value maps for MeasurementKind.
var (
MeasurementKind_name = map[int32]string{
0: "UNKNOWN",
1: "COUNTER",
2: "ABSOLUTE",
3: "GAUGE",
4: "STRING",
}
MeasurementKind_value = map[string]int32{
"UNKNOWN": 0,
"COUNTER": 1,
"ABSOLUTE": 2,
"GAUGE": 3,
"STRING": 4,
}
)
func (x MeasurementKind) Enum() *MeasurementKind {
p := new(MeasurementKind)
*p = x
return p
}
func (x MeasurementKind) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MeasurementKind) Descriptor() protoreflect.EnumDescriptor {
return file_api_device_profile_proto_enumTypes[1].Descriptor()
}
func (MeasurementKind) Type() protoreflect.EnumType {
return &file_api_device_profile_proto_enumTypes[1]
}
func (x MeasurementKind) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MeasurementKind.Descriptor instead.
func (MeasurementKind) EnumDescriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{1}
}
type DeviceProfile struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -140,6 +200,9 @@ type DeviceProfile struct {
AbpRx2Freq uint32 `protobuf:"varint,24,opt,name=abp_rx2_freq,json=abpRx2Freq,proto3" json:"abp_rx2_freq,omitempty"`
// User defined tags.
Tags map[string]string `protobuf:"bytes,25,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
Measurements map[string]*Measurement `protobuf:"bytes,27,rep,name=measurements,proto3" json:"measurements,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *DeviceProfile) Reset() {
@ -356,6 +419,70 @@ func (x *DeviceProfile) GetTags() map[string]string {
return nil
}
func (x *DeviceProfile) GetMeasurements() map[string]*Measurement {
if x != nil {
return x.Measurements
}
return nil
}
type Measurement struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name (user defined).
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Kind.
Kind MeasurementKind `protobuf:"varint,3,opt,name=kind,proto3,enum=api.MeasurementKind" json:"kind,omitempty"`
}
func (x *Measurement) Reset() {
*x = Measurement{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Measurement) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Measurement) ProtoMessage() {}
func (x *Measurement) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Measurement.ProtoReflect.Descriptor instead.
func (*Measurement) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{1}
}
func (x *Measurement) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Measurement) GetKind() MeasurementKind {
if x != nil {
return x.Kind
}
return MeasurementKind_UNKNOWN
}
type DeviceProfileListItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -386,7 +513,7 @@ type DeviceProfileListItem struct {
func (x *DeviceProfileListItem) Reset() {
*x = DeviceProfileListItem{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[1]
mi := &file_api_device_profile_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -399,7 +526,7 @@ func (x *DeviceProfileListItem) String() string {
func (*DeviceProfileListItem) ProtoMessage() {}
func (x *DeviceProfileListItem) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[1]
mi := &file_api_device_profile_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -412,7 +539,7 @@ func (x *DeviceProfileListItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeviceProfileListItem.ProtoReflect.Descriptor instead.
func (*DeviceProfileListItem) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{1}
return file_api_device_profile_proto_rawDescGZIP(), []int{2}
}
func (x *DeviceProfileListItem) GetId() string {
@ -497,7 +624,7 @@ type CreateDeviceProfileRequest struct {
func (x *CreateDeviceProfileRequest) Reset() {
*x = CreateDeviceProfileRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[2]
mi := &file_api_device_profile_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -510,7 +637,7 @@ func (x *CreateDeviceProfileRequest) String() string {
func (*CreateDeviceProfileRequest) ProtoMessage() {}
func (x *CreateDeviceProfileRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[2]
mi := &file_api_device_profile_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -523,7 +650,7 @@ func (x *CreateDeviceProfileRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateDeviceProfileRequest.ProtoReflect.Descriptor instead.
func (*CreateDeviceProfileRequest) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{2}
return file_api_device_profile_proto_rawDescGZIP(), []int{3}
}
func (x *CreateDeviceProfileRequest) GetDeviceProfile() *DeviceProfile {
@ -545,7 +672,7 @@ type CreateDeviceProfileResponse struct {
func (x *CreateDeviceProfileResponse) Reset() {
*x = CreateDeviceProfileResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[3]
mi := &file_api_device_profile_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -558,7 +685,7 @@ func (x *CreateDeviceProfileResponse) String() string {
func (*CreateDeviceProfileResponse) ProtoMessage() {}
func (x *CreateDeviceProfileResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[3]
mi := &file_api_device_profile_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -571,7 +698,7 @@ func (x *CreateDeviceProfileResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateDeviceProfileResponse.ProtoReflect.Descriptor instead.
func (*CreateDeviceProfileResponse) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{3}
return file_api_device_profile_proto_rawDescGZIP(), []int{4}
}
func (x *CreateDeviceProfileResponse) GetId() string {
@ -593,7 +720,7 @@ type GetDeviceProfileRequest struct {
func (x *GetDeviceProfileRequest) Reset() {
*x = GetDeviceProfileRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[4]
mi := &file_api_device_profile_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -606,7 +733,7 @@ func (x *GetDeviceProfileRequest) String() string {
func (*GetDeviceProfileRequest) ProtoMessage() {}
func (x *GetDeviceProfileRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[4]
mi := &file_api_device_profile_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -619,7 +746,7 @@ func (x *GetDeviceProfileRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetDeviceProfileRequest.ProtoReflect.Descriptor instead.
func (*GetDeviceProfileRequest) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{4}
return file_api_device_profile_proto_rawDescGZIP(), []int{5}
}
func (x *GetDeviceProfileRequest) GetId() string {
@ -645,7 +772,7 @@ type GetDeviceProfileResponse struct {
func (x *GetDeviceProfileResponse) Reset() {
*x = GetDeviceProfileResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[5]
mi := &file_api_device_profile_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -658,7 +785,7 @@ func (x *GetDeviceProfileResponse) String() string {
func (*GetDeviceProfileResponse) ProtoMessage() {}
func (x *GetDeviceProfileResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[5]
mi := &file_api_device_profile_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -671,7 +798,7 @@ func (x *GetDeviceProfileResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetDeviceProfileResponse.ProtoReflect.Descriptor instead.
func (*GetDeviceProfileResponse) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{5}
return file_api_device_profile_proto_rawDescGZIP(), []int{6}
}
func (x *GetDeviceProfileResponse) GetDeviceProfile() *DeviceProfile {
@ -707,7 +834,7 @@ type UpdateDeviceProfileRequest struct {
func (x *UpdateDeviceProfileRequest) Reset() {
*x = UpdateDeviceProfileRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[6]
mi := &file_api_device_profile_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -720,7 +847,7 @@ func (x *UpdateDeviceProfileRequest) String() string {
func (*UpdateDeviceProfileRequest) ProtoMessage() {}
func (x *UpdateDeviceProfileRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[6]
mi := &file_api_device_profile_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -733,7 +860,7 @@ func (x *UpdateDeviceProfileRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateDeviceProfileRequest.ProtoReflect.Descriptor instead.
func (*UpdateDeviceProfileRequest) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{6}
return file_api_device_profile_proto_rawDescGZIP(), []int{7}
}
func (x *UpdateDeviceProfileRequest) GetDeviceProfile() *DeviceProfile {
@ -755,7 +882,7 @@ type DeleteDeviceProfileRequest struct {
func (x *DeleteDeviceProfileRequest) Reset() {
*x = DeleteDeviceProfileRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[7]
mi := &file_api_device_profile_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -768,7 +895,7 @@ func (x *DeleteDeviceProfileRequest) String() string {
func (*DeleteDeviceProfileRequest) ProtoMessage() {}
func (x *DeleteDeviceProfileRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[7]
mi := &file_api_device_profile_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -781,7 +908,7 @@ func (x *DeleteDeviceProfileRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteDeviceProfileRequest.ProtoReflect.Descriptor instead.
func (*DeleteDeviceProfileRequest) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{7}
return file_api_device_profile_proto_rawDescGZIP(), []int{8}
}
func (x *DeleteDeviceProfileRequest) GetId() string {
@ -809,7 +936,7 @@ type ListDeviceProfilesRequest struct {
func (x *ListDeviceProfilesRequest) Reset() {
*x = ListDeviceProfilesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[8]
mi := &file_api_device_profile_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -822,7 +949,7 @@ func (x *ListDeviceProfilesRequest) String() string {
func (*ListDeviceProfilesRequest) ProtoMessage() {}
func (x *ListDeviceProfilesRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[8]
mi := &file_api_device_profile_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -835,7 +962,7 @@ func (x *ListDeviceProfilesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListDeviceProfilesRequest.ProtoReflect.Descriptor instead.
func (*ListDeviceProfilesRequest) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{8}
return file_api_device_profile_proto_rawDescGZIP(), []int{9}
}
func (x *ListDeviceProfilesRequest) GetLimit() uint32 {
@ -880,7 +1007,7 @@ type ListDeviceProfilesResponse struct {
func (x *ListDeviceProfilesResponse) Reset() {
*x = ListDeviceProfilesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[9]
mi := &file_api_device_profile_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -893,7 +1020,7 @@ func (x *ListDeviceProfilesResponse) String() string {
func (*ListDeviceProfilesResponse) ProtoMessage() {}
func (x *ListDeviceProfilesResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[9]
mi := &file_api_device_profile_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -906,7 +1033,7 @@ func (x *ListDeviceProfilesResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListDeviceProfilesResponse.ProtoReflect.Descriptor instead.
func (*ListDeviceProfilesResponse) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{9}
return file_api_device_profile_proto_rawDescGZIP(), []int{10}
}
func (x *ListDeviceProfilesResponse) GetTotalCount() uint32 {
@ -937,7 +1064,7 @@ type ListDeviceProfileAdrAlgorithmsResponse struct {
func (x *ListDeviceProfileAdrAlgorithmsResponse) Reset() {
*x = ListDeviceProfileAdrAlgorithmsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[10]
mi := &file_api_device_profile_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -950,7 +1077,7 @@ func (x *ListDeviceProfileAdrAlgorithmsResponse) String() string {
func (*ListDeviceProfileAdrAlgorithmsResponse) ProtoMessage() {}
func (x *ListDeviceProfileAdrAlgorithmsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[10]
mi := &file_api_device_profile_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -963,7 +1090,7 @@ func (x *ListDeviceProfileAdrAlgorithmsResponse) ProtoReflect() protoreflect.Mes
// Deprecated: Use ListDeviceProfileAdrAlgorithmsResponse.ProtoReflect.Descriptor instead.
func (*ListDeviceProfileAdrAlgorithmsResponse) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{10}
return file_api_device_profile_proto_rawDescGZIP(), []int{11}
}
func (x *ListDeviceProfileAdrAlgorithmsResponse) GetTotalCount() uint32 {
@ -994,7 +1121,7 @@ type AdrAlgorithmListItem struct {
func (x *AdrAlgorithmListItem) Reset() {
*x = AdrAlgorithmListItem{}
if protoimpl.UnsafeEnabled {
mi := &file_api_device_profile_proto_msgTypes[11]
mi := &file_api_device_profile_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1007,7 +1134,7 @@ func (x *AdrAlgorithmListItem) String() string {
func (*AdrAlgorithmListItem) ProtoMessage() {}
func (x *AdrAlgorithmListItem) ProtoReflect() protoreflect.Message {
mi := &file_api_device_profile_proto_msgTypes[11]
mi := &file_api_device_profile_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1020,7 +1147,7 @@ func (x *AdrAlgorithmListItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use AdrAlgorithmListItem.ProtoReflect.Descriptor instead.
func (*AdrAlgorithmListItem) Descriptor() ([]byte, []int) {
return file_api_device_profile_proto_rawDescGZIP(), []int{11}
return file_api_device_profile_proto_rawDescGZIP(), []int{12}
}
func (x *AdrAlgorithmListItem) GetId() string {
@ -1047,7 +1174,7 @@ var file_api_device_profile_proto_rawDesc = []byte{
0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xb9, 0x09, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xd6, 0x0a, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49,
@ -1119,138 +1246,158 @@ var file_api_device_profile_proto_rawDesc = []byte{
0x72, 0x65, 0x71, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x04, 0x74, 0x61, 0x67, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd2,
0x03, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61,
0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e,
0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x0c, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a,
0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x11, 0x4d, 0x65, 0x61, 0x73,
0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x0b, 0x4d,
0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28,
0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x69,
0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0xd2, 0x03, 0x0a, 0x15, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74,
0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a,
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65,
0x67, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d,
0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x67,
0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x52, 0x11, 0x72, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73,
0x5f, 0x6f, 0x74, 0x61, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70,
0x70, 0x6f, 0x72, 0x74, 0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70,
0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18, 0x09, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61,
0x73, 0x73, 0x42, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f,
0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73,
0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x22, 0x57, 0x0a,
0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2d, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
0x22, 0xcb, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a,
0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61,
0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x49, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75,
0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6f, 0x74, 0x61, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28,
0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x4f, 0x74, 0x61, 0x61, 0x12,
0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73,
0x73, 0x5f, 0x62, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f,
0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70,
0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x18, 0x0a, 0x20,
0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61,
0x73, 0x73, 0x43, 0x22, 0x57, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2d, 0x0a, 0x1b,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x29, 0x0a, 0x17, 0x47,
0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xcb, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x39,
0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x22, 0x57, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2c, 0x0a,
0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7e, 0x0a, 0x19, 0x4c,
0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16,
0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06,
0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1b,
0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x1a, 0x4c,
0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a,
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x69,
0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x7c,
0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61,
0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74,
0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x0a, 0x14,
0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74,
0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x31, 0x0a, 0x0c, 0x43, 0x6f, 0x64, 0x65,
0x63, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45,
0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x59, 0x45, 0x4e, 0x4e, 0x45, 0x5f, 0x4c, 0x50,
0x50, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x4a, 0x53, 0x10, 0x02, 0x32, 0xdc, 0x03, 0x0a, 0x14,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x57,
0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0e,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7e, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73,
0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61,
0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e,
0x61, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d,
0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x7c, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x64, 0x72,
0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x0a, 0x14, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67,
0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x2a, 0x31, 0x0a, 0x0c, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x75, 0x6e, 0x74, 0x69,
0x6d, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
0x43, 0x41, 0x59, 0x45, 0x4e, 0x4e, 0x45, 0x5f, 0x4c, 0x50, 0x50, 0x10, 0x01, 0x12, 0x06, 0x0a,
0x02, 0x4a, 0x53, 0x10, 0x02, 0x2a, 0x50, 0x0a, 0x0f, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65,
0x6d, 0x65, 0x6e, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52,
0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x42, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x10, 0x02,
0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, 0x45, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53,
0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x32, 0xdc, 0x03, 0x0a, 0x14, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x4d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x44, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x43,
0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a,
0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74,
0x68, 0x6d, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x59, 0x0a, 0x11, 0x69, 0x6f,
0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42,
0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x06, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
0x49, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x11, 0x4c, 0x69,
0x73, 0x74, 0x41, 0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x12,
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x41,
0x64, 0x72, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x59, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69,
0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x01, 0x5a, 0x2e, 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, 0x61, 0x70,
0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1265,64 +1412,70 @@ func file_api_device_profile_proto_rawDescGZIP() []byte {
return file_api_device_profile_proto_rawDescData
}
var file_api_device_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_device_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_api_device_profile_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_api_device_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
var file_api_device_profile_proto_goTypes = []interface{}{
(CodecRuntime)(0), // 0: api.CodecRuntime
(*DeviceProfile)(nil), // 1: api.DeviceProfile
(*DeviceProfileListItem)(nil), // 2: api.DeviceProfileListItem
(*CreateDeviceProfileRequest)(nil), // 3: api.CreateDeviceProfileRequest
(*CreateDeviceProfileResponse)(nil), // 4: api.CreateDeviceProfileResponse
(*GetDeviceProfileRequest)(nil), // 5: api.GetDeviceProfileRequest
(*GetDeviceProfileResponse)(nil), // 6: api.GetDeviceProfileResponse
(*UpdateDeviceProfileRequest)(nil), // 7: api.UpdateDeviceProfileRequest
(*DeleteDeviceProfileRequest)(nil), // 8: api.DeleteDeviceProfileRequest
(*ListDeviceProfilesRequest)(nil), // 9: api.ListDeviceProfilesRequest
(*ListDeviceProfilesResponse)(nil), // 10: api.ListDeviceProfilesResponse
(*ListDeviceProfileAdrAlgorithmsResponse)(nil), // 11: api.ListDeviceProfileAdrAlgorithmsResponse
(*AdrAlgorithmListItem)(nil), // 12: api.AdrAlgorithmListItem
nil, // 13: api.DeviceProfile.TagsEntry
(common.Region)(0), // 14: common.Region
(common.MacVersion)(0), // 15: common.MacVersion
(common.RegParamsRevision)(0), // 16: common.RegParamsRevision
(*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 18: google.protobuf.Empty
(MeasurementKind)(0), // 1: api.MeasurementKind
(*DeviceProfile)(nil), // 2: api.DeviceProfile
(*Measurement)(nil), // 3: api.Measurement
(*DeviceProfileListItem)(nil), // 4: api.DeviceProfileListItem
(*CreateDeviceProfileRequest)(nil), // 5: api.CreateDeviceProfileRequest
(*CreateDeviceProfileResponse)(nil), // 6: api.CreateDeviceProfileResponse
(*GetDeviceProfileRequest)(nil), // 7: api.GetDeviceProfileRequest
(*GetDeviceProfileResponse)(nil), // 8: api.GetDeviceProfileResponse
(*UpdateDeviceProfileRequest)(nil), // 9: api.UpdateDeviceProfileRequest
(*DeleteDeviceProfileRequest)(nil), // 10: api.DeleteDeviceProfileRequest
(*ListDeviceProfilesRequest)(nil), // 11: api.ListDeviceProfilesRequest
(*ListDeviceProfilesResponse)(nil), // 12: api.ListDeviceProfilesResponse
(*ListDeviceProfileAdrAlgorithmsResponse)(nil), // 13: api.ListDeviceProfileAdrAlgorithmsResponse
(*AdrAlgorithmListItem)(nil), // 14: api.AdrAlgorithmListItem
nil, // 15: api.DeviceProfile.TagsEntry
nil, // 16: api.DeviceProfile.MeasurementsEntry
(common.Region)(0), // 17: common.Region
(common.MacVersion)(0), // 18: common.MacVersion
(common.RegParamsRevision)(0), // 19: common.RegParamsRevision
(*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 21: google.protobuf.Empty
}
var file_api_device_profile_proto_depIdxs = []int32{
14, // 0: api.DeviceProfile.region:type_name -> common.Region
15, // 1: api.DeviceProfile.mac_version:type_name -> common.MacVersion
16, // 2: api.DeviceProfile.reg_params_revision:type_name -> common.RegParamsRevision
17, // 0: api.DeviceProfile.region:type_name -> common.Region
18, // 1: api.DeviceProfile.mac_version:type_name -> common.MacVersion
19, // 2: api.DeviceProfile.reg_params_revision:type_name -> common.RegParamsRevision
0, // 3: api.DeviceProfile.payload_codec_runtime:type_name -> api.CodecRuntime
13, // 4: api.DeviceProfile.tags:type_name -> api.DeviceProfile.TagsEntry
17, // 5: api.DeviceProfileListItem.created_at:type_name -> google.protobuf.Timestamp
17, // 6: api.DeviceProfileListItem.updated_at:type_name -> google.protobuf.Timestamp
14, // 7: api.DeviceProfileListItem.region:type_name -> common.Region
15, // 8: api.DeviceProfileListItem.mac_version:type_name -> common.MacVersion
16, // 9: api.DeviceProfileListItem.reg_params_revision:type_name -> common.RegParamsRevision
1, // 10: api.CreateDeviceProfileRequest.device_profile:type_name -> api.DeviceProfile
1, // 11: api.GetDeviceProfileResponse.device_profile:type_name -> api.DeviceProfile
17, // 12: api.GetDeviceProfileResponse.created_at:type_name -> google.protobuf.Timestamp
17, // 13: api.GetDeviceProfileResponse.updated_at:type_name -> google.protobuf.Timestamp
1, // 14: api.UpdateDeviceProfileRequest.device_profile:type_name -> api.DeviceProfile
2, // 15: api.ListDeviceProfilesResponse.result:type_name -> api.DeviceProfileListItem
12, // 16: api.ListDeviceProfileAdrAlgorithmsResponse.result:type_name -> api.AdrAlgorithmListItem
3, // 17: api.DeviceProfileService.Create:input_type -> api.CreateDeviceProfileRequest
5, // 18: api.DeviceProfileService.Get:input_type -> api.GetDeviceProfileRequest
7, // 19: api.DeviceProfileService.Update:input_type -> api.UpdateDeviceProfileRequest
8, // 20: api.DeviceProfileService.Delete:input_type -> api.DeleteDeviceProfileRequest
9, // 21: api.DeviceProfileService.List:input_type -> api.ListDeviceProfilesRequest
18, // 22: api.DeviceProfileService.ListAdrAlgorithms:input_type -> google.protobuf.Empty
4, // 23: api.DeviceProfileService.Create:output_type -> api.CreateDeviceProfileResponse
6, // 24: api.DeviceProfileService.Get:output_type -> api.GetDeviceProfileResponse
18, // 25: api.DeviceProfileService.Update:output_type -> google.protobuf.Empty
18, // 26: api.DeviceProfileService.Delete:output_type -> google.protobuf.Empty
10, // 27: api.DeviceProfileService.List:output_type -> api.ListDeviceProfilesResponse
11, // 28: api.DeviceProfileService.ListAdrAlgorithms:output_type -> api.ListDeviceProfileAdrAlgorithmsResponse
23, // [23:29] is the sub-list for method output_type
17, // [17:23] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension type_name
17, // [17:17] is the sub-list for extension extendee
0, // [0:17] is the sub-list for field type_name
15, // 4: api.DeviceProfile.tags:type_name -> api.DeviceProfile.TagsEntry
16, // 5: api.DeviceProfile.measurements:type_name -> api.DeviceProfile.MeasurementsEntry
1, // 6: api.Measurement.kind:type_name -> api.MeasurementKind
20, // 7: api.DeviceProfileListItem.created_at:type_name -> google.protobuf.Timestamp
20, // 8: api.DeviceProfileListItem.updated_at:type_name -> google.protobuf.Timestamp
17, // 9: api.DeviceProfileListItem.region:type_name -> common.Region
18, // 10: api.DeviceProfileListItem.mac_version:type_name -> common.MacVersion
19, // 11: api.DeviceProfileListItem.reg_params_revision:type_name -> common.RegParamsRevision
2, // 12: api.CreateDeviceProfileRequest.device_profile:type_name -> api.DeviceProfile
2, // 13: api.GetDeviceProfileResponse.device_profile:type_name -> api.DeviceProfile
20, // 14: api.GetDeviceProfileResponse.created_at:type_name -> google.protobuf.Timestamp
20, // 15: api.GetDeviceProfileResponse.updated_at:type_name -> google.protobuf.Timestamp
2, // 16: api.UpdateDeviceProfileRequest.device_profile:type_name -> api.DeviceProfile
4, // 17: api.ListDeviceProfilesResponse.result:type_name -> api.DeviceProfileListItem
14, // 18: api.ListDeviceProfileAdrAlgorithmsResponse.result:type_name -> api.AdrAlgorithmListItem
3, // 19: api.DeviceProfile.MeasurementsEntry.value:type_name -> api.Measurement
5, // 20: api.DeviceProfileService.Create:input_type -> api.CreateDeviceProfileRequest
7, // 21: api.DeviceProfileService.Get:input_type -> api.GetDeviceProfileRequest
9, // 22: api.DeviceProfileService.Update:input_type -> api.UpdateDeviceProfileRequest
10, // 23: api.DeviceProfileService.Delete:input_type -> api.DeleteDeviceProfileRequest
11, // 24: api.DeviceProfileService.List:input_type -> api.ListDeviceProfilesRequest
21, // 25: api.DeviceProfileService.ListAdrAlgorithms:input_type -> google.protobuf.Empty
6, // 26: api.DeviceProfileService.Create:output_type -> api.CreateDeviceProfileResponse
8, // 27: api.DeviceProfileService.Get:output_type -> api.GetDeviceProfileResponse
21, // 28: api.DeviceProfileService.Update:output_type -> google.protobuf.Empty
21, // 29: api.DeviceProfileService.Delete:output_type -> google.protobuf.Empty
12, // 30: api.DeviceProfileService.List:output_type -> api.ListDeviceProfilesResponse
13, // 31: api.DeviceProfileService.ListAdrAlgorithms:output_type -> api.ListDeviceProfileAdrAlgorithmsResponse
26, // [26:32] is the sub-list for method output_type
20, // [20:26] is the sub-list for method input_type
20, // [20:20] is the sub-list for extension type_name
20, // [20:20] is the sub-list for extension extendee
0, // [0:20] is the sub-list for field type_name
}
func init() { file_api_device_profile_proto_init() }
@ -1344,7 +1497,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeviceProfileListItem); i {
switch v := v.(*Measurement); i {
case 0:
return &v.state
case 1:
@ -1356,7 +1509,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDeviceProfileRequest); i {
switch v := v.(*DeviceProfileListItem); i {
case 0:
return &v.state
case 1:
@ -1368,7 +1521,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateDeviceProfileResponse); i {
switch v := v.(*CreateDeviceProfileRequest); i {
case 0:
return &v.state
case 1:
@ -1380,7 +1533,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetDeviceProfileRequest); i {
switch v := v.(*CreateDeviceProfileResponse); i {
case 0:
return &v.state
case 1:
@ -1392,7 +1545,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetDeviceProfileResponse); i {
switch v := v.(*GetDeviceProfileRequest); i {
case 0:
return &v.state
case 1:
@ -1404,7 +1557,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateDeviceProfileRequest); i {
switch v := v.(*GetDeviceProfileResponse); i {
case 0:
return &v.state
case 1:
@ -1416,7 +1569,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteDeviceProfileRequest); i {
switch v := v.(*UpdateDeviceProfileRequest); i {
case 0:
return &v.state
case 1:
@ -1428,7 +1581,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceProfilesRequest); i {
switch v := v.(*DeleteDeviceProfileRequest); i {
case 0:
return &v.state
case 1:
@ -1440,7 +1593,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceProfilesResponse); i {
switch v := v.(*ListDeviceProfilesRequest); i {
case 0:
return &v.state
case 1:
@ -1452,7 +1605,7 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceProfileAdrAlgorithmsResponse); i {
switch v := v.(*ListDeviceProfilesResponse); i {
case 0:
return &v.state
case 1:
@ -1464,6 +1617,18 @@ func file_api_device_profile_proto_init() {
}
}
file_api_device_profile_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListDeviceProfileAdrAlgorithmsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_device_profile_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AdrAlgorithmListItem); i {
case 0:
return &v.state
@ -1481,8 +1646,8 @@ func file_api_device_profile_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_device_profile_proto_rawDesc,
NumEnums: 1,
NumMessages: 13,
NumEnums: 2,
NumMessages: 15,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -89,6 +89,9 @@ type DeviceProfileTemplate struct {
AbpRx2Freq uint32 `protobuf:"varint,26,opt,name=abp_rx2_freq,json=abpRx2Freq,proto3" json:"abp_rx2_freq,omitempty"`
// User defined tags.
Tags map[string]string `protobuf:"bytes,27,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
Measurements map[string]*Measurement `protobuf:"bytes,28,rep,name=measurements,proto3" json:"measurements,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *DeviceProfileTemplate) Reset() {
@ -312,6 +315,13 @@ func (x *DeviceProfileTemplate) GetTags() map[string]string {
return nil
}
func (x *DeviceProfileTemplate) GetMeasurements() map[string]*Measurement {
if x != nil {
return x.Measurements
}
return nil
}
type DeviceProfileTemplateListItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -843,7 +853,7 @@ var file_api_device_profile_template_proto_rawDesc = []byte{
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x61, 0x70, 0x69,
0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe0, 0x09, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x0b, 0x0a, 0x15, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
@ -917,62 +927,24 @@ var file_api_device_profile_template_proto_rawDesc = []byte{
0x32, 0x46, 0x72, 0x65, 0x71, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x1b, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x2e,
0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x1a,
0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8e, 0x04, 0x0a, 0x1d, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72,
0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08,
0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d,
0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x61, 0x63, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65, 0x67, 0x5f, 0x70, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72,
0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x6f, 0x74, 0x61,
0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52,
0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x12,
0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73,
0x73, 0x5f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f,
0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x22, 0x78, 0x0a, 0x22, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x52, 0x0a, 0x17, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x22, 0x31, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xec, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12,
0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12,
0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18,
0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0c, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74,
0x73, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x51, 0x0a, 0x11, 0x4d, 0x65,
0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65,
0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8e, 0x04,
0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
@ -980,65 +952,114 @@ var file_api_device_profile_template_proto_rawDesc = []byte{
0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61,
0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x78, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22,
0x34, 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69,
0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x22, 0x4c, 0x69, 0x73,
0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x12, 0x3a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74,
0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xb6, 0x03, 0x0a,
0x1c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a,
0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x03, 0x47, 0x65,
0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63,
0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a,
0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x59, 0x0a, 0x04, 0x4c, 0x69,
0x73, 0x74, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76,
0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x61, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72,
0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x1a, 0x44, 0x65, 0x76, 0x69,
0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e,
0x64, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f,
0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x12, 0x26, 0x0a,
0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72,
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x0b, 0x6d, 0x61, 0x63, 0x5f, 0x76, 0x65, 0x72,
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a,
0x6d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x65,
0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
0x73, 0x5f, 0x6f, 0x74, 0x61, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x75,
0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x4f, 0x74, 0x61, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75,
0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x62, 0x18, 0x0b,
0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c,
0x61, 0x73, 0x73, 0x42, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73,
0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e,
0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x22, 0x78,
0x0a, 0x22, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x52, 0x15, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x31, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x44,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xec, 0x01, 0x0a, 0x20,
0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x52, 0x0a, 0x17, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12,
0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x78, 0x0a, 0x22, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x52, 0x0a, 0x17, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x22, 0x34, 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65,
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x21, 0x4c, 0x69,
0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x81, 0x01,
0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x32, 0xb6, 0x03, 0x0a, 0x1c, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
0x54, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d,
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
0x59, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x61, 0x0a, 0x11, 0x69, 0x6f,
0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42,
0x1a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1053,7 +1074,7 @@ func file_api_device_profile_template_proto_rawDescGZIP() []byte {
return file_api_device_profile_template_proto_rawDescData
}
var file_api_device_profile_template_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_api_device_profile_template_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_api_device_profile_template_proto_goTypes = []interface{}{
(*DeviceProfileTemplate)(nil), // 0: api.DeviceProfileTemplate
(*DeviceProfileTemplateListItem)(nil), // 1: api.DeviceProfileTemplateListItem
@ -1065,45 +1086,49 @@ var file_api_device_profile_template_proto_goTypes = []interface{}{
(*ListDeviceProfileTemplatesRequest)(nil), // 7: api.ListDeviceProfileTemplatesRequest
(*ListDeviceProfileTemplatesResponse)(nil), // 8: api.ListDeviceProfileTemplatesResponse
nil, // 9: api.DeviceProfileTemplate.TagsEntry
(common.Region)(0), // 10: common.Region
(common.MacVersion)(0), // 11: common.MacVersion
(common.RegParamsRevision)(0), // 12: common.RegParamsRevision
(CodecRuntime)(0), // 13: api.CodecRuntime
(*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 15: google.protobuf.Empty
nil, // 10: api.DeviceProfileTemplate.MeasurementsEntry
(common.Region)(0), // 11: common.Region
(common.MacVersion)(0), // 12: common.MacVersion
(common.RegParamsRevision)(0), // 13: common.RegParamsRevision
(CodecRuntime)(0), // 14: api.CodecRuntime
(*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
(*Measurement)(nil), // 16: api.Measurement
(*emptypb.Empty)(nil), // 17: google.protobuf.Empty
}
var file_api_device_profile_template_proto_depIdxs = []int32{
10, // 0: api.DeviceProfileTemplate.region:type_name -> common.Region
11, // 1: api.DeviceProfileTemplate.mac_version:type_name -> common.MacVersion
12, // 2: api.DeviceProfileTemplate.reg_params_revision:type_name -> common.RegParamsRevision
13, // 3: api.DeviceProfileTemplate.payload_codec_runtime:type_name -> api.CodecRuntime
11, // 0: api.DeviceProfileTemplate.region:type_name -> common.Region
12, // 1: api.DeviceProfileTemplate.mac_version:type_name -> common.MacVersion
13, // 2: api.DeviceProfileTemplate.reg_params_revision:type_name -> common.RegParamsRevision
14, // 3: api.DeviceProfileTemplate.payload_codec_runtime:type_name -> api.CodecRuntime
9, // 4: api.DeviceProfileTemplate.tags:type_name -> api.DeviceProfileTemplate.TagsEntry
14, // 5: api.DeviceProfileTemplateListItem.created_at:type_name -> google.protobuf.Timestamp
14, // 6: api.DeviceProfileTemplateListItem.updated_at:type_name -> google.protobuf.Timestamp
10, // 7: api.DeviceProfileTemplateListItem.region:type_name -> common.Region
11, // 8: api.DeviceProfileTemplateListItem.mac_version:type_name -> common.MacVersion
12, // 9: api.DeviceProfileTemplateListItem.reg_params_revision:type_name -> common.RegParamsRevision
0, // 10: api.CreateDeviceProfileTemplateRequest.device_profile_template:type_name -> api.DeviceProfileTemplate
0, // 11: api.GetDeviceProfileTemplateResponse.device_profile_template:type_name -> api.DeviceProfileTemplate
14, // 12: api.GetDeviceProfileTemplateResponse.created_at:type_name -> google.protobuf.Timestamp
14, // 13: api.GetDeviceProfileTemplateResponse.updated_at:type_name -> google.protobuf.Timestamp
0, // 14: api.UpdateDeviceProfileTemplateRequest.device_profile_template:type_name -> api.DeviceProfileTemplate
1, // 15: api.ListDeviceProfileTemplatesResponse.result:type_name -> api.DeviceProfileTemplateListItem
2, // 16: api.DeviceProfileTemplateService.Create:input_type -> api.CreateDeviceProfileTemplateRequest
3, // 17: api.DeviceProfileTemplateService.Get:input_type -> api.GetDeviceProfileTemplateRequest
5, // 18: api.DeviceProfileTemplateService.Update:input_type -> api.UpdateDeviceProfileTemplateRequest
6, // 19: api.DeviceProfileTemplateService.Delete:input_type -> api.DeleteDeviceProfileTemplateRequest
7, // 20: api.DeviceProfileTemplateService.List:input_type -> api.ListDeviceProfileTemplatesRequest
15, // 21: api.DeviceProfileTemplateService.Create:output_type -> google.protobuf.Empty
4, // 22: api.DeviceProfileTemplateService.Get:output_type -> api.GetDeviceProfileTemplateResponse
15, // 23: api.DeviceProfileTemplateService.Update:output_type -> google.protobuf.Empty
15, // 24: api.DeviceProfileTemplateService.Delete:output_type -> google.protobuf.Empty
8, // 25: api.DeviceProfileTemplateService.List:output_type -> api.ListDeviceProfileTemplatesResponse
21, // [21:26] is the sub-list for method output_type
16, // [16:21] is the sub-list for method input_type
16, // [16:16] is the sub-list for extension type_name
16, // [16:16] is the sub-list for extension extendee
0, // [0:16] is the sub-list for field type_name
10, // 5: api.DeviceProfileTemplate.measurements:type_name -> api.DeviceProfileTemplate.MeasurementsEntry
15, // 6: api.DeviceProfileTemplateListItem.created_at:type_name -> google.protobuf.Timestamp
15, // 7: api.DeviceProfileTemplateListItem.updated_at:type_name -> google.protobuf.Timestamp
11, // 8: api.DeviceProfileTemplateListItem.region:type_name -> common.Region
12, // 9: api.DeviceProfileTemplateListItem.mac_version:type_name -> common.MacVersion
13, // 10: api.DeviceProfileTemplateListItem.reg_params_revision:type_name -> common.RegParamsRevision
0, // 11: api.CreateDeviceProfileTemplateRequest.device_profile_template:type_name -> api.DeviceProfileTemplate
0, // 12: api.GetDeviceProfileTemplateResponse.device_profile_template:type_name -> api.DeviceProfileTemplate
15, // 13: api.GetDeviceProfileTemplateResponse.created_at:type_name -> google.protobuf.Timestamp
15, // 14: api.GetDeviceProfileTemplateResponse.updated_at:type_name -> google.protobuf.Timestamp
0, // 15: api.UpdateDeviceProfileTemplateRequest.device_profile_template:type_name -> api.DeviceProfileTemplate
1, // 16: api.ListDeviceProfileTemplatesResponse.result:type_name -> api.DeviceProfileTemplateListItem
16, // 17: api.DeviceProfileTemplate.MeasurementsEntry.value:type_name -> api.Measurement
2, // 18: api.DeviceProfileTemplateService.Create:input_type -> api.CreateDeviceProfileTemplateRequest
3, // 19: api.DeviceProfileTemplateService.Get:input_type -> api.GetDeviceProfileTemplateRequest
5, // 20: api.DeviceProfileTemplateService.Update:input_type -> api.UpdateDeviceProfileTemplateRequest
6, // 21: api.DeviceProfileTemplateService.Delete:input_type -> api.DeleteDeviceProfileTemplateRequest
7, // 22: api.DeviceProfileTemplateService.List:input_type -> api.ListDeviceProfileTemplatesRequest
17, // 23: api.DeviceProfileTemplateService.Create:output_type -> google.protobuf.Empty
4, // 24: api.DeviceProfileTemplateService.Get:output_type -> api.GetDeviceProfileTemplateResponse
17, // 25: api.DeviceProfileTemplateService.Update:output_type -> google.protobuf.Empty
17, // 26: api.DeviceProfileTemplateService.Delete:output_type -> google.protobuf.Empty
8, // 27: api.DeviceProfileTemplateService.List:output_type -> api.ListDeviceProfileTemplatesResponse
23, // [23:28] is the sub-list for method output_type
18, // [18:23] is the sub-list for method input_type
18, // [18:18] is the sub-list for extension type_name
18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
}
func init() { file_api_device_profile_template_proto_init() }
@ -1228,7 +1253,7 @@ func file_api_device_profile_template_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_device_profile_template_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -768,7 +768,7 @@ func (x *GenerateGatewayClientCertificateResponse) GetExpiresAt() *timestamppb.T
return nil
}
type GetGatewayStatsRequest struct {
type GetGatewayMetricsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -779,10 +779,12 @@ type GetGatewayStatsRequest struct {
Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
// Interval end timestamp.
End *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
// Aggregation.
Aggregation common.Aggregation `protobuf:"varint,4,opt,name=aggregation,proto3,enum=common.Aggregation" json:"aggregation,omitempty"`
}
func (x *GetGatewayStatsRequest) Reset() {
*x = GetGatewayStatsRequest{}
func (x *GetGatewayMetricsRequest) Reset() {
*x = GetGatewayMetricsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_gateway_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -790,13 +792,13 @@ func (x *GetGatewayStatsRequest) Reset() {
}
}
func (x *GetGatewayStatsRequest) String() string {
func (x *GetGatewayMetricsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGatewayStatsRequest) ProtoMessage() {}
func (*GetGatewayMetricsRequest) ProtoMessage() {}
func (x *GetGatewayStatsRequest) ProtoReflect() protoreflect.Message {
func (x *GetGatewayMetricsRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_gateway_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -808,42 +810,62 @@ func (x *GetGatewayStatsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetGatewayStatsRequest.ProtoReflect.Descriptor instead.
func (*GetGatewayStatsRequest) Descriptor() ([]byte, []int) {
// Deprecated: Use GetGatewayMetricsRequest.ProtoReflect.Descriptor instead.
func (*GetGatewayMetricsRequest) Descriptor() ([]byte, []int) {
return file_api_gateway_proto_rawDescGZIP(), []int{11}
}
func (x *GetGatewayStatsRequest) GetGatewayId() string {
func (x *GetGatewayMetricsRequest) GetGatewayId() string {
if x != nil {
return x.GatewayId
}
return ""
}
func (x *GetGatewayStatsRequest) GetStart() *timestamppb.Timestamp {
func (x *GetGatewayMetricsRequest) GetStart() *timestamppb.Timestamp {
if x != nil {
return x.Start
}
return nil
}
func (x *GetGatewayStatsRequest) GetEnd() *timestamppb.Timestamp {
func (x *GetGatewayMetricsRequest) GetEnd() *timestamppb.Timestamp {
if x != nil {
return x.End
}
return nil
}
type GetGatewayStatsResponse struct {
func (x *GetGatewayMetricsRequest) GetAggregation() common.Aggregation {
if x != nil {
return x.Aggregation
}
return common.Aggregation(0)
}
type GetGatewayMetricsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Result []*GatewayStats `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
// RX packets.
RxPackets *common.Metric `protobuf:"bytes,1,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
// TX packets.
TxPackets *common.Metric `protobuf:"bytes,2,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
// TX packets / frequency.
TxPacketsPerFreq *common.Metric `protobuf:"bytes,3,opt,name=tx_packets_per_freq,json=txPacketsPerFreq,proto3" json:"tx_packets_per_freq,omitempty"`
// RX packets / frequency.
RxPacketsPerFreq *common.Metric `protobuf:"bytes,4,opt,name=rx_packets_per_freq,json=rxPacketsPerFreq,proto3" json:"rx_packets_per_freq,omitempty"`
// TX packets / DR.
TxPacketsPerDr *common.Metric `protobuf:"bytes,5,opt,name=tx_packets_per_dr,json=txPacketsPerDr,proto3" json:"tx_packets_per_dr,omitempty"`
// RX packets / DR.
RxPacketsPerDr *common.Metric `protobuf:"bytes,6,opt,name=rx_packets_per_dr,json=rxPacketsPerDr,proto3" json:"rx_packets_per_dr,omitempty"`
// TX packets per status.
TxPacketsPerStatus *common.Metric `protobuf:"bytes,7,opt,name=tx_packets_per_status,json=txPacketsPerStatus,proto3" json:"tx_packets_per_status,omitempty"`
}
func (x *GetGatewayStatsResponse) Reset() {
*x = GetGatewayStatsResponse{}
func (x *GetGatewayMetricsResponse) Reset() {
*x = GetGatewayMetricsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_gateway_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -851,13 +873,13 @@ func (x *GetGatewayStatsResponse) Reset() {
}
}
func (x *GetGatewayStatsResponse) String() string {
func (x *GetGatewayMetricsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGatewayStatsResponse) ProtoMessage() {}
func (*GetGatewayMetricsResponse) ProtoMessage() {}
func (x *GetGatewayStatsResponse) ProtoReflect() protoreflect.Message {
func (x *GetGatewayMetricsResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_gateway_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -869,123 +891,54 @@ func (x *GetGatewayStatsResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use GetGatewayStatsResponse.ProtoReflect.Descriptor instead.
func (*GetGatewayStatsResponse) Descriptor() ([]byte, []int) {
// Deprecated: Use GetGatewayMetricsResponse.ProtoReflect.Descriptor instead.
func (*GetGatewayMetricsResponse) Descriptor() ([]byte, []int) {
return file_api_gateway_proto_rawDescGZIP(), []int{12}
}
func (x *GetGatewayStatsResponse) GetResult() []*GatewayStats {
if x != nil {
return x.Result
}
return nil
}
type GatewayStats struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Timestamp of the (aggregated) measurement.
Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
// Packets received.
RxPackets uint32 `protobuf:"varint,2,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
// Packets emitted.
TxPackets uint32 `protobuf:"varint,3,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
// Tx packets per frequency.
TxPacketsPerFrequency map[uint32]uint32 `protobuf:"bytes,4,rep,name=tx_packets_per_frequency,json=txPacketsPerFrequency,proto3" json:"tx_packets_per_frequency,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Rx packets per frequency.
RxPacketsPerFrequency map[uint32]uint32 `protobuf:"bytes,5,rep,name=rx_packets_per_frequency,json=rxPacketsPerFrequency,proto3" json:"rx_packets_per_frequency,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Tx packets per DR.
TxPacketsPerDr map[uint32]uint32 `protobuf:"bytes,6,rep,name=tx_packets_per_dr,json=txPacketsPerDr,proto3" json:"tx_packets_per_dr,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Rx packets per DR.
RxPacketsPerDr map[uint32]uint32 `protobuf:"bytes,7,rep,name=rx_packets_per_dr,json=rxPacketsPerDr,proto3" json:"rx_packets_per_dr,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// Tx packets per status.
TxPacketsPerStatus map[string]uint32 `protobuf:"bytes,8,rep,name=tx_packets_per_status,json=txPacketsPerStatus,proto3" json:"tx_packets_per_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *GatewayStats) Reset() {
*x = GatewayStats{}
if protoimpl.UnsafeEnabled {
mi := &file_api_gateway_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GatewayStats) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GatewayStats) ProtoMessage() {}
func (x *GatewayStats) ProtoReflect() protoreflect.Message {
mi := &file_api_gateway_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GatewayStats.ProtoReflect.Descriptor instead.
func (*GatewayStats) Descriptor() ([]byte, []int) {
return file_api_gateway_proto_rawDescGZIP(), []int{13}
}
func (x *GatewayStats) GetTime() *timestamppb.Timestamp {
if x != nil {
return x.Time
}
return nil
}
func (x *GatewayStats) GetRxPackets() uint32 {
func (x *GetGatewayMetricsResponse) GetRxPackets() *common.Metric {
if x != nil {
return x.RxPackets
}
return 0
return nil
}
func (x *GatewayStats) GetTxPackets() uint32 {
func (x *GetGatewayMetricsResponse) GetTxPackets() *common.Metric {
if x != nil {
return x.TxPackets
}
return 0
return nil
}
func (x *GatewayStats) GetTxPacketsPerFrequency() map[uint32]uint32 {
func (x *GetGatewayMetricsResponse) GetTxPacketsPerFreq() *common.Metric {
if x != nil {
return x.TxPacketsPerFrequency
return x.TxPacketsPerFreq
}
return nil
}
func (x *GatewayStats) GetRxPacketsPerFrequency() map[uint32]uint32 {
func (x *GetGatewayMetricsResponse) GetRxPacketsPerFreq() *common.Metric {
if x != nil {
return x.RxPacketsPerFrequency
return x.RxPacketsPerFreq
}
return nil
}
func (x *GatewayStats) GetTxPacketsPerDr() map[uint32]uint32 {
func (x *GetGatewayMetricsResponse) GetTxPacketsPerDr() *common.Metric {
if x != nil {
return x.TxPacketsPerDr
}
return nil
}
func (x *GatewayStats) GetRxPacketsPerDr() map[uint32]uint32 {
func (x *GetGatewayMetricsResponse) GetRxPacketsPerDr() *common.Metric {
if x != nil {
return x.RxPacketsPerDr
}
return nil
}
func (x *GatewayStats) GetTxPacketsPerStatus() map[string]uint32 {
func (x *GetGatewayMetricsResponse) GetTxPacketsPerStatus() *common.Metric {
if x != nil {
return x.TxPacketsPerStatus
}
@ -1117,118 +1070,86 @@ var file_api_gateway_proto_rawDesc = []byte{
0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72,
0x65, 0x73, 0x41, 0x74, 0x22, 0x97, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, 0x30,
0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x44,
0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x22, 0xad, 0x07, 0x0a, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x78, 0x50, 0x61, 0x63,
0x6b, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x12, 0x65, 0x0a, 0x18, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x54, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x15, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65,
0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x65, 0x0a, 0x18, 0x72, 0x78,
0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x65,
0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e,
0x52, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72, 0x65, 0x71,
0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x72, 0x78, 0x50, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
0x79, 0x12, 0x50, 0x0a, 0x11, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f,
0x70, 0x65, 0x72, 0x5f, 0x64, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e,
0x54, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65,
0x72, 0x44, 0x72, 0x12, 0x50, 0x0a, 0x11, 0x72, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64, 0x72, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74,
0x73, 0x2e, 0x52, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x72, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73,
0x50, 0x65, 0x72, 0x44, 0x72, 0x12, 0x5c, 0x0a, 0x15, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x54, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x12, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x1a, 0x48, 0x0a, 0x1a, 0x54, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73,
0x50, 0x65, 0x72, 0x46, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x48, 0x0a,
0x1a, 0x52, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72, 0x65,
0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x54, 0x78, 0x50, 0x61, 0x63,
0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x78,
0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a,
0x17, 0x54, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x61,
0x74, 0x75, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x32, 0x8b, 0x04, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61,
0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
0x12, 0x3d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12,
0x3d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d,
0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a,
0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6c,
0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x08, 0x47, 0x65, 0x74,
0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x00, 0x42, 0x53, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74,
0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2e, 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, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x73, 0x41, 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64,
0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61,
0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64,
0x12, 0x35, 0x0a, 0x0b, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41,
0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x67, 0x67, 0x72,
0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb0, 0x03, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x72, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x09, 0x72, 0x78, 0x50, 0x61, 0x63,
0x6b, 0x65, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x09, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x13, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
0x52, 0x10, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72,
0x65, 0x71, 0x12, 0x3d, 0x0a, 0x13, 0x72, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73,
0x5f, 0x70, 0x65, 0x72, 0x5f, 0x66, 0x72, 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52,
0x10, 0x72, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x72, 0x65,
0x71, 0x12, 0x39, 0x0a, 0x11, 0x74, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f,
0x70, 0x65, 0x72, 0x5f, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0e, 0x74, 0x78,
0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72, 0x12, 0x39, 0x0a, 0x11,
0x72, 0x78, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x64,
0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x0e, 0x72, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x73, 0x50, 0x65, 0x72, 0x44, 0x72, 0x12, 0x41, 0x0a, 0x15, 0x74, 0x78, 0x5f, 0x70, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x12, 0x74, 0x78, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
0x73, 0x50, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0x91, 0x04, 0x0a, 0x0e, 0x47,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a,
0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x03,
0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74,
0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74,
0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x74, 0x65,
0x77, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x7a, 0x0a, 0x19, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47,
0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74,
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x47, 0x61, 0x74,
0x65, 0x77, 0x61, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x1d, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x65,
0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x53,
0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e,
0x61, 0x70, 0x69, 0x42, 0x0c, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x2e, 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,
0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1243,7 +1164,7 @@ func file_api_gateway_proto_rawDescGZIP() []byte {
return file_api_gateway_proto_rawDescData
}
var file_api_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
var file_api_gateway_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_api_gateway_proto_goTypes = []interface{}{
(*Gateway)(nil), // 0: api.Gateway
(*GatewayListItem)(nil), // 1: api.GatewayListItem
@ -1256,66 +1177,63 @@ var file_api_gateway_proto_goTypes = []interface{}{
(*ListGatewaysResponse)(nil), // 8: api.ListGatewaysResponse
(*GenerateGatewayClientCertificateRequest)(nil), // 9: api.GenerateGatewayClientCertificateRequest
(*GenerateGatewayClientCertificateResponse)(nil), // 10: api.GenerateGatewayClientCertificateResponse
(*GetGatewayStatsRequest)(nil), // 11: api.GetGatewayStatsRequest
(*GetGatewayStatsResponse)(nil), // 12: api.GetGatewayStatsResponse
(*GatewayStats)(nil), // 13: api.GatewayStats
nil, // 14: api.Gateway.TagsEntry
nil, // 15: api.Gateway.PropertiesEntry
nil, // 16: api.GatewayListItem.PropertiesEntry
nil, // 17: api.GatewayStats.TxPacketsPerFrequencyEntry
nil, // 18: api.GatewayStats.RxPacketsPerFrequencyEntry
nil, // 19: api.GatewayStats.TxPacketsPerDrEntry
nil, // 20: api.GatewayStats.RxPacketsPerDrEntry
nil, // 21: api.GatewayStats.TxPacketsPerStatusEntry
(*common.Location)(nil), // 22: common.Location
(*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp
(*emptypb.Empty)(nil), // 24: google.protobuf.Empty
(*GetGatewayMetricsRequest)(nil), // 11: api.GetGatewayMetricsRequest
(*GetGatewayMetricsResponse)(nil), // 12: api.GetGatewayMetricsResponse
nil, // 13: api.Gateway.TagsEntry
nil, // 14: api.Gateway.PropertiesEntry
nil, // 15: api.GatewayListItem.PropertiesEntry
(*common.Location)(nil), // 16: common.Location
(*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp
(common.Aggregation)(0), // 18: common.Aggregation
(*common.Metric)(nil), // 19: common.Metric
(*emptypb.Empty)(nil), // 20: google.protobuf.Empty
}
var file_api_gateway_proto_depIdxs = []int32{
22, // 0: api.Gateway.location:type_name -> common.Location
14, // 1: api.Gateway.tags:type_name -> api.Gateway.TagsEntry
15, // 2: api.Gateway.properties:type_name -> api.Gateway.PropertiesEntry
22, // 3: api.GatewayListItem.location:type_name -> common.Location
16, // 4: api.GatewayListItem.properties:type_name -> api.GatewayListItem.PropertiesEntry
23, // 5: api.GatewayListItem.created_at:type_name -> google.protobuf.Timestamp
23, // 6: api.GatewayListItem.updated_at:type_name -> google.protobuf.Timestamp
23, // 7: api.GatewayListItem.last_seen_at:type_name -> google.protobuf.Timestamp
16, // 0: api.Gateway.location:type_name -> common.Location
13, // 1: api.Gateway.tags:type_name -> api.Gateway.TagsEntry
14, // 2: api.Gateway.properties:type_name -> api.Gateway.PropertiesEntry
16, // 3: api.GatewayListItem.location:type_name -> common.Location
15, // 4: api.GatewayListItem.properties:type_name -> api.GatewayListItem.PropertiesEntry
17, // 5: api.GatewayListItem.created_at:type_name -> google.protobuf.Timestamp
17, // 6: api.GatewayListItem.updated_at:type_name -> google.protobuf.Timestamp
17, // 7: api.GatewayListItem.last_seen_at:type_name -> google.protobuf.Timestamp
0, // 8: api.CreateGatewayRequest.gateway:type_name -> api.Gateway
0, // 9: api.GetGatewayResponse.gateway:type_name -> api.Gateway
23, // 10: api.GetGatewayResponse.created_at:type_name -> google.protobuf.Timestamp
23, // 11: api.GetGatewayResponse.updated_at:type_name -> google.protobuf.Timestamp
23, // 12: api.GetGatewayResponse.last_seen_at:type_name -> google.protobuf.Timestamp
17, // 10: api.GetGatewayResponse.created_at:type_name -> google.protobuf.Timestamp
17, // 11: api.GetGatewayResponse.updated_at:type_name -> google.protobuf.Timestamp
17, // 12: api.GetGatewayResponse.last_seen_at:type_name -> google.protobuf.Timestamp
0, // 13: api.UpdateGatewayRequest.gateway:type_name -> api.Gateway
1, // 14: api.ListGatewaysResponse.result:type_name -> api.GatewayListItem
23, // 15: api.GenerateGatewayClientCertificateResponse.expires_at:type_name -> google.protobuf.Timestamp
23, // 16: api.GetGatewayStatsRequest.start:type_name -> google.protobuf.Timestamp
23, // 17: api.GetGatewayStatsRequest.end:type_name -> google.protobuf.Timestamp
13, // 18: api.GetGatewayStatsResponse.result:type_name -> api.GatewayStats
23, // 19: api.GatewayStats.time:type_name -> google.protobuf.Timestamp
17, // 20: api.GatewayStats.tx_packets_per_frequency:type_name -> api.GatewayStats.TxPacketsPerFrequencyEntry
18, // 21: api.GatewayStats.rx_packets_per_frequency:type_name -> api.GatewayStats.RxPacketsPerFrequencyEntry
19, // 22: api.GatewayStats.tx_packets_per_dr:type_name -> api.GatewayStats.TxPacketsPerDrEntry
20, // 23: api.GatewayStats.rx_packets_per_dr:type_name -> api.GatewayStats.RxPacketsPerDrEntry
21, // 24: api.GatewayStats.tx_packets_per_status:type_name -> api.GatewayStats.TxPacketsPerStatusEntry
2, // 25: api.GatewayService.Create:input_type -> api.CreateGatewayRequest
3, // 26: api.GatewayService.Get:input_type -> api.GetGatewayRequest
5, // 27: api.GatewayService.Update:input_type -> api.UpdateGatewayRequest
6, // 28: api.GatewayService.Delete:input_type -> api.DeleteGatewayRequest
7, // 29: api.GatewayService.List:input_type -> api.ListGatewaysRequest
9, // 30: api.GatewayService.GenerateClientCertificate:input_type -> api.GenerateGatewayClientCertificateRequest
11, // 31: api.GatewayService.GetStats:input_type -> api.GetGatewayStatsRequest
24, // 32: api.GatewayService.Create:output_type -> google.protobuf.Empty
4, // 33: api.GatewayService.Get:output_type -> api.GetGatewayResponse
24, // 34: api.GatewayService.Update:output_type -> google.protobuf.Empty
24, // 35: api.GatewayService.Delete:output_type -> google.protobuf.Empty
8, // 36: api.GatewayService.List:output_type -> api.ListGatewaysResponse
10, // 37: api.GatewayService.GenerateClientCertificate:output_type -> api.GenerateGatewayClientCertificateResponse
12, // 38: api.GatewayService.GetStats:output_type -> api.GetGatewayStatsResponse
32, // [32:39] is the sub-list for method output_type
25, // [25:32] is the sub-list for method input_type
25, // [25:25] is the sub-list for extension type_name
25, // [25:25] is the sub-list for extension extendee
0, // [0:25] is the sub-list for field type_name
17, // 15: api.GenerateGatewayClientCertificateResponse.expires_at:type_name -> google.protobuf.Timestamp
17, // 16: api.GetGatewayMetricsRequest.start:type_name -> google.protobuf.Timestamp
17, // 17: api.GetGatewayMetricsRequest.end:type_name -> google.protobuf.Timestamp
18, // 18: api.GetGatewayMetricsRequest.aggregation:type_name -> common.Aggregation
19, // 19: api.GetGatewayMetricsResponse.rx_packets:type_name -> common.Metric
19, // 20: api.GetGatewayMetricsResponse.tx_packets:type_name -> common.Metric
19, // 21: api.GetGatewayMetricsResponse.tx_packets_per_freq:type_name -> common.Metric
19, // 22: api.GetGatewayMetricsResponse.rx_packets_per_freq:type_name -> common.Metric
19, // 23: api.GetGatewayMetricsResponse.tx_packets_per_dr:type_name -> common.Metric
19, // 24: api.GetGatewayMetricsResponse.rx_packets_per_dr:type_name -> common.Metric
19, // 25: api.GetGatewayMetricsResponse.tx_packets_per_status:type_name -> common.Metric
2, // 26: api.GatewayService.Create:input_type -> api.CreateGatewayRequest
3, // 27: api.GatewayService.Get:input_type -> api.GetGatewayRequest
5, // 28: api.GatewayService.Update:input_type -> api.UpdateGatewayRequest
6, // 29: api.GatewayService.Delete:input_type -> api.DeleteGatewayRequest
7, // 30: api.GatewayService.List:input_type -> api.ListGatewaysRequest
9, // 31: api.GatewayService.GenerateClientCertificate:input_type -> api.GenerateGatewayClientCertificateRequest
11, // 32: api.GatewayService.GetMetrics:input_type -> api.GetGatewayMetricsRequest
20, // 33: api.GatewayService.Create:output_type -> google.protobuf.Empty
4, // 34: api.GatewayService.Get:output_type -> api.GetGatewayResponse
20, // 35: api.GatewayService.Update:output_type -> google.protobuf.Empty
20, // 36: api.GatewayService.Delete:output_type -> google.protobuf.Empty
8, // 37: api.GatewayService.List:output_type -> api.ListGatewaysResponse
10, // 38: api.GatewayService.GenerateClientCertificate:output_type -> api.GenerateGatewayClientCertificateResponse
12, // 39: api.GatewayService.GetMetrics:output_type -> api.GetGatewayMetricsResponse
33, // [33:40] is the sub-list for method output_type
26, // [26:33] is the sub-list for method input_type
26, // [26:26] is the sub-list for extension type_name
26, // [26:26] is the sub-list for extension extendee
0, // [0:26] is the sub-list for field type_name
}
func init() { file_api_gateway_proto_init() }
@ -1457,7 +1375,7 @@ func file_api_gateway_proto_init() {
}
}
file_api_gateway_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetGatewayStatsRequest); i {
switch v := v.(*GetGatewayMetricsRequest); i {
case 0:
return &v.state
case 1:
@ -1469,19 +1387,7 @@ func file_api_gateway_proto_init() {
}
}
file_api_gateway_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetGatewayStatsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_gateway_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GatewayStats); i {
switch v := v.(*GetGatewayMetricsResponse); i {
case 0:
return &v.state
case 1:
@ -1499,7 +1405,7 @@ func file_api_gateway_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_gateway_proto_rawDesc,
NumEnums: 0,
NumMessages: 22,
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},

View File

@ -35,8 +35,8 @@ type GatewayServiceClient interface {
List(ctx context.Context, in *ListGatewaysRequest, opts ...grpc.CallOption) (*ListGatewaysResponse, error)
// Generate client-certificate for the gateway.
GenerateClientCertificate(ctx context.Context, in *GenerateGatewayClientCertificateRequest, opts ...grpc.CallOption) (*GenerateGatewayClientCertificateResponse, error)
// GetStats returns the gateway stats.
GetStats(ctx context.Context, in *GetGatewayStatsRequest, opts ...grpc.CallOption) (*GetGatewayStatsResponse, error)
// GetMetrics returns the gateway metrics.
GetMetrics(ctx context.Context, in *GetGatewayMetricsRequest, opts ...grpc.CallOption) (*GetGatewayMetricsResponse, error)
}
type gatewayServiceClient struct {
@ -101,9 +101,9 @@ func (c *gatewayServiceClient) GenerateClientCertificate(ctx context.Context, in
return out, nil
}
func (c *gatewayServiceClient) GetStats(ctx context.Context, in *GetGatewayStatsRequest, opts ...grpc.CallOption) (*GetGatewayStatsResponse, error) {
out := new(GetGatewayStatsResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/GetStats", in, out, opts...)
func (c *gatewayServiceClient) GetMetrics(ctx context.Context, in *GetGatewayMetricsRequest, opts ...grpc.CallOption) (*GetGatewayMetricsResponse, error) {
out := new(GetGatewayMetricsResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/GetMetrics", in, out, opts...)
if err != nil {
return nil, err
}
@ -126,8 +126,8 @@ type GatewayServiceServer interface {
List(context.Context, *ListGatewaysRequest) (*ListGatewaysResponse, error)
// Generate client-certificate for the gateway.
GenerateClientCertificate(context.Context, *GenerateGatewayClientCertificateRequest) (*GenerateGatewayClientCertificateResponse, error)
// GetStats returns the gateway stats.
GetStats(context.Context, *GetGatewayStatsRequest) (*GetGatewayStatsResponse, error)
// GetMetrics returns the gateway metrics.
GetMetrics(context.Context, *GetGatewayMetricsRequest) (*GetGatewayMetricsResponse, error)
mustEmbedUnimplementedGatewayServiceServer()
}
@ -153,8 +153,8 @@ func (UnimplementedGatewayServiceServer) List(context.Context, *ListGatewaysRequ
func (UnimplementedGatewayServiceServer) GenerateClientCertificate(context.Context, *GenerateGatewayClientCertificateRequest) (*GenerateGatewayClientCertificateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateClientCertificate not implemented")
}
func (UnimplementedGatewayServiceServer) GetStats(context.Context, *GetGatewayStatsRequest) (*GetGatewayStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
func (UnimplementedGatewayServiceServer) GetMetrics(context.Context, *GetGatewayMetricsRequest) (*GetGatewayMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented")
}
func (UnimplementedGatewayServiceServer) mustEmbedUnimplementedGatewayServiceServer() {}
@ -277,20 +277,20 @@ func _GatewayService_GenerateClientCertificate_Handler(srv interface{}, ctx cont
return interceptor(ctx, in, info, handler)
}
func _GatewayService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGatewayStatsRequest)
func _GatewayService_GetMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGatewayMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).GetStats(ctx, in)
return srv.(GatewayServiceServer).GetMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/GetStats",
FullMethod: "/api.GatewayService/GetMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).GetStats(ctx, req.(*GetGatewayStatsRequest))
return srv.(GatewayServiceServer).GetMetrics(ctx, req.(*GetGatewayMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
@ -327,8 +327,8 @@ var GatewayService_ServiceDesc = grpc.ServiceDesc{
Handler: _GatewayService_GenerateClientCertificate_Handler,
},
{
MethodName: "GetStats",
Handler: _GatewayService_GetStats_Handler,
MethodName: "GetMetrics",
Handler: _GatewayService_GetMetrics_Handler,
},
},
Streams: []grpc.StreamDesc{},

View File

@ -9,6 +9,7 @@ package common
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
@ -424,6 +425,58 @@ func (LocationSource) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{5}
}
type Aggregation int32
const (
// Hour.
Aggregation_HOUR Aggregation = 0
// Day.
Aggregation_DAY Aggregation = 1
// Month.
Aggregation_MONTH Aggregation = 2
)
// Enum value maps for Aggregation.
var (
Aggregation_name = map[int32]string{
0: "HOUR",
1: "DAY",
2: "MONTH",
}
Aggregation_value = map[string]int32{
"HOUR": 0,
"DAY": 1,
"MONTH": 2,
}
)
func (x Aggregation) Enum() *Aggregation {
p := new(Aggregation)
*p = x
return p
}
func (x Aggregation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Aggregation) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[6].Descriptor()
}
func (Aggregation) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[6]
}
func (x Aggregation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Aggregation.Descriptor instead.
func (Aggregation) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{6}
}
type Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -565,81 +618,222 @@ func (x *KeyEnvelope) GetAesKey() []byte {
return nil
}
type Metric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Timestamps.
Timestamps []*timestamppb.Timestamp `protobuf:"bytes,2,rep,name=timestamps,proto3" json:"timestamps,omitempty"`
// Datasets.
Datasets []*MetricDataset `protobuf:"bytes,3,rep,name=datasets,proto3" json:"datasets,omitempty"`
}
func (x *Metric) Reset() {
*x = Metric{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metric) ProtoMessage() {}
func (x *Metric) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Metric.ProtoReflect.Descriptor instead.
func (*Metric) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{2}
}
func (x *Metric) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Metric) GetTimestamps() []*timestamppb.Timestamp {
if x != nil {
return x.Timestamps
}
return nil
}
func (x *Metric) GetDatasets() []*MetricDataset {
if x != nil {
return x.Datasets
}
return nil
}
type MetricDataset struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Label.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// Data.
// Each value index corresponds with the same timestamp index of the Metric.
Data []float32 `protobuf:"fixed32,2,rep,packed,name=data,proto3" json:"data,omitempty"`
}
func (x *MetricDataset) Reset() {
*x = MetricDataset{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricDataset) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricDataset) ProtoMessage() {}
func (x *MetricDataset) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MetricDataset.ProtoReflect.Descriptor instead.
func (*MetricDataset) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{3}
}
func (x *MetricDataset) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
func (x *MetricDataset) GetData() []float32 {
if x != nil {
return x.Data
}
return nil
}
var File_common_common_proto protoreflect.FileDescriptor
var file_common_common_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xac, 0x01,
0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61,
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61,
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74,
0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69,
0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x02, 0x52, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x0b,
0x4b, 0x65, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b,
0x65, 0x6b, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6b, 0x65, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x65, 0x73, 0x5f,
0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x65, 0x73, 0x4b, 0x65,
0x79, 0x2a, 0x2c, 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x52, 0x41, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x53, 0x4b,
0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x52, 0x5f, 0x46, 0x48, 0x53, 0x53, 0x10, 0x02, 0x2a,
0xaa, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x55,
0x38, 0x36, 0x38, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x53, 0x39, 0x31, 0x35, 0x10, 0x02,
0x12, 0x09, 0x0a, 0x05, 0x43, 0x4e, 0x37, 0x37, 0x39, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x55, 0x34, 0x33, 0x33, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x39, 0x31, 0x35, 0x10,
0x05, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4e, 0x34, 0x37, 0x30, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05,
0x41, 0x53, 0x39, 0x32, 0x33, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33,
0x5f, 0x32, 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x33, 0x10,
0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x34, 0x10, 0x0e, 0x12, 0x09,
0x0a, 0x05, 0x4b, 0x52, 0x39, 0x32, 0x30, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x38,
0x36, 0x35, 0x10, 0x09, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x55, 0x38, 0x36, 0x34, 0x10, 0x0a, 0x12,
0x0b, 0x0a, 0x07, 0x49, 0x53, 0x4d, 0x32, 0x34, 0x30, 0x30, 0x10, 0x0b, 0x2a, 0xb3, 0x01, 0x0a,
0x05, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52,
0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x4f, 0x49, 0x4e,
0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x43,
0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x55, 0x50,
0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45,
0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x15, 0x0a,
0x11, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f,
0x55, 0x50, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45,
0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x12, 0x0a,
0x0e, 0x52, 0x45, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10,
0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, 0x54, 0x41, 0x52, 0x59,
0x10, 0x07, 0x2a, 0x7e, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1f, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac,
0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c,
0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c,
0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69,
0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67,
0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64,
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64,
0x65, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x05, 0x20,
0x01, 0x28, 0x02, 0x52, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x22, 0x43, 0x0a,
0x0b, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09,
0x6b, 0x65, 0x6b, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x6b, 0x65, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x65, 0x73,
0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x65, 0x73, 0x4b,
0x65, 0x79, 0x22, 0x8b, 0x01, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x31, 0x0a,
0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44,
0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x73,
0x22, 0x39, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x73, 0x65,
0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x2c, 0x0a, 0x0a, 0x4d,
0x6f, 0x64, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x52,
0x41, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,
0x4c, 0x52, 0x5f, 0x46, 0x48, 0x53, 0x53, 0x10, 0x02, 0x2a, 0xaa, 0x01, 0x0a, 0x06, 0x52, 0x65,
0x67, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x55, 0x38, 0x36, 0x38, 0x10, 0x00, 0x12,
0x09, 0x0a, 0x05, 0x55, 0x53, 0x39, 0x31, 0x35, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4e,
0x37, 0x37, 0x39, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x55, 0x34, 0x33, 0x33, 0x10, 0x04,
0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x39, 0x31, 0x35, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x43,
0x4e, 0x34, 0x37, 0x30, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x39, 0x32, 0x33, 0x10,
0x07, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x32, 0x10, 0x0c, 0x12, 0x0b,
0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x33, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x41,
0x53, 0x39, 0x32, 0x33, 0x5f, 0x34, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x4b, 0x52, 0x39, 0x32,
0x30, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x38, 0x36, 0x35, 0x10, 0x09, 0x12, 0x09,
0x0a, 0x05, 0x52, 0x55, 0x38, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x53, 0x4d,
0x32, 0x34, 0x30, 0x30, 0x10, 0x0b, 0x2a, 0xb3, 0x01, 0x0a, 0x05, 0x4d, 0x54, 0x79, 0x70, 0x65,
0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54,
0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50,
0x54, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d,
0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x55, 0x50, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15,
0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41,
0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x46, 0x49,
0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x55, 0x50, 0x10, 0x04, 0x12, 0x17,
0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41,
0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x4f, 0x49,
0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x50,
0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, 0x54, 0x41, 0x52, 0x59, 0x10, 0x07, 0x2a, 0x7e, 0x0a, 0x0a,
0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f,
0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x30, 0x10, 0x00, 0x12, 0x11, 0x0a,
0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x31, 0x10, 0x01,
0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f,
0x30, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31,
0x5f, 0x30, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41,
0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52,
0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d,
0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x34, 0x10, 0x04, 0x12,
0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x31, 0x5f, 0x30,
0x10, 0x05, 0x2a, 0x65, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05,
0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31,
0x5f, 0x30, 0x5f, 0x30, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f,
0x31, 0x5f, 0x30, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32,
0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30,
0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x33, 0x10, 0x05, 0x2a, 0x8e, 0x01, 0x0a, 0x0e, 0x4c, 0x6f,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x50, 0x53,
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x02, 0x12, 0x15,
0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x54,
0x44, 0x4f, 0x41, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53,
0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x53, 0x53, 0x49, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11,
0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x47, 0x4e, 0x53,
0x53, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c,
0x56, 0x45, 0x52, 0x5f, 0x57, 0x49, 0x46, 0x49, 0x10, 0x06, 0x42, 0x55, 0x0a, 0x11, 0x69, 0x6f,
0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42,
0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31,
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, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x32, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31,
0x5f, 0x30, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41,
0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52,
0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x31, 0x5f, 0x30, 0x10, 0x05, 0x2a, 0x65, 0x0a, 0x11,
0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x01, 0x12,
0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x30, 0x10, 0x02,
0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x31, 0x10,
0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x32,
0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f,
0x33, 0x10, 0x05, 0x2a, 0x8e, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x50, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f,
0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x44, 0x4f, 0x41, 0x10, 0x03, 0x12,
0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f,
0x52, 0x53, 0x53, 0x49, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45,
0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x47, 0x4e, 0x53, 0x53, 0x10, 0x05, 0x12, 0x15, 0x0a,
0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x57, 0x49,
0x46, 0x49, 0x10, 0x06, 0x2a, 0x2b, 0x0a, 0x0b, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52, 0x10, 0x00, 0x12, 0x07, 0x0a,
0x03, 0x44, 0x41, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10,
0x02, 0x42, 0x55, 0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61,
0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 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, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -654,25 +848,31 @@ func file_common_common_proto_rawDescGZIP() []byte {
return file_common_common_proto_rawDescData
}
var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_common_common_proto_goTypes = []interface{}{
(Modulation)(0), // 0: common.Modulation
(Region)(0), // 1: common.Region
(MType)(0), // 2: common.MType
(MacVersion)(0), // 3: common.MacVersion
(RegParamsRevision)(0), // 4: common.RegParamsRevision
(LocationSource)(0), // 5: common.LocationSource
(*Location)(nil), // 6: common.Location
(*KeyEnvelope)(nil), // 7: common.KeyEnvelope
(Modulation)(0), // 0: common.Modulation
(Region)(0), // 1: common.Region
(MType)(0), // 2: common.MType
(MacVersion)(0), // 3: common.MacVersion
(RegParamsRevision)(0), // 4: common.RegParamsRevision
(LocationSource)(0), // 5: common.LocationSource
(Aggregation)(0), // 6: common.Aggregation
(*Location)(nil), // 7: common.Location
(*KeyEnvelope)(nil), // 8: common.KeyEnvelope
(*Metric)(nil), // 9: common.Metric
(*MetricDataset)(nil), // 10: common.MetricDataset
(*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
}
var file_common_common_proto_depIdxs = []int32{
5, // 0: common.Location.source:type_name -> common.LocationSource
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
5, // 0: common.Location.source:type_name -> common.LocationSource
11, // 1: common.Metric.timestamps:type_name -> google.protobuf.Timestamp
10, // 2: common.Metric.datasets:type_name -> common.MetricDataset
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_common_common_proto_init() }
@ -705,14 +905,38 @@ func file_common_common_proto_init() {
return nil
}
}
file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Metric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MetricDataset); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_common_proto_rawDesc,
NumEnums: 6,
NumMessages: 2,
NumEnums: 7,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -107,12 +107,19 @@ export class DeviceServiceClient {
response: api_device_pb.GetRandomDevAddrResponse) => void
): grpcWeb.ClientReadableStream<api_device_pb.GetRandomDevAddrResponse>;
getStats(
request: api_device_pb.GetDeviceStatsRequest,
getMetrics(
request: api_device_pb.GetDeviceMetricsRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: api_device_pb.GetDeviceStatsResponse) => void
): grpcWeb.ClientReadableStream<api_device_pb.GetDeviceStatsResponse>;
response: api_device_pb.GetDeviceMetricsResponse) => void
): grpcWeb.ClientReadableStream<api_device_pb.GetDeviceMetricsResponse>;
getLinkMetrics(
request: api_device_pb.GetDeviceLinkMetricsRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: api_device_pb.GetDeviceLinkMetricsResponse) => void
): grpcWeb.ClientReadableStream<api_device_pb.GetDeviceLinkMetricsResponse>;
enqueue(
request: api_device_pb.EnqueueDeviceQueueItemRequest,
@ -212,10 +219,15 @@ export class DeviceServicePromiseClient {
metadata?: grpcWeb.Metadata
): Promise<api_device_pb.GetRandomDevAddrResponse>;
getStats(
request: api_device_pb.GetDeviceStatsRequest,
getMetrics(
request: api_device_pb.GetDeviceMetricsRequest,
metadata?: grpcWeb.Metadata
): Promise<api_device_pb.GetDeviceStatsResponse>;
): Promise<api_device_pb.GetDeviceMetricsResponse>;
getLinkMetrics(
request: api_device_pb.GetDeviceLinkMetricsRequest,
metadata?: grpcWeb.Metadata
): Promise<api_device_pb.GetDeviceLinkMetricsResponse>;
enqueue(
request: api_device_pb.EnqueueDeviceQueueItemRequest,

View File

@ -16,6 +16,8 @@ const grpc = {};
grpc.web = require('grpc-web');
var common_common_pb = require('../common/common_pb.js')
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js')
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js')
@ -1199,80 +1201,160 @@ proto.api.DeviceServicePromiseClient.prototype.getRandomDevAddr =
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.api.GetDeviceStatsRequest,
* !proto.api.GetDeviceStatsResponse>}
* !proto.api.GetDeviceMetricsRequest,
* !proto.api.GetDeviceMetricsResponse>}
*/
const methodDescriptor_DeviceService_GetStats = new grpc.web.MethodDescriptor(
'/api.DeviceService/GetStats',
const methodDescriptor_DeviceService_GetMetrics = new grpc.web.MethodDescriptor(
'/api.DeviceService/GetMetrics',
grpc.web.MethodType.UNARY,
proto.api.GetDeviceStatsRequest,
proto.api.GetDeviceStatsResponse,
proto.api.GetDeviceMetricsRequest,
proto.api.GetDeviceMetricsResponse,
/**
* @param {!proto.api.GetDeviceStatsRequest} request
* @param {!proto.api.GetDeviceMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetDeviceStatsResponse.deserializeBinary
proto.api.GetDeviceMetricsResponse.deserializeBinary
);
/**
* @const
* @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.api.GetDeviceStatsRequest,
* !proto.api.GetDeviceStatsResponse>}
* !proto.api.GetDeviceMetricsRequest,
* !proto.api.GetDeviceMetricsResponse>}
*/
const methodInfo_DeviceService_GetStats = new grpc.web.AbstractClientBase.MethodInfo(
proto.api.GetDeviceStatsResponse,
const methodInfo_DeviceService_GetMetrics = new grpc.web.AbstractClientBase.MethodInfo(
proto.api.GetDeviceMetricsResponse,
/**
* @param {!proto.api.GetDeviceStatsRequest} request
* @param {!proto.api.GetDeviceMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetDeviceStatsResponse.deserializeBinary
proto.api.GetDeviceMetricsResponse.deserializeBinary
);
/**
* @param {!proto.api.GetDeviceStatsRequest} request The
* @param {!proto.api.GetDeviceMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.Error, ?proto.api.GetDeviceStatsResponse)}
* @param {function(?grpc.web.Error, ?proto.api.GetDeviceMetricsResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.api.GetDeviceStatsResponse>|undefined}
* @return {!grpc.web.ClientReadableStream<!proto.api.GetDeviceMetricsResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.api.DeviceServiceClient.prototype.getStats =
proto.api.DeviceServiceClient.prototype.getMetrics =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/api.DeviceService/GetStats',
'/api.DeviceService/GetMetrics',
request,
metadata || {},
methodDescriptor_DeviceService_GetStats,
methodDescriptor_DeviceService_GetMetrics,
callback);
};
/**
* @param {!proto.api.GetDeviceStatsRequest} request The
* @param {!proto.api.GetDeviceMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.api.GetDeviceStatsResponse>}
* @return {!Promise<!proto.api.GetDeviceMetricsResponse>}
* Promise that resolves to the response
*/
proto.api.DeviceServicePromiseClient.prototype.getStats =
proto.api.DeviceServicePromiseClient.prototype.getMetrics =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/api.DeviceService/GetStats',
'/api.DeviceService/GetMetrics',
request,
metadata || {},
methodDescriptor_DeviceService_GetStats);
methodDescriptor_DeviceService_GetMetrics);
};
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.api.GetDeviceLinkMetricsRequest,
* !proto.api.GetDeviceLinkMetricsResponse>}
*/
const methodDescriptor_DeviceService_GetLinkMetrics = new grpc.web.MethodDescriptor(
'/api.DeviceService/GetLinkMetrics',
grpc.web.MethodType.UNARY,
proto.api.GetDeviceLinkMetricsRequest,
proto.api.GetDeviceLinkMetricsResponse,
/**
* @param {!proto.api.GetDeviceLinkMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetDeviceLinkMetricsResponse.deserializeBinary
);
/**
* @const
* @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.api.GetDeviceLinkMetricsRequest,
* !proto.api.GetDeviceLinkMetricsResponse>}
*/
const methodInfo_DeviceService_GetLinkMetrics = new grpc.web.AbstractClientBase.MethodInfo(
proto.api.GetDeviceLinkMetricsResponse,
/**
* @param {!proto.api.GetDeviceLinkMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetDeviceLinkMetricsResponse.deserializeBinary
);
/**
* @param {!proto.api.GetDeviceLinkMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.Error, ?proto.api.GetDeviceLinkMetricsResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.api.GetDeviceLinkMetricsResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.api.DeviceServiceClient.prototype.getLinkMetrics =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/api.DeviceService/GetLinkMetrics',
request,
metadata || {},
methodDescriptor_DeviceService_GetLinkMetrics,
callback);
};
/**
* @param {!proto.api.GetDeviceLinkMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.api.GetDeviceLinkMetricsResponse>}
* Promise that resolves to the response
*/
proto.api.DeviceServicePromiseClient.prototype.getLinkMetrics =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/api.DeviceService/GetLinkMetrics',
request,
metadata || {},
methodDescriptor_DeviceService_GetLinkMetrics);
};

View File

@ -1,5 +1,6 @@
import * as jspb from 'google-protobuf'
import * as common_common_pb from '../common/common_pb';
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb';
import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb';
@ -613,97 +614,165 @@ export namespace GetRandomDevAddrResponse {
}
}
export class GetDeviceStatsRequest extends jspb.Message {
export class GetDeviceMetricsRequest extends jspb.Message {
getDevEui(): string;
setDevEui(value: string): GetDeviceStatsRequest;
setDevEui(value: string): GetDeviceMetricsRequest;
getStart(): google_protobuf_timestamp_pb.Timestamp | undefined;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceStatsRequest;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceMetricsRequest;
hasStart(): boolean;
clearStart(): GetDeviceStatsRequest;
clearStart(): GetDeviceMetricsRequest;
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceStatsRequest;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceMetricsRequest;
hasEnd(): boolean;
clearEnd(): GetDeviceStatsRequest;
clearEnd(): GetDeviceMetricsRequest;
getAggregation(): common_common_pb.Aggregation;
setAggregation(value: common_common_pb.Aggregation): GetDeviceMetricsRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceStatsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceStatsRequest): GetDeviceStatsRequest.AsObject;
static serializeBinaryToWriter(message: GetDeviceStatsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceStatsRequest;
static deserializeBinaryFromReader(message: GetDeviceStatsRequest, reader: jspb.BinaryReader): GetDeviceStatsRequest;
toObject(includeInstance?: boolean): GetDeviceMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceMetricsRequest): GetDeviceMetricsRequest.AsObject;
static serializeBinaryToWriter(message: GetDeviceMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceMetricsRequest;
static deserializeBinaryFromReader(message: GetDeviceMetricsRequest, reader: jspb.BinaryReader): GetDeviceMetricsRequest;
}
export namespace GetDeviceStatsRequest {
export namespace GetDeviceMetricsRequest {
export type AsObject = {
devEui: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.Aggregation,
}
}
export class GetDeviceStatsResponse extends jspb.Message {
getResultList(): Array<DeviceStats>;
setResultList(value: Array<DeviceStats>): GetDeviceStatsResponse;
clearResultList(): GetDeviceStatsResponse;
addResult(value?: DeviceStats, index?: number): DeviceStats;
export class GetDeviceMetricsResponse extends jspb.Message {
getMetricsMap(): jspb.Map<string, common_common_pb.Metric>;
clearMetricsMap(): GetDeviceMetricsResponse;
getStatesMap(): jspb.Map<string, DeviceState>;
clearStatesMap(): GetDeviceMetricsResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceStatsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceStatsResponse): GetDeviceStatsResponse.AsObject;
static serializeBinaryToWriter(message: GetDeviceStatsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceStatsResponse;
static deserializeBinaryFromReader(message: GetDeviceStatsResponse, reader: jspb.BinaryReader): GetDeviceStatsResponse;
toObject(includeInstance?: boolean): GetDeviceMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceMetricsResponse): GetDeviceMetricsResponse.AsObject;
static serializeBinaryToWriter(message: GetDeviceMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceMetricsResponse;
static deserializeBinaryFromReader(message: GetDeviceMetricsResponse, reader: jspb.BinaryReader): GetDeviceMetricsResponse;
}
export namespace GetDeviceStatsResponse {
export namespace GetDeviceMetricsResponse {
export type AsObject = {
resultList: Array<DeviceStats.AsObject>,
metricsMap: Array<[string, common_common_pb.Metric.AsObject]>,
statesMap: Array<[string, DeviceState.AsObject]>,
}
}
export class DeviceStats extends jspb.Message {
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): DeviceStats;
hasTime(): boolean;
clearTime(): DeviceStats;
export class DeviceState extends jspb.Message {
getName(): string;
setName(value: string): DeviceState;
getRxPackets(): number;
setRxPackets(value: number): DeviceStats;
getGwRssi(): number;
setGwRssi(value: number): DeviceStats;
getGwSnr(): number;
setGwSnr(value: number): DeviceStats;
getRxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearRxPacketsPerFrequencyMap(): DeviceStats;
getRxPacketsPerDrMap(): jspb.Map<number, number>;
clearRxPacketsPerDrMap(): DeviceStats;
getErrorsMap(): jspb.Map<string, number>;
clearErrorsMap(): DeviceStats;
getValue(): string;
setValue(value: string): DeviceState;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceStats.AsObject;
static toObject(includeInstance: boolean, msg: DeviceStats): DeviceStats.AsObject;
static serializeBinaryToWriter(message: DeviceStats, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeviceStats;
static deserializeBinaryFromReader(message: DeviceStats, reader: jspb.BinaryReader): DeviceStats;
toObject(includeInstance?: boolean): DeviceState.AsObject;
static toObject(includeInstance: boolean, msg: DeviceState): DeviceState.AsObject;
static serializeBinaryToWriter(message: DeviceState, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeviceState;
static deserializeBinaryFromReader(message: DeviceState, reader: jspb.BinaryReader): DeviceState;
}
export namespace DeviceStats {
export namespace DeviceState {
export type AsObject = {
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
rxPackets: number,
gwRssi: number,
gwSnr: number,
rxPacketsPerFrequencyMap: Array<[number, number]>,
rxPacketsPerDrMap: Array<[number, number]>,
errorsMap: Array<[string, number]>,
name: string,
value: string,
}
}
export class GetDeviceLinkMetricsRequest extends jspb.Message {
getDevEui(): string;
setDevEui(value: string): GetDeviceLinkMetricsRequest;
getStart(): google_protobuf_timestamp_pb.Timestamp | undefined;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceLinkMetricsRequest;
hasStart(): boolean;
clearStart(): GetDeviceLinkMetricsRequest;
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): GetDeviceLinkMetricsRequest;
hasEnd(): boolean;
clearEnd(): GetDeviceLinkMetricsRequest;
getAggregation(): common_common_pb.Aggregation;
setAggregation(value: common_common_pb.Aggregation): GetDeviceLinkMetricsRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceLinkMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceLinkMetricsRequest): GetDeviceLinkMetricsRequest.AsObject;
static serializeBinaryToWriter(message: GetDeviceLinkMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceLinkMetricsRequest;
static deserializeBinaryFromReader(message: GetDeviceLinkMetricsRequest, reader: jspb.BinaryReader): GetDeviceLinkMetricsRequest;
}
export namespace GetDeviceLinkMetricsRequest {
export type AsObject = {
devEui: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.Aggregation,
}
}
export class GetDeviceLinkMetricsResponse extends jspb.Message {
getRxPackets(): common_common_pb.Metric | undefined;
setRxPackets(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasRxPackets(): boolean;
clearRxPackets(): GetDeviceLinkMetricsResponse;
getGwRssi(): common_common_pb.Metric | undefined;
setGwRssi(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasGwRssi(): boolean;
clearGwRssi(): GetDeviceLinkMetricsResponse;
getGwSnr(): common_common_pb.Metric | undefined;
setGwSnr(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasGwSnr(): boolean;
clearGwSnr(): GetDeviceLinkMetricsResponse;
getRxPacketsPerFreq(): common_common_pb.Metric | undefined;
setRxPacketsPerFreq(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasRxPacketsPerFreq(): boolean;
clearRxPacketsPerFreq(): GetDeviceLinkMetricsResponse;
getRxPacketsPerDr(): common_common_pb.Metric | undefined;
setRxPacketsPerDr(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasRxPacketsPerDr(): boolean;
clearRxPacketsPerDr(): GetDeviceLinkMetricsResponse;
getErrors(): common_common_pb.Metric | undefined;
setErrors(value?: common_common_pb.Metric): GetDeviceLinkMetricsResponse;
hasErrors(): boolean;
clearErrors(): GetDeviceLinkMetricsResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceLinkMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceLinkMetricsResponse): GetDeviceLinkMetricsResponse.AsObject;
static serializeBinaryToWriter(message: GetDeviceLinkMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceLinkMetricsResponse;
static deserializeBinaryFromReader(message: GetDeviceLinkMetricsResponse, reader: jspb.BinaryReader): GetDeviceLinkMetricsResponse;
}
export namespace GetDeviceLinkMetricsResponse {
export type AsObject = {
rxPackets?: common_common_pb.Metric.AsObject,
gwRssi?: common_common_pb.Metric.AsObject,
gwSnr?: common_common_pb.Metric.AsObject,
rxPacketsPerFreq?: common_common_pb.Metric.AsObject,
rxPacketsPerDr?: common_common_pb.Metric.AsObject,
errors?: common_common_pb.Metric.AsObject,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,9 @@ export class DeviceProfile extends jspb.Message {
getTagsMap(): jspb.Map<string, string>;
clearTagsMap(): DeviceProfile;
getMeasurementsMap(): jspb.Map<string, Measurement>;
clearMeasurementsMap(): DeviceProfile;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceProfile.AsObject;
static toObject(includeInstance: boolean, msg: DeviceProfile): DeviceProfile.AsObject;
@ -120,6 +123,29 @@ export namespace DeviceProfile {
abpRx2Dr: number,
abpRx2Freq: number,
tagsMap: Array<[string, string]>,
measurementsMap: Array<[string, Measurement.AsObject]>,
}
}
export class Measurement extends jspb.Message {
getName(): string;
setName(value: string): Measurement;
getKind(): MeasurementKind;
setKind(value: MeasurementKind): Measurement;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Measurement.AsObject;
static toObject(includeInstance: boolean, msg: Measurement): Measurement.AsObject;
static serializeBinaryToWriter(message: Measurement, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Measurement;
static deserializeBinaryFromReader(message: Measurement, reader: jspb.BinaryReader): Measurement;
}
export namespace Measurement {
export type AsObject = {
name: string,
kind: MeasurementKind,
}
}
@ -412,3 +438,10 @@ export enum CodecRuntime {
CAYENNE_LPP = 1,
JS = 2,
}
export enum MeasurementKind {
UNKNOWN = 0,
COUNTER = 1,
ABSOLUTE = 2,
GAUGE = 3,
STRING = 4,
}

View File

@ -33,6 +33,8 @@ goog.exportSymbol('proto.api.GetDeviceProfileResponse', null, global);
goog.exportSymbol('proto.api.ListDeviceProfileAdrAlgorithmsResponse', null, global);
goog.exportSymbol('proto.api.ListDeviceProfilesRequest', null, global);
goog.exportSymbol('proto.api.ListDeviceProfilesResponse', null, global);
goog.exportSymbol('proto.api.Measurement', null, global);
goog.exportSymbol('proto.api.MeasurementKind', null, global);
goog.exportSymbol('proto.api.UpdateDeviceProfileRequest', null, global);
/**
* Generated by JsPbCodeGenerator.
@ -55,6 +57,27 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.api.DeviceProfile.displayName = 'proto.api.DeviceProfile';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.api.Measurement = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.Measurement, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.api.Measurement.displayName = 'proto.api.Measurement';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -343,7 +366,8 @@ proto.api.DeviceProfile.toObject = function(includeInstance, msg) {
abpRx1DrOffset: jspb.Message.getFieldWithDefault(msg, 22, 0),
abpRx2Dr: jspb.Message.getFieldWithDefault(msg, 23, 0),
abpRx2Freq: jspb.Message.getFieldWithDefault(msg, 24, 0),
tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : []
tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [],
measurementsMap: (f = msg.getMeasurementsMap()) ? f.toObject(includeInstance, proto.api.Measurement.toObject) : []
};
if (includeInstance) {
@ -486,6 +510,12 @@ proto.api.DeviceProfile.deserializeBinaryFromReader = function(msg, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
case 27:
var value = msg.getMeasurementsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.api.Measurement.deserializeBinaryFromReader, "", new proto.api.Measurement());
});
break;
default:
reader.skipField();
break;
@ -694,6 +724,10 @@ proto.api.DeviceProfile.serializeBinaryToWriter = function(message, writer) {
if (f && f.getLength() > 0) {
f.serializeBinary(25, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = message.getMeasurementsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(27, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.api.Measurement.serializeBinaryToWriter);
}
};
@ -1169,6 +1203,188 @@ proto.api.DeviceProfile.prototype.clearTagsMap = function() {
return this;};
/**
* map<string, Measurement> measurements = 27;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.api.Measurement>}
*/
proto.api.DeviceProfile.prototype.getMeasurementsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.api.Measurement>} */ (
jspb.Message.getMapField(this, 27, opt_noLazyCreate,
proto.api.Measurement));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.api.DeviceProfile} returns this
*/
proto.api.DeviceProfile.prototype.clearMeasurementsMap = function() {
this.getMeasurementsMap().clear();
return this;};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.Measurement.prototype.toObject = function(opt_includeInstance) {
return proto.api.Measurement.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.Measurement} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.Measurement.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
kind: jspb.Message.getFieldWithDefault(msg, 3, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.api.Measurement}
*/
proto.api.Measurement.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.Measurement;
return proto.api.Measurement.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.Measurement} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.Measurement}
*/
proto.api.Measurement.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 3:
var value = /** @type {!proto.api.MeasurementKind} */ (reader.readEnum());
msg.setKind(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.Measurement.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.api.Measurement.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.api.Measurement} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.api.Measurement.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getKind();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
};
/**
* optional string name = 2;
* @return {string}
*/
proto.api.Measurement.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.api.Measurement} returns this
*/
proto.api.Measurement.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional MeasurementKind kind = 3;
* @return {!proto.api.MeasurementKind}
*/
proto.api.Measurement.prototype.getKind = function() {
return /** @type {!proto.api.MeasurementKind} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.api.MeasurementKind} value
* @return {!proto.api.Measurement} returns this
*/
proto.api.Measurement.prototype.setKind = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
@ -3325,4 +3541,15 @@ proto.api.CodecRuntime = {
JS: 2
};
/**
* @enum {number}
*/
proto.api.MeasurementKind = {
UNKNOWN: 0,
COUNTER: 1,
ABSOLUTE: 2,
GAUGE: 3,
STRING: 4
};
goog.object.extend(exports, proto.api);

View File

@ -88,6 +88,9 @@ export class DeviceProfileTemplate extends jspb.Message {
getTagsMap(): jspb.Map<string, string>;
clearTagsMap(): DeviceProfileTemplate;
getMeasurementsMap(): jspb.Map<string, api_device_profile_pb.Measurement>;
clearMeasurementsMap(): DeviceProfileTemplate;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceProfileTemplate.AsObject;
static toObject(includeInstance: boolean, msg: DeviceProfileTemplate): DeviceProfileTemplate.AsObject;
@ -125,6 +128,7 @@ export namespace DeviceProfileTemplate {
abpRx2Dr: number,
abpRx2Freq: number,
tagsMap: Array<[string, string]>,
measurementsMap: Array<[string, api_device_profile_pb.Measurement.AsObject]>,
}
}

View File

@ -279,7 +279,8 @@ proto.api.DeviceProfileTemplate.toObject = function(includeInstance, msg) {
abpRx1DrOffset: jspb.Message.getFieldWithDefault(msg, 24, 0),
abpRx2Dr: jspb.Message.getFieldWithDefault(msg, 25, 0),
abpRx2Freq: jspb.Message.getFieldWithDefault(msg, 26, 0),
tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : []
tagsMap: (f = msg.getTagsMap()) ? f.toObject(includeInstance, undefined) : [],
measurementsMap: (f = msg.getMeasurementsMap()) ? f.toObject(includeInstance, proto.api.Measurement.toObject) : []
};
if (includeInstance) {
@ -426,6 +427,12 @@ proto.api.DeviceProfileTemplate.deserializeBinaryFromReader = function(msg, read
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
case 28:
var value = msg.getMeasurementsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.api.Measurement.deserializeBinaryFromReader, "", new proto.api.Measurement());
});
break;
default:
reader.skipField();
break;
@ -641,6 +648,10 @@ proto.api.DeviceProfileTemplate.serializeBinaryToWriter = function(message, writ
if (f && f.getLength() > 0) {
f.serializeBinary(27, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = message.getMeasurementsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(28, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.api.Measurement.serializeBinaryToWriter);
}
};
@ -1134,6 +1145,28 @@ proto.api.DeviceProfileTemplate.prototype.clearTagsMap = function() {
return this;};
/**
* map<string, Measurement> measurements = 28;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.api.Measurement>}
*/
proto.api.DeviceProfileTemplate.prototype.getMeasurementsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.api.Measurement>} */ (
jspb.Message.getMapField(this, 28, opt_noLazyCreate,
proto.api.Measurement));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.api.DeviceProfileTemplate} returns this
*/
proto.api.DeviceProfileTemplate.prototype.clearMeasurementsMap = function() {
this.getMeasurementsMap().clear();
return this;};

View File

@ -51,12 +51,12 @@ export class GatewayServiceClient {
response: api_gateway_pb.GenerateGatewayClientCertificateResponse) => void
): grpcWeb.ClientReadableStream<api_gateway_pb.GenerateGatewayClientCertificateResponse>;
getStats(
request: api_gateway_pb.GetGatewayStatsRequest,
getMetrics(
request: api_gateway_pb.GetGatewayMetricsRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: api_gateway_pb.GetGatewayStatsResponse) => void
): grpcWeb.ClientReadableStream<api_gateway_pb.GetGatewayStatsResponse>;
response: api_gateway_pb.GetGatewayMetricsResponse) => void
): grpcWeb.ClientReadableStream<api_gateway_pb.GetGatewayMetricsResponse>;
}
@ -95,10 +95,10 @@ export class GatewayServicePromiseClient {
metadata?: grpcWeb.Metadata
): Promise<api_gateway_pb.GenerateGatewayClientCertificateResponse>;
getStats(
request: api_gateway_pb.GetGatewayStatsRequest,
getMetrics(
request: api_gateway_pb.GetGatewayMetricsRequest,
metadata?: grpcWeb.Metadata
): Promise<api_gateway_pb.GetGatewayStatsResponse>;
): Promise<api_gateway_pb.GetGatewayMetricsResponse>;
}

View File

@ -559,80 +559,80 @@ proto.api.GatewayServicePromiseClient.prototype.generateClientCertificate =
/**
* @const
* @type {!grpc.web.MethodDescriptor<
* !proto.api.GetGatewayStatsRequest,
* !proto.api.GetGatewayStatsResponse>}
* !proto.api.GetGatewayMetricsRequest,
* !proto.api.GetGatewayMetricsResponse>}
*/
const methodDescriptor_GatewayService_GetStats = new grpc.web.MethodDescriptor(
'/api.GatewayService/GetStats',
const methodDescriptor_GatewayService_GetMetrics = new grpc.web.MethodDescriptor(
'/api.GatewayService/GetMetrics',
grpc.web.MethodType.UNARY,
proto.api.GetGatewayStatsRequest,
proto.api.GetGatewayStatsResponse,
proto.api.GetGatewayMetricsRequest,
proto.api.GetGatewayMetricsResponse,
/**
* @param {!proto.api.GetGatewayStatsRequest} request
* @param {!proto.api.GetGatewayMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetGatewayStatsResponse.deserializeBinary
proto.api.GetGatewayMetricsResponse.deserializeBinary
);
/**
* @const
* @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.api.GetGatewayStatsRequest,
* !proto.api.GetGatewayStatsResponse>}
* !proto.api.GetGatewayMetricsRequest,
* !proto.api.GetGatewayMetricsResponse>}
*/
const methodInfo_GatewayService_GetStats = new grpc.web.AbstractClientBase.MethodInfo(
proto.api.GetGatewayStatsResponse,
const methodInfo_GatewayService_GetMetrics = new grpc.web.AbstractClientBase.MethodInfo(
proto.api.GetGatewayMetricsResponse,
/**
* @param {!proto.api.GetGatewayStatsRequest} request
* @param {!proto.api.GetGatewayMetricsRequest} request
* @return {!Uint8Array}
*/
function(request) {
return request.serializeBinary();
},
proto.api.GetGatewayStatsResponse.deserializeBinary
proto.api.GetGatewayMetricsResponse.deserializeBinary
);
/**
* @param {!proto.api.GetGatewayStatsRequest} request The
* @param {!proto.api.GetGatewayMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.Error, ?proto.api.GetGatewayStatsResponse)}
* @param {function(?grpc.web.Error, ?proto.api.GetGatewayMetricsResponse)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.api.GetGatewayStatsResponse>|undefined}
* @return {!grpc.web.ClientReadableStream<!proto.api.GetGatewayMetricsResponse>|undefined}
* The XHR Node Readable Stream
*/
proto.api.GatewayServiceClient.prototype.getStats =
proto.api.GatewayServiceClient.prototype.getMetrics =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/api.GatewayService/GetStats',
'/api.GatewayService/GetMetrics',
request,
metadata || {},
methodDescriptor_GatewayService_GetStats,
methodDescriptor_GatewayService_GetMetrics,
callback);
};
/**
* @param {!proto.api.GetGatewayStatsRequest} request The
* @param {!proto.api.GetGatewayMetricsRequest} request The
* request proto
* @param {?Object<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.api.GetGatewayStatsResponse>}
* @return {!Promise<!proto.api.GetGatewayMetricsResponse>}
* Promise that resolves to the response
*/
proto.api.GatewayServicePromiseClient.prototype.getStats =
proto.api.GatewayServicePromiseClient.prototype.getMetrics =
function(request, metadata) {
return this.client_.unaryCall(this.hostname_ +
'/api.GatewayService/GetStats',
'/api.GatewayService/GetMetrics',
request,
metadata || {},
methodDescriptor_GatewayService_GetStats);
methodDescriptor_GatewayService_GetMetrics);
};

View File

@ -325,101 +325,93 @@ export namespace GenerateGatewayClientCertificateResponse {
}
}
export class GetGatewayStatsRequest extends jspb.Message {
export class GetGatewayMetricsRequest extends jspb.Message {
getGatewayId(): string;
setGatewayId(value: string): GetGatewayStatsRequest;
setGatewayId(value: string): GetGatewayMetricsRequest;
getStart(): google_protobuf_timestamp_pb.Timestamp | undefined;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): GetGatewayStatsRequest;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): GetGatewayMetricsRequest;
hasStart(): boolean;
clearStart(): GetGatewayStatsRequest;
clearStart(): GetGatewayMetricsRequest;
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): GetGatewayStatsRequest;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): GetGatewayMetricsRequest;
hasEnd(): boolean;
clearEnd(): GetGatewayStatsRequest;
clearEnd(): GetGatewayMetricsRequest;
getAggregation(): common_common_pb.Aggregation;
setAggregation(value: common_common_pb.Aggregation): GetGatewayMetricsRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetGatewayStatsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayStatsRequest): GetGatewayStatsRequest.AsObject;
static serializeBinaryToWriter(message: GetGatewayStatsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayStatsRequest;
static deserializeBinaryFromReader(message: GetGatewayStatsRequest, reader: jspb.BinaryReader): GetGatewayStatsRequest;
toObject(includeInstance?: boolean): GetGatewayMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayMetricsRequest): GetGatewayMetricsRequest.AsObject;
static serializeBinaryToWriter(message: GetGatewayMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayMetricsRequest;
static deserializeBinaryFromReader(message: GetGatewayMetricsRequest, reader: jspb.BinaryReader): GetGatewayMetricsRequest;
}
export namespace GetGatewayStatsRequest {
export namespace GetGatewayMetricsRequest {
export type AsObject = {
gatewayId: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.Aggregation,
}
}
export class GetGatewayStatsResponse extends jspb.Message {
getResultList(): Array<GatewayStats>;
setResultList(value: Array<GatewayStats>): GetGatewayStatsResponse;
clearResultList(): GetGatewayStatsResponse;
addResult(value?: GatewayStats, index?: number): GatewayStats;
export class GetGatewayMetricsResponse extends jspb.Message {
getRxPackets(): common_common_pb.Metric | undefined;
setRxPackets(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasRxPackets(): boolean;
clearRxPackets(): GetGatewayMetricsResponse;
getTxPackets(): common_common_pb.Metric | undefined;
setTxPackets(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasTxPackets(): boolean;
clearTxPackets(): GetGatewayMetricsResponse;
getTxPacketsPerFreq(): common_common_pb.Metric | undefined;
setTxPacketsPerFreq(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasTxPacketsPerFreq(): boolean;
clearTxPacketsPerFreq(): GetGatewayMetricsResponse;
getRxPacketsPerFreq(): common_common_pb.Metric | undefined;
setRxPacketsPerFreq(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasRxPacketsPerFreq(): boolean;
clearRxPacketsPerFreq(): GetGatewayMetricsResponse;
getTxPacketsPerDr(): common_common_pb.Metric | undefined;
setTxPacketsPerDr(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasTxPacketsPerDr(): boolean;
clearTxPacketsPerDr(): GetGatewayMetricsResponse;
getRxPacketsPerDr(): common_common_pb.Metric | undefined;
setRxPacketsPerDr(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasRxPacketsPerDr(): boolean;
clearRxPacketsPerDr(): GetGatewayMetricsResponse;
getTxPacketsPerStatus(): common_common_pb.Metric | undefined;
setTxPacketsPerStatus(value?: common_common_pb.Metric): GetGatewayMetricsResponse;
hasTxPacketsPerStatus(): boolean;
clearTxPacketsPerStatus(): GetGatewayMetricsResponse;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetGatewayStatsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayStatsResponse): GetGatewayStatsResponse.AsObject;
static serializeBinaryToWriter(message: GetGatewayStatsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayStatsResponse;
static deserializeBinaryFromReader(message: GetGatewayStatsResponse, reader: jspb.BinaryReader): GetGatewayStatsResponse;
toObject(includeInstance?: boolean): GetGatewayMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayMetricsResponse): GetGatewayMetricsResponse.AsObject;
static serializeBinaryToWriter(message: GetGatewayMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayMetricsResponse;
static deserializeBinaryFromReader(message: GetGatewayMetricsResponse, reader: jspb.BinaryReader): GetGatewayMetricsResponse;
}
export namespace GetGatewayStatsResponse {
export namespace GetGatewayMetricsResponse {
export type AsObject = {
resultList: Array<GatewayStats.AsObject>,
}
}
export class GatewayStats extends jspb.Message {
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): GatewayStats;
hasTime(): boolean;
clearTime(): GatewayStats;
getRxPackets(): number;
setRxPackets(value: number): GatewayStats;
getTxPackets(): number;
setTxPackets(value: number): GatewayStats;
getTxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearTxPacketsPerFrequencyMap(): GatewayStats;
getRxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearRxPacketsPerFrequencyMap(): GatewayStats;
getTxPacketsPerDrMap(): jspb.Map<number, number>;
clearTxPacketsPerDrMap(): GatewayStats;
getRxPacketsPerDrMap(): jspb.Map<number, number>;
clearRxPacketsPerDrMap(): GatewayStats;
getTxPacketsPerStatusMap(): jspb.Map<string, number>;
clearTxPacketsPerStatusMap(): GatewayStats;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GatewayStats.AsObject;
static toObject(includeInstance: boolean, msg: GatewayStats): GatewayStats.AsObject;
static serializeBinaryToWriter(message: GatewayStats, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GatewayStats;
static deserializeBinaryFromReader(message: GatewayStats, reader: jspb.BinaryReader): GatewayStats;
}
export namespace GatewayStats {
export type AsObject = {
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
rxPackets: number,
txPackets: number,
txPacketsPerFrequencyMap: Array<[number, number]>,
rxPacketsPerFrequencyMap: Array<[number, number]>,
txPacketsPerDrMap: Array<[number, number]>,
rxPacketsPerDrMap: Array<[number, number]>,
txPacketsPerStatusMap: Array<[string, number]>,
rxPackets?: common_common_pb.Metric.AsObject,
txPackets?: common_common_pb.Metric.AsObject,
txPacketsPerFreq?: common_common_pb.Metric.AsObject,
rxPacketsPerFreq?: common_common_pb.Metric.AsObject,
txPacketsPerDr?: common_common_pb.Metric.AsObject,
rxPacketsPerDr?: common_common_pb.Metric.AsObject,
txPacketsPerStatus?: common_common_pb.Metric.AsObject,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
import * as jspb from 'google-protobuf'
import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
export class Location extends jspb.Message {
@ -60,6 +61,60 @@ export namespace KeyEnvelope {
}
}
export class Metric extends jspb.Message {
getName(): string;
setName(value: string): Metric;
getTimestampsList(): Array<google_protobuf_timestamp_pb.Timestamp>;
setTimestampsList(value: Array<google_protobuf_timestamp_pb.Timestamp>): Metric;
clearTimestampsList(): Metric;
addTimestamps(value?: google_protobuf_timestamp_pb.Timestamp, index?: number): google_protobuf_timestamp_pb.Timestamp;
getDatasetsList(): Array<MetricDataset>;
setDatasetsList(value: Array<MetricDataset>): Metric;
clearDatasetsList(): Metric;
addDatasets(value?: MetricDataset, index?: number): MetricDataset;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Metric.AsObject;
static toObject(includeInstance: boolean, msg: Metric): Metric.AsObject;
static serializeBinaryToWriter(message: Metric, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Metric;
static deserializeBinaryFromReader(message: Metric, reader: jspb.BinaryReader): Metric;
}
export namespace Metric {
export type AsObject = {
name: string,
timestampsList: Array<google_protobuf_timestamp_pb.Timestamp.AsObject>,
datasetsList: Array<MetricDataset.AsObject>,
}
}
export class MetricDataset extends jspb.Message {
getLabel(): string;
setLabel(value: string): MetricDataset;
getDataList(): Array<number>;
setDataList(value: Array<number>): MetricDataset;
clearDataList(): MetricDataset;
addData(value: number, index?: number): MetricDataset;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MetricDataset.AsObject;
static toObject(includeInstance: boolean, msg: MetricDataset): MetricDataset.AsObject;
static serializeBinaryToWriter(message: MetricDataset, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MetricDataset;
static deserializeBinaryFromReader(message: MetricDataset, reader: jspb.BinaryReader): MetricDataset;
}
export namespace MetricDataset {
export type AsObject = {
label: string,
dataList: Array<number>,
}
}
export enum Modulation {
LORA = 0,
FSK = 1,
@ -116,3 +171,8 @@ export enum LocationSource {
GEO_RESOLVER_GNSS = 5,
GEO_RESOLVER_WIFI = 6,
}
export enum Aggregation {
HOUR = 0,
DAY = 1,
MONTH = 2,
}

View File

@ -15,11 +15,16 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.common.Aggregation', null, global);
goog.exportSymbol('proto.common.KeyEnvelope', null, global);
goog.exportSymbol('proto.common.Location', null, global);
goog.exportSymbol('proto.common.LocationSource', null, global);
goog.exportSymbol('proto.common.MType', null, global);
goog.exportSymbol('proto.common.MacVersion', null, global);
goog.exportSymbol('proto.common.Metric', null, global);
goog.exportSymbol('proto.common.MetricDataset', null, global);
goog.exportSymbol('proto.common.Modulation', null, global);
goog.exportSymbol('proto.common.RegParamsRevision', null, global);
goog.exportSymbol('proto.common.Region', null, global);
@ -65,6 +70,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.common.KeyEnvelope.displayName = 'proto.common.KeyEnvelope';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.common.Metric = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.Metric.repeatedFields_, null);
};
goog.inherits(proto.common.Metric, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.Metric.displayName = 'proto.common.Metric';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.common.MetricDataset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.MetricDataset.repeatedFields_, null);
};
goog.inherits(proto.common.MetricDataset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.common.MetricDataset.displayName = 'proto.common.MetricDataset';
}
@ -499,6 +546,437 @@ proto.common.KeyEnvelope.prototype.setAesKey = function(value) {
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.common.Metric.repeatedFields_ = [2,3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.Metric.prototype.toObject = function(opt_includeInstance) {
return proto.common.Metric.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.Metric} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Metric.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
timestampsList: jspb.Message.toObjectList(msg.getTimestampsList(),
google_protobuf_timestamp_pb.Timestamp.toObject, includeInstance),
datasetsList: jspb.Message.toObjectList(msg.getDatasetsList(),
proto.common.MetricDataset.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.common.Metric}
*/
proto.common.Metric.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.common.Metric;
return proto.common.Metric.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.common.Metric} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.common.Metric}
*/
proto.common.Metric.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.addTimestamps(value);
break;
case 3:
var value = new proto.common.MetricDataset;
reader.readMessage(value,proto.common.MetricDataset.deserializeBinaryFromReader);
msg.addDatasets(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.Metric.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.common.Metric.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.Metric} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.Metric.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTimestampsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getDatasetsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.common.MetricDataset.serializeBinaryToWriter
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.common.Metric.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated google.protobuf.Timestamp timestamps = 2;
* @return {!Array<!proto.google.protobuf.Timestamp>}
*/
proto.common.Metric.prototype.getTimestampsList = function() {
return /** @type{!Array<!proto.google.protobuf.Timestamp>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/**
* @param {!Array<!proto.google.protobuf.Timestamp>} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setTimestampsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.google.protobuf.Timestamp=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Timestamp}
*/
proto.common.Metric.prototype.addTimestamps = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Timestamp, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.clearTimestampsList = function() {
return this.setTimestampsList([]);
};
/**
* repeated MetricDataset datasets = 3;
* @return {!Array<!proto.common.MetricDataset>}
*/
proto.common.Metric.prototype.getDatasetsList = function() {
return /** @type{!Array<!proto.common.MetricDataset>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.common.MetricDataset, 3));
};
/**
* @param {!Array<!proto.common.MetricDataset>} value
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.setDatasetsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.common.MetricDataset=} opt_value
* @param {number=} opt_index
* @return {!proto.common.MetricDataset}
*/
proto.common.Metric.prototype.addDatasets = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.common.MetricDataset, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.Metric} returns this
*/
proto.common.Metric.prototype.clearDatasetsList = function() {
return this.setDatasetsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.common.MetricDataset.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.MetricDataset.prototype.toObject = function(opt_includeInstance) {
return proto.common.MetricDataset.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.MetricDataset} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.MetricDataset.toObject = function(includeInstance, msg) {
var f, obj = {
label: jspb.Message.getFieldWithDefault(msg, 1, ""),
dataList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 2)) == null ? undefined : f
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.common.MetricDataset}
*/
proto.common.MetricDataset.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.common.MetricDataset;
return proto.common.MetricDataset.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.common.MetricDataset} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.common.MetricDataset}
*/
proto.common.MetricDataset.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setLabel(value);
break;
case 2:
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]);
for (var i = 0; i < values.length; i++) {
msg.addData(values[i]);
}
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.MetricDataset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.common.MetricDataset.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.common.MetricDataset} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.common.MetricDataset.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getLabel();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDataList();
if (f.length > 0) {
writer.writePackedFloat(
2,
f
);
}
};
/**
* optional string label = 1;
* @return {string}
*/
proto.common.MetricDataset.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.setLabel = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated float data = 2;
* @return {!Array<number>}
*/
proto.common.MetricDataset.prototype.getDataList = function() {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
};
/**
* @param {!Array<number>} value
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.setDataList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.addData = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.common.MetricDataset} returns this
*/
proto.common.MetricDataset.prototype.clearDataList = function() {
return this.setDataList([]);
};
/**
* @enum {number}
*/
@ -579,4 +1057,13 @@ proto.common.LocationSource = {
GEO_RESOLVER_WIFI: 6
};
/**
* @enum {number}
*/
proto.common.Aggregation = {
HOUR: 0,
DAY: 1,
MONTH: 2
};
goog.object.extend(exports, proto.common);

View File

@ -22,7 +22,8 @@ interface IDeviceServiceService extends grpc.ServiceDefinition<grpc.UntypedServi
deactivate: grpc.MethodDefinition<api_device_pb.DeactivateDeviceRequest, google_protobuf_empty_pb.Empty>;
getActivation: grpc.MethodDefinition<api_device_pb.GetDeviceActivationRequest, api_device_pb.GetDeviceActivationResponse>;
getRandomDevAddr: grpc.MethodDefinition<api_device_pb.GetRandomDevAddrRequest, api_device_pb.GetRandomDevAddrResponse>;
getStats: grpc.MethodDefinition<api_device_pb.GetDeviceStatsRequest, api_device_pb.GetDeviceStatsResponse>;
getMetrics: grpc.MethodDefinition<api_device_pb.GetDeviceMetricsRequest, api_device_pb.GetDeviceMetricsResponse>;
getLinkMetrics: grpc.MethodDefinition<api_device_pb.GetDeviceLinkMetricsRequest, api_device_pb.GetDeviceLinkMetricsResponse>;
enqueue: grpc.MethodDefinition<api_device_pb.EnqueueDeviceQueueItemRequest, api_device_pb.EnqueueDeviceQueueItemResponse>;
flushQueue: grpc.MethodDefinition<api_device_pb.FlushDeviceQueueRequest, google_protobuf_empty_pb.Empty>;
getQueue: grpc.MethodDefinition<api_device_pb.GetDeviceQueueItemsRequest, api_device_pb.GetDeviceQueueItemsResponse>;
@ -45,7 +46,8 @@ export interface IDeviceServiceServer extends grpc.UntypedServiceImplementation
deactivate: grpc.handleUnaryCall<api_device_pb.DeactivateDeviceRequest, google_protobuf_empty_pb.Empty>;
getActivation: grpc.handleUnaryCall<api_device_pb.GetDeviceActivationRequest, api_device_pb.GetDeviceActivationResponse>;
getRandomDevAddr: grpc.handleUnaryCall<api_device_pb.GetRandomDevAddrRequest, api_device_pb.GetRandomDevAddrResponse>;
getStats: grpc.handleUnaryCall<api_device_pb.GetDeviceStatsRequest, api_device_pb.GetDeviceStatsResponse>;
getMetrics: grpc.handleUnaryCall<api_device_pb.GetDeviceMetricsRequest, api_device_pb.GetDeviceMetricsResponse>;
getLinkMetrics: grpc.handleUnaryCall<api_device_pb.GetDeviceLinkMetricsRequest, api_device_pb.GetDeviceLinkMetricsResponse>;
enqueue: grpc.handleUnaryCall<api_device_pb.EnqueueDeviceQueueItemRequest, api_device_pb.EnqueueDeviceQueueItemResponse>;
flushQueue: grpc.handleUnaryCall<api_device_pb.FlushDeviceQueueRequest, google_protobuf_empty_pb.Empty>;
getQueue: grpc.handleUnaryCall<api_device_pb.GetDeviceQueueItemsRequest, api_device_pb.GetDeviceQueueItemsResponse>;
@ -95,9 +97,12 @@ export class DeviceServiceClient extends grpc.Client {
getRandomDevAddr(argument: api_device_pb.GetRandomDevAddrRequest, callback: grpc.requestCallback<api_device_pb.GetRandomDevAddrResponse>): grpc.ClientUnaryCall;
getRandomDevAddr(argument: api_device_pb.GetRandomDevAddrRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetRandomDevAddrResponse>): grpc.ClientUnaryCall;
getRandomDevAddr(argument: api_device_pb.GetRandomDevAddrRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetRandomDevAddrResponse>): grpc.ClientUnaryCall;
getStats(argument: api_device_pb.GetDeviceStatsRequest, callback: grpc.requestCallback<api_device_pb.GetDeviceStatsResponse>): grpc.ClientUnaryCall;
getStats(argument: api_device_pb.GetDeviceStatsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceStatsResponse>): grpc.ClientUnaryCall;
getStats(argument: api_device_pb.GetDeviceStatsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceStatsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_device_pb.GetDeviceMetricsRequest, callback: grpc.requestCallback<api_device_pb.GetDeviceMetricsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_device_pb.GetDeviceMetricsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceMetricsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_device_pb.GetDeviceMetricsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceMetricsResponse>): grpc.ClientUnaryCall;
getLinkMetrics(argument: api_device_pb.GetDeviceLinkMetricsRequest, callback: grpc.requestCallback<api_device_pb.GetDeviceLinkMetricsResponse>): grpc.ClientUnaryCall;
getLinkMetrics(argument: api_device_pb.GetDeviceLinkMetricsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceLinkMetricsResponse>): grpc.ClientUnaryCall;
getLinkMetrics(argument: api_device_pb.GetDeviceLinkMetricsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.GetDeviceLinkMetricsResponse>): grpc.ClientUnaryCall;
enqueue(argument: api_device_pb.EnqueueDeviceQueueItemRequest, callback: grpc.requestCallback<api_device_pb.EnqueueDeviceQueueItemResponse>): grpc.ClientUnaryCall;
enqueue(argument: api_device_pb.EnqueueDeviceQueueItemRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.EnqueueDeviceQueueItemResponse>): grpc.ClientUnaryCall;
enqueue(argument: api_device_pb.EnqueueDeviceQueueItemRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_device_pb.EnqueueDeviceQueueItemResponse>): grpc.ClientUnaryCall;

View File

@ -3,6 +3,7 @@
'use strict';
var grpc = require('@grpc/grpc-js');
var api_device_pb = require('../api/device_pb.js');
var common_common_pb = require('../common/common_pb.js');
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
@ -161,6 +162,50 @@ function deserialize_api_GetDeviceKeysResponse(buffer_arg) {
return api_device_pb.GetDeviceKeysResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceLinkMetricsRequest(arg) {
if (!(arg instanceof api_device_pb.GetDeviceLinkMetricsRequest)) {
throw new Error('Expected argument of type api.GetDeviceLinkMetricsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceLinkMetricsRequest(buffer_arg) {
return api_device_pb.GetDeviceLinkMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceLinkMetricsResponse(arg) {
if (!(arg instanceof api_device_pb.GetDeviceLinkMetricsResponse)) {
throw new Error('Expected argument of type api.GetDeviceLinkMetricsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceLinkMetricsResponse(buffer_arg) {
return api_device_pb.GetDeviceLinkMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceMetricsRequest(arg) {
if (!(arg instanceof api_device_pb.GetDeviceMetricsRequest)) {
throw new Error('Expected argument of type api.GetDeviceMetricsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceMetricsRequest(buffer_arg) {
return api_device_pb.GetDeviceMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceMetricsResponse(arg) {
if (!(arg instanceof api_device_pb.GetDeviceMetricsResponse)) {
throw new Error('Expected argument of type api.GetDeviceMetricsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceMetricsResponse(buffer_arg) {
return api_device_pb.GetDeviceMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceQueueItemsRequest(arg) {
if (!(arg instanceof api_device_pb.GetDeviceQueueItemsRequest)) {
throw new Error('Expected argument of type api.GetDeviceQueueItemsRequest');
@ -205,28 +250,6 @@ function deserialize_api_GetDeviceResponse(buffer_arg) {
return api_device_pb.GetDeviceResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceStatsRequest(arg) {
if (!(arg instanceof api_device_pb.GetDeviceStatsRequest)) {
throw new Error('Expected argument of type api.GetDeviceStatsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceStatsRequest(buffer_arg) {
return api_device_pb.GetDeviceStatsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetDeviceStatsResponse(arg) {
if (!(arg instanceof api_device_pb.GetDeviceStatsResponse)) {
throw new Error('Expected argument of type api.GetDeviceStatsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetDeviceStatsResponse(buffer_arg) {
return api_device_pb.GetDeviceStatsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetRandomDevAddrRequest(arg) {
if (!(arg instanceof api_device_pb.GetRandomDevAddrRequest)) {
throw new Error('Expected argument of type api.GetRandomDevAddrRequest');
@ -475,17 +498,31 @@ getRandomDevAddr: {
responseSerialize: serialize_api_GetRandomDevAddrResponse,
responseDeserialize: deserialize_api_GetRandomDevAddrResponse,
},
// GetStats returns the device stats.
getStats: {
path: '/api.DeviceService/GetStats',
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
getMetrics: {
path: '/api.DeviceService/GetMetrics',
requestStream: false,
responseStream: false,
requestType: api_device_pb.GetDeviceStatsRequest,
responseType: api_device_pb.GetDeviceStatsResponse,
requestSerialize: serialize_api_GetDeviceStatsRequest,
requestDeserialize: deserialize_api_GetDeviceStatsRequest,
responseSerialize: serialize_api_GetDeviceStatsResponse,
responseDeserialize: deserialize_api_GetDeviceStatsResponse,
requestType: api_device_pb.GetDeviceMetricsRequest,
responseType: api_device_pb.GetDeviceMetricsResponse,
requestSerialize: serialize_api_GetDeviceMetricsRequest,
requestDeserialize: deserialize_api_GetDeviceMetricsRequest,
responseSerialize: serialize_api_GetDeviceMetricsResponse,
responseDeserialize: deserialize_api_GetDeviceMetricsResponse,
},
// GetLinkMetrics returns the device link metrics.
// This includes uplinks, downlinks, RSSI, SNR, etc...
getLinkMetrics: {
path: '/api.DeviceService/GetLinkMetrics',
requestStream: false,
responseStream: false,
requestType: api_device_pb.GetDeviceLinkMetricsRequest,
responseType: api_device_pb.GetDeviceLinkMetricsResponse,
requestSerialize: serialize_api_GetDeviceLinkMetricsRequest,
requestDeserialize: deserialize_api_GetDeviceLinkMetricsRequest,
responseSerialize: serialize_api_GetDeviceLinkMetricsResponse,
responseDeserialize: deserialize_api_GetDeviceLinkMetricsResponse,
},
// Enqueue adds the given item to the downlink queue.
enqueue: {

View File

@ -2,6 +2,7 @@
// file: api/device.proto
import * as jspb from "google-protobuf";
import * as common_common_pb from "../common/common_pb";
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb";
import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
@ -658,7 +659,7 @@ export namespace GetRandomDevAddrResponse {
}
}
export class GetDeviceStatsRequest extends jspb.Message {
export class GetDeviceMetricsRequest extends jspb.Message {
getDevEui(): string;
setDevEui(value: string): void;
@ -672,86 +673,159 @@ export class GetDeviceStatsRequest extends jspb.Message {
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): void;
getAggregation(): common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap];
setAggregation(value: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceStatsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceStatsRequest): GetDeviceStatsRequest.AsObject;
toObject(includeInstance?: boolean): GetDeviceMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceMetricsRequest): GetDeviceMetricsRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetDeviceStatsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceStatsRequest;
static deserializeBinaryFromReader(message: GetDeviceStatsRequest, reader: jspb.BinaryReader): GetDeviceStatsRequest;
static serializeBinaryToWriter(message: GetDeviceMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceMetricsRequest;
static deserializeBinaryFromReader(message: GetDeviceMetricsRequest, reader: jspb.BinaryReader): GetDeviceMetricsRequest;
}
export namespace GetDeviceStatsRequest {
export namespace GetDeviceMetricsRequest {
export type AsObject = {
devEui: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap],
}
}
export class GetDeviceStatsResponse extends jspb.Message {
clearResultList(): void;
getResultList(): Array<DeviceStats>;
setResultList(value: Array<DeviceStats>): void;
addResult(value?: DeviceStats, index?: number): DeviceStats;
export class GetDeviceMetricsResponse extends jspb.Message {
getMetricsMap(): jspb.Map<string, common_common_pb.Metric>;
clearMetricsMap(): void;
getStatesMap(): jspb.Map<string, DeviceState>;
clearStatesMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceStatsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceStatsResponse): GetDeviceStatsResponse.AsObject;
toObject(includeInstance?: boolean): GetDeviceMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceMetricsResponse): GetDeviceMetricsResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetDeviceStatsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceStatsResponse;
static deserializeBinaryFromReader(message: GetDeviceStatsResponse, reader: jspb.BinaryReader): GetDeviceStatsResponse;
static serializeBinaryToWriter(message: GetDeviceMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceMetricsResponse;
static deserializeBinaryFromReader(message: GetDeviceMetricsResponse, reader: jspb.BinaryReader): GetDeviceMetricsResponse;
}
export namespace GetDeviceStatsResponse {
export namespace GetDeviceMetricsResponse {
export type AsObject = {
resultList: Array<DeviceStats.AsObject>,
metricsMap: Array<[string, common_common_pb.Metric.AsObject]>,
statesMap: Array<[string, DeviceState.AsObject]>,
}
}
export class DeviceStats extends jspb.Message {
hasTime(): boolean;
clearTime(): void;
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): void;
export class DeviceState extends jspb.Message {
getName(): string;
setName(value: string): void;
getRxPackets(): number;
setRxPackets(value: number): void;
getValue(): string;
setValue(value: string): void;
getGwRssi(): number;
setGwRssi(value: number): void;
getGwSnr(): number;
setGwSnr(value: number): void;
getRxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearRxPacketsPerFrequencyMap(): void;
getRxPacketsPerDrMap(): jspb.Map<number, number>;
clearRxPacketsPerDrMap(): void;
getErrorsMap(): jspb.Map<string, number>;
clearErrorsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceStats.AsObject;
static toObject(includeInstance: boolean, msg: DeviceStats): DeviceStats.AsObject;
toObject(includeInstance?: boolean): DeviceState.AsObject;
static toObject(includeInstance: boolean, msg: DeviceState): DeviceState.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: DeviceStats, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeviceStats;
static deserializeBinaryFromReader(message: DeviceStats, reader: jspb.BinaryReader): DeviceStats;
static serializeBinaryToWriter(message: DeviceState, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): DeviceState;
static deserializeBinaryFromReader(message: DeviceState, reader: jspb.BinaryReader): DeviceState;
}
export namespace DeviceStats {
export namespace DeviceState {
export type AsObject = {
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
rxPackets: number,
gwRssi: number,
gwSnr: number,
rxPacketsPerFrequencyMap: Array<[number, number]>,
rxPacketsPerDrMap: Array<[number, number]>,
errorsMap: Array<[string, number]>,
name: string,
value: string,
}
}
export class GetDeviceLinkMetricsRequest extends jspb.Message {
getDevEui(): string;
setDevEui(value: string): void;
hasStart(): boolean;
clearStart(): void;
getStart(): google_protobuf_timestamp_pb.Timestamp | undefined;
setStart(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasEnd(): boolean;
clearEnd(): void;
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): void;
getAggregation(): common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap];
setAggregation(value: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceLinkMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceLinkMetricsRequest): GetDeviceLinkMetricsRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetDeviceLinkMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceLinkMetricsRequest;
static deserializeBinaryFromReader(message: GetDeviceLinkMetricsRequest, reader: jspb.BinaryReader): GetDeviceLinkMetricsRequest;
}
export namespace GetDeviceLinkMetricsRequest {
export type AsObject = {
devEui: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap],
}
}
export class GetDeviceLinkMetricsResponse extends jspb.Message {
hasRxPackets(): boolean;
clearRxPackets(): void;
getRxPackets(): common_common_pb.Metric | undefined;
setRxPackets(value?: common_common_pb.Metric): void;
hasGwRssi(): boolean;
clearGwRssi(): void;
getGwRssi(): common_common_pb.Metric | undefined;
setGwRssi(value?: common_common_pb.Metric): void;
hasGwSnr(): boolean;
clearGwSnr(): void;
getGwSnr(): common_common_pb.Metric | undefined;
setGwSnr(value?: common_common_pb.Metric): void;
hasRxPacketsPerFreq(): boolean;
clearRxPacketsPerFreq(): void;
getRxPacketsPerFreq(): common_common_pb.Metric | undefined;
setRxPacketsPerFreq(value?: common_common_pb.Metric): void;
hasRxPacketsPerDr(): boolean;
clearRxPacketsPerDr(): void;
getRxPacketsPerDr(): common_common_pb.Metric | undefined;
setRxPacketsPerDr(value?: common_common_pb.Metric): void;
hasErrors(): boolean;
clearErrors(): void;
getErrors(): common_common_pb.Metric | undefined;
setErrors(value?: common_common_pb.Metric): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetDeviceLinkMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetDeviceLinkMetricsResponse): GetDeviceLinkMetricsResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetDeviceLinkMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetDeviceLinkMetricsResponse;
static deserializeBinaryFromReader(message: GetDeviceLinkMetricsResponse, reader: jspb.BinaryReader): GetDeviceLinkMetricsResponse;
}
export namespace GetDeviceLinkMetricsResponse {
export type AsObject = {
rxPackets?: common_common_pb.Metric.AsObject,
gwRssi?: common_common_pb.Metric.AsObject,
gwSnr?: common_common_pb.Metric.AsObject,
rxPacketsPerFreq?: common_common_pb.Metric.AsObject,
rxPacketsPerDr?: common_common_pb.Metric.AsObject,
errors?: common_common_pb.Metric.AsObject,
}
}

1039
api/js/api/device_pb.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -84,6 +84,8 @@ export class DeviceProfile extends jspb.Message {
getTagsMap(): jspb.Map<string, string>;
clearTagsMap(): void;
getMeasurementsMap(): jspb.Map<string, Measurement>;
clearMeasurementsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceProfile.AsObject;
static toObject(includeInstance: boolean, msg: DeviceProfile): DeviceProfile.AsObject;
@ -122,6 +124,31 @@ export namespace DeviceProfile {
abpRx2Dr: number,
abpRx2Freq: number,
tagsMap: Array<[string, string]>,
measurementsMap: Array<[string, Measurement.AsObject]>,
}
}
export class Measurement extends jspb.Message {
getName(): string;
setName(value: string): void;
getKind(): MeasurementKindMap[keyof MeasurementKindMap];
setKind(value: MeasurementKindMap[keyof MeasurementKindMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Measurement.AsObject;
static toObject(includeInstance: boolean, msg: Measurement): Measurement.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Measurement, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Measurement;
static deserializeBinaryFromReader(message: Measurement, reader: jspb.BinaryReader): Measurement;
}
export namespace Measurement {
export type AsObject = {
name: string,
kind: MeasurementKindMap[keyof MeasurementKindMap],
}
}
@ -439,3 +466,13 @@ export interface CodecRuntimeMap {
export const CodecRuntime: CodecRuntimeMap;
export interface MeasurementKindMap {
UNKNOWN: 0;
COUNTER: 1;
ABSOLUTE: 2;
GAUGE: 3;
STRING: 4;
}
export const MeasurementKind: MeasurementKindMap;

View File

@ -24,6 +24,8 @@ goog.exportSymbol('proto.api.GetDeviceProfileResponse', null, global);
goog.exportSymbol('proto.api.ListDeviceProfileAdrAlgorithmsResponse', null, global);
goog.exportSymbol('proto.api.ListDeviceProfilesRequest', null, global);
goog.exportSymbol('proto.api.ListDeviceProfilesResponse', null, global);
goog.exportSymbol('proto.api.Measurement', null, global);
goog.exportSymbol('proto.api.MeasurementKind', null, global);
goog.exportSymbol('proto.api.UpdateDeviceProfileRequest', null, global);
/**
@ -96,7 +98,8 @@ proto.api.DeviceProfile.toObject = function(includeInstance, msg) {
abpRx1DrOffset: msg.getAbpRx1DrOffset(),
abpRx2Dr: msg.getAbpRx2Dr(),
abpRx2Freq: msg.getAbpRx2Freq(),
tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : []
tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
measurementsMap: (f = msg.getMeasurementsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
@ -239,6 +242,12 @@ proto.api.DeviceProfile.deserializeBinaryFromReader = function(msg, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
case 27:
var value = msg.getMeasurementsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.api.Measurement.deserializeBinaryFromReader);
});
break;
default:
reader.skipField();
break;
@ -456,6 +465,10 @@ proto.api.DeviceProfile.prototype.serializeBinaryToWriter = function (writer) {
if (f && f.getLength() > 0) {
f.serializeBinary(25, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = this.getMeasurementsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(27, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.api.Measurement.serializeBinaryToWriter);
}
};
@ -864,6 +877,205 @@ proto.api.DeviceProfile.prototype.getTagsMap = function(opt_noLazyCreate) {
};
/**
* map<string, Measurement> measurements = 27;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.api.Measurement>}
*/
proto.api.DeviceProfile.prototype.getMeasurementsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.api.Measurement>} */ (
jspb.Message.getMapField(this, 27, opt_noLazyCreate,
proto.api.Measurement));
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.api.Measurement = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.Measurement, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.api.Measurement.displayName = 'proto.api.Measurement';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.Measurement.prototype.toObject = function(opt_includeInstance) {
return proto.api.Measurement.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.Measurement} msg The msg instance to transform.
* @return {!Object}
*/
proto.api.Measurement.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
kind: msg.getKind()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.api.Measurement}
*/
proto.api.Measurement.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.Measurement;
return proto.api.Measurement.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.Measurement} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.Measurement}
*/
proto.api.Measurement.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 3:
var value = /** @type {!proto.api.MeasurementKind} */ (reader.readEnum());
msg.setKind(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.Measurement} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.Measurement.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.Measurement.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.api.Measurement.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = this.getKind();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.Measurement} The clone.
*/
proto.api.Measurement.prototype.cloneMessage = function() {
return /** @type {!proto.api.Measurement} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 2;
* @return {string}
*/
proto.api.Measurement.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
};
/** @param {string} value */
proto.api.Measurement.prototype.setName = function(value) {
jspb.Message.setField(this, 2, value);
};
/**
* optional MeasurementKind kind = 3;
* @return {!proto.api.MeasurementKind}
*/
proto.api.Measurement.prototype.getKind = function() {
return /** @type {!proto.api.MeasurementKind} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {!proto.api.MeasurementKind} value */
proto.api.Measurement.prototype.setKind = function(value) {
jspb.Message.setField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
@ -3244,4 +3456,15 @@ proto.api.CodecRuntime = {
JS: 2
};
/**
* @enum {number}
*/
proto.api.MeasurementKind = {
UNKNOWN: 0,
COUNTER: 1,
ABSOLUTE: 2,
GAUGE: 3,
STRING: 4
};
goog.object.extend(exports, proto.api);

View File

@ -88,6 +88,8 @@ export class DeviceProfileTemplate extends jspb.Message {
getTagsMap(): jspb.Map<string, string>;
clearTagsMap(): void;
getMeasurementsMap(): jspb.Map<string, api_device_profile_pb.Measurement>;
clearMeasurementsMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): DeviceProfileTemplate.AsObject;
static toObject(includeInstance: boolean, msg: DeviceProfileTemplate): DeviceProfileTemplate.AsObject;
@ -127,6 +129,7 @@ export namespace DeviceProfileTemplate {
abpRx2Dr: number,
abpRx2Freq: number,
tagsMap: Array<[string, string]>,
measurementsMap: Array<[string, api_device_profile_pb.Measurement.AsObject]>,
}
}

View File

@ -94,7 +94,8 @@ proto.api.DeviceProfileTemplate.toObject = function(includeInstance, msg) {
abpRx1DrOffset: msg.getAbpRx1DrOffset(),
abpRx2Dr: msg.getAbpRx2Dr(),
abpRx2Freq: msg.getAbpRx2Freq(),
tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : []
tagsMap: (f = msg.getTagsMap(true)) ? f.toArray() : [],
measurementsMap: (f = msg.getMeasurementsMap(true)) ? f.toArray() : []
};
if (includeInstance) {
@ -241,6 +242,12 @@ proto.api.DeviceProfileTemplate.deserializeBinaryFromReader = function(msg, read
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString);
});
break;
case 28:
var value = msg.getMeasurementsMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.api.Measurement.deserializeBinaryFromReader);
});
break;
default:
reader.skipField();
break;
@ -465,6 +472,10 @@ proto.api.DeviceProfileTemplate.prototype.serializeBinaryToWriter = function (wr
if (f && f.getLength() > 0) {
f.serializeBinary(27, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
f = this.getMeasurementsMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(28, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.api.Measurement.serializeBinaryToWriter);
}
};
@ -888,6 +899,19 @@ proto.api.DeviceProfileTemplate.prototype.getTagsMap = function(opt_noLazyCreate
};
/**
* map<string, Measurement> measurements = 28;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.api.Measurement>}
*/
proto.api.DeviceProfileTemplate.prototype.getMeasurementsMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.api.Measurement>} */ (
jspb.Message.getMapField(this, 28, opt_noLazyCreate,
proto.api.Measurement));
};
/**
* Generated by JsPbCodeGenerator.

View File

@ -14,7 +14,7 @@ interface IGatewayServiceService extends grpc.ServiceDefinition<grpc.UntypedServ
delete: grpc.MethodDefinition<api_gateway_pb.DeleteGatewayRequest, google_protobuf_empty_pb.Empty>;
list: grpc.MethodDefinition<api_gateway_pb.ListGatewaysRequest, api_gateway_pb.ListGatewaysResponse>;
generateClientCertificate: grpc.MethodDefinition<api_gateway_pb.GenerateGatewayClientCertificateRequest, api_gateway_pb.GenerateGatewayClientCertificateResponse>;
getStats: grpc.MethodDefinition<api_gateway_pb.GetGatewayStatsRequest, api_gateway_pb.GetGatewayStatsResponse>;
getMetrics: grpc.MethodDefinition<api_gateway_pb.GetGatewayMetricsRequest, api_gateway_pb.GetGatewayMetricsResponse>;
}
export const GatewayServiceService: IGatewayServiceService;
@ -26,7 +26,7 @@ export interface IGatewayServiceServer extends grpc.UntypedServiceImplementation
delete: grpc.handleUnaryCall<api_gateway_pb.DeleteGatewayRequest, google_protobuf_empty_pb.Empty>;
list: grpc.handleUnaryCall<api_gateway_pb.ListGatewaysRequest, api_gateway_pb.ListGatewaysResponse>;
generateClientCertificate: grpc.handleUnaryCall<api_gateway_pb.GenerateGatewayClientCertificateRequest, api_gateway_pb.GenerateGatewayClientCertificateResponse>;
getStats: grpc.handleUnaryCall<api_gateway_pb.GetGatewayStatsRequest, api_gateway_pb.GetGatewayStatsResponse>;
getMetrics: grpc.handleUnaryCall<api_gateway_pb.GetGatewayMetricsRequest, api_gateway_pb.GetGatewayMetricsResponse>;
}
export class GatewayServiceClient extends grpc.Client {
@ -49,7 +49,7 @@ export class GatewayServiceClient extends grpc.Client {
generateClientCertificate(argument: api_gateway_pb.GenerateGatewayClientCertificateRequest, callback: grpc.requestCallback<api_gateway_pb.GenerateGatewayClientCertificateResponse>): grpc.ClientUnaryCall;
generateClientCertificate(argument: api_gateway_pb.GenerateGatewayClientCertificateRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GenerateGatewayClientCertificateResponse>): grpc.ClientUnaryCall;
generateClientCertificate(argument: api_gateway_pb.GenerateGatewayClientCertificateRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GenerateGatewayClientCertificateResponse>): grpc.ClientUnaryCall;
getStats(argument: api_gateway_pb.GetGatewayStatsRequest, callback: grpc.requestCallback<api_gateway_pb.GetGatewayStatsResponse>): grpc.ClientUnaryCall;
getStats(argument: api_gateway_pb.GetGatewayStatsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GetGatewayStatsResponse>): grpc.ClientUnaryCall;
getStats(argument: api_gateway_pb.GetGatewayStatsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GetGatewayStatsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_gateway_pb.GetGatewayMetricsRequest, callback: grpc.requestCallback<api_gateway_pb.GetGatewayMetricsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_gateway_pb.GetGatewayMetricsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GetGatewayMetricsResponse>): grpc.ClientUnaryCall;
getMetrics(argument: api_gateway_pb.GetGatewayMetricsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_gateway_pb.GetGatewayMetricsResponse>): grpc.ClientUnaryCall;
}

View File

@ -51,6 +51,28 @@ function deserialize_api_GenerateGatewayClientCertificateResponse(buffer_arg) {
return api_gateway_pb.GenerateGatewayClientCertificateResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetGatewayMetricsRequest(arg) {
if (!(arg instanceof api_gateway_pb.GetGatewayMetricsRequest)) {
throw new Error('Expected argument of type api.GetGatewayMetricsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetGatewayMetricsRequest(buffer_arg) {
return api_gateway_pb.GetGatewayMetricsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetGatewayMetricsResponse(arg) {
if (!(arg instanceof api_gateway_pb.GetGatewayMetricsResponse)) {
throw new Error('Expected argument of type api.GetGatewayMetricsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetGatewayMetricsResponse(buffer_arg) {
return api_gateway_pb.GetGatewayMetricsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetGatewayRequest(arg) {
if (!(arg instanceof api_gateway_pb.GetGatewayRequest)) {
throw new Error('Expected argument of type api.GetGatewayRequest');
@ -73,28 +95,6 @@ function deserialize_api_GetGatewayResponse(buffer_arg) {
return api_gateway_pb.GetGatewayResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetGatewayStatsRequest(arg) {
if (!(arg instanceof api_gateway_pb.GetGatewayStatsRequest)) {
throw new Error('Expected argument of type api.GetGatewayStatsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetGatewayStatsRequest(buffer_arg) {
return api_gateway_pb.GetGatewayStatsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_GetGatewayStatsResponse(arg) {
if (!(arg instanceof api_gateway_pb.GetGatewayStatsResponse)) {
throw new Error('Expected argument of type api.GetGatewayStatsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_api_GetGatewayStatsResponse(buffer_arg) {
return api_gateway_pb.GetGatewayStatsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_api_ListGatewaysRequest(arg) {
if (!(arg instanceof api_gateway_pb.ListGatewaysRequest)) {
throw new Error('Expected argument of type api.ListGatewaysRequest');
@ -214,17 +214,17 @@ generateClientCertificate: {
responseSerialize: serialize_api_GenerateGatewayClientCertificateResponse,
responseDeserialize: deserialize_api_GenerateGatewayClientCertificateResponse,
},
// GetStats returns the gateway stats.
getStats: {
path: '/api.GatewayService/GetStats',
// GetMetrics returns the gateway metrics.
getMetrics: {
path: '/api.GatewayService/GetMetrics',
requestStream: false,
responseStream: false,
requestType: api_gateway_pb.GetGatewayStatsRequest,
responseType: api_gateway_pb.GetGatewayStatsResponse,
requestSerialize: serialize_api_GetGatewayStatsRequest,
requestDeserialize: deserialize_api_GetGatewayStatsRequest,
responseSerialize: serialize_api_GetGatewayStatsResponse,
responseDeserialize: deserialize_api_GetGatewayStatsResponse,
requestType: api_gateway_pb.GetGatewayMetricsRequest,
responseType: api_gateway_pb.GetGatewayMetricsResponse,
requestSerialize: serialize_api_GetGatewayMetricsRequest,
requestDeserialize: deserialize_api_GetGatewayMetricsRequest,
responseSerialize: serialize_api_GetGatewayMetricsResponse,
responseDeserialize: deserialize_api_GetGatewayMetricsResponse,
},
};

View File

@ -345,7 +345,7 @@ export namespace GenerateGatewayClientCertificateResponse {
}
}
export class GetGatewayStatsRequest extends jspb.Message {
export class GetGatewayMetricsRequest extends jspb.Message {
getGatewayId(): string;
setGatewayId(value: string): void;
@ -359,88 +359,83 @@ export class GetGatewayStatsRequest extends jspb.Message {
getEnd(): google_protobuf_timestamp_pb.Timestamp | undefined;
setEnd(value?: google_protobuf_timestamp_pb.Timestamp): void;
getAggregation(): common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap];
setAggregation(value: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap]): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetGatewayStatsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayStatsRequest): GetGatewayStatsRequest.AsObject;
toObject(includeInstance?: boolean): GetGatewayMetricsRequest.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayMetricsRequest): GetGatewayMetricsRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetGatewayStatsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayStatsRequest;
static deserializeBinaryFromReader(message: GetGatewayStatsRequest, reader: jspb.BinaryReader): GetGatewayStatsRequest;
static serializeBinaryToWriter(message: GetGatewayMetricsRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayMetricsRequest;
static deserializeBinaryFromReader(message: GetGatewayMetricsRequest, reader: jspb.BinaryReader): GetGatewayMetricsRequest;
}
export namespace GetGatewayStatsRequest {
export namespace GetGatewayMetricsRequest {
export type AsObject = {
gatewayId: string,
start?: google_protobuf_timestamp_pb.Timestamp.AsObject,
end?: google_protobuf_timestamp_pb.Timestamp.AsObject,
aggregation: common_common_pb.AggregationMap[keyof common_common_pb.AggregationMap],
}
}
export class GetGatewayStatsResponse extends jspb.Message {
clearResultList(): void;
getResultList(): Array<GatewayStats>;
setResultList(value: Array<GatewayStats>): void;
addResult(value?: GatewayStats, index?: number): GatewayStats;
export class GetGatewayMetricsResponse extends jspb.Message {
hasRxPackets(): boolean;
clearRxPackets(): void;
getRxPackets(): common_common_pb.Metric | undefined;
setRxPackets(value?: common_common_pb.Metric): void;
hasTxPackets(): boolean;
clearTxPackets(): void;
getTxPackets(): common_common_pb.Metric | undefined;
setTxPackets(value?: common_common_pb.Metric): void;
hasTxPacketsPerFreq(): boolean;
clearTxPacketsPerFreq(): void;
getTxPacketsPerFreq(): common_common_pb.Metric | undefined;
setTxPacketsPerFreq(value?: common_common_pb.Metric): void;
hasRxPacketsPerFreq(): boolean;
clearRxPacketsPerFreq(): void;
getRxPacketsPerFreq(): common_common_pb.Metric | undefined;
setRxPacketsPerFreq(value?: common_common_pb.Metric): void;
hasTxPacketsPerDr(): boolean;
clearTxPacketsPerDr(): void;
getTxPacketsPerDr(): common_common_pb.Metric | undefined;
setTxPacketsPerDr(value?: common_common_pb.Metric): void;
hasRxPacketsPerDr(): boolean;
clearRxPacketsPerDr(): void;
getRxPacketsPerDr(): common_common_pb.Metric | undefined;
setRxPacketsPerDr(value?: common_common_pb.Metric): void;
hasTxPacketsPerStatus(): boolean;
clearTxPacketsPerStatus(): void;
getTxPacketsPerStatus(): common_common_pb.Metric | undefined;
setTxPacketsPerStatus(value?: common_common_pb.Metric): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetGatewayStatsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayStatsResponse): GetGatewayStatsResponse.AsObject;
toObject(includeInstance?: boolean): GetGatewayMetricsResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetGatewayMetricsResponse): GetGatewayMetricsResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GetGatewayStatsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayStatsResponse;
static deserializeBinaryFromReader(message: GetGatewayStatsResponse, reader: jspb.BinaryReader): GetGatewayStatsResponse;
static serializeBinaryToWriter(message: GetGatewayMetricsResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GetGatewayMetricsResponse;
static deserializeBinaryFromReader(message: GetGatewayMetricsResponse, reader: jspb.BinaryReader): GetGatewayMetricsResponse;
}
export namespace GetGatewayStatsResponse {
export namespace GetGatewayMetricsResponse {
export type AsObject = {
resultList: Array<GatewayStats.AsObject>,
}
}
export class GatewayStats extends jspb.Message {
hasTime(): boolean;
clearTime(): void;
getTime(): google_protobuf_timestamp_pb.Timestamp | undefined;
setTime(value?: google_protobuf_timestamp_pb.Timestamp): void;
getRxPackets(): number;
setRxPackets(value: number): void;
getTxPackets(): number;
setTxPackets(value: number): void;
getTxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearTxPacketsPerFrequencyMap(): void;
getRxPacketsPerFrequencyMap(): jspb.Map<number, number>;
clearRxPacketsPerFrequencyMap(): void;
getTxPacketsPerDrMap(): jspb.Map<number, number>;
clearTxPacketsPerDrMap(): void;
getRxPacketsPerDrMap(): jspb.Map<number, number>;
clearRxPacketsPerDrMap(): void;
getTxPacketsPerStatusMap(): jspb.Map<string, number>;
clearTxPacketsPerStatusMap(): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GatewayStats.AsObject;
static toObject(includeInstance: boolean, msg: GatewayStats): GatewayStats.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: GatewayStats, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): GatewayStats;
static deserializeBinaryFromReader(message: GatewayStats, reader: jspb.BinaryReader): GatewayStats;
}
export namespace GatewayStats {
export type AsObject = {
time?: google_protobuf_timestamp_pb.Timestamp.AsObject,
rxPackets: number,
txPackets: number,
txPacketsPerFrequencyMap: Array<[number, number]>,
rxPacketsPerFrequencyMap: Array<[number, number]>,
txPacketsPerDrMap: Array<[number, number]>,
rxPacketsPerDrMap: Array<[number, number]>,
txPacketsPerStatusMap: Array<[string, number]>,
rxPackets?: common_common_pb.Metric.AsObject,
txPackets?: common_common_pb.Metric.AsObject,
txPacketsPerFreq?: common_common_pb.Metric.AsObject,
rxPacketsPerFreq?: common_common_pb.Metric.AsObject,
txPacketsPerDr?: common_common_pb.Metric.AsObject,
rxPacketsPerDr?: common_common_pb.Metric.AsObject,
txPacketsPerStatus?: common_common_pb.Metric.AsObject,
}
}

View File

@ -16,13 +16,12 @@ goog.exportSymbol('proto.api.CreateGatewayRequest', null, global);
goog.exportSymbol('proto.api.DeleteGatewayRequest', null, global);
goog.exportSymbol('proto.api.Gateway', null, global);
goog.exportSymbol('proto.api.GatewayListItem', null, global);
goog.exportSymbol('proto.api.GatewayStats', null, global);
goog.exportSymbol('proto.api.GenerateGatewayClientCertificateRequest', null, global);
goog.exportSymbol('proto.api.GenerateGatewayClientCertificateResponse', null, global);
goog.exportSymbol('proto.api.GetGatewayMetricsRequest', null, global);
goog.exportSymbol('proto.api.GetGatewayMetricsResponse', null, global);
goog.exportSymbol('proto.api.GetGatewayRequest', null, global);
goog.exportSymbol('proto.api.GetGatewayResponse', null, global);
goog.exportSymbol('proto.api.GetGatewayStatsRequest', null, global);
goog.exportSymbol('proto.api.GetGatewayStatsResponse', null, global);
goog.exportSymbol('proto.api.ListGatewaysRequest', null, global);
goog.exportSymbol('proto.api.ListGatewaysResponse', null, global);
goog.exportSymbol('proto.api.UpdateGatewayRequest', null, global);
@ -2648,12 +2647,12 @@ proto.api.GenerateGatewayClientCertificateResponse.prototype.hasExpiresAt = func
* @extends {jspb.Message}
* @constructor
*/
proto.api.GetGatewayStatsRequest = function(opt_data) {
proto.api.GetGatewayMetricsRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.GetGatewayStatsRequest, jspb.Message);
goog.inherits(proto.api.GetGatewayMetricsRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.api.GetGatewayStatsRequest.displayName = 'proto.api.GetGatewayStatsRequest';
proto.api.GetGatewayMetricsRequest.displayName = 'proto.api.GetGatewayMetricsRequest';
}
@ -2668,8 +2667,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.GetGatewayStatsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.api.GetGatewayStatsRequest.toObject(opt_includeInstance, this);
proto.api.GetGatewayMetricsRequest.prototype.toObject = function(opt_includeInstance) {
return proto.api.GetGatewayMetricsRequest.toObject(opt_includeInstance, this);
};
@ -2678,14 +2677,15 @@ proto.api.GetGatewayStatsRequest.prototype.toObject = function(opt_includeInstan
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.GetGatewayStatsRequest} msg The msg instance to transform.
* @param {!proto.api.GetGatewayMetricsRequest} msg The msg instance to transform.
* @return {!Object}
*/
proto.api.GetGatewayStatsRequest.toObject = function(includeInstance, msg) {
proto.api.GetGatewayMetricsRequest.toObject = function(includeInstance, msg) {
var f, obj = {
gatewayId: msg.getGatewayId(),
start: (f = msg.getStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
aggregation: msg.getAggregation()
};
if (includeInstance) {
@ -2699,23 +2699,23 @@ proto.api.GetGatewayStatsRequest.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.api.GetGatewayStatsRequest}
* @return {!proto.api.GetGatewayMetricsRequest}
*/
proto.api.GetGatewayStatsRequest.deserializeBinary = function(bytes) {
proto.api.GetGatewayMetricsRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.GetGatewayStatsRequest;
return proto.api.GetGatewayStatsRequest.deserializeBinaryFromReader(msg, reader);
var msg = new proto.api.GetGatewayMetricsRequest;
return proto.api.GetGatewayMetricsRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.GetGatewayStatsRequest} msg The message object to deserialize into.
* @param {!proto.api.GetGatewayMetricsRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.GetGatewayStatsRequest}
* @return {!proto.api.GetGatewayMetricsRequest}
*/
proto.api.GetGatewayStatsRequest.deserializeBinaryFromReader = function(msg, reader) {
proto.api.GetGatewayMetricsRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@ -2736,6 +2736,10 @@ proto.api.GetGatewayStatsRequest.deserializeBinaryFromReader = function(msg, rea
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setEnd(value);
break;
case 4:
var value = /** @type {!proto.common.Aggregation} */ (reader.readEnum());
msg.setAggregation(value);
break;
default:
reader.skipField();
break;
@ -2748,10 +2752,10 @@ proto.api.GetGatewayStatsRequest.deserializeBinaryFromReader = function(msg, rea
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.GetGatewayStatsRequest} message
* @param {!proto.api.GetGatewayMetricsRequest} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GetGatewayStatsRequest.serializeBinaryToWriter = function(message, writer) {
proto.api.GetGatewayMetricsRequest.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
@ -2760,7 +2764,7 @@ proto.api.GetGatewayStatsRequest.serializeBinaryToWriter = function(message, wri
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.GetGatewayStatsRequest.prototype.serializeBinary = function() {
proto.api.GetGatewayMetricsRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
@ -2772,7 +2776,7 @@ proto.api.GetGatewayStatsRequest.prototype.serializeBinary = function() {
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GetGatewayStatsRequest.prototype.serializeBinaryToWriter = function (writer) {
proto.api.GetGatewayMetricsRequest.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getGatewayId();
if (f.length > 0) {
@ -2797,15 +2801,22 @@ proto.api.GetGatewayStatsRequest.prototype.serializeBinaryToWriter = function (w
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getAggregation();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.GetGatewayStatsRequest} The clone.
* @return {!proto.api.GetGatewayMetricsRequest} The clone.
*/
proto.api.GetGatewayStatsRequest.prototype.cloneMessage = function() {
return /** @type {!proto.api.GetGatewayStatsRequest} */ (jspb.Message.cloneMessage(this));
proto.api.GetGatewayMetricsRequest.prototype.cloneMessage = function() {
return /** @type {!proto.api.GetGatewayMetricsRequest} */ (jspb.Message.cloneMessage(this));
};
@ -2813,13 +2824,13 @@ proto.api.GetGatewayStatsRequest.prototype.cloneMessage = function() {
* optional string gateway_id = 1;
* @return {string}
*/
proto.api.GetGatewayStatsRequest.prototype.getGatewayId = function() {
proto.api.GetGatewayMetricsRequest.prototype.getGatewayId = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.api.GetGatewayStatsRequest.prototype.setGatewayId = function(value) {
proto.api.GetGatewayMetricsRequest.prototype.setGatewayId = function(value) {
jspb.Message.setField(this, 1, value);
};
@ -2828,19 +2839,19 @@ proto.api.GetGatewayStatsRequest.prototype.setGatewayId = function(value) {
* optional google.protobuf.Timestamp start = 2;
* @return {proto.google.protobuf.Timestamp}
*/
proto.api.GetGatewayStatsRequest.prototype.getStart = function() {
proto.api.GetGatewayMetricsRequest.prototype.getStart = function() {
return /** @type{proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/** @param {proto.google.protobuf.Timestamp|undefined} value */
proto.api.GetGatewayStatsRequest.prototype.setStart = function(value) {
proto.api.GetGatewayMetricsRequest.prototype.setStart = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.api.GetGatewayStatsRequest.prototype.clearStart = function() {
proto.api.GetGatewayMetricsRequest.prototype.clearStart = function() {
this.setStart(undefined);
};
@ -2849,7 +2860,7 @@ proto.api.GetGatewayStatsRequest.prototype.clearStart = function() {
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GetGatewayStatsRequest.prototype.hasStart = function() {
proto.api.GetGatewayMetricsRequest.prototype.hasStart = function() {
return jspb.Message.getField(this, 2) != null;
};
@ -2858,19 +2869,19 @@ proto.api.GetGatewayStatsRequest.prototype.hasStart = function() {
* optional google.protobuf.Timestamp end = 3;
* @return {proto.google.protobuf.Timestamp}
*/
proto.api.GetGatewayStatsRequest.prototype.getEnd = function() {
proto.api.GetGatewayMetricsRequest.prototype.getEnd = function() {
return /** @type{proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
};
/** @param {proto.google.protobuf.Timestamp|undefined} value */
proto.api.GetGatewayStatsRequest.prototype.setEnd = function(value) {
proto.api.GetGatewayMetricsRequest.prototype.setEnd = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.api.GetGatewayStatsRequest.prototype.clearEnd = function() {
proto.api.GetGatewayMetricsRequest.prototype.clearEnd = function() {
this.setEnd(undefined);
};
@ -2879,186 +2890,23 @@ proto.api.GetGatewayStatsRequest.prototype.clearEnd = function() {
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GetGatewayStatsRequest.prototype.hasEnd = function() {
proto.api.GetGatewayMetricsRequest.prototype.hasEnd = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
* optional common.Aggregation aggregation = 4;
* @return {!proto.common.Aggregation}
*/
proto.api.GetGatewayStatsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.api.GetGatewayStatsResponse.repeatedFields_, null);
};
goog.inherits(proto.api.GetGatewayStatsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.api.GetGatewayStatsResponse.displayName = 'proto.api.GetGatewayStatsResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.api.GetGatewayStatsResponse.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.GetGatewayStatsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.api.GetGatewayStatsResponse.toObject(opt_includeInstance, this);
proto.api.GetGatewayMetricsRequest.prototype.getAggregation = function() {
return /** @type {!proto.common.Aggregation} */ (jspb.Message.getFieldProto3(this, 4, 0));
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.GetGatewayStatsResponse} msg The msg instance to transform.
* @return {!Object}
*/
proto.api.GetGatewayStatsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
resultList: jspb.Message.toObjectList(msg.getResultList(),
proto.api.GatewayStats.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.api.GetGatewayStatsResponse}
*/
proto.api.GetGatewayStatsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.GetGatewayStatsResponse;
return proto.api.GetGatewayStatsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.GetGatewayStatsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.GetGatewayStatsResponse}
*/
proto.api.GetGatewayStatsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.api.GatewayStats;
reader.readMessage(value,proto.api.GatewayStats.deserializeBinaryFromReader);
msg.getResultList().push(value);
msg.setResultList(msg.getResultList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.GetGatewayStatsResponse} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GetGatewayStatsResponse.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.GetGatewayStatsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GetGatewayStatsResponse.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getResultList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.api.GatewayStats.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.GetGatewayStatsResponse} The clone.
*/
proto.api.GetGatewayStatsResponse.prototype.cloneMessage = function() {
return /** @type {!proto.api.GetGatewayStatsResponse} */ (jspb.Message.cloneMessage(this));
};
/**
* repeated GatewayStats result = 1;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.api.GatewayStats>}
*/
proto.api.GetGatewayStatsResponse.prototype.getResultList = function() {
return /** @type{!Array.<!proto.api.GatewayStats>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.api.GatewayStats, 1));
};
/** @param {Array.<!proto.api.GatewayStats>} value */
proto.api.GetGatewayStatsResponse.prototype.setResultList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 1, value);
};
proto.api.GetGatewayStatsResponse.prototype.clearResultList = function() {
this.setResultList([]);
/** @param {!proto.common.Aggregation} value */
proto.api.GetGatewayMetricsRequest.prototype.setAggregation = function(value) {
jspb.Message.setField(this, 4, value);
};
@ -3073,12 +2921,12 @@ proto.api.GetGatewayStatsResponse.prototype.clearResultList = function() {
* @extends {jspb.Message}
* @constructor
*/
proto.api.GatewayStats = function(opt_data) {
proto.api.GetGatewayMetricsResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.api.GatewayStats, jspb.Message);
goog.inherits(proto.api.GetGatewayMetricsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.api.GatewayStats.displayName = 'proto.api.GatewayStats';
proto.api.GetGatewayMetricsResponse.displayName = 'proto.api.GetGatewayMetricsResponse';
}
@ -3093,8 +2941,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.api.GatewayStats.prototype.toObject = function(opt_includeInstance) {
return proto.api.GatewayStats.toObject(opt_includeInstance, this);
proto.api.GetGatewayMetricsResponse.prototype.toObject = function(opt_includeInstance) {
return proto.api.GetGatewayMetricsResponse.toObject(opt_includeInstance, this);
};
@ -3103,19 +2951,18 @@ proto.api.GatewayStats.prototype.toObject = function(opt_includeInstance) {
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.api.GatewayStats} msg The msg instance to transform.
* @param {!proto.api.GetGatewayMetricsResponse} msg The msg instance to transform.
* @return {!Object}
*/
proto.api.GatewayStats.toObject = function(includeInstance, msg) {
proto.api.GetGatewayMetricsResponse.toObject = function(includeInstance, msg) {
var f, obj = {
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
rxPackets: msg.getRxPackets(),
txPackets: msg.getTxPackets(),
txPacketsPerFrequencyMap: (f = msg.getTxPacketsPerFrequencyMap(true)) ? f.toArray() : [],
rxPacketsPerFrequencyMap: (f = msg.getRxPacketsPerFrequencyMap(true)) ? f.toArray() : [],
txPacketsPerDrMap: (f = msg.getTxPacketsPerDrMap(true)) ? f.toArray() : [],
rxPacketsPerDrMap: (f = msg.getRxPacketsPerDrMap(true)) ? f.toArray() : [],
txPacketsPerStatusMap: (f = msg.getTxPacketsPerStatusMap(true)) ? f.toArray() : []
rxPackets: (f = msg.getRxPackets()) && common_common_pb.Metric.toObject(includeInstance, f),
txPackets: (f = msg.getTxPackets()) && common_common_pb.Metric.toObject(includeInstance, f),
txPacketsPerFreq: (f = msg.getTxPacketsPerFreq()) && common_common_pb.Metric.toObject(includeInstance, f),
rxPacketsPerFreq: (f = msg.getRxPacketsPerFreq()) && common_common_pb.Metric.toObject(includeInstance, f),
txPacketsPerDr: (f = msg.getTxPacketsPerDr()) && common_common_pb.Metric.toObject(includeInstance, f),
rxPacketsPerDr: (f = msg.getRxPacketsPerDr()) && common_common_pb.Metric.toObject(includeInstance, f),
txPacketsPerStatus: (f = msg.getTxPacketsPerStatus()) && common_common_pb.Metric.toObject(includeInstance, f)
};
if (includeInstance) {
@ -3129,23 +2976,23 @@ proto.api.GatewayStats.toObject = function(includeInstance, msg) {
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.api.GatewayStats}
* @return {!proto.api.GetGatewayMetricsResponse}
*/
proto.api.GatewayStats.deserializeBinary = function(bytes) {
proto.api.GetGatewayMetricsResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.api.GatewayStats;
return proto.api.GatewayStats.deserializeBinaryFromReader(msg, reader);
var msg = new proto.api.GetGatewayMetricsResponse;
return proto.api.GetGatewayMetricsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.api.GatewayStats} msg The message object to deserialize into.
* @param {!proto.api.GetGatewayMetricsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.api.GatewayStats}
* @return {!proto.api.GetGatewayMetricsResponse}
*/
proto.api.GatewayStats.deserializeBinaryFromReader = function(msg, reader) {
proto.api.GetGatewayMetricsResponse.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
@ -3153,47 +3000,39 @@ proto.api.GatewayStats.deserializeBinaryFromReader = function(msg, reader) {
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTime(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint32());
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setRxPackets(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
case 2:
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setTxPackets(value);
break;
case 3:
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setTxPacketsPerFreq(value);
break;
case 4:
var value = msg.getTxPacketsPerFrequencyMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32);
});
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setRxPacketsPerFreq(value);
break;
case 5:
var value = msg.getRxPacketsPerFrequencyMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32);
});
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setTxPacketsPerDr(value);
break;
case 6:
var value = msg.getTxPacketsPerDrMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32);
});
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setRxPacketsPerDr(value);
break;
case 7:
var value = msg.getRxPacketsPerDrMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32);
});
break;
case 8:
var value = msg.getTxPacketsPerStatusMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readUint32);
});
var value = new common_common_pb.Metric;
reader.readMessage(value,common_common_pb.Metric.deserializeBinaryFromReader);
msg.setTxPacketsPerStatus(value);
break;
default:
reader.skipField();
@ -3207,10 +3046,10 @@ proto.api.GatewayStats.deserializeBinaryFromReader = function(msg, reader) {
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.api.GatewayStats} message
* @param {!proto.api.GetGatewayMetricsResponse} message
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GatewayStats.serializeBinaryToWriter = function(message, writer) {
proto.api.GetGatewayMetricsResponse.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
@ -3219,7 +3058,7 @@ proto.api.GatewayStats.serializeBinaryToWriter = function(message, writer) {
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.api.GatewayStats.prototype.serializeBinary = function() {
proto.api.GetGatewayMetricsResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
@ -3231,80 +3070,94 @@ proto.api.GatewayStats.prototype.serializeBinary = function() {
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.api.GatewayStats.prototype.serializeBinaryToWriter = function (writer) {
proto.api.GetGatewayMetricsResponse.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getTime();
f = this.getRxPackets();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getRxPackets();
if (f !== 0) {
writer.writeUint32(
2,
f
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getTxPackets();
if (f !== 0) {
writer.writeUint32(
3,
f
if (f != null) {
writer.writeMessage(
2,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getTxPacketsPerFrequencyMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32);
f = this.getTxPacketsPerFreq();
if (f != null) {
writer.writeMessage(
3,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getRxPacketsPerFrequencyMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32);
f = this.getRxPacketsPerFreq();
if (f != null) {
writer.writeMessage(
4,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getTxPacketsPerDrMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32);
f = this.getTxPacketsPerDr();
if (f != null) {
writer.writeMessage(
5,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getRxPacketsPerDrMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32);
f = this.getRxPacketsPerDr();
if (f != null) {
writer.writeMessage(
6,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
f = this.getTxPacketsPerStatusMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(8, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeUint32);
f = this.getTxPacketsPerStatus();
if (f != null) {
writer.writeMessage(
7,
f,
common_common_pb.Metric.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.api.GatewayStats} The clone.
* @return {!proto.api.GetGatewayMetricsResponse} The clone.
*/
proto.api.GatewayStats.prototype.cloneMessage = function() {
return /** @type {!proto.api.GatewayStats} */ (jspb.Message.cloneMessage(this));
proto.api.GetGatewayMetricsResponse.prototype.cloneMessage = function() {
return /** @type {!proto.api.GetGatewayMetricsResponse} */ (jspb.Message.cloneMessage(this));
};
/**
* optional google.protobuf.Timestamp time = 1;
* @return {proto.google.protobuf.Timestamp}
* optional common.Metric rx_packets = 1;
* @return {proto.common.Metric}
*/
proto.api.GatewayStats.prototype.getTime = function() {
return /** @type{proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
proto.api.GetGatewayMetricsResponse.prototype.getRxPackets = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 1));
};
/** @param {proto.google.protobuf.Timestamp|undefined} value */
proto.api.GatewayStats.prototype.setTime = function(value) {
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setRxPackets = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.api.GatewayStats.prototype.clearTime = function() {
this.setTime(undefined);
proto.api.GetGatewayMetricsResponse.prototype.clearRxPackets = function() {
this.setRxPackets(undefined);
};
@ -3312,103 +3165,188 @@ proto.api.GatewayStats.prototype.clearTime = function() {
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GatewayStats.prototype.hasTime = function() {
proto.api.GetGatewayMetricsResponse.prototype.hasRxPackets = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional uint32 rx_packets = 2;
* @return {number}
* optional common.Metric tx_packets = 2;
* @return {proto.common.Metric}
*/
proto.api.GatewayStats.prototype.getRxPackets = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0));
proto.api.GetGatewayMetricsResponse.prototype.getTxPackets = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 2));
};
/** @param {number} value */
proto.api.GatewayStats.prototype.setRxPackets = function(value) {
jspb.Message.setField(this, 2, value);
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setTxPackets = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearTxPackets = function() {
this.setTxPackets(undefined);
};
/**
* optional uint32 tx_packets = 3;
* @return {number}
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GatewayStats.prototype.getTxPackets = function() {
return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
};
/** @param {number} value */
proto.api.GatewayStats.prototype.setTxPackets = function(value) {
jspb.Message.setField(this, 3, value);
proto.api.GetGatewayMetricsResponse.prototype.hasTxPackets = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* map<uint32, uint32> tx_packets_per_frequency = 4;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,number>}
* optional common.Metric tx_packets_per_freq = 3;
* @return {proto.common.Metric}
*/
proto.api.GatewayStats.prototype.getTxPacketsPerFrequencyMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,number>} */ (
jspb.Message.getMapField(this, 4, opt_noLazyCreate,
null));
proto.api.GetGatewayMetricsResponse.prototype.getTxPacketsPerFreq = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 3));
};
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setTxPacketsPerFreq = function(value) {
jspb.Message.setWrapperField(this, 3, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearTxPacketsPerFreq = function() {
this.setTxPacketsPerFreq(undefined);
};
/**
* map<uint32, uint32> rx_packets_per_frequency = 5;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,number>}
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GatewayStats.prototype.getRxPacketsPerFrequencyMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,number>} */ (
jspb.Message.getMapField(this, 5, opt_noLazyCreate,
null));
proto.api.GetGatewayMetricsResponse.prototype.hasTxPacketsPerFreq = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* map<uint32, uint32> tx_packets_per_dr = 6;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,number>}
* optional common.Metric rx_packets_per_freq = 4;
* @return {proto.common.Metric}
*/
proto.api.GatewayStats.prototype.getTxPacketsPerDrMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,number>} */ (
jspb.Message.getMapField(this, 6, opt_noLazyCreate,
null));
proto.api.GetGatewayMetricsResponse.prototype.getRxPacketsPerFreq = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 4));
};
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setRxPacketsPerFreq = function(value) {
jspb.Message.setWrapperField(this, 4, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearRxPacketsPerFreq = function() {
this.setRxPacketsPerFreq(undefined);
};
/**
* map<uint32, uint32> rx_packets_per_dr = 7;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<number,number>}
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GatewayStats.prototype.getRxPacketsPerDrMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<number,number>} */ (
jspb.Message.getMapField(this, 7, opt_noLazyCreate,
null));
proto.api.GetGatewayMetricsResponse.prototype.hasRxPacketsPerFreq = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* map<string, uint32> tx_packets_per_status = 8;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,number>}
* optional common.Metric tx_packets_per_dr = 5;
* @return {proto.common.Metric}
*/
proto.api.GatewayStats.prototype.getTxPacketsPerStatusMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,number>} */ (
jspb.Message.getMapField(this, 8, opt_noLazyCreate,
null));
proto.api.GetGatewayMetricsResponse.prototype.getTxPacketsPerDr = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 5));
};
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setTxPacketsPerDr = function(value) {
jspb.Message.setWrapperField(this, 5, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearTxPacketsPerDr = function() {
this.setTxPacketsPerDr(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GetGatewayMetricsResponse.prototype.hasTxPacketsPerDr = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional common.Metric rx_packets_per_dr = 6;
* @return {proto.common.Metric}
*/
proto.api.GetGatewayMetricsResponse.prototype.getRxPacketsPerDr = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 6));
};
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setRxPacketsPerDr = function(value) {
jspb.Message.setWrapperField(this, 6, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearRxPacketsPerDr = function() {
this.setRxPacketsPerDr(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GetGatewayMetricsResponse.prototype.hasRxPacketsPerDr = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional common.Metric tx_packets_per_status = 7;
* @return {proto.common.Metric}
*/
proto.api.GetGatewayMetricsResponse.prototype.getTxPacketsPerStatus = function() {
return /** @type{proto.common.Metric} */ (
jspb.Message.getWrapperField(this, common_common_pb.Metric, 7));
};
/** @param {proto.common.Metric|undefined} value */
proto.api.GetGatewayMetricsResponse.prototype.setTxPacketsPerStatus = function(value) {
jspb.Message.setWrapperField(this, 7, value);
};
proto.api.GetGatewayMetricsResponse.prototype.clearTxPacketsPerStatus = function() {
this.setTxPacketsPerStatus(undefined);
};
/**
* Returns whether this field is set.
* @return{!boolean}
*/
proto.api.GetGatewayMetricsResponse.prototype.hasTxPacketsPerStatus = function() {
return jspb.Message.getField(this, 7) != null;
};

View File

@ -2,6 +2,7 @@
// file: common/common.proto
import * as jspb from "google-protobuf";
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
export class Location extends jspb.Message {
getLatitude(): number;
@ -65,6 +66,64 @@ export namespace KeyEnvelope {
}
}
export class Metric extends jspb.Message {
getName(): string;
setName(value: string): void;
clearTimestampsList(): void;
getTimestampsList(): Array<google_protobuf_timestamp_pb.Timestamp>;
setTimestampsList(value: Array<google_protobuf_timestamp_pb.Timestamp>): void;
addTimestamps(value?: google_protobuf_timestamp_pb.Timestamp, index?: number): google_protobuf_timestamp_pb.Timestamp;
clearDatasetsList(): void;
getDatasetsList(): Array<MetricDataset>;
setDatasetsList(value: Array<MetricDataset>): void;
addDatasets(value?: MetricDataset, index?: number): MetricDataset;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Metric.AsObject;
static toObject(includeInstance: boolean, msg: Metric): Metric.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: Metric, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Metric;
static deserializeBinaryFromReader(message: Metric, reader: jspb.BinaryReader): Metric;
}
export namespace Metric {
export type AsObject = {
name: string,
timestampsList: Array<google_protobuf_timestamp_pb.Timestamp.AsObject>,
datasetsList: Array<MetricDataset.AsObject>,
}
}
export class MetricDataset extends jspb.Message {
getLabel(): string;
setLabel(value: string): void;
clearDataList(): void;
getDataList(): Array<number>;
setDataList(value: Array<number>): void;
addData(value: number, index?: number): number;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MetricDataset.AsObject;
static toObject(includeInstance: boolean, msg: MetricDataset): MetricDataset.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: MetricDataset, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): MetricDataset;
static deserializeBinaryFromReader(message: MetricDataset, reader: jspb.BinaryReader): MetricDataset;
}
export namespace MetricDataset {
export type AsObject = {
label: string,
dataList: Array<number>,
}
}
export interface ModulationMap {
LORA: 0;
FSK: 1;
@ -139,3 +198,11 @@ export interface LocationSourceMap {
export const LocationSource: LocationSourceMap;
export interface AggregationMap {
HOUR: 0;
DAY: 1;
MONTH: 2;
}
export const Aggregation: AggregationMap;

View File

@ -9,11 +9,15 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.exportSymbol('proto.common.Aggregation', null, global);
goog.exportSymbol('proto.common.KeyEnvelope', null, global);
goog.exportSymbol('proto.common.Location', null, global);
goog.exportSymbol('proto.common.LocationSource', null, global);
goog.exportSymbol('proto.common.MType', null, global);
goog.exportSymbol('proto.common.MacVersion', null, global);
goog.exportSymbol('proto.common.Metric', null, global);
goog.exportSymbol('proto.common.MetricDataset', null, global);
goog.exportSymbol('proto.common.Modulation', null, global);
goog.exportSymbol('proto.common.RegParamsRevision', null, global);
goog.exportSymbol('proto.common.Region', null, global);
@ -494,6 +498,450 @@ proto.common.KeyEnvelope.prototype.setAesKey = function(value) {
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.common.Metric = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.Metric.repeatedFields_, null);
};
goog.inherits(proto.common.Metric, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.common.Metric.displayName = 'proto.common.Metric';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.common.Metric.repeatedFields_ = [2,3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.Metric.prototype.toObject = function(opt_includeInstance) {
return proto.common.Metric.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.Metric} msg The msg instance to transform.
* @return {!Object}
*/
proto.common.Metric.toObject = function(includeInstance, msg) {
var f, obj = {
name: msg.getName(),
timestampsList: jspb.Message.toObjectList(msg.getTimestampsList(),
google_protobuf_timestamp_pb.Timestamp.toObject, includeInstance),
datasetsList: jspb.Message.toObjectList(msg.getDatasetsList(),
proto.common.MetricDataset.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.common.Metric}
*/
proto.common.Metric.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.common.Metric;
return proto.common.Metric.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.common.Metric} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.common.Metric}
*/
proto.common.Metric.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.getTimestampsList().push(value);
msg.setTimestampsList(msg.getTimestampsList());
break;
case 3:
var value = new proto.common.MetricDataset;
reader.readMessage(value,proto.common.MetricDataset.deserializeBinaryFromReader);
msg.getDatasetsList().push(value);
msg.setDatasetsList(msg.getDatasetsList());
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.Metric} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.Metric.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.Metric.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.common.Metric.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getTimestampsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = this.getDatasetsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.common.MetricDataset.serializeBinaryToWriter
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.Metric} The clone.
*/
proto.common.Metric.prototype.cloneMessage = function() {
return /** @type {!proto.common.Metric} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string name = 1;
* @return {string}
*/
proto.common.Metric.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.common.Metric.prototype.setName = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated google.protobuf.Timestamp timestamps = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.google.protobuf.Timestamp>}
*/
proto.common.Metric.prototype.getTimestampsList = function() {
return /** @type{!Array.<!proto.google.protobuf.Timestamp>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/** @param {Array.<!proto.google.protobuf.Timestamp>} value */
proto.common.Metric.prototype.setTimestampsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
proto.common.Metric.prototype.clearTimestampsList = function() {
this.setTimestampsList([]);
};
/**
* repeated MetricDataset datasets = 3;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<!proto.common.MetricDataset>}
*/
proto.common.Metric.prototype.getDatasetsList = function() {
return /** @type{!Array.<!proto.common.MetricDataset>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.common.MetricDataset, 3));
};
/** @param {Array.<!proto.common.MetricDataset>} value */
proto.common.Metric.prototype.setDatasetsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 3, value);
};
proto.common.Metric.prototype.clearDatasetsList = function() {
this.setDatasetsList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.common.MetricDataset = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.common.MetricDataset.repeatedFields_, null);
};
goog.inherits(proto.common.MetricDataset, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.common.MetricDataset.displayName = 'proto.common.MetricDataset';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.common.MetricDataset.repeatedFields_ = [2];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.common.MetricDataset.prototype.toObject = function(opt_includeInstance) {
return proto.common.MetricDataset.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.common.MetricDataset} msg The msg instance to transform.
* @return {!Object}
*/
proto.common.MetricDataset.toObject = function(includeInstance, msg) {
var f, obj = {
label: msg.getLabel(),
dataList: jspb.Message.getRepeatedFloatingPointField(msg, 2)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.common.MetricDataset}
*/
proto.common.MetricDataset.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.common.MetricDataset;
return proto.common.MetricDataset.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.common.MetricDataset} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.common.MetricDataset}
*/
proto.common.MetricDataset.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setLabel(value);
break;
case 2:
var value = /** @type {!Array.<number>} */ (reader.readPackedFloat());
msg.setDataList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Class method variant: serializes the given message to binary data
* (in protobuf wire format), writing to the given BinaryWriter.
* @param {!proto.common.MetricDataset} message
* @param {!jspb.BinaryWriter} writer
*/
proto.common.MetricDataset.serializeBinaryToWriter = function(message, writer) {
message.serializeBinaryToWriter(writer);
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.common.MetricDataset.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
this.serializeBinaryToWriter(writer);
return writer.getResultBuffer();
};
/**
* Serializes the message to binary data (in protobuf wire format),
* writing to the given BinaryWriter.
* @param {!jspb.BinaryWriter} writer
*/
proto.common.MetricDataset.prototype.serializeBinaryToWriter = function (writer) {
var f = undefined;
f = this.getLabel();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = this.getDataList();
if (f.length > 0) {
writer.writePackedFloat(
2,
f
);
}
};
/**
* Creates a deep clone of this proto. No data is shared with the original.
* @return {!proto.common.MetricDataset} The clone.
*/
proto.common.MetricDataset.prototype.cloneMessage = function() {
return /** @type {!proto.common.MetricDataset} */ (jspb.Message.cloneMessage(this));
};
/**
* optional string label = 1;
* @return {string}
*/
proto.common.MetricDataset.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
};
/** @param {string} value */
proto.common.MetricDataset.prototype.setLabel = function(value) {
jspb.Message.setField(this, 1, value);
};
/**
* repeated float data = 2;
* If you change this array by adding, removing or replacing elements, or if you
* replace the array itself, then you must call the setter to update it.
* @return {!Array.<number>}
*/
proto.common.MetricDataset.prototype.getDataList = function() {
return /** @type {!Array.<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 2));
};
/** @param {Array.<number>} value */
proto.common.MetricDataset.prototype.setDataList = function(value) {
jspb.Message.setField(this, 2, value || []);
};
proto.common.MetricDataset.prototype.clearDataList = function() {
jspb.Message.setField(this, 2, []);
};
/**
* @enum {number}
*/
@ -574,4 +1022,13 @@ proto.common.LocationSource = {
GEO_RESOLVER_WIFI: 6
};
/**
* @enum {number}
*/
proto.common.Aggregation = {
HOUR: 0,
DAY: 1,
MONTH: 2
};
goog.object.extend(exports, proto.common);

View File

@ -7,6 +7,7 @@ option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "DeviceProto";
import "common/common.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/empty.proto";
@ -55,8 +56,13 @@ service DeviceService {
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
rpc GetRandomDevAddr(GetRandomDevAddrRequest) returns (GetRandomDevAddrResponse) {}
// GetStats returns the device stats.
rpc GetStats(GetDeviceStatsRequest) returns (GetDeviceStatsResponse) {}
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
rpc GetMetrics(GetDeviceMetricsRequest) returns (GetDeviceMetricsResponse) {}
// GetLinkMetrics returns the device link metrics.
// This includes uplinks, downlinks, RSSI, SNR, etc...
rpc GetLinkMetrics(GetDeviceLinkMetricsRequest) returns (GetDeviceLinkMetricsResponse) {}
// Enqueue adds the given item to the downlink queue.
rpc Enqueue(EnqueueDeviceQueueItemRequest) returns (EnqueueDeviceQueueItemResponse) {}
@ -309,7 +315,7 @@ message GetRandomDevAddrResponse {
string dev_addr = 1;
}
message GetDeviceStatsRequest {
message GetDeviceMetricsRequest {
// DevEUI (EUI64).
string dev_eui = 1;
@ -318,33 +324,57 @@ message GetDeviceStatsRequest {
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetDeviceStatsResponse {
repeated DeviceStats result = 1;
message GetDeviceMetricsResponse {
map<string, common.Metric> metrics = 1;
map<string, DeviceState> states = 2;
}
message DeviceStats {
// Timestamp of the (aggregated) measurement.
google.protobuf.Timestamp time = 1;
message DeviceState {
// Name.
string name = 2;
// Value.
string value = 3;
}
message GetDeviceLinkMetricsRequest {
// DevEUI (EUI64).
string dev_eui = 1;
// Interval start timestamp.
google.protobuf.Timestamp start = 2;
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetDeviceLinkMetricsResponse {
// Packets received from the device.
uint32 rx_packets = 2;
common.Metric rx_packets = 1;
// Average RSSI (as reported by the gateway(s)).
float gw_rssi = 3;
// RSSI (as reported by the gateway(s)).
common.Metric gw_rssi = 2;
// Average SNR (as reported by the gateway(s)).
float gw_snr = 4;
// SNR (as reported by the gateway(s)).
common.Metric gw_snr = 3;
// Packets received by frequency.
map<uint32, uint32> rx_packets_per_frequency = 5;
common.Metric rx_packets_per_freq = 4;
// Packets received by DR.
map<uint32, uint32> rx_packets_per_dr = 6;
common.Metric rx_packets_per_dr = 5;
// Error count.
map<string, uint32> errors = 7;
// Errors.
common.Metric errors = 6;
}
message DeviceQueueItem {

View File

@ -22,6 +22,23 @@ enum CodecRuntime {
JS = 2;
}
enum MeasurementKind {
// Unknown (in which case it is not tracked).
UNKNOWN = 0;
// Incrementing counters that never decrease (these are not reset on each reading).
COUNTER = 1;
// Counters that do get reset upon reading.
ABSOLUTE = 2;
// E.g. a temperature value.
GAUGE = 3;
// E.g. a firmware version, true / false value.
STRING = 4;
}
// DeviceProfileService is the service providing API methods for managing device-profiles.
service DeviceProfileService {
// Create the given device-profile.
@ -129,6 +146,18 @@ message DeviceProfile {
// User defined tags.
map<string, string> tags = 25;
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
map<string, Measurement> measurements = 27;
}
message Measurement {
// Name (user defined).
string name = 2;
// Kind.
MeasurementKind kind = 3;
}
message DeviceProfileListItem {

View File

@ -118,6 +118,10 @@ message DeviceProfileTemplate {
// User defined tags.
map<string, string> tags = 27;
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
map<string, Measurement> measurements = 28;
}
message DeviceProfileTemplateListItem {

View File

@ -31,8 +31,8 @@ service GatewayService {
// Generate client-certificate for the gateway.
rpc GenerateClientCertificate(GenerateGatewayClientCertificateRequest) returns (GenerateGatewayClientCertificateResponse) {}
// GetStats returns the gateway stats.
rpc GetStats(GetGatewayStatsRequest) returns (GetGatewayStatsResponse) {}
// GetMetrics returns the gateway metrics.
rpc GetMetrics(GetGatewayMetricsRequest) returns (GetGatewayMetricsResponse) {}
}
message Gateway {
@ -163,7 +163,7 @@ message GenerateGatewayClientCertificateResponse {
google.protobuf.Timestamp expires_at = 4;
}
message GetGatewayStatsRequest {
message GetGatewayMetricsRequest {
// Gateway ID (EUI64).
string gateway_id = 1;
@ -172,34 +172,30 @@ message GetGatewayStatsRequest {
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetGatewayStatsResponse {
repeated GatewayStats result = 1;
}
message GatewayStats {
// Timestamp of the (aggregated) measurement.
google.protobuf.Timestamp time = 1;
// Packets received.
uint32 rx_packets = 2;
// Packets emitted.
uint32 tx_packets = 3;
// Tx packets per frequency.
map<uint32, uint32> tx_packets_per_frequency = 4;
// Rx packets per frequency.
map<uint32, uint32> rx_packets_per_frequency = 5;
// Tx packets per DR.
map<uint32, uint32> tx_packets_per_dr = 6;
// Rx packets per DR.
map<uint32, uint32> rx_packets_per_dr = 7;
// Tx packets per status.
map<string, uint32> tx_packets_per_status = 8;
message GetGatewayMetricsResponse {
// RX packets.
common.Metric rx_packets = 1;
// TX packets.
common.Metric tx_packets = 2;
// TX packets / frequency.
common.Metric tx_packets_per_freq = 3;
// RX packets / frequency.
common.Metric rx_packets_per_freq = 4;
// TX packets / DR.
common.Metric tx_packets_per_dr = 5;
// RX packets / DR.
common.Metric rx_packets_per_dr = 6;
// TX packets per status.
common.Metric tx_packets_per_status = 7;
}

View File

@ -7,6 +7,8 @@ option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
import "google/protobuf/timestamp.proto";
enum Modulation {
// LoRa
LORA = 0;
@ -129,6 +131,17 @@ enum LocationSource {
GEO_RESOLVER_WIFI = 6;
}
enum Aggregation {
// Hour.
HOUR = 0;
// Day.
DAY = 1;
// Month.
MONTH = 2;
}
message Location {
// Latitude.
double latitude = 1;
@ -153,3 +166,23 @@ message KeyEnvelope {
// AES key (when the kek_label is set, this value must first be decrypted).
bytes aes_key = 2;
}
message Metric {
// Name.
string name = 1;
// Timestamps.
repeated google.protobuf.Timestamp timestamps = 2;
// Datasets.
repeated MetricDataset datasets = 3;
}
message MetricDataset {
// Label.
string label = 1;
// Data.
// Each value index corresponds with the same timestamp index of the Metric.
repeated float data = 2;
}

2
api/rust/Cargo.lock generated vendored
View File

@ -121,7 +121,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chirpstack_api"
version = "4.0.0-test.5"
version = "4.0.0-test.6"
dependencies = [
"hex",
"pbjson",

View File

@ -7,6 +7,7 @@ option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "DeviceProto";
import "common/common.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/empty.proto";
@ -55,8 +56,13 @@ service DeviceService {
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
rpc GetRandomDevAddr(GetRandomDevAddrRequest) returns (GetRandomDevAddrResponse) {}
// GetStats returns the device stats.
rpc GetStats(GetDeviceStatsRequest) returns (GetDeviceStatsResponse) {}
// GetMetrics returns the device metrics.
// Note that this requires a device-profile with codec and measurements configured.
rpc GetMetrics(GetDeviceMetricsRequest) returns (GetDeviceMetricsResponse) {}
// GetLinkMetrics returns the device link metrics.
// This includes uplinks, downlinks, RSSI, SNR, etc...
rpc GetLinkMetrics(GetDeviceLinkMetricsRequest) returns (GetDeviceLinkMetricsResponse) {}
// Enqueue adds the given item to the downlink queue.
rpc Enqueue(EnqueueDeviceQueueItemRequest) returns (EnqueueDeviceQueueItemResponse) {}
@ -309,7 +315,7 @@ message GetRandomDevAddrResponse {
string dev_addr = 1;
}
message GetDeviceStatsRequest {
message GetDeviceMetricsRequest {
// DevEUI (EUI64).
string dev_eui = 1;
@ -318,33 +324,57 @@ message GetDeviceStatsRequest {
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetDeviceStatsResponse {
repeated DeviceStats result = 1;
message GetDeviceMetricsResponse {
map<string, common.Metric> metrics = 1;
map<string, DeviceState> states = 2;
}
message DeviceStats {
// Timestamp of the (aggregated) measurement.
google.protobuf.Timestamp time = 1;
message DeviceState {
// Name.
string name = 2;
// Value.
string value = 3;
}
message GetDeviceLinkMetricsRequest {
// DevEUI (EUI64).
string dev_eui = 1;
// Interval start timestamp.
google.protobuf.Timestamp start = 2;
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetDeviceLinkMetricsResponse {
// Packets received from the device.
uint32 rx_packets = 2;
common.Metric rx_packets = 1;
// Average RSSI (as reported by the gateway(s)).
float gw_rssi = 3;
// RSSI (as reported by the gateway(s)).
common.Metric gw_rssi = 2;
// Average SNR (as reported by the gateway(s)).
float gw_snr = 4;
// SNR (as reported by the gateway(s)).
common.Metric gw_snr = 3;
// Packets received by frequency.
map<uint32, uint32> rx_packets_per_frequency = 5;
common.Metric rx_packets_per_freq = 4;
// Packets received by DR.
map<uint32, uint32> rx_packets_per_dr = 6;
common.Metric rx_packets_per_dr = 5;
// Error count.
map<string, uint32> errors = 7;
// Errors.
common.Metric errors = 6;
}
message DeviceQueueItem {

View File

@ -22,6 +22,23 @@ enum CodecRuntime {
JS = 2;
}
enum MeasurementKind {
// Unknown (in which case it is not tracked).
UNKNOWN = 0;
// Incrementing counters that never decrease (these are not reset on each reading).
COUNTER = 1;
// Counters that do get reset upon reading.
ABSOLUTE = 2;
// E.g. a temperature value.
GAUGE = 3;
// E.g. a firmware version, true / false value.
STRING = 4;
}
// DeviceProfileService is the service providing API methods for managing device-profiles.
service DeviceProfileService {
// Create the given device-profile.
@ -129,6 +146,18 @@ message DeviceProfile {
// User defined tags.
map<string, string> tags = 25;
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
map<string, Measurement> measurements = 27;
}
message Measurement {
// Name (user defined).
string name = 2;
// Kind.
MeasurementKind kind = 3;
}
message DeviceProfileListItem {

View File

@ -118,6 +118,10 @@ message DeviceProfileTemplate {
// User defined tags.
map<string, string> tags = 27;
// Measurements.
// If defined, ChirpStack will visualize these metrics in the web-interface.
map<string, Measurement> measurements = 28;
}
message DeviceProfileTemplateListItem {

View File

@ -31,8 +31,8 @@ service GatewayService {
// Generate client-certificate for the gateway.
rpc GenerateClientCertificate(GenerateGatewayClientCertificateRequest) returns (GenerateGatewayClientCertificateResponse) {}
// GetStats returns the gateway stats.
rpc GetStats(GetGatewayStatsRequest) returns (GetGatewayStatsResponse) {}
// GetMetrics returns the gateway metrics.
rpc GetMetrics(GetGatewayMetricsRequest) returns (GetGatewayMetricsResponse) {}
}
message Gateway {
@ -163,7 +163,7 @@ message GenerateGatewayClientCertificateResponse {
google.protobuf.Timestamp expires_at = 4;
}
message GetGatewayStatsRequest {
message GetGatewayMetricsRequest {
// Gateway ID (EUI64).
string gateway_id = 1;
@ -172,34 +172,30 @@ message GetGatewayStatsRequest {
// Interval end timestamp.
google.protobuf.Timestamp end = 3;
// Aggregation.
common.Aggregation aggregation = 4;
}
message GetGatewayStatsResponse {
repeated GatewayStats result = 1;
}
message GatewayStats {
// Timestamp of the (aggregated) measurement.
google.protobuf.Timestamp time = 1;
// Packets received.
uint32 rx_packets = 2;
// Packets emitted.
uint32 tx_packets = 3;
// Tx packets per frequency.
map<uint32, uint32> tx_packets_per_frequency = 4;
// Rx packets per frequency.
map<uint32, uint32> rx_packets_per_frequency = 5;
// Tx packets per DR.
map<uint32, uint32> tx_packets_per_dr = 6;
// Rx packets per DR.
map<uint32, uint32> rx_packets_per_dr = 7;
// Tx packets per status.
map<string, uint32> tx_packets_per_status = 8;
message GetGatewayMetricsResponse {
// RX packets.
common.Metric rx_packets = 1;
// TX packets.
common.Metric tx_packets = 2;
// TX packets / frequency.
common.Metric tx_packets_per_freq = 3;
// RX packets / frequency.
common.Metric rx_packets_per_freq = 4;
// TX packets / DR.
common.Metric tx_packets_per_dr = 5;
// RX packets / DR.
common.Metric rx_packets_per_dr = 6;
// TX packets per status.
common.Metric tx_packets_per_status = 7;
}

View File

@ -7,6 +7,8 @@ option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "CommonProto";
import "google/protobuf/timestamp.proto";
enum Modulation {
// LoRa
LORA = 0;
@ -129,6 +131,17 @@ enum LocationSource {
GEO_RESOLVER_WIFI = 6;
}
enum Aggregation {
// Hour.
HOUR = 0;
// Day.
DAY = 1;
// Month.
MONTH = 2;
}
message Location {
// Latitude.
double latitude = 1;
@ -153,3 +166,23 @@ message KeyEnvelope {
// AES key (when the kek_label is set, this value must first be decrypted).
bytes aes_key = 2;
}
message Metric {
// Name.
string name = 1;
// Timestamps.
repeated google.protobuf.Timestamp timestamps = 2;
// Datasets.
repeated MetricDataset datasets = 3;
}
message MetricDataset {
// Label.
string label = 1;
// Data.
// Each value index corresponds with the same timestamp index of the Metric.
repeated float data = 2;
}

View File

@ -0,0 +1,5 @@
alter table device_profile
drop column measurements;
alter table device_profile_template
drop column measurements;

View File

@ -0,0 +1,11 @@
alter table device_profile
add column measurements jsonb not null default '{}';
alter table device_profile_template
add column measurements jsonb not null default '{}';
alter table device_profile
alter column measurements drop default;
alter table device_profile_template
alter column measurements drop default;

View File

@ -1,8 +1,9 @@
use std::collections::HashSet;
use std::str::FromStr;
use std::time::SystemTime;
use bigdecimal::ToPrimitive;
use chrono::{DateTime, Local};
use chrono::{DateTime, Local, Utc};
use rand::RngCore;
use tonic::{Request, Response, Status};
use uuid::Uuid;
@ -13,7 +14,7 @@ use lrwn::{AES128Key, DevAddr, EUI64};
use super::auth::validator;
use super::error::ToStatus;
use super::helpers::{self, ToProto};
use super::helpers::{self, FromProto, ToProto};
use crate::storage::error::Error;
use crate::storage::{
device, device_keys, device_profile, device_queue, device_session, fields, metrics,
@ -563,10 +564,10 @@ impl DeviceService for Device {
}))
}
async fn get_stats(
async fn get_metrics(
&self,
request: Request<api::GetDeviceStatsRequest>,
) -> Result<Response<api::GetDeviceStatsResponse>, Status> {
request: Request<api::GetDeviceMetricsRequest>,
) -> Result<Response<api::GetDeviceMetricsResponse>, Status> {
let req = request.get_ref();
let dev_eui = EUI64::from_str(&req.dev_eui).map_err(|e| e.status())?;
@ -597,62 +598,313 @@ impl DeviceService for Device {
let start: DateTime<Local> = start.into();
let end: DateTime<Local> = end.into();
let aggregation = req.aggregation().from_proto();
let dev = device::get(&dev_eui).await.map_err(|e| e.status())?;
let dp = device_profile::get(&dev.device_profile_id)
.await
.map_err(|e| e.status())?;
let mut out = api::GetDeviceMetricsResponse {
..Default::default()
};
for (k, v) in dp.measurements.iter() {
match v.kind {
fields::MeasurementKind::UNKNOWN => {
continue;
}
fields::MeasurementKind::STRING => {
out.states.insert(
k.to_string(),
api::DeviceState {
name: v.name.to_string(),
value: metrics::get_state(&format!("device:{}:{}", dev.dev_eui, k))
.await
.map_err(|e| e.status())?,
},
);
}
fields::MeasurementKind::COUNTER
| fields::MeasurementKind::ABSOLUTE
| fields::MeasurementKind::GAUGE => {
let m = metrics::get(
&format!("device:{}:{}", dev.dev_eui, k),
match v.kind {
fields::MeasurementKind::COUNTER => metrics::Kind::COUNTER,
fields::MeasurementKind::ABSOLUTE => metrics::Kind::ABSOLUTE,
fields::MeasurementKind::GAUGE => metrics::Kind::GAUGE,
_ => panic!("Unexpected MeasurementKind: {:?}", v.kind),
},
aggregation,
start,
end,
)
.await
.map_err(|e| e.status())?;
out.metrics.insert(
k.to_string(),
common::Metric {
name: v.name.to_string(),
timestamps: m
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: k.to_string(),
data: m
.iter()
.map(|row| {
row.metrics.get("value").cloned().unwrap_or(0.0) as f32
})
.collect(),
}],
},
);
}
}
}
Ok(Response::new(out))
}
async fn get_link_metrics(
&self,
request: Request<api::GetDeviceLinkMetricsRequest>,
) -> Result<Response<api::GetDeviceLinkMetricsResponse>, Status> {
let req = request.get_ref();
let dev_eui = EUI64::from_str(&req.dev_eui).map_err(|e| e.status())?;
self.validator
.validate(
request.extensions(),
validator::ValidateDeviceAccess::new(validator::Flag::Read, dev_eui),
)
.await?;
let start = SystemTime::try_from(
req.start
.as_ref()
.ok_or(anyhow!("start is None"))
.map_err(|e| e.status())?
.clone(),
)
.map_err(|e| e.status())?;
let end = SystemTime::try_from(
req.end
.as_ref()
.ok_or(anyhow!("end is None"))
.map_err(|e| e.status())?
.clone(),
)
.map_err(|e| e.status())?;
let start: DateTime<Local> = start.into();
let end: DateTime<Local> = end.into();
let aggregation = req.aggregation().from_proto();
let device_metrics = metrics::get(
&format!("device:{}", dev_eui),
metrics::Aggregation::DAY,
metrics::Kind::ABSOLUTE,
aggregation,
start,
end,
)
.await
.map_err(|e| e.status())?;
let mut out: api::GetDeviceStatsResponse = Default::default();
for m in device_metrics {
let ts: SystemTime = m.time.into();
let ts: prost_types::Timestamp = ts.into();
let mut item = api::DeviceStats {
time: Some(ts),
..Default::default()
};
item.rx_packets = m.metrics.get("rx_count").cloned().unwrap_or(0.0) as u32;
if item.rx_packets > 0 {
let gw_rssi_sum = m.metrics.get("gw_rssi_sum").cloned().unwrap_or(0.0) as f32;
let gw_snr_sum = m.metrics.get("gw_snr_sum").cloned().unwrap_or(0.0) as f32;
item.gw_rssi = gw_rssi_sum / (item.rx_packets as f32);
item.gw_snr = gw_snr_sum / (item.rx_packets as f32);
}
for (k, v) in m.metrics {
if k.starts_with("rx_freq_") {
let freq: u32 = k
.trim_start_matches("rx_freq_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.rx_packets_per_frequency.insert(freq, v as u32);
let out = api::GetDeviceLinkMetricsResponse {
rx_packets: Some(common::Metric {
name: "Received".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: "rx_count".to_string(),
data: device_metrics
.iter()
.map(|row| row.metrics.get("rx_count").cloned().unwrap_or(0.0) as f32)
.collect(),
}],
}),
gw_rssi: Some(common::Metric {
name: "RSSI".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: "rssi".to_string(),
data: device_metrics
.iter()
.map(|row| {
let rx_packets = row.metrics.get("rx_count").cloned().unwrap_or(0.0);
let rssi_sum = row.metrics.get("gw_rssi_sum").cloned().unwrap_or(0.0);
if rx_packets > 0.0 {
(rssi_sum / rx_packets) as f32
} else {
0.0
}
})
.collect(),
}],
}),
gw_snr: Some(common::Metric {
name: "SNR".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: "snr".to_string(),
data: device_metrics
.iter()
.map(|row| {
let rx_packets = row.metrics.get("rx_count").cloned().unwrap_or(0.0);
let rssi_sum = row.metrics.get("gw_snr_sum").cloned().unwrap_or(0.0);
if rx_packets > 0.0 {
(rssi_sum / rx_packets) as f32
} else {
0.0
}
})
.collect(),
}],
}),
rx_packets_per_freq: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &device_metrics {
for k in m.metrics.keys() {
if k.starts_with("rx_freq_") {
datasets.insert(k.trim_start_matches("rx_freq_").to_string());
}
}
}
if k.starts_with("rx_dr_") {
let dr: u32 = k
.trim_start_matches("rx_dr_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.rx_packets_per_dr.insert(dr, v as u32);
common::Metric {
name: "Received / frequency".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: device_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("rx_freq_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
rx_packets_per_dr: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &device_metrics {
for k in m.metrics.keys() {
if k.starts_with("rx_dr_") {
datasets.insert(k.trim_start_matches("rx_dr_").to_string());
}
}
}
if k.starts_with("error_") {
let code = k.trim_start_matches("error_").to_string();
item.errors.insert(code, v as u32);
common::Metric {
name: "Received / DR".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: device_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("rx_dr_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
errors: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &device_metrics {
for k in m.metrics.keys() {
if k.starts_with("error_") {
datasets.insert(k.trim_start_matches("error_").to_string());
}
}
}
}
out.result.push(item);
}
common::Metric {
name: "Errors".to_string(),
timestamps: device_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: device_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("error_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
};
Ok(Response::new(out))
}

View File

@ -70,6 +70,21 @@ impl DeviceProfileService for DeviceProfile {
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
tags: fields::KeyValue::new(req_dp.tags.clone()),
measurements: fields::Measurements::new(
req_dp
.measurements
.iter()
.map(|(k, v)| {
(
k.to_string(),
fields::Measurement {
name: v.name.clone(),
kind: v.kind().from_proto(),
},
)
})
.collect(),
),
..Default::default()
};
@ -124,6 +139,20 @@ impl DeviceProfileService for DeviceProfile {
abp_rx2_dr: dp.abp_rx2_dr as u32,
abp_rx2_freq: dp.abp_rx2_freq as u32,
tags: dp.tags.into_hashmap(),
measurements: dp
.measurements
.into_hashmap()
.iter()
.map(|(k, v)| {
(
k.to_string(),
api::Measurement {
name: v.name.clone(),
kind: v.kind.to_proto().into(),
},
)
})
.collect(),
}),
created_at: Some(helpers::datetime_to_prost_timestamp(&dp.created_at)),
updated_at: Some(helpers::datetime_to_prost_timestamp(&dp.updated_at)),
@ -176,6 +205,21 @@ impl DeviceProfileService for DeviceProfile {
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
tags: fields::KeyValue::new(req_dp.tags.clone()),
measurements: fields::Measurements::new(
req_dp
.measurements
.iter()
.map(|(k, v)| {
(
k.to_string(),
fields::Measurement {
name: v.name.clone(),
kind: v.kind().from_proto(),
},
)
})
.collect(),
),
..Default::default()
})
.await

View File

@ -69,6 +69,21 @@ impl DeviceProfileTemplateService for DeviceProfileTemplate {
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
tags: fields::KeyValue::new(req_dp.tags.clone()),
measurements: fields::Measurements::new(
req_dp
.measurements
.iter()
.map(|(k, v)| {
(
k.to_string(),
fields::Measurement {
name: v.name.clone(),
kind: v.kind().from_proto(),
},
)
})
.collect(),
),
..Default::default()
};
@ -125,6 +140,20 @@ impl DeviceProfileTemplateService for DeviceProfileTemplate {
abp_rx2_dr: dp.abp_rx2_dr as u32,
abp_rx2_freq: dp.abp_rx2_freq as u32,
tags: dp.tags.into_hashmap(),
measurements: dp
.measurements
.into_hashmap()
.iter()
.map(|(k, v)| {
(
k.to_string(),
api::Measurement {
name: v.name.clone(),
kind: v.kind.to_proto().into(),
},
)
})
.collect(),
}),
created_at: Some(helpers::datetime_to_prost_timestamp(&dp.created_at)),
updated_at: Some(helpers::datetime_to_prost_timestamp(&dp.updated_at)),
@ -182,6 +211,21 @@ impl DeviceProfileTemplateService for DeviceProfileTemplate {
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
tags: fields::KeyValue::new(req_dp.tags.clone()),
measurements: fields::Measurements::new(
req_dp
.measurements
.iter()
.map(|(k, v)| {
(
k.to_string(),
fields::Measurement {
name: v.name.clone(),
kind: v.kind().from_proto(),
},
)
})
.collect(),
),
..Default::default()
})
.await

View File

@ -1,7 +1,8 @@
use std::collections::HashSet;
use std::str::FromStr;
use std::time::SystemTime;
use chrono::{DateTime, Local};
use chrono::{DateTime, Local, Utc};
use tonic::{Request, Response, Status};
use uuid::Uuid;
@ -11,7 +12,7 @@ use lrwn::EUI64;
use super::auth::validator;
use super::error::ToStatus;
use super::helpers;
use super::helpers::{self, FromProto};
use crate::certificate;
use crate::storage::{fields, gateway, metrics};
@ -261,10 +262,10 @@ impl GatewayService for Gateway {
))
}
async fn get_stats(
async fn get_metrics(
&self,
request: Request<api::GetGatewayStatsRequest>,
) -> Result<Response<api::GetGatewayStatsResponse>, Status> {
request: Request<api::GetGatewayMetricsRequest>,
) -> Result<Response<api::GetGatewayMetricsResponse>, Status> {
let req = request.get_ref();
let gateway_id = EUI64::from_str(&req.gateway_id).map_err(|e| e.status())?;
@ -295,71 +296,246 @@ impl GatewayService for Gateway {
let start: DateTime<Local> = start.into();
let end: DateTime<Local> = end.into();
let aggregation = req.aggregation().from_proto();
let gw_metrics = metrics::get(
&format!("gw:{}", gateway_id),
metrics::Aggregation::DAY,
metrics::Kind::ABSOLUTE,
aggregation,
start,
end,
)
.await
.map_err(|e| e.status())?;
let mut out: api::GetGatewayStatsResponse = Default::default();
for m in gw_metrics {
let ts: SystemTime = m.time.into();
let ts: prost_types::Timestamp = ts.into();
let mut item = api::GatewayStats {
time: Some(ts),
..Default::default()
};
item.rx_packets = m.metrics.get("rx_count").cloned().unwrap_or(0.0) as u32;
item.tx_packets = m.metrics.get("tx_count").cloned().unwrap_or(0.0) as u32;
for (k, v) in m.metrics {
if k.starts_with("tx_freq_") {
let freq: u32 = k
.trim_start_matches("tx_freq_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.tx_packets_per_frequency.insert(freq, v as u32);
let out = api::GetGatewayMetricsResponse {
rx_packets: Some(common::Metric {
name: "Received".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: "rx_count".to_string(),
data: gw_metrics
.iter()
.map(|row| row.metrics.get("rx_count").cloned().unwrap_or(0.0) as f32)
.collect(),
}],
}),
tx_packets: Some(common::Metric {
name: "Transmitted".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: vec![common::MetricDataset {
label: "tx_count".to_string(),
data: gw_metrics
.iter()
.map(|row| row.metrics.get("tx_count").cloned().unwrap_or(0.0) as f32)
.collect(),
}],
}),
tx_packets_per_freq: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &gw_metrics {
for k in m.metrics.keys() {
if k.starts_with("tx_freq_") {
datasets.insert(k.trim_start_matches("tx_freq_").to_string());
}
}
}
if k.starts_with("rx_freq_") {
let freq: u32 = k
.trim_start_matches("rx_freq_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.rx_packets_per_frequency.insert(freq, v as u32);
common::Metric {
name: "Transmitted / frequency".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: gw_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("tx_freq_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
rx_packets_per_freq: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &gw_metrics {
for k in m.metrics.keys() {
if k.starts_with("rx_freq_") {
datasets.insert(k.trim_start_matches("rx_freq_").to_string());
}
}
}
if k.starts_with("tx_status_") {
let code = k.trim_start_matches("tx_status_").to_string();
item.tx_packets_per_status.insert(code, v as u32);
common::Metric {
name: "Received / frequency".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: gw_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("rx_freq_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
rx_packets_per_dr: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &gw_metrics {
for k in m.metrics.keys() {
if k.starts_with("rx_dr_") {
datasets.insert(k.trim_start_matches("rx_dr_").to_string());
}
}
}
if k.starts_with("tx_dr_") {
let dr: u32 = k
.trim_start_matches("tx_dr_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.tx_packets_per_dr.insert(dr, v as u32);
common::Metric {
name: "Received / DR".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: gw_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("rx_dr_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
tx_packets_per_dr: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &gw_metrics {
for k in m.metrics.keys() {
if k.starts_with("tx_dr_") {
datasets.insert(k.trim_start_matches("tx_dr_").to_string());
}
}
}
if k.starts_with("rx_dr_") {
let dr: u32 = k
.trim_start_matches("rx_dr_")
.parse()
.map_err(|e: std::num::ParseIntError| e.status())?;
item.rx_packets_per_dr.insert(dr, v as u32);
common::Metric {
name: "Transmitted / DR".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: gw_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("tx_dr_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
tx_packets_per_status: Some({
// discover all data-sets
let mut datasets: HashSet<String> = HashSet::new();
for m in &gw_metrics {
for k in m.metrics.keys() {
if k.starts_with("tx_status_") {
datasets.insert(k.trim_start_matches("tx_status_").to_string());
}
}
}
}
out.result.push(item);
}
common::Metric {
name: "TX packets / status".to_string(),
timestamps: gw_metrics
.iter()
.map(|row| {
let ts: DateTime<Utc> = row.time.into();
let ts: pbjson_types::Timestamp = ts.into();
ts
})
.collect(),
datasets: datasets
.iter()
.map(|label| common::MetricDataset {
label: label.to_string(),
data: gw_metrics
.iter()
.map(|row| {
row.metrics
.get(&format!("tx_status_{}", label))
.cloned()
.unwrap_or(0.0) as f32
})
.collect(),
})
.collect(),
}
}),
};
Ok(Response::new(out))
}
@ -558,6 +734,7 @@ pub mod test {
// insert stats
let mut m = metrics::Record {
kind: metrics::Kind::ABSOLUTE,
time: now.into(),
metrics: HashMap::new(),
};
@ -577,36 +754,35 @@ pub mod test {
// request stats
let now_st: SystemTime = now.into();
let stats_req = api::GetGatewayStatsRequest {
let stats_req = api::GetGatewayMetricsRequest {
gateway_id: "0102030405060708".into(),
start: Some(now_st.into()),
end: Some(now_st.into()),
aggregation: common::Aggregation::Day.into(),
};
let mut stats_req = Request::new(stats_req);
stats_req
.extensions_mut()
.insert(AuthID::User(u.id.clone()));
let stats_resp = service.get_stats(stats_req).await.unwrap();
let stats_resp = service.get_metrics(stats_req).await.unwrap();
let stats_resp = stats_resp.get_ref();
assert_eq!(1, stats_resp.result.len());
assert_eq!(
api::GatewayStats {
time: Some({
Some(common::Metric {
name: "Received".to_string(),
timestamps: vec![{
let ts = Local
.ymd(now.year(), now.month(), now.day())
.and_hms(0, 0, 0);
let ts: SystemTime = ts.into();
//let ts: SystemTime = ts.into();
let ts: DateTime<Utc> = ts.into();
ts.into()
}),
rx_packets: 10,
tx_packets: 5,
rx_packets_per_frequency: [(868100000, 10)].iter().cloned().collect(),
rx_packets_per_dr: [(5, 10)].iter().cloned().collect(),
tx_packets_per_frequency: [(868200000, 5)].iter().cloned().collect(),
tx_packets_per_dr: [(4, 5)].iter().cloned().collect(),
..Default::default()
},
stats_resp.result[0]
}],
datasets: vec![common::MetricDataset {
label: "rx_count".to_string(),
data: vec![10.0],
}],
}),
stats_resp.rx_packets
);
}
}

View File

@ -1,6 +1,8 @@
use chrono::{DateTime, Utc};
use crate::codec::Codec;
use crate::storage::fields::MeasurementKind;
use crate::storage::metrics::Aggregation;
use chirpstack_api::{api, common};
use lrwn::region::{CommonName, MacVersion, Revision};
@ -140,6 +142,50 @@ impl FromProto<Codec> for api::CodecRuntime {
}
}
impl ToProto<api::MeasurementKind> for MeasurementKind {
fn to_proto(self) -> api::MeasurementKind {
match self {
MeasurementKind::UNKNOWN => api::MeasurementKind::Unknown,
MeasurementKind::COUNTER => api::MeasurementKind::Counter,
MeasurementKind::ABSOLUTE => api::MeasurementKind::Absolute,
MeasurementKind::GAUGE => api::MeasurementKind::Gauge,
MeasurementKind::STRING => api::MeasurementKind::String,
}
}
}
impl FromProto<MeasurementKind> for api::MeasurementKind {
fn from_proto(self) -> MeasurementKind {
match self {
api::MeasurementKind::Unknown => MeasurementKind::UNKNOWN,
api::MeasurementKind::Counter => MeasurementKind::COUNTER,
api::MeasurementKind::Absolute => MeasurementKind::ABSOLUTE,
api::MeasurementKind::Gauge => MeasurementKind::GAUGE,
api::MeasurementKind::String => MeasurementKind::STRING,
}
}
}
impl ToProto<common::Aggregation> for Aggregation {
fn to_proto(self) -> common::Aggregation {
match self {
Aggregation::HOUR => common::Aggregation::Hour,
Aggregation::DAY => common::Aggregation::Day,
Aggregation::MONTH => common::Aggregation::Month,
}
}
}
impl FromProto<Aggregation> for common::Aggregation {
fn from_proto(self) -> Aggregation {
match self {
common::Aggregation::Hour => Aggregation::HOUR,
common::Aggregation::Day => Aggregation::DAY,
common::Aggregation::Month => Aggregation::MONTH,
}
}
}
pub fn datetime_to_prost_timestamp(dt: &DateTime<Utc>) -> prost_types::Timestamp {
let ts = dt.timestamp_nanos();

View File

@ -95,3 +95,84 @@ pub async fn struct_to_binary(
.context("JavaScript encoder")?,
})
}
/*
pub fn get_data_keys(s: &pbjson_types::Struct) -> Vec<String> {
let mut out: Vec<String> = Vec::new();
for (k, v) in &s.fields {
out.extend_from_slice(&_get_data_keys(k, v));
}
out
}
fn _get_data_keys(prefix: &str, v: &pbjson_types::Value) -> Vec<String> {
match &v.kind {
None => vec![prefix.to_string()],
Some(v) => match v {
pbjson_types::value::Kind::NullValue(_)
| pbjson_types::value::Kind::NumberValue(_)
| pbjson_types::value::Kind::StringValue(_)
| pbjson_types::value::Kind::BoolValue(_) => {
vec![prefix.to_string()]
}
pbjson_types::value::Kind::StructValue(v) => {
let mut out: Vec<String> = Vec::new();
for (k, v) in &v.fields {
out.extend_from_slice(&_get_data_keys(&format!("{}_{}", prefix, k), v));
}
out
}
pbjson_types::value::Kind::ListValue(v) => {
let mut out: Vec<String> = Vec::new();
for (i, v) in v.values.iter().enumerate() {
out.extend_from_slice(&_get_data_keys(&format!("{}_{}", prefix, i), v));
}
out
}
},
}
}
*/
pub fn get_measurements(s: &pbjson_types::Struct) -> HashMap<String, pbjson_types::value::Kind> {
let mut out: HashMap<String, pbjson_types::value::Kind> = HashMap::new();
for (k, v) in &s.fields {
out.extend(_get_measurements(k, v));
}
out
}
fn _get_measurements(
prefix: &str,
v: &pbjson_types::Value,
) -> HashMap<String, pbjson_types::value::Kind> {
let mut out: HashMap<String, pbjson_types::value::Kind> = HashMap::new();
match &v.kind {
None => {}
Some(v) => match v {
pbjson_types::value::Kind::NullValue(_) => {}
pbjson_types::value::Kind::NumberValue(_)
| pbjson_types::value::Kind::StringValue(_)
| pbjson_types::value::Kind::BoolValue(_) => {
out.insert(prefix.to_string(), v.clone());
}
pbjson_types::value::Kind::StructValue(v) => {
for (k, v) in &v.fields {
out.extend(_get_measurements(&format!("{}_{}", prefix, k), v));
}
}
pbjson_types::value::Kind::ListValue(v) => {
for (i, v) in v.values.iter().enumerate() {
out.extend(_get_measurements(&format!("{}_{}", prefix, i), v));
}
}
},
}
out
}

View File

@ -47,6 +47,7 @@ pub struct DeviceProfile {
pub payload_codec_script: String,
pub flush_queue_on_activate: bool,
pub description: String,
pub measurements: fields::Measurements,
}
impl DeviceProfile {
@ -91,6 +92,7 @@ impl Default for DeviceProfile {
abp_rx2_dr: 0,
abp_rx2_freq: 0,
tags: fields::KeyValue::new(HashMap::new()),
measurements: fields::Measurements::new(HashMap::new()),
}
}
}
@ -204,6 +206,7 @@ pub async fn update(dp: DeviceProfile) -> Result<DeviceProfile, Error> {
device_profile::abp_rx2_dr.eq(&dp.abp_rx2_dr),
device_profile::abp_rx2_freq.eq(&dp.abp_rx2_freq),
device_profile::tags.eq(&dp.tags),
device_profile::measurements.eq(&dp.measurements),
))
.get_result(&c)
.map_err(|e| error::Error::from_diesel(e, dp.id.to_string()))
@ -214,6 +217,22 @@ pub async fn update(dp: DeviceProfile) -> Result<DeviceProfile, Error> {
Ok(dp)
}
pub async fn set_measurements(id: Uuid, m: &fields::Measurements) -> Result<DeviceProfile, Error> {
let dp = task::spawn_blocking({
let m = m.clone();
move || -> Result<DeviceProfile, Error> {
let c = get_db_conn()?;
diesel::update(device_profile::dsl::device_profile.find(&id))
.set(device_profile::measurements.eq(m))
.get_result(&c)
.map_err(|e| Error::from_diesel(e, id.to_string()))
}
})
.await??;
info!(id = %id, "Device-profile measurements updated");
Ok(dp)
}
pub async fn delete(id: &Uuid) -> Result<(), Error> {
task::spawn_blocking({
let id = *id;

View File

@ -47,6 +47,7 @@ pub struct DeviceProfileTemplate {
pub abp_rx2_dr: i16,
pub abp_rx2_freq: i64,
pub tags: fields::KeyValue,
pub measurements: fields::Measurements,
}
impl DeviceProfileTemplate {
@ -108,6 +109,7 @@ impl Default for DeviceProfileTemplate {
abp_rx2_dr: 0,
abp_rx2_freq: 0,
tags: fields::KeyValue::new(HashMap::new()),
measurements: fields::Measurements::new(HashMap::new()),
}
}
}
@ -184,6 +186,7 @@ pub async fn upsert(dp: DeviceProfileTemplate) -> Result<DeviceProfileTemplate,
device_profile_template::abp_rx2_dr.eq(&dp.abp_rx2_dr),
device_profile_template::abp_rx2_freq.eq(&dp.abp_rx2_freq),
device_profile_template::tags.eq(&dp.tags),
device_profile_template::measurements.eq(&dp.measurements),
))
.get_result(&c)
.map_err(|e| error::Error::from_diesel(e, dp.id.to_string()))

View File

@ -5,6 +5,7 @@ use std::ops::{Deref, DerefMut};
use diesel::pg::types::sql_types::Jsonb;
use diesel::pg::Pg;
use diesel::{deserialize, serialize};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, AsExpression, FromSqlRow)]
#[sql_type = "Jsonb"]
@ -49,3 +50,69 @@ impl serialize::ToSql<Jsonb, Pg> for KeyValue {
<serde_json::Value as serialize::ToSql<Jsonb, Pg>>::to_sql(&value, out)
}
}
#[derive(Debug, Clone, AsExpression, FromSqlRow, PartialEq)]
#[sql_type = "Jsonb"]
pub struct Measurements(HashMap<String, Measurement>);
impl Measurements {
pub fn new(m: HashMap<String, Measurement>) -> Self {
Measurements(m)
}
#[allow(clippy::wrong_self_convention)]
pub fn into_hashmap(&self) -> HashMap<String, Measurement> {
self.0.clone()
}
}
impl Deref for Measurements {
type Target = HashMap<String, Measurement>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl DerefMut for Measurements {
fn deref_mut(&mut self) -> &mut HashMap<String, Measurement> {
&mut self.0
}
}
impl deserialize::FromSql<Jsonb, Pg> for Measurements {
fn from_sql(bytes: Option<&[u8]>) -> deserialize::Result<Self> {
let value = <serde_json::Value as deserialize::FromSql<Jsonb, Pg>>::from_sql(bytes)?;
let kv: HashMap<String, Measurement> = serde_json::from_value(value)?;
Ok(Measurements::new(kv))
}
}
impl serialize::ToSql<Jsonb, Pg> for Measurements {
fn to_sql<W: Write>(&self, out: &mut serialize::Output<W, Pg>) -> serialize::Result {
let value = serde_json::to_value(&self.0)?;
<serde_json::Value as serialize::ToSql<Jsonb, Pg>>::to_sql(&value, out)
}
}
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct Measurement {
pub name: String,
pub kind: MeasurementKind,
}
#[allow(clippy::upper_case_acronyms)]
#[allow(non_camel_case_types)]
#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq)]
pub enum MeasurementKind {
// Unknown.
UNKNOWN,
// Incrementing counters which are not reset on each reporting.
COUNTER,
// Counters that do get reset upon reading.
ABSOLUTE,
// E.g. a temperature value.
GAUGE,
// E.g. a firmware version, true / false value.
STRING,
}

View File

@ -25,9 +25,25 @@ impl fmt::Display for Aggregation {
}
}
#[allow(clippy::upper_case_acronyms)]
#[allow(non_camel_case_types)]
#[derive(Deserialize, Serialize, Copy, Clone, Debug, Eq, PartialEq)]
pub enum Kind {
COUNTER,
ABSOLUTE,
GAUGE,
}
impl fmt::Display for Kind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", self)
}
}
#[derive(Debug, PartialEq, Clone)]
pub struct Record {
pub time: DateTime<Local>,
pub kind: Kind,
pub metrics: HashMap<String, f64>,
}
@ -52,6 +68,29 @@ fn get_key(name: &str, a: Aggregation, dt: DateTime<Local>) -> String {
))
}
pub async fn save_state(name: &str, state: &str) -> Result<()> {
task::spawn_blocking({
let key = redis_key(format!("metrics:{{{}}}", name));
let state = state.to_string();
let ttl = get_ttl(Aggregation::MONTH);
move || -> Result<()> {
let mut c = get_redis_conn()?;
redis::cmd("PSETEX")
.arg(key)
.arg(ttl.as_millis() as usize)
.arg(state)
.query(&mut *c)?;
Ok(())
}
})
.await??;
info!(state = %state, "State saved");
Ok(())
}
pub async fn save(name: &str, record: &Record) -> Result<()> {
for a in get_aggregations() {
save_for_interval(a, name, record).await?;
@ -92,7 +131,23 @@ async fn save_for_interval(a: Aggregation, name: &str, record: &Record) -> Resul
// Passing a reference to hincr will return a runtime error.
let k = k.clone();
let v = *v;
pipe.cmd("HINCRBYFLOAT").arg(&key).arg(k).arg(v).ignore();
match record.kind {
Kind::COUNTER => {
pipe.cmd("HSET").arg(&key).arg(k).arg(v).ignore();
}
Kind::ABSOLUTE => {
pipe.cmd("HINCRBYFLOAT").arg(&key).arg(k).arg(v).ignore();
}
Kind::GAUGE => {
pipe.cmd("HINCRBYFLOAT")
.arg(&key)
.arg(format!("_{}_count", k))
.arg(1.0)
.ignore();
pipe.cmd("HINCRBYFLOAT").arg(&key).arg(k).arg(v).ignore();
}
}
}
pipe.cmd("PEXPIRE")
@ -110,8 +165,21 @@ async fn save_for_interval(a: Aggregation, name: &str, record: &Record) -> Resul
Ok(())
}
pub async fn get_state(name: &str) -> Result<String> {
task::spawn_blocking({
let key = redis_key(format!("metrics:{{{}}}", name));
move || -> Result<String> {
let mut c = get_redis_conn()?;
let v: Option<String> = redis::cmd("GET").arg(key).query(&mut *c)?;
Ok(v.unwrap_or_default())
}
})
.await?
}
pub async fn get(
name: &str,
kind: Kind,
a: Aggregation,
start: DateTime<Local>,
end: DateTime<Local>,
@ -184,9 +252,33 @@ pub async fn get(
let mut out: Vec<Record> = Vec::new();
for (i, r) in res.iter().enumerate() {
let mut metrics = r.clone();
// In case of GAUGE values, the total aggregated value must be divided by the
// number of measurements.
if kind == Kind::GAUGE {
let counts: HashMap<String, f64> = r
.iter()
.filter(|(k, _)| k.starts_with('_') && k.ends_with("_count"))
.map(|(k, v)| (k.to_string(), *v))
.collect();
for (k, count) in counts {
let k = k.strip_prefix('_').unwrap().strip_suffix("_count").unwrap();
if let Some(v) = metrics.get_mut(k) {
*v /= count;
}
}
}
out.push(Record {
time: timestamps[i],
metrics: r.clone(),
kind,
metrics: metrics
.iter()
.filter(|(k, _)| !k.starts_with('_'))
.map(|(k, v)| (k.to_string(), *v))
.collect(),
});
}
@ -208,6 +300,7 @@ pub mod test {
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 1, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 1f64), ("bar".into(), 2f64)]
.iter()
.cloned()
@ -215,6 +308,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 2, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 3f64), ("bar".into(), 4f64)]
.iter()
.cloned()
@ -222,6 +316,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(2, 1, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -236,6 +331,7 @@ pub mod test {
let resp = get(
"test",
Kind::ABSOLUTE,
Aggregation::HOUR,
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
Local.ymd(2018, 1, 1).and_hms(2, 0, 0),
@ -247,6 +343,7 @@ pub mod test {
vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 4f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -254,6 +351,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(2, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -271,6 +369,7 @@ pub mod test {
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 1f64), ("bar".into(), 2f64)]
.iter()
.cloned()
@ -278,6 +377,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(2, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 3f64), ("bar".into(), 4f64)]
.iter()
.cloned()
@ -285,6 +385,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 2).and_hms(1, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -299,6 +400,7 @@ pub mod test {
let resp = get(
"test",
Kind::ABSOLUTE,
Aggregation::DAY,
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
Local.ymd(2018, 1, 2).and_hms(1, 0, 0),
@ -310,6 +412,7 @@ pub mod test {
vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 4f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -317,6 +420,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 2).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -334,6 +438,7 @@ pub mod test {
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 1f64), ("bar".into(), 2f64)]
.iter()
.cloned()
@ -341,6 +446,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 1, 2).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 3f64), ("bar".into(), 4f64)]
.iter()
.cloned()
@ -348,6 +454,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 2, 1).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -362,6 +469,7 @@ pub mod test {
let resp = get(
"test",
Kind::ABSOLUTE,
Aggregation::MONTH,
Local.ymd(2018, 1, 1).and_hms(0, 0, 0),
Local.ymd(2018, 2, 1).and_hms(0, 0, 0),
@ -373,6 +481,7 @@ pub mod test {
vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 4f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -380,6 +489,7 @@ pub mod test {
},
Record {
time: Local.ymd(2018, 2, 1).and_hms(0, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 5f64), ("bar".into(), 6f64)]
.iter()
.cloned()
@ -389,4 +499,157 @@ pub mod test {
resp
);
}
#[tokio::test]
async fn test_counter() {
let _guard = test::prepare().await;
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 1, 0),
kind: Kind::COUNTER,
metrics: [("foo".into(), 1.0), ("bar".into(), 2.0)]
.iter()
.cloned()
.collect(),
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 2, 0),
kind: Kind::COUNTER,
metrics: [("foo".into(), 2.0), ("bar".into(), 4.0)]
.iter()
.cloned()
.collect(),
},
];
for r in &records {
save_for_interval(Aggregation::HOUR, "test", r)
.await
.unwrap();
}
let resp = get(
"test",
Kind::COUNTER,
Aggregation::HOUR,
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
)
.await
.unwrap();
assert_eq!(
vec![Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
kind: Kind::COUNTER,
metrics: [("foo".into(), 2.0), ("bar".into(), 4.0)]
.iter()
.cloned()
.collect(),
},],
resp
);
}
#[tokio::test]
async fn test_absolute() {
let _guard = test::prepare().await;
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 1, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 1.0), ("bar".into(), 2.0)]
.iter()
.cloned()
.collect(),
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 2, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 2.0), ("bar".into(), 4.0)]
.iter()
.cloned()
.collect(),
},
];
for r in &records {
save_for_interval(Aggregation::HOUR, "test", r)
.await
.unwrap();
}
let resp = get(
"test",
Kind::ABSOLUTE,
Aggregation::HOUR,
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
)
.await
.unwrap();
assert_eq!(
vec![Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
kind: Kind::ABSOLUTE,
metrics: [("foo".into(), 3.0), ("bar".into(), 6.0)]
.iter()
.cloned()
.collect(),
},],
resp
);
}
#[tokio::test]
async fn test_gauge() {
let _guard = test::prepare().await;
let records = vec![
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 1, 0),
kind: Kind::GAUGE,
metrics: [("foo".into(), 1.0), ("bar".into(), 2.0)]
.iter()
.cloned()
.collect(),
},
Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 2, 0),
kind: Kind::GAUGE,
metrics: [("foo".into(), 2.0), ("bar".into(), 4.0)]
.iter()
.cloned()
.collect(),
},
];
for r in &records {
save_for_interval(Aggregation::HOUR, "test", r)
.await
.unwrap();
}
let resp = get(
"test",
Kind::GAUGE,
Aggregation::HOUR,
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
)
.await
.unwrap();
assert_eq!(
vec![Record {
time: Local.ymd(2018, 1, 1).and_hms(1, 0, 0),
kind: Kind::GAUGE,
metrics: [("foo".into(), 1.5), ("bar".into(), 3.0)]
.iter()
.cloned()
.collect(),
},],
resp
);
}
}

View File

@ -99,6 +99,7 @@ table! {
payload_codec_script -> Text,
flush_queue_on_activate -> Bool,
description -> Text,
measurements -> Jsonb,
}
}
@ -133,6 +134,7 @@ table! {
abp_rx2_dr -> Int2,
abp_rx2_freq -> Int8,
tags -> Jsonb,
measurements -> Jsonb,
}
}

View File

@ -8,8 +8,8 @@ use super::error::Error;
use super::{filter_rx_info_by_tenant_id, helpers, UplinkFrameSet};
use crate::storage::error::Error as StorageError;
use crate::storage::{
application, device, device_gateway, device_profile, device_queue, device_session, metrics,
tenant,
application, device, device_gateway, device_profile, device_queue, device_session, fields,
metrics, tenant,
};
use crate::{codec, config, downlink, framelog, integration, maccommand};
use chirpstack_api::{api, common, integration as integration_pb, internal};
@ -28,6 +28,7 @@ pub struct Data {
application: Option<application::Application>,
device_info: Option<integration_pb::DeviceInfo>,
mac_payload: Option<lrwn::MACPayload>,
uplink_event: Option<integration_pb::UplinkEvent>,
must_send_downlink: bool,
downlink_mac_commands: Vec<lrwn::MACCommandSet>,
device_gateway_rx_info: Option<internal::DeviceGatewayRxInfo>,
@ -62,6 +63,7 @@ impl Data {
application: None,
device_info: None,
mac_payload: None,
uplink_event: None,
must_send_downlink: false,
downlink_mac_commands: Vec::new(),
device_gateway_rx_info: None,
@ -91,6 +93,7 @@ impl Data {
ctx.save_device_gateway_rx_info().await?;
ctx.append_meta_data_to_uplink_history()?;
ctx.send_uplink_event().await?;
ctx.detect_and_save_measurements().await?;
ctx.sync_uplink_f_cnt()?;
ctx.set_region_name()?;
ctx.save_device_session().await?;
@ -562,7 +565,7 @@ impl Data {
Ok(())
}
async fn send_uplink_event(&self) -> Result<()> {
async fn send_uplink_event(&mut self) -> Result<()> {
trace!("Sending uplink event");
let ts: DateTime<Utc> =
@ -624,6 +627,86 @@ impl Data {
integration::uplink_event(&app.id, &dev.variables, &pl).await?;
self.uplink_event = Some(pl);
Ok(())
}
async fn detect_and_save_measurements(&mut self) -> Result<()> {
trace!("Detecing and saving measurements");
let dp = self.device_profile.as_ref().unwrap();
let up_event = self.uplink_event.as_ref().unwrap();
let dev = self.device.as_ref().unwrap();
let data_measurements: HashMap<String, pbjson_types::value::Kind> = match &up_event.object {
None => HashMap::new(),
Some(v) => codec::get_measurements(v),
};
let mut measurements = dp.measurements.clone();
let mut update_dp_measurements = false;
for (k, v) in data_measurements {
if let Some(dp_m) = measurements.get(&k) {
if dp_m.kind == fields::MeasurementKind::UNKNOWN {
continue;
}
// Only Number, String and BoolValues are expected.
match v {
pbjson_types::value::Kind::NumberValue(v) => {
let record = metrics::Record {
time: DateTime::<Utc>::try_from(
up_event.time.as_ref().unwrap().clone(),
)?
.with_timezone(&Local),
kind: match dp_m.kind {
fields::MeasurementKind::COUNTER => metrics::Kind::COUNTER,
fields::MeasurementKind::ABSOLUTE => metrics::Kind::ABSOLUTE,
fields::MeasurementKind::GAUGE => metrics::Kind::GAUGE,
_ => {
continue;
}
},
metrics: [("value".to_string(), v)].iter().cloned().collect(),
};
metrics::save(&format!("device:{}:{}", dev.dev_eui, k), &record).await?;
}
pbjson_types::value::Kind::StringValue(v) => {
metrics::save_state(
&format!("device:{}:{}", dev.dev_eui, k),
&v.to_string(),
)
.await?;
}
pbjson_types::value::Kind::BoolValue(v) => {
metrics::save_state(
&format!("device:{}:{}", dev.dev_eui, k),
&format!("{}", v),
)
.await?;
}
_ => {}
}
} else {
update_dp_measurements = true;
measurements.insert(
k.clone(),
fields::Measurement {
kind: fields::MeasurementKind::UNKNOWN,
name: "".to_string(),
},
);
}
}
if update_dp_measurements {
self.device_profile =
Some(device_profile::set_measurements(dp.id, &measurements).await?);
}
Ok(())
}
@ -732,6 +815,7 @@ impl Data {
let mut record = metrics::Record {
time: Local::now(),
kind: metrics::Kind::ABSOLUTE,
metrics: HashMap::new(),
};

View File

@ -250,6 +250,7 @@ impl JoinRequest {
&format!("device:{}", dev.dev_eui),
&metrics::Record {
time: Local::now(),
kind: metrics::Kind::ABSOLUTE,
metrics: [("error_OTAA".into(), 1f64)].iter().cloned().collect(),
},
)
@ -299,6 +300,7 @@ impl JoinRequest {
&format!("device:{}", dev.dev_eui),
&metrics::Record {
time: Local::now(),
kind: metrics::Kind::ABSOLUTE,
metrics: [("error_UPLINK_MIC".into(), 1f64)]
.iter()
.cloned()

View File

@ -83,6 +83,7 @@ impl Stats {
Some(v) => DateTime::try_from(v.clone())?.into(),
None => Local::now(),
},
kind: metrics::Kind::ABSOLUTE,
metrics: HashMap::new(),
};

View File

@ -47,7 +47,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"lint": "prettier --check .",
"format": "prettier --write . && git add -A ."
"format": "prettier --write ."
},
"husky": {
"hooks": {

View File

@ -0,0 +1,98 @@
import React, { Component } from "react";
import { Card, Empty } from "antd";
import { TimeUnit } from "chart.js";
import { Bar } from "react-chartjs-2";
import moment from "moment";
import { Metric, Aggregation } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
interface IProps {
metric: Metric;
aggregation: Aggregation;
}
class MetricBar extends Component<IProps> {
render() {
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
return <Empty />;
}
let unit: TimeUnit = "hour";
if (this.props.aggregation === Aggregation.DAY) {
unit = "day";
} else if (this.props.aggregation === Aggregation.MONTH) {
unit = "month";
}
let backgroundColors = [
"#8bc34a",
"#ff5722",
"#ff9800",
"#ffc107",
"#ffeb3b",
"#cddc39",
"#4caf50",
"#009688",
"#00bcd4",
"#03a9f4",
"#2196f3",
"#3f51b5",
"#673ab7",
"#9c27b0",
"#e91e63",
];
const animation: false = false;
const options = {
animation: animation,
plugins: {
legend: {
display: true,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
type: "time" as const,
time: {
unit: unit,
},
},
},
};
let data: {
labels: number[];
datasets: {
label: string;
data: number[];
backgroundColor: string;
}[];
} = {
labels: this.props.metric.getTimestampsList().map(v => moment(v.toDate()).valueOf()),
datasets: [],
};
for (let ds of this.props.metric.getDatasetsList()) {
data.datasets.push({
label: ds.getLabel(),
data: ds.getDataList(),
backgroundColor: backgroundColors.shift()!,
});
}
return (
<Card title={this.props.metric.getName()} className="dashboard-chart">
<Bar data={data} options={options} />
</Card>
);
}
}
export default MetricBar;

View File

@ -0,0 +1,81 @@
import React, { Component } from "react";
import { Card, Empty } from "antd";
import { TimeUnit } from "chart.js";
import { Line } from "react-chartjs-2";
import moment from "moment";
import { Metric, Aggregation } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
interface IProps {
metric: Metric;
aggregation: Aggregation;
zeroToNull?: boolean;
}
class MetricChart extends Component<IProps> {
render() {
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
return <Empty />;
}
let unit: TimeUnit = "hour";
if (this.props.aggregation === Aggregation.DAY) {
unit = "day";
} else if (this.props.aggregation === Aggregation.MONTH) {
unit = "month";
}
const animation: false = false;
const options = {
animation: animation,
plugins: {
legend: {
display: false,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
type: "time" as const,
time: {
unit: unit,
},
},
},
};
let data = {
labels: this.props.metric.getTimestampsList().map(v => moment(v.toDate()).valueOf()),
datasets: this.props.metric.getDatasetsList().map(v => {
return {
label: v.getLabel(),
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: v.getDataList().map(v => {
if (v === 0 && this.props.zeroToNull) {
return null;
} else {
return v;
}
}),
};
}),
};
return (
<Card title={this.props.metric.getName()} className="dashboard-chart">
<Line height={75} options={options} data={data} />
</Card>
);
}
}
export default MetricChart;

View File

@ -1,44 +1,89 @@
import React, { Component } from "react";
import { color } from "chart.js/helpers";
import { Chart } from "react-chartjs-2";
import { Card, Empty } from "antd";
interface HeatmapData {
x: string;
y: Array<[string, number]>;
}
import { color } from "chart.js/helpers";
import { TimeUnit } from "chart.js";
import { Chart } from "react-chartjs-2";
import moment from "moment";
import { Metric, Aggregation } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
interface IProps {
data: HeatmapData[];
metric: Metric;
fromColor: string;
toColor: string;
aggregation: Aggregation;
}
class Heatmap extends Component<IProps> {
class MetricHeatmap extends Component<IProps> {
render() {
if (this.props.data.length === 0) {
return null;
if (this.props.metric.getTimestampsList().length === 0 || this.props.metric.getDatasetsList().length === 0) {
return <Empty />;
}
let xSet: { [key: string]: any } = {};
let ySet: { [key: string]: any } = {};
let unit: TimeUnit = "hour";
if (this.props.aggregation === Aggregation.DAY) {
unit = "day";
} else if (this.props.aggregation === Aggregation.MONTH) {
unit = "month";
}
const animation: false = false;
let options = {
animation: animation,
maintainAspectRatio: false,
scales: {
y: {
type: "category" as const,
offset: true,
grid: {
display: false,
},
},
x: {
type: "time" as const,
time: {
unit: unit,
},
offset: true,
labels: this.props.metric.getTimestampsList().map(v => moment(v.toDate().valueOf())),
grid: {
display: false,
},
},
},
plugins: {
legend: { display: false },
tooltip: {
callbacks: {
title: () => {
return "";
},
label: (ctx: any) => {
const v = ctx.dataset.data[ctx.dataIndex].v;
return "Count: " + v;
},
},
},
},
};
let dataData: {
x: string;
x: number;
y: string;
v: number;
}[] = [];
let data = {
labels: [],
labels: this.props.metric.getDatasetsList().map(v => v.getLabel()),
datasets: [
{
label: "Heatmap",
data: dataData,
minValue: -1,
maxValue: -1,
xSet: xSet,
ySet: ySet,
fromColor: this.props.fromColor.match(/\d+/g)!.map(Number),
toColor: this.props.toColor.match(/\d+/g)!.map(Number),
backgroundColor: (ctx: any): string => {
@ -64,80 +109,49 @@ class Heatmap extends Component<IProps> {
},
borderWidth: 0,
width: (ctx: any) => {
return (ctx.chart.chartArea || {}).width / Object.keys(ctx.dataset.xSet).length - 1;
return (ctx.chart.chartArea || {}).width / this.props.metric.getTimestampsList().length - 1;
},
height: (ctx: any) => {
return (ctx.chart.chartArea || {}).height / Object.keys(ctx.dataset.ySet).length - 1;
return (ctx.chart.chartArea || {}).height / this.props.metric.getDatasetsList().length - 1;
},
},
],
};
let xLabels: string[] = [];
data.labels.sort();
const animation: false = false;
const tsList = this.props.metric.getTimestampsList();
const dsList = this.props.metric.getDatasetsList();
let options = {
animation: animation,
maintainAspectRatio: false,
scales: {
y: {
type: "category" as const,
offset: true,
grid: {
display: false,
},
},
x: {
type: "time" as const,
offset: true,
labels: xLabels,
grid: {
display: false,
},
},
},
plugins: {
legend: { display: false },
tooltip: {
callbacks: {
title: () => {
return "";
},
label: (ctx: any) => {
const v = ctx.dataset.data[ctx.dataIndex].v;
return "Count: " + v;
},
},
},
},
};
for (const row of this.props.data) {
options.scales.x.labels.push(row.x);
data.datasets[0].xSet[row.x] = {};
for (const y of row.y) {
data.datasets[0].ySet[y[0]] = {};
data.datasets[0].data.push({
x: row.x,
y: y[0],
v: y[1],
});
if (data.datasets[0].minValue === -1 || data.datasets[0].minValue > y[1]) {
data.datasets[0].minValue = y[1];
for (let i = 0; i < tsList.length; i++) {
for (let ds of dsList) {
let v = ds.getDataList()[i];
if (v === 0) {
continue;
}
if (data.datasets[0].maxValue < y[1]) {
data.datasets[0].maxValue = y[1];
data.datasets[0].data.push({
x: moment(tsList[i].toDate()).valueOf(),
y: ds.getLabel(),
v: v,
});
if (data.datasets[0].minValue === -1 || data.datasets[0].minValue > v) {
data.datasets[0].minValue = v;
}
if (data.datasets[0].maxValue < v) {
data.datasets[0].maxValue = v;
}
}
}
return <Chart type="matrix" data={data} options={options} />;
return (
<Card title={this.props.metric.getName()} className="dashboard-chart">
<Chart type="matrix" data={data} options={options} />
</Card>
);
}
}
export default Heatmap;
export default MetricHeatmap;

View File

@ -15,8 +15,6 @@ import {
GetDeviceKeysResponse,
UpdateDeviceKeysRequest,
DeleteDeviceKeysRequest,
GetDeviceStatsRequest,
GetDeviceStatsResponse,
EnqueueDeviceQueueItemRequest,
EnqueueDeviceQueueItemResponse,
FlushDeviceQueueRequest,
@ -28,6 +26,10 @@ import {
ActivateDeviceRequest,
GetRandomDevAddrRequest,
GetRandomDevAddrResponse,
GetDeviceMetricsRequest,
GetDeviceMetricsResponse,
GetDeviceLinkMetricsRequest,
GetDeviceLinkMetricsResponse,
} from "@chirpstack/chirpstack-api-grpc-web/api/device_pb";
import SessionStore from "./SessionStore";
@ -172,8 +174,19 @@ class DeviceStore extends EventEmitter {
});
};
getStats = (req: GetDeviceStatsRequest, callbackFunc: (resp: GetDeviceStatsResponse) => void) => {
this.client.getStats(req, SessionStore.getMetadata(), (err, resp) => {
getMetrics = (req: GetDeviceMetricsRequest, callbackFunc: (resp: GetDeviceMetricsResponse) => void) => {
this.client.getMetrics(req, SessionStore.getMetadata(), (err, resp) => {
if (err !== null) {
HandleError(err);
return;
}
callbackFunc(resp);
});
};
getLinkMetrics = (req: GetDeviceLinkMetricsRequest, callbackFunc: (resp: GetDeviceLinkMetricsResponse) => void) => {
this.client.getLinkMetrics(req, SessionStore.getMetadata(), (err, resp) => {
if (err !== null) {
HandleError(err);
return;

View File

@ -9,8 +9,8 @@ import {
DeleteGatewayRequest,
ListGatewaysRequest,
ListGatewaysResponse,
GetGatewayStatsRequest,
GetGatewayStatsResponse,
GetGatewayMetricsRequest,
GetGatewayMetricsResponse,
GenerateGatewayClientCertificateRequest,
GenerateGatewayClientCertificateResponse,
} from "@chirpstack/chirpstack-api-grpc-web/api/gateway_pb";
@ -96,8 +96,8 @@ class GatewayStore extends EventEmitter {
});
};
getStats = (req: GetGatewayStatsRequest, callbackFunc: (resp: GetGatewayStatsResponse) => void) => {
this.client.getStats(req, SessionStore.getMetadata(), (err, resp) => {
getMetrics = (req: GetGatewayMetricsRequest, callbackFunc: (resp: GetGatewayMetricsResponse) => void) => {
this.client.getMetrics(req, SessionStore.getMetadata(), (err, resp) => {
if (err !== null) {
HandleError(err);
return;

View File

@ -4,7 +4,7 @@ import { Form, Input, Select, InputNumber, Switch, Row, Col, Button, Tabs } from
import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons";
import { DeviceProfileTemplate } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_template_pb";
import { CodecRuntime } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import { CodecRuntime, Measurement, MeasurementKind } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import { Region, MacVersion, RegParamsRevision } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
import { ListDeviceProfileAdrAlgorithmsResponse } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
@ -102,6 +102,14 @@ class DeviceProfileTemplateForm extends Component<IProps, IState> {
dp.getTagsMap().set(elm[0], elm[1]);
}
// measurements
for (const elm of v.measurementsMap) {
let m = new Measurement();
m.setKind(elm[1].kind);
m.setName(elm[1].name);
dp.getMeasurementsMap().set(elm[0], m);
}
this.props.onFinish(dp);
};
@ -405,6 +413,88 @@ class DeviceProfileTemplateForm extends Component<IProps, IState> {
)}
</Form.List>
</Tabs.TabPane>
<Tabs.TabPane tab="Measurements" key="7">
<Card bordered={false}>
<p>
ChirpStack can aggregate and visualize decoded device measurements in the device dashboard. To setup the
aggregation of device measurements, you must configure the key, kind of measurement and name
(user-defined). Please note that ChirpStack will automatically configure the keys once it has received
the first uplink(s). The following measurement-kinds can be selected:
</p>
<ul>
<li>
<strong>Unknown / unset</strong>: Default for auto-detected keys. This disables the aggregation of
this metric.
</li>
<li>
<strong>Counter</strong>: For continuous incrementing counters.
</li>
<li>
<strong>Absolute</strong>: For counters which get reset upon reading / uplink.
</li>
<li>
<strong>Gauge</strong>: For temperature, humidity, pressure etc...
</li>
<li>
<strong>String</strong>: For boolean or string values.
</li>
</ul>
</Card>
<Form.List name="measurementsMap">
{(fields, { add, remove }) => (
<>
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item
{...restField}
name={[name, 0]}
fieldKey={[name, 0]}
rules={[{ required: true, message: "Please enter a key!" }]}
>
<Input placeholder="Key" />
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
{...restField}
name={[name, 1, "kind"]}
fieldKey={[name, 1, "kind"]}
rules={[{ required: true, message: "Please select a kind!" }]}
>
<Select>
<Select.Option value={MeasurementKind.UNKNOWN}>Unknown / unset</Select.Option>
<Select.Option value={MeasurementKind.COUNTER}>Counter</Select.Option>
<Select.Option value={MeasurementKind.ABSOLUTE}>Absolute</Select.Option>
<Select.Option value={MeasurementKind.GAUGE}>Gauge</Select.Option>
<Select.Option value={MeasurementKind.STRING}>String</Select.Option>
</Select>
</Form.Item>
</Col>
<Col span={10}>
<Form.Item
{...restField}
name={[name, 1, "name"]}
fieldKey={[name, 1, "name"]}
rules={[{ required: true, message: "Please enter a description!" }]}
>
<Input placeholder="Name" />
</Form.Item>
</Col>
<Col span={2}>
<MinusCircleOutlined onClick={() => remove(name)} />
</Col>
</Row>
))}
<Form.Item>
<Button type="dashed" onClick={() => add()} block icon={<PlusOutlined />}>
Add measurement
</Button>
</Form.Item>
</>
)}
</Form.List>
</Tabs.TabPane>
</Tabs>
<Form.Item>
<Button type="primary" htmlType="submit">

View File

@ -1,9 +1,14 @@
import React, { Component } from "react";
import { Form, Input, Select, InputNumber, Switch, Row, Col, Button, Tabs, Modal, Spin, Cascader } from "antd";
import { Form, Input, Select, InputNumber, Switch, Row, Col, Button, Tabs, Modal, Spin, Cascader, Card } from "antd";
import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons";
import { DeviceProfile, CodecRuntime } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import {
DeviceProfile,
CodecRuntime,
Measurement,
MeasurementKind,
} from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import { Region, MacVersion, RegParamsRevision } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
import { ListDeviceProfileAdrAlgorithmsResponse } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import {
@ -280,6 +285,14 @@ class DeviceProfileForm extends Component<IProps, IState> {
dp.getTagsMap().set(elm[0], elm[1]);
}
// measurements
for (const elm of v.measurementsMap) {
let m = new Measurement();
m.setKind(elm[1].kind);
m.setName(elm[1].name);
dp.getMeasurementsMap().set(elm[0], m);
}
this.props.onFinish(dp);
};
@ -318,6 +331,8 @@ class DeviceProfileForm extends Component<IProps, IState> {
templateModalVisible: false,
});
console.log(dp.toObject().tagsMap);
this.formRef.current.setFieldsValue({
name: dp.getName(),
description: dp.getDescription(),
@ -339,12 +354,8 @@ class DeviceProfileForm extends Component<IProps, IState> {
abpRx2Dr: dp.getAbpRx2Dr(),
abpRx2Freq: dp.getAbpRx2Freq(),
abpRx1DrOffset: dp.getAbpRx1DrOffset(),
tagsMap: [
["firmware", dp.getFirmware()],
["vendor", dp.getVendor()],
["device", dp.getName()],
["device_profile_template_id", dp.getId()],
],
tagsMap: dp.toObject().tagsMap,
measurementsMap: dp.toObject().measurementsMap,
});
const tabActive = this.state.tabActive;
@ -393,9 +404,16 @@ class DeviceProfileForm extends Component<IProps, IState> {
tabActive: "6",
},
() => {
this.setState({
tabActive: tabActive,
});
this.setState(
{
tabActive: "7",
},
() => {
this.setState({
tabActive: tabActive,
});
},
);
},
);
},
@ -688,6 +706,94 @@ class DeviceProfileForm extends Component<IProps, IState> {
)}
</Form.List>
</Tabs.TabPane>
<Tabs.TabPane tab="Measurements" key="7">
<Card bordered={false}>
<p>
ChirpStack can aggregate and visualize decoded device measurements in the device dashboard. To setup the
aggregation of device measurements, you must configure the key, kind of measurement and name
(user-defined). Please note that ChirpStack will automatically configure the keys once it has received
the first uplink(s). The following measurement-kinds can be selected:
</p>
<ul>
<li>
<strong>Unknown / unset</strong>: Default for auto-detected keys. This disables the aggregation of
this metric.
</li>
<li>
<strong>Counter</strong>: For continuous incrementing counters.
</li>
<li>
<strong>Absolute</strong>: For counters which get reset upon reading / uplink.
</li>
<li>
<strong>Gauge</strong>: For temperature, humidity, pressure etc...
</li>
<li>
<strong>String</strong>: For boolean or string values.
</li>
</ul>
</Card>
<Form.List name="measurementsMap">
{(fields, { add, remove }) => (
<>
{fields.map(({ key, name, ...restField }) => (
<Row gutter={24}>
<Col span={6}>
<Form.Item
{...restField}
name={[name, 0]}
fieldKey={[name, 0]}
rules={[{ required: true, message: "Please enter a key!" }]}
>
<Input placeholder="Measurement key" disabled={this.props.disabled} />
</Form.Item>
</Col>
<Col span={6}>
<Form.Item
{...restField}
name={[name, 1, "kind"]}
fieldKey={[name, 1, "kind"]}
rules={[{ required: true, message: "Please select a kind!" }]}
>
<Select disabled={this.props.disabled} placeholder="Measurement kind">
<Select.Option value={MeasurementKind.UNKNOWN}>Unknown / unset</Select.Option>
<Select.Option value={MeasurementKind.COUNTER}>Counter</Select.Option>
<Select.Option value={MeasurementKind.ABSOLUTE}>Absolute</Select.Option>
<Select.Option value={MeasurementKind.GAUGE}>Gauge</Select.Option>
<Select.Option value={MeasurementKind.STRING}>String</Select.Option>
</Select>
</Form.Item>
</Col>
<Col span={10}>
<Form.Item
{...restField}
name={[name, 1, "name"]}
fieldKey={[name, 1, "name"]}
rules={[{ required: true, message: "Please enter a name!" }]}
>
<Input placeholder="Measurement name" disabled={this.props.disabled} />
</Form.Item>
</Col>
<Col span={2}>
<MinusCircleOutlined onClick={() => remove(name)} />
</Col>
</Row>
))}
<Form.Item>
<Button
disabled={this.props.disabled}
type="dashed"
onClick={() => add()}
block
icon={<PlusOutlined />}
>
Add measurement
</Button>
</Form.Item>
</>
)}
</Form.List>
</Tabs.TabPane>
</Tabs>
<Form.Item>
<Button type="primary" htmlType="submit" disabled={this.props.disabled}>

View File

@ -2,20 +2,24 @@ import React, { Component } from "react";
import { Link } from "react-router-dom";
import moment from "moment";
import { Descriptions, Space, Card, Row, Col } from "antd";
import { TimeUnit } from "chart.js";
import { Line, Bar } from "react-chartjs-2";
import { ReloadOutlined } from "@ant-design/icons";
import { Descriptions, Space, Card, Statistic, Row, Col, Tabs, Radio, RadioChangeEvent, Button } from "antd";
import { Timestamp } from "google-protobuf/google/protobuf/timestamp_pb";
import {
Device,
GetDeviceStatsRequest,
GetDeviceStatsResponse,
GetDeviceMetricsRequest,
GetDeviceMetricsResponse,
GetDeviceLinkMetricsRequest,
GetDeviceLinkMetricsResponse,
} from "@chirpstack/chirpstack-api-grpc-web/api/device_pb";
import { Aggregation } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
import { DeviceProfile } from "@chirpstack/chirpstack-api-grpc-web/api/device_profile_pb";
import DeviceStore from "../../stores/DeviceStore";
import Heatmap from "../../components/Heatmap";
import MetricChart from "../../components/MetricChart";
import MetricHeatmap from "../../components/MetricHeatmap";
import MetricBar from "../../components/MetricBar";
interface IProps {
device: Device;
@ -24,17 +28,9 @@ interface IProps {
}
interface IState {
statsUp?: any;
statsErrors?: any;
statsUpFreq: HeatmapStats[];
statsUpDr?: any;
statsGwRssi?: any;
statsGwSnr?: any;
}
interface HeatmapStats {
x: string;
y: Array<[string, number]>;
metricsAggregation: Aggregation;
deviceMetrics?: GetDeviceMetricsResponse;
deviceLinkMetrics?: GetDeviceLinkMetricsResponse;
}
class DeviceDashboard extends Component<IProps, IState> {
@ -42,285 +38,143 @@ class DeviceDashboard extends Component<IProps, IState> {
super(props);
this.state = {
statsUpFreq: [],
metricsAggregation: Aggregation.DAY,
};
}
componentDidMount() {
this.loadStats();
this.loadMetrics();
}
loadStats = () => {
const end = moment().toDate();
const start = moment().subtract(30, "days").toDate();
loadMetrics = () => {
const agg = this.state.metricsAggregation;
const end = moment();
let start = moment();
if (agg === Aggregation.DAY) {
start = start.subtract(30, "days");
} else if (agg === Aggregation.HOUR) {
start = start.subtract(24, "hours");
} else if (agg === Aggregation.MONTH) {
start = start.subtract(12, "months");
}
this.loadLinkMetrics(start.toDate(), end.toDate(), agg);
this.loadDeviceMetrics(start.toDate(), end.toDate(), agg);
};
loadDeviceMetrics = (start: Date, end: Date, agg: Aggregation) => {
let startPb = new Timestamp();
let endPb = new Timestamp();
startPb.fromDate(start);
endPb.fromDate(end);
let req = new GetDeviceStatsRequest();
let req = new GetDeviceMetricsRequest();
req.setDevEui(this.props.device.getDevEui());
req.setStart(startPb);
req.setEnd(endPb);
req.setAggregation(agg);
DeviceStore.getStats(req, (resp: GetDeviceStatsResponse) => {
let statsUp: {
labels: string[];
datasets: {
label: string;
borderColor: string;
backgroundColor: string;
lineTension: number;
pointBackgroundColor: string;
data: number[];
}[];
} = {
labels: [],
datasets: [
{
label: "uplink",
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: [],
},
],
};
let statsErrors: {
labels: string[];
datasets: {
label: string;
data: number[];
backgroundColor: string;
}[];
} = {
labels: [],
datasets: [],
};
let statsErrorsSet: {
[key: string]: number[];
} = {};
let statsUpDr: {
labels: string[];
datasets: {
label: string;
data: number[];
backgroundColor: string;
}[];
} = {
labels: [],
datasets: [],
};
let statsUpDrSet: {
[key: string]: number[];
} = {};
let statsGwRssiLabels: string[] = [];
let statsGwRssiData: (number | null)[] = [];
let statsGwRssi = {
labels: statsGwRssiLabels,
datasets: [
{
label: "rssi (reported by gateways)",
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: statsGwRssiData,
},
],
};
let statsGwSnrLabels: string[] = [];
let statsGwSnrData: (number | null)[] = [];
let statsGwSnr = {
labels: statsGwSnrLabels,
datasets: [
{
label: "rssi (reported by gateways)",
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: statsGwSnrData,
},
],
};
let statsUpFreq: HeatmapStats[] = [];
for (const row of resp.getResultList()) {
statsUp.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsUp.datasets[0].data.push(row.getRxPackets());
statsUpFreq.push({
x: moment(row.getTime()!.toDate()).format("YYYY-MM-DD"),
y: row
.getRxPacketsPerFrequencyMap()
.toObject()
.map(v => [v[0].toString(), v[1]]),
});
statsErrors.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsUpDr.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsGwRssi.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsGwSnr.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
if (row.getRxPackets() !== 0) {
statsGwRssi.datasets[0].data.push(row.getGwRssi());
statsGwSnr.datasets[0].data.push(row.getGwSnr());
} else {
statsGwRssi.datasets[0].data.push(null);
statsGwSnr.datasets[0].data.push(null);
}
for (const v of row.getErrorsMap().toObject()) {
if (statsErrorsSet[v[0]] === undefined) {
statsErrorsSet[v[0]] = [];
}
// fill gaps with 0s
for (let i = statsErrorsSet[v[0]].length; i < statsErrors.labels.length - 1; i++) {
statsErrorsSet[v[0]].push(0);
}
statsErrorsSet[v[0]].push(v[1]);
}
for (const v of row.getRxPacketsPerDrMap().toObject()) {
if (statsUpDrSet[v[0]] === undefined) {
statsUpDrSet[v[0]] = [];
}
// fill gaps with 0s
for (let i = statsUpDrSet[v[0]].length; i < statsUpDr.labels.length - 1; i++) {
statsUpDrSet[v[0]].push(0);
}
statsUpDrSet[v[0]].push(v[1]);
}
}
let backgroundColors = [
"#8bc34a",
"#ff5722",
"#ff9800",
"#ffc107",
"#ffeb3b",
"#cddc39",
"#4caf50",
"#009688",
"#00bcd4",
"#03a9f4",
"#2196f3",
"#3f51b5",
"#673ab7",
"#9c27b0",
"#e91e63",
];
Object.entries(statsErrorsSet).forEach(([k, v]) => {
statsErrors.datasets.push({
label: k,
data: v,
backgroundColor: backgroundColors.shift()!,
});
});
backgroundColors = [
"#8bc34a",
"#ff5722",
"#ff9800",
"#ffc107",
"#ffeb3b",
"#cddc39",
"#4caf50",
"#009688",
"#00bcd4",
"#03a9f4",
"#2196f3",
"#3f51b5",
"#673ab7",
"#9c27b0",
"#e91e63",
];
Object.entries(statsUpDrSet).forEach(([k, v]) => {
statsUpDr.datasets.push({
label: k,
data: v,
backgroundColor: backgroundColors.shift()!,
});
});
DeviceStore.getMetrics(req, (resp: GetDeviceMetricsResponse) => {
this.setState({
statsUp: statsUp,
statsErrors: statsErrors,
statsUpFreq: statsUpFreq,
statsUpDr: statsUpDr,
statsGwRssi: statsGwRssi,
statsGwSnr: statsGwSnr,
deviceMetrics: resp,
});
});
};
loadLinkMetrics = (start: Date, end: Date, agg: Aggregation) => {
let startPb = new Timestamp();
let endPb = new Timestamp();
startPb.fromDate(start);
endPb.fromDate(end);
let req = new GetDeviceLinkMetricsRequest();
req.setDevEui(this.props.device.getDevEui());
req.setStart(startPb);
req.setEnd(endPb);
req.setAggregation(agg);
DeviceStore.getLinkMetrics(req, (resp: GetDeviceLinkMetricsResponse) => {
this.setState({
deviceLinkMetrics: resp,
});
});
};
onMetricsAggregationChange = (e: RadioChangeEvent) => {
this.setState(
{
metricsAggregation: e.target.value,
},
this.loadMetrics,
);
};
render() {
const animation: false = false;
const unit: TimeUnit = "day";
const barOptions = {
animation: animation,
plugins: {
legend: {
display: true,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
time: {
unit: unit,
},
},
},
};
const statsOptions = {
animation: animation,
plugins: {
legend: {
display: false,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
time: {
unit: unit,
},
},
},
};
if (this.state.statsUpDr === undefined) {
if (this.state.deviceLinkMetrics === undefined || this.state.deviceMetrics === undefined) {
return null;
}
let deviceMetrics = [];
{
let states = this.state.deviceMetrics.getStatesMap();
let keys = states.toArray().map(v => v[0]);
keys.sort();
for (let i = 0; i < keys.length; i += 3) {
let items = keys.slice(i, i + 3).map(k => {
let m = states.get(k)!;
return (
<Col span={8}>
<Card>
<Statistic title={m.getName()} value={m.getValue()} />
</Card>
</Col>
);
});
deviceMetrics.push(<Row gutter={24}>{items}</Row>);
}
}
{
let metrics = this.state.deviceMetrics.getMetricsMap();
let keys = metrics.toArray().map(v => v[0]);
keys.sort();
for (let i = 0; i < keys.length; i += 3) {
let items = keys.slice(i, i + 3).map(k => {
let m = metrics.get(k)!;
return (
<Col span={8}>
<MetricChart metric={m} aggregation={this.state.metricsAggregation} zeroToNull />
</Col>
);
});
deviceMetrics.push(<Row gutter={24}>{items}</Row>);
}
}
let lastSeenAt = "Never";
if (this.props.lastSeenAt !== undefined) {
lastSeenAt = moment(this.props.lastSeenAt).format("YYYY-MM-DD HH:mm:ss");
}
const aggregations = (
<Space direction="horizontal">
<Radio.Group value={this.state.metricsAggregation} onChange={this.onMetricsAggregationChange} size="small">
<Radio.Button value={Aggregation.HOUR}>24h</Radio.Button>
<Radio.Button value={Aggregation.DAY}>31d</Radio.Button>
<Radio.Button value={Aggregation.MONTH}>1y</Radio.Button>
</Radio.Group>
<Button type="primary" size="small" icon={<ReloadOutlined />} onClick={this.loadMetrics} />
</Space>
);
return (
<Space direction="vertical" style={{ width: "100%" }} size="large">
<Card>
@ -337,42 +191,63 @@ class DeviceDashboard extends Component<IProps, IState> {
<Descriptions.Item label="Description">{this.props.device.getDescription()}</Descriptions.Item>
</Descriptions>
</Card>
<Row gutter={24}>
<Col span={12}>
<Card title="Received" className="dashboard-chart">
<Line height={75} options={statsOptions} data={this.state.statsUp} />
</Card>
</Col>
<Col span={12}>
<Card title="Errors" className="dashboard-chart">
<Bar data={this.state.statsErrors} options={barOptions} />
</Card>
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="SNR" className="dashboard-chart">
<Line height={75} options={statsOptions} data={this.state.statsGwSnr} />
</Card>
</Col>
<Col span={12}>
<Card title="RSSI" className="dashboard-chart">
<Line height={75} options={statsOptions} data={this.state.statsGwRssi} />
</Card>
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="Received / frequency" className="dashboard-chart">
<Heatmap data={this.state.statsUpFreq} fromColor="rgb(227, 242, 253)" toColor="rgb(33, 150, 243, 1)" />
</Card>
</Col>
<Col span={12}>
<Card title="Received / DR" className="dashboard-chart">
<Bar data={this.state.statsUpDr} options={barOptions} />
</Card>
</Col>
</Row>
<Tabs tabBarExtraContent={aggregations}>
<Tabs.TabPane tab="Link metrics" key="1">
<Space direction="vertical" style={{ width: "100%" }} size="large">
<Row gutter={24}>
<Col span={8}>
<MetricChart
metric={this.state.deviceLinkMetrics.getRxPackets()!}
aggregation={this.state.metricsAggregation}
/>
</Col>
<Col span={8}>
<MetricChart
metric={this.state.deviceLinkMetrics.getGwRssi()!}
aggregation={this.state.metricsAggregation}
zeroToNull
/>
</Col>
<Col span={8}>
<MetricChart
metric={this.state.deviceLinkMetrics.getGwSnr()!}
aggregation={this.state.metricsAggregation}
zeroToNull
/>
</Col>
</Row>
<Row gutter={24}>
<Col span={8}>
<MetricHeatmap
metric={this.state.deviceLinkMetrics.getRxPacketsPerFreq()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
<Col span={8}>
<MetricHeatmap
metric={this.state.deviceLinkMetrics.getRxPacketsPerDr()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
<Col span={8}>
<MetricBar
metric={this.state.deviceLinkMetrics.getErrors()!}
aggregation={this.state.metricsAggregation}
/>
</Col>
</Row>
</Space>
</Tabs.TabPane>
<Tabs.TabPane tab="Device metrics" key="2">
<Space direction="vertical" style={{ width: "100%" }} size="large">
{deviceMetrics}
</Space>
</Tabs.TabPane>
</Tabs>
</Space>
);
}

View File

@ -2,24 +2,20 @@ import React, { Component } from "react";
import moment from "moment";
import { Descriptions, Space, Card, Row, Col } from "antd";
import { TimeUnit } from "chart.js";
import { Line, Bar } from "react-chartjs-2";
import { Timestamp } from "google-protobuf/google/protobuf/timestamp_pb";
import {
Gateway,
GetGatewayStatsRequest,
GetGatewayStatsResponse,
GetGatewayMetricsRequest,
GetGatewayMetricsResponse,
} from "@chirpstack/chirpstack-api-grpc-web/api/gateway_pb";
import { Aggregation } from "@chirpstack/chirpstack-api-grpc-web/common/common_pb";
import GatewayStore from "../../stores/GatewayStore";
import Map, { Marker } from "../../components/Map";
import Heatmap from "../../components/Heatmap";
interface HeatmapStats {
x: string;
y: Array<[string, number]>;
}
import MetricChart from "../../components/MetricChart";
import MetricHeatmap from "../../components/MetricHeatmap";
import MetricBar from "../../components/MetricBar";
interface IProps {
gateway: Gateway;
@ -27,13 +23,8 @@ interface IProps {
}
interface IState {
statsUp?: any;
statsDown?: any;
statsUpFreq: HeatmapStats[];
statsDownFreq: HeatmapStats[];
statsUpDr: HeatmapStats[];
statsDownDr: HeatmapStats[];
statsDownStatus?: any;
metricsAggregation: Aggregation;
gatewayMetrics?: GetGatewayMetricsResponse;
}
class GatewayDashboard extends Component<IProps, IState> {
@ -41,187 +32,42 @@ class GatewayDashboard extends Component<IProps, IState> {
super(props);
this.state = {
statsUpFreq: [],
statsDownFreq: [],
statsUpDr: [],
statsDownDr: [],
metricsAggregation: Aggregation.DAY,
};
}
componentDidMount() {
this.loadStats();
this.loadMetrics();
}
loadStats = () => {
const end = moment().toDate();
const start = moment().subtract(30, "days").toDate();
loadMetrics = () => {
const agg = this.state.metricsAggregation;
const end = moment();
let start = moment();
if (agg === Aggregation.DAY) {
start = start.subtract(30, "days");
} else if (agg === Aggregation.HOUR) {
start = start.subtract(24, "hours");
} else if (agg === Aggregation.MONTH) {
start = start.subtract(12, "months");
}
let startPb = new Timestamp();
let endPb = new Timestamp();
startPb.fromDate(start);
endPb.fromDate(end);
startPb.fromDate(start.toDate());
endPb.fromDate(end.toDate());
let req = new GetGatewayStatsRequest();
let req = new GetGatewayMetricsRequest();
req.setGatewayId(this.props.gateway.getGatewayId());
req.setStart(startPb);
req.setEnd(endPb);
req.setAggregation(agg);
GatewayStore.getStats(req, (resp: GetGatewayStatsResponse) => {
let statsUp: {
labels: string[];
datasets: {
label: string;
borderColor: string;
backgroundColor: string;
lineTension: number;
pointBackgroundColor: string;
data: number[];
}[];
} = {
labels: [],
datasets: [
{
label: "rx received",
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: [],
},
],
};
let statsDown: {
labels: string[];
datasets: {
label: string;
borderColor: string;
backgroundColor: string;
lineTension: number;
pointBackgroundColor: string;
data: number[];
}[];
} = {
labels: [],
datasets: [
{
label: "rx received",
borderColor: "rgba(33, 150, 243, 1)",
backgroundColor: "rgba(0, 0, 0, 0)",
lineTension: 0,
pointBackgroundColor: "rgba(33, 150, 243, 1)",
data: [],
},
],
};
let statsDownStatus: {
labels: string[];
datasets: {
label: string;
data: number[];
backgroundColor: string;
}[];
} = {
labels: [],
datasets: [],
};
let statsDownStatusSet: {
[key: string]: number[];
} = {};
let statsUpFreq: HeatmapStats[] = [];
let statsDownFreq: HeatmapStats[] = [];
let statsUpDr: HeatmapStats[] = [];
let statsDownDr: HeatmapStats[] = [];
for (const row of resp.getResultList()) {
statsUp.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsDown.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsDownStatus.labels.push(moment(row.getTime()!.toDate()).format("YYYY-MM-DD"));
statsUp.datasets[0].data.push(row.getRxPackets());
statsDown.datasets[0].data.push(row.getTxPackets());
statsUpFreq.push({
x: moment(row.getTime()!.toDate()).format("YYYY-MM-DD"),
y: row
.getRxPacketsPerFrequencyMap()
.toObject()
.map(v => [v[0].toString(), v[1]]),
});
statsDownFreq.push({
x: moment(row.getTime()!.toDate()).format("YYYY-MM-DD"),
y: row
.getTxPacketsPerFrequencyMap()
.toObject()
.map(v => [v[0].toString(), v[1]]),
});
statsUpDr.push({
x: moment(row.getTime()!.toDate()).format("YYYY-MM-DD"),
y: row
.getRxPacketsPerDrMap()
.toObject()
.map(v => [v[0].toString(), v[1]]),
});
statsDownDr.push({
x: moment(row.getTime()!.toDate()).format("YYYY-MM-DD"),
y: row
.getTxPacketsPerDrMap()
.toObject()
.map(v => [v[0].toString(), v[1]]),
});
for (const v of row.getTxPacketsPerStatusMap().toObject()) {
if (statsDownStatusSet[v[0]] === undefined) {
statsDownStatusSet[v[0]] = [];
}
// fill gaps with 0s
for (let i = statsDownStatusSet[v[0]].length; i < statsDownStatus.labels.length - 1; i++) {
statsDownStatusSet[v[0]].push(0);
}
statsDownStatusSet[v[0]].push(v[1]);
}
}
let backgroundColors = [
"#8bc34a",
"#ff5722",
"#ff9800",
"#ffc107",
"#ffeb3b",
"#cddc39",
"#4caf50",
"#009688",
"#00bcd4",
"#03a9f4",
"#2196f3",
"#3f51b5",
"#673ab7",
"#9c27b0",
"#e91e63",
];
Object.entries(statsDownStatusSet).forEach(([k, v]) => {
statsDownStatus.datasets.push({
label: k,
data: v,
backgroundColor: backgroundColors.shift()!,
});
});
GatewayStore.getMetrics(req, (resp: GetGatewayMetricsResponse) => {
this.setState({
statsUp: statsUp,
statsDown: statsDown,
statsUpFreq: statsUpFreq,
statsDownFreq: statsDownFreq,
statsUpDr: statsUpDr,
statsDownDr: statsDownDr,
statsDownStatus: statsDownStatus,
gatewayMetrics: resp,
});
});
};
@ -230,50 +76,7 @@ class GatewayDashboard extends Component<IProps, IState> {
const loc = this.props.gateway.getLocation()!;
const location: [number, number] = [loc.getLatitude(), loc.getLongitude()];
const animation: false = false;
const unit: TimeUnit = "day";
const barOptions = {
animation: animation,
plugins: {
legend: {
display: true,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
time: {
unit: unit,
},
},
},
};
const statsOptions = {
animation: animation,
plugins: {
legend: {
display: false,
},
},
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
},
x: {
time: {
unit: unit,
},
},
},
};
if (this.state.statsUp === undefined) {
if (this.state.gatewayMetrics === undefined) {
return null;
}
@ -304,46 +107,59 @@ class GatewayDashboard extends Component<IProps, IState> {
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="Received" className="dashboard-chart">
<Line height={75} options={statsOptions} data={this.state.statsUp} />
</Card>
<Col span={8}>
<MetricChart
metric={this.state.gatewayMetrics.getRxPackets()!}
aggregation={this.state.metricsAggregation}
/>
</Col>
<Col span={12}>
<Card title="Transmitted" className="dashboard-chart">
<Line height={75} options={statsOptions} data={this.state.statsDown} />
</Card>
<Col span={8}>
<MetricChart
metric={this.state.gatewayMetrics.getTxPackets()!}
aggregation={this.state.metricsAggregation}
/>
</Col>
<Col span={8}>
<MetricHeatmap
metric={this.state.gatewayMetrics.getRxPacketsPerFreq()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="Received / frequency" className="dashboard-chart">
<Heatmap data={this.state.statsUpFreq} fromColor="rgb(227, 242, 253)" toColor="rgb(33, 150, 243, 1)" />
</Card>
<Col span={8}>
<MetricHeatmap
metric={this.state.gatewayMetrics.getTxPacketsPerFreq()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
<Col span={12}>
<Card title="Transmitted / frequency" className="dashboard-chart">
<Heatmap data={this.state.statsDownFreq} fromColor="rgb(227, 242, 253)" toColor="rgb(33, 150, 243, 1)" />
</Card>
<Col span={8}>
<MetricHeatmap
metric={this.state.gatewayMetrics.getRxPacketsPerDr()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
<Col span={8}>
<MetricHeatmap
metric={this.state.gatewayMetrics.getTxPacketsPerDr()!}
aggregation={this.state.metricsAggregation}
fromColor="rgb(227, 242, 253)"
toColor="rgb(33, 150, 243, 1)"
/>
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="Received / DR" className="dashboard-chart">
<Heatmap data={this.state.statsUpDr} fromColor="rgb(227, 242, 253)" toColor="rgb(33, 150, 243, 1)" />
</Card>
</Col>
<Col span={12}>
<Card title="Transmitted / DR" className="dashboard-chart">
<Heatmap data={this.state.statsDownDr} fromColor="rgb(227, 242, 253)" toColor="rgb(33, 150, 243, 1)" />
</Card>
</Col>
</Row>
<Row gutter={24}>
<Col span={12}>
<Card title="Transmission / Ack status" className="dashboard-chart">
<Bar data={this.state.statsDownStatus} options={barOptions} />
</Card>
<Col span={8}>
<MetricBar
metric={this.state.gatewayMetrics.getTxPacketsPerStatus()!}
aggregation={this.state.metricsAggregation}
/>
</Col>
</Row>
</Space>

View File

@ -1881,7 +1881,7 @@
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@chirpstack/chirpstack-api-grpc-web@file:../api/grpc-web":
version "4.0.0-test.5"
version "4.0.0-test.6"
dependencies:
"@types/google-protobuf" "^3.15.2"
google-protobuf "^3.17.3"