373 lines
11 KiB
Go
373 lines
11 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v6.33.4
|
|
// source: meshtastic/interdevice.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
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 MessageType int32
|
|
|
|
const (
|
|
MessageType_ACK MessageType = 0
|
|
MessageType_COLLECT_INTERVAL MessageType = 160 // in ms
|
|
MessageType_BEEP_ON MessageType = 161 // duration ms
|
|
MessageType_BEEP_OFF MessageType = 162 // cancel prematurely
|
|
MessageType_SHUTDOWN MessageType = 163
|
|
MessageType_POWER_ON MessageType = 164
|
|
MessageType_SCD41_TEMP MessageType = 176
|
|
MessageType_SCD41_HUMIDITY MessageType = 177
|
|
MessageType_SCD41_CO2 MessageType = 178
|
|
MessageType_AHT20_TEMP MessageType = 179
|
|
MessageType_AHT20_HUMIDITY MessageType = 180
|
|
MessageType_TVOC_INDEX MessageType = 181
|
|
)
|
|
|
|
// Enum value maps for MessageType.
|
|
var (
|
|
MessageType_name = map[int32]string{
|
|
0: "ACK",
|
|
160: "COLLECT_INTERVAL",
|
|
161: "BEEP_ON",
|
|
162: "BEEP_OFF",
|
|
163: "SHUTDOWN",
|
|
164: "POWER_ON",
|
|
176: "SCD41_TEMP",
|
|
177: "SCD41_HUMIDITY",
|
|
178: "SCD41_CO2",
|
|
179: "AHT20_TEMP",
|
|
180: "AHT20_HUMIDITY",
|
|
181: "TVOC_INDEX",
|
|
}
|
|
MessageType_value = map[string]int32{
|
|
"ACK": 0,
|
|
"COLLECT_INTERVAL": 160,
|
|
"BEEP_ON": 161,
|
|
"BEEP_OFF": 162,
|
|
"SHUTDOWN": 163,
|
|
"POWER_ON": 164,
|
|
"SCD41_TEMP": 176,
|
|
"SCD41_HUMIDITY": 177,
|
|
"SCD41_CO2": 178,
|
|
"AHT20_TEMP": 179,
|
|
"AHT20_HUMIDITY": 180,
|
|
"TVOC_INDEX": 181,
|
|
}
|
|
)
|
|
|
|
func (x MessageType) Enum() *MessageType {
|
|
p := new(MessageType)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x MessageType) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (MessageType) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_meshtastic_interdevice_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (MessageType) Type() protoreflect.EnumType {
|
|
return &file_meshtastic_interdevice_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x MessageType) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use MessageType.Descriptor instead.
|
|
func (MessageType) EnumDescriptor() ([]byte, []int) {
|
|
return file_meshtastic_interdevice_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type SensorData struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The message type
|
|
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=meshtastic.MessageType" json:"type,omitempty"`
|
|
// The sensor data, either as a float or an uint32
|
|
//
|
|
// Types that are valid to be assigned to Data:
|
|
//
|
|
// *SensorData_FloatValue
|
|
// *SensorData_Uint32Value
|
|
Data isSensorData_Data `protobuf_oneof:"data"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SensorData) Reset() {
|
|
*x = SensorData{}
|
|
mi := &file_meshtastic_interdevice_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SensorData) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SensorData) ProtoMessage() {}
|
|
|
|
func (x *SensorData) ProtoReflect() protoreflect.Message {
|
|
mi := &file_meshtastic_interdevice_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SensorData.ProtoReflect.Descriptor instead.
|
|
func (*SensorData) Descriptor() ([]byte, []int) {
|
|
return file_meshtastic_interdevice_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *SensorData) GetType() MessageType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return MessageType_ACK
|
|
}
|
|
|
|
func (x *SensorData) GetData() isSensorData_Data {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SensorData) GetFloatValue() float32 {
|
|
if x != nil {
|
|
if x, ok := x.Data.(*SensorData_FloatValue); ok {
|
|
return x.FloatValue
|
|
}
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *SensorData) GetUint32Value() uint32 {
|
|
if x != nil {
|
|
if x, ok := x.Data.(*SensorData_Uint32Value); ok {
|
|
return x.Uint32Value
|
|
}
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type isSensorData_Data interface {
|
|
isSensorData_Data()
|
|
}
|
|
|
|
type SensorData_FloatValue struct {
|
|
FloatValue float32 `protobuf:"fixed32,2,opt,name=float_value,json=floatValue,proto3,oneof"`
|
|
}
|
|
|
|
type SensorData_Uint32Value struct {
|
|
Uint32Value uint32 `protobuf:"varint,3,opt,name=uint32_value,json=uint32Value,proto3,oneof"`
|
|
}
|
|
|
|
func (*SensorData_FloatValue) isSensorData_Data() {}
|
|
|
|
func (*SensorData_Uint32Value) isSensorData_Data() {}
|
|
|
|
type InterdeviceMessage struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
// The message data
|
|
//
|
|
// Types that are valid to be assigned to Data:
|
|
//
|
|
// *InterdeviceMessage_Nmea
|
|
// *InterdeviceMessage_Sensor
|
|
Data isInterdeviceMessage_Data `protobuf_oneof:"data"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *InterdeviceMessage) Reset() {
|
|
*x = InterdeviceMessage{}
|
|
mi := &file_meshtastic_interdevice_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *InterdeviceMessage) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*InterdeviceMessage) ProtoMessage() {}
|
|
|
|
func (x *InterdeviceMessage) ProtoReflect() protoreflect.Message {
|
|
mi := &file_meshtastic_interdevice_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use InterdeviceMessage.ProtoReflect.Descriptor instead.
|
|
func (*InterdeviceMessage) Descriptor() ([]byte, []int) {
|
|
return file_meshtastic_interdevice_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *InterdeviceMessage) GetData() isInterdeviceMessage_Data {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *InterdeviceMessage) GetNmea() string {
|
|
if x != nil {
|
|
if x, ok := x.Data.(*InterdeviceMessage_Nmea); ok {
|
|
return x.Nmea
|
|
}
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *InterdeviceMessage) GetSensor() *SensorData {
|
|
if x != nil {
|
|
if x, ok := x.Data.(*InterdeviceMessage_Sensor); ok {
|
|
return x.Sensor
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type isInterdeviceMessage_Data interface {
|
|
isInterdeviceMessage_Data()
|
|
}
|
|
|
|
type InterdeviceMessage_Nmea struct {
|
|
Nmea string `protobuf:"bytes,1,opt,name=nmea,proto3,oneof"`
|
|
}
|
|
|
|
type InterdeviceMessage_Sensor struct {
|
|
Sensor *SensorData `protobuf:"bytes,2,opt,name=sensor,proto3,oneof"`
|
|
}
|
|
|
|
func (*InterdeviceMessage_Nmea) isInterdeviceMessage_Data() {}
|
|
|
|
func (*InterdeviceMessage_Sensor) isInterdeviceMessage_Data() {}
|
|
|
|
var File_meshtastic_interdevice_proto protoreflect.FileDescriptor
|
|
|
|
const file_meshtastic_interdevice_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x1cmeshtastic/interdevice.proto\x12\n" +
|
|
"meshtastic\"\x89\x01\n" +
|
|
"\n" +
|
|
"SensorData\x12+\n" +
|
|
"\x04type\x18\x01 \x01(\x0e2\x17.meshtastic.MessageTypeR\x04type\x12!\n" +
|
|
"\vfloat_value\x18\x02 \x01(\x02H\x00R\n" +
|
|
"floatValue\x12#\n" +
|
|
"\fuint32_value\x18\x03 \x01(\rH\x00R\vuint32ValueB\x06\n" +
|
|
"\x04data\"d\n" +
|
|
"\x12InterdeviceMessage\x12\x14\n" +
|
|
"\x04nmea\x18\x01 \x01(\tH\x00R\x04nmea\x120\n" +
|
|
"\x06sensor\x18\x02 \x01(\v2\x16.meshtastic.SensorDataH\x00R\x06sensorB\x06\n" +
|
|
"\x04data*\xd5\x01\n" +
|
|
"\vMessageType\x12\a\n" +
|
|
"\x03ACK\x10\x00\x12\x15\n" +
|
|
"\x10COLLECT_INTERVAL\x10\xa0\x01\x12\f\n" +
|
|
"\aBEEP_ON\x10\xa1\x01\x12\r\n" +
|
|
"\bBEEP_OFF\x10\xa2\x01\x12\r\n" +
|
|
"\bSHUTDOWN\x10\xa3\x01\x12\r\n" +
|
|
"\bPOWER_ON\x10\xa4\x01\x12\x0f\n" +
|
|
"\n" +
|
|
"SCD41_TEMP\x10\xb0\x01\x12\x13\n" +
|
|
"\x0eSCD41_HUMIDITY\x10\xb1\x01\x12\x0e\n" +
|
|
"\tSCD41_CO2\x10\xb2\x01\x12\x0f\n" +
|
|
"\n" +
|
|
"AHT20_TEMP\x10\xb3\x01\x12\x13\n" +
|
|
"\x0eAHT20_HUMIDITY\x10\xb4\x01\x12\x0f\n" +
|
|
"\n" +
|
|
"TVOC_INDEX\x10\xb5\x01Bg\n" +
|
|
"\x14org.meshtastic.protoB\x11InterdeviceProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
|
|
|
|
var (
|
|
file_meshtastic_interdevice_proto_rawDescOnce sync.Once
|
|
file_meshtastic_interdevice_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_meshtastic_interdevice_proto_rawDescGZIP() []byte {
|
|
file_meshtastic_interdevice_proto_rawDescOnce.Do(func() {
|
|
file_meshtastic_interdevice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_interdevice_proto_rawDesc), len(file_meshtastic_interdevice_proto_rawDesc)))
|
|
})
|
|
return file_meshtastic_interdevice_proto_rawDescData
|
|
}
|
|
|
|
var file_meshtastic_interdevice_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_meshtastic_interdevice_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
|
var file_meshtastic_interdevice_proto_goTypes = []any{
|
|
(MessageType)(0), // 0: meshtastic.MessageType
|
|
(*SensorData)(nil), // 1: meshtastic.SensorData
|
|
(*InterdeviceMessage)(nil), // 2: meshtastic.InterdeviceMessage
|
|
}
|
|
var file_meshtastic_interdevice_proto_depIdxs = []int32{
|
|
0, // 0: meshtastic.SensorData.type:type_name -> meshtastic.MessageType
|
|
1, // 1: meshtastic.InterdeviceMessage.sensor:type_name -> meshtastic.SensorData
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_meshtastic_interdevice_proto_init() }
|
|
func file_meshtastic_interdevice_proto_init() {
|
|
if File_meshtastic_interdevice_proto != nil {
|
|
return
|
|
}
|
|
file_meshtastic_interdevice_proto_msgTypes[0].OneofWrappers = []any{
|
|
(*SensorData_FloatValue)(nil),
|
|
(*SensorData_Uint32Value)(nil),
|
|
}
|
|
file_meshtastic_interdevice_proto_msgTypes[1].OneofWrappers = []any{
|
|
(*InterdeviceMessage_Nmea)(nil),
|
|
(*InterdeviceMessage_Sensor)(nil),
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_interdevice_proto_rawDesc), len(file_meshtastic_interdevice_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 2,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_meshtastic_interdevice_proto_goTypes,
|
|
DependencyIndexes: file_meshtastic_interdevice_proto_depIdxs,
|
|
EnumInfos: file_meshtastic_interdevice_proto_enumTypes,
|
|
MessageInfos: file_meshtastic_interdevice_proto_msgTypes,
|
|
}.Build()
|
|
File_meshtastic_interdevice_proto = out.File
|
|
file_meshtastic_interdevice_proto_goTypes = nil
|
|
file_meshtastic_interdevice_proto_depIdxs = nil
|
|
}
|