meshtastic: support
This commit is contained in:
349
protocol/meshtastic/pb/mqtt.pb.go
Normal file
349
protocol/meshtastic/pb/mqtt.pb.go
Normal file
@@ -0,0 +1,349 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v6.33.4
|
||||
// source: meshtastic/mqtt.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)
|
||||
)
|
||||
|
||||
// This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
type ServiceEnvelope struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The (probably encrypted) packet
|
||||
Packet *MeshPacket `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"`
|
||||
// The global channel ID it was sent on
|
||||
ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channelId,omitempty"`
|
||||
// The sending gateway node ID. Can we use this to authenticate/prevent fake
|
||||
// nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as
|
||||
// the globally trusted nodenum
|
||||
GatewayId string `protobuf:"bytes,3,opt,name=gateway_id,json=gatewayId,proto3" json:"gatewayId,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) Reset() {
|
||||
*x = ServiceEnvelope{}
|
||||
mi := &file_meshtastic_mqtt_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ServiceEnvelope) ProtoMessage() {}
|
||||
|
||||
func (x *ServiceEnvelope) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_meshtastic_mqtt_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 ServiceEnvelope.ProtoReflect.Descriptor instead.
|
||||
func (*ServiceEnvelope) Descriptor() ([]byte, []int) {
|
||||
return file_meshtastic_mqtt_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) GetPacket() *MeshPacket {
|
||||
if x != nil {
|
||||
return x.Packet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) GetChannelId() string {
|
||||
if x != nil {
|
||||
return x.ChannelId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) GetGatewayId() string {
|
||||
if x != nil {
|
||||
return x.GatewayId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// Information about a node intended to be reported unencrypted to a map using MQTT.
|
||||
type MapReport struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// A full name for this user, i.e. "Kevin Hester"
|
||||
LongName string `protobuf:"bytes,1,opt,name=long_name,json=longName,proto3" json:"longName,omitempty"`
|
||||
// A VERY short name, ideally two characters.
|
||||
// Suitable for a tiny OLED screen
|
||||
ShortName string `protobuf:"bytes,2,opt,name=short_name,json=shortName,proto3" json:"shortName,omitempty"`
|
||||
// Role of the node that applies specific settings for a particular use-case
|
||||
Role Config_DeviceConfig_Role `protobuf:"varint,3,opt,name=role,proto3,enum=meshtastic.Config_DeviceConfig_Role" json:"role,omitempty"`
|
||||
// Hardware model of the node, i.e. T-Beam, Heltec V3, etc...
|
||||
HwModel HardwareModel `protobuf:"varint,4,opt,name=hw_model,json=hwModel,proto3,enum=meshtastic.HardwareModel" json:"hwModel,omitempty"`
|
||||
// Device firmware version string
|
||||
FirmwareVersion string `protobuf:"bytes,5,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmwareVersion,omitempty"`
|
||||
// The region code for the radio (US, CN, EU433, etc...)
|
||||
Region Config_LoRaConfig_RegionCode `protobuf:"varint,6,opt,name=region,proto3,enum=meshtastic.Config_LoRaConfig_RegionCode" json:"region,omitempty"`
|
||||
// Modem preset used by the radio (LongFast, MediumSlow, etc...)
|
||||
ModemPreset Config_LoRaConfig_ModemPreset `protobuf:"varint,7,opt,name=modem_preset,json=modemPreset,proto3,enum=meshtastic.Config_LoRaConfig_ModemPreset" json:"modemPreset,omitempty"`
|
||||
// Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
|
||||
// and it uses the default frequency slot given the region and modem preset.
|
||||
HasDefaultChannel bool `protobuf:"varint,8,opt,name=has_default_channel,json=hasDefaultChannel,proto3" json:"hasDefaultChannel,omitempty"`
|
||||
// Latitude: multiply by 1e-7 to get degrees in floating point
|
||||
LatitudeI int32 `protobuf:"fixed32,9,opt,name=latitude_i,json=latitudeI,proto3" json:"latitudeI,omitempty"`
|
||||
// Longitude: multiply by 1e-7 to get degrees in floating point
|
||||
LongitudeI int32 `protobuf:"fixed32,10,opt,name=longitude_i,json=longitudeI,proto3" json:"longitudeI,omitempty"`
|
||||
// Altitude in meters above MSL
|
||||
Altitude int32 `protobuf:"varint,11,opt,name=altitude,proto3" json:"altitude,omitempty"`
|
||||
// Indicates the bits of precision for latitude and longitude set by the sending node
|
||||
PositionPrecision uint32 `protobuf:"varint,12,opt,name=position_precision,json=positionPrecision,proto3" json:"positionPrecision,omitempty"`
|
||||
// Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT)
|
||||
NumOnlineLocalNodes uint32 `protobuf:"varint,13,opt,name=num_online_local_nodes,json=numOnlineLocalNodes,proto3" json:"numOnlineLocalNodes,omitempty"`
|
||||
// User has opted in to share their location (map report) with the mqtt server
|
||||
// Controlled by map_report.should_report_location
|
||||
HasOptedReportLocation bool `protobuf:"varint,14,opt,name=has_opted_report_location,json=hasOptedReportLocation,proto3" json:"hasOptedReportLocation,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *MapReport) Reset() {
|
||||
*x = MapReport{}
|
||||
mi := &file_meshtastic_mqtt_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MapReport) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*MapReport) ProtoMessage() {}
|
||||
|
||||
func (x *MapReport) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_meshtastic_mqtt_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 MapReport.ProtoReflect.Descriptor instead.
|
||||
func (*MapReport) Descriptor() ([]byte, []int) {
|
||||
return file_meshtastic_mqtt_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *MapReport) GetLongName() string {
|
||||
if x != nil {
|
||||
return x.LongName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MapReport) GetShortName() string {
|
||||
if x != nil {
|
||||
return x.ShortName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MapReport) GetRole() Config_DeviceConfig_Role {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return Config_DeviceConfig_CLIENT
|
||||
}
|
||||
|
||||
func (x *MapReport) GetHwModel() HardwareModel {
|
||||
if x != nil {
|
||||
return x.HwModel
|
||||
}
|
||||
return HardwareModel_UNSET
|
||||
}
|
||||
|
||||
func (x *MapReport) GetFirmwareVersion() string {
|
||||
if x != nil {
|
||||
return x.FirmwareVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MapReport) GetRegion() Config_LoRaConfig_RegionCode {
|
||||
if x != nil {
|
||||
return x.Region
|
||||
}
|
||||
return Config_LoRaConfig_UNSET
|
||||
}
|
||||
|
||||
func (x *MapReport) GetModemPreset() Config_LoRaConfig_ModemPreset {
|
||||
if x != nil {
|
||||
return x.ModemPreset
|
||||
}
|
||||
return Config_LoRaConfig_LONG_FAST
|
||||
}
|
||||
|
||||
func (x *MapReport) GetHasDefaultChannel() bool {
|
||||
if x != nil {
|
||||
return x.HasDefaultChannel
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *MapReport) GetLatitudeI() int32 {
|
||||
if x != nil {
|
||||
return x.LatitudeI
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MapReport) GetLongitudeI() int32 {
|
||||
if x != nil {
|
||||
return x.LongitudeI
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MapReport) GetAltitude() int32 {
|
||||
if x != nil {
|
||||
return x.Altitude
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MapReport) GetPositionPrecision() uint32 {
|
||||
if x != nil {
|
||||
return x.PositionPrecision
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MapReport) GetNumOnlineLocalNodes() uint32 {
|
||||
if x != nil {
|
||||
return x.NumOnlineLocalNodes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MapReport) GetHasOptedReportLocation() bool {
|
||||
if x != nil {
|
||||
return x.HasOptedReportLocation
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_meshtastic_mqtt_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_meshtastic_mqtt_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x15meshtastic/mqtt.proto\x12\n" +
|
||||
"meshtastic\x1a\x17meshtastic/config.proto\x1a\x15meshtastic/mesh.proto\"\x7f\n" +
|
||||
"\x0fServiceEnvelope\x12.\n" +
|
||||
"\x06packet\x18\x01 \x01(\v2\x16.meshtastic.MeshPacketR\x06packet\x12\x1d\n" +
|
||||
"\n" +
|
||||
"channel_id\x18\x02 \x01(\tR\tchannelId\x12\x1d\n" +
|
||||
"\n" +
|
||||
"gateway_id\x18\x03 \x01(\tR\tgatewayId\"\x9d\x05\n" +
|
||||
"\tMapReport\x12\x1b\n" +
|
||||
"\tlong_name\x18\x01 \x01(\tR\blongName\x12\x1d\n" +
|
||||
"\n" +
|
||||
"short_name\x18\x02 \x01(\tR\tshortName\x128\n" +
|
||||
"\x04role\x18\x03 \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x124\n" +
|
||||
"\bhw_model\x18\x04 \x01(\x0e2\x19.meshtastic.HardwareModelR\ahwModel\x12)\n" +
|
||||
"\x10firmware_version\x18\x05 \x01(\tR\x0ffirmwareVersion\x12@\n" +
|
||||
"\x06region\x18\x06 \x01(\x0e2(.meshtastic.Config.LoRaConfig.RegionCodeR\x06region\x12L\n" +
|
||||
"\fmodem_preset\x18\a \x01(\x0e2).meshtastic.Config.LoRaConfig.ModemPresetR\vmodemPreset\x12.\n" +
|
||||
"\x13has_default_channel\x18\b \x01(\bR\x11hasDefaultChannel\x12\x1d\n" +
|
||||
"\n" +
|
||||
"latitude_i\x18\t \x01(\x0fR\tlatitudeI\x12\x1f\n" +
|
||||
"\vlongitude_i\x18\n" +
|
||||
" \x01(\x0fR\n" +
|
||||
"longitudeI\x12\x1a\n" +
|
||||
"\baltitude\x18\v \x01(\x05R\baltitude\x12-\n" +
|
||||
"\x12position_precision\x18\f \x01(\rR\x11positionPrecision\x123\n" +
|
||||
"\x16num_online_local_nodes\x18\r \x01(\rR\x13numOnlineLocalNodes\x129\n" +
|
||||
"\x19has_opted_report_location\x18\x0e \x01(\bR\x16hasOptedReportLocationB`\n" +
|
||||
"\x14org.meshtastic.protoB\n" +
|
||||
"MQTTProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
|
||||
|
||||
var (
|
||||
file_meshtastic_mqtt_proto_rawDescOnce sync.Once
|
||||
file_meshtastic_mqtt_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_meshtastic_mqtt_proto_rawDescGZIP() []byte {
|
||||
file_meshtastic_mqtt_proto_rawDescOnce.Do(func() {
|
||||
file_meshtastic_mqtt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_mqtt_proto_rawDesc), len(file_meshtastic_mqtt_proto_rawDesc)))
|
||||
})
|
||||
return file_meshtastic_mqtt_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_meshtastic_mqtt_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_meshtastic_mqtt_proto_goTypes = []any{
|
||||
(*ServiceEnvelope)(nil), // 0: meshtastic.ServiceEnvelope
|
||||
(*MapReport)(nil), // 1: meshtastic.MapReport
|
||||
(*MeshPacket)(nil), // 2: meshtastic.MeshPacket
|
||||
(Config_DeviceConfig_Role)(0), // 3: meshtastic.Config.DeviceConfig.Role
|
||||
(HardwareModel)(0), // 4: meshtastic.HardwareModel
|
||||
(Config_LoRaConfig_RegionCode)(0), // 5: meshtastic.Config.LoRaConfig.RegionCode
|
||||
(Config_LoRaConfig_ModemPreset)(0), // 6: meshtastic.Config.LoRaConfig.ModemPreset
|
||||
}
|
||||
var file_meshtastic_mqtt_proto_depIdxs = []int32{
|
||||
2, // 0: meshtastic.ServiceEnvelope.packet:type_name -> meshtastic.MeshPacket
|
||||
3, // 1: meshtastic.MapReport.role:type_name -> meshtastic.Config.DeviceConfig.Role
|
||||
4, // 2: meshtastic.MapReport.hw_model:type_name -> meshtastic.HardwareModel
|
||||
5, // 3: meshtastic.MapReport.region:type_name -> meshtastic.Config.LoRaConfig.RegionCode
|
||||
6, // 4: meshtastic.MapReport.modem_preset:type_name -> meshtastic.Config.LoRaConfig.ModemPreset
|
||||
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_meshtastic_mqtt_proto_init() }
|
||||
func file_meshtastic_mqtt_proto_init() {
|
||||
if File_meshtastic_mqtt_proto != nil {
|
||||
return
|
||||
}
|
||||
file_meshtastic_config_proto_init()
|
||||
file_meshtastic_mesh_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_mqtt_proto_rawDesc), len(file_meshtastic_mqtt_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_meshtastic_mqtt_proto_goTypes,
|
||||
DependencyIndexes: file_meshtastic_mqtt_proto_depIdxs,
|
||||
MessageInfos: file_meshtastic_mqtt_proto_msgTypes,
|
||||
}.Build()
|
||||
File_meshtastic_mqtt_proto = out.File
|
||||
file_meshtastic_mqtt_proto_goTypes = nil
|
||||
file_meshtastic_mqtt_proto_depIdxs = nil
|
||||
}
|
||||
Reference in New Issue
Block a user