2023-12-08 18:08:15 +08:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// versions:
|
|
|
|
// protoc-gen-go v1.31.0
|
|
|
|
// protoc v4.23.1
|
|
|
|
// source: dc.proto
|
|
|
|
|
|
|
|
package proto
|
|
|
|
|
|
|
|
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 DataType int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
DataType_CollectTable DataType = 0 // 采集码表
|
|
|
|
DataType_DriveTable DataType = 1 // 驱动码表
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for DataType.
|
|
|
|
var (
|
|
|
|
DataType_name = map[int32]string{
|
|
|
|
0: "CollectTable",
|
|
|
|
1: "DriveTable",
|
|
|
|
}
|
|
|
|
DataType_value = map[string]int32{
|
|
|
|
"CollectTable": 0,
|
|
|
|
"DriveTable": 1,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x DataType) Enum() *DataType {
|
|
|
|
p := new(DataType)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x DataType) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (DataType) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
return file_dc_proto_enumTypes[0].Descriptor()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (DataType) Type() protoreflect.EnumType {
|
|
|
|
return &file_dc_proto_enumTypes[0]
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x DataType) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use DataType.Descriptor instead.
|
|
|
|
func (DataType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Modbus功能
|
|
|
|
type Modbus_Function int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Modbus_ReadCoil Modbus_Function = 0 // 读线圈
|
|
|
|
Modbus_ReadDiscreteInput Modbus_Function = 1 // 读离散输入
|
|
|
|
Modbus_ReadHoldingRegister Modbus_Function = 2 // 读保持寄存器
|
|
|
|
Modbus_ReadInputRegister Modbus_Function = 3 // 读输入寄存器
|
|
|
|
Modbus_WriteCoil Modbus_Function = 10 // 写单个线圈
|
|
|
|
Modbus_WriteCoils Modbus_Function = 11 // 写多个线圈
|
|
|
|
Modbus_WriteRegister Modbus_Function = 12 // 写单个寄存器
|
|
|
|
Modbus_WriteRegisters Modbus_Function = 13 // 写多个寄存器
|
|
|
|
Modbus_RWCoils Modbus_Function = 20 // 读写多个线圈,定时读,当映射数据更新时执行写操作
|
|
|
|
Modbus_RWRegisters Modbus_Function = 21 // 读写多个寄存器,定时读,当映射数据更新时执行写操作
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for Modbus_Function.
|
|
|
|
var (
|
|
|
|
Modbus_Function_name = map[int32]string{
|
|
|
|
0: "ReadCoil",
|
|
|
|
1: "ReadDiscreteInput",
|
|
|
|
2: "ReadHoldingRegister",
|
|
|
|
3: "ReadInputRegister",
|
|
|
|
10: "WriteCoil",
|
|
|
|
11: "WriteCoils",
|
|
|
|
12: "WriteRegister",
|
|
|
|
13: "WriteRegisters",
|
|
|
|
20: "RWCoils",
|
|
|
|
21: "RWRegisters",
|
|
|
|
}
|
|
|
|
Modbus_Function_value = map[string]int32{
|
|
|
|
"ReadCoil": 0,
|
|
|
|
"ReadDiscreteInput": 1,
|
|
|
|
"ReadHoldingRegister": 2,
|
|
|
|
"ReadInputRegister": 3,
|
|
|
|
"WriteCoil": 10,
|
|
|
|
"WriteCoils": 11,
|
|
|
|
"WriteRegister": 12,
|
|
|
|
"WriteRegisters": 13,
|
|
|
|
"RWCoils": 20,
|
|
|
|
"RWRegisters": 21,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x Modbus_Function) Enum() *Modbus_Function {
|
|
|
|
p := new(Modbus_Function)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_Function) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_Function) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
return file_dc_proto_enumTypes[1].Descriptor()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_Function) Type() protoreflect.EnumType {
|
|
|
|
return &file_dc_proto_enumTypes[1]
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_Function) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use Modbus_Function.Descriptor instead.
|
|
|
|
func (Modbus_Function) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{0, 0}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Modbus服务写策略
|
|
|
|
type Modbus_WriteStrategy int32
|
|
|
|
|
|
|
|
const (
|
2023-12-11 14:26:31 +08:00
|
|
|
Modbus_OnUpdate Modbus_WriteStrategy = 0 // 数据更新时写
|
2023-12-08 18:08:15 +08:00
|
|
|
Modbus_OnScheduled Modbus_WriteStrategy = 1 // 定时写
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for Modbus_WriteStrategy.
|
|
|
|
var (
|
|
|
|
Modbus_WriteStrategy_name = map[int32]string{
|
|
|
|
0: "OnUpdate",
|
|
|
|
1: "OnScheduled",
|
|
|
|
}
|
|
|
|
Modbus_WriteStrategy_value = map[string]int32{
|
|
|
|
"OnUpdate": 0,
|
|
|
|
"OnScheduled": 1,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x Modbus_WriteStrategy) Enum() *Modbus_WriteStrategy {
|
|
|
|
p := new(Modbus_WriteStrategy)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_WriteStrategy) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_WriteStrategy) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
return file_dc_proto_enumTypes[2].Descriptor()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_WriteStrategy) Type() protoreflect.EnumType {
|
|
|
|
return &file_dc_proto_enumTypes[2]
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_WriteStrategy) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use Modbus_WriteStrategy.Descriptor instead.
|
|
|
|
func (Modbus_WriteStrategy) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{0, 1}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 寄存器字节序
|
|
|
|
type Modbus_Endianness int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Modbus_BigEndian Modbus_Endianness = 0
|
|
|
|
Modbus_LittleEndian Modbus_Endianness = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for Modbus_Endianness.
|
|
|
|
var (
|
|
|
|
Modbus_Endianness_name = map[int32]string{
|
|
|
|
0: "BigEndian",
|
|
|
|
1: "LittleEndian",
|
|
|
|
}
|
|
|
|
Modbus_Endianness_value = map[string]int32{
|
|
|
|
"BigEndian": 0,
|
|
|
|
"LittleEndian": 1,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x Modbus_Endianness) Enum() *Modbus_Endianness {
|
|
|
|
p := new(Modbus_Endianness)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_Endianness) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_Endianness) Descriptor() protoreflect.EnumDescriptor {
|
|
|
|
return file_dc_proto_enumTypes[3].Descriptor()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Modbus_Endianness) Type() protoreflect.EnumType {
|
|
|
|
return &file_dc_proto_enumTypes[3]
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x Modbus_Endianness) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use Modbus_Endianness.Descriptor instead.
|
|
|
|
func (Modbus_Endianness) EnumDescriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{0, 2}
|
|
|
|
}
|
|
|
|
|
|
|
|
type Modbus struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Modbus) Reset() {
|
|
|
|
*x = Modbus{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_dc_proto_msgTypes[0]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Modbus) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*Modbus) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *Modbus) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_dc_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 Modbus.ProtoReflect.Descriptor instead.
|
|
|
|
func (*Modbus) Descriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{0}
|
|
|
|
}
|
|
|
|
|
|
|
|
// modbus任务配置
|
|
|
|
type ModbusConfig struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // 连接地址
|
|
|
|
UnitId uint32 `protobuf:"varint,3,opt,name=unitId,proto3" json:"unitId,omitempty"` // 从机unitId
|
|
|
|
Endianness Modbus_Endianness `protobuf:"varint,4,opt,name=endianness,proto3,enum=iot_service.Modbus_Endianness" json:"endianness,omitempty"` // 16位寄存器字节序
|
|
|
|
Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval,omitempty"` // 循环请求间隔(毫秒),0表示不主动请求,只当有变化时请求
|
|
|
|
Timeout uint32 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"` // 超时时间(毫秒)
|
|
|
|
Mapping []*ModbusDcMapping `protobuf:"bytes,7,rep,name=mapping,proto3" json:"mapping,omitempty"` // modbus数据与驱动/采集码表映射配置
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) Reset() {
|
|
|
|
*x = ModbusConfig{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_dc_proto_msgTypes[1]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ModbusConfig) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_dc_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 ModbusConfig.ProtoReflect.Descriptor instead.
|
|
|
|
func (*ModbusConfig) Descriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{1}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetUrl() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Url
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetUnitId() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.UnitId
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetEndianness() Modbus_Endianness {
|
|
|
|
if x != nil {
|
|
|
|
return x.Endianness
|
|
|
|
}
|
|
|
|
return Modbus_BigEndian
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetInterval() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Interval
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetTimeout() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Timeout
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusConfig) GetMapping() []*ModbusDcMapping {
|
|
|
|
if x != nil {
|
|
|
|
return x.Mapping
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// modbus数据与驱动/采集码表映射配置
|
|
|
|
type ModbusDcMapping struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
Function Modbus_Function `protobuf:"varint,1,opt,name=function,proto3,enum=iot_service.Modbus_Function" json:"function,omitempty"` // 功能
|
2023-12-11 14:26:31 +08:00
|
|
|
Addr uint32 `protobuf:"varint,2,opt,name=addr,proto3" json:"addr,omitempty"` // 起始地址,当功能为位功能时,表示起始位地址,当功能为寄存器功能时,表示起始字(2个字节)地址
|
|
|
|
Quantity uint32 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // 数量,当功能为位功能时,表示位数,当功能为寄存器功能时,表示字(2个字节)数
|
2023-12-11 17:28:52 +08:00
|
|
|
WriteStrategy Modbus_WriteStrategy `protobuf:"varint,4,opt,name=writeStrategy,proto3,enum=iot_service.Modbus_WriteStrategy" json:"writeStrategy,omitempty"` // 当功能为写入类功能时,写策略
|
2023-12-08 18:08:15 +08:00
|
|
|
Type DataType `protobuf:"varint,5,opt,name=type,proto3,enum=iot_service.DataType" json:"type,omitempty"` // 对应数据类型
|
2023-12-11 14:26:31 +08:00
|
|
|
Start uint32 `protobuf:"varint,6,opt,name=start,proto3" json:"start,omitempty"` // 驱动/采集码表中的起始下标,当功能为位功能时,表示起始位,当功能为寄存器功能时,表示起始字节
|
2023-12-08 18:08:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) Reset() {
|
|
|
|
*x = ModbusDcMapping{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
|
|
|
mi := &file_dc_proto_msgTypes[2]
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ModbusDcMapping) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) ProtoReflect() protoreflect.Message {
|
|
|
|
mi := &file_dc_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 ModbusDcMapping.ProtoReflect.Descriptor instead.
|
|
|
|
func (*ModbusDcMapping) Descriptor() ([]byte, []int) {
|
|
|
|
return file_dc_proto_rawDescGZIP(), []int{2}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetFunction() Modbus_Function {
|
|
|
|
if x != nil {
|
|
|
|
return x.Function
|
|
|
|
}
|
|
|
|
return Modbus_ReadCoil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetAddr() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Addr
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetQuantity() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Quantity
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetWriteStrategy() Modbus_WriteStrategy {
|
|
|
|
if x != nil {
|
|
|
|
return x.WriteStrategy
|
|
|
|
}
|
|
|
|
return Modbus_OnUpdate
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetType() DataType {
|
|
|
|
if x != nil {
|
|
|
|
return x.Type
|
|
|
|
}
|
|
|
|
return DataType_CollectTable
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ModbusDcMapping) GetStart() uint32 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Start
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
var File_dc_proto protoreflect.FileDescriptor
|
|
|
|
|
|
|
|
var file_dc_proto_rawDesc = []byte{
|
|
|
|
0x0a, 0x08, 0x64, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x69, 0x6f, 0x74, 0x5f,
|
|
|
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x62,
|
|
|
|
0x75, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x08, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
|
|
|
0x0c, 0x0a, 0x08, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x15, 0x0a,
|
|
|
|
0x11, 0x52, 0x65, 0x61, 0x64, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x70,
|
|
|
|
0x75, 0x74, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x48, 0x6f, 0x6c, 0x64,
|
|
|
|
0x69, 0x6e, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x02, 0x12, 0x15, 0x0a,
|
|
|
|
0x11, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
|
|
|
0x65, 0x72, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x69,
|
|
|
|
0x6c, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x69, 0x6c,
|
|
|
|
0x73, 0x10, 0x0b, 0x12, 0x11, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69,
|
|
|
|
0x73, 0x74, 0x65, 0x72, 0x10, 0x0c, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x52,
|
|
|
|
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x57,
|
|
|
|
0x43, 0x6f, 0x69, 0x6c, 0x73, 0x10, 0x14, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x57, 0x52, 0x65, 0x67,
|
|
|
|
0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x10, 0x15, 0x22, 0x2e, 0x0a, 0x0d, 0x57, 0x72, 0x69, 0x74,
|
|
|
|
0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x6e, 0x55,
|
|
|
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x6e, 0x53, 0x63, 0x68,
|
|
|
|
0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x10, 0x01, 0x22, 0x2d, 0x0a, 0x0a, 0x45, 0x6e, 0x64, 0x69,
|
|
|
|
0x61, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x69, 0x67, 0x45, 0x6e, 0x64,
|
|
|
|
0x69, 0x61, 0x6e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x69, 0x74, 0x74, 0x6c, 0x65, 0x45,
|
2023-12-11 17:28:52 +08:00
|
|
|
0x6e, 0x64, 0x69, 0x61, 0x6e, 0x10, 0x01, 0x22, 0xe6, 0x01, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x62,
|
|
|
|
0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
|
2023-12-08 18:08:15 +08:00
|
|
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e,
|
|
|
|
0x69, 0x74, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x74,
|
|
|
|
0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x6e, 0x65, 0x73, 0x73,
|
|
|
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x74, 0x5f, 0x73, 0x65, 0x72,
|
|
|
|
0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x64, 0x69,
|
|
|
|
0x61, 0x6e, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x69, 0x61, 0x6e, 0x6e, 0x65,
|
|
|
|
0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05,
|
|
|
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x18,
|
|
|
|
0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
|
|
|
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70,
|
|
|
|
0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x74, 0x5f,
|
|
|
|
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x44, 0x63,
|
|
|
|
0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
|
|
|
|
0x22, 0x85, 0x02, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x44, 0x63, 0x4d, 0x61, 0x70,
|
|
|
|
0x70, 0x69, 0x6e, 0x67, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
|
|
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x74, 0x5f, 0x73, 0x65, 0x72,
|
|
|
|
0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x2e, 0x46, 0x75, 0x6e, 0x63,
|
|
|
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12,
|
|
|
|
0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x61, 0x64,
|
|
|
|
0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03,
|
|
|
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x47,
|
|
|
|
0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18,
|
|
|
|
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x69, 0x6f, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
|
|
|
0x69, 0x63, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x62, 0x75, 0x73, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65,
|
|
|
|
0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x53,
|
|
|
|
0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x29, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
|
|
|
0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x69, 0x6f, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
|
|
|
0x69, 0x63, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
|
|
|
|
0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
|
|
|
|
0x0d, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2a, 0x2c, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61,
|
|
|
|
0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x54,
|
|
|
|
0x61, 0x62, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x72, 0x69, 0x76, 0x65, 0x54,
|
|
|
|
0x61, 0x62, 0x6c, 0x65, 0x10, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
|
|
|
0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
|
|
0x33,
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
file_dc_proto_rawDescOnce sync.Once
|
|
|
|
file_dc_proto_rawDescData = file_dc_proto_rawDesc
|
|
|
|
)
|
|
|
|
|
|
|
|
func file_dc_proto_rawDescGZIP() []byte {
|
|
|
|
file_dc_proto_rawDescOnce.Do(func() {
|
|
|
|
file_dc_proto_rawDescData = protoimpl.X.CompressGZIP(file_dc_proto_rawDescData)
|
|
|
|
})
|
|
|
|
return file_dc_proto_rawDescData
|
|
|
|
}
|
|
|
|
|
|
|
|
var file_dc_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
|
|
|
var file_dc_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
|
|
|
var file_dc_proto_goTypes = []interface{}{
|
|
|
|
(DataType)(0), // 0: iot_service.DataType
|
|
|
|
(Modbus_Function)(0), // 1: iot_service.Modbus.Function
|
|
|
|
(Modbus_WriteStrategy)(0), // 2: iot_service.Modbus.WriteStrategy
|
|
|
|
(Modbus_Endianness)(0), // 3: iot_service.Modbus.Endianness
|
|
|
|
(*Modbus)(nil), // 4: iot_service.Modbus
|
|
|
|
(*ModbusConfig)(nil), // 5: iot_service.ModbusConfig
|
|
|
|
(*ModbusDcMapping)(nil), // 6: iot_service.ModbusDcMapping
|
|
|
|
}
|
|
|
|
var file_dc_proto_depIdxs = []int32{
|
|
|
|
3, // 0: iot_service.ModbusConfig.endianness:type_name -> iot_service.Modbus.Endianness
|
|
|
|
6, // 1: iot_service.ModbusConfig.mapping:type_name -> iot_service.ModbusDcMapping
|
|
|
|
1, // 2: iot_service.ModbusDcMapping.function:type_name -> iot_service.Modbus.Function
|
|
|
|
2, // 3: iot_service.ModbusDcMapping.writeStrategy:type_name -> iot_service.Modbus.WriteStrategy
|
|
|
|
0, // 4: iot_service.ModbusDcMapping.type:type_name -> iot_service.DataType
|
|
|
|
5, // [5:5] is the sub-list for method output_type
|
|
|
|
5, // [5:5] is the sub-list for method input_type
|
|
|
|
5, // [5:5] is the sub-list for extension type_name
|
|
|
|
5, // [5:5] is the sub-list for extension extendee
|
|
|
|
0, // [0:5] is the sub-list for field type_name
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { file_dc_proto_init() }
|
|
|
|
func file_dc_proto_init() {
|
|
|
|
if File_dc_proto != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if !protoimpl.UnsafeEnabled {
|
|
|
|
file_dc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*Modbus); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_dc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*ModbusConfig); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
file_dc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
|
|
switch v := v.(*ModbusDcMapping); 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_dc_proto_rawDesc,
|
|
|
|
NumEnums: 4,
|
|
|
|
NumMessages: 3,
|
|
|
|
NumExtensions: 0,
|
|
|
|
NumServices: 0,
|
|
|
|
},
|
|
|
|
GoTypes: file_dc_proto_goTypes,
|
|
|
|
DependencyIndexes: file_dc_proto_depIdxs,
|
|
|
|
EnumInfos: file_dc_proto_enumTypes,
|
|
|
|
MessageInfos: file_dc_proto_msgTypes,
|
|
|
|
}.Build()
|
|
|
|
File_dc_proto = out.File
|
|
|
|
file_dc_proto_rawDesc = nil
|
|
|
|
file_dc_proto_goTypes = nil
|
|
|
|
file_dc_proto_depIdxs = nil
|
|
|
|
}
|