rts-sim-module/component/component_data/common.pb.go
2024-01-05 14:07:43 +08:00

437 lines
12 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: component/common.proto
package component_data
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 电机
type Motor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// 是否通电
PowerUp bool `protobuf:"varint,1,opt,name=powerUp,proto3" json:"powerUp,omitempty"`
// 是否正转
Forward bool `protobuf:"varint,2,opt,name=forward,proto3" json:"forward,omitempty"`
}
func (x *Motor) Reset() {
*x = Motor{}
if protoimpl.UnsafeEnabled {
mi := &file_component_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Motor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Motor) ProtoMessage() {}
func (x *Motor) ProtoReflect() protoreflect.Message {
mi := &file_component_common_proto_msgTypes[0]
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 Motor.ProtoReflect.Descriptor instead.
func (*Motor) Descriptor() ([]byte, []int) {
return file_component_common_proto_rawDescGZIP(), []int{0}
}
func (x *Motor) GetPowerUp() bool {
if x != nil {
return x.PowerUp
}
return false
}
func (x *Motor) GetForward() bool {
if x != nil {
return x.Forward
}
return false
}
// 固定位置转换组件
type FixedPositionTransform struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pos int32 `protobuf:"varint,1,opt,name=pos,proto3" json:"pos,omitempty"` // 当前位置百分比,[0, 10000],两位小数
Speed int32 `protobuf:"varint,2,opt,name=speed,proto3" json:"speed,omitempty"`
}
func (x *FixedPositionTransform) Reset() {
*x = FixedPositionTransform{}
if protoimpl.UnsafeEnabled {
mi := &file_component_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FixedPositionTransform) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FixedPositionTransform) ProtoMessage() {}
func (x *FixedPositionTransform) ProtoReflect() protoreflect.Message {
mi := &file_component_common_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FixedPositionTransform.ProtoReflect.Descriptor instead.
func (*FixedPositionTransform) Descriptor() ([]byte, []int) {
return file_component_common_proto_rawDescGZIP(), []int{1}
}
func (x *FixedPositionTransform) GetPos() int32 {
if x != nil {
return x.Pos
}
return 0
}
func (x *FixedPositionTransform) GetSpeed() int32 {
if x != nil {
return x.Speed
}
return 0
}
// 开关状态组件
type BitState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Val bool `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
}
func (x *BitState) Reset() {
*x = BitState{}
if protoimpl.UnsafeEnabled {
mi := &file_component_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BitState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BitState) ProtoMessage() {}
func (x *BitState) ProtoReflect() protoreflect.Message {
mi := &file_component_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BitState.ProtoReflect.Descriptor instead.
func (*BitState) Descriptor() ([]byte, []int) {
return file_component_common_proto_rawDescGZIP(), []int{2}
}
func (x *BitState) GetVal() bool {
if x != nil {
return x.Val
}
return false
}
// 计数/计时组件
type Counter struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Val int32 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
}
func (x *Counter) Reset() {
*x = Counter{}
if protoimpl.UnsafeEnabled {
mi := &file_component_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Counter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Counter) ProtoMessage() {}
func (x *Counter) ProtoReflect() protoreflect.Message {
mi := &file_component_common_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Counter.ProtoReflect.Descriptor instead.
func (*Counter) Descriptor() ([]byte, []int) {
return file_component_common_proto_rawDescGZIP(), []int{3}
}
func (x *Counter) GetVal() int32 {
if x != nil {
return x.Val
}
return 0
}
func (x *Counter) GetStep() int32 {
if x != nil {
return x.Step
}
return 0
}
// 倒数/倒计时组件
type CounterDown struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Val int32 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"`
}
func (x *CounterDown) Reset() {
*x = CounterDown{}
if protoimpl.UnsafeEnabled {
mi := &file_component_common_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CounterDown) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CounterDown) ProtoMessage() {}
func (x *CounterDown) ProtoReflect() protoreflect.Message {
mi := &file_component_common_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 CounterDown.ProtoReflect.Descriptor instead.
func (*CounterDown) Descriptor() ([]byte, []int) {
return file_component_common_proto_rawDescGZIP(), []int{4}
}
func (x *CounterDown) GetVal() int32 {
if x != nil {
return x.Val
}
return 0
}
func (x *CounterDown) GetStep() int32 {
if x != nil {
return x.Step
}
return 0
}
var File_component_common_proto protoreflect.FileDescriptor
var file_component_common_proto_rawDesc = []byte{
0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e,
0x65, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x05, 0x4d, 0x6f, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07,
0x70, 0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70,
0x6f, 0x77, 0x65, 0x72, 0x55, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64,
0x22, 0x40, 0x0a, 0x16, 0x46, 0x69, 0x78, 0x65, 0x64, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05,
0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x70, 0x65,
0x65, 0x64, 0x22, 0x1c, 0x0a, 0x08, 0x42, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10,
0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x76, 0x61, 0x6c,
0x22, 0x2f, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x76,
0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a,
0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x65,
0x70, 0x22, 0x33, 0x0a, 0x0b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76,
0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x42, 0x1c, 0x5a, 0x1a, 0x2e, 0x2f, 0x63, 0x6f, 0x6d, 0x70,
0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f,
0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_component_common_proto_rawDescOnce sync.Once
file_component_common_proto_rawDescData = file_component_common_proto_rawDesc
)
func file_component_common_proto_rawDescGZIP() []byte {
file_component_common_proto_rawDescOnce.Do(func() {
file_component_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_component_common_proto_rawDescData)
})
return file_component_common_proto_rawDescData
}
var file_component_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_component_common_proto_goTypes = []interface{}{
(*Motor)(nil), // 0: component.Motor
(*FixedPositionTransform)(nil), // 1: component.FixedPositionTransform
(*BitState)(nil), // 2: component.BitState
(*Counter)(nil), // 3: component.Counter
(*CounterDown)(nil), // 4: component.CounterDown
}
var file_component_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
//func init() { file_component_common_proto_init() }
func file_component_common_proto_init() {
if File_component_common_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_component_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Motor); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_component_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FixedPositionTransform); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_component_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BitState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_component_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Counter); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_component_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CounterDown); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_component_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_component_common_proto_goTypes,
DependencyIndexes: file_component_common_proto_depIdxs,
MessageInfos: file_component_common_proto_msgTypes,
}.Build()
File_component_common_proto = out.File
file_component_common_proto_rawDesc = nil
file_component_common_proto_goTypes = nil
file_component_common_proto_depIdxs = nil
}