Compare commits
No commits in common. "8b67d8a434be397d684ceefb1f66edf4f87b1ede" and "ae533ffdfc5152373a1ec3c6347d6ec19a9f4456" have entirely different histories.
8b67d8a434
...
ae533ffdfc
@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.19-alpine AS builder
|
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.17-alpine AS builder
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
|
@ -15,8 +15,7 @@ const (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var mqttBroker, username, password, clientId string
|
var mqttBroker, username, password, clientId string
|
||||||
var driveModeTopic, recordTopic, speedZoneTopic, throttleTopic string
|
var driveModeTopic, recordTopic string
|
||||||
var enableSpeedZoneMode bool
|
|
||||||
|
|
||||||
mqttQos := cli.InitIntFlag("MQTT_QOS", 0)
|
mqttQos := cli.InitIntFlag("MQTT_QOS", 0)
|
||||||
_, mqttRetain := os.LookupEnv("MQTT_RETAIN")
|
_, mqttRetain := os.LookupEnv("MQTT_RETAIN")
|
||||||
@ -25,9 +24,6 @@ func main() {
|
|||||||
|
|
||||||
flag.StringVar(&driveModeTopic, "mqtt-topic-drive-mode", os.Getenv("MQTT_TOPIC_DRIVE_MODE"), "Mqtt topic that contains DriveMode value, use MQTT_TOPIC_DRIVE_MODE if args not set")
|
flag.StringVar(&driveModeTopic, "mqtt-topic-drive-mode", os.Getenv("MQTT_TOPIC_DRIVE_MODE"), "Mqtt topic that contains DriveMode value, use MQTT_TOPIC_DRIVE_MODE if args not set")
|
||||||
flag.StringVar(&recordTopic, "mqtt-topic-record", os.Getenv("MQTT_TOPIC_RECORD"), "Mqtt topic that contains video recording state, use MQTT_TOPIC_RECORD if args not set")
|
flag.StringVar(&recordTopic, "mqtt-topic-record", os.Getenv("MQTT_TOPIC_RECORD"), "Mqtt topic that contains video recording state, use MQTT_TOPIC_RECORD if args not set")
|
||||||
flag.StringVar(&speedZoneTopic, "mqtt-topic-speed-zone", os.Getenv("MQTT_TOPIC_SPEED_ZONE"), "Mqtt topic that contains speed zone, use MQTT_TOPIC_SPEED_ZONE if args not set")
|
|
||||||
flag.StringVar(&throttleTopic, "mqtt-topic-throttle", os.Getenv("MQTT_TOPIC_THROTTLE"), "Mqtt topic that contains throttle, use MQTT_TOPIC_THROTTLE if args not set")
|
|
||||||
flag.BoolVar(&enableSpeedZoneMode, "enable-speedzone-mode", false, "Enable speed-zone mode")
|
|
||||||
|
|
||||||
logLevel := zap.LevelFlag("log", zap.InfoLevel, "log level")
|
logLevel := zap.LevelFlag("log", zap.InfoLevel, "log level")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
@ -56,11 +52,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer client.Disconnect(50)
|
defer client.Disconnect(50)
|
||||||
|
|
||||||
mode := part.LedModeBrake
|
p := part.NewPart(client, driveModeTopic, recordTopic)
|
||||||
if enableSpeedZoneMode {
|
|
||||||
mode = part.LedModeSpeedZone
|
|
||||||
}
|
|
||||||
p := part.NewPart(client, driveModeTopic, recordTopic, speedZoneTopic, throttleTopic, mode)
|
|
||||||
defer p.Stop()
|
defer p.Stop()
|
||||||
|
|
||||||
cli.HandleExit(p)
|
cli.HandleExit(p)
|
||||||
|
4
go.mod
4
go.mod
@ -1,10 +1,10 @@
|
|||||||
module github.com/cyrilix/robocar-led
|
module github.com/cyrilix/robocar-led
|
||||||
|
|
||||||
go 1.19
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cyrilix/robocar-base v0.1.7
|
github.com/cyrilix/robocar-base v0.1.7
|
||||||
github.com/cyrilix/robocar-protobuf/go v1.3.0
|
github.com/cyrilix/robocar-protobuf/go v1.0.5
|
||||||
github.com/eclipse/paho.mqtt.golang v1.4.1
|
github.com/eclipse/paho.mqtt.golang v1.4.1
|
||||||
go.uber.org/zap v1.21.0
|
go.uber.org/zap v1.21.0
|
||||||
google.golang.org/protobuf v1.28.0
|
google.golang.org/protobuf v1.28.0
|
||||||
|
2
go.sum
2
go.sum
@ -4,8 +4,6 @@ github.com/cyrilix/robocar-base v0.1.7 h1:EVzZ0KjigSFpke5f3A/PybEH3WFUEIrYSc3z/d
|
|||||||
github.com/cyrilix/robocar-base v0.1.7/go.mod h1:4E11HQSNy2NT8e7MW188y6ST9C0RzarKyn7sK/3V/Lk=
|
github.com/cyrilix/robocar-base v0.1.7/go.mod h1:4E11HQSNy2NT8e7MW188y6ST9C0RzarKyn7sK/3V/Lk=
|
||||||
github.com/cyrilix/robocar-protobuf/go v1.0.5 h1:PX1At+pf6G7gJwT4LzJLQu3/LPFTTNNlZmZSYtnSELY=
|
github.com/cyrilix/robocar-protobuf/go v1.0.5 h1:PX1At+pf6G7gJwT4LzJLQu3/LPFTTNNlZmZSYtnSELY=
|
||||||
github.com/cyrilix/robocar-protobuf/go v1.0.5/go.mod h1:Y3AE28K5V7EZxMXp/6A8RhkRz15VOfFy4CjST35FbtQ=
|
github.com/cyrilix/robocar-protobuf/go v1.0.5/go.mod h1:Y3AE28K5V7EZxMXp/6A8RhkRz15VOfFy4CjST35FbtQ=
|
||||||
github.com/cyrilix/robocar-protobuf/go v1.3.0 h1:vLsoLQeIfXPnrJ+xYrPy/R/swjYiMBBR7wT2ILdLcQA=
|
|
||||||
github.com/cyrilix/robocar-protobuf/go v1.3.0/go.mod h1:Y3AE28K5V7EZxMXp/6A8RhkRz15VOfFy4CjST35FbtQ=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
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 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
@ -21,10 +21,8 @@ func init() {
|
|||||||
var (
|
var (
|
||||||
ColorBlack = Color{0, 0, 0}
|
ColorBlack = Color{0, 0, 0}
|
||||||
ColorRed = Color{255, 0, 0}
|
ColorRed = Color{255, 0, 0}
|
||||||
ColorYellow = Color{255, 255, 0}
|
|
||||||
ColorGreen = Color{0, 255, 0}
|
ColorGreen = Color{0, 255, 0}
|
||||||
ColorBlue = Color{0, 0, 255}
|
ColorBlue = Color{0, 0, 255}
|
||||||
ColorWhite = Color{255, 255, 255}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func New() *PiColorLed {
|
func New() *PiColorLed {
|
||||||
|
@ -11,38 +11,27 @@ func TestColorLed_Red(t *testing.T) {
|
|||||||
setLedBackup := setLed
|
setLedBackup := setLed
|
||||||
defer func() { setLed = setLedBackup }()
|
defer func() { setLed = setLedBackup }()
|
||||||
|
|
||||||
l := New()
|
ledColors := make(map[gpio.PinIO]int)
|
||||||
fakeLed := struct {
|
|
||||||
redValue int
|
|
||||||
greenValue int
|
|
||||||
blueValue int
|
|
||||||
}{}
|
|
||||||
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
defer mutex.Unlock()
|
defer mutex.Unlock()
|
||||||
switch led {
|
ledColors[led] = v
|
||||||
case l.pinRed:
|
|
||||||
fakeLed.redValue = v
|
|
||||||
case l.pinGreen:
|
|
||||||
fakeLed.greenValue = v
|
|
||||||
case l.pinBlue:
|
|
||||||
fakeLed.blueValue = v
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l := New()
|
||||||
if l.Red() != 0 {
|
if l.Red() != 0 {
|
||||||
t.Errorf("%T.Red(): %v, wants %v", l, l.Red(), 0)
|
t.Errorf("%T.Red(): %v, wants %v", l, l.Red(), 0)
|
||||||
}
|
}
|
||||||
if fakeLed.redValue != 0 {
|
if ledColors[l.pinRed] != 0 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.redValue, 0)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinRed], 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
l.SetColor(ColorRed)
|
l.SetColor(ColorRed)
|
||||||
if l.Red() != 255 {
|
if l.Red() != 255 {
|
||||||
t.Errorf("%T.Red(): %v, wants %v", l, l.Red(), 255)
|
t.Errorf("%T.Red(): %v, wants %v", l, l.Red(), 255)
|
||||||
}
|
}
|
||||||
if fakeLed.redValue != 255 {
|
if ledColors[l.pinRed] != 255 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.redValue, 255)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinRed], 255)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,38 +39,27 @@ func TestColorLed_Green(t *testing.T) {
|
|||||||
setLedBackup := setLed
|
setLedBackup := setLed
|
||||||
defer func() { setLed = setLedBackup }()
|
defer func() { setLed = setLedBackup }()
|
||||||
|
|
||||||
l := New()
|
ledColors := make(map[gpio.PinIO]int)
|
||||||
fakeLed := struct {
|
|
||||||
redValue int
|
|
||||||
greenValue int
|
|
||||||
blueValue int
|
|
||||||
}{}
|
|
||||||
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
defer mutex.Unlock()
|
defer mutex.Unlock()
|
||||||
switch led {
|
ledColors[led] = v
|
||||||
case l.pinRed:
|
|
||||||
fakeLed.redValue = v
|
|
||||||
case l.pinGreen:
|
|
||||||
fakeLed.greenValue = v
|
|
||||||
case l.pinBlue:
|
|
||||||
fakeLed.blueValue = v
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l := New()
|
||||||
if l.Green() != 0 {
|
if l.Green() != 0 {
|
||||||
t.Errorf("%T.Green(): %v, wants %v", l, l.Green(), 0)
|
t.Errorf("%T.Green(): %v, wants %v", l, l.Green(), 0)
|
||||||
}
|
}
|
||||||
if fakeLed.greenValue != 0 {
|
if ledColors[l.pinGreen] != 0 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.greenValue, 0)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinGreen], 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
l.SetColor(ColorGreen)
|
l.SetColor(ColorGreen)
|
||||||
if l.Green() != 255 {
|
if l.Green() != 255 {
|
||||||
t.Errorf("%T.Green(): %v, wants %v", l, l.Green(), 255)
|
t.Errorf("%T.Green(): %v, wants %v", l, l.Green(), 255)
|
||||||
}
|
}
|
||||||
if fakeLed.greenValue != 255 {
|
if ledColors[l.pinGreen] != 255 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.greenValue, 255)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinGreen], 255)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,38 +67,27 @@ func TestColorLed_Blue(t *testing.T) {
|
|||||||
setLedBackup := setLed
|
setLedBackup := setLed
|
||||||
defer func() { setLed = setLedBackup }()
|
defer func() { setLed = setLedBackup }()
|
||||||
|
|
||||||
l := New()
|
ledColors := make(map[gpio.PinIO]int)
|
||||||
fakeLed := struct {
|
|
||||||
redValue int
|
|
||||||
greenValue int
|
|
||||||
blueValue int
|
|
||||||
}{}
|
|
||||||
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
setLed = func(v int, led gpio.PinIO, mutex *sync.Mutex) {
|
||||||
mutex.Lock()
|
mutex.Lock()
|
||||||
defer mutex.Unlock()
|
defer mutex.Unlock()
|
||||||
switch led {
|
ledColors[led] = v
|
||||||
case l.pinRed:
|
|
||||||
fakeLed.redValue = v
|
|
||||||
case l.pinGreen:
|
|
||||||
fakeLed.greenValue = v
|
|
||||||
case l.pinBlue:
|
|
||||||
fakeLed.blueValue = v
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l := New()
|
||||||
if l.Blue() != 0 {
|
if l.Blue() != 0 {
|
||||||
t.Errorf("%T.Blue(): %v, wants %v", l, l.Blue(), 0)
|
t.Errorf("%T.Blue(): %v, wants %v", l, l.Blue(), 0)
|
||||||
}
|
}
|
||||||
if fakeLed.blueValue != 0 {
|
if ledColors[l.pinBlue] != 0 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.blueValue, 0)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinBlue], 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
l.SetColor(ColorBlue)
|
l.SetColor(ColorBlue)
|
||||||
if l.Blue() != 255 {
|
if l.Blue() != 255 {
|
||||||
t.Errorf("%T.Blue(): %v, wants %v", l, l.Blue(), 255)
|
t.Errorf("%T.Blue(): %v, wants %v", l, l.Blue(), 255)
|
||||||
}
|
}
|
||||||
if fakeLed.blueValue != 255 {
|
if ledColors[l.pinBlue] != 255 {
|
||||||
t.Errorf("colorValue: %v, wants %v", fakeLed.blueValue, 255)
|
t.Errorf("colorValue: %v, wants %v", ledColors[l.pinBlue], 255)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
140
pkg/part/part.go
140
pkg/part/part.go
@ -12,52 +12,30 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
func NewPart(client mqtt.Client, driveModeTopic, recordTopic string) *LedPart {
|
||||||
LedModeBrake LedMode = iota
|
|
||||||
LedModeSpeedZone
|
|
||||||
)
|
|
||||||
|
|
||||||
type LedMode int
|
|
||||||
|
|
||||||
func NewPart(client mqtt.Client, driveModeTopic, recordTopic, speedZoneTopic, throttleTopic string, ledMode LedMode) *LedPart {
|
|
||||||
return &LedPart{
|
return &LedPart{
|
||||||
led: led.New(),
|
led: led.New(),
|
||||||
mode: ledMode,
|
|
||||||
client: client,
|
client: client,
|
||||||
onDriveModeTopic: driveModeTopic,
|
onDriveModeTopic: driveModeTopic,
|
||||||
onRecordTopic: recordTopic,
|
onRecordTopic: recordTopic,
|
||||||
onSpeedZoneTopic: speedZoneTopic,
|
|
||||||
onThrottleTopic: throttleTopic,
|
|
||||||
muDriveMode: sync.Mutex{},
|
muDriveMode: sync.Mutex{},
|
||||||
driveMode: events.DriveMode_INVALID,
|
m: events.DriveMode_INVALID,
|
||||||
muRecord: sync.Mutex{},
|
muRecord: sync.Mutex{},
|
||||||
recordEnabled: false,
|
recordEnabled: false,
|
||||||
muSpeedZone: sync.Mutex{},
|
|
||||||
speedZone: events.SpeedZone_UNKNOWN,
|
|
||||||
muThrottle: sync.Mutex{},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type LedPart struct {
|
type LedPart struct {
|
||||||
led led.ColoredLed
|
led led.ColoredLed
|
||||||
mode LedMode
|
|
||||||
client mqtt.Client
|
client mqtt.Client
|
||||||
onDriveModeTopic string
|
onDriveModeTopic string
|
||||||
onRecordTopic string
|
onRecordTopic string
|
||||||
onSpeedZoneTopic string
|
|
||||||
onThrottleTopic string
|
|
||||||
|
|
||||||
muDriveMode sync.Mutex
|
muDriveMode sync.Mutex
|
||||||
driveMode events.DriveMode
|
m events.DriveMode
|
||||||
muRecord sync.Mutex
|
muRecord sync.Mutex
|
||||||
recordEnabled bool
|
recordEnabled bool
|
||||||
|
|
||||||
muSpeedZone sync.Mutex
|
|
||||||
speedZone events.SpeedZone
|
|
||||||
|
|
||||||
muThrottle sync.Mutex
|
|
||||||
throttle float32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *LedPart) Start() error {
|
func (p *LedPart) Start() error {
|
||||||
@ -72,13 +50,7 @@ func (p *LedPart) Start() error {
|
|||||||
func (p *LedPart) Stop() {
|
func (p *LedPart) Stop() {
|
||||||
defer p.led.SetBlink(0)
|
defer p.led.SetBlink(0)
|
||||||
defer p.led.SetColor(led.ColorBlack)
|
defer p.led.SetColor(led.ColorBlack)
|
||||||
service.StopService("led", p.client, p.onDriveModeTopic, p.onRecordTopic, p.onSpeedZoneTopic, p.onThrottleTopic)
|
service.StopService("led", p.client, p.onDriveModeTopic, p.onRecordTopic)
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) setDriveMode(m events.DriveMode) {
|
|
||||||
p.muDriveMode.Lock()
|
|
||||||
defer p.muDriveMode.Unlock()
|
|
||||||
p.driveMode = m
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *LedPart) onDriveMode(_ mqtt.Client, message mqtt.Message) {
|
func (p *LedPart) onDriveMode(_ mqtt.Client, message mqtt.Message) {
|
||||||
@ -88,8 +60,12 @@ func (p *LedPart) onDriveMode(_ mqtt.Client, message mqtt.Message) {
|
|||||||
zap.S().Errorf("unable to unmarshal %T message: %v", driveModeMessage, err)
|
zap.S().Errorf("unable to unmarshal %T message: %v", driveModeMessage, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.setDriveMode(driveModeMessage.GetDriveMode())
|
switch driveModeMessage.GetDriveMode() {
|
||||||
p.updateColor()
|
case events.DriveMode_USER:
|
||||||
|
p.led.SetColor(led.ColorGreen)
|
||||||
|
case events.DriveMode_PILOT:
|
||||||
|
p.led.SetColor(led.ColorBlue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *LedPart) onRecord(client mqtt.Client, message mqtt.Message) {
|
func (p *LedPart) onRecord(client mqtt.Client, message mqtt.Message) {
|
||||||
@ -116,91 +92,6 @@ func (p *LedPart) onRecord(client mqtt.Client, message mqtt.Message) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *LedPart) setSpeedZone(sz events.SpeedZone) {
|
|
||||||
p.muSpeedZone.Lock()
|
|
||||||
defer p.muSpeedZone.Unlock()
|
|
||||||
p.speedZone = sz
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) onSpeedZone(_ mqtt.Client, message mqtt.Message) {
|
|
||||||
var speedZoneMessage events.SpeedZoneMessage
|
|
||||||
err := proto.Unmarshal(message.Payload(), &speedZoneMessage)
|
|
||||||
if err != nil {
|
|
||||||
zap.S().Errorf("unable to unmarshal %T message: %v", speedZoneMessage, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
p.setSpeedZone(speedZoneMessage.GetSpeedZone())
|
|
||||||
p.updateColor()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) setThrottle(throttle float32) {
|
|
||||||
p.muThrottle.Lock()
|
|
||||||
defer p.muThrottle.Unlock()
|
|
||||||
p.throttle = throttle
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) onThrottle(_ mqtt.Client, message mqtt.Message) {
|
|
||||||
var throttleMessage events.ThrottleMessage
|
|
||||||
err := proto.Unmarshal(message.Payload(), &throttleMessage)
|
|
||||||
if err != nil {
|
|
||||||
zap.S().Errorf("unable to unmarshal %T message: %v", throttleMessage, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
p.setThrottle(throttleMessage.GetThrottle())
|
|
||||||
p.updateColor()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) updateColor() {
|
|
||||||
p.muSpeedZone.Lock()
|
|
||||||
defer p.muSpeedZone.Unlock()
|
|
||||||
p.muDriveMode.Lock()
|
|
||||||
defer p.muDriveMode.Unlock()
|
|
||||||
p.muThrottle.Lock()
|
|
||||||
defer p.muThrottle.Unlock()
|
|
||||||
|
|
||||||
if p.throttle <= -0.05 {
|
|
||||||
p.led.SetColor(led.Color{Red: int(p.throttle * -255)})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch p.mode {
|
|
||||||
case LedModeBrake:
|
|
||||||
p.updateBrakeColor()
|
|
||||||
case LedModeSpeedZone:
|
|
||||||
p.updateSpeedZoneColor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) updateSpeedZoneColor() {
|
|
||||||
switch p.driveMode {
|
|
||||||
case events.DriveMode_USER:
|
|
||||||
p.led.SetColor(led.ColorGreen)
|
|
||||||
case events.DriveMode_PILOT:
|
|
||||||
switch p.speedZone {
|
|
||||||
case events.SpeedZone_UNKNOWN:
|
|
||||||
p.led.SetColor(led.ColorWhite)
|
|
||||||
case events.SpeedZone_SLOW:
|
|
||||||
p.led.SetColor(led.ColorRed)
|
|
||||||
case events.SpeedZone_NORMAL:
|
|
||||||
p.led.SetColor(led.ColorYellow)
|
|
||||||
case events.SpeedZone_FAST:
|
|
||||||
p.led.SetColor(led.ColorBlue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) updateBrakeColor() {
|
|
||||||
|
|
||||||
switch p.driveMode {
|
|
||||||
case events.DriveMode_USER:
|
|
||||||
p.led.SetColor(led.ColorGreen)
|
|
||||||
case events.DriveMode_PILOT:
|
|
||||||
p.led.SetColor(led.ColorBlue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (p *LedPart) registerCallbacks() error {
|
func (p *LedPart) registerCallbacks() error {
|
||||||
err := service.RegisterCallback(p.client, p.onDriveModeTopic, p.onDriveMode)
|
err := service.RegisterCallback(p.client, p.onDriveModeTopic, p.onDriveMode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -211,16 +102,5 @@ func (p *LedPart) registerCallbacks() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = service.RegisterCallback(p.client, p.onSpeedZoneTopic, p.onSpeedZone)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = service.RegisterCallback(p.client, p.onThrottleTopic, p.onThrottle)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ func (f *fakeLed) SetBlink(freq float64) {
|
|||||||
|
|
||||||
func TestLedPart_OnDriveMode(t *testing.T) {
|
func TestLedPart_OnDriveMode(t *testing.T) {
|
||||||
l := fakeLed{}
|
l := fakeLed{}
|
||||||
p := LedPart{led: &l, speedZone: events.SpeedZone_FAST}
|
p := LedPart{led: &l}
|
||||||
|
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
msg mqtt.Message
|
msg mqtt.Message
|
||||||
@ -50,11 +50,10 @@ func TestLedPart_OnDriveMode(t *testing.T) {
|
|||||||
}
|
}
|
||||||
value := msg.DriveMode
|
value := msg.DriveMode
|
||||||
if l.color != c.color {
|
if l.color != c.color {
|
||||||
t.Errorf("driveMode(%v)=invalid value for expectedColor: %v, wants %v", value, l.color, c.color)
|
t.Errorf("driveMode(%v)=invalid value for color: %v, wants %v", value, l.color, c.color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLedPart_OnRecord(t *testing.T) {
|
func TestLedPart_OnRecord(t *testing.T) {
|
||||||
led := fakeLed{}
|
led := fakeLed{}
|
||||||
p := LedPart{led: &led}
|
p := LedPart{led: &led}
|
||||||
@ -84,90 +83,3 @@ func TestLedPart_OnRecord(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLedPart_OnSpeedZone(t *testing.T) {
|
|
||||||
l := fakeLed{}
|
|
||||||
p := LedPart{led: &l, mode: LedModeSpeedZone, driveMode: events.DriveMode_PILOT}
|
|
||||||
|
|
||||||
cases := []struct {
|
|
||||||
msg mqtt.Message
|
|
||||||
color led.Color
|
|
||||||
}{
|
|
||||||
{testtools.NewFakeMessageFromProtobuf("speedzone", &events.SpeedZoneMessage{SpeedZone: events.SpeedZone_SLOW}), led.ColorRed},
|
|
||||||
{testtools.NewFakeMessageFromProtobuf("speedzone", &events.SpeedZoneMessage{SpeedZone: events.SpeedZone_NORMAL}), led.ColorYellow},
|
|
||||||
{testtools.NewFakeMessageFromProtobuf("speedzone", &events.SpeedZoneMessage{SpeedZone: events.SpeedZone_FAST}), led.ColorBlue},
|
|
||||||
{testtools.NewFakeMessageFromProtobuf("speedzone", &events.SpeedZoneMessage{SpeedZone: events.SpeedZone_UNKNOWN}), led.ColorWhite},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, c := range cases {
|
|
||||||
p.onSpeedZone(nil, c.msg)
|
|
||||||
time.Sleep(1 * time.Millisecond)
|
|
||||||
var msg events.SpeedZoneMessage
|
|
||||||
err := proto.Unmarshal(c.msg.Payload(), &msg)
|
|
||||||
if err != nil {
|
|
||||||
t.Errorf("unable to unmarshal drive mode message: %v", err)
|
|
||||||
}
|
|
||||||
value := msg.GetSpeedZone()
|
|
||||||
if l.color != c.color {
|
|
||||||
t.Errorf("driveMode(%v)=invalid value for expectedColor: %v, wants %v", value, l.color, c.color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestLedPart_OnThrottle(t *testing.T) {
|
|
||||||
|
|
||||||
cases := []struct {
|
|
||||||
name string
|
|
||||||
msg mqtt.Message
|
|
||||||
expectedColor led.Color
|
|
||||||
}{
|
|
||||||
{"throttle stop",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: 0.}),
|
|
||||||
led.ColorBlue,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"throttle normal",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: 0.5}),
|
|
||||||
led.ColorBlue,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"near zero",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: -0.01}),
|
|
||||||
led.ColorBlue,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"slow brake",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: -0.06}),
|
|
||||||
led.Color{Red: 15},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"normal brake",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: -0.5}),
|
|
||||||
led.Color{Red: 127},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"high brake",
|
|
||||||
testtools.NewFakeMessageFromProtobuf("throttle", &events.ThrottleMessage{Throttle: -1.}),
|
|
||||||
led.ColorRed,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, c := range cases {
|
|
||||||
t.Run(c.name, func(t *testing.T) {
|
|
||||||
l := fakeLed{}
|
|
||||||
p := LedPart{led: &l, mode: LedModeBrake, driveMode: events.DriveMode_PILOT}
|
|
||||||
|
|
||||||
p.onThrottle(nil, c.msg)
|
|
||||||
time.Sleep(1 * time.Millisecond)
|
|
||||||
var msg events.ThrottleMessage
|
|
||||||
err := proto.Unmarshal(c.msg.Payload(), &msg)
|
|
||||||
if err != nil {
|
|
||||||
t.Errorf("unable to unmarshal drive mode message: %v", err)
|
|
||||||
}
|
|
||||||
value := msg.GetThrottle()
|
|
||||||
if l.color != c.expectedColor {
|
|
||||||
t.Errorf("driveMode(%v)=invalid value for expectedColor: %v, wants %v", value, l.color, c.expectedColor)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
478
vendor/github.com/cyrilix/robocar-protobuf/go/events/events.pb.go
generated
vendored
478
vendor/github.com/cyrilix/robocar-protobuf/go/events/events.pb.go
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.28.1
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.21.4
|
// protoc v3.12.4
|
||||||
// source: events/events.proto
|
// source: events/events.proto
|
||||||
|
|
||||||
package events
|
package events
|
||||||
@ -21,58 +21,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
type SpeedZone int32
|
|
||||||
|
|
||||||
const (
|
|
||||||
SpeedZone_UNKNOWN SpeedZone = 0
|
|
||||||
SpeedZone_SLOW SpeedZone = 1
|
|
||||||
SpeedZone_NORMAL SpeedZone = 2
|
|
||||||
SpeedZone_FAST SpeedZone = 3
|
|
||||||
)
|
|
||||||
|
|
||||||
// Enum value maps for SpeedZone.
|
|
||||||
var (
|
|
||||||
SpeedZone_name = map[int32]string{
|
|
||||||
0: "UNKNOWN",
|
|
||||||
1: "SLOW",
|
|
||||||
2: "NORMAL",
|
|
||||||
3: "FAST",
|
|
||||||
}
|
|
||||||
SpeedZone_value = map[string]int32{
|
|
||||||
"UNKNOWN": 0,
|
|
||||||
"SLOW": 1,
|
|
||||||
"NORMAL": 2,
|
|
||||||
"FAST": 3,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
func (x SpeedZone) Enum() *SpeedZone {
|
|
||||||
p := new(SpeedZone)
|
|
||||||
*p = x
|
|
||||||
return p
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x SpeedZone) String() string {
|
|
||||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
||||||
}
|
|
||||||
|
|
||||||
func (SpeedZone) Descriptor() protoreflect.EnumDescriptor {
|
|
||||||
return file_events_events_proto_enumTypes[0].Descriptor()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (SpeedZone) Type() protoreflect.EnumType {
|
|
||||||
return &file_events_events_proto_enumTypes[0]
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x SpeedZone) Number() protoreflect.EnumNumber {
|
|
||||||
return protoreflect.EnumNumber(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use SpeedZone.Descriptor instead.
|
|
||||||
func (SpeedZone) EnumDescriptor() ([]byte, []int) {
|
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
type DriveMode int32
|
type DriveMode int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -106,11 +54,11 @@ func (x DriveMode) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (DriveMode) Descriptor() protoreflect.EnumDescriptor {
|
func (DriveMode) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_events_events_proto_enumTypes[1].Descriptor()
|
return file_events_events_proto_enumTypes[0].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DriveMode) Type() protoreflect.EnumType {
|
func (DriveMode) Type() protoreflect.EnumType {
|
||||||
return &file_events_events_proto_enumTypes[1]
|
return &file_events_events_proto_enumTypes[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x DriveMode) Number() protoreflect.EnumNumber {
|
func (x DriveMode) Number() protoreflect.EnumNumber {
|
||||||
@ -119,7 +67,7 @@ func (x DriveMode) Number() protoreflect.EnumNumber {
|
|||||||
|
|
||||||
// Deprecated: Use DriveMode.Descriptor instead.
|
// Deprecated: Use DriveMode.Descriptor instead.
|
||||||
func (DriveMode) EnumDescriptor() ([]byte, []int) {
|
func (DriveMode) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{1}
|
return file_events_events_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
type TypeObject int32
|
type TypeObject int32
|
||||||
@ -158,11 +106,11 @@ func (x TypeObject) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (TypeObject) Descriptor() protoreflect.EnumDescriptor {
|
func (TypeObject) Descriptor() protoreflect.EnumDescriptor {
|
||||||
return file_events_events_proto_enumTypes[2].Descriptor()
|
return file_events_events_proto_enumTypes[1].Descriptor()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (TypeObject) Type() protoreflect.EnumType {
|
func (TypeObject) Type() protoreflect.EnumType {
|
||||||
return &file_events_events_proto_enumTypes[2]
|
return &file_events_events_proto_enumTypes[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x TypeObject) Number() protoreflect.EnumNumber {
|
func (x TypeObject) Number() protoreflect.EnumNumber {
|
||||||
@ -171,7 +119,7 @@ func (x TypeObject) Number() protoreflect.EnumNumber {
|
|||||||
|
|
||||||
// Deprecated: Use TypeObject.Descriptor instead.
|
// Deprecated: Use TypeObject.Descriptor instead.
|
||||||
func (TypeObject) EnumDescriptor() ([]byte, []int) {
|
func (TypeObject) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{2}
|
return file_events_events_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
type FrameRef struct {
|
type FrameRef struct {
|
||||||
@ -418,69 +366,6 @@ func (x *ThrottleMessage) GetFrameRef() *FrameRef {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type SpeedZoneMessage struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
SpeedZone SpeedZone `protobuf:"varint,1,opt,name=speed_zone,json=speedZone,proto3,enum=robocar.events.SpeedZone" json:"speed_zone,omitempty"`
|
|
||||||
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
|
|
||||||
FrameRef *FrameRef `protobuf:"bytes,3,opt,name=frame_ref,json=frameRef,proto3" json:"frame_ref,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) Reset() {
|
|
||||||
*x = SpeedZoneMessage{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_events_events_proto_msgTypes[4]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*SpeedZoneMessage) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_events_events_proto_msgTypes[4]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use SpeedZoneMessage.ProtoReflect.Descriptor instead.
|
|
||||||
func (*SpeedZoneMessage) Descriptor() ([]byte, []int) {
|
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{4}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) GetSpeedZone() SpeedZone {
|
|
||||||
if x != nil {
|
|
||||||
return x.SpeedZone
|
|
||||||
}
|
|
||||||
return SpeedZone_UNKNOWN
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) GetConfidence() float32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Confidence
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *SpeedZoneMessage) GetFrameRef() *FrameRef {
|
|
||||||
if x != nil {
|
|
||||||
return x.FrameRef
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type DriveModeMessage struct {
|
type DriveModeMessage struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -492,7 +377,7 @@ type DriveModeMessage struct {
|
|||||||
func (x *DriveModeMessage) Reset() {
|
func (x *DriveModeMessage) Reset() {
|
||||||
*x = DriveModeMessage{}
|
*x = DriveModeMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[5]
|
mi := &file_events_events_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -505,7 +390,7 @@ func (x *DriveModeMessage) String() string {
|
|||||||
func (*DriveModeMessage) ProtoMessage() {}
|
func (*DriveModeMessage) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DriveModeMessage) ProtoReflect() protoreflect.Message {
|
func (x *DriveModeMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[5]
|
mi := &file_events_events_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -518,7 +403,7 @@ func (x *DriveModeMessage) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use DriveModeMessage.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DriveModeMessage.ProtoReflect.Descriptor instead.
|
||||||
func (*DriveModeMessage) Descriptor() ([]byte, []int) {
|
func (*DriveModeMessage) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{5}
|
return file_events_events_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DriveModeMessage) GetDriveMode() DriveMode {
|
func (x *DriveModeMessage) GetDriveMode() DriveMode {
|
||||||
@ -540,7 +425,7 @@ type ObjectsMessage struct {
|
|||||||
func (x *ObjectsMessage) Reset() {
|
func (x *ObjectsMessage) Reset() {
|
||||||
*x = ObjectsMessage{}
|
*x = ObjectsMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[6]
|
mi := &file_events_events_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -553,7 +438,7 @@ func (x *ObjectsMessage) String() string {
|
|||||||
func (*ObjectsMessage) ProtoMessage() {}
|
func (*ObjectsMessage) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ObjectsMessage) ProtoReflect() protoreflect.Message {
|
func (x *ObjectsMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[6]
|
mi := &file_events_events_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -566,7 +451,7 @@ func (x *ObjectsMessage) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ObjectsMessage.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ObjectsMessage.ProtoReflect.Descriptor instead.
|
||||||
func (*ObjectsMessage) Descriptor() ([]byte, []int) {
|
func (*ObjectsMessage) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{6}
|
return file_events_events_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ObjectsMessage) GetObjects() []*Object {
|
func (x *ObjectsMessage) GetObjects() []*Object {
|
||||||
@ -583,24 +468,24 @@ func (x *ObjectsMessage) GetFrameRef() *FrameRef {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// BoundingBox that contains an object, coordinates as percent
|
// BoundingBox that contains an object
|
||||||
type Object struct {
|
type Object struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Type TypeObject `protobuf:"varint,1,opt,name=type,proto3,enum=robocar.events.TypeObject" json:"type,omitempty"`
|
Type TypeObject `protobuf:"varint,1,opt,name=type,proto3,enum=robocar.events.TypeObject" json:"type,omitempty"`
|
||||||
Left float32 `protobuf:"fixed32,2,opt,name=left,proto3" json:"left,omitempty"`
|
Left int32 `protobuf:"varint,2,opt,name=left,proto3" json:"left,omitempty"`
|
||||||
Top float32 `protobuf:"fixed32,3,opt,name=top,proto3" json:"top,omitempty"`
|
Top int32 `protobuf:"varint,3,opt,name=top,proto3" json:"top,omitempty"`
|
||||||
Right float32 `protobuf:"fixed32,4,opt,name=right,proto3" json:"right,omitempty"`
|
Right int32 `protobuf:"varint,4,opt,name=right,proto3" json:"right,omitempty"`
|
||||||
Bottom float32 `protobuf:"fixed32,5,opt,name=bottom,proto3" json:"bottom,omitempty"`
|
Bottom int32 `protobuf:"varint,5,opt,name=bottom,proto3" json:"bottom,omitempty"`
|
||||||
Confidence float32 `protobuf:"fixed32,6,opt,name=confidence,proto3" json:"confidence,omitempty"`
|
Confidence float32 `protobuf:"fixed32,6,opt,name=confidence,proto3" json:"confidence,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) Reset() {
|
func (x *Object) Reset() {
|
||||||
*x = Object{}
|
*x = Object{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[7]
|
mi := &file_events_events_proto_msgTypes[6]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -613,7 +498,7 @@ func (x *Object) String() string {
|
|||||||
func (*Object) ProtoMessage() {}
|
func (*Object) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Object) ProtoReflect() protoreflect.Message {
|
func (x *Object) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[7]
|
mi := &file_events_events_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -626,7 +511,7 @@ func (x *Object) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Object.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Object.ProtoReflect.Descriptor instead.
|
||||||
func (*Object) Descriptor() ([]byte, []int) {
|
func (*Object) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{7}
|
return file_events_events_proto_rawDescGZIP(), []int{6}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) GetType() TypeObject {
|
func (x *Object) GetType() TypeObject {
|
||||||
@ -636,28 +521,28 @@ func (x *Object) GetType() TypeObject {
|
|||||||
return TypeObject_ANY
|
return TypeObject_ANY
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) GetLeft() float32 {
|
func (x *Object) GetLeft() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Left
|
return x.Left
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) GetTop() float32 {
|
func (x *Object) GetTop() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Top
|
return x.Top
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) GetRight() float32 {
|
func (x *Object) GetRight() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Right
|
return x.Right
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Object) GetBottom() float32 {
|
func (x *Object) GetBottom() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Bottom
|
return x.Bottom
|
||||||
}
|
}
|
||||||
@ -682,7 +567,7 @@ type SwitchRecordMessage struct {
|
|||||||
func (x *SwitchRecordMessage) Reset() {
|
func (x *SwitchRecordMessage) Reset() {
|
||||||
*x = SwitchRecordMessage{}
|
*x = SwitchRecordMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[8]
|
mi := &file_events_events_proto_msgTypes[7]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -695,7 +580,7 @@ func (x *SwitchRecordMessage) String() string {
|
|||||||
func (*SwitchRecordMessage) ProtoMessage() {}
|
func (*SwitchRecordMessage) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SwitchRecordMessage) ProtoReflect() protoreflect.Message {
|
func (x *SwitchRecordMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[8]
|
mi := &file_events_events_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -708,7 +593,7 @@ func (x *SwitchRecordMessage) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use SwitchRecordMessage.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SwitchRecordMessage.ProtoReflect.Descriptor instead.
|
||||||
func (*SwitchRecordMessage) Descriptor() ([]byte, []int) {
|
func (*SwitchRecordMessage) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{8}
|
return file_events_events_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SwitchRecordMessage) GetEnabled() bool {
|
func (x *SwitchRecordMessage) GetEnabled() bool {
|
||||||
@ -732,7 +617,7 @@ type RoadMessage struct {
|
|||||||
func (x *RoadMessage) Reset() {
|
func (x *RoadMessage) Reset() {
|
||||||
*x = RoadMessage{}
|
*x = RoadMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[9]
|
mi := &file_events_events_proto_msgTypes[8]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -745,7 +630,7 @@ func (x *RoadMessage) String() string {
|
|||||||
func (*RoadMessage) ProtoMessage() {}
|
func (*RoadMessage) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RoadMessage) ProtoReflect() protoreflect.Message {
|
func (x *RoadMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[9]
|
mi := &file_events_events_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -758,7 +643,7 @@ func (x *RoadMessage) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RoadMessage.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RoadMessage.ProtoReflect.Descriptor instead.
|
||||||
func (*RoadMessage) Descriptor() ([]byte, []int) {
|
func (*RoadMessage) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{9}
|
return file_events_events_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RoadMessage) GetContour() []*Point {
|
func (x *RoadMessage) GetContour() []*Point {
|
||||||
@ -794,7 +679,7 @@ type Point struct {
|
|||||||
func (x *Point) Reset() {
|
func (x *Point) Reset() {
|
||||||
*x = Point{}
|
*x = Point{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[10]
|
mi := &file_events_events_proto_msgTypes[9]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -807,7 +692,7 @@ func (x *Point) String() string {
|
|||||||
func (*Point) ProtoMessage() {}
|
func (*Point) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Point) ProtoReflect() protoreflect.Message {
|
func (x *Point) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[10]
|
mi := &file_events_events_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -820,7 +705,7 @@ func (x *Point) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Point.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Point.ProtoReflect.Descriptor instead.
|
||||||
func (*Point) Descriptor() ([]byte, []int) {
|
func (*Point) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{10}
|
return file_events_events_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Point) GetX() int32 {
|
func (x *Point) GetX() int32 {
|
||||||
@ -852,7 +737,7 @@ type Ellipse struct {
|
|||||||
func (x *Ellipse) Reset() {
|
func (x *Ellipse) Reset() {
|
||||||
*x = Ellipse{}
|
*x = Ellipse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[11]
|
mi := &file_events_events_proto_msgTypes[10]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -865,7 +750,7 @@ func (x *Ellipse) String() string {
|
|||||||
func (*Ellipse) ProtoMessage() {}
|
func (*Ellipse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Ellipse) ProtoReflect() protoreflect.Message {
|
func (x *Ellipse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[11]
|
mi := &file_events_events_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -878,7 +763,7 @@ func (x *Ellipse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Ellipse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Ellipse.ProtoReflect.Descriptor instead.
|
||||||
func (*Ellipse) Descriptor() ([]byte, []int) {
|
func (*Ellipse) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{11}
|
return file_events_events_proto_rawDescGZIP(), []int{10}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Ellipse) GetCenter() *Point {
|
func (x *Ellipse) GetCenter() *Point {
|
||||||
@ -924,15 +809,13 @@ type RecordMessage struct {
|
|||||||
|
|
||||||
Frame *FrameMessage `protobuf:"bytes,1,opt,name=frame,proto3" json:"frame,omitempty"`
|
Frame *FrameMessage `protobuf:"bytes,1,opt,name=frame,proto3" json:"frame,omitempty"`
|
||||||
Steering *SteeringMessage `protobuf:"bytes,2,opt,name=steering,proto3" json:"steering,omitempty"`
|
Steering *SteeringMessage `protobuf:"bytes,2,opt,name=steering,proto3" json:"steering,omitempty"`
|
||||||
AutopilotSteering *SteeringMessage `protobuf:"bytes,4,opt,name=autopilot_steering,json=autopilotSteering,proto3" json:"autopilot_steering,omitempty"`
|
|
||||||
DriveMode *DriveModeMessage `protobuf:"bytes,5,opt,name=drive_mode,json=driveMode,proto3" json:"drive_mode,omitempty"`
|
|
||||||
RecordSet string `protobuf:"bytes,3,opt,name=recordSet,proto3" json:"recordSet,omitempty"` // Record set name
|
RecordSet string `protobuf:"bytes,3,opt,name=recordSet,proto3" json:"recordSet,omitempty"` // Record set name
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RecordMessage) Reset() {
|
func (x *RecordMessage) Reset() {
|
||||||
*x = RecordMessage{}
|
*x = RecordMessage{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_events_events_proto_msgTypes[12]
|
mi := &file_events_events_proto_msgTypes[11]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -945,7 +828,7 @@ func (x *RecordMessage) String() string {
|
|||||||
func (*RecordMessage) ProtoMessage() {}
|
func (*RecordMessage) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *RecordMessage) ProtoReflect() protoreflect.Message {
|
func (x *RecordMessage) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_events_events_proto_msgTypes[12]
|
mi := &file_events_events_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -958,7 +841,7 @@ func (x *RecordMessage) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use RecordMessage.ProtoReflect.Descriptor instead.
|
// Deprecated: Use RecordMessage.ProtoReflect.Descriptor instead.
|
||||||
func (*RecordMessage) Descriptor() ([]byte, []int) {
|
func (*RecordMessage) Descriptor() ([]byte, []int) {
|
||||||
return file_events_events_proto_rawDescGZIP(), []int{12}
|
return file_events_events_proto_rawDescGZIP(), []int{11}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RecordMessage) GetFrame() *FrameMessage {
|
func (x *RecordMessage) GetFrame() *FrameMessage {
|
||||||
@ -975,20 +858,6 @@ func (x *RecordMessage) GetSteering() *SteeringMessage {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RecordMessage) GetAutopilotSteering() *SteeringMessage {
|
|
||||||
if x != nil {
|
|
||||||
return x.AutopilotSteering
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *RecordMessage) GetDriveMode() *DriveModeMessage {
|
|
||||||
if x != nil {
|
|
||||||
return x.DriveMode
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *RecordMessage) GetRecordSet() string {
|
func (x *RecordMessage) GetRecordSet() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.RecordSet
|
return x.RecordSet
|
||||||
@ -1032,96 +901,73 @@ var file_events_events_proto_rawDesc = []byte{
|
|||||||
0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f,
|
0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f,
|
||||||
0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61,
|
0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61,
|
||||||
0x6d, 0x65, 0x52, 0x65, 0x66, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x22,
|
0x6d, 0x65, 0x52, 0x65, 0x66, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x22,
|
||||||
0xa3, 0x01, 0x0a, 0x10, 0x53, 0x70, 0x65, 0x65, 0x64, 0x5a, 0x6f, 0x6e, 0x65, 0x4d, 0x65, 0x73,
|
0x4c, 0x0a, 0x10, 0x44, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x73, 0x73,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5f, 0x7a, 0x6f,
|
0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x72, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64,
|
||||||
0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63,
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61,
|
||||||
0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x70, 0x65, 0x65, 0x64, 0x5a,
|
0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f,
|
||||||
0x6f, 0x6e, 0x65, 0x52, 0x09, 0x73, 0x70, 0x65, 0x65, 0x64, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x1e,
|
0x64, 0x65, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x79, 0x0a,
|
||||||
0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||||
0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x35,
|
0x30, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||||
0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x32, 0x16, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
|
||||||
0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e,
|
0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||||
0x74, 0x73, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x52, 0x08, 0x66, 0x72, 0x61,
|
0x73, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x02,
|
||||||
0x6d, 0x65, 0x52, 0x65, 0x66, 0x22, 0x4c, 0x0a, 0x10, 0x44, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65,
|
||||||
0x64, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x72, 0x69,
|
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x52, 0x08,
|
||||||
0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e,
|
0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x22, 0xac, 0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a,
|
||||||
0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x44,
|
0x65, 0x63, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x4d,
|
0x0e, 0x32, 0x1a, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e,
|
||||||
0x6f, 0x64, 0x65, 0x22, 0x79, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x4d, 0x65,
|
0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x04, 0x74,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73,
|
0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72,
|
0x05, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6f, 0x70, 0x18, 0x03,
|
||||||
0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x69, 0x67,
|
||||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65,
|
0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x12,
|
||||||
0x5f, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f, 0x62,
|
0x16, 0x0a, 0x06, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61, 0x6d,
|
0x06, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
0x65, 0x52, 0x65, 0x66, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x22, 0xac,
|
0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
|
||||||
0x01, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70,
|
0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x2f, 0x0a, 0x13, 0x53, 0x77, 0x69, 0x74, 0x63,
|
||||||
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61,
|
0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18,
|
||||||
0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x4f, 0x62, 0x6a,
|
0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||||
0x65, 0x63, 0x74, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x65, 0x66,
|
0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xa8, 0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x61,
|
||||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x6c, 0x65, 0x66, 0x74, 0x12, 0x10, 0x0a,
|
0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
|
||||||
0x03, 0x74, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x74, 0x6f, 0x70, 0x12,
|
0x6f, 0x75, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x6f, 0x62, 0x6f,
|
||||||
0x14, 0x0a, 0x05, 0x72, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05,
|
0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74,
|
||||||
0x72, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x18,
|
0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x65, 0x6c, 0x6c,
|
||||||
0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x12, 0x1e, 0x0a,
|
0x69, 0x70, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x6f, 0x62,
|
||||||
0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x45, 0x6c, 0x6c, 0x69,
|
||||||
0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x2f, 0x0a,
|
0x70, 0x73, 0x65, 0x52, 0x07, 0x65, 0x6c, 0x6c, 0x69, 0x70, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09,
|
||||||
0x13, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x73,
|
0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18,
|
0x18, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xa8,
|
0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x52, 0x08, 0x66, 0x72, 0x61, 0x6d, 0x65,
|
||||||
0x01, 0x0a, 0x0b, 0x52, 0x6f, 0x61, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2f,
|
0x52, 0x65, 0x66, 0x22, 0x23, 0x0a, 0x05, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01,
|
||||||
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18,
|
||||||
0x15, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
|
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0x9c, 0x01, 0x0a, 0x07, 0x45, 0x6c, 0x6c,
|
||||||
0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x12,
|
0x69, 0x70, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x01,
|
||||||
0x31, 0x0a, 0x07, 0x65, 0x6c, 0x6c, 0x69, 0x70, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65,
|
||||||
0x32, 0x17, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74,
|
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x63, 0x65, 0x6e,
|
||||||
0x73, 0x2e, 0x45, 0x6c, 0x6c, 0x69, 0x70, 0x73, 0x65, 0x52, 0x07, 0x65, 0x6c, 0x6c, 0x69, 0x70,
|
0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18,
|
0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e,
|
0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68,
|
||||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x52,
|
0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02,
|
||||||
0x08, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x66, 0x22, 0x23, 0x0a, 0x05, 0x50, 0x6f, 0x69,
|
0x52, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
0x6e, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x78,
|
0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
|
||||||
0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, 0x22, 0x9c,
|
0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x6f,
|
||||||
0x01, 0x0a, 0x07, 0x45, 0x6c, 0x6c, 0x69, 0x70, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x63, 0x65,
|
0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x66, 0x72, 0x61,
|
||||||
0x6e, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x6f, 0x62,
|
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63,
|
||||||
0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x69, 0x6e,
|
0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x4d,
|
||||||
0x74, 0x52, 0x06, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a,
|
||||||
0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12,
|
0x08, 0x73, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x1f, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73,
|
||||||
0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65,
|
0x2e, 0x53, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x12, 0x1e, 0x0a,
|
0x52, 0x08, 0x73, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65,
|
||||||
0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
|
||||||
0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xaf, 0x02,
|
0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x2a, 0x2d, 0x0a, 0x09, 0x44, 0x72, 0x69, 0x76,
|
||||||
0x0a, 0x0d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44,
|
||||||
0x32, 0x0a, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
|
0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05,
|
||||||
0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e,
|
0x50, 0x49, 0x4c, 0x4f, 0x54, 0x10, 0x02, 0x2a, 0x32, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x4f,
|
||||||
0x46, 0x72, 0x61, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x66, 0x72,
|
0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12, 0x07,
|
||||||
0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x73, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18,
|
0x0a, 0x03, 0x43, 0x41, 0x52, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, 0x4d, 0x50, 0x10,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e,
|
0x02, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4c, 0x4f, 0x54, 0x10, 0x03, 0x42, 0x0a, 0x5a, 0x08, 0x2e,
|
||||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4d,
|
0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67,
|
|
||||||
0x12, 0x4e, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x5f, 0x73, 0x74,
|
|
||||||
0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72,
|
|
||||||
0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x74,
|
|
||||||
0x65, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x11, 0x61,
|
|
||||||
0x75, 0x74, 0x6f, 0x70, 0x69, 0x6c, 0x6f, 0x74, 0x53, 0x74, 0x65, 0x65, 0x72, 0x69, 0x6e, 0x67,
|
|
||||||
0x12, 0x3f, 0x0a, 0x0a, 0x64, 0x72, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05,
|
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x6f, 0x62, 0x6f, 0x63, 0x61, 0x72, 0x2e, 0x65,
|
|
||||||
0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x4d,
|
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x09, 0x64, 0x72, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64,
|
|
||||||
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x18, 0x03,
|
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x2a,
|
|
||||||
0x38, 0x0a, 0x09, 0x53, 0x70, 0x65, 0x65, 0x64, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x0b, 0x0a, 0x07,
|
|
||||||
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x4c, 0x4f,
|
|
||||||
0x57, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x02, 0x12,
|
|
||||||
0x08, 0x0a, 0x04, 0x46, 0x41, 0x53, 0x54, 0x10, 0x03, 0x2a, 0x2d, 0x0a, 0x09, 0x44, 0x72, 0x69,
|
|
||||||
0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49,
|
|
||||||
0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x09, 0x0a,
|
|
||||||
0x05, 0x50, 0x49, 0x4c, 0x4f, 0x54, 0x10, 0x02, 0x2a, 0x32, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65,
|
|
||||||
0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0x00, 0x12,
|
|
||||||
0x07, 0x0a, 0x03, 0x43, 0x41, 0x52, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x55, 0x4d, 0x50,
|
|
||||||
0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x4c, 0x4f, 0x54, 0x10, 0x03, 0x42, 0x0a, 0x5a, 0x08,
|
|
||||||
0x2e, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1136,51 +982,45 @@ func file_events_events_proto_rawDescGZIP() []byte {
|
|||||||
return file_events_events_proto_rawDescData
|
return file_events_events_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_events_events_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
var file_events_events_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_events_events_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
var file_events_events_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||||
var file_events_events_proto_goTypes = []interface{}{
|
var file_events_events_proto_goTypes = []interface{}{
|
||||||
(SpeedZone)(0), // 0: robocar.events.SpeedZone
|
(DriveMode)(0), // 0: robocar.events.DriveMode
|
||||||
(DriveMode)(0), // 1: robocar.events.DriveMode
|
(TypeObject)(0), // 1: robocar.events.TypeObject
|
||||||
(TypeObject)(0), // 2: robocar.events.TypeObject
|
(*FrameRef)(nil), // 2: robocar.events.FrameRef
|
||||||
(*FrameRef)(nil), // 3: robocar.events.FrameRef
|
(*FrameMessage)(nil), // 3: robocar.events.FrameMessage
|
||||||
(*FrameMessage)(nil), // 4: robocar.events.FrameMessage
|
(*SteeringMessage)(nil), // 4: robocar.events.SteeringMessage
|
||||||
(*SteeringMessage)(nil), // 5: robocar.events.SteeringMessage
|
(*ThrottleMessage)(nil), // 5: robocar.events.ThrottleMessage
|
||||||
(*ThrottleMessage)(nil), // 6: robocar.events.ThrottleMessage
|
(*DriveModeMessage)(nil), // 6: robocar.events.DriveModeMessage
|
||||||
(*SpeedZoneMessage)(nil), // 7: robocar.events.SpeedZoneMessage
|
(*ObjectsMessage)(nil), // 7: robocar.events.ObjectsMessage
|
||||||
(*DriveModeMessage)(nil), // 8: robocar.events.DriveModeMessage
|
(*Object)(nil), // 8: robocar.events.Object
|
||||||
(*ObjectsMessage)(nil), // 9: robocar.events.ObjectsMessage
|
(*SwitchRecordMessage)(nil), // 9: robocar.events.SwitchRecordMessage
|
||||||
(*Object)(nil), // 10: robocar.events.Object
|
(*RoadMessage)(nil), // 10: robocar.events.RoadMessage
|
||||||
(*SwitchRecordMessage)(nil), // 11: robocar.events.SwitchRecordMessage
|
(*Point)(nil), // 11: robocar.events.Point
|
||||||
(*RoadMessage)(nil), // 12: robocar.events.RoadMessage
|
(*Ellipse)(nil), // 12: robocar.events.Ellipse
|
||||||
(*Point)(nil), // 13: robocar.events.Point
|
(*RecordMessage)(nil), // 13: robocar.events.RecordMessage
|
||||||
(*Ellipse)(nil), // 14: robocar.events.Ellipse
|
(*timestamp.Timestamp)(nil), // 14: google.protobuf.Timestamp
|
||||||
(*RecordMessage)(nil), // 15: robocar.events.RecordMessage
|
|
||||||
(*timestamp.Timestamp)(nil), // 16: google.protobuf.Timestamp
|
|
||||||
}
|
}
|
||||||
var file_events_events_proto_depIdxs = []int32{
|
var file_events_events_proto_depIdxs = []int32{
|
||||||
16, // 0: robocar.events.FrameRef.created_at:type_name -> google.protobuf.Timestamp
|
14, // 0: robocar.events.FrameRef.created_at:type_name -> google.protobuf.Timestamp
|
||||||
3, // 1: robocar.events.FrameMessage.id:type_name -> robocar.events.FrameRef
|
2, // 1: robocar.events.FrameMessage.id:type_name -> robocar.events.FrameRef
|
||||||
3, // 2: robocar.events.SteeringMessage.frame_ref:type_name -> robocar.events.FrameRef
|
2, // 2: robocar.events.SteeringMessage.frame_ref:type_name -> robocar.events.FrameRef
|
||||||
3, // 3: robocar.events.ThrottleMessage.frame_ref:type_name -> robocar.events.FrameRef
|
2, // 3: robocar.events.ThrottleMessage.frame_ref:type_name -> robocar.events.FrameRef
|
||||||
0, // 4: robocar.events.SpeedZoneMessage.speed_zone:type_name -> robocar.events.SpeedZone
|
0, // 4: robocar.events.DriveModeMessage.drive_mode:type_name -> robocar.events.DriveMode
|
||||||
3, // 5: robocar.events.SpeedZoneMessage.frame_ref:type_name -> robocar.events.FrameRef
|
8, // 5: robocar.events.ObjectsMessage.objects:type_name -> robocar.events.Object
|
||||||
1, // 6: robocar.events.DriveModeMessage.drive_mode:type_name -> robocar.events.DriveMode
|
2, // 6: robocar.events.ObjectsMessage.frame_ref:type_name -> robocar.events.FrameRef
|
||||||
10, // 7: robocar.events.ObjectsMessage.objects:type_name -> robocar.events.Object
|
1, // 7: robocar.events.Object.type:type_name -> robocar.events.TypeObject
|
||||||
3, // 8: robocar.events.ObjectsMessage.frame_ref:type_name -> robocar.events.FrameRef
|
11, // 8: robocar.events.RoadMessage.contour:type_name -> robocar.events.Point
|
||||||
2, // 9: robocar.events.Object.type:type_name -> robocar.events.TypeObject
|
12, // 9: robocar.events.RoadMessage.ellipse:type_name -> robocar.events.Ellipse
|
||||||
13, // 10: robocar.events.RoadMessage.contour:type_name -> robocar.events.Point
|
2, // 10: robocar.events.RoadMessage.frame_ref:type_name -> robocar.events.FrameRef
|
||||||
14, // 11: robocar.events.RoadMessage.ellipse:type_name -> robocar.events.Ellipse
|
11, // 11: robocar.events.Ellipse.center:type_name -> robocar.events.Point
|
||||||
3, // 12: robocar.events.RoadMessage.frame_ref:type_name -> robocar.events.FrameRef
|
3, // 12: robocar.events.RecordMessage.frame:type_name -> robocar.events.FrameMessage
|
||||||
13, // 13: robocar.events.Ellipse.center:type_name -> robocar.events.Point
|
4, // 13: robocar.events.RecordMessage.steering:type_name -> robocar.events.SteeringMessage
|
||||||
4, // 14: robocar.events.RecordMessage.frame:type_name -> robocar.events.FrameMessage
|
14, // [14:14] is the sub-list for method output_type
|
||||||
5, // 15: robocar.events.RecordMessage.steering:type_name -> robocar.events.SteeringMessage
|
14, // [14:14] is the sub-list for method input_type
|
||||||
5, // 16: robocar.events.RecordMessage.autopilot_steering:type_name -> robocar.events.SteeringMessage
|
14, // [14:14] is the sub-list for extension type_name
|
||||||
8, // 17: robocar.events.RecordMessage.drive_mode:type_name -> robocar.events.DriveModeMessage
|
14, // [14:14] is the sub-list for extension extendee
|
||||||
18, // [18:18] is the sub-list for method output_type
|
0, // [0:14] is the sub-list for field type_name
|
||||||
18, // [18:18] is the sub-list for method input_type
|
|
||||||
18, // [18:18] is the sub-list for extension type_name
|
|
||||||
18, // [18:18] is the sub-list for extension extendee
|
|
||||||
0, // [0:18] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_events_events_proto_init() }
|
func init() { file_events_events_proto_init() }
|
||||||
@ -1238,18 +1078,6 @@ func file_events_events_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*SpeedZoneMessage); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_events_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*DriveModeMessage); i {
|
switch v := v.(*DriveModeMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1261,7 +1089,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*ObjectsMessage); i {
|
switch v := v.(*ObjectsMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1273,7 +1101,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Object); i {
|
switch v := v.(*Object); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1285,7 +1113,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*SwitchRecordMessage); i {
|
switch v := v.(*SwitchRecordMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1297,7 +1125,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*RoadMessage); i {
|
switch v := v.(*RoadMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1309,7 +1137,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Point); i {
|
switch v := v.(*Point); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1321,7 +1149,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Ellipse); i {
|
switch v := v.(*Ellipse); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1333,7 +1161,7 @@ func file_events_events_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_events_events_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
file_events_events_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*RecordMessage); i {
|
switch v := v.(*RecordMessage); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -1351,8 +1179,8 @@ func file_events_events_proto_init() {
|
|||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_events_events_proto_rawDesc,
|
RawDescriptor: file_events_events_proto_rawDesc,
|
||||||
NumEnums: 3,
|
NumEnums: 2,
|
||||||
NumMessages: 13,
|
NumMessages: 12,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -3,7 +3,7 @@
|
|||||||
github.com/cyrilix/robocar-base/cli
|
github.com/cyrilix/robocar-base/cli
|
||||||
github.com/cyrilix/robocar-base/service
|
github.com/cyrilix/robocar-base/service
|
||||||
github.com/cyrilix/robocar-base/testtools
|
github.com/cyrilix/robocar-base/testtools
|
||||||
# github.com/cyrilix/robocar-protobuf/go v1.3.0
|
# github.com/cyrilix/robocar-protobuf/go v1.0.5
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/cyrilix/robocar-protobuf/go/events
|
github.com/cyrilix/robocar-protobuf/go/events
|
||||||
# github.com/eclipse/paho.mqtt.golang v1.4.1
|
# github.com/eclipse/paho.mqtt.golang v1.4.1
|
||||||
|
Loading…
Reference in New Issue
Block a user