Large refactor, move object and tile types out into the proto
This commit is contained in:
parent
24d4fe9273
commit
305f64ec38
9 changed files with 338 additions and 210 deletions
|
@ -98,6 +98,119 @@ func (CommandType) EnumDescriptor() ([]byte, []int) {
|
|||
return file_roveapi_roveapi_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Types of objects
|
||||
type Object int32
|
||||
|
||||
const (
|
||||
// ObjectNone represents no object at all
|
||||
Object_ObjectNone Object = 0
|
||||
// RoverLive represents a live rover
|
||||
Object_RoverLive Object = 1
|
||||
// RockSmall is a small stashable rock
|
||||
Object_RockSmall Object = 2
|
||||
// RockLarge is a large blocking rock
|
||||
Object_RockLarge Object = 3
|
||||
)
|
||||
|
||||
// Enum value maps for Object.
|
||||
var (
|
||||
Object_name = map[int32]string{
|
||||
0: "ObjectNone",
|
||||
1: "RoverLive",
|
||||
2: "RockSmall",
|
||||
3: "RockLarge",
|
||||
}
|
||||
Object_value = map[string]int32{
|
||||
"ObjectNone": 0,
|
||||
"RoverLive": 1,
|
||||
"RockSmall": 2,
|
||||
"RockLarge": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Object) Enum() *Object {
|
||||
p := new(Object)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Object) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Object) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_roveapi_roveapi_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (Object) Type() protoreflect.EnumType {
|
||||
return &file_roveapi_roveapi_proto_enumTypes[1]
|
||||
}
|
||||
|
||||
func (x Object) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Object.Descriptor instead.
|
||||
func (Object) EnumDescriptor() ([]byte, []int) {
|
||||
return file_roveapi_roveapi_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type Tile int32
|
||||
|
||||
const (
|
||||
// TileNone is a keyword for nothing
|
||||
Tile_TileNone Tile = 0
|
||||
// Rock is solid rock ground
|
||||
Tile_Rock Tile = 1
|
||||
// Gravel is loose rocks
|
||||
Tile_Gravel Tile = 2
|
||||
// Sand is sand
|
||||
Tile_Sand Tile = 3
|
||||
)
|
||||
|
||||
// Enum value maps for Tile.
|
||||
var (
|
||||
Tile_name = map[int32]string{
|
||||
0: "TileNone",
|
||||
1: "Rock",
|
||||
2: "Gravel",
|
||||
3: "Sand",
|
||||
}
|
||||
Tile_value = map[string]int32{
|
||||
"TileNone": 0,
|
||||
"Rock": 1,
|
||||
"Gravel": 2,
|
||||
"Sand": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Tile) Enum() *Tile {
|
||||
p := new(Tile)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Tile) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Tile) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_roveapi_roveapi_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (Tile) Type() protoreflect.EnumType {
|
||||
return &file_roveapi_roveapi_proto_enumTypes[2]
|
||||
}
|
||||
|
||||
func (x Tile) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Tile.Descriptor instead.
|
||||
func (Tile) EnumDescriptor() ([]byte, []int) {
|
||||
return file_roveapi_roveapi_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
// ServerStatusRequest is an empty placeholder
|
||||
type ServerStatusRequest struct {
|
||||
state protoimpl.MessageState
|
||||
|
@ -629,9 +742,9 @@ type RadarResponse struct {
|
|||
Range int32 `protobuf:"varint,1,opt,name=range,proto3" json:"range,omitempty"`
|
||||
// A 1D array representing range*2 + 1 squared set of tiles, origin bottom
|
||||
// left and in row->column order
|
||||
Tiles []byte `protobuf:"bytes,2,opt,name=tiles,proto3" json:"tiles,omitempty"`
|
||||
Tiles []Tile `protobuf:"varint,2,rep,packed,name=tiles,proto3,enum=roveapi.Tile" json:"tiles,omitempty"`
|
||||
// A similar array to the tile array, but containing objects
|
||||
Objects []byte `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
|
||||
Objects []Object `protobuf:"varint,3,rep,packed,name=objects,proto3,enum=roveapi.Object" json:"objects,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RadarResponse) Reset() {
|
||||
|
@ -673,14 +786,14 @@ func (x *RadarResponse) GetRange() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *RadarResponse) GetTiles() []byte {
|
||||
func (x *RadarResponse) GetTiles() []Tile {
|
||||
if x != nil {
|
||||
return x.Tiles
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RadarResponse) GetObjects() []byte {
|
||||
func (x *RadarResponse) GetObjects() []Object {
|
||||
if x != nil {
|
||||
return x.Objects
|
||||
}
|
||||
|
@ -1044,11 +1157,13 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{
|
|||
0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
|
||||
0x55, 0x0a, 0x0d, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x75, 0x0a, 0x0d, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f,
|
||||
0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x54, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x6f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x72,
|
||||
0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x6f,
|
||||
0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61,
|
||||
|
@ -1092,31 +1207,39 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{
|
|||
0x01, 0x12, 0x09, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x73, 0x68, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x72, 0x65, 0x70, 0x61, 0x69, 0x72, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x68,
|
||||
0x61, 0x72, 0x67, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63,
|
||||
0x61, 0x73, 0x74, 0x10, 0x05, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76, 0x65, 0x12, 0x4d,
|
||||
0x0a, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
|
||||
0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72,
|
||||
0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x3e, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x72, 0x6f,
|
||||
0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x38, 0x0a, 0x05, 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72,
|
||||
0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, 0x6f, 0x76,
|
||||
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x61, 0x73, 0x74, 0x10, 0x05, 0x2a, 0x45, 0x0a, 0x06, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12,
|
||||
0x0d, 0x0a, 0x09, 0x52, 0x6f, 0x76, 0x65, 0x72, 0x4c, 0x69, 0x76, 0x65, 0x10, 0x01, 0x12, 0x0d,
|
||||
0x0a, 0x09, 0x52, 0x6f, 0x63, 0x6b, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x10, 0x02, 0x12, 0x0d, 0x0a,
|
||||
0x09, 0x52, 0x6f, 0x63, 0x6b, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x03, 0x2a, 0x34, 0x0a, 0x04,
|
||||
0x54, 0x69, 0x6c, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x6e, 0x65,
|
||||
0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x6f, 0x63, 0x6b, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x47, 0x72, 0x61, 0x76, 0x65, 0x6c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x61, 0x6e, 0x64,
|
||||
0x10, 0x03, 0x32, 0xcf, 0x02, 0x0a, 0x04, 0x52, 0x6f, 0x76, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x53,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x2e, 0x72, 0x6f,
|
||||
0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x6f, 0x76, 0x65,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x08, 0x52, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x19, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a,
|
||||
0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x18, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a,
|
||||
0x05, 0x52, 0x61, 0x64, 0x61, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x64, 0x61, 0x72, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x16, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x6f, 0x76, 0x65,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x6d, 0x64, 0x69, 0x6c, 0x75, 0x7a, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -1131,51 +1254,55 @@ func file_roveapi_roveapi_proto_rawDescGZIP() []byte {
|
|||
return file_roveapi_roveapi_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_roveapi_roveapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_roveapi_roveapi_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||||
var file_roveapi_roveapi_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||
var file_roveapi_roveapi_proto_goTypes = []interface{}{
|
||||
(CommandType)(0), // 0: roveapi.CommandType
|
||||
(*ServerStatusRequest)(nil), // 1: roveapi.ServerStatusRequest
|
||||
(*ServerStatusResponse)(nil), // 2: roveapi.ServerStatusResponse
|
||||
(*RegisterRequest)(nil), // 3: roveapi.RegisterRequest
|
||||
(*Account)(nil), // 4: roveapi.Account
|
||||
(*RegisterResponse)(nil), // 5: roveapi.RegisterResponse
|
||||
(*Command)(nil), // 6: roveapi.Command
|
||||
(*CommandRequest)(nil), // 7: roveapi.CommandRequest
|
||||
(*CommandResponse)(nil), // 8: roveapi.CommandResponse
|
||||
(*RadarRequest)(nil), // 9: roveapi.RadarRequest
|
||||
(*RadarResponse)(nil), // 10: roveapi.RadarResponse
|
||||
(*StatusRequest)(nil), // 11: roveapi.StatusRequest
|
||||
(*Log)(nil), // 12: roveapi.Log
|
||||
(*Vector)(nil), // 13: roveapi.Vector
|
||||
(*StatusResponse)(nil), // 14: roveapi.StatusResponse
|
||||
(Object)(0), // 1: roveapi.Object
|
||||
(Tile)(0), // 2: roveapi.Tile
|
||||
(*ServerStatusRequest)(nil), // 3: roveapi.ServerStatusRequest
|
||||
(*ServerStatusResponse)(nil), // 4: roveapi.ServerStatusResponse
|
||||
(*RegisterRequest)(nil), // 5: roveapi.RegisterRequest
|
||||
(*Account)(nil), // 6: roveapi.Account
|
||||
(*RegisterResponse)(nil), // 7: roveapi.RegisterResponse
|
||||
(*Command)(nil), // 8: roveapi.Command
|
||||
(*CommandRequest)(nil), // 9: roveapi.CommandRequest
|
||||
(*CommandResponse)(nil), // 10: roveapi.CommandResponse
|
||||
(*RadarRequest)(nil), // 11: roveapi.RadarRequest
|
||||
(*RadarResponse)(nil), // 12: roveapi.RadarResponse
|
||||
(*StatusRequest)(nil), // 13: roveapi.StatusRequest
|
||||
(*Log)(nil), // 14: roveapi.Log
|
||||
(*Vector)(nil), // 15: roveapi.Vector
|
||||
(*StatusResponse)(nil), // 16: roveapi.StatusResponse
|
||||
}
|
||||
var file_roveapi_roveapi_proto_depIdxs = []int32{
|
||||
4, // 0: roveapi.RegisterResponse.account:type_name -> roveapi.Account
|
||||
6, // 0: roveapi.RegisterResponse.account:type_name -> roveapi.Account
|
||||
0, // 1: roveapi.Command.command:type_name -> roveapi.CommandType
|
||||
4, // 2: roveapi.CommandRequest.account:type_name -> roveapi.Account
|
||||
6, // 3: roveapi.CommandRequest.commands:type_name -> roveapi.Command
|
||||
4, // 4: roveapi.RadarRequest.account:type_name -> roveapi.Account
|
||||
4, // 5: roveapi.StatusRequest.account:type_name -> roveapi.Account
|
||||
13, // 6: roveapi.StatusResponse.position:type_name -> roveapi.Vector
|
||||
6, // 7: roveapi.StatusResponse.incomingCommands:type_name -> roveapi.Command
|
||||
6, // 8: roveapi.StatusResponse.queuedCommands:type_name -> roveapi.Command
|
||||
12, // 9: roveapi.StatusResponse.logs:type_name -> roveapi.Log
|
||||
1, // 10: roveapi.Rove.ServerStatus:input_type -> roveapi.ServerStatusRequest
|
||||
3, // 11: roveapi.Rove.Register:input_type -> roveapi.RegisterRequest
|
||||
7, // 12: roveapi.Rove.Command:input_type -> roveapi.CommandRequest
|
||||
9, // 13: roveapi.Rove.Radar:input_type -> roveapi.RadarRequest
|
||||
11, // 14: roveapi.Rove.Status:input_type -> roveapi.StatusRequest
|
||||
2, // 15: roveapi.Rove.ServerStatus:output_type -> roveapi.ServerStatusResponse
|
||||
5, // 16: roveapi.Rove.Register:output_type -> roveapi.RegisterResponse
|
||||
8, // 17: roveapi.Rove.Command:output_type -> roveapi.CommandResponse
|
||||
10, // 18: roveapi.Rove.Radar:output_type -> roveapi.RadarResponse
|
||||
14, // 19: roveapi.Rove.Status:output_type -> roveapi.StatusResponse
|
||||
15, // [15:20] is the sub-list for method output_type
|
||||
10, // [10:15] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
10, // [10:10] is the sub-list for extension extendee
|
||||
0, // [0:10] is the sub-list for field type_name
|
||||
6, // 2: roveapi.CommandRequest.account:type_name -> roveapi.Account
|
||||
8, // 3: roveapi.CommandRequest.commands:type_name -> roveapi.Command
|
||||
6, // 4: roveapi.RadarRequest.account:type_name -> roveapi.Account
|
||||
2, // 5: roveapi.RadarResponse.tiles:type_name -> roveapi.Tile
|
||||
1, // 6: roveapi.RadarResponse.objects:type_name -> roveapi.Object
|
||||
6, // 7: roveapi.StatusRequest.account:type_name -> roveapi.Account
|
||||
15, // 8: roveapi.StatusResponse.position:type_name -> roveapi.Vector
|
||||
8, // 9: roveapi.StatusResponse.incomingCommands:type_name -> roveapi.Command
|
||||
8, // 10: roveapi.StatusResponse.queuedCommands:type_name -> roveapi.Command
|
||||
14, // 11: roveapi.StatusResponse.logs:type_name -> roveapi.Log
|
||||
3, // 12: roveapi.Rove.ServerStatus:input_type -> roveapi.ServerStatusRequest
|
||||
5, // 13: roveapi.Rove.Register:input_type -> roveapi.RegisterRequest
|
||||
9, // 14: roveapi.Rove.Command:input_type -> roveapi.CommandRequest
|
||||
11, // 15: roveapi.Rove.Radar:input_type -> roveapi.RadarRequest
|
||||
13, // 16: roveapi.Rove.Status:input_type -> roveapi.StatusRequest
|
||||
4, // 17: roveapi.Rove.ServerStatus:output_type -> roveapi.ServerStatusResponse
|
||||
7, // 18: roveapi.Rove.Register:output_type -> roveapi.RegisterResponse
|
||||
10, // 19: roveapi.Rove.Command:output_type -> roveapi.CommandResponse
|
||||
12, // 20: roveapi.Rove.Radar:output_type -> roveapi.RadarResponse
|
||||
16, // 21: roveapi.Rove.Status:output_type -> roveapi.StatusResponse
|
||||
17, // [17:22] is the sub-list for method output_type
|
||||
12, // [12:17] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
12, // [12:12] is the sub-list for extension extendee
|
||||
0, // [0:12] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_roveapi_roveapi_proto_init() }
|
||||
|
@ -1362,7 +1489,7 @@ func file_roveapi_roveapi_proto_init() {
|
|||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_roveapi_roveapi_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumEnums: 3,
|
||||
NumMessages: 14,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
|
|
|
@ -134,6 +134,35 @@ message CommandResponse {}
|
|||
// Radar
|
||||
//
|
||||
|
||||
// Types of objects
|
||||
enum Object {
|
||||
// ObjectNone represents no object at all
|
||||
ObjectNone = 0;
|
||||
|
||||
// RoverLive represents a live rover
|
||||
RoverLive = 1;
|
||||
|
||||
// RockSmall is a small stashable rock
|
||||
RockSmall = 2;
|
||||
|
||||
// RockLarge is a large blocking rock
|
||||
RockLarge = 3;
|
||||
}
|
||||
|
||||
enum Tile {
|
||||
// TileNone is a keyword for nothing
|
||||
TileNone = 0;
|
||||
|
||||
// Rock is solid rock ground
|
||||
Rock = 1;
|
||||
|
||||
// Gravel is loose rocks
|
||||
Gravel = 2;
|
||||
|
||||
// Sand is sand
|
||||
Sand = 3;
|
||||
}
|
||||
|
||||
// RadarRequest is the data needed to request the radar for a rover
|
||||
message RadarRequest {
|
||||
// The account for this request
|
||||
|
@ -147,10 +176,10 @@ message RadarResponse {
|
|||
|
||||
// A 1D array representing range*2 + 1 squared set of tiles, origin bottom
|
||||
// left and in row->column order
|
||||
bytes tiles = 2;
|
||||
repeated Tile tiles = 2;
|
||||
|
||||
// A similar array to the tile array, but containing objects
|
||||
bytes objects = 3;
|
||||
repeated Object objects = 3;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue