From 2464617599d9b620af80f6c9df98b47c898594d3 Mon Sep 17 00:00:00 2001 From: laoboli <1293528695@qq.com> Date: Tue, 28 Apr 2026 15:29:16 +0800 Subject: [PATCH] feat: mqtt receive. --- config.sample.yaml | 10 + config/config.go | 17 +- go.mod | 2 + go.sum | 4 + main.go | 9 + models/mqtt_data.go | 57 + mqtt/listener.go | 300 +++++ proto/hr_packet_v2.pb.go | 2233 ++++++++++++++++++++++++++++++++++++++ proto/hr_packet_v2.proto | 190 ++++ 9 files changed, 2820 insertions(+), 2 deletions(-) create mode 100644 models/mqtt_data.go create mode 100644 mqtt/listener.go create mode 100644 proto/hr_packet_v2.pb.go create mode 100644 proto/hr_packet_v2.proto diff --git a/config.sample.yaml b/config.sample.yaml index 32837dd..d58bbb9 100644 --- a/config.sample.yaml +++ b/config.sample.yaml @@ -8,3 +8,13 @@ ai: base_url: https://api.lkeap.cloud.tencent.com/v1 api_key: "" model: deepseek-v3.2 +mqtt: + enabled: true + host: mqtt.weihua-iot.cn + port: 10237 + username: public_client + password: uXC3M4ObO9KpdU + client_id_prefix: hr-receiver + region: "+" + use_tls: true + qos: 0 diff --git a/config/config.go b/config/config.go index a4536dc..f144d4a 100644 --- a/config/config.go +++ b/config/config.go @@ -26,9 +26,22 @@ type AIConfig struct { Model string `mapstructure:"model" yaml:"model"` } +type MQTTConfig struct { + Enabled bool `mapstructure:"enabled" yaml:"enabled"` + Host string `mapstructure:"host" yaml:"host"` + Port int `mapstructure:"port" yaml:"port"` + Username string `mapstructure:"username" yaml:"username"` + Password string `mapstructure:"password" yaml:"password"` + ClientIDPrefix string `mapstructure:"client_id_prefix" yaml:"client_id_prefix"` + Region string `mapstructure:"region" yaml:"region"` + UseTLS bool `mapstructure:"use_tls" yaml:"use_tls"` + QoS int `mapstructure:"qos" yaml:"qos"` +} + type AppConfig struct { - DB DBConfig `mapstructure:"database" yaml:"database"` - AI AIConfig `mapstructure:"ai" yaml:"ai"` + DB DBConfig `mapstructure:"database" yaml:"database"` + AI AIConfig `mapstructure:"ai" yaml:"ai"` + MQTT MQTTConfig `mapstructure:"mqtt" yaml:"mqtt"` } func InitConfig() { diff --git a/go.mod b/go.mod index 014e865..f2b87d1 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/bytedance/sonic/loader v0.1.1 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect + github.com/eclipse/paho.mqtt.golang v1.5.0 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fumiama/imgsz v0.0.2 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect @@ -28,6 +29,7 @@ require ( github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect github.com/jackc/pgx/v5 v5.5.5 // indirect diff --git a/go.sum b/go.sum index fcf4a27..ac1fc8a 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,8 @@ github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o= +github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= @@ -40,6 +42,8 @@ github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVI github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= diff --git a/main.go b/main.go index ac52e3d..f109f18 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,9 @@ package main import ( "hr_receiver/config" "hr_receiver/models" + "hr_receiver/mqtt" "hr_receiver/routes" + "log" ) func main() { @@ -25,8 +27,15 @@ func main() { &models.StepStrideFreq{}, &models.RegressionResult{}, &models.User{}, + &models.MqttHeartRateRecord{}, + &models.MqttStepCountRecord{}, + &models.MqttGatewayStatusRecord{}, ) + if err := mqtt.Start(config.DB, config.App.MQTT); err != nil { + log.Printf("mqtt listener start failed: %v", err) + } + // 启动服务 r := routes.SetupRouter() r.Run(":8081") diff --git a/models/mqtt_data.go b/models/mqtt_data.go new file mode 100644 index 0000000..be0330d --- /dev/null +++ b/models/mqtt_data.go @@ -0,0 +1,57 @@ +package models + +import "gorm.io/gorm" + +type MqttHeartRateRecord struct { + gorm.Model + Identifier string `gorm:"uniqueIndex;size:255" json:"identifier"` + Topic string `gorm:"size:255;index" json:"topic"` + RegionID uint32 `gorm:"index" json:"regionId"` + GatewayMAC string `gorm:"size:32;index" json:"gatewayMac"` + BandID uint32 `gorm:"index" json:"bandId"` + BeltAddr string `gorm:"size:64;index" json:"beltAddr"` + PacketNum uint32 `gorm:"index" json:"packetNum"` + HeartRate int `gorm:"type:int" json:"heartRate"` + HrConfidence int `gorm:"type:int" json:"hrConfidence"` + IsActive bool `json:"isActive"` + IsOnSkin bool `json:"isOnSkin"` + Battery uint32 `json:"battery"` + SignalRSSINeg float64 `gorm:"type:double precision" json:"signalRssiNeg"` + SNR float64 `gorm:"type:double precision" json:"snr"` + HubBusID uint32 `json:"hubBusId"` + HubSubDevID uint32 `json:"hubSubDevId"` + ReceivedAt int64 `gorm:"type:bigint;index" json:"receivedAt"` +} + +type MqttStepCountRecord struct { + gorm.Model + Identifier string `gorm:"uniqueIndex;size:255" json:"identifier"` + Topic string `gorm:"size:255;index" json:"topic"` + RegionID uint32 `gorm:"index" json:"regionId"` + GatewayMAC string `gorm:"size:32;index" json:"gatewayMac"` + BandID uint32 `gorm:"index" json:"bandId"` + BeltAddr string `gorm:"size:64;index" json:"beltAddr"` + PacketNum uint32 `gorm:"index" json:"packetNum"` + StepCount uint32 `json:"stepCount"` + SignalRSSINeg float64 `gorm:"type:double precision" json:"signalRssiNeg"` + SNR float64 `gorm:"type:double precision" json:"snr"` + HubBusID uint32 `json:"hubBusId"` + HubSubDevID uint32 `json:"hubSubDevId"` + ReceivedAt int64 `gorm:"type:bigint;index" json:"receivedAt"` +} + +type MqttGatewayStatusRecord struct { + gorm.Model + Identifier string `gorm:"uniqueIndex;size:255" json:"identifier"` + Topic string `gorm:"size:255;index" json:"topic"` + RegionID uint32 `gorm:"index" json:"regionId"` + GatewayMAC string `gorm:"size:32;index" json:"gatewayMac"` + BootCount uint32 `json:"bootCount"` + UptimeMs uint32 `json:"uptimeMs"` + DurationMsSinceLastPacket uint32 `json:"durationMsSinceLastPacket"` + RxCount uint32 `json:"rxCount"` + BatteryVoltageMV uint32 `json:"batteryVoltageMv"` + BatterySOCPercentage uint32 `json:"batterySocPercentage"` + ChargingRatePercentage int32 `json:"chargingRatePercentage"` + ReceivedAt int64 `gorm:"type:bigint;index" json:"receivedAt"` +} diff --git a/mqtt/listener.go b/mqtt/listener.go new file mode 100644 index 0000000..83c7bce --- /dev/null +++ b/mqtt/listener.go @@ -0,0 +1,300 @@ +package mqtt + +import ( + "crypto/tls" + "fmt" + "hr_receiver/config" + "hr_receiver/models" + whgw_hrpb "hr_receiver/proto" + "log" + "strings" + "time" + + mqtt "github.com/eclipse/paho.mqtt.golang" + "google.golang.org/protobuf/proto" + "gorm.io/gorm" + "gorm.io/gorm/clause" +) + +const ( + defaultQueueSize = 2048 + defaultWorkers = 4 +) + +type Listener struct { + db *gorm.DB + cfg config.MQTTConfig + client mqtt.Client + writeCh chan interface{} +} + +func Start(db *gorm.DB, cfg config.MQTTConfig) error { + if !cfg.Enabled { + log.Println("mqtt listener disabled") + return nil + } + if err := validateConfig(cfg); err != nil { + return err + } + + listener := &Listener{ + db: db, + cfg: cfg, + writeCh: make(chan interface{}, defaultQueueSize), + } + + for i := 0; i < defaultWorkers; i++ { + go listener.writeWorker() + } + + if err := listener.connect(); err != nil { + return err + } + return nil +} + +func validateConfig(cfg config.MQTTConfig) error { + if cfg.Host == "" { + return fmt.Errorf("missing config: mqtt.host") + } + if cfg.Port == 0 { + return fmt.Errorf("missing config: mqtt.port") + } + if cfg.Region == "" { + return fmt.Errorf("missing config: mqtt.region") + } + if cfg.ClientIDPrefix == "" { + return fmt.Errorf("missing config: mqtt.client_id_prefix") + } + return nil +} + +func (l *Listener) connect() error { + opts := mqtt.NewClientOptions() + scheme := "tcp" + if l.cfg.UseTLS { + scheme = "ssl" + opts.SetTLSConfig(&tls.Config{MinVersion: tls.VersionTLS12}) + } + broker := fmt.Sprintf("%s://%s:%d", scheme, l.cfg.Host, l.cfg.Port) + opts.AddBroker(broker) + opts.SetClientID(fmt.Sprintf("%s-%d", l.cfg.ClientIDPrefix, time.Now().UnixNano())) + opts.SetUsername(l.cfg.Username) + opts.SetPassword(l.cfg.Password) + opts.SetKeepAlive(60 * time.Second) + opts.SetAutoReconnect(true) + opts.SetConnectRetry(true) + opts.SetConnectRetryInterval(5 * time.Second) + opts.SetOnConnectHandler(func(client mqtt.Client) { + if err := l.subscribe(client); err != nil { + log.Printf("mqtt subscribe failed: %v", err) + return + } + log.Printf("mqtt connected to %s", broker) + }) + opts.SetConnectionLostHandler(func(client mqtt.Client, err error) { + log.Printf("mqtt connection lost: %v", err) + }) + opts.SetDefaultPublishHandler(l.handleMessage) + + l.client = mqtt.NewClient(opts) + token := l.client.Connect() + if !token.WaitTimeout(15 * time.Second) { + return fmt.Errorf("mqtt connect timeout") + } + return token.Error() +} + +func (l *Listener) subscribe(client mqtt.Client) error { + topics := []string{ + fmt.Sprintf("/whgw/v2/region/%s/measurement/band/+/hr", l.cfg.Region), + fmt.Sprintf("/whgw/v2/region/%s/measurement/band/+/step", l.cfg.Region), + fmt.Sprintf("/whgw/v2/region/%s/gateway/+/status", l.cfg.Region), + } + for _, topic := range topics { + token := client.Subscribe(topic, byte(l.cfg.QoS), l.handleMessage) + if !token.WaitTimeout(10 * time.Second) { + return fmt.Errorf("mqtt subscribe timeout for topic %s", topic) + } + if err := token.Error(); err != nil { + return fmt.Errorf("mqtt subscribe topic %s: %w", topic, err) + } + log.Printf("mqtt subscribed: %s", topic) + } + return nil +} + +func (l *Listener) handleMessage(_ mqtt.Client, msg mqtt.Message) { + defer func() { + if r := recover(); r != nil { + log.Printf("mqtt message handling panic, topic=%s err=%v", msg.Topic(), r) + } + }() + + if len(msg.Payload()) == 0 { + return + } + + var packet whgw_hrpb.GatewaySlaveOutCloudMasterInMsg + if err := proto.Unmarshal(msg.Payload(), &packet); err != nil { + log.Printf("mqtt payload parse failed, topic=%s err=%v", msg.Topic(), err) + return + } + + now := time.Now().UnixMilli() + switch payload := packet.Choice.(type) { + case *whgw_hrpb.GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement: + record := buildHeartRateRecord(payload.NtfHrMeasurement, msg.Topic(), now) + l.enqueue(&record) + case *whgw_hrpb.GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement: + record := buildStepCountRecord(payload.NtfStepCountMeasurement, msg.Topic(), now) + l.enqueue(&record) + case *whgw_hrpb.GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus: + record := buildGatewayStatusRecord(payload.NtfGatewayStatus, msg.Topic(), now) + l.enqueue(&record) + default: + log.Printf("mqtt payload ignored, unsupported type on topic=%s", msg.Topic()) + } +} + +func (l *Listener) enqueue(record interface{}) { + select { + case l.writeCh <- record: + default: + log.Printf("mqtt write queue full, dropping record of type %T", record) + } +} + +func (l *Listener) writeWorker() { + for record := range l.writeCh { + func() { + defer func() { + if r := recover(); r != nil { + log.Printf("mqtt record persist panic, type=%T err=%v", record, r) + } + }() + + if err := l.db.Clauses(clause.OnConflict{DoNothing: true}).Create(record).Error; err != nil { + log.Printf("mqtt record persist failed, type=%T err=%v", record, err) + } + }() + } +} + +func buildHeartRateRecord(measurement *whgw_hrpb.HrMeasurement, topic string, now int64) models.MqttHeartRateRecord { + regionID := measurement.GetGatewayInfo().GetRegionId() + if regionID == 0 { + regionID = parseRegionFromTopic(topic) + } + gatewayMAC := formatMAC(measurement.GetGatewayInfo().GetGatewayMac()) + packet := measurement.GetHrPacket() + rssi, snr := parsePacketStatus(measurement.GetPacketStatus()) + beltAddr := fmt.Sprintf("%d-%d", regionID, packet.GetId()) + + return models.MqttHeartRateRecord{ + Identifier: fmt.Sprintf("hr:%d:%s:%d:%d", regionID, gatewayMAC, packet.GetId(), packet.GetPacketNum()), + Topic: topic, + RegionID: regionID, + GatewayMAC: gatewayMAC, + BandID: packet.GetId(), + BeltAddr: beltAddr, + PacketNum: packet.GetPacketNum(), + HeartRate: int(packet.GetHr()), + HrConfidence: int(packet.GetStatus().GetHrConfidence().Number()), + IsActive: packet.GetStatus().GetIsActive(), + IsOnSkin: packet.GetStatus().GetIsOnSkin(), + Battery: packet.GetStatus().GetBattery(), + SignalRSSINeg: rssi, + SNR: snr, + HubBusID: measurement.GetHubInfo().GetBusId(), + HubSubDevID: measurement.GetHubInfo().GetSubDevId(), + ReceivedAt: now, + } +} + +func buildStepCountRecord(measurement *whgw_hrpb.StepCountMeasurement, topic string, now int64) models.MqttStepCountRecord { + regionID := measurement.GetGatewayInfo().GetRegionId() + if regionID == 0 { + regionID = parseRegionFromTopic(topic) + } + gatewayMAC := formatMAC(measurement.GetGatewayInfo().GetGatewayMac()) + packet := measurement.GetStepCountPacket() + rssi, snr := parsePacketStatus(measurement.GetPacketStatus()) + beltAddr := fmt.Sprintf("%d-%d", regionID, packet.GetId()) + + return models.MqttStepCountRecord{ + Identifier: fmt.Sprintf("step:%d:%s:%d:%d", regionID, gatewayMAC, packet.GetId(), packet.GetPacketNum()), + Topic: topic, + RegionID: regionID, + GatewayMAC: gatewayMAC, + BandID: packet.GetId(), + BeltAddr: beltAddr, + PacketNum: packet.GetPacketNum(), + StepCount: packet.GetStepCount(), + SignalRSSINeg: rssi, + SNR: snr, + HubBusID: measurement.GetHubInfo().GetBusId(), + HubSubDevID: measurement.GetHubInfo().GetSubDevId(), + ReceivedAt: now, + } +} + +func buildGatewayStatusRecord(status *whgw_hrpb.GatewayStatus, topic string, now int64) models.MqttGatewayStatusRecord { + regionID := status.GetInfo().GetRegionId() + if regionID == 0 { + regionID = parseRegionFromTopic(topic) + } + gatewayMAC := formatMAC(status.GetInfo().GetGatewayMac()) + + return models.MqttGatewayStatusRecord{ + Identifier: fmt.Sprintf("gateway:%d:%s:%d:%d:%d", regionID, gatewayMAC, status.GetStat().GetBootCount(), status.GetStat().GetUptimeMs(), status.GetStat().GetRxCount()), + Topic: topic, + RegionID: regionID, + GatewayMAC: gatewayMAC, + BootCount: status.GetStat().GetBootCount(), + UptimeMs: status.GetStat().GetUptimeMs(), + DurationMsSinceLastPacket: status.GetStat().GetDurationMsSinceLastPacket(), + RxCount: status.GetStat().GetRxCount(), + BatteryVoltageMV: status.GetStat().GetBatteryInfo().GetVoltageMv(), + BatterySOCPercentage: status.GetStat().GetBatteryInfo().GetSocPercentage(), + ChargingRatePercentage: status.GetStat().GetBatteryInfo().GetChargingRatePercentage(), + ReceivedAt: now, + } +} + +func parsePacketStatus(status *whgw_hrpb.IPacketStatus) (float64, float64) { + if status == nil { + return 0, 0 + } + if parsed := status.GetParsed(); parsed != nil { + return float64(parsed.GetSignalRssiNeg()), float64(parsed.GetSnrPkt()) + } + if raw := status.GetRaw(); raw != nil { + return -float64(raw.GetSignalRssiX2Neg()) / 2, float64(raw.GetSnrPktX4()) / 4 + } + return 0, 0 +} + +func formatMAC(data []byte) string { + if len(data) == 0 { + return "" + } + parts := make([]string, 0, len(data)) + for _, b := range data { + parts = append(parts, fmt.Sprintf("%02x", b)) + } + return strings.Join(parts, ":") +} + +func parseRegionFromTopic(topic string) uint32 { + parts := strings.Split(topic, "/") + for i := 0; i < len(parts)-1; i++ { + if parts[i] == "region" { + var region uint32 + if _, err := fmt.Sscanf(parts[i+1], "%d", ®ion); err == nil { + return region + } + } + } + return 0 +} diff --git a/proto/hr_packet_v2.pb.go b/proto/hr_packet_v2.pb.go new file mode 100644 index 0000000..54d4af1 --- /dev/null +++ b/proto/hr_packet_v2.pb.go @@ -0,0 +1,2233 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc v5.28.3 +// source: proto/hr_packet_v2.proto + +package whgw_hrpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type HrConfidence int32 + +const ( + HrConfidence_ZERO HrConfidence = 0 + HrConfidence_LOW HrConfidence = 1 + HrConfidence_MEDIUM HrConfidence = 2 + HrConfidence_HIGH HrConfidence = 3 +) + +// Enum value maps for HrConfidence. +var ( + HrConfidence_name = map[int32]string{ + 0: "ZERO", + 1: "LOW", + 2: "MEDIUM", + 3: "HIGH", + } + HrConfidence_value = map[string]int32{ + "ZERO": 0, + "LOW": 1, + "MEDIUM": 2, + "HIGH": 3, + } +) + +func (x HrConfidence) Enum() *HrConfidence { + p := new(HrConfidence) + *p = x + return p +} + +func (x HrConfidence) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HrConfidence) Descriptor() protoreflect.EnumDescriptor { + return file_proto_hr_packet_v2_proto_enumTypes[0].Descriptor() +} + +func (HrConfidence) Type() protoreflect.EnumType { + return &file_proto_hr_packet_v2_proto_enumTypes[0] +} + +func (x HrConfidence) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HrConfidence.Descriptor instead. +func (HrConfidence) EnumDescriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{0} +} + +type LoRaBW int32 + +const ( + LoRaBW_BW_NONE LoRaBW = 0 + LoRaBW_BW_10_4 LoRaBW = 8 + LoRaBW_BW_15_6 LoRaBW = 1 + LoRaBW_BW_20_8 LoRaBW = 9 + LoRaBW_BW_31_25 LoRaBW = 2 + LoRaBW_BW_41_7 LoRaBW = 10 + LoRaBW_BW_62_5 LoRaBW = 3 + LoRaBW_BW_125_0 LoRaBW = 4 + LoRaBW_BW_250_0 LoRaBW = 5 + LoRaBW_BW_500_0 LoRaBW = 6 +) + +// Enum value maps for LoRaBW. +var ( + LoRaBW_name = map[int32]string{ + 0: "BW_NONE", + 8: "BW_10_4", + 1: "BW_15_6", + 9: "BW_20_8", + 2: "BW_31_25", + 10: "BW_41_7", + 3: "BW_62_5", + 4: "BW_125_0", + 5: "BW_250_0", + 6: "BW_500_0", + } + LoRaBW_value = map[string]int32{ + "BW_NONE": 0, + "BW_10_4": 8, + "BW_15_6": 1, + "BW_20_8": 9, + "BW_31_25": 2, + "BW_41_7": 10, + "BW_62_5": 3, + "BW_125_0": 4, + "BW_250_0": 5, + "BW_500_0": 6, + } +) + +func (x LoRaBW) Enum() *LoRaBW { + p := new(LoRaBW) + *p = x + return p +} + +func (x LoRaBW) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LoRaBW) Descriptor() protoreflect.EnumDescriptor { + return file_proto_hr_packet_v2_proto_enumTypes[1].Descriptor() +} + +func (LoRaBW) Type() protoreflect.EnumType { + return &file_proto_hr_packet_v2_proto_enumTypes[1] +} + +func (x LoRaBW) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LoRaBW.Descriptor instead. +func (LoRaBW) EnumDescriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{1} +} + +type PacketKind int32 + +const ( + PacketKind_NTF PacketKind = 0 + PacketKind_SIG PacketKind = 1 + PacketKind_INF PacketKind = 2 + PacketKind_CNF PacketKind = 3 + PacketKind_REQ PacketKind = 4 + PacketKind_RSP PacketKind = 5 +) + +// Enum value maps for PacketKind. +var ( + PacketKind_name = map[int32]string{ + 0: "NTF", + 1: "SIG", + 2: "INF", + 3: "CNF", + 4: "REQ", + 5: "RSP", + } + PacketKind_value = map[string]int32{ + "NTF": 0, + "SIG": 1, + "INF": 2, + "CNF": 3, + "REQ": 4, + "RSP": 5, + } +) + +func (x PacketKind) Enum() *PacketKind { + p := new(PacketKind) + *p = x + return p +} + +func (x PacketKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PacketKind) Descriptor() protoreflect.EnumDescriptor { + return file_proto_hr_packet_v2_proto_enumTypes[2].Descriptor() +} + +func (PacketKind) Type() protoreflect.EnumType { + return &file_proto_hr_packet_v2_proto_enumTypes[2] +} + +func (x PacketKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PacketKind.Descriptor instead. +func (PacketKind) EnumDescriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{2} +} + +type GatewayConfigEntryKind int32 + +const ( + GatewayConfigEntryKind_REGION_ID GatewayConfigEntryKind = 0 + GatewayConfigEntryKind_WIFI_SSID GatewayConfigEntryKind = 1 + GatewayConfigEntryKind_WIFI_PASSWORD GatewayConfigEntryKind = 2 +) + +// Enum value maps for GatewayConfigEntryKind. +var ( + GatewayConfigEntryKind_name = map[int32]string{ + 0: "REGION_ID", + 1: "WIFI_SSID", + 2: "WIFI_PASSWORD", + } + GatewayConfigEntryKind_value = map[string]int32{ + "REGION_ID": 0, + "WIFI_SSID": 1, + "WIFI_PASSWORD": 2, + } +) + +func (x GatewayConfigEntryKind) Enum() *GatewayConfigEntryKind { + p := new(GatewayConfigEntryKind) + *p = x + return p +} + +func (x GatewayConfigEntryKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GatewayConfigEntryKind) Descriptor() protoreflect.EnumDescriptor { + return file_proto_hr_packet_v2_proto_enumTypes[3].Descriptor() +} + +func (GatewayConfigEntryKind) Type() protoreflect.EnumType { + return &file_proto_hr_packet_v2_proto_enumTypes[3] +} + +func (x GatewayConfigEntryKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GatewayConfigEntryKind.Descriptor instead. +func (GatewayConfigEntryKind) EnumDescriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{3} +} + +type LoRaParameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bw LoRaBW `protobuf:"varint,1,opt,name=bw,proto3,enum=whgw_hr.LoRaBW" json:"bw,omitempty"` + Sf uint32 `protobuf:"varint,2,opt,name=sf,proto3" json:"sf,omitempty"` + FrequencyMhz float32 `protobuf:"fixed32,3,opt,name=frequency_mhz,json=frequencyMhz,proto3" json:"frequency_mhz,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoRaParameters) Reset() { + *x = LoRaParameters{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoRaParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoRaParameters) ProtoMessage() {} + +func (x *LoRaParameters) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoRaParameters.ProtoReflect.Descriptor instead. +func (*LoRaParameters) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{0} +} + +func (x *LoRaParameters) GetBw() LoRaBW { + if x != nil { + return x.Bw + } + return LoRaBW_BW_NONE +} + +func (x *LoRaParameters) GetSf() uint32 { + if x != nil { + return x.Sf + } + return 0 +} + +func (x *LoRaParameters) GetFrequencyMhz() float32 { + if x != nil { + return x.FrequencyMhz + } + return 0 +} + +type StatusFlag struct { + state protoimpl.MessageState `protogen:"open.v1"` + HrConfidence HrConfidence `protobuf:"varint,1,opt,name=hr_confidence,json=hrConfidence,proto3,enum=whgw_hr.HrConfidence" json:"hr_confidence,omitempty"` + IsActive bool `protobuf:"varint,2,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsOnSkin bool `protobuf:"varint,3,opt,name=is_on_skin,json=isOnSkin,proto3" json:"is_on_skin,omitempty"` + Battery uint32 `protobuf:"varint,4,opt,name=battery,proto3" json:"battery,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusFlag) Reset() { + *x = StatusFlag{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusFlag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusFlag) ProtoMessage() {} + +func (x *StatusFlag) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusFlag.ProtoReflect.Descriptor instead. +func (*StatusFlag) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{1} +} + +func (x *StatusFlag) GetHrConfidence() HrConfidence { + if x != nil { + return x.HrConfidence + } + return HrConfidence_ZERO +} + +func (x *StatusFlag) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *StatusFlag) GetIsOnSkin() bool { + if x != nil { + return x.IsOnSkin + } + return false +} + +func (x *StatusFlag) GetBattery() uint32 { + if x != nil { + return x.Battery + } + return 0 +} + +type HrPacket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status *StatusFlag `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + Id uint32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + PacketNum uint32 `protobuf:"varint,3,opt,name=packet_num,json=packetNum,proto3" json:"packet_num,omitempty"` + Hr uint32 `protobuf:"varint,4,opt,name=hr,proto3" json:"hr,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HrPacket) Reset() { + *x = HrPacket{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HrPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HrPacket) ProtoMessage() {} + +func (x *HrPacket) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HrPacket.ProtoReflect.Descriptor instead. +func (*HrPacket) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{2} +} + +func (x *HrPacket) GetStatus() *StatusFlag { + if x != nil { + return x.Status + } + return nil +} + +func (x *HrPacket) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *HrPacket) GetPacketNum() uint32 { + if x != nil { + return x.PacketNum + } + return 0 +} + +func (x *HrPacket) GetHr() uint32 { + if x != nil { + return x.Hr + } + return 0 +} + +type StepCountPacket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + PacketNum uint32 `protobuf:"varint,2,opt,name=packet_num,json=packetNum,proto3" json:"packet_num,omitempty"` + StepCount uint32 `protobuf:"varint,3,opt,name=step_count,json=stepCount,proto3" json:"step_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StepCountPacket) Reset() { + *x = StepCountPacket{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StepCountPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepCountPacket) ProtoMessage() {} + +func (x *StepCountPacket) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepCountPacket.ProtoReflect.Descriptor instead. +func (*StepCountPacket) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{3} +} + +func (x *StepCountPacket) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StepCountPacket) GetPacketNum() uint32 { + if x != nil { + return x.PacketNum + } + return 0 +} + +func (x *StepCountPacket) GetStepCount() uint32 { + if x != nil { + return x.StepCount + } + return 0 +} + +type RawPacketStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignalRssiX2Neg uint32 `protobuf:"varint,1,opt,name=signal_rssi_x2_neg,json=signalRssiX2Neg,proto3" json:"signal_rssi_x2_neg,omitempty"` + SnrPktX4 int32 `protobuf:"varint,2,opt,name=snr_pkt_x4,json=snrPktX4,proto3" json:"snr_pkt_x4,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RawPacketStatus) Reset() { + *x = RawPacketStatus{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RawPacketStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawPacketStatus) ProtoMessage() {} + +func (x *RawPacketStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RawPacketStatus.ProtoReflect.Descriptor instead. +func (*RawPacketStatus) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{4} +} + +func (x *RawPacketStatus) GetSignalRssiX2Neg() uint32 { + if x != nil { + return x.SignalRssiX2Neg + } + return 0 +} + +func (x *RawPacketStatus) GetSnrPktX4() int32 { + if x != nil { + return x.SnrPktX4 + } + return 0 +} + +type PacketStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + SignalRssiNeg float32 `protobuf:"fixed32,1,opt,name=signal_rssi_neg,json=signalRssiNeg,proto3" json:"signal_rssi_neg,omitempty"` + SnrPkt float32 `protobuf:"fixed32,2,opt,name=snr_pkt,json=snrPkt,proto3" json:"snr_pkt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PacketStatus) Reset() { + *x = PacketStatus{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PacketStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PacketStatus) ProtoMessage() {} + +func (x *PacketStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PacketStatus.ProtoReflect.Descriptor instead. +func (*PacketStatus) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{5} +} + +func (x *PacketStatus) GetSignalRssiNeg() float32 { + if x != nil { + return x.SignalRssiNeg + } + return 0 +} + +func (x *PacketStatus) GetSnrPkt() float32 { + if x != nil { + return x.SnrPkt + } + return 0 +} + +type HubInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + BusId uint32 `protobuf:"varint,1,opt,name=bus_id,json=busId,proto3" json:"bus_id,omitempty"` + SubDevId uint32 `protobuf:"varint,2,opt,name=sub_dev_id,json=subDevId,proto3" json:"sub_dev_id,omitempty"` + RadioParameters *LoRaParameters `protobuf:"bytes,3,opt,name=radio_parameters,json=radioParameters,proto3" json:"radio_parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HubInfo) Reset() { + *x = HubInfo{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HubInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HubInfo) ProtoMessage() {} + +func (x *HubInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HubInfo.ProtoReflect.Descriptor instead. +func (*HubInfo) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{6} +} + +func (x *HubInfo) GetBusId() uint32 { + if x != nil { + return x.BusId + } + return 0 +} + +func (x *HubInfo) GetSubDevId() uint32 { + if x != nil { + return x.SubDevId + } + return 0 +} + +func (x *HubInfo) GetRadioParameters() *LoRaParameters { + if x != nil { + return x.RadioParameters + } + return nil +} + +type RadioData struct { + state protoimpl.MessageState `protogen:"open.v1"` + HubInfo *HubInfo `protobuf:"bytes,1,opt,name=hub_info,json=hubInfo,proto3" json:"hub_info,omitempty"` + RawPacketStatus *RawPacketStatus `protobuf:"bytes,2,opt,name=raw_packet_status,json=rawPacketStatus,proto3" json:"raw_packet_status,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RadioData) Reset() { + *x = RadioData{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RadioData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RadioData) ProtoMessage() {} + +func (x *RadioData) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RadioData.ProtoReflect.Descriptor instead. +func (*RadioData) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{7} +} + +func (x *RadioData) GetHubInfo() *HubInfo { + if x != nil { + return x.HubInfo + } + return nil +} + +func (x *RadioData) GetRawPacketStatus() *RawPacketStatus { + if x != nil { + return x.RawPacketStatus + } + return nil +} + +func (x *RadioData) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type GatewayStateReport struct { + state protoimpl.MessageState `protogen:"open.v1"` + NetworkHasConnection bool `protobuf:"varint,1,opt,name=network_has_connection,json=networkHasConnection,proto3" json:"network_has_connection,omitempty"` + NetworkHasIp bool `protobuf:"varint,2,opt,name=network_has_ip,json=networkHasIp,proto3" json:"network_has_ip,omitempty"` + NetworkHasMqttConnection bool `protobuf:"varint,3,opt,name=network_has_mqtt_connection,json=networkHasMqttConnection,proto3" json:"network_has_mqtt_connection,omitempty"` + BluetoothHasConnect bool `protobuf:"varint,4,opt,name=bluetooth_has_connect,json=bluetoothHasConnect,proto3" json:"bluetooth_has_connect,omitempty"` + ErrorCode uint32 `protobuf:"varint,5,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayStateReport) Reset() { + *x = GatewayStateReport{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayStateReport) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayStateReport) ProtoMessage() {} + +func (x *GatewayStateReport) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayStateReport.ProtoReflect.Descriptor instead. +func (*GatewayStateReport) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{8} +} + +func (x *GatewayStateReport) GetNetworkHasConnection() bool { + if x != nil { + return x.NetworkHasConnection + } + return false +} + +func (x *GatewayStateReport) GetNetworkHasIp() bool { + if x != nil { + return x.NetworkHasIp + } + return false +} + +func (x *GatewayStateReport) GetNetworkHasMqttConnection() bool { + if x != nil { + return x.NetworkHasMqttConnection + } + return false +} + +func (x *GatewayStateReport) GetBluetoothHasConnect() bool { + if x != nil { + return x.BluetoothHasConnect + } + return false +} + +func (x *GatewayStateReport) GetErrorCode() uint32 { + if x != nil { + return x.ErrorCode + } + return 0 +} + +type HubSlaveOutGatewayMasterInMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *HubSlaveOutGatewayMasterInMsg_NtfRadioData + // *HubSlaveOutGatewayMasterInMsg_NtfBatteryInfo + Choice isHubSlaveOutGatewayMasterInMsg_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HubSlaveOutGatewayMasterInMsg) Reset() { + *x = HubSlaveOutGatewayMasterInMsg{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HubSlaveOutGatewayMasterInMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HubSlaveOutGatewayMasterInMsg) ProtoMessage() {} + +func (x *HubSlaveOutGatewayMasterInMsg) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HubSlaveOutGatewayMasterInMsg.ProtoReflect.Descriptor instead. +func (*HubSlaveOutGatewayMasterInMsg) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{9} +} + +func (x *HubSlaveOutGatewayMasterInMsg) GetChoice() isHubSlaveOutGatewayMasterInMsg_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *HubSlaveOutGatewayMasterInMsg) GetNtfRadioData() *RadioData { + if x != nil { + if x, ok := x.Choice.(*HubSlaveOutGatewayMasterInMsg_NtfRadioData); ok { + return x.NtfRadioData + } + } + return nil +} + +func (x *HubSlaveOutGatewayMasterInMsg) GetNtfBatteryInfo() *BatteryInfo { + if x != nil { + if x, ok := x.Choice.(*HubSlaveOutGatewayMasterInMsg_NtfBatteryInfo); ok { + return x.NtfBatteryInfo + } + } + return nil +} + +type isHubSlaveOutGatewayMasterInMsg_Choice interface { + isHubSlaveOutGatewayMasterInMsg_Choice() +} + +type HubSlaveOutGatewayMasterInMsg_NtfRadioData struct { + NtfRadioData *RadioData `protobuf:"bytes,1,opt,name=ntf_radio_data,json=ntfRadioData,proto3,oneof"` +} + +type HubSlaveOutGatewayMasterInMsg_NtfBatteryInfo struct { + NtfBatteryInfo *BatteryInfo `protobuf:"bytes,2,opt,name=ntf_battery_info,json=ntfBatteryInfo,proto3,oneof"` +} + +func (*HubSlaveOutGatewayMasterInMsg_NtfRadioData) isHubSlaveOutGatewayMasterInMsg_Choice() {} + +func (*HubSlaveOutGatewayMasterInMsg_NtfBatteryInfo) isHubSlaveOutGatewayMasterInMsg_Choice() {} + +type GatewayMasterOutHubSlaveInMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *GatewayMasterOutHubSlaveInMsg_SigGatewayStateReport + Choice isGatewayMasterOutHubSlaveInMsg_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayMasterOutHubSlaveInMsg) Reset() { + *x = GatewayMasterOutHubSlaveInMsg{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayMasterOutHubSlaveInMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayMasterOutHubSlaveInMsg) ProtoMessage() {} + +func (x *GatewayMasterOutHubSlaveInMsg) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayMasterOutHubSlaveInMsg.ProtoReflect.Descriptor instead. +func (*GatewayMasterOutHubSlaveInMsg) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{10} +} + +func (x *GatewayMasterOutHubSlaveInMsg) GetChoice() isGatewayMasterOutHubSlaveInMsg_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *GatewayMasterOutHubSlaveInMsg) GetSigGatewayStateReport() *GatewayStateReport { + if x != nil { + if x, ok := x.Choice.(*GatewayMasterOutHubSlaveInMsg_SigGatewayStateReport); ok { + return x.SigGatewayStateReport + } + } + return nil +} + +type isGatewayMasterOutHubSlaveInMsg_Choice interface { + isGatewayMasterOutHubSlaveInMsg_Choice() +} + +type GatewayMasterOutHubSlaveInMsg_SigGatewayStateReport struct { + SigGatewayStateReport *GatewayStateReport `protobuf:"bytes,1,opt,name=sig_gateway_state_report,json=sigGatewayStateReport,proto3,oneof"` +} + +func (*GatewayMasterOutHubSlaveInMsg_SigGatewayStateReport) isGatewayMasterOutHubSlaveInMsg_Choice() { +} + +type GatewaySlaveOutCloudMasterInMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement + // *GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus + // *GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement + Choice isGatewaySlaveOutCloudMasterInMsg_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewaySlaveOutCloudMasterInMsg) Reset() { + *x = GatewaySlaveOutCloudMasterInMsg{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewaySlaveOutCloudMasterInMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewaySlaveOutCloudMasterInMsg) ProtoMessage() {} + +func (x *GatewaySlaveOutCloudMasterInMsg) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewaySlaveOutCloudMasterInMsg.ProtoReflect.Descriptor instead. +func (*GatewaySlaveOutCloudMasterInMsg) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{11} +} + +func (x *GatewaySlaveOutCloudMasterInMsg) GetChoice() isGatewaySlaveOutCloudMasterInMsg_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *GatewaySlaveOutCloudMasterInMsg) GetNtfHrMeasurement() *HrMeasurement { + if x != nil { + if x, ok := x.Choice.(*GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement); ok { + return x.NtfHrMeasurement + } + } + return nil +} + +func (x *GatewaySlaveOutCloudMasterInMsg) GetNtfGatewayStatus() *GatewayStatus { + if x != nil { + if x, ok := x.Choice.(*GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus); ok { + return x.NtfGatewayStatus + } + } + return nil +} + +func (x *GatewaySlaveOutCloudMasterInMsg) GetNtfStepCountMeasurement() *StepCountMeasurement { + if x != nil { + if x, ok := x.Choice.(*GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement); ok { + return x.NtfStepCountMeasurement + } + } + return nil +} + +type isGatewaySlaveOutCloudMasterInMsg_Choice interface { + isGatewaySlaveOutCloudMasterInMsg_Choice() +} + +type GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement struct { + NtfHrMeasurement *HrMeasurement `protobuf:"bytes,1,opt,name=ntf_hr_measurement,json=ntfHrMeasurement,proto3,oneof"` +} + +type GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus struct { + NtfGatewayStatus *GatewayStatus `protobuf:"bytes,2,opt,name=ntf_gateway_status,json=ntfGatewayStatus,proto3,oneof"` +} + +type GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement struct { + NtfStepCountMeasurement *StepCountMeasurement `protobuf:"bytes,3,opt,name=ntf_step_count_measurement,json=ntfStepCountMeasurement,proto3,oneof"` +} + +func (*GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement) isGatewaySlaveOutCloudMasterInMsg_Choice() {} + +func (*GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus) isGatewaySlaveOutCloudMasterInMsg_Choice() {} + +func (*GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement) isGatewaySlaveOutCloudMasterInMsg_Choice() { +} + +type BatteryInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + VoltageMv uint32 `protobuf:"varint,1,opt,name=voltage_mv,json=voltageMv,proto3" json:"voltage_mv,omitempty"` + SocPercentage uint32 `protobuf:"varint,2,opt,name=soc_percentage,json=socPercentage,proto3" json:"soc_percentage,omitempty"` + ChargingRatePercentage int32 `protobuf:"zigzag32,3,opt,name=charging_rate_percentage,json=chargingRatePercentage,proto3" json:"charging_rate_percentage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BatteryInfo) Reset() { + *x = BatteryInfo{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BatteryInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatteryInfo) ProtoMessage() {} + +func (x *BatteryInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatteryInfo.ProtoReflect.Descriptor instead. +func (*BatteryInfo) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{12} +} + +func (x *BatteryInfo) GetVoltageMv() uint32 { + if x != nil { + return x.VoltageMv + } + return 0 +} + +func (x *BatteryInfo) GetSocPercentage() uint32 { + if x != nil { + return x.SocPercentage + } + return 0 +} + +func (x *BatteryInfo) GetChargingRatePercentage() int32 { + if x != nil { + return x.ChargingRatePercentage + } + return 0 +} + +type GatewayInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + RegionId uint32 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"` + GatewayMac []byte `protobuf:"bytes,2,opt,name=gateway_mac,json=gatewayMac,proto3" json:"gateway_mac,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayInfo) Reset() { + *x = GatewayInfo{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayInfo) ProtoMessage() {} + +func (x *GatewayInfo) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayInfo.ProtoReflect.Descriptor instead. +func (*GatewayInfo) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{13} +} + +func (x *GatewayInfo) GetRegionId() uint32 { + if x != nil { + return x.RegionId + } + return 0 +} + +func (x *GatewayInfo) GetGatewayMac() []byte { + if x != nil { + return x.GatewayMac + } + return nil +} + +type IPacketStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *IPacketStatus_Raw + // *IPacketStatus_Parsed + Choice isIPacketStatus_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IPacketStatus) Reset() { + *x = IPacketStatus{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IPacketStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IPacketStatus) ProtoMessage() {} + +func (x *IPacketStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IPacketStatus.ProtoReflect.Descriptor instead. +func (*IPacketStatus) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{14} +} + +func (x *IPacketStatus) GetChoice() isIPacketStatus_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *IPacketStatus) GetRaw() *RawPacketStatus { + if x != nil { + if x, ok := x.Choice.(*IPacketStatus_Raw); ok { + return x.Raw + } + } + return nil +} + +func (x *IPacketStatus) GetParsed() *PacketStatus { + if x != nil { + if x, ok := x.Choice.(*IPacketStatus_Parsed); ok { + return x.Parsed + } + } + return nil +} + +type isIPacketStatus_Choice interface { + isIPacketStatus_Choice() +} + +type IPacketStatus_Raw struct { + Raw *RawPacketStatus `protobuf:"bytes,1,opt,name=raw,proto3,oneof"` +} + +type IPacketStatus_Parsed struct { + Parsed *PacketStatus `protobuf:"bytes,2,opt,name=parsed,proto3,oneof"` +} + +func (*IPacketStatus_Raw) isIPacketStatus_Choice() {} + +func (*IPacketStatus_Parsed) isIPacketStatus_Choice() {} + +type HrMeasurement struct { + state protoimpl.MessageState `protogen:"open.v1"` + HrPacket *HrPacket `protobuf:"bytes,1,opt,name=hr_packet,json=hrPacket,proto3" json:"hr_packet,omitempty"` + PacketStatus *IPacketStatus `protobuf:"bytes,2,opt,name=packet_status,json=packetStatus,proto3" json:"packet_status,omitempty"` + GatewayInfo *GatewayInfo `protobuf:"bytes,3,opt,name=gateway_info,json=gatewayInfo,proto3" json:"gateway_info,omitempty"` + HubInfo *HubInfo `protobuf:"bytes,4,opt,name=hub_info,json=hubInfo,proto3" json:"hub_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HrMeasurement) Reset() { + *x = HrMeasurement{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HrMeasurement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HrMeasurement) ProtoMessage() {} + +func (x *HrMeasurement) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HrMeasurement.ProtoReflect.Descriptor instead. +func (*HrMeasurement) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{15} +} + +func (x *HrMeasurement) GetHrPacket() *HrPacket { + if x != nil { + return x.HrPacket + } + return nil +} + +func (x *HrMeasurement) GetPacketStatus() *IPacketStatus { + if x != nil { + return x.PacketStatus + } + return nil +} + +func (x *HrMeasurement) GetGatewayInfo() *GatewayInfo { + if x != nil { + return x.GatewayInfo + } + return nil +} + +func (x *HrMeasurement) GetHubInfo() *HubInfo { + if x != nil { + return x.HubInfo + } + return nil +} + +type StepCountMeasurement struct { + state protoimpl.MessageState `protogen:"open.v1"` + StepCountPacket *StepCountPacket `protobuf:"bytes,1,opt,name=step_count_packet,json=stepCountPacket,proto3" json:"step_count_packet,omitempty"` + PacketStatus *IPacketStatus `protobuf:"bytes,2,opt,name=packet_status,json=packetStatus,proto3" json:"packet_status,omitempty"` + GatewayInfo *GatewayInfo `protobuf:"bytes,3,opt,name=gateway_info,json=gatewayInfo,proto3" json:"gateway_info,omitempty"` + HubInfo *HubInfo `protobuf:"bytes,4,opt,name=hub_info,json=hubInfo,proto3" json:"hub_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StepCountMeasurement) Reset() { + *x = StepCountMeasurement{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StepCountMeasurement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StepCountMeasurement) ProtoMessage() {} + +func (x *StepCountMeasurement) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StepCountMeasurement.ProtoReflect.Descriptor instead. +func (*StepCountMeasurement) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{16} +} + +func (x *StepCountMeasurement) GetStepCountPacket() *StepCountPacket { + if x != nil { + return x.StepCountPacket + } + return nil +} + +func (x *StepCountMeasurement) GetPacketStatus() *IPacketStatus { + if x != nil { + return x.PacketStatus + } + return nil +} + +func (x *StepCountMeasurement) GetGatewayInfo() *GatewayInfo { + if x != nil { + return x.GatewayInfo + } + return nil +} + +func (x *StepCountMeasurement) GetHubInfo() *HubInfo { + if x != nil { + return x.HubInfo + } + return nil +} + +type GatewayStatistic struct { + state protoimpl.MessageState `protogen:"open.v1"` + BootCount uint32 `protobuf:"varint,1,opt,name=boot_count,json=bootCount,proto3" json:"boot_count,omitempty"` + UptimeMs uint32 `protobuf:"varint,2,opt,name=uptime_ms,json=uptimeMs,proto3" json:"uptime_ms,omitempty"` + DurationMsSinceLastPacket uint32 `protobuf:"varint,3,opt,name=duration_ms_since_last_packet,json=durationMsSinceLastPacket,proto3" json:"duration_ms_since_last_packet,omitempty"` + RxCount uint32 `protobuf:"varint,4,opt,name=rx_count,json=rxCount,proto3" json:"rx_count,omitempty"` + BatteryInfo *BatteryInfo `protobuf:"bytes,5,opt,name=battery_info,json=batteryInfo,proto3" json:"battery_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayStatistic) Reset() { + *x = GatewayStatistic{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayStatistic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayStatistic) ProtoMessage() {} + +func (x *GatewayStatistic) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayStatistic.ProtoReflect.Descriptor instead. +func (*GatewayStatistic) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{17} +} + +func (x *GatewayStatistic) GetBootCount() uint32 { + if x != nil { + return x.BootCount + } + return 0 +} + +func (x *GatewayStatistic) GetUptimeMs() uint32 { + if x != nil { + return x.UptimeMs + } + return 0 +} + +func (x *GatewayStatistic) GetDurationMsSinceLastPacket() uint32 { + if x != nil { + return x.DurationMsSinceLastPacket + } + return 0 +} + +func (x *GatewayStatistic) GetRxCount() uint32 { + if x != nil { + return x.RxCount + } + return 0 +} + +func (x *GatewayStatistic) GetBatteryInfo() *BatteryInfo { + if x != nil { + return x.BatteryInfo + } + return nil +} + +type GatewayStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info *GatewayInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` + Stat *GatewayStatistic `protobuf:"bytes,2,opt,name=stat,proto3" json:"stat,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayStatus) Reset() { + *x = GatewayStatus{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayStatus) ProtoMessage() {} + +func (x *GatewayStatus) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayStatus.ProtoReflect.Descriptor instead. +func (*GatewayStatus) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{18} +} + +func (x *GatewayStatus) GetInfo() *GatewayInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *GatewayStatus) GetStat() *GatewayStatistic { + if x != nil { + return x.Stat + } + return nil +} + +type Status struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Status) Reset() { + *x = Status{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{19} +} + +func (x *Status) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *Status) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type GatewayConfigEntry struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *GatewayConfigEntry_RegionId + // *GatewayConfigEntry_WifiSsid + // *GatewayConfigEntry_WifiPassword + Choice isGatewayConfigEntry_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayConfigEntry) Reset() { + *x = GatewayConfigEntry{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayConfigEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayConfigEntry) ProtoMessage() {} + +func (x *GatewayConfigEntry) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayConfigEntry.ProtoReflect.Descriptor instead. +func (*GatewayConfigEntry) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{20} +} + +func (x *GatewayConfigEntry) GetChoice() isGatewayConfigEntry_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *GatewayConfigEntry) GetRegionId() uint32 { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigEntry_RegionId); ok { + return x.RegionId + } + } + return 0 +} + +func (x *GatewayConfigEntry) GetWifiSsid() string { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigEntry_WifiSsid); ok { + return x.WifiSsid + } + } + return "" +} + +func (x *GatewayConfigEntry) GetWifiPassword() string { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigEntry_WifiPassword); ok { + return x.WifiPassword + } + } + return "" +} + +type isGatewayConfigEntry_Choice interface { + isGatewayConfigEntry_Choice() +} + +type GatewayConfigEntry_RegionId struct { + RegionId uint32 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3,oneof"` +} + +type GatewayConfigEntry_WifiSsid struct { + WifiSsid string `protobuf:"bytes,2,opt,name=wifi_ssid,json=wifiSsid,proto3,oneof"` +} + +type GatewayConfigEntry_WifiPassword struct { + WifiPassword string `protobuf:"bytes,3,opt,name=wifi_password,json=wifiPassword,proto3,oneof"` +} + +func (*GatewayConfigEntry_RegionId) isGatewayConfigEntry_Choice() {} + +func (*GatewayConfigEntry_WifiSsid) isGatewayConfigEntry_Choice() {} + +func (*GatewayConfigEntry_WifiPassword) isGatewayConfigEntry_Choice() {} + +type GatewayConfigMasterOutSlaveInMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *GatewayConfigMasterOutSlaveInMsg_CnfGetEntry + // *GatewayConfigMasterOutSlaveInMsg_CnfGetFailure + // *GatewayConfigMasterOutSlaveInMsg_CnfSetEntry + Choice isGatewayConfigMasterOutSlaveInMsg_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayConfigMasterOutSlaveInMsg) Reset() { + *x = GatewayConfigMasterOutSlaveInMsg{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayConfigMasterOutSlaveInMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayConfigMasterOutSlaveInMsg) ProtoMessage() {} + +func (x *GatewayConfigMasterOutSlaveInMsg) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayConfigMasterOutSlaveInMsg.ProtoReflect.Descriptor instead. +func (*GatewayConfigMasterOutSlaveInMsg) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{21} +} + +func (x *GatewayConfigMasterOutSlaveInMsg) GetChoice() isGatewayConfigMasterOutSlaveInMsg_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *GatewayConfigMasterOutSlaveInMsg) GetCnfGetEntry() *GatewayConfigEntry { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigMasterOutSlaveInMsg_CnfGetEntry); ok { + return x.CnfGetEntry + } + } + return nil +} + +func (x *GatewayConfigMasterOutSlaveInMsg) GetCnfGetFailure() *Status { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigMasterOutSlaveInMsg_CnfGetFailure); ok { + return x.CnfGetFailure + } + } + return nil +} + +func (x *GatewayConfigMasterOutSlaveInMsg) GetCnfSetEntry() *Status { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigMasterOutSlaveInMsg_CnfSetEntry); ok { + return x.CnfSetEntry + } + } + return nil +} + +type isGatewayConfigMasterOutSlaveInMsg_Choice interface { + isGatewayConfigMasterOutSlaveInMsg_Choice() +} + +type GatewayConfigMasterOutSlaveInMsg_CnfGetEntry struct { + CnfGetEntry *GatewayConfigEntry `protobuf:"bytes,1,opt,name=cnf_get_entry,json=cnfGetEntry,proto3,oneof"` +} + +type GatewayConfigMasterOutSlaveInMsg_CnfGetFailure struct { + CnfGetFailure *Status `protobuf:"bytes,2,opt,name=cnf_get_failure,json=cnfGetFailure,proto3,oneof"` +} + +type GatewayConfigMasterOutSlaveInMsg_CnfSetEntry struct { + CnfSetEntry *Status `protobuf:"bytes,3,opt,name=cnf_set_entry,json=cnfSetEntry,proto3,oneof"` +} + +func (*GatewayConfigMasterOutSlaveInMsg_CnfGetEntry) isGatewayConfigMasterOutSlaveInMsg_Choice() {} + +func (*GatewayConfigMasterOutSlaveInMsg_CnfGetFailure) isGatewayConfigMasterOutSlaveInMsg_Choice() {} + +func (*GatewayConfigMasterOutSlaveInMsg_CnfSetEntry) isGatewayConfigMasterOutSlaveInMsg_Choice() {} + +type GatewayConfigMasterInSlaveOutMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Choice: + // + // *GatewayConfigMasterInSlaveOutMsg_InfGetEntry + // *GatewayConfigMasterInSlaveOutMsg_InfSetEntry + Choice isGatewayConfigMasterInSlaveOutMsg_Choice `protobuf_oneof:"choice"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GatewayConfigMasterInSlaveOutMsg) Reset() { + *x = GatewayConfigMasterInSlaveOutMsg{} + mi := &file_proto_hr_packet_v2_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GatewayConfigMasterInSlaveOutMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GatewayConfigMasterInSlaveOutMsg) ProtoMessage() {} + +func (x *GatewayConfigMasterInSlaveOutMsg) ProtoReflect() protoreflect.Message { + mi := &file_proto_hr_packet_v2_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GatewayConfigMasterInSlaveOutMsg.ProtoReflect.Descriptor instead. +func (*GatewayConfigMasterInSlaveOutMsg) Descriptor() ([]byte, []int) { + return file_proto_hr_packet_v2_proto_rawDescGZIP(), []int{22} +} + +func (x *GatewayConfigMasterInSlaveOutMsg) GetChoice() isGatewayConfigMasterInSlaveOutMsg_Choice { + if x != nil { + return x.Choice + } + return nil +} + +func (x *GatewayConfigMasterInSlaveOutMsg) GetInfGetEntry() GatewayConfigEntryKind { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigMasterInSlaveOutMsg_InfGetEntry); ok { + return x.InfGetEntry + } + } + return GatewayConfigEntryKind_REGION_ID +} + +func (x *GatewayConfigMasterInSlaveOutMsg) GetInfSetEntry() *GatewayConfigEntry { + if x != nil { + if x, ok := x.Choice.(*GatewayConfigMasterInSlaveOutMsg_InfSetEntry); ok { + return x.InfSetEntry + } + } + return nil +} + +type isGatewayConfigMasterInSlaveOutMsg_Choice interface { + isGatewayConfigMasterInSlaveOutMsg_Choice() +} + +type GatewayConfigMasterInSlaveOutMsg_InfGetEntry struct { + InfGetEntry GatewayConfigEntryKind `protobuf:"varint,1,opt,name=inf_get_entry,json=infGetEntry,proto3,enum=whgw_hr.GatewayConfigEntryKind,oneof"` +} + +type GatewayConfigMasterInSlaveOutMsg_InfSetEntry struct { + InfSetEntry *GatewayConfigEntry `protobuf:"bytes,2,opt,name=inf_set_entry,json=infSetEntry,proto3,oneof"` +} + +func (*GatewayConfigMasterInSlaveOutMsg_InfGetEntry) isGatewayConfigMasterInSlaveOutMsg_Choice() {} + +func (*GatewayConfigMasterInSlaveOutMsg_InfSetEntry) isGatewayConfigMasterInSlaveOutMsg_Choice() {} + +var File_proto_hr_packet_v2_proto protoreflect.FileDescriptor + +var file_proto_hr_packet_v2_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x68, 0x72, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x77, 0x68, 0x67, 0x77, + 0x5f, 0x68, 0x72, 0x22, 0x66, 0x0a, 0x0e, 0x4c, 0x6f, 0x52, 0x61, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x02, 0x62, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x4c, 0x6f, 0x52, 0x61, + 0x42, 0x57, 0x52, 0x02, 0x62, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x73, 0x66, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x73, 0x66, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x79, 0x5f, 0x6d, 0x68, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x66, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x68, 0x7a, 0x22, 0x9d, 0x01, 0x0a, 0x0a, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x3a, 0x0a, 0x0d, 0x68, 0x72, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x15, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x48, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x68, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x41, 0x63, 0x74, + 0x69, 0x76, 0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x6b, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x53, 0x6b, 0x69, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x07, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x22, 0x76, 0x0a, 0x08, 0x48, + 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, + 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6e, + 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x4e, 0x75, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x02, 0x68, 0x72, 0x22, 0x5f, 0x0a, 0x0f, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x65, 0x70, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5c, 0x0a, 0x0f, 0x52, 0x61, 0x77, 0x50, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2b, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x6c, 0x5f, 0x72, 0x73, 0x73, 0x69, 0x5f, 0x78, 0x32, 0x5f, 0x6e, 0x65, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x73, 0x73, 0x69, 0x58, + 0x32, 0x4e, 0x65, 0x67, 0x12, 0x1c, 0x0a, 0x0a, 0x73, 0x6e, 0x72, 0x5f, 0x70, 0x6b, 0x74, 0x5f, + 0x78, 0x34, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x6e, 0x72, 0x50, 0x6b, 0x74, + 0x58, 0x34, 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x73, 0x73, + 0x69, 0x5f, 0x6e, 0x65, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0d, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x6c, 0x52, 0x73, 0x73, 0x69, 0x4e, 0x65, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x6e, + 0x72, 0x5f, 0x70, 0x6b, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x73, 0x6e, 0x72, + 0x50, 0x6b, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x07, 0x48, 0x75, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x15, 0x0a, 0x06, 0x62, 0x75, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x62, 0x75, 0x73, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x5f, 0x64, 0x65, + 0x76, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x73, 0x75, 0x62, 0x44, + 0x65, 0x76, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x4c, 0x6f, 0x52, 0x61, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0f, 0x72, 0x61, 0x64, 0x69, 0x6f, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x09, 0x52, 0x61, 0x64, + 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x08, 0x68, 0x75, 0x62, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x48, 0x75, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x68, 0x75, 0x62, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x11, 0x72, 0x61, 0x77, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x72, 0x61, 0x77, 0x50, 0x61, 0x63, + 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x82, 0x02, + 0x0a, 0x12, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, + 0x68, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x61, 0x73, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x61, 0x73, 0x49, 0x70, + 0x12, 0x3d, 0x0a, 0x1b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x5f, + 0x6d, 0x71, 0x74, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x48, 0x61, + 0x73, 0x4d, 0x71, 0x74, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x32, 0x0a, 0x15, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x5f, 0x68, 0x61, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, + 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x48, 0x61, 0x73, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x1d, 0x48, 0x75, 0x62, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x4f, + 0x75, 0x74, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x3a, 0x0a, 0x0e, 0x6e, 0x74, 0x66, 0x5f, 0x72, 0x61, 0x64, 0x69, + 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, + 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x52, 0x61, 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x74, 0x66, 0x52, 0x61, 0x64, 0x69, 0x6f, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x40, 0x0a, 0x10, 0x6e, 0x74, 0x66, 0x5f, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x68, 0x67, + 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x48, 0x00, 0x52, 0x0e, 0x6e, 0x74, 0x66, 0x42, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x81, 0x01, 0x0a, + 0x1d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x75, + 0x74, 0x48, 0x75, 0x62, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x56, + 0x0a, 0x18, 0x73, 0x69, 0x67, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x00, 0x52, + 0x15, 0x73, 0x69, 0x67, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x22, 0x99, 0x02, 0x0a, 0x1f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x6c, 0x61, 0x76, + 0x65, 0x4f, 0x75, 0x74, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, + 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x46, 0x0a, 0x12, 0x6e, 0x74, 0x66, 0x5f, 0x68, 0x72, 0x5f, 0x6d, + 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x48, 0x72, 0x4d, 0x65, 0x61, + 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x10, 0x6e, 0x74, 0x66, 0x48, + 0x72, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x12, + 0x6e, 0x74, 0x66, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x48, 0x00, 0x52, 0x10, 0x6e, 0x74, 0x66, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x5c, 0x0a, 0x1a, 0x6e, 0x74, 0x66, 0x5f, 0x73, 0x74, 0x65, 0x70, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x61, 0x73, + 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x17, 0x6e, 0x74, 0x66, 0x53, 0x74, + 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0x8d, 0x01, 0x0a, + 0x0b, 0x42, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, + 0x76, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x76, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x4d, 0x76, 0x12, 0x25, 0x0a, 0x0e, 0x73, + 0x6f, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x73, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, + 0x67, 0x65, 0x12, 0x38, 0x0a, 0x18, 0x63, 0x68, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x67, 0x5f, 0x72, + 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x11, 0x52, 0x16, 0x63, 0x68, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x61, + 0x74, 0x65, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, 0x4b, 0x0a, 0x0b, + 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, 0x0a, 0x09, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x61, 0x63, 0x22, 0x78, 0x0a, 0x0d, 0x49, 0x50, 0x61, + 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x03, 0x72, 0x61, + 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, + 0x72, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x48, 0x00, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x73, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, + 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, + 0x69, 0x63, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x0d, 0x48, 0x72, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x09, 0x68, 0x72, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x48, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x08, 0x68, 0x72, 0x50, + 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x77, + 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x49, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, + 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x08, 0x68, + 0x75, 0x62, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x48, 0x75, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xff, 0x01, 0x0a, 0x14, 0x53, 0x74, 0x65, + 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x4d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x44, 0x0a, 0x11, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x77, + 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0f, 0x73, 0x74, 0x65, 0x70, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, + 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x49, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x68, 0x67, + 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0b, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, + 0x08, 0x68, 0x75, 0x62, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x48, 0x75, 0x62, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x07, 0x68, 0x75, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe4, 0x01, 0x0a, 0x10, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, + 0x0a, 0x09, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x08, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x40, 0x0a, 0x1d, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x63, 0x65, + 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x19, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x53, 0x69, + 0x6e, 0x63, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x72, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x72, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x68, 0x0a, 0x0d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x04, + 0x73, 0x74, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x77, 0x68, 0x67, + 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x04, 0x73, 0x74, 0x61, 0x74, 0x22, 0x36, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x12, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1d, 0x0a, 0x09, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, + 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x09, 0x77, 0x69, 0x66, + 0x69, 0x5f, 0x73, 0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, + 0x77, 0x69, 0x66, 0x69, 0x53, 0x73, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0d, 0x77, 0x69, 0x66, 0x69, + 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0c, 0x77, 0x69, 0x66, 0x69, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, + 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xe1, 0x01, 0x0a, 0x20, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x73, 0x74, 0x65, + 0x72, 0x4f, 0x75, 0x74, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x41, + 0x0a, 0x0d, 0x63, 0x6e, 0x66, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, + 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6e, 0x66, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x39, 0x0a, 0x0f, 0x63, 0x6e, 0x66, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x66, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x68, 0x67, + 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x63, + 0x6e, 0x66, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x35, 0x0a, 0x0d, + 0x63, 0x6e, 0x66, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x22, 0xb6, 0x01, + 0x0a, 0x20, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, + 0x61, 0x73, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x4d, + 0x73, 0x67, 0x12, 0x45, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x5f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x77, 0x68, 0x67, 0x77, + 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, + 0x66, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x41, 0x0a, 0x0d, 0x69, 0x6e, 0x66, + 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, + 0x0b, 0x69, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0x0a, 0x06, + 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x2a, 0x37, 0x0a, 0x0c, 0x48, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, + 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x03, 0x2a, + 0x8e, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x52, 0x61, 0x42, 0x57, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x57, + 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x57, 0x5f, 0x31, 0x30, + 0x5f, 0x34, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x57, 0x5f, 0x31, 0x35, 0x5f, 0x36, 0x10, + 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x57, 0x5f, 0x32, 0x30, 0x5f, 0x38, 0x10, 0x09, 0x12, 0x0c, + 0x0a, 0x08, 0x42, 0x57, 0x5f, 0x33, 0x31, 0x5f, 0x32, 0x35, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, + 0x42, 0x57, 0x5f, 0x34, 0x31, 0x5f, 0x37, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x57, 0x5f, + 0x36, 0x32, 0x5f, 0x35, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x57, 0x5f, 0x31, 0x32, 0x35, + 0x5f, 0x30, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x57, 0x5f, 0x32, 0x35, 0x30, 0x5f, 0x30, + 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x57, 0x5f, 0x35, 0x30, 0x30, 0x5f, 0x30, 0x10, 0x06, + 0x2a, 0x42, 0x0a, 0x0a, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x07, + 0x0a, 0x03, 0x4e, 0x54, 0x46, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x49, 0x47, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4e, 0x46, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x4e, 0x46, + 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x45, 0x51, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x52, + 0x53, 0x50, 0x10, 0x05, 0x2a, 0x49, 0x0a, 0x16, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x0d, + 0x0a, 0x09, 0x52, 0x45, 0x47, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x57, 0x49, 0x46, 0x49, 0x5f, 0x53, 0x53, 0x49, 0x44, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, + 0x57, 0x49, 0x46, 0x49, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x42, + 0x1d, 0x5a, 0x1b, 0x68, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x77, 0x68, 0x67, 0x77, 0x5f, 0x68, 0x72, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_proto_hr_packet_v2_proto_rawDescOnce sync.Once + file_proto_hr_packet_v2_proto_rawDescData = file_proto_hr_packet_v2_proto_rawDesc +) + +func file_proto_hr_packet_v2_proto_rawDescGZIP() []byte { + file_proto_hr_packet_v2_proto_rawDescOnce.Do(func() { + file_proto_hr_packet_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_hr_packet_v2_proto_rawDescData) + }) + return file_proto_hr_packet_v2_proto_rawDescData +} + +var file_proto_hr_packet_v2_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_proto_hr_packet_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_proto_hr_packet_v2_proto_goTypes = []any{ + (HrConfidence)(0), // 0: whgw_hr.HrConfidence + (LoRaBW)(0), // 1: whgw_hr.LoRaBW + (PacketKind)(0), // 2: whgw_hr.PacketKind + (GatewayConfigEntryKind)(0), // 3: whgw_hr.GatewayConfigEntryKind + (*LoRaParameters)(nil), // 4: whgw_hr.LoRaParameters + (*StatusFlag)(nil), // 5: whgw_hr.StatusFlag + (*HrPacket)(nil), // 6: whgw_hr.HrPacket + (*StepCountPacket)(nil), // 7: whgw_hr.StepCountPacket + (*RawPacketStatus)(nil), // 8: whgw_hr.RawPacketStatus + (*PacketStatus)(nil), // 9: whgw_hr.PacketStatus + (*HubInfo)(nil), // 10: whgw_hr.HubInfo + (*RadioData)(nil), // 11: whgw_hr.RadioData + (*GatewayStateReport)(nil), // 12: whgw_hr.GatewayStateReport + (*HubSlaveOutGatewayMasterInMsg)(nil), // 13: whgw_hr.HubSlaveOutGatewayMasterInMsg + (*GatewayMasterOutHubSlaveInMsg)(nil), // 14: whgw_hr.GatewayMasterOutHubSlaveInMsg + (*GatewaySlaveOutCloudMasterInMsg)(nil), // 15: whgw_hr.GatewaySlaveOutCloudMasterInMsg + (*BatteryInfo)(nil), // 16: whgw_hr.BatteryInfo + (*GatewayInfo)(nil), // 17: whgw_hr.GatewayInfo + (*IPacketStatus)(nil), // 18: whgw_hr.IPacketStatus + (*HrMeasurement)(nil), // 19: whgw_hr.HrMeasurement + (*StepCountMeasurement)(nil), // 20: whgw_hr.StepCountMeasurement + (*GatewayStatistic)(nil), // 21: whgw_hr.GatewayStatistic + (*GatewayStatus)(nil), // 22: whgw_hr.GatewayStatus + (*Status)(nil), // 23: whgw_hr.Status + (*GatewayConfigEntry)(nil), // 24: whgw_hr.GatewayConfigEntry + (*GatewayConfigMasterOutSlaveInMsg)(nil), // 25: whgw_hr.GatewayConfigMasterOutSlaveInMsg + (*GatewayConfigMasterInSlaveOutMsg)(nil), // 26: whgw_hr.GatewayConfigMasterInSlaveOutMsg +} +var file_proto_hr_packet_v2_proto_depIdxs = []int32{ + 1, // 0: whgw_hr.LoRaParameters.bw:type_name -> whgw_hr.LoRaBW + 0, // 1: whgw_hr.StatusFlag.hr_confidence:type_name -> whgw_hr.HrConfidence + 5, // 2: whgw_hr.HrPacket.status:type_name -> whgw_hr.StatusFlag + 4, // 3: whgw_hr.HubInfo.radio_parameters:type_name -> whgw_hr.LoRaParameters + 10, // 4: whgw_hr.RadioData.hub_info:type_name -> whgw_hr.HubInfo + 8, // 5: whgw_hr.RadioData.raw_packet_status:type_name -> whgw_hr.RawPacketStatus + 11, // 6: whgw_hr.HubSlaveOutGatewayMasterInMsg.ntf_radio_data:type_name -> whgw_hr.RadioData + 16, // 7: whgw_hr.HubSlaveOutGatewayMasterInMsg.ntf_battery_info:type_name -> whgw_hr.BatteryInfo + 12, // 8: whgw_hr.GatewayMasterOutHubSlaveInMsg.sig_gateway_state_report:type_name -> whgw_hr.GatewayStateReport + 19, // 9: whgw_hr.GatewaySlaveOutCloudMasterInMsg.ntf_hr_measurement:type_name -> whgw_hr.HrMeasurement + 22, // 10: whgw_hr.GatewaySlaveOutCloudMasterInMsg.ntf_gateway_status:type_name -> whgw_hr.GatewayStatus + 20, // 11: whgw_hr.GatewaySlaveOutCloudMasterInMsg.ntf_step_count_measurement:type_name -> whgw_hr.StepCountMeasurement + 8, // 12: whgw_hr.IPacketStatus.raw:type_name -> whgw_hr.RawPacketStatus + 9, // 13: whgw_hr.IPacketStatus.parsed:type_name -> whgw_hr.PacketStatus + 6, // 14: whgw_hr.HrMeasurement.hr_packet:type_name -> whgw_hr.HrPacket + 18, // 15: whgw_hr.HrMeasurement.packet_status:type_name -> whgw_hr.IPacketStatus + 17, // 16: whgw_hr.HrMeasurement.gateway_info:type_name -> whgw_hr.GatewayInfo + 10, // 17: whgw_hr.HrMeasurement.hub_info:type_name -> whgw_hr.HubInfo + 7, // 18: whgw_hr.StepCountMeasurement.step_count_packet:type_name -> whgw_hr.StepCountPacket + 18, // 19: whgw_hr.StepCountMeasurement.packet_status:type_name -> whgw_hr.IPacketStatus + 17, // 20: whgw_hr.StepCountMeasurement.gateway_info:type_name -> whgw_hr.GatewayInfo + 10, // 21: whgw_hr.StepCountMeasurement.hub_info:type_name -> whgw_hr.HubInfo + 16, // 22: whgw_hr.GatewayStatistic.battery_info:type_name -> whgw_hr.BatteryInfo + 17, // 23: whgw_hr.GatewayStatus.info:type_name -> whgw_hr.GatewayInfo + 21, // 24: whgw_hr.GatewayStatus.stat:type_name -> whgw_hr.GatewayStatistic + 24, // 25: whgw_hr.GatewayConfigMasterOutSlaveInMsg.cnf_get_entry:type_name -> whgw_hr.GatewayConfigEntry + 23, // 26: whgw_hr.GatewayConfigMasterOutSlaveInMsg.cnf_get_failure:type_name -> whgw_hr.Status + 23, // 27: whgw_hr.GatewayConfigMasterOutSlaveInMsg.cnf_set_entry:type_name -> whgw_hr.Status + 3, // 28: whgw_hr.GatewayConfigMasterInSlaveOutMsg.inf_get_entry:type_name -> whgw_hr.GatewayConfigEntryKind + 24, // 29: whgw_hr.GatewayConfigMasterInSlaveOutMsg.inf_set_entry:type_name -> whgw_hr.GatewayConfigEntry + 30, // [30:30] is the sub-list for method output_type + 30, // [30:30] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_proto_hr_packet_v2_proto_init() } +func file_proto_hr_packet_v2_proto_init() { + if File_proto_hr_packet_v2_proto != nil { + return + } + file_proto_hr_packet_v2_proto_msgTypes[9].OneofWrappers = []any{ + (*HubSlaveOutGatewayMasterInMsg_NtfRadioData)(nil), + (*HubSlaveOutGatewayMasterInMsg_NtfBatteryInfo)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[10].OneofWrappers = []any{ + (*GatewayMasterOutHubSlaveInMsg_SigGatewayStateReport)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[11].OneofWrappers = []any{ + (*GatewaySlaveOutCloudMasterInMsg_NtfHrMeasurement)(nil), + (*GatewaySlaveOutCloudMasterInMsg_NtfGatewayStatus)(nil), + (*GatewaySlaveOutCloudMasterInMsg_NtfStepCountMeasurement)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[14].OneofWrappers = []any{ + (*IPacketStatus_Raw)(nil), + (*IPacketStatus_Parsed)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[20].OneofWrappers = []any{ + (*GatewayConfigEntry_RegionId)(nil), + (*GatewayConfigEntry_WifiSsid)(nil), + (*GatewayConfigEntry_WifiPassword)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[21].OneofWrappers = []any{ + (*GatewayConfigMasterOutSlaveInMsg_CnfGetEntry)(nil), + (*GatewayConfigMasterOutSlaveInMsg_CnfGetFailure)(nil), + (*GatewayConfigMasterOutSlaveInMsg_CnfSetEntry)(nil), + } + file_proto_hr_packet_v2_proto_msgTypes[22].OneofWrappers = []any{ + (*GatewayConfigMasterInSlaveOutMsg_InfGetEntry)(nil), + (*GatewayConfigMasterInSlaveOutMsg_InfSetEntry)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_proto_hr_packet_v2_proto_rawDesc, + NumEnums: 4, + NumMessages: 23, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_proto_hr_packet_v2_proto_goTypes, + DependencyIndexes: file_proto_hr_packet_v2_proto_depIdxs, + EnumInfos: file_proto_hr_packet_v2_proto_enumTypes, + MessageInfos: file_proto_hr_packet_v2_proto_msgTypes, + }.Build() + File_proto_hr_packet_v2_proto = out.File + file_proto_hr_packet_v2_proto_rawDesc = nil + file_proto_hr_packet_v2_proto_goTypes = nil + file_proto_hr_packet_v2_proto_depIdxs = nil +} diff --git a/proto/hr_packet_v2.proto b/proto/hr_packet_v2.proto new file mode 100644 index 0000000..49b928b --- /dev/null +++ b/proto/hr_packet_v2.proto @@ -0,0 +1,190 @@ +syntax = "proto3"; + +package whgw_hr; + +option go_package = "hr_receiver/proto;whgw_hrpb"; + +enum HrConfidence { + ZERO = 0; + LOW = 1; + MEDIUM = 2; + HIGH = 3; +} + +enum LoRaBW { + BW_NONE = 0; + BW_10_4 = 0x08; + BW_15_6 = 0x01; + BW_20_8 = 0x09; + BW_31_25 = 0x02; + BW_41_7 = 0x0A; + BW_62_5 = 0x03; + BW_125_0 = 0x04; + BW_250_0 = 0x05; + BW_500_0 = 0x06; +} + +message LoRaParameters { + LoRaBW bw = 1; + uint32 sf = 2; + float frequency_mhz = 3; +} + +message StatusFlag { + HrConfidence hr_confidence = 1; + bool is_active = 2; + bool is_on_skin = 3; + uint32 battery = 4; +} + +message HrPacket { + StatusFlag status = 1; + uint32 id = 2; + uint32 packet_num = 3; + uint32 hr = 4; +} + +message StepCountPacket { + uint32 id = 1; + uint32 packet_num = 2; + uint32 step_count = 3; +} + +message RawPacketStatus { + uint32 signal_rssi_x2_neg = 1; + int32 snr_pkt_x4 = 2; +} + +message PacketStatus { + float signal_rssi_neg = 1; + float snr_pkt = 2; +} + +message HubInfo { + uint32 bus_id = 1; + uint32 sub_dev_id = 2; + LoRaParameters radio_parameters = 3; +} + +message RadioData { + HubInfo hub_info = 1; + RawPacketStatus raw_packet_status = 2; + bytes data = 3; +} + +enum PacketKind { + NTF = 0; + SIG = 1; + INF = 2; + CNF = 3; + REQ = 4; + RSP = 5; +} + +message GatewayStateReport { + bool network_has_connection = 1; + bool network_has_ip = 2; + bool network_has_mqtt_connection = 3; + bool bluetooth_has_connect = 4; + uint32 error_code = 5; +} + +message HubSlaveOutGatewayMasterInMsg { + oneof choice { + RadioData ntf_radio_data = 1; + BatteryInfo ntf_battery_info = 2; + } +} + +message GatewayMasterOutHubSlaveInMsg { + oneof choice { + GatewayStateReport sig_gateway_state_report = 1; + } +} + +message GatewaySlaveOutCloudMasterInMsg { + oneof choice { + HrMeasurement ntf_hr_measurement = 1; + GatewayStatus ntf_gateway_status = 2; + StepCountMeasurement ntf_step_count_measurement = 3; + } +} + +message BatteryInfo { + uint32 voltage_mv = 1; + uint32 soc_percentage = 2; + sint32 charging_rate_percentage = 3; +} + +message GatewayInfo { + uint32 region_id = 1; + bytes gateway_mac = 2; +} + +message IPacketStatus { + oneof choice { + RawPacketStatus raw = 1; + PacketStatus parsed = 2; + } +} + +message HrMeasurement { + HrPacket hr_packet = 1; + IPacketStatus packet_status = 2; + GatewayInfo gateway_info = 3; + HubInfo hub_info = 4; +} + +message StepCountMeasurement { + StepCountPacket step_count_packet = 1; + IPacketStatus packet_status = 2; + GatewayInfo gateway_info = 3; + HubInfo hub_info = 4; +} + +message GatewayStatistic { + uint32 boot_count = 1; + uint32 uptime_ms = 2; + uint32 duration_ms_since_last_packet = 3; + uint32 rx_count = 4; + BatteryInfo battery_info = 5; +} + +message GatewayStatus { + GatewayInfo info = 1; + GatewayStatistic stat = 2; +} + +message Status { + int32 code = 1; + string message = 2; +} + +enum GatewayConfigEntryKind { + REGION_ID = 0; + WIFI_SSID = 1; + WIFI_PASSWORD = 2; +} + +message GatewayConfigEntry { + oneof choice { + uint32 region_id = 1; + string wifi_ssid = 2; + string wifi_password = 3; + } +} + +message GatewayConfigMasterOutSlaveInMsg { + oneof choice { + GatewayConfigEntry cnf_get_entry = 1; + Status cnf_get_failure = 2; + Status cnf_set_entry = 3; + } +} + +message GatewayConfigMasterInSlaveOutMsg { + oneof choice { + GatewayConfigEntryKind inf_get_entry = 1; + GatewayConfigEntry inf_set_entry = 2; + } +}