Refactor protos

This commit is contained in:
Daniel Pupius
2025-04-21 15:40:10 -07:00
parent 41ee61b59a
commit 86380cccf9
59 changed files with 1477 additions and 1283 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+148
View File
@@ -0,0 +1,148 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/apponly.proto
package meshtastic
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 is the most compact possible representation for a set of channels.
// It includes only one PRIMARY channel (which must be first) and
// any SECONDARY channels.
// No DISABLED channels are included.
// This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
type ChannelSet struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Channel list with settings
Settings []*ChannelSettings `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
// LoRa config
LoraConfig *Config_LoRaConfig `protobuf:"bytes,2,opt,name=lora_config,json=loraConfig,proto3" json:"lora_config,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelSet) Reset() {
*x = ChannelSet{}
mi := &file_meshtastic_apponly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelSet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelSet) ProtoMessage() {}
func (x *ChannelSet) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_apponly_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 ChannelSet.ProtoReflect.Descriptor instead.
func (*ChannelSet) Descriptor() ([]byte, []int) {
return file_meshtastic_apponly_proto_rawDescGZIP(), []int{0}
}
func (x *ChannelSet) GetSettings() []*ChannelSettings {
if x != nil {
return x.Settings
}
return nil
}
func (x *ChannelSet) GetLoraConfig() *Config_LoRaConfig {
if x != nil {
return x.LoraConfig
}
return nil
}
var File_meshtastic_apponly_proto protoreflect.FileDescriptor
const file_meshtastic_apponly_proto_rawDesc = "" +
"\n" +
"\x18meshtastic/apponly.proto\x12\n" +
"meshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\"\x85\x01\n" +
"\n" +
"ChannelSet\x127\n" +
"\bsettings\x18\x01 \x03(\v2\x1b.meshtastic.ChannelSettingsR\bsettings\x12>\n" +
"\vlora_config\x18\x02 \x01(\v2\x1d.meshtastic.Config.LoRaConfigR\n" +
"loraConfigB_\n" +
"\x13com.geeksville.meshB\rAppOnlyProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_apponly_proto_rawDescOnce sync.Once
file_meshtastic_apponly_proto_rawDescData []byte
)
func file_meshtastic_apponly_proto_rawDescGZIP() []byte {
file_meshtastic_apponly_proto_rawDescOnce.Do(func() {
file_meshtastic_apponly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_apponly_proto_rawDesc), len(file_meshtastic_apponly_proto_rawDesc)))
})
return file_meshtastic_apponly_proto_rawDescData
}
var file_meshtastic_apponly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_apponly_proto_goTypes = []any{
(*ChannelSet)(nil), // 0: meshtastic.ChannelSet
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
(*Config_LoRaConfig)(nil), // 2: meshtastic.Config.LoRaConfig
}
var file_meshtastic_apponly_proto_depIdxs = []int32{
1, // 0: meshtastic.ChannelSet.settings:type_name -> meshtastic.ChannelSettings
2, // 1: meshtastic.ChannelSet.lora_config:type_name -> meshtastic.Config.LoRaConfig
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_apponly_proto_init() }
func file_meshtastic_apponly_proto_init() {
if File_meshtastic_apponly_proto != nil {
return
}
file_meshtastic_channel_proto_init()
file_meshtastic_config_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_apponly_proto_rawDesc), len(file_meshtastic_apponly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_apponly_proto_goTypes,
DependencyIndexes: file_meshtastic_apponly_proto_depIdxs,
MessageInfos: file_meshtastic_apponly_proto_msgTypes,
}.Build()
File_meshtastic_apponly_proto = out.File
file_meshtastic_apponly_proto_goTypes = nil
file_meshtastic_apponly_proto_depIdxs = nil
}
+795
View File
@@ -0,0 +1,795 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/atak.proto
package meshtastic
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 Team int32
const (
// Unspecifed
Team_Unspecifed_Color Team = 0
// White
Team_White Team = 1
// Yellow
Team_Yellow Team = 2
// Orange
Team_Orange Team = 3
// Magenta
Team_Magenta Team = 4
// Red
Team_Red Team = 5
// Maroon
Team_Maroon Team = 6
// Purple
Team_Purple Team = 7
// Dark Blue
Team_Dark_Blue Team = 8
// Blue
Team_Blue Team = 9
// Cyan
Team_Cyan Team = 10
// Teal
Team_Teal Team = 11
// Green
Team_Green Team = 12
// Dark Green
Team_Dark_Green Team = 13
// Brown
Team_Brown Team = 14
)
// Enum value maps for Team.
var (
Team_name = map[int32]string{
0: "Unspecifed_Color",
1: "White",
2: "Yellow",
3: "Orange",
4: "Magenta",
5: "Red",
6: "Maroon",
7: "Purple",
8: "Dark_Blue",
9: "Blue",
10: "Cyan",
11: "Teal",
12: "Green",
13: "Dark_Green",
14: "Brown",
}
Team_value = map[string]int32{
"Unspecifed_Color": 0,
"White": 1,
"Yellow": 2,
"Orange": 3,
"Magenta": 4,
"Red": 5,
"Maroon": 6,
"Purple": 7,
"Dark_Blue": 8,
"Blue": 9,
"Cyan": 10,
"Teal": 11,
"Green": 12,
"Dark_Green": 13,
"Brown": 14,
}
)
func (x Team) Enum() *Team {
p := new(Team)
*p = x
return p
}
func (x Team) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Team) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_atak_proto_enumTypes[0].Descriptor()
}
func (Team) Type() protoreflect.EnumType {
return &file_meshtastic_atak_proto_enumTypes[0]
}
func (x Team) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Team.Descriptor instead.
func (Team) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{0}
}
// Role of the group member
type MemberRole int32
const (
// Unspecifed
MemberRole_Unspecifed MemberRole = 0
// Team Member
MemberRole_TeamMember MemberRole = 1
// Team Lead
MemberRole_TeamLead MemberRole = 2
// Headquarters
MemberRole_HQ MemberRole = 3
// Airsoft enthusiast
MemberRole_Sniper MemberRole = 4
// Medic
MemberRole_Medic MemberRole = 5
// ForwardObserver
MemberRole_ForwardObserver MemberRole = 6
// Radio Telephone Operator
MemberRole_RTO MemberRole = 7
// Doggo
MemberRole_K9 MemberRole = 8
)
// Enum value maps for MemberRole.
var (
MemberRole_name = map[int32]string{
0: "Unspecifed",
1: "TeamMember",
2: "TeamLead",
3: "HQ",
4: "Sniper",
5: "Medic",
6: "ForwardObserver",
7: "RTO",
8: "K9",
}
MemberRole_value = map[string]int32{
"Unspecifed": 0,
"TeamMember": 1,
"TeamLead": 2,
"HQ": 3,
"Sniper": 4,
"Medic": 5,
"ForwardObserver": 6,
"RTO": 7,
"K9": 8,
}
)
func (x MemberRole) Enum() *MemberRole {
p := new(MemberRole)
*p = x
return p
}
func (x MemberRole) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MemberRole) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_atak_proto_enumTypes[1].Descriptor()
}
func (MemberRole) Type() protoreflect.EnumType {
return &file_meshtastic_atak_proto_enumTypes[1]
}
func (x MemberRole) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MemberRole.Descriptor instead.
func (MemberRole) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{1}
}
// Packets for the official ATAK Plugin
type TAKPacket struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Are the payloads strings compressed for LoRA transport?
IsCompressed bool `protobuf:"varint,1,opt,name=is_compressed,json=isCompressed,proto3" json:"is_compressed,omitempty"`
// The contact / callsign for ATAK user
Contact *Contact `protobuf:"bytes,2,opt,name=contact,proto3" json:"contact,omitempty"`
// The group for ATAK user
Group *Group `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`
// The status of the ATAK EUD
Status *Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
// The payload of the packet
//
// Types that are valid to be assigned to PayloadVariant:
//
// *TAKPacket_Pli
// *TAKPacket_Chat
// *TAKPacket_Detail
PayloadVariant isTAKPacket_PayloadVariant `protobuf_oneof:"payload_variant"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TAKPacket) Reset() {
*x = TAKPacket{}
mi := &file_meshtastic_atak_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TAKPacket) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TAKPacket) ProtoMessage() {}
func (x *TAKPacket) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_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 TAKPacket.ProtoReflect.Descriptor instead.
func (*TAKPacket) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{0}
}
func (x *TAKPacket) GetIsCompressed() bool {
if x != nil {
return x.IsCompressed
}
return false
}
func (x *TAKPacket) GetContact() *Contact {
if x != nil {
return x.Contact
}
return nil
}
func (x *TAKPacket) GetGroup() *Group {
if x != nil {
return x.Group
}
return nil
}
func (x *TAKPacket) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *TAKPacket) GetPayloadVariant() isTAKPacket_PayloadVariant {
if x != nil {
return x.PayloadVariant
}
return nil
}
func (x *TAKPacket) GetPli() *PLI {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Pli); ok {
return x.Pli
}
}
return nil
}
func (x *TAKPacket) GetChat() *GeoChat {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Chat); ok {
return x.Chat
}
}
return nil
}
func (x *TAKPacket) GetDetail() []byte {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Detail); ok {
return x.Detail
}
}
return nil
}
type isTAKPacket_PayloadVariant interface {
isTAKPacket_PayloadVariant()
}
type TAKPacket_Pli struct {
// TAK position report
Pli *PLI `protobuf:"bytes,5,opt,name=pli,proto3,oneof"`
}
type TAKPacket_Chat struct {
// ATAK GeoChat message
Chat *GeoChat `protobuf:"bytes,6,opt,name=chat,proto3,oneof"`
}
type TAKPacket_Detail struct {
// Generic CoT detail XML
// May be compressed / truncated by the sender (EUD)
Detail []byte `protobuf:"bytes,7,opt,name=detail,proto3,oneof"`
}
func (*TAKPacket_Pli) isTAKPacket_PayloadVariant() {}
func (*TAKPacket_Chat) isTAKPacket_PayloadVariant() {}
func (*TAKPacket_Detail) isTAKPacket_PayloadVariant() {}
// ATAK GeoChat message
type GeoChat struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The text message
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// Uid recipient of the message
To *string `protobuf:"bytes,2,opt,name=to,proto3,oneof" json:"to,omitempty"`
// Callsign of the recipient for the message
ToCallsign *string `protobuf:"bytes,3,opt,name=to_callsign,json=toCallsign,proto3,oneof" json:"to_callsign,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GeoChat) Reset() {
*x = GeoChat{}
mi := &file_meshtastic_atak_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GeoChat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GeoChat) ProtoMessage() {}
func (x *GeoChat) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_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 GeoChat.ProtoReflect.Descriptor instead.
func (*GeoChat) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{1}
}
func (x *GeoChat) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *GeoChat) GetTo() string {
if x != nil && x.To != nil {
return *x.To
}
return ""
}
func (x *GeoChat) GetToCallsign() string {
if x != nil && x.ToCallsign != nil {
return *x.ToCallsign
}
return ""
}
// ATAK Group
// <__group role='Team Member' name='Cyan'/>
type Group struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Role of the group member
Role MemberRole `protobuf:"varint,1,opt,name=role,proto3,enum=meshtastic.MemberRole" json:"role,omitempty"`
// Team (color)
// Default Cyan
Team Team `protobuf:"varint,2,opt,name=team,proto3,enum=meshtastic.Team" json:"team,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Group) Reset() {
*x = Group{}
mi := &file_meshtastic_atak_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Group) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Group) ProtoMessage() {}
func (x *Group) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[2]
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 Group.ProtoReflect.Descriptor instead.
func (*Group) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{2}
}
func (x *Group) GetRole() MemberRole {
if x != nil {
return x.Role
}
return MemberRole_Unspecifed
}
func (x *Group) GetTeam() Team {
if x != nil {
return x.Team
}
return Team_Unspecifed_Color
}
// ATAK EUD Status
// <status battery='100' />
type Status struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Battery level
Battery uint32 `protobuf:"varint,1,opt,name=battery,proto3" json:"battery,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Status) Reset() {
*x = Status{}
mi := &file_meshtastic_atak_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Status) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Status) ProtoMessage() {}
func (x *Status) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[3]
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 Status.ProtoReflect.Descriptor instead.
func (*Status) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{3}
}
func (x *Status) GetBattery() uint32 {
if x != nil {
return x.Battery
}
return 0
}
// ATAK Contact
// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
type Contact struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Callsign
Callsign string `protobuf:"bytes,1,opt,name=callsign,proto3" json:"callsign,omitempty"`
// Device callsign
DeviceCallsign string `protobuf:"bytes,2,opt,name=device_callsign,json=deviceCallsign,proto3" json:"device_callsign,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Contact) Reset() {
*x = Contact{}
mi := &file_meshtastic_atak_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Contact) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Contact) ProtoMessage() {}
func (x *Contact) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[4]
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 Contact.ProtoReflect.Descriptor instead.
func (*Contact) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{4}
}
func (x *Contact) GetCallsign() string {
if x != nil {
return x.Callsign
}
return ""
}
func (x *Contact) GetDeviceCallsign() string {
if x != nil {
return x.DeviceCallsign
}
return ""
}
// Position Location Information from ATAK
type PLI struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The new preferred location encoding, multiply by 1e-7 to get degrees
// in floating point
LatitudeI int32 `protobuf:"fixed32,1,opt,name=latitude_i,json=latitudeI,proto3" json:"latitude_i,omitempty"`
// The new preferred location encoding, multiply by 1e-7 to get degrees
// in floating point
LongitudeI int32 `protobuf:"fixed32,2,opt,name=longitude_i,json=longitudeI,proto3" json:"longitude_i,omitempty"`
// Altitude (ATAK prefers HAE)
Altitude int32 `protobuf:"varint,3,opt,name=altitude,proto3" json:"altitude,omitempty"`
// Speed
Speed uint32 `protobuf:"varint,4,opt,name=speed,proto3" json:"speed,omitempty"`
// Course in degrees
Course uint32 `protobuf:"varint,5,opt,name=course,proto3" json:"course,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PLI) Reset() {
*x = PLI{}
mi := &file_meshtastic_atak_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PLI) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PLI) ProtoMessage() {}
func (x *PLI) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[5]
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 PLI.ProtoReflect.Descriptor instead.
func (*PLI) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{5}
}
func (x *PLI) GetLatitudeI() int32 {
if x != nil {
return x.LatitudeI
}
return 0
}
func (x *PLI) GetLongitudeI() int32 {
if x != nil {
return x.LongitudeI
}
return 0
}
func (x *PLI) GetAltitude() int32 {
if x != nil {
return x.Altitude
}
return 0
}
func (x *PLI) GetSpeed() uint32 {
if x != nil {
return x.Speed
}
return 0
}
func (x *PLI) GetCourse() uint32 {
if x != nil {
return x.Course
}
return 0
}
var File_meshtastic_atak_proto protoreflect.FileDescriptor
const file_meshtastic_atak_proto_rawDesc = "" +
"\n" +
"\x15meshtastic/atak.proto\x12\n" +
"meshtastic\"\xb1\x02\n" +
"\tTAKPacket\x12#\n" +
"\ris_compressed\x18\x01 \x01(\bR\fisCompressed\x12-\n" +
"\acontact\x18\x02 \x01(\v2\x13.meshtastic.ContactR\acontact\x12'\n" +
"\x05group\x18\x03 \x01(\v2\x11.meshtastic.GroupR\x05group\x12*\n" +
"\x06status\x18\x04 \x01(\v2\x12.meshtastic.StatusR\x06status\x12#\n" +
"\x03pli\x18\x05 \x01(\v2\x0f.meshtastic.PLIH\x00R\x03pli\x12)\n" +
"\x04chat\x18\x06 \x01(\v2\x13.meshtastic.GeoChatH\x00R\x04chat\x12\x18\n" +
"\x06detail\x18\a \x01(\fH\x00R\x06detailB\x11\n" +
"\x0fpayload_variant\"u\n" +
"\aGeoChat\x12\x18\n" +
"\amessage\x18\x01 \x01(\tR\amessage\x12\x13\n" +
"\x02to\x18\x02 \x01(\tH\x00R\x02to\x88\x01\x01\x12$\n" +
"\vto_callsign\x18\x03 \x01(\tH\x01R\n" +
"toCallsign\x88\x01\x01B\x05\n" +
"\x03_toB\x0e\n" +
"\f_to_callsign\"Y\n" +
"\x05Group\x12*\n" +
"\x04role\x18\x01 \x01(\x0e2\x16.meshtastic.MemberRoleR\x04role\x12$\n" +
"\x04team\x18\x02 \x01(\x0e2\x10.meshtastic.TeamR\x04team\"\"\n" +
"\x06Status\x12\x18\n" +
"\abattery\x18\x01 \x01(\rR\abattery\"N\n" +
"\aContact\x12\x1a\n" +
"\bcallsign\x18\x01 \x01(\tR\bcallsign\x12'\n" +
"\x0fdevice_callsign\x18\x02 \x01(\tR\x0edeviceCallsign\"\x8f\x01\n" +
"\x03PLI\x12\x1d\n" +
"\n" +
"latitude_i\x18\x01 \x01(\x0fR\tlatitudeI\x12\x1f\n" +
"\vlongitude_i\x18\x02 \x01(\x0fR\n" +
"longitudeI\x12\x1a\n" +
"\baltitude\x18\x03 \x01(\x05R\baltitude\x12\x14\n" +
"\x05speed\x18\x04 \x01(\rR\x05speed\x12\x16\n" +
"\x06course\x18\x05 \x01(\rR\x06course*\xc0\x01\n" +
"\x04Team\x12\x14\n" +
"\x10Unspecifed_Color\x10\x00\x12\t\n" +
"\x05White\x10\x01\x12\n" +
"\n" +
"\x06Yellow\x10\x02\x12\n" +
"\n" +
"\x06Orange\x10\x03\x12\v\n" +
"\aMagenta\x10\x04\x12\a\n" +
"\x03Red\x10\x05\x12\n" +
"\n" +
"\x06Maroon\x10\x06\x12\n" +
"\n" +
"\x06Purple\x10\a\x12\r\n" +
"\tDark_Blue\x10\b\x12\b\n" +
"\x04Blue\x10\t\x12\b\n" +
"\x04Cyan\x10\n" +
"\x12\b\n" +
"\x04Teal\x10\v\x12\t\n" +
"\x05Green\x10\f\x12\x0e\n" +
"\n" +
"Dark_Green\x10\r\x12\t\n" +
"\x05Brown\x10\x0e*\x7f\n" +
"\n" +
"MemberRole\x12\x0e\n" +
"\n" +
"Unspecifed\x10\x00\x12\x0e\n" +
"\n" +
"TeamMember\x10\x01\x12\f\n" +
"\bTeamLead\x10\x02\x12\x06\n" +
"\x02HQ\x10\x03\x12\n" +
"\n" +
"\x06Sniper\x10\x04\x12\t\n" +
"\x05Medic\x10\x05\x12\x13\n" +
"\x0fForwardObserver\x10\x06\x12\a\n" +
"\x03RTO\x10\a\x12\x06\n" +
"\x02K9\x10\bB\\\n" +
"\x13com.geeksville.meshB\n" +
"ATAKProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_atak_proto_rawDescOnce sync.Once
file_meshtastic_atak_proto_rawDescData []byte
)
func file_meshtastic_atak_proto_rawDescGZIP() []byte {
file_meshtastic_atak_proto_rawDescOnce.Do(func() {
file_meshtastic_atak_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_atak_proto_rawDesc), len(file_meshtastic_atak_proto_rawDesc)))
})
return file_meshtastic_atak_proto_rawDescData
}
var file_meshtastic_atak_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_meshtastic_atak_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_meshtastic_atak_proto_goTypes = []any{
(Team)(0), // 0: meshtastic.Team
(MemberRole)(0), // 1: meshtastic.MemberRole
(*TAKPacket)(nil), // 2: meshtastic.TAKPacket
(*GeoChat)(nil), // 3: meshtastic.GeoChat
(*Group)(nil), // 4: meshtastic.Group
(*Status)(nil), // 5: meshtastic.Status
(*Contact)(nil), // 6: meshtastic.Contact
(*PLI)(nil), // 7: meshtastic.PLI
}
var file_meshtastic_atak_proto_depIdxs = []int32{
6, // 0: meshtastic.TAKPacket.contact:type_name -> meshtastic.Contact
4, // 1: meshtastic.TAKPacket.group:type_name -> meshtastic.Group
5, // 2: meshtastic.TAKPacket.status:type_name -> meshtastic.Status
7, // 3: meshtastic.TAKPacket.pli:type_name -> meshtastic.PLI
3, // 4: meshtastic.TAKPacket.chat:type_name -> meshtastic.GeoChat
1, // 5: meshtastic.Group.role:type_name -> meshtastic.MemberRole
0, // 6: meshtastic.Group.team:type_name -> meshtastic.Team
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_meshtastic_atak_proto_init() }
func file_meshtastic_atak_proto_init() {
if File_meshtastic_atak_proto != nil {
return
}
file_meshtastic_atak_proto_msgTypes[0].OneofWrappers = []any{
(*TAKPacket_Pli)(nil),
(*TAKPacket_Chat)(nil),
(*TAKPacket_Detail)(nil),
}
file_meshtastic_atak_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_atak_proto_rawDesc), len(file_meshtastic_atak_proto_rawDesc)),
NumEnums: 2,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_atak_proto_goTypes,
DependencyIndexes: file_meshtastic_atak_proto_depIdxs,
EnumInfos: file_meshtastic_atak_proto_enumTypes,
MessageInfos: file_meshtastic_atak_proto_msgTypes,
}.Build()
File_meshtastic_atak_proto = out.File
file_meshtastic_atak_proto_goTypes = nil
file_meshtastic_atak_proto_depIdxs = nil
}
+126
View File
@@ -0,0 +1,126 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/cannedmessages.proto
package meshtastic
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)
)
// Canned message module configuration.
type CannedMessageModuleConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Predefined messages for canned message module separated by '|' characters.
Messages string `protobuf:"bytes,1,opt,name=messages,proto3" json:"messages,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CannedMessageModuleConfig) Reset() {
*x = CannedMessageModuleConfig{}
mi := &file_meshtastic_cannedmessages_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CannedMessageModuleConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CannedMessageModuleConfig) ProtoMessage() {}
func (x *CannedMessageModuleConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_cannedmessages_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 CannedMessageModuleConfig.ProtoReflect.Descriptor instead.
func (*CannedMessageModuleConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_cannedmessages_proto_rawDescGZIP(), []int{0}
}
func (x *CannedMessageModuleConfig) GetMessages() string {
if x != nil {
return x.Messages
}
return ""
}
var File_meshtastic_cannedmessages_proto protoreflect.FileDescriptor
const file_meshtastic_cannedmessages_proto_rawDesc = "" +
"\n" +
"\x1fmeshtastic/cannedmessages.proto\x12\n" +
"meshtastic\"7\n" +
"\x19CannedMessageModuleConfig\x12\x1a\n" +
"\bmessages\x18\x01 \x01(\tR\bmessagesBk\n" +
"\x13com.geeksville.meshB\x19CannedMessageConfigProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_cannedmessages_proto_rawDescOnce sync.Once
file_meshtastic_cannedmessages_proto_rawDescData []byte
)
func file_meshtastic_cannedmessages_proto_rawDescGZIP() []byte {
file_meshtastic_cannedmessages_proto_rawDescOnce.Do(func() {
file_meshtastic_cannedmessages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_cannedmessages_proto_rawDesc), len(file_meshtastic_cannedmessages_proto_rawDesc)))
})
return file_meshtastic_cannedmessages_proto_rawDescData
}
var file_meshtastic_cannedmessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_cannedmessages_proto_goTypes = []any{
(*CannedMessageModuleConfig)(nil), // 0: meshtastic.CannedMessageModuleConfig
}
var file_meshtastic_cannedmessages_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_meshtastic_cannedmessages_proto_init() }
func file_meshtastic_cannedmessages_proto_init() {
if File_meshtastic_cannedmessages_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_cannedmessages_proto_rawDesc), len(file_meshtastic_cannedmessages_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_cannedmessages_proto_goTypes,
DependencyIndexes: file_meshtastic_cannedmessages_proto_depIdxs,
MessageInfos: file_meshtastic_cannedmessages_proto_msgTypes,
}.Build()
File_meshtastic_cannedmessages_proto = out.File
file_meshtastic_cannedmessages_proto_goTypes = nil
file_meshtastic_cannedmessages_proto_depIdxs = nil
}
+433
View File
@@ -0,0 +1,433 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/channel.proto
package meshtastic
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)
)
// How this channel is being used (or not).
// Note: this field is an enum to give us options for the future.
// In particular, someday we might make a 'SCANNING' option.
// SCANNING channels could have different frequencies and the radio would
// occasionally check that freq to see if anything is being transmitted.
// For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
// cross band routing as needed.
// If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
// (but any number of SECONDARY channels can't be sent received on that common frequency)
type Channel_Role int32
const (
// This channel is not in use right now
Channel_DISABLED Channel_Role = 0
// This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY
Channel_PRIMARY Channel_Role = 1
// Secondary channels are only used for encryption/decryption/authentication purposes.
// Their radio settings (freq etc) are ignored, only psk is used.
Channel_SECONDARY Channel_Role = 2
)
// Enum value maps for Channel_Role.
var (
Channel_Role_name = map[int32]string{
0: "DISABLED",
1: "PRIMARY",
2: "SECONDARY",
}
Channel_Role_value = map[string]int32{
"DISABLED": 0,
"PRIMARY": 1,
"SECONDARY": 2,
}
)
func (x Channel_Role) Enum() *Channel_Role {
p := new(Channel_Role)
*p = x
return p
}
func (x Channel_Role) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Channel_Role) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_channel_proto_enumTypes[0].Descriptor()
}
func (Channel_Role) Type() protoreflect.EnumType {
return &file_meshtastic_channel_proto_enumTypes[0]
}
func (x Channel_Role) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Channel_Role.Descriptor instead.
func (Channel_Role) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{2, 0}
}
// This information can be encoded as a QRcode/url so that other users can configure
// their radio to join the same channel.
// A note about how channel names are shown to users: channelname-X
// poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).
// Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
// channel - so that if the user changes anything about the channel (which does
// force a new PSK) this letter will also change. Thus preventing user confusion if
// two friends try to type in a channel name of "BobsChan" and then can't talk
// because their PSKs will be different.
// The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26"
// This also allows the option of someday if people have the PSK off (zero), the
// users COULD type in a channel name and be able to talk.
// FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
// FIXME: explain how apps use channels for security.
// explain how remote settings and remote gpio are managed as an example
type ChannelSettings struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Deprecated in favor of LoraConfig.channel_num
//
// Deprecated: Marked as deprecated in meshtastic/channel.proto.
ChannelNum uint32 `protobuf:"varint,1,opt,name=channel_num,json=channelNum,proto3" json:"channel_num,omitempty"`
// A simple pre-shared key for now for crypto.
// Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).
// A special shorthand is used for 1 byte long psks.
// These psks should be treated as only minimally secure,
// because they are listed in this source code.
// Those bytes are mapped using the following scheme:
// `0` = No crypto
// `1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01}
// `2` through 10 = The default channel key, except with 1 through 9 added to the last byte.
// Shown to user as simple1 through 10
Psk []byte `protobuf:"bytes,2,opt,name=psk,proto3" json:"psk,omitempty"`
// A SHORT name that will be packed into the URL.
// Less than 12 bytes.
// Something for end users to call the channel
// If this is the empty string it is assumed that this channel
// is the special (minimally secure) "Default"channel.
// In user interfaces it should be rendered as a local language translation of "X".
// For channel_num hashing empty string will be treated as "X".
// Where "X" is selected based on the English words listed above for ModemPreset
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// Used to construct a globally unique channel ID.
// The full globally unique ID will be: "name.id" where ID is shown as base36.
// Assuming that the number of meshtastic users is below 20K (true for a long time)
// the chance of this 64 bit random number colliding with anyone else is super low.
// And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to
// try multiple candidate channels.
// Any time a non wire compatible change is made to a channel, this field should be regenerated.
// There are a small number of 'special' globally known (and fairly) insecure standard channels.
// Those channels do not have a numeric id included in the settings, but instead it is pulled from
// a table of well known IDs.
// (see Well Known Channels FIXME)
Id uint32 `protobuf:"fixed32,4,opt,name=id,proto3" json:"id,omitempty"`
// If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe
UplinkEnabled bool `protobuf:"varint,5,opt,name=uplink_enabled,json=uplinkEnabled,proto3" json:"uplink_enabled,omitempty"`
// If true, messages seen on the internet will be forwarded to the local mesh.
DownlinkEnabled bool `protobuf:"varint,6,opt,name=downlink_enabled,json=downlinkEnabled,proto3" json:"downlink_enabled,omitempty"`
// Per-channel module settings.
ModuleSettings *ModuleSettings `protobuf:"bytes,7,opt,name=module_settings,json=moduleSettings,proto3" json:"module_settings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelSettings) Reset() {
*x = ChannelSettings{}
mi := &file_meshtastic_channel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelSettings) ProtoMessage() {}
func (x *ChannelSettings) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_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 ChannelSettings.ProtoReflect.Descriptor instead.
func (*ChannelSettings) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{0}
}
// Deprecated: Marked as deprecated in meshtastic/channel.proto.
func (x *ChannelSettings) GetChannelNum() uint32 {
if x != nil {
return x.ChannelNum
}
return 0
}
func (x *ChannelSettings) GetPsk() []byte {
if x != nil {
return x.Psk
}
return nil
}
func (x *ChannelSettings) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ChannelSettings) GetId() uint32 {
if x != nil {
return x.Id
}
return 0
}
func (x *ChannelSettings) GetUplinkEnabled() bool {
if x != nil {
return x.UplinkEnabled
}
return false
}
func (x *ChannelSettings) GetDownlinkEnabled() bool {
if x != nil {
return x.DownlinkEnabled
}
return false
}
func (x *ChannelSettings) GetModuleSettings() *ModuleSettings {
if x != nil {
return x.ModuleSettings
}
return nil
}
// This message is specifically for modules to store per-channel configuration data.
type ModuleSettings struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Bits of precision for the location sent in position packets.
PositionPrecision uint32 `protobuf:"varint,1,opt,name=position_precision,json=positionPrecision,proto3" json:"position_precision,omitempty"`
// Controls whether or not the phone / clients should mute the current channel
// Useful for noisy public channels you don't necessarily want to disable
IsClientMuted bool `protobuf:"varint,2,opt,name=is_client_muted,json=isClientMuted,proto3" json:"is_client_muted,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ModuleSettings) Reset() {
*x = ModuleSettings{}
mi := &file_meshtastic_channel_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ModuleSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModuleSettings) ProtoMessage() {}
func (x *ModuleSettings) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_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 ModuleSettings.ProtoReflect.Descriptor instead.
func (*ModuleSettings) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{1}
}
func (x *ModuleSettings) GetPositionPrecision() uint32 {
if x != nil {
return x.PositionPrecision
}
return 0
}
func (x *ModuleSettings) GetIsClientMuted() bool {
if x != nil {
return x.IsClientMuted
}
return false
}
// A pair of a channel number, mode and the (sharable) settings for that channel
type Channel struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)
// (Someday - not currently implemented) An index of -1 could be used to mean "set by name",
// in which case the target node will find and set the channel by settings.name.
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
// The new settings, or NULL to disable that channel
Settings *ChannelSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
// TODO: REPLACE
Role Channel_Role `protobuf:"varint,3,opt,name=role,proto3,enum=meshtastic.Channel_Role" json:"role,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Channel) Reset() {
*x = Channel{}
mi := &file_meshtastic_channel_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Channel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Channel) ProtoMessage() {}
func (x *Channel) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_proto_msgTypes[2]
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 Channel.ProtoReflect.Descriptor instead.
func (*Channel) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{2}
}
func (x *Channel) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
func (x *Channel) GetSettings() *ChannelSettings {
if x != nil {
return x.Settings
}
return nil
}
func (x *Channel) GetRole() Channel_Role {
if x != nil {
return x.Role
}
return Channel_DISABLED
}
var File_meshtastic_channel_proto protoreflect.FileDescriptor
const file_meshtastic_channel_proto_rawDesc = "" +
"\n" +
"\x18meshtastic/channel.proto\x12\n" +
"meshtastic\"\x83\x02\n" +
"\x0fChannelSettings\x12#\n" +
"\vchannel_num\x18\x01 \x01(\rB\x02\x18\x01R\n" +
"channelNum\x12\x10\n" +
"\x03psk\x18\x02 \x01(\fR\x03psk\x12\x12\n" +
"\x04name\x18\x03 \x01(\tR\x04name\x12\x0e\n" +
"\x02id\x18\x04 \x01(\aR\x02id\x12%\n" +
"\x0euplink_enabled\x18\x05 \x01(\bR\ruplinkEnabled\x12)\n" +
"\x10downlink_enabled\x18\x06 \x01(\bR\x0fdownlinkEnabled\x12C\n" +
"\x0fmodule_settings\x18\a \x01(\v2\x1a.meshtastic.ModuleSettingsR\x0emoduleSettings\"g\n" +
"\x0eModuleSettings\x12-\n" +
"\x12position_precision\x18\x01 \x01(\rR\x11positionPrecision\x12&\n" +
"\x0fis_client_muted\x18\x02 \x01(\bR\risClientMuted\"\xb8\x01\n" +
"\aChannel\x12\x14\n" +
"\x05index\x18\x01 \x01(\x05R\x05index\x127\n" +
"\bsettings\x18\x02 \x01(\v2\x1b.meshtastic.ChannelSettingsR\bsettings\x12,\n" +
"\x04role\x18\x03 \x01(\x0e2\x18.meshtastic.Channel.RoleR\x04role\"0\n" +
"\x04Role\x12\f\n" +
"\bDISABLED\x10\x00\x12\v\n" +
"\aPRIMARY\x10\x01\x12\r\n" +
"\tSECONDARY\x10\x02B_\n" +
"\x13com.geeksville.meshB\rChannelProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_channel_proto_rawDescOnce sync.Once
file_meshtastic_channel_proto_rawDescData []byte
)
func file_meshtastic_channel_proto_rawDescGZIP() []byte {
file_meshtastic_channel_proto_rawDescOnce.Do(func() {
file_meshtastic_channel_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_channel_proto_rawDesc), len(file_meshtastic_channel_proto_rawDesc)))
})
return file_meshtastic_channel_proto_rawDescData
}
var file_meshtastic_channel_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_channel_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_meshtastic_channel_proto_goTypes = []any{
(Channel_Role)(0), // 0: meshtastic.Channel.Role
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
(*ModuleSettings)(nil), // 2: meshtastic.ModuleSettings
(*Channel)(nil), // 3: meshtastic.Channel
}
var file_meshtastic_channel_proto_depIdxs = []int32{
2, // 0: meshtastic.ChannelSettings.module_settings:type_name -> meshtastic.ModuleSettings
1, // 1: meshtastic.Channel.settings:type_name -> meshtastic.ChannelSettings
0, // 2: meshtastic.Channel.role:type_name -> meshtastic.Channel.Role
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_meshtastic_channel_proto_init() }
func file_meshtastic_channel_proto_init() {
if File_meshtastic_channel_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_channel_proto_rawDesc), len(file_meshtastic_channel_proto_rawDesc)),
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_channel_proto_goTypes,
DependencyIndexes: file_meshtastic_channel_proto_depIdxs,
EnumInfos: file_meshtastic_channel_proto_enumTypes,
MessageInfos: file_meshtastic_channel_proto_msgTypes,
}.Build()
File_meshtastic_channel_proto = out.File
file_meshtastic_channel_proto_goTypes = nil
file_meshtastic_channel_proto_depIdxs = nil
}
+217
View File
@@ -0,0 +1,217 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/clientonly.proto
package meshtastic
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 abstraction is used to contain any configuration for provisioning a node on any client.
// It is useful for importing and exporting configurations.
type DeviceProfile struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Long name for the node
LongName *string `protobuf:"bytes,1,opt,name=long_name,json=longName,proto3,oneof" json:"long_name,omitempty"`
// Short name of the node
ShortName *string `protobuf:"bytes,2,opt,name=short_name,json=shortName,proto3,oneof" json:"short_name,omitempty"`
// The url of the channels from our node
ChannelUrl *string `protobuf:"bytes,3,opt,name=channel_url,json=channelUrl,proto3,oneof" json:"channel_url,omitempty"`
// The Config of the node
Config *LocalConfig `protobuf:"bytes,4,opt,name=config,proto3,oneof" json:"config,omitempty"`
// The ModuleConfig of the node
ModuleConfig *LocalModuleConfig `protobuf:"bytes,5,opt,name=module_config,json=moduleConfig,proto3,oneof" json:"module_config,omitempty"`
// Fixed position data
FixedPosition *Position `protobuf:"bytes,6,opt,name=fixed_position,json=fixedPosition,proto3,oneof" json:"fixed_position,omitempty"`
// Ringtone for ExternalNotification
Ringtone *string `protobuf:"bytes,7,opt,name=ringtone,proto3,oneof" json:"ringtone,omitempty"`
// Predefined messages for CannedMessage
CannedMessages *string `protobuf:"bytes,8,opt,name=canned_messages,json=cannedMessages,proto3,oneof" json:"canned_messages,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceProfile) Reset() {
*x = DeviceProfile{}
mi := &file_meshtastic_clientonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceProfile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceProfile) ProtoMessage() {}
func (x *DeviceProfile) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_clientonly_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 DeviceProfile.ProtoReflect.Descriptor instead.
func (*DeviceProfile) Descriptor() ([]byte, []int) {
return file_meshtastic_clientonly_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceProfile) GetLongName() string {
if x != nil && x.LongName != nil {
return *x.LongName
}
return ""
}
func (x *DeviceProfile) GetShortName() string {
if x != nil && x.ShortName != nil {
return *x.ShortName
}
return ""
}
func (x *DeviceProfile) GetChannelUrl() string {
if x != nil && x.ChannelUrl != nil {
return *x.ChannelUrl
}
return ""
}
func (x *DeviceProfile) GetConfig() *LocalConfig {
if x != nil {
return x.Config
}
return nil
}
func (x *DeviceProfile) GetModuleConfig() *LocalModuleConfig {
if x != nil {
return x.ModuleConfig
}
return nil
}
func (x *DeviceProfile) GetFixedPosition() *Position {
if x != nil {
return x.FixedPosition
}
return nil
}
func (x *DeviceProfile) GetRingtone() string {
if x != nil && x.Ringtone != nil {
return *x.Ringtone
}
return ""
}
func (x *DeviceProfile) GetCannedMessages() string {
if x != nil && x.CannedMessages != nil {
return *x.CannedMessages
}
return ""
}
var File_meshtastic_clientonly_proto protoreflect.FileDescriptor
const file_meshtastic_clientonly_proto_rawDesc = "" +
"\n" +
"\x1bmeshtastic/clientonly.proto\x12\n" +
"meshtastic\x1a\x1ameshtastic/localonly.proto\x1a\x15meshtastic/mesh.proto\"\x89\x04\n" +
"\rDeviceProfile\x12 \n" +
"\tlong_name\x18\x01 \x01(\tH\x00R\blongName\x88\x01\x01\x12\"\n" +
"\n" +
"short_name\x18\x02 \x01(\tH\x01R\tshortName\x88\x01\x01\x12$\n" +
"\vchannel_url\x18\x03 \x01(\tH\x02R\n" +
"channelUrl\x88\x01\x01\x124\n" +
"\x06config\x18\x04 \x01(\v2\x17.meshtastic.LocalConfigH\x03R\x06config\x88\x01\x01\x12G\n" +
"\rmodule_config\x18\x05 \x01(\v2\x1d.meshtastic.LocalModuleConfigH\x04R\fmoduleConfig\x88\x01\x01\x12@\n" +
"\x0efixed_position\x18\x06 \x01(\v2\x14.meshtastic.PositionH\x05R\rfixedPosition\x88\x01\x01\x12\x1f\n" +
"\bringtone\x18\a \x01(\tH\x06R\bringtone\x88\x01\x01\x12,\n" +
"\x0fcanned_messages\x18\b \x01(\tH\aR\x0ecannedMessages\x88\x01\x01B\f\n" +
"\n" +
"_long_nameB\r\n" +
"\v_short_nameB\x0e\n" +
"\f_channel_urlB\t\n" +
"\a_configB\x10\n" +
"\x0e_module_configB\x11\n" +
"\x0f_fixed_positionB\v\n" +
"\t_ringtoneB\x12\n" +
"\x10_canned_messagesBb\n" +
"\x13com.geeksville.meshB\x10ClientOnlyProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_clientonly_proto_rawDescOnce sync.Once
file_meshtastic_clientonly_proto_rawDescData []byte
)
func file_meshtastic_clientonly_proto_rawDescGZIP() []byte {
file_meshtastic_clientonly_proto_rawDescOnce.Do(func() {
file_meshtastic_clientonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_clientonly_proto_rawDesc), len(file_meshtastic_clientonly_proto_rawDesc)))
})
return file_meshtastic_clientonly_proto_rawDescData
}
var file_meshtastic_clientonly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_clientonly_proto_goTypes = []any{
(*DeviceProfile)(nil), // 0: meshtastic.DeviceProfile
(*LocalConfig)(nil), // 1: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 2: meshtastic.LocalModuleConfig
(*Position)(nil), // 3: meshtastic.Position
}
var file_meshtastic_clientonly_proto_depIdxs = []int32{
1, // 0: meshtastic.DeviceProfile.config:type_name -> meshtastic.LocalConfig
2, // 1: meshtastic.DeviceProfile.module_config:type_name -> meshtastic.LocalModuleConfig
3, // 2: meshtastic.DeviceProfile.fixed_position:type_name -> meshtastic.Position
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_meshtastic_clientonly_proto_init() }
func file_meshtastic_clientonly_proto_init() {
if File_meshtastic_clientonly_proto != nil {
return
}
file_meshtastic_localonly_proto_init()
file_meshtastic_mesh_proto_init()
file_meshtastic_clientonly_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_clientonly_proto_rawDesc), len(file_meshtastic_clientonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_clientonly_proto_goTypes,
DependencyIndexes: file_meshtastic_clientonly_proto_depIdxs,
MessageInfos: file_meshtastic_clientonly_proto_msgTypes,
}.Build()
File_meshtastic_clientonly_proto = out.File
file_meshtastic_clientonly_proto_goTypes = nil
file_meshtastic_clientonly_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,493 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/connection_status.proto
package meshtastic
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 DeviceConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// WiFi Status
Wifi *WifiConnectionStatus `protobuf:"bytes,1,opt,name=wifi,proto3,oneof" json:"wifi,omitempty"`
// WiFi Status
Ethernet *EthernetConnectionStatus `protobuf:"bytes,2,opt,name=ethernet,proto3,oneof" json:"ethernet,omitempty"`
// Bluetooth Status
Bluetooth *BluetoothConnectionStatus `protobuf:"bytes,3,opt,name=bluetooth,proto3,oneof" json:"bluetooth,omitempty"`
// Serial Status
Serial *SerialConnectionStatus `protobuf:"bytes,4,opt,name=serial,proto3,oneof" json:"serial,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceConnectionStatus) Reset() {
*x = DeviceConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceConnectionStatus) ProtoMessage() {}
func (x *DeviceConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_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 DeviceConnectionStatus.ProtoReflect.Descriptor instead.
func (*DeviceConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceConnectionStatus) GetWifi() *WifiConnectionStatus {
if x != nil {
return x.Wifi
}
return nil
}
func (x *DeviceConnectionStatus) GetEthernet() *EthernetConnectionStatus {
if x != nil {
return x.Ethernet
}
return nil
}
func (x *DeviceConnectionStatus) GetBluetooth() *BluetoothConnectionStatus {
if x != nil {
return x.Bluetooth
}
return nil
}
func (x *DeviceConnectionStatus) GetSerial() *SerialConnectionStatus {
if x != nil {
return x.Serial
}
return nil
}
// WiFi connection status
type WifiConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Connection status
Status *NetworkConnectionStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// WiFi access point SSID
Ssid string `protobuf:"bytes,2,opt,name=ssid,proto3" json:"ssid,omitempty"`
// RSSI of wireless connection
Rssi int32 `protobuf:"varint,3,opt,name=rssi,proto3" json:"rssi,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WifiConnectionStatus) Reset() {
*x = WifiConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WifiConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WifiConnectionStatus) ProtoMessage() {}
func (x *WifiConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_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 WifiConnectionStatus.ProtoReflect.Descriptor instead.
func (*WifiConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{1}
}
func (x *WifiConnectionStatus) GetStatus() *NetworkConnectionStatus {
if x != nil {
return x.Status
}
return nil
}
func (x *WifiConnectionStatus) GetSsid() string {
if x != nil {
return x.Ssid
}
return ""
}
func (x *WifiConnectionStatus) GetRssi() int32 {
if x != nil {
return x.Rssi
}
return 0
}
// Ethernet connection status
type EthernetConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Connection status
Status *NetworkConnectionStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *EthernetConnectionStatus) Reset() {
*x = EthernetConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *EthernetConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EthernetConnectionStatus) ProtoMessage() {}
func (x *EthernetConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[2]
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 EthernetConnectionStatus.ProtoReflect.Descriptor instead.
func (*EthernetConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{2}
}
func (x *EthernetConnectionStatus) GetStatus() *NetworkConnectionStatus {
if x != nil {
return x.Status
}
return nil
}
// Ethernet or WiFi connection status
type NetworkConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// IP address of device
IpAddress uint32 `protobuf:"fixed32,1,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,2,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"`
// Whether the device has an active connection to an MQTT broker or not
IsMqttConnected bool `protobuf:"varint,3,opt,name=is_mqtt_connected,json=isMqttConnected,proto3" json:"is_mqtt_connected,omitempty"`
// Whether the device is actively remote syslogging or not
IsSyslogConnected bool `protobuf:"varint,4,opt,name=is_syslog_connected,json=isSyslogConnected,proto3" json:"is_syslog_connected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NetworkConnectionStatus) Reset() {
*x = NetworkConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NetworkConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NetworkConnectionStatus) ProtoMessage() {}
func (x *NetworkConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[3]
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 NetworkConnectionStatus.ProtoReflect.Descriptor instead.
func (*NetworkConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{3}
}
func (x *NetworkConnectionStatus) GetIpAddress() uint32 {
if x != nil {
return x.IpAddress
}
return 0
}
func (x *NetworkConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
func (x *NetworkConnectionStatus) GetIsMqttConnected() bool {
if x != nil {
return x.IsMqttConnected
}
return false
}
func (x *NetworkConnectionStatus) GetIsSyslogConnected() bool {
if x != nil {
return x.IsSyslogConnected
}
return false
}
// Bluetooth connection status
type BluetoothConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The pairing PIN for bluetooth
Pin uint32 `protobuf:"varint,1,opt,name=pin,proto3" json:"pin,omitempty"`
// RSSI of bluetooth connection
Rssi int32 `protobuf:"varint,2,opt,name=rssi,proto3" json:"rssi,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,3,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BluetoothConnectionStatus) Reset() {
*x = BluetoothConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BluetoothConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BluetoothConnectionStatus) ProtoMessage() {}
func (x *BluetoothConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[4]
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 BluetoothConnectionStatus.ProtoReflect.Descriptor instead.
func (*BluetoothConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{4}
}
func (x *BluetoothConnectionStatus) GetPin() uint32 {
if x != nil {
return x.Pin
}
return 0
}
func (x *BluetoothConnectionStatus) GetRssi() int32 {
if x != nil {
return x.Rssi
}
return 0
}
func (x *BluetoothConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
// Serial connection status
type SerialConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Serial baud rate
Baud uint32 `protobuf:"varint,1,opt,name=baud,proto3" json:"baud,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,2,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SerialConnectionStatus) Reset() {
*x = SerialConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SerialConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SerialConnectionStatus) ProtoMessage() {}
func (x *SerialConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[5]
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 SerialConnectionStatus.ProtoReflect.Descriptor instead.
func (*SerialConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{5}
}
func (x *SerialConnectionStatus) GetBaud() uint32 {
if x != nil {
return x.Baud
}
return 0
}
func (x *SerialConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
var File_meshtastic_connection_status_proto protoreflect.FileDescriptor
const file_meshtastic_connection_status_proto_rawDesc = "" +
"\n" +
"\"meshtastic/connection_status.proto\x12\n" +
"meshtastic\"\xd4\x02\n" +
"\x16DeviceConnectionStatus\x129\n" +
"\x04wifi\x18\x01 \x01(\v2 .meshtastic.WifiConnectionStatusH\x00R\x04wifi\x88\x01\x01\x12E\n" +
"\bethernet\x18\x02 \x01(\v2$.meshtastic.EthernetConnectionStatusH\x01R\bethernet\x88\x01\x01\x12H\n" +
"\tbluetooth\x18\x03 \x01(\v2%.meshtastic.BluetoothConnectionStatusH\x02R\tbluetooth\x88\x01\x01\x12?\n" +
"\x06serial\x18\x04 \x01(\v2\".meshtastic.SerialConnectionStatusH\x03R\x06serial\x88\x01\x01B\a\n" +
"\x05_wifiB\v\n" +
"\t_ethernetB\f\n" +
"\n" +
"_bluetoothB\t\n" +
"\a_serial\"{\n" +
"\x14WifiConnectionStatus\x12;\n" +
"\x06status\x18\x01 \x01(\v2#.meshtastic.NetworkConnectionStatusR\x06status\x12\x12\n" +
"\x04ssid\x18\x02 \x01(\tR\x04ssid\x12\x12\n" +
"\x04rssi\x18\x03 \x01(\x05R\x04rssi\"W\n" +
"\x18EthernetConnectionStatus\x12;\n" +
"\x06status\x18\x01 \x01(\v2#.meshtastic.NetworkConnectionStatusR\x06status\"\xb7\x01\n" +
"\x17NetworkConnectionStatus\x12\x1d\n" +
"\n" +
"ip_address\x18\x01 \x01(\aR\tipAddress\x12!\n" +
"\fis_connected\x18\x02 \x01(\bR\visConnected\x12*\n" +
"\x11is_mqtt_connected\x18\x03 \x01(\bR\x0fisMqttConnected\x12.\n" +
"\x13is_syslog_connected\x18\x04 \x01(\bR\x11isSyslogConnected\"d\n" +
"\x19BluetoothConnectionStatus\x12\x10\n" +
"\x03pin\x18\x01 \x01(\rR\x03pin\x12\x12\n" +
"\x04rssi\x18\x02 \x01(\x05R\x04rssi\x12!\n" +
"\fis_connected\x18\x03 \x01(\bR\visConnected\"O\n" +
"\x16SerialConnectionStatus\x12\x12\n" +
"\x04baud\x18\x01 \x01(\rR\x04baud\x12!\n" +
"\fis_connected\x18\x02 \x01(\bR\visConnectedBb\n" +
"\x13com.geeksville.meshB\x10ConnStatusProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_connection_status_proto_rawDescOnce sync.Once
file_meshtastic_connection_status_proto_rawDescData []byte
)
func file_meshtastic_connection_status_proto_rawDescGZIP() []byte {
file_meshtastic_connection_status_proto_rawDescOnce.Do(func() {
file_meshtastic_connection_status_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_connection_status_proto_rawDesc), len(file_meshtastic_connection_status_proto_rawDesc)))
})
return file_meshtastic_connection_status_proto_rawDescData
}
var file_meshtastic_connection_status_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_meshtastic_connection_status_proto_goTypes = []any{
(*DeviceConnectionStatus)(nil), // 0: meshtastic.DeviceConnectionStatus
(*WifiConnectionStatus)(nil), // 1: meshtastic.WifiConnectionStatus
(*EthernetConnectionStatus)(nil), // 2: meshtastic.EthernetConnectionStatus
(*NetworkConnectionStatus)(nil), // 3: meshtastic.NetworkConnectionStatus
(*BluetoothConnectionStatus)(nil), // 4: meshtastic.BluetoothConnectionStatus
(*SerialConnectionStatus)(nil), // 5: meshtastic.SerialConnectionStatus
}
var file_meshtastic_connection_status_proto_depIdxs = []int32{
1, // 0: meshtastic.DeviceConnectionStatus.wifi:type_name -> meshtastic.WifiConnectionStatus
2, // 1: meshtastic.DeviceConnectionStatus.ethernet:type_name -> meshtastic.EthernetConnectionStatus
4, // 2: meshtastic.DeviceConnectionStatus.bluetooth:type_name -> meshtastic.BluetoothConnectionStatus
5, // 3: meshtastic.DeviceConnectionStatus.serial:type_name -> meshtastic.SerialConnectionStatus
3, // 4: meshtastic.WifiConnectionStatus.status:type_name -> meshtastic.NetworkConnectionStatus
3, // 5: meshtastic.EthernetConnectionStatus.status:type_name -> meshtastic.NetworkConnectionStatus
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_meshtastic_connection_status_proto_init() }
func file_meshtastic_connection_status_proto_init() {
if File_meshtastic_connection_status_proto != nil {
return
}
file_meshtastic_connection_status_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_connection_status_proto_rawDesc), len(file_meshtastic_connection_status_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_connection_status_proto_goTypes,
DependencyIndexes: file_meshtastic_connection_status_proto_depIdxs,
MessageInfos: file_meshtastic_connection_status_proto_msgTypes,
}.Build()
File_meshtastic_connection_status_proto = out.File
file_meshtastic_connection_status_proto_goTypes = nil
file_meshtastic_connection_status_proto_depIdxs = nil
}
+809
View File
@@ -0,0 +1,809 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/device_ui.proto
package meshtastic
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 Theme int32
const (
// Dark
Theme_DARK Theme = 0
// Light
Theme_LIGHT Theme = 1
// Red
Theme_RED Theme = 2
)
// Enum value maps for Theme.
var (
Theme_name = map[int32]string{
0: "DARK",
1: "LIGHT",
2: "RED",
}
Theme_value = map[string]int32{
"DARK": 0,
"LIGHT": 1,
"RED": 2,
}
)
func (x Theme) Enum() *Theme {
p := new(Theme)
*p = x
return p
}
func (x Theme) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Theme) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_device_ui_proto_enumTypes[0].Descriptor()
}
func (Theme) Type() protoreflect.EnumType {
return &file_meshtastic_device_ui_proto_enumTypes[0]
}
func (x Theme) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Theme.Descriptor instead.
func (Theme) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{0}
}
// Localization
type Language int32
const (
// English
Language_ENGLISH Language = 0
// French
Language_FRENCH Language = 1
// German
Language_GERMAN Language = 2
// Italian
Language_ITALIAN Language = 3
// Portuguese
Language_PORTUGUESE Language = 4
// Spanish
Language_SPANISH Language = 5
// Swedish
Language_SWEDISH Language = 6
// Finnish
Language_FINNISH Language = 7
// Polish
Language_POLISH Language = 8
// Turkish
Language_TURKISH Language = 9
// Serbian
Language_SERBIAN Language = 10
// Russian
Language_RUSSIAN Language = 11
// Dutch
Language_DUTCH Language = 12
// Greek
Language_GREEK Language = 13
// Norwegian
Language_NORWEGIAN Language = 14
// Slovenian
Language_SLOVENIAN Language = 15
// Ukrainian
Language_UKRAINIAN Language = 16
// Simplified Chinese (experimental)
Language_SIMPLIFIED_CHINESE Language = 30
// Traditional Chinese (experimental)
Language_TRADITIONAL_CHINESE Language = 31
)
// Enum value maps for Language.
var (
Language_name = map[int32]string{
0: "ENGLISH",
1: "FRENCH",
2: "GERMAN",
3: "ITALIAN",
4: "PORTUGUESE",
5: "SPANISH",
6: "SWEDISH",
7: "FINNISH",
8: "POLISH",
9: "TURKISH",
10: "SERBIAN",
11: "RUSSIAN",
12: "DUTCH",
13: "GREEK",
14: "NORWEGIAN",
15: "SLOVENIAN",
16: "UKRAINIAN",
30: "SIMPLIFIED_CHINESE",
31: "TRADITIONAL_CHINESE",
}
Language_value = map[string]int32{
"ENGLISH": 0,
"FRENCH": 1,
"GERMAN": 2,
"ITALIAN": 3,
"PORTUGUESE": 4,
"SPANISH": 5,
"SWEDISH": 6,
"FINNISH": 7,
"POLISH": 8,
"TURKISH": 9,
"SERBIAN": 10,
"RUSSIAN": 11,
"DUTCH": 12,
"GREEK": 13,
"NORWEGIAN": 14,
"SLOVENIAN": 15,
"UKRAINIAN": 16,
"SIMPLIFIED_CHINESE": 30,
"TRADITIONAL_CHINESE": 31,
}
)
func (x Language) Enum() *Language {
p := new(Language)
*p = x
return p
}
func (x Language) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Language) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_device_ui_proto_enumTypes[1].Descriptor()
}
func (Language) Type() protoreflect.EnumType {
return &file_meshtastic_device_ui_proto_enumTypes[1]
}
func (x Language) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Language.Descriptor instead.
func (Language) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{1}
}
type DeviceUIConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// A version integer used to invalidate saved files when we make incompatible changes.
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// TFT display brightness 1..255
ScreenBrightness uint32 `protobuf:"varint,2,opt,name=screen_brightness,json=screenBrightness,proto3" json:"screen_brightness,omitempty"`
// Screen timeout 0..900
ScreenTimeout uint32 `protobuf:"varint,3,opt,name=screen_timeout,json=screenTimeout,proto3" json:"screen_timeout,omitempty"`
// Screen/Settings lock enabled
ScreenLock bool `protobuf:"varint,4,opt,name=screen_lock,json=screenLock,proto3" json:"screen_lock,omitempty"`
SettingsLock bool `protobuf:"varint,5,opt,name=settings_lock,json=settingsLock,proto3" json:"settings_lock,omitempty"`
PinCode uint32 `protobuf:"varint,6,opt,name=pin_code,json=pinCode,proto3" json:"pin_code,omitempty"`
// Color theme
Theme Theme `protobuf:"varint,7,opt,name=theme,proto3,enum=meshtastic.Theme" json:"theme,omitempty"`
// Audible message, banner and ring tone
AlertEnabled bool `protobuf:"varint,8,opt,name=alert_enabled,json=alertEnabled,proto3" json:"alert_enabled,omitempty"`
BannerEnabled bool `protobuf:"varint,9,opt,name=banner_enabled,json=bannerEnabled,proto3" json:"banner_enabled,omitempty"`
RingToneId uint32 `protobuf:"varint,10,opt,name=ring_tone_id,json=ringToneId,proto3" json:"ring_tone_id,omitempty"`
// Localization
Language Language `protobuf:"varint,11,opt,name=language,proto3,enum=meshtastic.Language" json:"language,omitempty"`
// Node list filter
NodeFilter *NodeFilter `protobuf:"bytes,12,opt,name=node_filter,json=nodeFilter,proto3" json:"node_filter,omitempty"`
// Node list highlightening
NodeHighlight *NodeHighlight `protobuf:"bytes,13,opt,name=node_highlight,json=nodeHighlight,proto3" json:"node_highlight,omitempty"`
// 8 integers for screen calibration data
CalibrationData []byte `protobuf:"bytes,14,opt,name=calibration_data,json=calibrationData,proto3" json:"calibration_data,omitempty"`
// Map related data
MapData *Map `protobuf:"bytes,15,opt,name=map_data,json=mapData,proto3" json:"map_data,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceUIConfig) Reset() {
*x = DeviceUIConfig{}
mi := &file_meshtastic_device_ui_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceUIConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceUIConfig) ProtoMessage() {}
func (x *DeviceUIConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_device_ui_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 DeviceUIConfig.ProtoReflect.Descriptor instead.
func (*DeviceUIConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceUIConfig) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *DeviceUIConfig) GetScreenBrightness() uint32 {
if x != nil {
return x.ScreenBrightness
}
return 0
}
func (x *DeviceUIConfig) GetScreenTimeout() uint32 {
if x != nil {
return x.ScreenTimeout
}
return 0
}
func (x *DeviceUIConfig) GetScreenLock() bool {
if x != nil {
return x.ScreenLock
}
return false
}
func (x *DeviceUIConfig) GetSettingsLock() bool {
if x != nil {
return x.SettingsLock
}
return false
}
func (x *DeviceUIConfig) GetPinCode() uint32 {
if x != nil {
return x.PinCode
}
return 0
}
func (x *DeviceUIConfig) GetTheme() Theme {
if x != nil {
return x.Theme
}
return Theme_DARK
}
func (x *DeviceUIConfig) GetAlertEnabled() bool {
if x != nil {
return x.AlertEnabled
}
return false
}
func (x *DeviceUIConfig) GetBannerEnabled() bool {
if x != nil {
return x.BannerEnabled
}
return false
}
func (x *DeviceUIConfig) GetRingToneId() uint32 {
if x != nil {
return x.RingToneId
}
return 0
}
func (x *DeviceUIConfig) GetLanguage() Language {
if x != nil {
return x.Language
}
return Language_ENGLISH
}
func (x *DeviceUIConfig) GetNodeFilter() *NodeFilter {
if x != nil {
return x.NodeFilter
}
return nil
}
func (x *DeviceUIConfig) GetNodeHighlight() *NodeHighlight {
if x != nil {
return x.NodeHighlight
}
return nil
}
func (x *DeviceUIConfig) GetCalibrationData() []byte {
if x != nil {
return x.CalibrationData
}
return nil
}
func (x *DeviceUIConfig) GetMapData() *Map {
if x != nil {
return x.MapData
}
return nil
}
type NodeFilter struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Filter unknown nodes
UnknownSwitch bool `protobuf:"varint,1,opt,name=unknown_switch,json=unknownSwitch,proto3" json:"unknown_switch,omitempty"`
// Filter offline nodes
OfflineSwitch bool `protobuf:"varint,2,opt,name=offline_switch,json=offlineSwitch,proto3" json:"offline_switch,omitempty"`
// Filter nodes w/o public key
PublicKeySwitch bool `protobuf:"varint,3,opt,name=public_key_switch,json=publicKeySwitch,proto3" json:"public_key_switch,omitempty"`
// Filter based on hops away
HopsAway int32 `protobuf:"varint,4,opt,name=hops_away,json=hopsAway,proto3" json:"hops_away,omitempty"`
// Filter nodes w/o position
PositionSwitch bool `protobuf:"varint,5,opt,name=position_switch,json=positionSwitch,proto3" json:"position_switch,omitempty"`
// Filter nodes by matching name string
NodeName string `protobuf:"bytes,6,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
// Filter based on channel
Channel int32 `protobuf:"varint,7,opt,name=channel,proto3" json:"channel,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeFilter) Reset() {
*x = NodeFilter{}
mi := &file_meshtastic_device_ui_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeFilter) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeFilter) ProtoMessage() {}
func (x *NodeFilter) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_device_ui_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 NodeFilter.ProtoReflect.Descriptor instead.
func (*NodeFilter) Descriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{1}
}
func (x *NodeFilter) GetUnknownSwitch() bool {
if x != nil {
return x.UnknownSwitch
}
return false
}
func (x *NodeFilter) GetOfflineSwitch() bool {
if x != nil {
return x.OfflineSwitch
}
return false
}
func (x *NodeFilter) GetPublicKeySwitch() bool {
if x != nil {
return x.PublicKeySwitch
}
return false
}
func (x *NodeFilter) GetHopsAway() int32 {
if x != nil {
return x.HopsAway
}
return 0
}
func (x *NodeFilter) GetPositionSwitch() bool {
if x != nil {
return x.PositionSwitch
}
return false
}
func (x *NodeFilter) GetNodeName() string {
if x != nil {
return x.NodeName
}
return ""
}
func (x *NodeFilter) GetChannel() int32 {
if x != nil {
return x.Channel
}
return 0
}
type NodeHighlight struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Hightlight nodes w/ active chat
ChatSwitch bool `protobuf:"varint,1,opt,name=chat_switch,json=chatSwitch,proto3" json:"chat_switch,omitempty"`
// Highlight nodes w/ position
PositionSwitch bool `protobuf:"varint,2,opt,name=position_switch,json=positionSwitch,proto3" json:"position_switch,omitempty"`
// Highlight nodes w/ telemetry data
TelemetrySwitch bool `protobuf:"varint,3,opt,name=telemetry_switch,json=telemetrySwitch,proto3" json:"telemetry_switch,omitempty"`
// Highlight nodes w/ iaq data
IaqSwitch bool `protobuf:"varint,4,opt,name=iaq_switch,json=iaqSwitch,proto3" json:"iaq_switch,omitempty"`
// Highlight nodes by matching name string
NodeName string `protobuf:"bytes,5,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeHighlight) Reset() {
*x = NodeHighlight{}
mi := &file_meshtastic_device_ui_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeHighlight) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeHighlight) ProtoMessage() {}
func (x *NodeHighlight) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_device_ui_proto_msgTypes[2]
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 NodeHighlight.ProtoReflect.Descriptor instead.
func (*NodeHighlight) Descriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{2}
}
func (x *NodeHighlight) GetChatSwitch() bool {
if x != nil {
return x.ChatSwitch
}
return false
}
func (x *NodeHighlight) GetPositionSwitch() bool {
if x != nil {
return x.PositionSwitch
}
return false
}
func (x *NodeHighlight) GetTelemetrySwitch() bool {
if x != nil {
return x.TelemetrySwitch
}
return false
}
func (x *NodeHighlight) GetIaqSwitch() bool {
if x != nil {
return x.IaqSwitch
}
return false
}
func (x *NodeHighlight) GetNodeName() string {
if x != nil {
return x.NodeName
}
return ""
}
type GeoPoint struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Zoom level
Zoom int32 `protobuf:"varint,1,opt,name=zoom,proto3" json:"zoom,omitempty"`
// Coordinate: latitude
Latitude int32 `protobuf:"varint,2,opt,name=latitude,proto3" json:"latitude,omitempty"`
// Coordinate: longitude
Longitude int32 `protobuf:"varint,3,opt,name=longitude,proto3" json:"longitude,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GeoPoint) Reset() {
*x = GeoPoint{}
mi := &file_meshtastic_device_ui_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GeoPoint) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GeoPoint) ProtoMessage() {}
func (x *GeoPoint) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_device_ui_proto_msgTypes[3]
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 GeoPoint.ProtoReflect.Descriptor instead.
func (*GeoPoint) Descriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{3}
}
func (x *GeoPoint) GetZoom() int32 {
if x != nil {
return x.Zoom
}
return 0
}
func (x *GeoPoint) GetLatitude() int32 {
if x != nil {
return x.Latitude
}
return 0
}
func (x *GeoPoint) GetLongitude() int32 {
if x != nil {
return x.Longitude
}
return 0
}
type Map struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Home coordinates
Home *GeoPoint `protobuf:"bytes,1,opt,name=home,proto3" json:"home,omitempty"`
// Map tile style
Style string `protobuf:"bytes,2,opt,name=style,proto3" json:"style,omitempty"`
// Map scroll follows GPS
FollowGps bool `protobuf:"varint,3,opt,name=follow_gps,json=followGps,proto3" json:"follow_gps,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Map) Reset() {
*x = Map{}
mi := &file_meshtastic_device_ui_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Map) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Map) ProtoMessage() {}
func (x *Map) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_device_ui_proto_msgTypes[4]
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 Map.ProtoReflect.Descriptor instead.
func (*Map) Descriptor() ([]byte, []int) {
return file_meshtastic_device_ui_proto_rawDescGZIP(), []int{4}
}
func (x *Map) GetHome() *GeoPoint {
if x != nil {
return x.Home
}
return nil
}
func (x *Map) GetStyle() string {
if x != nil {
return x.Style
}
return ""
}
func (x *Map) GetFollowGps() bool {
if x != nil {
return x.FollowGps
}
return false
}
var File_meshtastic_device_ui_proto protoreflect.FileDescriptor
const file_meshtastic_device_ui_proto_rawDesc = "" +
"\n" +
"\x1ameshtastic/device_ui.proto\x12\n" +
"meshtastic\"\xfa\x04\n" +
"\x0eDeviceUIConfig\x12\x18\n" +
"\aversion\x18\x01 \x01(\rR\aversion\x12+\n" +
"\x11screen_brightness\x18\x02 \x01(\rR\x10screenBrightness\x12%\n" +
"\x0escreen_timeout\x18\x03 \x01(\rR\rscreenTimeout\x12\x1f\n" +
"\vscreen_lock\x18\x04 \x01(\bR\n" +
"screenLock\x12#\n" +
"\rsettings_lock\x18\x05 \x01(\bR\fsettingsLock\x12\x19\n" +
"\bpin_code\x18\x06 \x01(\rR\apinCode\x12'\n" +
"\x05theme\x18\a \x01(\x0e2\x11.meshtastic.ThemeR\x05theme\x12#\n" +
"\ralert_enabled\x18\b \x01(\bR\falertEnabled\x12%\n" +
"\x0ebanner_enabled\x18\t \x01(\bR\rbannerEnabled\x12 \n" +
"\fring_tone_id\x18\n" +
" \x01(\rR\n" +
"ringToneId\x120\n" +
"\blanguage\x18\v \x01(\x0e2\x14.meshtastic.LanguageR\blanguage\x127\n" +
"\vnode_filter\x18\f \x01(\v2\x16.meshtastic.NodeFilterR\n" +
"nodeFilter\x12@\n" +
"\x0enode_highlight\x18\r \x01(\v2\x19.meshtastic.NodeHighlightR\rnodeHighlight\x12)\n" +
"\x10calibration_data\x18\x0e \x01(\fR\x0fcalibrationData\x12*\n" +
"\bmap_data\x18\x0f \x01(\v2\x0f.meshtastic.MapR\amapData\"\x83\x02\n" +
"\n" +
"NodeFilter\x12%\n" +
"\x0eunknown_switch\x18\x01 \x01(\bR\runknownSwitch\x12%\n" +
"\x0eoffline_switch\x18\x02 \x01(\bR\rofflineSwitch\x12*\n" +
"\x11public_key_switch\x18\x03 \x01(\bR\x0fpublicKeySwitch\x12\x1b\n" +
"\thops_away\x18\x04 \x01(\x05R\bhopsAway\x12'\n" +
"\x0fposition_switch\x18\x05 \x01(\bR\x0epositionSwitch\x12\x1b\n" +
"\tnode_name\x18\x06 \x01(\tR\bnodeName\x12\x18\n" +
"\achannel\x18\a \x01(\x05R\achannel\"\xc0\x01\n" +
"\rNodeHighlight\x12\x1f\n" +
"\vchat_switch\x18\x01 \x01(\bR\n" +
"chatSwitch\x12'\n" +
"\x0fposition_switch\x18\x02 \x01(\bR\x0epositionSwitch\x12)\n" +
"\x10telemetry_switch\x18\x03 \x01(\bR\x0ftelemetrySwitch\x12\x1d\n" +
"\n" +
"iaq_switch\x18\x04 \x01(\bR\tiaqSwitch\x12\x1b\n" +
"\tnode_name\x18\x05 \x01(\tR\bnodeName\"X\n" +
"\bGeoPoint\x12\x12\n" +
"\x04zoom\x18\x01 \x01(\x05R\x04zoom\x12\x1a\n" +
"\blatitude\x18\x02 \x01(\x05R\blatitude\x12\x1c\n" +
"\tlongitude\x18\x03 \x01(\x05R\tlongitude\"d\n" +
"\x03Map\x12(\n" +
"\x04home\x18\x01 \x01(\v2\x14.meshtastic.GeoPointR\x04home\x12\x14\n" +
"\x05style\x18\x02 \x01(\tR\x05style\x12\x1d\n" +
"\n" +
"follow_gps\x18\x03 \x01(\bR\tfollowGps*%\n" +
"\x05Theme\x12\b\n" +
"\x04DARK\x10\x00\x12\t\n" +
"\x05LIGHT\x10\x01\x12\a\n" +
"\x03RED\x10\x02*\x9a\x02\n" +
"\bLanguage\x12\v\n" +
"\aENGLISH\x10\x00\x12\n" +
"\n" +
"\x06FRENCH\x10\x01\x12\n" +
"\n" +
"\x06GERMAN\x10\x02\x12\v\n" +
"\aITALIAN\x10\x03\x12\x0e\n" +
"\n" +
"PORTUGUESE\x10\x04\x12\v\n" +
"\aSPANISH\x10\x05\x12\v\n" +
"\aSWEDISH\x10\x06\x12\v\n" +
"\aFINNISH\x10\a\x12\n" +
"\n" +
"\x06POLISH\x10\b\x12\v\n" +
"\aTURKISH\x10\t\x12\v\n" +
"\aSERBIAN\x10\n" +
"\x12\v\n" +
"\aRUSSIAN\x10\v\x12\t\n" +
"\x05DUTCH\x10\f\x12\t\n" +
"\x05GREEK\x10\r\x12\r\n" +
"\tNORWEGIAN\x10\x0e\x12\r\n" +
"\tSLOVENIAN\x10\x0f\x12\r\n" +
"\tUKRAINIAN\x10\x10\x12\x16\n" +
"\x12SIMPLIFIED_CHINESE\x10\x1e\x12\x17\n" +
"\x13TRADITIONAL_CHINESE\x10\x1fB`\n" +
"\x13com.geeksville.meshB\x0eDeviceUIProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_device_ui_proto_rawDescOnce sync.Once
file_meshtastic_device_ui_proto_rawDescData []byte
)
func file_meshtastic_device_ui_proto_rawDescGZIP() []byte {
file_meshtastic_device_ui_proto_rawDescOnce.Do(func() {
file_meshtastic_device_ui_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_device_ui_proto_rawDesc), len(file_meshtastic_device_ui_proto_rawDesc)))
})
return file_meshtastic_device_ui_proto_rawDescData
}
var file_meshtastic_device_ui_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_meshtastic_device_ui_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_meshtastic_device_ui_proto_goTypes = []any{
(Theme)(0), // 0: meshtastic.Theme
(Language)(0), // 1: meshtastic.Language
(*DeviceUIConfig)(nil), // 2: meshtastic.DeviceUIConfig
(*NodeFilter)(nil), // 3: meshtastic.NodeFilter
(*NodeHighlight)(nil), // 4: meshtastic.NodeHighlight
(*GeoPoint)(nil), // 5: meshtastic.GeoPoint
(*Map)(nil), // 6: meshtastic.Map
}
var file_meshtastic_device_ui_proto_depIdxs = []int32{
0, // 0: meshtastic.DeviceUIConfig.theme:type_name -> meshtastic.Theme
1, // 1: meshtastic.DeviceUIConfig.language:type_name -> meshtastic.Language
3, // 2: meshtastic.DeviceUIConfig.node_filter:type_name -> meshtastic.NodeFilter
4, // 3: meshtastic.DeviceUIConfig.node_highlight:type_name -> meshtastic.NodeHighlight
6, // 4: meshtastic.DeviceUIConfig.map_data:type_name -> meshtastic.Map
5, // 5: meshtastic.Map.home:type_name -> meshtastic.GeoPoint
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_meshtastic_device_ui_proto_init() }
func file_meshtastic_device_ui_proto_init() {
if File_meshtastic_device_ui_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_device_ui_proto_rawDesc), len(file_meshtastic_device_ui_proto_rawDesc)),
NumEnums: 2,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_device_ui_proto_goTypes,
DependencyIndexes: file_meshtastic_device_ui_proto_depIdxs,
EnumInfos: file_meshtastic_device_ui_proto_enumTypes,
MessageInfos: file_meshtastic_device_ui_proto_msgTypes,
}.Build()
File_meshtastic_device_ui_proto = out.File
file_meshtastic_device_ui_proto_goTypes = nil
file_meshtastic_device_ui_proto_depIdxs = nil
}
+868
View File
@@ -0,0 +1,868 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/deviceonly.proto
package meshtastic
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)
)
// Position with static location information only for NodeDBLite
type PositionLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The new preferred location encoding, multiply by 1e-7 to get degrees
// in floating point
LatitudeI int32 `protobuf:"fixed32,1,opt,name=latitude_i,json=latitudeI,proto3" json:"latitude_i,omitempty"`
// TODO: REPLACE
LongitudeI int32 `protobuf:"fixed32,2,opt,name=longitude_i,json=longitudeI,proto3" json:"longitude_i,omitempty"`
// In meters above MSL (but see issue #359)
Altitude int32 `protobuf:"varint,3,opt,name=altitude,proto3" json:"altitude,omitempty"`
// This is usually not sent over the mesh (to save space), but it is sent
// from the phone so that the local device can set its RTC If it is sent over
// the mesh (because there are devices on the mesh without GPS), it will only
// be sent by devices which has a hardware GPS clock.
// seconds since 1970
Time uint32 `protobuf:"fixed32,4,opt,name=time,proto3" json:"time,omitempty"`
// TODO: REPLACE
LocationSource Position_LocSource `protobuf:"varint,5,opt,name=location_source,json=locationSource,proto3,enum=meshtastic.Position_LocSource" json:"location_source,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PositionLite) Reset() {
*x = PositionLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PositionLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PositionLite) ProtoMessage() {}
func (x *PositionLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_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 PositionLite.ProtoReflect.Descriptor instead.
func (*PositionLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{0}
}
func (x *PositionLite) GetLatitudeI() int32 {
if x != nil {
return x.LatitudeI
}
return 0
}
func (x *PositionLite) GetLongitudeI() int32 {
if x != nil {
return x.LongitudeI
}
return 0
}
func (x *PositionLite) GetAltitude() int32 {
if x != nil {
return x.Altitude
}
return 0
}
func (x *PositionLite) GetTime() uint32 {
if x != nil {
return x.Time
}
return 0
}
func (x *PositionLite) GetLocationSource() Position_LocSource {
if x != nil {
return x.LocationSource
}
return Position_LOC_UNSET
}
type UserLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// This is the addr of the radio.
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
Macaddr []byte `protobuf:"bytes,1,opt,name=macaddr,proto3" json:"macaddr,omitempty"`
// A full name for this user, i.e. "Kevin Hester"
LongName string `protobuf:"bytes,2,opt,name=long_name,json=longName,proto3" json:"long_name,omitempty"`
// A VERY short name, ideally two characters.
// Suitable for a tiny OLED screen
ShortName string `protobuf:"bytes,3,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"`
// TBEAM, HELTEC, etc...
// Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
// Apps will still need the string here for older builds
// (so OTA update can find the right image), but if the enum is available it will be used instead.
HwModel HardwareModel `protobuf:"varint,4,opt,name=hw_model,json=hwModel,proto3,enum=meshtastic.HardwareModel" json:"hw_model,omitempty"`
// In some regions Ham radio operators have different bandwidth limitations than others.
// If this user is a licensed operator, set this flag.
// Also, "long_name" should be their licence number.
IsLicensed bool `protobuf:"varint,5,opt,name=is_licensed,json=isLicensed,proto3" json:"is_licensed,omitempty"`
// Indicates that the user's role in the mesh
Role Config_DeviceConfig_Role `protobuf:"varint,6,opt,name=role,proto3,enum=meshtastic.Config_DeviceConfig_Role" json:"role,omitempty"`
// The public key of the user's device.
// This is sent out to other nodes on the mesh to allow them to compute a shared secret key.
PublicKey []byte `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UserLite) Reset() {
*x = UserLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UserLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserLite) ProtoMessage() {}
func (x *UserLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_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 UserLite.ProtoReflect.Descriptor instead.
func (*UserLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{1}
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *UserLite) GetMacaddr() []byte {
if x != nil {
return x.Macaddr
}
return nil
}
func (x *UserLite) GetLongName() string {
if x != nil {
return x.LongName
}
return ""
}
func (x *UserLite) GetShortName() string {
if x != nil {
return x.ShortName
}
return ""
}
func (x *UserLite) GetHwModel() HardwareModel {
if x != nil {
return x.HwModel
}
return HardwareModel_UNSET
}
func (x *UserLite) GetIsLicensed() bool {
if x != nil {
return x.IsLicensed
}
return false
}
func (x *UserLite) GetRole() Config_DeviceConfig_Role {
if x != nil {
return x.Role
}
return Config_DeviceConfig_CLIENT
}
func (x *UserLite) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
type NodeInfoLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The node number
Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
// The user info for this node
User *UserLite `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
// Position.time now indicates the last time we received a POSITION from that node.
Position *PositionLite `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"`
// Returns the Signal-to-noise ratio (SNR) of the last received message,
// as measured by the receiver. Return SNR of the last received message in dB
Snr float32 `protobuf:"fixed32,4,opt,name=snr,proto3" json:"snr,omitempty"`
// Set to indicate the last time we received a packet from this node
LastHeard uint32 `protobuf:"fixed32,5,opt,name=last_heard,json=lastHeard,proto3" json:"last_heard,omitempty"`
// The latest device metrics for the node.
DeviceMetrics *DeviceMetrics `protobuf:"bytes,6,opt,name=device_metrics,json=deviceMetrics,proto3" json:"device_metrics,omitempty"`
// local channel index we heard that node on. Only populated if its not the default channel.
Channel uint32 `protobuf:"varint,7,opt,name=channel,proto3" json:"channel,omitempty"`
// True if we witnessed the node over MQTT instead of LoRA transport
ViaMqtt bool `protobuf:"varint,8,opt,name=via_mqtt,json=viaMqtt,proto3" json:"via_mqtt,omitempty"`
// Number of hops away from us this node is (0 if direct neighbor)
HopsAway *uint32 `protobuf:"varint,9,opt,name=hops_away,json=hopsAway,proto3,oneof" json:"hops_away,omitempty"`
// True if node is in our favorites list
// Persists between NodeDB internal clean ups
IsFavorite bool `protobuf:"varint,10,opt,name=is_favorite,json=isFavorite,proto3" json:"is_favorite,omitempty"`
// True if node is in our ignored list
// Persists between NodeDB internal clean ups
IsIgnored bool `protobuf:"varint,11,opt,name=is_ignored,json=isIgnored,proto3" json:"is_ignored,omitempty"`
// Last byte of the node number of the node that should be used as the next hop to reach this node.
NextHop uint32 `protobuf:"varint,12,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeInfoLite) Reset() {
*x = NodeInfoLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeInfoLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeInfoLite) ProtoMessage() {}
func (x *NodeInfoLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[2]
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 NodeInfoLite.ProtoReflect.Descriptor instead.
func (*NodeInfoLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{2}
}
func (x *NodeInfoLite) GetNum() uint32 {
if x != nil {
return x.Num
}
return 0
}
func (x *NodeInfoLite) GetUser() *UserLite {
if x != nil {
return x.User
}
return nil
}
func (x *NodeInfoLite) GetPosition() *PositionLite {
if x != nil {
return x.Position
}
return nil
}
func (x *NodeInfoLite) GetSnr() float32 {
if x != nil {
return x.Snr
}
return 0
}
func (x *NodeInfoLite) GetLastHeard() uint32 {
if x != nil {
return x.LastHeard
}
return 0
}
func (x *NodeInfoLite) GetDeviceMetrics() *DeviceMetrics {
if x != nil {
return x.DeviceMetrics
}
return nil
}
func (x *NodeInfoLite) GetChannel() uint32 {
if x != nil {
return x.Channel
}
return 0
}
func (x *NodeInfoLite) GetViaMqtt() bool {
if x != nil {
return x.ViaMqtt
}
return false
}
func (x *NodeInfoLite) GetHopsAway() uint32 {
if x != nil && x.HopsAway != nil {
return *x.HopsAway
}
return 0
}
func (x *NodeInfoLite) GetIsFavorite() bool {
if x != nil {
return x.IsFavorite
}
return false
}
func (x *NodeInfoLite) GetIsIgnored() bool {
if x != nil {
return x.IsIgnored
}
return false
}
func (x *NodeInfoLite) GetNextHop() uint32 {
if x != nil {
return x.NextHop
}
return 0
}
// This message is never sent over the wire, but it is used for serializing DB
// state to flash in the device code
// FIXME, since we write this each time we enter deep sleep (and have infinite
// flash) it would be better to use some sort of append only data structure for
// the receive queue and use the preferences store for the other stuff
type DeviceState struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Read only settings/info about this node
MyNode *MyNodeInfo `protobuf:"bytes,2,opt,name=my_node,json=myNode,proto3" json:"my_node,omitempty"`
// My owner info
Owner *User `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
// Received packets saved for delivery to the phone
ReceiveQueue []*MeshPacket `protobuf:"bytes,5,rep,name=receive_queue,json=receiveQueue,proto3" json:"receive_queue,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"`
// We keep the last received text message (only) stored in the device flash,
// so we can show it on the screen.
// Might be null
RxTextMessage *MeshPacket `protobuf:"bytes,7,opt,name=rx_text_message,json=rxTextMessage,proto3" json:"rx_text_message,omitempty"`
// Used only during development.
// Indicates developer is testing and changes should never be saved to flash.
// Deprecated in 2.3.1
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
NoSave bool `protobuf:"varint,9,opt,name=no_save,json=noSave,proto3" json:"no_save,omitempty"`
// Previously used to manage GPS factory resets.
// Deprecated in 2.5.23
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
DidGpsReset bool `protobuf:"varint,11,opt,name=did_gps_reset,json=didGpsReset,proto3" json:"did_gps_reset,omitempty"`
// We keep the last received waypoint stored in the device flash,
// so we can show it on the screen.
// Might be null
RxWaypoint *MeshPacket `protobuf:"bytes,12,opt,name=rx_waypoint,json=rxWaypoint,proto3" json:"rx_waypoint,omitempty"`
// The mesh's nodes with their available gpio pins for RemoteHardware module
NodeRemoteHardwarePins []*NodeRemoteHardwarePin `protobuf:"bytes,13,rep,name=node_remote_hardware_pins,json=nodeRemoteHardwarePins,proto3" json:"node_remote_hardware_pins,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceState) Reset() {
*x = DeviceState{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceState) ProtoMessage() {}
func (x *DeviceState) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[3]
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 DeviceState.ProtoReflect.Descriptor instead.
func (*DeviceState) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{3}
}
func (x *DeviceState) GetMyNode() *MyNodeInfo {
if x != nil {
return x.MyNode
}
return nil
}
func (x *DeviceState) GetOwner() *User {
if x != nil {
return x.Owner
}
return nil
}
func (x *DeviceState) GetReceiveQueue() []*MeshPacket {
if x != nil {
return x.ReceiveQueue
}
return nil
}
func (x *DeviceState) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *DeviceState) GetRxTextMessage() *MeshPacket {
if x != nil {
return x.RxTextMessage
}
return nil
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *DeviceState) GetNoSave() bool {
if x != nil {
return x.NoSave
}
return false
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *DeviceState) GetDidGpsReset() bool {
if x != nil {
return x.DidGpsReset
}
return false
}
func (x *DeviceState) GetRxWaypoint() *MeshPacket {
if x != nil {
return x.RxWaypoint
}
return nil
}
func (x *DeviceState) GetNodeRemoteHardwarePins() []*NodeRemoteHardwarePin {
if x != nil {
return x.NodeRemoteHardwarePins
}
return nil
}
type NodeDatabase struct {
state protoimpl.MessageState `protogen:"open.v1"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// New lite version of NodeDB to decrease memory footprint
Nodes []*NodeInfoLite `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeDatabase) Reset() {
*x = NodeDatabase{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeDatabase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeDatabase) ProtoMessage() {}
func (x *NodeDatabase) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[4]
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 NodeDatabase.ProtoReflect.Descriptor instead.
func (*NodeDatabase) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{4}
}
func (x *NodeDatabase) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *NodeDatabase) GetNodes() []*NodeInfoLite {
if x != nil {
return x.Nodes
}
return nil
}
// The on-disk saved channels
type ChannelFile struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The channels our node knows about
Channels []*Channel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelFile) Reset() {
*x = ChannelFile{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelFile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelFile) ProtoMessage() {}
func (x *ChannelFile) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[5]
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 ChannelFile.ProtoReflect.Descriptor instead.
func (*ChannelFile) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{5}
}
func (x *ChannelFile) GetChannels() []*Channel {
if x != nil {
return x.Channels
}
return nil
}
func (x *ChannelFile) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
// The on-disk backup of the node's preferences
type BackupPreferences struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The version of the backup
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// The timestamp of the backup (if node has time)
Timestamp uint32 `protobuf:"fixed32,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The node's configuration
Config *LocalConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
// The node's module configuration
ModuleConfig *LocalModuleConfig `protobuf:"bytes,4,opt,name=module_config,json=moduleConfig,proto3" json:"module_config,omitempty"`
// The node's channels
Channels *ChannelFile `protobuf:"bytes,5,opt,name=channels,proto3" json:"channels,omitempty"`
// The node's user (owner) information
Owner *User `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BackupPreferences) Reset() {
*x = BackupPreferences{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BackupPreferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupPreferences) ProtoMessage() {}
func (x *BackupPreferences) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[6]
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 BackupPreferences.ProtoReflect.Descriptor instead.
func (*BackupPreferences) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{6}
}
func (x *BackupPreferences) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *BackupPreferences) GetTimestamp() uint32 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *BackupPreferences) GetConfig() *LocalConfig {
if x != nil {
return x.Config
}
return nil
}
func (x *BackupPreferences) GetModuleConfig() *LocalModuleConfig {
if x != nil {
return x.ModuleConfig
}
return nil
}
func (x *BackupPreferences) GetChannels() *ChannelFile {
if x != nil {
return x.Channels
}
return nil
}
func (x *BackupPreferences) GetOwner() *User {
if x != nil {
return x.Owner
}
return nil
}
var File_meshtastic_deviceonly_proto protoreflect.FileDescriptor
const file_meshtastic_deviceonly_proto_rawDesc = "" +
"\n" +
"\x1bmeshtastic/deviceonly.proto\x12\n" +
"meshtastic\x1a\x18meshtastic/channel.proto\x1a\x15meshtastic/mesh.proto\x1a\x1ameshtastic/telemetry.proto\x1a\x17meshtastic/config.proto\x1a\x1ameshtastic/localonly.proto\x1a\x17meshtastic/nanopb.proto\"\xc7\x01\n" +
"\fPositionLite\x12\x1d\n" +
"\n" +
"latitude_i\x18\x01 \x01(\x0fR\tlatitudeI\x12\x1f\n" +
"\vlongitude_i\x18\x02 \x01(\x0fR\n" +
"longitudeI\x12\x1a\n" +
"\baltitude\x18\x03 \x01(\x05R\baltitude\x12\x12\n" +
"\x04time\x18\x04 \x01(\aR\x04time\x12G\n" +
"\x0flocation_source\x18\x05 \x01(\x0e2\x1e.meshtastic.Position.LocSourceR\x0elocationSource\"\x94\x02\n" +
"\bUserLite\x12\x1c\n" +
"\amacaddr\x18\x01 \x01(\fB\x02\x18\x01R\amacaddr\x12\x1b\n" +
"\tlong_name\x18\x02 \x01(\tR\blongName\x12\x1d\n" +
"\n" +
"short_name\x18\x03 \x01(\tR\tshortName\x124\n" +
"\bhw_model\x18\x04 \x01(\x0e2\x19.meshtastic.HardwareModelR\ahwModel\x12\x1f\n" +
"\vis_licensed\x18\x05 \x01(\bR\n" +
"isLicensed\x128\n" +
"\x04role\x18\x06 \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x12\x1d\n" +
"\n" +
"public_key\x18\a \x01(\fR\tpublicKey\"\xb3\x03\n" +
"\fNodeInfoLite\x12\x10\n" +
"\x03num\x18\x01 \x01(\rR\x03num\x12(\n" +
"\x04user\x18\x02 \x01(\v2\x14.meshtastic.UserLiteR\x04user\x124\n" +
"\bposition\x18\x03 \x01(\v2\x18.meshtastic.PositionLiteR\bposition\x12\x10\n" +
"\x03snr\x18\x04 \x01(\x02R\x03snr\x12\x1d\n" +
"\n" +
"last_heard\x18\x05 \x01(\aR\tlastHeard\x12@\n" +
"\x0edevice_metrics\x18\x06 \x01(\v2\x19.meshtastic.DeviceMetricsR\rdeviceMetrics\x12\x18\n" +
"\achannel\x18\a \x01(\rR\achannel\x12\x19\n" +
"\bvia_mqtt\x18\b \x01(\bR\aviaMqtt\x12 \n" +
"\thops_away\x18\t \x01(\rH\x00R\bhopsAway\x88\x01\x01\x12\x1f\n" +
"\vis_favorite\x18\n" +
" \x01(\bR\n" +
"isFavorite\x12\x1d\n" +
"\n" +
"is_ignored\x18\v \x01(\bR\tisIgnored\x12\x19\n" +
"\bnext_hop\x18\f \x01(\rR\anextHopB\f\n" +
"\n" +
"_hops_away\"\xd9\x03\n" +
"\vDeviceState\x12/\n" +
"\amy_node\x18\x02 \x01(\v2\x16.meshtastic.MyNodeInfoR\x06myNode\x12&\n" +
"\x05owner\x18\x03 \x01(\v2\x10.meshtastic.UserR\x05owner\x12;\n" +
"\rreceive_queue\x18\x05 \x03(\v2\x16.meshtastic.MeshPacketR\freceiveQueue\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversion\x12>\n" +
"\x0frx_text_message\x18\a \x01(\v2\x16.meshtastic.MeshPacketR\rrxTextMessage\x12\x1b\n" +
"\ano_save\x18\t \x01(\bB\x02\x18\x01R\x06noSave\x12&\n" +
"\rdid_gps_reset\x18\v \x01(\bB\x02\x18\x01R\vdidGpsReset\x127\n" +
"\vrx_waypoint\x18\f \x01(\v2\x16.meshtastic.MeshPacketR\n" +
"rxWaypoint\x12\\\n" +
"\x19node_remote_hardware_pins\x18\r \x03(\v2!.meshtastic.NodeRemoteHardwarePinR\x16nodeRemoteHardwarePins\"\x84\x01\n" +
"\fNodeDatabase\x12\x18\n" +
"\aversion\x18\x01 \x01(\rR\aversion\x12Z\n" +
"\x05nodes\x18\x02 \x03(\v2\x18.meshtastic.NodeInfoLiteB*\x92?'\x92\x01$std::vector<meshtastic_NodeInfoLite>R\x05nodes\"X\n" +
"\vChannelFile\x12/\n" +
"\bchannels\x18\x01 \x03(\v2\x13.meshtastic.ChannelR\bchannels\x12\x18\n" +
"\aversion\x18\x02 \x01(\rR\aversion\"\x9d\x02\n" +
"\x11BackupPreferences\x12\x18\n" +
"\aversion\x18\x01 \x01(\rR\aversion\x12\x1c\n" +
"\ttimestamp\x18\x02 \x01(\aR\ttimestamp\x12/\n" +
"\x06config\x18\x03 \x01(\v2\x17.meshtastic.LocalConfigR\x06config\x12B\n" +
"\rmodule_config\x18\x04 \x01(\v2\x1d.meshtastic.LocalModuleConfigR\fmoduleConfig\x123\n" +
"\bchannels\x18\x05 \x01(\v2\x17.meshtastic.ChannelFileR\bchannels\x12&\n" +
"\x05owner\x18\x06 \x01(\v2\x10.meshtastic.UserR\x05ownerBj\x92?\v\xc2\x01\b<vector>\n" +
"\x13com.geeksville.meshB\n" +
"DeviceOnlyZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_deviceonly_proto_rawDescOnce sync.Once
file_meshtastic_deviceonly_proto_rawDescData []byte
)
func file_meshtastic_deviceonly_proto_rawDescGZIP() []byte {
file_meshtastic_deviceonly_proto_rawDescOnce.Do(func() {
file_meshtastic_deviceonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_deviceonly_proto_rawDesc), len(file_meshtastic_deviceonly_proto_rawDesc)))
})
return file_meshtastic_deviceonly_proto_rawDescData
}
var file_meshtastic_deviceonly_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_meshtastic_deviceonly_proto_goTypes = []any{
(*PositionLite)(nil), // 0: meshtastic.PositionLite
(*UserLite)(nil), // 1: meshtastic.UserLite
(*NodeInfoLite)(nil), // 2: meshtastic.NodeInfoLite
(*DeviceState)(nil), // 3: meshtastic.DeviceState
(*NodeDatabase)(nil), // 4: meshtastic.NodeDatabase
(*ChannelFile)(nil), // 5: meshtastic.ChannelFile
(*BackupPreferences)(nil), // 6: meshtastic.BackupPreferences
(Position_LocSource)(0), // 7: meshtastic.Position.LocSource
(HardwareModel)(0), // 8: meshtastic.HardwareModel
(Config_DeviceConfig_Role)(0), // 9: meshtastic.Config.DeviceConfig.Role
(*DeviceMetrics)(nil), // 10: meshtastic.DeviceMetrics
(*MyNodeInfo)(nil), // 11: meshtastic.MyNodeInfo
(*User)(nil), // 12: meshtastic.User
(*MeshPacket)(nil), // 13: meshtastic.MeshPacket
(*NodeRemoteHardwarePin)(nil), // 14: meshtastic.NodeRemoteHardwarePin
(*Channel)(nil), // 15: meshtastic.Channel
(*LocalConfig)(nil), // 16: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 17: meshtastic.LocalModuleConfig
}
var file_meshtastic_deviceonly_proto_depIdxs = []int32{
7, // 0: meshtastic.PositionLite.location_source:type_name -> meshtastic.Position.LocSource
8, // 1: meshtastic.UserLite.hw_model:type_name -> meshtastic.HardwareModel
9, // 2: meshtastic.UserLite.role:type_name -> meshtastic.Config.DeviceConfig.Role
1, // 3: meshtastic.NodeInfoLite.user:type_name -> meshtastic.UserLite
0, // 4: meshtastic.NodeInfoLite.position:type_name -> meshtastic.PositionLite
10, // 5: meshtastic.NodeInfoLite.device_metrics:type_name -> meshtastic.DeviceMetrics
11, // 6: meshtastic.DeviceState.my_node:type_name -> meshtastic.MyNodeInfo
12, // 7: meshtastic.DeviceState.owner:type_name -> meshtastic.User
13, // 8: meshtastic.DeviceState.receive_queue:type_name -> meshtastic.MeshPacket
13, // 9: meshtastic.DeviceState.rx_text_message:type_name -> meshtastic.MeshPacket
13, // 10: meshtastic.DeviceState.rx_waypoint:type_name -> meshtastic.MeshPacket
14, // 11: meshtastic.DeviceState.node_remote_hardware_pins:type_name -> meshtastic.NodeRemoteHardwarePin
2, // 12: meshtastic.NodeDatabase.nodes:type_name -> meshtastic.NodeInfoLite
15, // 13: meshtastic.ChannelFile.channels:type_name -> meshtastic.Channel
16, // 14: meshtastic.BackupPreferences.config:type_name -> meshtastic.LocalConfig
17, // 15: meshtastic.BackupPreferences.module_config:type_name -> meshtastic.LocalModuleConfig
5, // 16: meshtastic.BackupPreferences.channels:type_name -> meshtastic.ChannelFile
12, // 17: meshtastic.BackupPreferences.owner:type_name -> meshtastic.User
18, // [18:18] is the sub-list for method output_type
18, // [18:18] is the sub-list for method input_type
18, // [18:18] is the sub-list for extension type_name
18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
}
func init() { file_meshtastic_deviceonly_proto_init() }
func file_meshtastic_deviceonly_proto_init() {
if File_meshtastic_deviceonly_proto != nil {
return
}
file_meshtastic_channel_proto_init()
file_meshtastic_mesh_proto_init()
file_meshtastic_telemetry_proto_init()
file_meshtastic_config_proto_init()
file_meshtastic_localonly_proto_init()
file_meshtastic_nanopb_proto_init()
file_meshtastic_deviceonly_proto_msgTypes[2].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_deviceonly_proto_rawDesc), len(file_meshtastic_deviceonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_deviceonly_proto_goTypes,
DependencyIndexes: file_meshtastic_deviceonly_proto_depIdxs,
MessageInfos: file_meshtastic_deviceonly_proto_msgTypes,
}.Build()
File_meshtastic_deviceonly_proto = out.File
file_meshtastic_deviceonly_proto_goTypes = nil
file_meshtastic_deviceonly_proto_depIdxs = nil
}
+372
View File
@@ -0,0 +1,372 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/interdevice.proto
package meshtastic
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\x01Bc\n" +
"\x13com.geeksville.meshB\x11InterdeviceProtosZ\x1fmeshstream/generated/meshtastic\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
}
+435
View File
@@ -0,0 +1,435 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/localonly.proto
package meshtastic
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 LocalConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The part of the config that is specific to the Device
Device *Config_DeviceConfig `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
// The part of the config that is specific to the GPS Position
Position *Config_PositionConfig `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"`
// The part of the config that is specific to the Power settings
Power *Config_PowerConfig `protobuf:"bytes,3,opt,name=power,proto3" json:"power,omitempty"`
// The part of the config that is specific to the Wifi Settings
Network *Config_NetworkConfig `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
// The part of the config that is specific to the Display
Display *Config_DisplayConfig `protobuf:"bytes,5,opt,name=display,proto3" json:"display,omitempty"`
// The part of the config that is specific to the Lora Radio
Lora *Config_LoRaConfig `protobuf:"bytes,6,opt,name=lora,proto3" json:"lora,omitempty"`
// The part of the config that is specific to the Bluetooth settings
Bluetooth *Config_BluetoothConfig `protobuf:"bytes,7,opt,name=bluetooth,proto3" json:"bluetooth,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"`
// The part of the config that is specific to Security settings
Security *Config_SecurityConfig `protobuf:"bytes,9,opt,name=security,proto3" json:"security,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LocalConfig) Reset() {
*x = LocalConfig{}
mi := &file_meshtastic_localonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LocalConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalConfig) ProtoMessage() {}
func (x *LocalConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_localonly_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 LocalConfig.ProtoReflect.Descriptor instead.
func (*LocalConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_localonly_proto_rawDescGZIP(), []int{0}
}
func (x *LocalConfig) GetDevice() *Config_DeviceConfig {
if x != nil {
return x.Device
}
return nil
}
func (x *LocalConfig) GetPosition() *Config_PositionConfig {
if x != nil {
return x.Position
}
return nil
}
func (x *LocalConfig) GetPower() *Config_PowerConfig {
if x != nil {
return x.Power
}
return nil
}
func (x *LocalConfig) GetNetwork() *Config_NetworkConfig {
if x != nil {
return x.Network
}
return nil
}
func (x *LocalConfig) GetDisplay() *Config_DisplayConfig {
if x != nil {
return x.Display
}
return nil
}
func (x *LocalConfig) GetLora() *Config_LoRaConfig {
if x != nil {
return x.Lora
}
return nil
}
func (x *LocalConfig) GetBluetooth() *Config_BluetoothConfig {
if x != nil {
return x.Bluetooth
}
return nil
}
func (x *LocalConfig) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *LocalConfig) GetSecurity() *Config_SecurityConfig {
if x != nil {
return x.Security
}
return nil
}
type LocalModuleConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The part of the config that is specific to the MQTT module
Mqtt *ModuleConfig_MQTTConfig `protobuf:"bytes,1,opt,name=mqtt,proto3" json:"mqtt,omitempty"`
// The part of the config that is specific to the Serial module
Serial *ModuleConfig_SerialConfig `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial,omitempty"`
// The part of the config that is specific to the ExternalNotification module
ExternalNotification *ModuleConfig_ExternalNotificationConfig `protobuf:"bytes,3,opt,name=external_notification,json=externalNotification,proto3" json:"external_notification,omitempty"`
// The part of the config that is specific to the Store & Forward module
StoreForward *ModuleConfig_StoreForwardConfig `protobuf:"bytes,4,opt,name=store_forward,json=storeForward,proto3" json:"store_forward,omitempty"`
// The part of the config that is specific to the RangeTest module
RangeTest *ModuleConfig_RangeTestConfig `protobuf:"bytes,5,opt,name=range_test,json=rangeTest,proto3" json:"range_test,omitempty"`
// The part of the config that is specific to the Telemetry module
Telemetry *ModuleConfig_TelemetryConfig `protobuf:"bytes,6,opt,name=telemetry,proto3" json:"telemetry,omitempty"`
// The part of the config that is specific to the Canned Message module
CannedMessage *ModuleConfig_CannedMessageConfig `protobuf:"bytes,7,opt,name=canned_message,json=cannedMessage,proto3" json:"canned_message,omitempty"`
// The part of the config that is specific to the Audio module
Audio *ModuleConfig_AudioConfig `protobuf:"bytes,9,opt,name=audio,proto3" json:"audio,omitempty"`
// The part of the config that is specific to the Remote Hardware module
RemoteHardware *ModuleConfig_RemoteHardwareConfig `protobuf:"bytes,10,opt,name=remote_hardware,json=remoteHardware,proto3" json:"remote_hardware,omitempty"`
// The part of the config that is specific to the Neighbor Info module
NeighborInfo *ModuleConfig_NeighborInfoConfig `protobuf:"bytes,11,opt,name=neighbor_info,json=neighborInfo,proto3" json:"neighbor_info,omitempty"`
// The part of the config that is specific to the Ambient Lighting module
AmbientLighting *ModuleConfig_AmbientLightingConfig `protobuf:"bytes,12,opt,name=ambient_lighting,json=ambientLighting,proto3" json:"ambient_lighting,omitempty"`
// The part of the config that is specific to the Detection Sensor module
DetectionSensor *ModuleConfig_DetectionSensorConfig `protobuf:"bytes,13,opt,name=detection_sensor,json=detectionSensor,proto3" json:"detection_sensor,omitempty"`
// Paxcounter Config
Paxcounter *ModuleConfig_PaxcounterConfig `protobuf:"bytes,14,opt,name=paxcounter,proto3" json:"paxcounter,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LocalModuleConfig) Reset() {
*x = LocalModuleConfig{}
mi := &file_meshtastic_localonly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LocalModuleConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalModuleConfig) ProtoMessage() {}
func (x *LocalModuleConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_localonly_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 LocalModuleConfig.ProtoReflect.Descriptor instead.
func (*LocalModuleConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_localonly_proto_rawDescGZIP(), []int{1}
}
func (x *LocalModuleConfig) GetMqtt() *ModuleConfig_MQTTConfig {
if x != nil {
return x.Mqtt
}
return nil
}
func (x *LocalModuleConfig) GetSerial() *ModuleConfig_SerialConfig {
if x != nil {
return x.Serial
}
return nil
}
func (x *LocalModuleConfig) GetExternalNotification() *ModuleConfig_ExternalNotificationConfig {
if x != nil {
return x.ExternalNotification
}
return nil
}
func (x *LocalModuleConfig) GetStoreForward() *ModuleConfig_StoreForwardConfig {
if x != nil {
return x.StoreForward
}
return nil
}
func (x *LocalModuleConfig) GetRangeTest() *ModuleConfig_RangeTestConfig {
if x != nil {
return x.RangeTest
}
return nil
}
func (x *LocalModuleConfig) GetTelemetry() *ModuleConfig_TelemetryConfig {
if x != nil {
return x.Telemetry
}
return nil
}
func (x *LocalModuleConfig) GetCannedMessage() *ModuleConfig_CannedMessageConfig {
if x != nil {
return x.CannedMessage
}
return nil
}
func (x *LocalModuleConfig) GetAudio() *ModuleConfig_AudioConfig {
if x != nil {
return x.Audio
}
return nil
}
func (x *LocalModuleConfig) GetRemoteHardware() *ModuleConfig_RemoteHardwareConfig {
if x != nil {
return x.RemoteHardware
}
return nil
}
func (x *LocalModuleConfig) GetNeighborInfo() *ModuleConfig_NeighborInfoConfig {
if x != nil {
return x.NeighborInfo
}
return nil
}
func (x *LocalModuleConfig) GetAmbientLighting() *ModuleConfig_AmbientLightingConfig {
if x != nil {
return x.AmbientLighting
}
return nil
}
func (x *LocalModuleConfig) GetDetectionSensor() *ModuleConfig_DetectionSensorConfig {
if x != nil {
return x.DetectionSensor
}
return nil
}
func (x *LocalModuleConfig) GetPaxcounter() *ModuleConfig_PaxcounterConfig {
if x != nil {
return x.Paxcounter
}
return nil
}
func (x *LocalModuleConfig) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
var File_meshtastic_localonly_proto protoreflect.FileDescriptor
const file_meshtastic_localonly_proto_rawDesc = "" +
"\n" +
"\x1ameshtastic/localonly.proto\x12\n" +
"meshtastic\x1a\x17meshtastic/config.proto\x1a\x1emeshtastic/module_config.proto\"\x81\x04\n" +
"\vLocalConfig\x127\n" +
"\x06device\x18\x01 \x01(\v2\x1f.meshtastic.Config.DeviceConfigR\x06device\x12=\n" +
"\bposition\x18\x02 \x01(\v2!.meshtastic.Config.PositionConfigR\bposition\x124\n" +
"\x05power\x18\x03 \x01(\v2\x1e.meshtastic.Config.PowerConfigR\x05power\x12:\n" +
"\anetwork\x18\x04 \x01(\v2 .meshtastic.Config.NetworkConfigR\anetwork\x12:\n" +
"\adisplay\x18\x05 \x01(\v2 .meshtastic.Config.DisplayConfigR\adisplay\x121\n" +
"\x04lora\x18\x06 \x01(\v2\x1d.meshtastic.Config.LoRaConfigR\x04lora\x12@\n" +
"\tbluetooth\x18\a \x01(\v2\".meshtastic.Config.BluetoothConfigR\tbluetooth\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversion\x12=\n" +
"\bsecurity\x18\t \x01(\v2!.meshtastic.Config.SecurityConfigR\bsecurity\"\xae\b\n" +
"\x11LocalModuleConfig\x127\n" +
"\x04mqtt\x18\x01 \x01(\v2#.meshtastic.ModuleConfig.MQTTConfigR\x04mqtt\x12=\n" +
"\x06serial\x18\x02 \x01(\v2%.meshtastic.ModuleConfig.SerialConfigR\x06serial\x12h\n" +
"\x15external_notification\x18\x03 \x01(\v23.meshtastic.ModuleConfig.ExternalNotificationConfigR\x14externalNotification\x12P\n" +
"\rstore_forward\x18\x04 \x01(\v2+.meshtastic.ModuleConfig.StoreForwardConfigR\fstoreForward\x12G\n" +
"\n" +
"range_test\x18\x05 \x01(\v2(.meshtastic.ModuleConfig.RangeTestConfigR\trangeTest\x12F\n" +
"\ttelemetry\x18\x06 \x01(\v2(.meshtastic.ModuleConfig.TelemetryConfigR\ttelemetry\x12S\n" +
"\x0ecanned_message\x18\a \x01(\v2,.meshtastic.ModuleConfig.CannedMessageConfigR\rcannedMessage\x12:\n" +
"\x05audio\x18\t \x01(\v2$.meshtastic.ModuleConfig.AudioConfigR\x05audio\x12V\n" +
"\x0fremote_hardware\x18\n" +
" \x01(\v2-.meshtastic.ModuleConfig.RemoteHardwareConfigR\x0eremoteHardware\x12P\n" +
"\rneighbor_info\x18\v \x01(\v2+.meshtastic.ModuleConfig.NeighborInfoConfigR\fneighborInfo\x12Y\n" +
"\x10ambient_lighting\x18\f \x01(\v2..meshtastic.ModuleConfig.AmbientLightingConfigR\x0fambientLighting\x12Y\n" +
"\x10detection_sensor\x18\r \x01(\v2..meshtastic.ModuleConfig.DetectionSensorConfigR\x0fdetectionSensor\x12I\n" +
"\n" +
"paxcounter\x18\x0e \x01(\v2).meshtastic.ModuleConfig.PaxcounterConfigR\n" +
"paxcounter\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversionBa\n" +
"\x13com.geeksville.meshB\x0fLocalOnlyProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_localonly_proto_rawDescOnce sync.Once
file_meshtastic_localonly_proto_rawDescData []byte
)
func file_meshtastic_localonly_proto_rawDescGZIP() []byte {
file_meshtastic_localonly_proto_rawDescOnce.Do(func() {
file_meshtastic_localonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_localonly_proto_rawDesc), len(file_meshtastic_localonly_proto_rawDesc)))
})
return file_meshtastic_localonly_proto_rawDescData
}
var file_meshtastic_localonly_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_meshtastic_localonly_proto_goTypes = []any{
(*LocalConfig)(nil), // 0: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 1: meshtastic.LocalModuleConfig
(*Config_DeviceConfig)(nil), // 2: meshtastic.Config.DeviceConfig
(*Config_PositionConfig)(nil), // 3: meshtastic.Config.PositionConfig
(*Config_PowerConfig)(nil), // 4: meshtastic.Config.PowerConfig
(*Config_NetworkConfig)(nil), // 5: meshtastic.Config.NetworkConfig
(*Config_DisplayConfig)(nil), // 6: meshtastic.Config.DisplayConfig
(*Config_LoRaConfig)(nil), // 7: meshtastic.Config.LoRaConfig
(*Config_BluetoothConfig)(nil), // 8: meshtastic.Config.BluetoothConfig
(*Config_SecurityConfig)(nil), // 9: meshtastic.Config.SecurityConfig
(*ModuleConfig_MQTTConfig)(nil), // 10: meshtastic.ModuleConfig.MQTTConfig
(*ModuleConfig_SerialConfig)(nil), // 11: meshtastic.ModuleConfig.SerialConfig
(*ModuleConfig_ExternalNotificationConfig)(nil), // 12: meshtastic.ModuleConfig.ExternalNotificationConfig
(*ModuleConfig_StoreForwardConfig)(nil), // 13: meshtastic.ModuleConfig.StoreForwardConfig
(*ModuleConfig_RangeTestConfig)(nil), // 14: meshtastic.ModuleConfig.RangeTestConfig
(*ModuleConfig_TelemetryConfig)(nil), // 15: meshtastic.ModuleConfig.TelemetryConfig
(*ModuleConfig_CannedMessageConfig)(nil), // 16: meshtastic.ModuleConfig.CannedMessageConfig
(*ModuleConfig_AudioConfig)(nil), // 17: meshtastic.ModuleConfig.AudioConfig
(*ModuleConfig_RemoteHardwareConfig)(nil), // 18: meshtastic.ModuleConfig.RemoteHardwareConfig
(*ModuleConfig_NeighborInfoConfig)(nil), // 19: meshtastic.ModuleConfig.NeighborInfoConfig
(*ModuleConfig_AmbientLightingConfig)(nil), // 20: meshtastic.ModuleConfig.AmbientLightingConfig
(*ModuleConfig_DetectionSensorConfig)(nil), // 21: meshtastic.ModuleConfig.DetectionSensorConfig
(*ModuleConfig_PaxcounterConfig)(nil), // 22: meshtastic.ModuleConfig.PaxcounterConfig
}
var file_meshtastic_localonly_proto_depIdxs = []int32{
2, // 0: meshtastic.LocalConfig.device:type_name -> meshtastic.Config.DeviceConfig
3, // 1: meshtastic.LocalConfig.position:type_name -> meshtastic.Config.PositionConfig
4, // 2: meshtastic.LocalConfig.power:type_name -> meshtastic.Config.PowerConfig
5, // 3: meshtastic.LocalConfig.network:type_name -> meshtastic.Config.NetworkConfig
6, // 4: meshtastic.LocalConfig.display:type_name -> meshtastic.Config.DisplayConfig
7, // 5: meshtastic.LocalConfig.lora:type_name -> meshtastic.Config.LoRaConfig
8, // 6: meshtastic.LocalConfig.bluetooth:type_name -> meshtastic.Config.BluetoothConfig
9, // 7: meshtastic.LocalConfig.security:type_name -> meshtastic.Config.SecurityConfig
10, // 8: meshtastic.LocalModuleConfig.mqtt:type_name -> meshtastic.ModuleConfig.MQTTConfig
11, // 9: meshtastic.LocalModuleConfig.serial:type_name -> meshtastic.ModuleConfig.SerialConfig
12, // 10: meshtastic.LocalModuleConfig.external_notification:type_name -> meshtastic.ModuleConfig.ExternalNotificationConfig
13, // 11: meshtastic.LocalModuleConfig.store_forward:type_name -> meshtastic.ModuleConfig.StoreForwardConfig
14, // 12: meshtastic.LocalModuleConfig.range_test:type_name -> meshtastic.ModuleConfig.RangeTestConfig
15, // 13: meshtastic.LocalModuleConfig.telemetry:type_name -> meshtastic.ModuleConfig.TelemetryConfig
16, // 14: meshtastic.LocalModuleConfig.canned_message:type_name -> meshtastic.ModuleConfig.CannedMessageConfig
17, // 15: meshtastic.LocalModuleConfig.audio:type_name -> meshtastic.ModuleConfig.AudioConfig
18, // 16: meshtastic.LocalModuleConfig.remote_hardware:type_name -> meshtastic.ModuleConfig.RemoteHardwareConfig
19, // 17: meshtastic.LocalModuleConfig.neighbor_info:type_name -> meshtastic.ModuleConfig.NeighborInfoConfig
20, // 18: meshtastic.LocalModuleConfig.ambient_lighting:type_name -> meshtastic.ModuleConfig.AmbientLightingConfig
21, // 19: meshtastic.LocalModuleConfig.detection_sensor:type_name -> meshtastic.ModuleConfig.DetectionSensorConfig
22, // 20: meshtastic.LocalModuleConfig.paxcounter:type_name -> meshtastic.ModuleConfig.PaxcounterConfig
21, // [21:21] is the sub-list for method output_type
21, // [21:21] is the sub-list for method input_type
21, // [21:21] is the sub-list for extension type_name
21, // [21:21] is the sub-list for extension extendee
0, // [0:21] is the sub-list for field type_name
}
func init() { file_meshtastic_localonly_proto_init() }
func file_meshtastic_localonly_proto_init() {
if File_meshtastic_localonly_proto != nil {
return
}
file_meshtastic_config_proto_init()
file_meshtastic_module_config_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_localonly_proto_rawDesc), len(file_meshtastic_localonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_localonly_proto_goTypes,
DependencyIndexes: file_meshtastic_localonly_proto_depIdxs,
MessageInfos: file_meshtastic_localonly_proto_msgTypes,
}.Build()
File_meshtastic_localonly_proto = out.File
file_meshtastic_localonly_proto_goTypes = nil
file_meshtastic_localonly_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+338
View File
@@ -0,0 +1,338 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/mqtt.proto
package meshtastic
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:"channel_id,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:"gateway_id,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:"long_name,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:"short_name,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:"hw_model,omitempty"`
// Device firmware version string
FirmwareVersion string `protobuf:"bytes,5,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmware_version,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:"modem_preset,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:"has_default_channel,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:"latitude_i,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:"longitude_i,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:"position_precision,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:"num_online_local_nodes,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
}
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\"\xe2\x04\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\x13numOnlineLocalNodesB\\\n" +
"\x13com.geeksville.meshB\n" +
"MQTTProtosZ\x1fmeshstream/generated/meshtastic\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
}
+849
View File
@@ -0,0 +1,849 @@
// Custom options for defining:
// - Maximum size of string/bytes
// - Maximum number of elements in array
//
// These are used by nanopb to generate statically allocable structures
// for memory-limited environments.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/nanopb.proto
package meshtastic
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
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 FieldType int32
const (
FieldType_FT_DEFAULT FieldType = 0 // Automatically decide field type, generate static field if possible.
FieldType_FT_CALLBACK FieldType = 1 // Always generate a callback field.
FieldType_FT_POINTER FieldType = 4 // Always generate a dynamically allocated field.
FieldType_FT_STATIC FieldType = 2 // Generate a static field or raise an exception if not possible.
FieldType_FT_IGNORE FieldType = 3 // Ignore the field completely.
FieldType_FT_INLINE FieldType = 5 // Legacy option, use the separate 'fixed_length' option instead
)
// Enum value maps for FieldType.
var (
FieldType_name = map[int32]string{
0: "FT_DEFAULT",
1: "FT_CALLBACK",
4: "FT_POINTER",
2: "FT_STATIC",
3: "FT_IGNORE",
5: "FT_INLINE",
}
FieldType_value = map[string]int32{
"FT_DEFAULT": 0,
"FT_CALLBACK": 1,
"FT_POINTER": 4,
"FT_STATIC": 2,
"FT_IGNORE": 3,
"FT_INLINE": 5,
}
)
func (x FieldType) Enum() *FieldType {
p := new(FieldType)
*p = x
return p
}
func (x FieldType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FieldType) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_nanopb_proto_enumTypes[0].Descriptor()
}
func (FieldType) Type() protoreflect.EnumType {
return &file_meshtastic_nanopb_proto_enumTypes[0]
}
func (x FieldType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *FieldType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = FieldType(num)
return nil
}
// Deprecated: Use FieldType.Descriptor instead.
func (FieldType) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_nanopb_proto_rawDescGZIP(), []int{0}
}
type IntSize int32
const (
IntSize_IS_DEFAULT IntSize = 0 // Default, 32/64bit based on type in .proto
IntSize_IS_8 IntSize = 8
IntSize_IS_16 IntSize = 16
IntSize_IS_32 IntSize = 32
IntSize_IS_64 IntSize = 64
)
// Enum value maps for IntSize.
var (
IntSize_name = map[int32]string{
0: "IS_DEFAULT",
8: "IS_8",
16: "IS_16",
32: "IS_32",
64: "IS_64",
}
IntSize_value = map[string]int32{
"IS_DEFAULT": 0,
"IS_8": 8,
"IS_16": 16,
"IS_32": 32,
"IS_64": 64,
}
)
func (x IntSize) Enum() *IntSize {
p := new(IntSize)
*p = x
return p
}
func (x IntSize) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IntSize) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_nanopb_proto_enumTypes[1].Descriptor()
}
func (IntSize) Type() protoreflect.EnumType {
return &file_meshtastic_nanopb_proto_enumTypes[1]
}
func (x IntSize) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *IntSize) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = IntSize(num)
return nil
}
// Deprecated: Use IntSize.Descriptor instead.
func (IntSize) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_nanopb_proto_rawDescGZIP(), []int{1}
}
type TypenameMangling int32
const (
TypenameMangling_M_NONE TypenameMangling = 0 // Default, no typename mangling
TypenameMangling_M_STRIP_PACKAGE TypenameMangling = 1 // Strip current package name
TypenameMangling_M_FLATTEN TypenameMangling = 2 // Only use last path component
TypenameMangling_M_PACKAGE_INITIALS TypenameMangling = 3 // Replace the package name by the initials
)
// Enum value maps for TypenameMangling.
var (
TypenameMangling_name = map[int32]string{
0: "M_NONE",
1: "M_STRIP_PACKAGE",
2: "M_FLATTEN",
3: "M_PACKAGE_INITIALS",
}
TypenameMangling_value = map[string]int32{
"M_NONE": 0,
"M_STRIP_PACKAGE": 1,
"M_FLATTEN": 2,
"M_PACKAGE_INITIALS": 3,
}
)
func (x TypenameMangling) Enum() *TypenameMangling {
p := new(TypenameMangling)
*p = x
return p
}
func (x TypenameMangling) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypenameMangling) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_nanopb_proto_enumTypes[2].Descriptor()
}
func (TypenameMangling) Type() protoreflect.EnumType {
return &file_meshtastic_nanopb_proto_enumTypes[2]
}
func (x TypenameMangling) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *TypenameMangling) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = TypenameMangling(num)
return nil
}
// Deprecated: Use TypenameMangling.Descriptor instead.
func (TypenameMangling) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_nanopb_proto_rawDescGZIP(), []int{2}
}
type DescriptorSize int32
const (
DescriptorSize_DS_AUTO DescriptorSize = 0 // Select minimal size based on field type
DescriptorSize_DS_1 DescriptorSize = 1 // 1 word; up to 15 byte fields, no arrays
DescriptorSize_DS_2 DescriptorSize = 2 // 2 words; up to 4095 byte fields, 4095 entry arrays
DescriptorSize_DS_4 DescriptorSize = 4 // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays
DescriptorSize_DS_8 DescriptorSize = 8 // 8 words; up to 2^32-1 entry arrays
)
// Enum value maps for DescriptorSize.
var (
DescriptorSize_name = map[int32]string{
0: "DS_AUTO",
1: "DS_1",
2: "DS_2",
4: "DS_4",
8: "DS_8",
}
DescriptorSize_value = map[string]int32{
"DS_AUTO": 0,
"DS_1": 1,
"DS_2": 2,
"DS_4": 4,
"DS_8": 8,
}
)
func (x DescriptorSize) Enum() *DescriptorSize {
p := new(DescriptorSize)
*p = x
return p
}
func (x DescriptorSize) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DescriptorSize) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_nanopb_proto_enumTypes[3].Descriptor()
}
func (DescriptorSize) Type() protoreflect.EnumType {
return &file_meshtastic_nanopb_proto_enumTypes[3]
}
func (x DescriptorSize) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *DescriptorSize) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = DescriptorSize(num)
return nil
}
// Deprecated: Use DescriptorSize.Descriptor instead.
func (DescriptorSize) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_nanopb_proto_rawDescGZIP(), []int{3}
}
// This is the inner options message, which basically defines options for
// a field. When it is used in message or file scope, it applies to all
// fields.
type NanoPBOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Allocated size for 'bytes' and 'string' fields.
// For string fields, this should include the space for null terminator.
MaxSize *int32 `protobuf:"varint,1,opt,name=max_size,json=maxSize" json:"max_size,omitempty"`
// Maximum length for 'string' fields. Setting this is equivalent
// to setting max_size to a value of length+1.
MaxLength *int32 `protobuf:"varint,14,opt,name=max_length,json=maxLength" json:"max_length,omitempty"`
// Allocated number of entries in arrays ('repeated' fields)
MaxCount *int32 `protobuf:"varint,2,opt,name=max_count,json=maxCount" json:"max_count,omitempty"`
// Size of integer fields. Can save some memory if you don't need
// full 32 bits for the value.
IntSize *IntSize `protobuf:"varint,7,opt,name=int_size,json=intSize,enum=IntSize,def=0" json:"int_size,omitempty"`
// Force type of field (callback or static allocation)
Type *FieldType `protobuf:"varint,3,opt,name=type,enum=FieldType,def=0" json:"type,omitempty"`
// Use long names for enums, i.e. EnumName_EnumValue.
LongNames *bool `protobuf:"varint,4,opt,name=long_names,json=longNames,def=1" json:"long_names,omitempty"`
// Add 'packed' attribute to generated structs.
// Note: this cannot be used on CPUs that break on unaligned
// accesses to variables.
PackedStruct *bool `protobuf:"varint,5,opt,name=packed_struct,json=packedStruct,def=0" json:"packed_struct,omitempty"`
// Add 'packed' attribute to generated enums.
PackedEnum *bool `protobuf:"varint,10,opt,name=packed_enum,json=packedEnum,def=0" json:"packed_enum,omitempty"`
// Skip this message
SkipMessage *bool `protobuf:"varint,6,opt,name=skip_message,json=skipMessage,def=0" json:"skip_message,omitempty"`
// Generate oneof fields as normal optional fields instead of union.
NoUnions *bool `protobuf:"varint,8,opt,name=no_unions,json=noUnions,def=0" json:"no_unions,omitempty"`
// integer type tag for a message
Msgid *uint32 `protobuf:"varint,9,opt,name=msgid" json:"msgid,omitempty"`
// decode oneof as anonymous union
AnonymousOneof *bool `protobuf:"varint,11,opt,name=anonymous_oneof,json=anonymousOneof,def=0" json:"anonymous_oneof,omitempty"`
// Proto3 singular field does not generate a "has_" flag
Proto3 *bool `protobuf:"varint,12,opt,name=proto3,def=0" json:"proto3,omitempty"`
// Force proto3 messages to have no "has_" flag.
// This was default behavior until nanopb-0.4.0.
Proto3SingularMsgs *bool `protobuf:"varint,21,opt,name=proto3_singular_msgs,json=proto3SingularMsgs,def=0" json:"proto3_singular_msgs,omitempty"`
// Generate an enum->string mapping function (can take up lots of space).
EnumToString *bool `protobuf:"varint,13,opt,name=enum_to_string,json=enumToString,def=0" json:"enum_to_string,omitempty"`
// Generate bytes arrays with fixed length
FixedLength *bool `protobuf:"varint,15,opt,name=fixed_length,json=fixedLength,def=0" json:"fixed_length,omitempty"`
// Generate repeated field with fixed count
FixedCount *bool `protobuf:"varint,16,opt,name=fixed_count,json=fixedCount,def=0" json:"fixed_count,omitempty"`
// Generate message-level callback that is called before decoding submessages.
// This can be used to set callback fields for submsgs inside oneofs.
SubmsgCallback *bool `protobuf:"varint,22,opt,name=submsg_callback,json=submsgCallback,def=0" json:"submsg_callback,omitempty"`
// Shorten or remove package names from type names.
// This option applies only on the file level.
MangleNames *TypenameMangling `protobuf:"varint,17,opt,name=mangle_names,json=mangleNames,enum=TypenameMangling,def=0" json:"mangle_names,omitempty"`
// Data type for storage associated with callback fields.
CallbackDatatype *string `protobuf:"bytes,18,opt,name=callback_datatype,json=callbackDatatype,def=pb_callback_t" json:"callback_datatype,omitempty"`
// Callback function used for encoding and decoding.
// Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
// structure. This is still supported, but does not work inside e.g. oneof or pointer
// fields. Instead, a new method allows specifying a per-message callback that
// will be called for all callback fields in a message type.
CallbackFunction *string `protobuf:"bytes,19,opt,name=callback_function,json=callbackFunction,def=pb_default_field_callback" json:"callback_function,omitempty"`
// Select the size of field descriptors. This option has to be defined
// for the whole message, not per-field. Usually automatic selection is
// ok, but if it results in compilation errors you can increase the field
// size here.
Descriptorsize *DescriptorSize `protobuf:"varint,20,opt,name=descriptorsize,enum=DescriptorSize,def=0" json:"descriptorsize,omitempty"`
// Set default value for has_ fields.
DefaultHas *bool `protobuf:"varint,23,opt,name=default_has,json=defaultHas,def=0" json:"default_has,omitempty"`
// Extra files to include in generated `.pb.h`
Include []string `protobuf:"bytes,24,rep,name=include" json:"include,omitempty"`
// Automatic includes to exclude from generated `.pb.h`
// Same as nanopb_generator.py command line flag -x.
Exclude []string `protobuf:"bytes,26,rep,name=exclude" json:"exclude,omitempty"`
// Package name that applies only for nanopb.
Package *string `protobuf:"bytes,25,opt,name=package" json:"package,omitempty"`
// Override type of the field in generated C code. Only to be used with related field types
TypeOverride *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,27,opt,name=type_override,json=typeOverride,enum=google.protobuf.FieldDescriptorProto_Type" json:"type_override,omitempty"`
// Due to historical reasons, nanopb orders fields in structs by their tag number
// instead of the order in .proto. Set this to false to keep the .proto order.
// The default value will probably change to false in nanopb-0.5.0.
SortByTag *bool `protobuf:"varint,28,opt,name=sort_by_tag,json=sortByTag,def=1" json:"sort_by_tag,omitempty"`
// Set the FT_DEFAULT field conversion strategy.
// A field that can become a static member of a c struct (e.g. int, bool, etc)
// will be a a static field.
// Fields with dynamic length are converted to either a pointer or a callback.
FallbackType *FieldType `protobuf:"varint,29,opt,name=fallback_type,json=fallbackType,enum=FieldType,def=1" json:"fallback_type,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
// Default values for NanoPBOptions fields.
const (
Default_NanoPBOptions_IntSize = IntSize_IS_DEFAULT
Default_NanoPBOptions_Type = FieldType_FT_DEFAULT
Default_NanoPBOptions_LongNames = bool(true)
Default_NanoPBOptions_PackedStruct = bool(false)
Default_NanoPBOptions_PackedEnum = bool(false)
Default_NanoPBOptions_SkipMessage = bool(false)
Default_NanoPBOptions_NoUnions = bool(false)
Default_NanoPBOptions_AnonymousOneof = bool(false)
Default_NanoPBOptions_Proto3 = bool(false)
Default_NanoPBOptions_Proto3SingularMsgs = bool(false)
Default_NanoPBOptions_EnumToString = bool(false)
Default_NanoPBOptions_FixedLength = bool(false)
Default_NanoPBOptions_FixedCount = bool(false)
Default_NanoPBOptions_SubmsgCallback = bool(false)
Default_NanoPBOptions_MangleNames = TypenameMangling_M_NONE
Default_NanoPBOptions_CallbackDatatype = string("pb_callback_t")
Default_NanoPBOptions_CallbackFunction = string("pb_default_field_callback")
Default_NanoPBOptions_Descriptorsize = DescriptorSize_DS_AUTO
Default_NanoPBOptions_DefaultHas = bool(false)
Default_NanoPBOptions_SortByTag = bool(true)
Default_NanoPBOptions_FallbackType = FieldType_FT_CALLBACK
)
func (x *NanoPBOptions) Reset() {
*x = NanoPBOptions{}
mi := &file_meshtastic_nanopb_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NanoPBOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NanoPBOptions) ProtoMessage() {}
func (x *NanoPBOptions) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_nanopb_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 NanoPBOptions.ProtoReflect.Descriptor instead.
func (*NanoPBOptions) Descriptor() ([]byte, []int) {
return file_meshtastic_nanopb_proto_rawDescGZIP(), []int{0}
}
func (x *NanoPBOptions) GetMaxSize() int32 {
if x != nil && x.MaxSize != nil {
return *x.MaxSize
}
return 0
}
func (x *NanoPBOptions) GetMaxLength() int32 {
if x != nil && x.MaxLength != nil {
return *x.MaxLength
}
return 0
}
func (x *NanoPBOptions) GetMaxCount() int32 {
if x != nil && x.MaxCount != nil {
return *x.MaxCount
}
return 0
}
func (x *NanoPBOptions) GetIntSize() IntSize {
if x != nil && x.IntSize != nil {
return *x.IntSize
}
return Default_NanoPBOptions_IntSize
}
func (x *NanoPBOptions) GetType() FieldType {
if x != nil && x.Type != nil {
return *x.Type
}
return Default_NanoPBOptions_Type
}
func (x *NanoPBOptions) GetLongNames() bool {
if x != nil && x.LongNames != nil {
return *x.LongNames
}
return Default_NanoPBOptions_LongNames
}
func (x *NanoPBOptions) GetPackedStruct() bool {
if x != nil && x.PackedStruct != nil {
return *x.PackedStruct
}
return Default_NanoPBOptions_PackedStruct
}
func (x *NanoPBOptions) GetPackedEnum() bool {
if x != nil && x.PackedEnum != nil {
return *x.PackedEnum
}
return Default_NanoPBOptions_PackedEnum
}
func (x *NanoPBOptions) GetSkipMessage() bool {
if x != nil && x.SkipMessage != nil {
return *x.SkipMessage
}
return Default_NanoPBOptions_SkipMessage
}
func (x *NanoPBOptions) GetNoUnions() bool {
if x != nil && x.NoUnions != nil {
return *x.NoUnions
}
return Default_NanoPBOptions_NoUnions
}
func (x *NanoPBOptions) GetMsgid() uint32 {
if x != nil && x.Msgid != nil {
return *x.Msgid
}
return 0
}
func (x *NanoPBOptions) GetAnonymousOneof() bool {
if x != nil && x.AnonymousOneof != nil {
return *x.AnonymousOneof
}
return Default_NanoPBOptions_AnonymousOneof
}
func (x *NanoPBOptions) GetProto3() bool {
if x != nil && x.Proto3 != nil {
return *x.Proto3
}
return Default_NanoPBOptions_Proto3
}
func (x *NanoPBOptions) GetProto3SingularMsgs() bool {
if x != nil && x.Proto3SingularMsgs != nil {
return *x.Proto3SingularMsgs
}
return Default_NanoPBOptions_Proto3SingularMsgs
}
func (x *NanoPBOptions) GetEnumToString() bool {
if x != nil && x.EnumToString != nil {
return *x.EnumToString
}
return Default_NanoPBOptions_EnumToString
}
func (x *NanoPBOptions) GetFixedLength() bool {
if x != nil && x.FixedLength != nil {
return *x.FixedLength
}
return Default_NanoPBOptions_FixedLength
}
func (x *NanoPBOptions) GetFixedCount() bool {
if x != nil && x.FixedCount != nil {
return *x.FixedCount
}
return Default_NanoPBOptions_FixedCount
}
func (x *NanoPBOptions) GetSubmsgCallback() bool {
if x != nil && x.SubmsgCallback != nil {
return *x.SubmsgCallback
}
return Default_NanoPBOptions_SubmsgCallback
}
func (x *NanoPBOptions) GetMangleNames() TypenameMangling {
if x != nil && x.MangleNames != nil {
return *x.MangleNames
}
return Default_NanoPBOptions_MangleNames
}
func (x *NanoPBOptions) GetCallbackDatatype() string {
if x != nil && x.CallbackDatatype != nil {
return *x.CallbackDatatype
}
return Default_NanoPBOptions_CallbackDatatype
}
func (x *NanoPBOptions) GetCallbackFunction() string {
if x != nil && x.CallbackFunction != nil {
return *x.CallbackFunction
}
return Default_NanoPBOptions_CallbackFunction
}
func (x *NanoPBOptions) GetDescriptorsize() DescriptorSize {
if x != nil && x.Descriptorsize != nil {
return *x.Descriptorsize
}
return Default_NanoPBOptions_Descriptorsize
}
func (x *NanoPBOptions) GetDefaultHas() bool {
if x != nil && x.DefaultHas != nil {
return *x.DefaultHas
}
return Default_NanoPBOptions_DefaultHas
}
func (x *NanoPBOptions) GetInclude() []string {
if x != nil {
return x.Include
}
return nil
}
func (x *NanoPBOptions) GetExclude() []string {
if x != nil {
return x.Exclude
}
return nil
}
func (x *NanoPBOptions) GetPackage() string {
if x != nil && x.Package != nil {
return *x.Package
}
return ""
}
func (x *NanoPBOptions) GetTypeOverride() descriptorpb.FieldDescriptorProto_Type {
if x != nil && x.TypeOverride != nil {
return *x.TypeOverride
}
return descriptorpb.FieldDescriptorProto_Type(1)
}
func (x *NanoPBOptions) GetSortByTag() bool {
if x != nil && x.SortByTag != nil {
return *x.SortByTag
}
return Default_NanoPBOptions_SortByTag
}
func (x *NanoPBOptions) GetFallbackType() FieldType {
if x != nil && x.FallbackType != nil {
return *x.FallbackType
}
return Default_NanoPBOptions_FallbackType
}
var file_meshtastic_nanopb_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_fileopt",
Tag: "bytes,1010,opt,name=nanopb_fileopt",
Filename: "meshtastic/nanopb.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_msgopt",
Tag: "bytes,1010,opt,name=nanopb_msgopt",
Filename: "meshtastic/nanopb.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_enumopt",
Tag: "bytes,1010,opt,name=nanopb_enumopt",
Filename: "meshtastic/nanopb.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb",
Tag: "bytes,1010,opt,name=nanopb",
Filename: "meshtastic/nanopb.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional NanoPBOptions nanopb_fileopt = 1010;
E_NanopbFileopt = &file_meshtastic_nanopb_proto_extTypes[0]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional NanoPBOptions nanopb_msgopt = 1010;
E_NanopbMsgopt = &file_meshtastic_nanopb_proto_extTypes[1]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional NanoPBOptions nanopb_enumopt = 1010;
E_NanopbEnumopt = &file_meshtastic_nanopb_proto_extTypes[2]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional NanoPBOptions nanopb = 1010;
E_Nanopb = &file_meshtastic_nanopb_proto_extTypes[3]
)
var File_meshtastic_nanopb_proto protoreflect.FileDescriptor
const file_meshtastic_nanopb_proto_rawDesc = "" +
"\n" +
"\x17meshtastic/nanopb.proto\x1a google/protobuf/descriptor.proto\"\x86\n" +
"\n" +
"\rNanoPBOptions\x12\x19\n" +
"\bmax_size\x18\x01 \x01(\x05R\amaxSize\x12\x1d\n" +
"\n" +
"max_length\x18\x0e \x01(\x05R\tmaxLength\x12\x1b\n" +
"\tmax_count\x18\x02 \x01(\x05R\bmaxCount\x12/\n" +
"\bint_size\x18\a \x01(\x0e2\b.IntSize:\n" +
"IS_DEFAULTR\aintSize\x12*\n" +
"\x04type\x18\x03 \x01(\x0e2\n" +
".FieldType:\n" +
"FT_DEFAULTR\x04type\x12#\n" +
"\n" +
"long_names\x18\x04 \x01(\b:\x04trueR\tlongNames\x12*\n" +
"\rpacked_struct\x18\x05 \x01(\b:\x05falseR\fpackedStruct\x12&\n" +
"\vpacked_enum\x18\n" +
" \x01(\b:\x05falseR\n" +
"packedEnum\x12(\n" +
"\fskip_message\x18\x06 \x01(\b:\x05falseR\vskipMessage\x12\"\n" +
"\tno_unions\x18\b \x01(\b:\x05falseR\bnoUnions\x12\x14\n" +
"\x05msgid\x18\t \x01(\rR\x05msgid\x12.\n" +
"\x0fanonymous_oneof\x18\v \x01(\b:\x05falseR\x0eanonymousOneof\x12\x1d\n" +
"\x06proto3\x18\f \x01(\b:\x05falseR\x06proto3\x127\n" +
"\x14proto3_singular_msgs\x18\x15 \x01(\b:\x05falseR\x12proto3SingularMsgs\x12+\n" +
"\x0eenum_to_string\x18\r \x01(\b:\x05falseR\fenumToString\x12(\n" +
"\ffixed_length\x18\x0f \x01(\b:\x05falseR\vfixedLength\x12&\n" +
"\vfixed_count\x18\x10 \x01(\b:\x05falseR\n" +
"fixedCount\x12.\n" +
"\x0fsubmsg_callback\x18\x16 \x01(\b:\x05falseR\x0esubmsgCallback\x12<\n" +
"\fmangle_names\x18\x11 \x01(\x0e2\x11.TypenameMangling:\x06M_NONER\vmangleNames\x12:\n" +
"\x11callback_datatype\x18\x12 \x01(\t:\rpb_callback_tR\x10callbackDatatype\x12F\n" +
"\x11callback_function\x18\x13 \x01(\t:\x19pb_default_field_callbackR\x10callbackFunction\x12@\n" +
"\x0edescriptorsize\x18\x14 \x01(\x0e2\x0f.DescriptorSize:\aDS_AUTOR\x0edescriptorsize\x12&\n" +
"\vdefault_has\x18\x17 \x01(\b:\x05falseR\n" +
"defaultHas\x12\x18\n" +
"\ainclude\x18\x18 \x03(\tR\ainclude\x12\x18\n" +
"\aexclude\x18\x1a \x03(\tR\aexclude\x12\x18\n" +
"\apackage\x18\x19 \x01(\tR\apackage\x12O\n" +
"\rtype_override\x18\x1b \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\ftypeOverride\x12$\n" +
"\vsort_by_tag\x18\x1c \x01(\b:\x04trueR\tsortByTag\x12<\n" +
"\rfallback_type\x18\x1d \x01(\x0e2\n" +
".FieldType:\vFT_CALLBACKR\ffallbackType*i\n" +
"\tFieldType\x12\x0e\n" +
"\n" +
"FT_DEFAULT\x10\x00\x12\x0f\n" +
"\vFT_CALLBACK\x10\x01\x12\x0e\n" +
"\n" +
"FT_POINTER\x10\x04\x12\r\n" +
"\tFT_STATIC\x10\x02\x12\r\n" +
"\tFT_IGNORE\x10\x03\x12\r\n" +
"\tFT_INLINE\x10\x05*D\n" +
"\aIntSize\x12\x0e\n" +
"\n" +
"IS_DEFAULT\x10\x00\x12\b\n" +
"\x04IS_8\x10\b\x12\t\n" +
"\x05IS_16\x10\x10\x12\t\n" +
"\x05IS_32\x10 \x12\t\n" +
"\x05IS_64\x10@*Z\n" +
"\x10TypenameMangling\x12\n" +
"\n" +
"\x06M_NONE\x10\x00\x12\x13\n" +
"\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n" +
"\tM_FLATTEN\x10\x02\x12\x16\n" +
"\x12M_PACKAGE_INITIALS\x10\x03*E\n" +
"\x0eDescriptorSize\x12\v\n" +
"\aDS_AUTO\x10\x00\x12\b\n" +
"\x04DS_1\x10\x01\x12\b\n" +
"\x04DS_2\x10\x02\x12\b\n" +
"\x04DS_4\x10\x04\x12\b\n" +
"\x04DS_8\x10\b:T\n" +
"\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\rnanopbFileopt:U\n" +
"\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\fnanopbMsgopt:T\n" +
"\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\rnanopbEnumopt:F\n" +
"\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\x06nanopbB;\n" +
"\x18fi.kapsi.koti.jpa.nanopbZ\x1fmeshstream/generated/meshtastic"
var (
file_meshtastic_nanopb_proto_rawDescOnce sync.Once
file_meshtastic_nanopb_proto_rawDescData []byte
)
func file_meshtastic_nanopb_proto_rawDescGZIP() []byte {
file_meshtastic_nanopb_proto_rawDescOnce.Do(func() {
file_meshtastic_nanopb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_nanopb_proto_rawDesc), len(file_meshtastic_nanopb_proto_rawDesc)))
})
return file_meshtastic_nanopb_proto_rawDescData
}
var file_meshtastic_nanopb_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_meshtastic_nanopb_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_nanopb_proto_goTypes = []any{
(FieldType)(0), // 0: FieldType
(IntSize)(0), // 1: IntSize
(TypenameMangling)(0), // 2: TypenameMangling
(DescriptorSize)(0), // 3: DescriptorSize
(*NanoPBOptions)(nil), // 4: NanoPBOptions
(descriptorpb.FieldDescriptorProto_Type)(0), // 5: google.protobuf.FieldDescriptorProto.Type
(*descriptorpb.FileOptions)(nil), // 6: google.protobuf.FileOptions
(*descriptorpb.MessageOptions)(nil), // 7: google.protobuf.MessageOptions
(*descriptorpb.EnumOptions)(nil), // 8: google.protobuf.EnumOptions
(*descriptorpb.FieldOptions)(nil), // 9: google.protobuf.FieldOptions
}
var file_meshtastic_nanopb_proto_depIdxs = []int32{
1, // 0: NanoPBOptions.int_size:type_name -> IntSize
0, // 1: NanoPBOptions.type:type_name -> FieldType
2, // 2: NanoPBOptions.mangle_names:type_name -> TypenameMangling
3, // 3: NanoPBOptions.descriptorsize:type_name -> DescriptorSize
5, // 4: NanoPBOptions.type_override:type_name -> google.protobuf.FieldDescriptorProto.Type
0, // 5: NanoPBOptions.fallback_type:type_name -> FieldType
6, // 6: nanopb_fileopt:extendee -> google.protobuf.FileOptions
7, // 7: nanopb_msgopt:extendee -> google.protobuf.MessageOptions
8, // 8: nanopb_enumopt:extendee -> google.protobuf.EnumOptions
9, // 9: nanopb:extendee -> google.protobuf.FieldOptions
4, // 10: nanopb_fileopt:type_name -> NanoPBOptions
4, // 11: nanopb_msgopt:type_name -> NanoPBOptions
4, // 12: nanopb_enumopt:type_name -> NanoPBOptions
4, // 13: nanopb:type_name -> NanoPBOptions
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
10, // [10:14] is the sub-list for extension type_name
6, // [6:10] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_meshtastic_nanopb_proto_init() }
func file_meshtastic_nanopb_proto_init() {
if File_meshtastic_nanopb_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_nanopb_proto_rawDesc), len(file_meshtastic_nanopb_proto_rawDesc)),
NumEnums: 4,
NumMessages: 1,
NumExtensions: 4,
NumServices: 0,
},
GoTypes: file_meshtastic_nanopb_proto_goTypes,
DependencyIndexes: file_meshtastic_nanopb_proto_depIdxs,
EnumInfos: file_meshtastic_nanopb_proto_enumTypes,
MessageInfos: file_meshtastic_nanopb_proto_msgTypes,
ExtensionInfos: file_meshtastic_nanopb_proto_extTypes,
}.Build()
File_meshtastic_nanopb_proto = out.File
file_meshtastic_nanopb_proto_goTypes = nil
file_meshtastic_nanopb_proto_depIdxs = nil
}
+146
View File
@@ -0,0 +1,146 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/paxcount.proto
package meshtastic
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)
)
// TODO: REPLACE
type Paxcount struct {
state protoimpl.MessageState `protogen:"open.v1"`
// seen Wifi devices
Wifi uint32 `protobuf:"varint,1,opt,name=wifi,proto3" json:"wifi,omitempty"`
// Seen BLE devices
Ble uint32 `protobuf:"varint,2,opt,name=ble,proto3" json:"ble,omitempty"`
// Uptime in seconds
Uptime uint32 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Paxcount) Reset() {
*x = Paxcount{}
mi := &file_meshtastic_paxcount_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Paxcount) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Paxcount) ProtoMessage() {}
func (x *Paxcount) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_paxcount_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 Paxcount.ProtoReflect.Descriptor instead.
func (*Paxcount) Descriptor() ([]byte, []int) {
return file_meshtastic_paxcount_proto_rawDescGZIP(), []int{0}
}
func (x *Paxcount) GetWifi() uint32 {
if x != nil {
return x.Wifi
}
return 0
}
func (x *Paxcount) GetBle() uint32 {
if x != nil {
return x.Ble
}
return 0
}
func (x *Paxcount) GetUptime() uint32 {
if x != nil {
return x.Uptime
}
return 0
}
var File_meshtastic_paxcount_proto protoreflect.FileDescriptor
const file_meshtastic_paxcount_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/paxcount.proto\x12\n" +
"meshtastic\"H\n" +
"\bPaxcount\x12\x12\n" +
"\x04wifi\x18\x01 \x01(\rR\x04wifi\x12\x10\n" +
"\x03ble\x18\x02 \x01(\rR\x03ble\x12\x16\n" +
"\x06uptime\x18\x03 \x01(\rR\x06uptimeB`\n" +
"\x13com.geeksville.meshB\x0ePaxcountProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_paxcount_proto_rawDescOnce sync.Once
file_meshtastic_paxcount_proto_rawDescData []byte
)
func file_meshtastic_paxcount_proto_rawDescGZIP() []byte {
file_meshtastic_paxcount_proto_rawDescOnce.Do(func() {
file_meshtastic_paxcount_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_paxcount_proto_rawDesc), len(file_meshtastic_paxcount_proto_rawDesc)))
})
return file_meshtastic_paxcount_proto_rawDescData
}
var file_meshtastic_paxcount_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_paxcount_proto_goTypes = []any{
(*Paxcount)(nil), // 0: meshtastic.Paxcount
}
var file_meshtastic_paxcount_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_meshtastic_paxcount_proto_init() }
func file_meshtastic_paxcount_proto_init() {
if File_meshtastic_paxcount_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_paxcount_proto_rawDesc), len(file_meshtastic_paxcount_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_paxcount_proto_goTypes,
DependencyIndexes: file_meshtastic_paxcount_proto_depIdxs,
MessageInfos: file_meshtastic_paxcount_proto_msgTypes,
}.Build()
File_meshtastic_paxcount_proto = out.File
file_meshtastic_paxcount_proto_goTypes = nil
file_meshtastic_paxcount_proto_depIdxs = nil
}
+340
View File
@@ -0,0 +1,340 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/portnums.proto
package meshtastic
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)
)
// For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a
// unique 'portnum' for their application.
// If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
// master table.
// PortNums should be assigned in the following range:
// 0-63 Core Meshtastic use, do not use for third party apps
// 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application
// 256-511 Use one of these portnums for your private applications that you don't want to register publically
// All other values are reserved.
// Note: This was formerly a Type enum named 'typ' with the same id #
// We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
// This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
type PortNum int32
const (
// Deprecated: do not use in new code (formerly called OPAQUE)
// A message sent from a device outside of the mesh, in a form the mesh does not understand
// NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
// ENCODING: binary undefined
PortNum_UNKNOWN_APP PortNum = 0
// A simple UTF-8 text message, which even the little micros in the mesh
// can understand and show on their screen eventually in some circumstances
// even signal might send messages in this form (see below)
// ENCODING: UTF-8 Plaintext (?)
PortNum_TEXT_MESSAGE_APP PortNum = 1
// Reserved for built-in GPIO/example app.
// See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
// ENCODING: Protobuf
PortNum_REMOTE_HARDWARE_APP PortNum = 2
// The built-in position messaging app.
// Payload is a Position message.
// ENCODING: Protobuf
PortNum_POSITION_APP PortNum = 3
// The built-in user info app.
// Payload is a User message.
// ENCODING: Protobuf
PortNum_NODEINFO_APP PortNum = 4
// Protocol control packets for mesh protocol use.
// Payload is a Routing message.
// ENCODING: Protobuf
PortNum_ROUTING_APP PortNum = 5
// Admin control packets.
// Payload is a AdminMessage message.
// ENCODING: Protobuf
PortNum_ADMIN_APP PortNum = 6
// Compressed TEXT_MESSAGE payloads.
// ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression
// NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed
// payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress
// any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP.
PortNum_TEXT_MESSAGE_COMPRESSED_APP PortNum = 7
// Waypoint payloads.
// Payload is a Waypoint message.
// ENCODING: Protobuf
PortNum_WAYPOINT_APP PortNum = 8
// Audio Payloads.
// Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now
// ENCODING: codec2 audio frames
// NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate.
// This marker comes from the 'moduleConfig.audio.bitrate' enum minus one.
PortNum_AUDIO_APP PortNum = 9
// Same as Text Message but originating from Detection Sensor Module.
// NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9
PortNum_DETECTION_SENSOR_APP PortNum = 10
// Same as Text Message but used for critical alerts.
PortNum_ALERT_APP PortNum = 11
// Provides a 'ping' service that replies to any packet it receives.
// Also serves as a small example module.
// ENCODING: ASCII Plaintext
PortNum_REPLY_APP PortNum = 32
// Used for the python IP tunnel feature
// ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on.
PortNum_IP_TUNNEL_APP PortNum = 33
// Paxcounter lib included in the firmware
// ENCODING: protobuf
PortNum_PAXCOUNTER_APP PortNum = 34
// Provides a hardware serial interface to send and receive from the Meshtastic network.
// Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
// network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
// Maximum packet size of 240 bytes.
// Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.
// ENCODING: binary undefined
PortNum_SERIAL_APP PortNum = 64
// STORE_FORWARD_APP (Work in Progress)
// Maintained by Jm Casler (MC Hamster) : jm@casler.org
// ENCODING: Protobuf
PortNum_STORE_FORWARD_APP PortNum = 65
// Optional port for messages for the range test module.
// ENCODING: ASCII Plaintext
// NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9
PortNum_RANGE_TEST_APP PortNum = 66
// Provides a format to send and receive telemetry data from the Meshtastic network.
// Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
// ENCODING: Protobuf
PortNum_TELEMETRY_APP PortNum = 67
// Experimental tools for estimating node position without a GPS
// Maintained by Github user a-f-G-U-C (a Meshtastic contributor)
// Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS
// ENCODING: arrays of int64 fields
PortNum_ZPS_APP PortNum = 68
// Used to let multiple instances of Linux native applications communicate
// as if they did using their LoRa chip.
// Maintained by GitHub user GUVWAF.
// Project files at https://github.com/GUVWAF/Meshtasticator
// ENCODING: Protobuf (?)
PortNum_SIMULATOR_APP PortNum = 69
// Provides a traceroute functionality to show the route a packet towards
// a certain destination would take on the mesh. Contains a RouteDiscovery message as payload.
// ENCODING: Protobuf
PortNum_TRACEROUTE_APP PortNum = 70
// Aggregates edge info for the network by sending out a list of each node's neighbors
// ENCODING: Protobuf
PortNum_NEIGHBORINFO_APP PortNum = 71
// ATAK Plugin
// Portnum for payloads from the official Meshtastic ATAK plugin
PortNum_ATAK_PLUGIN PortNum = 72
// Provides unencrypted information about a node for consumption by a map via MQTT
PortNum_MAP_REPORT_APP PortNum = 73
// PowerStress based monitoring support (for automated power consumption testing)
PortNum_POWERSTRESS_APP PortNum = 74
// Reticulum Network Stack Tunnel App
// ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface
PortNum_RETICULUM_TUNNEL_APP PortNum = 76
// Private applications should use portnums >= 256.
// To simplify initial development and testing you can use "PRIVATE_APP"
// in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh))
PortNum_PRIVATE_APP PortNum = 256
// ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
// ENCODING: libcotshrink
PortNum_ATAK_FORWARDER PortNum = 257
// Currently we limit port nums to no higher than this value
PortNum_MAX PortNum = 511
)
// Enum value maps for PortNum.
var (
PortNum_name = map[int32]string{
0: "UNKNOWN_APP",
1: "TEXT_MESSAGE_APP",
2: "REMOTE_HARDWARE_APP",
3: "POSITION_APP",
4: "NODEINFO_APP",
5: "ROUTING_APP",
6: "ADMIN_APP",
7: "TEXT_MESSAGE_COMPRESSED_APP",
8: "WAYPOINT_APP",
9: "AUDIO_APP",
10: "DETECTION_SENSOR_APP",
11: "ALERT_APP",
32: "REPLY_APP",
33: "IP_TUNNEL_APP",
34: "PAXCOUNTER_APP",
64: "SERIAL_APP",
65: "STORE_FORWARD_APP",
66: "RANGE_TEST_APP",
67: "TELEMETRY_APP",
68: "ZPS_APP",
69: "SIMULATOR_APP",
70: "TRACEROUTE_APP",
71: "NEIGHBORINFO_APP",
72: "ATAK_PLUGIN",
73: "MAP_REPORT_APP",
74: "POWERSTRESS_APP",
76: "RETICULUM_TUNNEL_APP",
256: "PRIVATE_APP",
257: "ATAK_FORWARDER",
511: "MAX",
}
PortNum_value = map[string]int32{
"UNKNOWN_APP": 0,
"TEXT_MESSAGE_APP": 1,
"REMOTE_HARDWARE_APP": 2,
"POSITION_APP": 3,
"NODEINFO_APP": 4,
"ROUTING_APP": 5,
"ADMIN_APP": 6,
"TEXT_MESSAGE_COMPRESSED_APP": 7,
"WAYPOINT_APP": 8,
"AUDIO_APP": 9,
"DETECTION_SENSOR_APP": 10,
"ALERT_APP": 11,
"REPLY_APP": 32,
"IP_TUNNEL_APP": 33,
"PAXCOUNTER_APP": 34,
"SERIAL_APP": 64,
"STORE_FORWARD_APP": 65,
"RANGE_TEST_APP": 66,
"TELEMETRY_APP": 67,
"ZPS_APP": 68,
"SIMULATOR_APP": 69,
"TRACEROUTE_APP": 70,
"NEIGHBORINFO_APP": 71,
"ATAK_PLUGIN": 72,
"MAP_REPORT_APP": 73,
"POWERSTRESS_APP": 74,
"RETICULUM_TUNNEL_APP": 76,
"PRIVATE_APP": 256,
"ATAK_FORWARDER": 257,
"MAX": 511,
}
)
func (x PortNum) Enum() *PortNum {
p := new(PortNum)
*p = x
return p
}
func (x PortNum) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PortNum) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_portnums_proto_enumTypes[0].Descriptor()
}
func (PortNum) Type() protoreflect.EnumType {
return &file_meshtastic_portnums_proto_enumTypes[0]
}
func (x PortNum) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PortNum.Descriptor instead.
func (PortNum) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_portnums_proto_rawDescGZIP(), []int{0}
}
var File_meshtastic_portnums_proto protoreflect.FileDescriptor
const file_meshtastic_portnums_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/portnums.proto\x12\n" +
"meshtastic*\xcb\x04\n" +
"\aPortNum\x12\x0f\n" +
"\vUNKNOWN_APP\x10\x00\x12\x14\n" +
"\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n" +
"\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n" +
"\fPOSITION_APP\x10\x03\x12\x10\n" +
"\fNODEINFO_APP\x10\x04\x12\x0f\n" +
"\vROUTING_APP\x10\x05\x12\r\n" +
"\tADMIN_APP\x10\x06\x12\x1f\n" +
"\x1bTEXT_MESSAGE_COMPRESSED_APP\x10\a\x12\x10\n" +
"\fWAYPOINT_APP\x10\b\x12\r\n" +
"\tAUDIO_APP\x10\t\x12\x18\n" +
"\x14DETECTION_SENSOR_APP\x10\n" +
"\x12\r\n" +
"\tALERT_APP\x10\v\x12\r\n" +
"\tREPLY_APP\x10 \x12\x11\n" +
"\rIP_TUNNEL_APP\x10!\x12\x12\n" +
"\x0ePAXCOUNTER_APP\x10\"\x12\x0e\n" +
"\n" +
"SERIAL_APP\x10@\x12\x15\n" +
"\x11STORE_FORWARD_APP\x10A\x12\x12\n" +
"\x0eRANGE_TEST_APP\x10B\x12\x11\n" +
"\rTELEMETRY_APP\x10C\x12\v\n" +
"\aZPS_APP\x10D\x12\x11\n" +
"\rSIMULATOR_APP\x10E\x12\x12\n" +
"\x0eTRACEROUTE_APP\x10F\x12\x14\n" +
"\x10NEIGHBORINFO_APP\x10G\x12\x0f\n" +
"\vATAK_PLUGIN\x10H\x12\x12\n" +
"\x0eMAP_REPORT_APP\x10I\x12\x13\n" +
"\x0fPOWERSTRESS_APP\x10J\x12\x18\n" +
"\x14RETICULUM_TUNNEL_APP\x10L\x12\x10\n" +
"\vPRIVATE_APP\x10\x80\x02\x12\x13\n" +
"\x0eATAK_FORWARDER\x10\x81\x02\x12\b\n" +
"\x03MAX\x10\xff\x03BZ\n" +
"\x13com.geeksville.meshB\bPortnumsZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_portnums_proto_rawDescOnce sync.Once
file_meshtastic_portnums_proto_rawDescData []byte
)
func file_meshtastic_portnums_proto_rawDescGZIP() []byte {
file_meshtastic_portnums_proto_rawDescOnce.Do(func() {
file_meshtastic_portnums_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_portnums_proto_rawDesc), len(file_meshtastic_portnums_proto_rawDesc)))
})
return file_meshtastic_portnums_proto_rawDescData
}
var file_meshtastic_portnums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_portnums_proto_goTypes = []any{
(PortNum)(0), // 0: meshtastic.PortNum
}
var file_meshtastic_portnums_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_meshtastic_portnums_proto_init() }
func file_meshtastic_portnums_proto_init() {
if File_meshtastic_portnums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_portnums_proto_rawDesc), len(file_meshtastic_portnums_proto_rawDesc)),
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_portnums_proto_goTypes,
DependencyIndexes: file_meshtastic_portnums_proto_depIdxs,
EnumInfos: file_meshtastic_portnums_proto_enumTypes,
}.Build()
File_meshtastic_portnums_proto = out.File
file_meshtastic_portnums_proto_goTypes = nil
file_meshtastic_portnums_proto_depIdxs = nil
}
+418
View File
@@ -0,0 +1,418 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/powermon.proto
package meshtastic
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)
)
// Any significant power changing event in meshtastic should be tagged with a powermon state transition.
// If you are making new meshtastic features feel free to add new entries at the end of this definition.
type PowerMon_State int32
const (
PowerMon_None PowerMon_State = 0
PowerMon_CPU_DeepSleep PowerMon_State = 1
PowerMon_CPU_LightSleep PowerMon_State = 2
// The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only
// occasionally. In cases where that rail has multiple devices on it we usually want to have logging on
// the state of that rail as an independent record.
// For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.
//
// The log messages will be short and complete (see PowerMon.Event in the protobufs for details).
// something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states.
// (We use a bitmask for states so that if a log message gets lost it won't be fatal)
PowerMon_Vext1_On PowerMon_State = 4
PowerMon_Lora_RXOn PowerMon_State = 8
PowerMon_Lora_TXOn PowerMon_State = 16
PowerMon_Lora_RXActive PowerMon_State = 32
PowerMon_BT_On PowerMon_State = 64
PowerMon_LED_On PowerMon_State = 128
PowerMon_Screen_On PowerMon_State = 256
PowerMon_Screen_Drawing PowerMon_State = 512
PowerMon_Wifi_On PowerMon_State = 1024
// GPS is actively trying to find our location
// See GPSPowerState for more details
PowerMon_GPS_Active PowerMon_State = 2048
)
// Enum value maps for PowerMon_State.
var (
PowerMon_State_name = map[int32]string{
0: "None",
1: "CPU_DeepSleep",
2: "CPU_LightSleep",
4: "Vext1_On",
8: "Lora_RXOn",
16: "Lora_TXOn",
32: "Lora_RXActive",
64: "BT_On",
128: "LED_On",
256: "Screen_On",
512: "Screen_Drawing",
1024: "Wifi_On",
2048: "GPS_Active",
}
PowerMon_State_value = map[string]int32{
"None": 0,
"CPU_DeepSleep": 1,
"CPU_LightSleep": 2,
"Vext1_On": 4,
"Lora_RXOn": 8,
"Lora_TXOn": 16,
"Lora_RXActive": 32,
"BT_On": 64,
"LED_On": 128,
"Screen_On": 256,
"Screen_Drawing": 512,
"Wifi_On": 1024,
"GPS_Active": 2048,
}
)
func (x PowerMon_State) Enum() *PowerMon_State {
p := new(PowerMon_State)
*p = x
return p
}
func (x PowerMon_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PowerMon_State) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_powermon_proto_enumTypes[0].Descriptor()
}
func (PowerMon_State) Type() protoreflect.EnumType {
return &file_meshtastic_powermon_proto_enumTypes[0]
}
func (x PowerMon_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PowerMon_State.Descriptor instead.
func (PowerMon_State) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{0, 0}
}
// What operation would we like the UUT to perform.
// note: senders should probably set want_response in their request packets, so that they can know when the state
// machine has started processing their request
type PowerStressMessage_Opcode int32
const (
// Unset/unused
PowerStressMessage_UNSET PowerStressMessage_Opcode = 0
PowerStressMessage_PRINT_INFO PowerStressMessage_Opcode = 1 // Print board version slog and send an ack that we are alive and ready to process commands
PowerStressMessage_FORCE_QUIET PowerStressMessage_Opcode = 2 // Try to turn off all automatic processing of packets, screen, sleeping, etc (to make it easier to measure in isolation)
PowerStressMessage_END_QUIET PowerStressMessage_Opcode = 3 // Stop powerstress processing - probably by just rebooting the board
PowerStressMessage_SCREEN_ON PowerStressMessage_Opcode = 16 // Turn the screen on
PowerStressMessage_SCREEN_OFF PowerStressMessage_Opcode = 17 // Turn the screen off
PowerStressMessage_CPU_IDLE PowerStressMessage_Opcode = 32 // Let the CPU run but we assume mostly idling for num_seconds
PowerStressMessage_CPU_DEEPSLEEP PowerStressMessage_Opcode = 33 // Force deep sleep for FIXME seconds
PowerStressMessage_CPU_FULLON PowerStressMessage_Opcode = 34 // Spin the CPU as fast as possible for num_seconds
PowerStressMessage_LED_ON PowerStressMessage_Opcode = 48 // Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes)
PowerStressMessage_LED_OFF PowerStressMessage_Opcode = 49 // Force the LED off for num_seconds
PowerStressMessage_LORA_OFF PowerStressMessage_Opcode = 64 // Completely turn off the LORA radio for num_seconds
PowerStressMessage_LORA_TX PowerStressMessage_Opcode = 65 // Send Lora packets for num_seconds
PowerStressMessage_LORA_RX PowerStressMessage_Opcode = 66 // Receive Lora packets for num_seconds (node will be mostly just listening, unless an external agent is helping stress this by sending packets on the current channel)
PowerStressMessage_BT_OFF PowerStressMessage_Opcode = 80 // Turn off the BT radio for num_seconds
PowerStressMessage_BT_ON PowerStressMessage_Opcode = 81 // Turn on the BT radio for num_seconds
PowerStressMessage_WIFI_OFF PowerStressMessage_Opcode = 96 // Turn off the WIFI radio for num_seconds
PowerStressMessage_WIFI_ON PowerStressMessage_Opcode = 97 // Turn on the WIFI radio for num_seconds
PowerStressMessage_GPS_OFF PowerStressMessage_Opcode = 112 // Turn off the GPS radio for num_seconds
PowerStressMessage_GPS_ON PowerStressMessage_Opcode = 113 // Turn on the GPS radio for num_seconds
)
// Enum value maps for PowerStressMessage_Opcode.
var (
PowerStressMessage_Opcode_name = map[int32]string{
0: "UNSET",
1: "PRINT_INFO",
2: "FORCE_QUIET",
3: "END_QUIET",
16: "SCREEN_ON",
17: "SCREEN_OFF",
32: "CPU_IDLE",
33: "CPU_DEEPSLEEP",
34: "CPU_FULLON",
48: "LED_ON",
49: "LED_OFF",
64: "LORA_OFF",
65: "LORA_TX",
66: "LORA_RX",
80: "BT_OFF",
81: "BT_ON",
96: "WIFI_OFF",
97: "WIFI_ON",
112: "GPS_OFF",
113: "GPS_ON",
}
PowerStressMessage_Opcode_value = map[string]int32{
"UNSET": 0,
"PRINT_INFO": 1,
"FORCE_QUIET": 2,
"END_QUIET": 3,
"SCREEN_ON": 16,
"SCREEN_OFF": 17,
"CPU_IDLE": 32,
"CPU_DEEPSLEEP": 33,
"CPU_FULLON": 34,
"LED_ON": 48,
"LED_OFF": 49,
"LORA_OFF": 64,
"LORA_TX": 65,
"LORA_RX": 66,
"BT_OFF": 80,
"BT_ON": 81,
"WIFI_OFF": 96,
"WIFI_ON": 97,
"GPS_OFF": 112,
"GPS_ON": 113,
}
)
func (x PowerStressMessage_Opcode) Enum() *PowerStressMessage_Opcode {
p := new(PowerStressMessage_Opcode)
*p = x
return p
}
func (x PowerStressMessage_Opcode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PowerStressMessage_Opcode) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_powermon_proto_enumTypes[1].Descriptor()
}
func (PowerStressMessage_Opcode) Type() protoreflect.EnumType {
return &file_meshtastic_powermon_proto_enumTypes[1]
}
func (x PowerStressMessage_Opcode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PowerStressMessage_Opcode.Descriptor instead.
func (PowerStressMessage_Opcode) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{1, 0}
}
// Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs).
// But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us)
type PowerMon struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PowerMon) Reset() {
*x = PowerMon{}
mi := &file_meshtastic_powermon_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PowerMon) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PowerMon) ProtoMessage() {}
func (x *PowerMon) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_powermon_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 PowerMon.ProtoReflect.Descriptor instead.
func (*PowerMon) Descriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{0}
}
// PowerStress testing support via the C++ PowerStress module
type PowerStressMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// What type of HardwareMessage is this?
Cmd PowerStressMessage_Opcode `protobuf:"varint,1,opt,name=cmd,proto3,enum=meshtastic.PowerStressMessage_Opcode" json:"cmd,omitempty"`
NumSeconds float32 `protobuf:"fixed32,2,opt,name=num_seconds,json=numSeconds,proto3" json:"num_seconds,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PowerStressMessage) Reset() {
*x = PowerStressMessage{}
mi := &file_meshtastic_powermon_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PowerStressMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PowerStressMessage) ProtoMessage() {}
func (x *PowerStressMessage) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_powermon_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 PowerStressMessage.ProtoReflect.Descriptor instead.
func (*PowerStressMessage) Descriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{1}
}
func (x *PowerStressMessage) GetCmd() PowerStressMessage_Opcode {
if x != nil {
return x.Cmd
}
return PowerStressMessage_UNSET
}
func (x *PowerStressMessage) GetNumSeconds() float32 {
if x != nil {
return x.NumSeconds
}
return 0
}
var File_meshtastic_powermon_proto protoreflect.FileDescriptor
const file_meshtastic_powermon_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/powermon.proto\x12\n" +
"meshtastic\"\xe0\x01\n" +
"\bPowerMon\"\xd3\x01\n" +
"\x05State\x12\b\n" +
"\x04None\x10\x00\x12\x11\n" +
"\rCPU_DeepSleep\x10\x01\x12\x12\n" +
"\x0eCPU_LightSleep\x10\x02\x12\f\n" +
"\bVext1_On\x10\x04\x12\r\n" +
"\tLora_RXOn\x10\b\x12\r\n" +
"\tLora_TXOn\x10\x10\x12\x11\n" +
"\rLora_RXActive\x10 \x12\t\n" +
"\x05BT_On\x10@\x12\v\n" +
"\x06LED_On\x10\x80\x01\x12\x0e\n" +
"\tScreen_On\x10\x80\x02\x12\x13\n" +
"\x0eScreen_Drawing\x10\x80\x04\x12\f\n" +
"\aWifi_On\x10\x80\b\x12\x0f\n" +
"\n" +
"GPS_Active\x10\x80\x10\"\x90\x03\n" +
"\x12PowerStressMessage\x127\n" +
"\x03cmd\x18\x01 \x01(\x0e2%.meshtastic.PowerStressMessage.OpcodeR\x03cmd\x12\x1f\n" +
"\vnum_seconds\x18\x02 \x01(\x02R\n" +
"numSeconds\"\x9f\x02\n" +
"\x06Opcode\x12\t\n" +
"\x05UNSET\x10\x00\x12\x0e\n" +
"\n" +
"PRINT_INFO\x10\x01\x12\x0f\n" +
"\vFORCE_QUIET\x10\x02\x12\r\n" +
"\tEND_QUIET\x10\x03\x12\r\n" +
"\tSCREEN_ON\x10\x10\x12\x0e\n" +
"\n" +
"SCREEN_OFF\x10\x11\x12\f\n" +
"\bCPU_IDLE\x10 \x12\x11\n" +
"\rCPU_DEEPSLEEP\x10!\x12\x0e\n" +
"\n" +
"CPU_FULLON\x10\"\x12\n" +
"\n" +
"\x06LED_ON\x100\x12\v\n" +
"\aLED_OFF\x101\x12\f\n" +
"\bLORA_OFF\x10@\x12\v\n" +
"\aLORA_TX\x10A\x12\v\n" +
"\aLORA_RX\x10B\x12\n" +
"\n" +
"\x06BT_OFF\x10P\x12\t\n" +
"\x05BT_ON\x10Q\x12\f\n" +
"\bWIFI_OFF\x10`\x12\v\n" +
"\aWIFI_ON\x10a\x12\v\n" +
"\aGPS_OFF\x10p\x12\n" +
"\n" +
"\x06GPS_ON\x10qB`\n" +
"\x13com.geeksville.meshB\x0ePowerMonProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_powermon_proto_rawDescOnce sync.Once
file_meshtastic_powermon_proto_rawDescData []byte
)
func file_meshtastic_powermon_proto_rawDescGZIP() []byte {
file_meshtastic_powermon_proto_rawDescOnce.Do(func() {
file_meshtastic_powermon_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_powermon_proto_rawDesc), len(file_meshtastic_powermon_proto_rawDesc)))
})
return file_meshtastic_powermon_proto_rawDescData
}
var file_meshtastic_powermon_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_meshtastic_powermon_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_meshtastic_powermon_proto_goTypes = []any{
(PowerMon_State)(0), // 0: meshtastic.PowerMon.State
(PowerStressMessage_Opcode)(0), // 1: meshtastic.PowerStressMessage.Opcode
(*PowerMon)(nil), // 2: meshtastic.PowerMon
(*PowerStressMessage)(nil), // 3: meshtastic.PowerStressMessage
}
var file_meshtastic_powermon_proto_depIdxs = []int32{
1, // 0: meshtastic.PowerStressMessage.cmd:type_name -> meshtastic.PowerStressMessage.Opcode
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_powermon_proto_init() }
func file_meshtastic_powermon_proto_init() {
if File_meshtastic_powermon_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_powermon_proto_rawDesc), len(file_meshtastic_powermon_proto_rawDesc)),
NumEnums: 2,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_powermon_proto_goTypes,
DependencyIndexes: file_meshtastic_powermon_proto_depIdxs,
EnumInfos: file_meshtastic_powermon_proto_enumTypes,
MessageInfos: file_meshtastic_powermon_proto_msgTypes,
}.Build()
File_meshtastic_powermon_proto = out.File
file_meshtastic_powermon_proto_goTypes = nil
file_meshtastic_powermon_proto_depIdxs = nil
}
+235
View File
@@ -0,0 +1,235 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/remote_hardware.proto
package meshtastic
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)
)
// TODO: REPLACE
type HardwareMessage_Type int32
const (
// Unset/unused
HardwareMessage_UNSET HardwareMessage_Type = 0
// Set gpio gpios based on gpio_mask/gpio_value
HardwareMessage_WRITE_GPIOS HardwareMessage_Type = 1
// We are now interested in watching the gpio_mask gpios.
// If the selected gpios change, please broadcast GPIOS_CHANGED.
// Will implicitly change the gpios requested to be INPUT gpios.
HardwareMessage_WATCH_GPIOS HardwareMessage_Type = 2
// The gpios listed in gpio_mask have changed, the new values are listed in gpio_value
HardwareMessage_GPIOS_CHANGED HardwareMessage_Type = 3
// Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated
HardwareMessage_READ_GPIOS HardwareMessage_Type = 4
// A reply to READ_GPIOS. gpio_mask and gpio_value will be populated
HardwareMessage_READ_GPIOS_REPLY HardwareMessage_Type = 5
)
// Enum value maps for HardwareMessage_Type.
var (
HardwareMessage_Type_name = map[int32]string{
0: "UNSET",
1: "WRITE_GPIOS",
2: "WATCH_GPIOS",
3: "GPIOS_CHANGED",
4: "READ_GPIOS",
5: "READ_GPIOS_REPLY",
}
HardwareMessage_Type_value = map[string]int32{
"UNSET": 0,
"WRITE_GPIOS": 1,
"WATCH_GPIOS": 2,
"GPIOS_CHANGED": 3,
"READ_GPIOS": 4,
"READ_GPIOS_REPLY": 5,
}
)
func (x HardwareMessage_Type) Enum() *HardwareMessage_Type {
p := new(HardwareMessage_Type)
*p = x
return p
}
func (x HardwareMessage_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HardwareMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_remote_hardware_proto_enumTypes[0].Descriptor()
}
func (HardwareMessage_Type) Type() protoreflect.EnumType {
return &file_meshtastic_remote_hardware_proto_enumTypes[0]
}
func (x HardwareMessage_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HardwareMessage_Type.Descriptor instead.
func (HardwareMessage_Type) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_remote_hardware_proto_rawDescGZIP(), []int{0, 0}
}
// An example app to show off the module system. This message is used for
// REMOTE_HARDWARE_APP PortNums.
// Also provides easy remote access to any GPIO.
// In the future other remote hardware operations can be added based on user interest
// (i.e. serial output, spi/i2c input/output).
// FIXME - currently this feature is turned on by default which is dangerous
// because no security yet (beyond the channel mechanism).
// It should be off by default and then protected based on some TBD mechanism
// (a special channel once multichannel support is included?)
type HardwareMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// What type of HardwareMessage is this?
Type HardwareMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=meshtastic.HardwareMessage_Type" json:"type,omitempty"`
// What gpios are we changing. Not used for all MessageTypes, see MessageType for details
GpioMask uint64 `protobuf:"varint,2,opt,name=gpio_mask,json=gpioMask,proto3" json:"gpio_mask,omitempty"`
// For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios.
// Not used for all MessageTypes, see MessageType for details
GpioValue uint64 `protobuf:"varint,3,opt,name=gpio_value,json=gpioValue,proto3" json:"gpio_value,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HardwareMessage) Reset() {
*x = HardwareMessage{}
mi := &file_meshtastic_remote_hardware_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HardwareMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HardwareMessage) ProtoMessage() {}
func (x *HardwareMessage) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_remote_hardware_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 HardwareMessage.ProtoReflect.Descriptor instead.
func (*HardwareMessage) Descriptor() ([]byte, []int) {
return file_meshtastic_remote_hardware_proto_rawDescGZIP(), []int{0}
}
func (x *HardwareMessage) GetType() HardwareMessage_Type {
if x != nil {
return x.Type
}
return HardwareMessage_UNSET
}
func (x *HardwareMessage) GetGpioMask() uint64 {
if x != nil {
return x.GpioMask
}
return 0
}
func (x *HardwareMessage) GetGpioValue() uint64 {
if x != nil {
return x.GpioValue
}
return 0
}
var File_meshtastic_remote_hardware_proto protoreflect.FileDescriptor
const file_meshtastic_remote_hardware_proto_rawDesc = "" +
"\n" +
" meshtastic/remote_hardware.proto\x12\n" +
"meshtastic\"\xf1\x01\n" +
"\x0fHardwareMessage\x124\n" +
"\x04type\x18\x01 \x01(\x0e2 .meshtastic.HardwareMessage.TypeR\x04type\x12\x1b\n" +
"\tgpio_mask\x18\x02 \x01(\x04R\bgpioMask\x12\x1d\n" +
"\n" +
"gpio_value\x18\x03 \x01(\x04R\tgpioValue\"l\n" +
"\x04Type\x12\t\n" +
"\x05UNSET\x10\x00\x12\x0f\n" +
"\vWRITE_GPIOS\x10\x01\x12\x0f\n" +
"\vWATCH_GPIOS\x10\x02\x12\x11\n" +
"\rGPIOS_CHANGED\x10\x03\x12\x0e\n" +
"\n" +
"READ_GPIOS\x10\x04\x12\x14\n" +
"\x10READ_GPIOS_REPLY\x10\x05B`\n" +
"\x13com.geeksville.meshB\x0eRemoteHardwareZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_remote_hardware_proto_rawDescOnce sync.Once
file_meshtastic_remote_hardware_proto_rawDescData []byte
)
func file_meshtastic_remote_hardware_proto_rawDescGZIP() []byte {
file_meshtastic_remote_hardware_proto_rawDescOnce.Do(func() {
file_meshtastic_remote_hardware_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_remote_hardware_proto_rawDesc), len(file_meshtastic_remote_hardware_proto_rawDesc)))
})
return file_meshtastic_remote_hardware_proto_rawDescData
}
var file_meshtastic_remote_hardware_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_remote_hardware_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_remote_hardware_proto_goTypes = []any{
(HardwareMessage_Type)(0), // 0: meshtastic.HardwareMessage.Type
(*HardwareMessage)(nil), // 1: meshtastic.HardwareMessage
}
var file_meshtastic_remote_hardware_proto_depIdxs = []int32{
0, // 0: meshtastic.HardwareMessage.type:type_name -> meshtastic.HardwareMessage.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_remote_hardware_proto_init() }
func file_meshtastic_remote_hardware_proto_init() {
if File_meshtastic_remote_hardware_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_remote_hardware_proto_rawDesc), len(file_meshtastic_remote_hardware_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_remote_hardware_proto_goTypes,
DependencyIndexes: file_meshtastic_remote_hardware_proto_depIdxs,
EnumInfos: file_meshtastic_remote_hardware_proto_enumTypes,
MessageInfos: file_meshtastic_remote_hardware_proto_msgTypes,
}.Build()
File_meshtastic_remote_hardware_proto = out.File
file_meshtastic_remote_hardware_proto_goTypes = nil
file_meshtastic_remote_hardware_proto_depIdxs = nil
}
+126
View File
@@ -0,0 +1,126 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/rtttl.proto
package meshtastic
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)
)
// Canned message module configuration.
type RTTTLConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Ringtone for PWM Buzzer in RTTTL Format.
Ringtone string `protobuf:"bytes,1,opt,name=ringtone,proto3" json:"ringtone,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RTTTLConfig) Reset() {
*x = RTTTLConfig{}
mi := &file_meshtastic_rtttl_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RTTTLConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RTTTLConfig) ProtoMessage() {}
func (x *RTTTLConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_rtttl_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 RTTTLConfig.ProtoReflect.Descriptor instead.
func (*RTTTLConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_rtttl_proto_rawDescGZIP(), []int{0}
}
func (x *RTTTLConfig) GetRingtone() string {
if x != nil {
return x.Ringtone
}
return ""
}
var File_meshtastic_rtttl_proto protoreflect.FileDescriptor
const file_meshtastic_rtttl_proto_rawDesc = "" +
"\n" +
"\x16meshtastic/rtttl.proto\x12\n" +
"meshtastic\")\n" +
"\vRTTTLConfig\x12\x1a\n" +
"\bringtone\x18\x01 \x01(\tR\bringtoneBc\n" +
"\x13com.geeksville.meshB\x11RTTTLConfigProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_rtttl_proto_rawDescOnce sync.Once
file_meshtastic_rtttl_proto_rawDescData []byte
)
func file_meshtastic_rtttl_proto_rawDescGZIP() []byte {
file_meshtastic_rtttl_proto_rawDescOnce.Do(func() {
file_meshtastic_rtttl_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_rtttl_proto_rawDesc), len(file_meshtastic_rtttl_proto_rawDesc)))
})
return file_meshtastic_rtttl_proto_rawDescData
}
var file_meshtastic_rtttl_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_rtttl_proto_goTypes = []any{
(*RTTTLConfig)(nil), // 0: meshtastic.RTTTLConfig
}
var file_meshtastic_rtttl_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_meshtastic_rtttl_proto_init() }
func file_meshtastic_rtttl_proto_init() {
if File_meshtastic_rtttl_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_rtttl_proto_rawDesc), len(file_meshtastic_rtttl_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_rtttl_proto_goTypes,
DependencyIndexes: file_meshtastic_rtttl_proto_depIdxs,
MessageInfos: file_meshtastic_rtttl_proto_msgTypes,
}.Build()
File_meshtastic_rtttl_proto = out.File
file_meshtastic_rtttl_proto_goTypes = nil
file_meshtastic_rtttl_proto_depIdxs = nil
}
+613
View File
@@ -0,0 +1,613 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/storeforward.proto
package meshtastic
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)
)
// 001 - 063 = From Router
// 064 - 127 = From Client
type StoreAndForward_RequestResponse int32
const (
// Unset/unused
StoreAndForward_UNSET StoreAndForward_RequestResponse = 0
// Router is an in error state.
StoreAndForward_ROUTER_ERROR StoreAndForward_RequestResponse = 1
// Router heartbeat
StoreAndForward_ROUTER_HEARTBEAT StoreAndForward_RequestResponse = 2
// Router has requested the client respond. This can work as a
// "are you there" message.
StoreAndForward_ROUTER_PING StoreAndForward_RequestResponse = 3
// The response to a "Ping"
StoreAndForward_ROUTER_PONG StoreAndForward_RequestResponse = 4
// Router is currently busy. Please try again later.
StoreAndForward_ROUTER_BUSY StoreAndForward_RequestResponse = 5
// Router is responding to a request for history.
StoreAndForward_ROUTER_HISTORY StoreAndForward_RequestResponse = 6
// Router is responding to a request for stats.
StoreAndForward_ROUTER_STATS StoreAndForward_RequestResponse = 7
// Router sends a text message from its history that was a direct message.
StoreAndForward_ROUTER_TEXT_DIRECT StoreAndForward_RequestResponse = 8
// Router sends a text message from its history that was a broadcast.
StoreAndForward_ROUTER_TEXT_BROADCAST StoreAndForward_RequestResponse = 9
// Client is an in error state.
StoreAndForward_CLIENT_ERROR StoreAndForward_RequestResponse = 64
// Client has requested a replay from the router.
StoreAndForward_CLIENT_HISTORY StoreAndForward_RequestResponse = 65
// Client has requested stats from the router.
StoreAndForward_CLIENT_STATS StoreAndForward_RequestResponse = 66
// Client has requested the router respond. This can work as a
// "are you there" message.
StoreAndForward_CLIENT_PING StoreAndForward_RequestResponse = 67
// The response to a "Ping"
StoreAndForward_CLIENT_PONG StoreAndForward_RequestResponse = 68
// Client has requested that the router abort processing the client's request
StoreAndForward_CLIENT_ABORT StoreAndForward_RequestResponse = 106
)
// Enum value maps for StoreAndForward_RequestResponse.
var (
StoreAndForward_RequestResponse_name = map[int32]string{
0: "UNSET",
1: "ROUTER_ERROR",
2: "ROUTER_HEARTBEAT",
3: "ROUTER_PING",
4: "ROUTER_PONG",
5: "ROUTER_BUSY",
6: "ROUTER_HISTORY",
7: "ROUTER_STATS",
8: "ROUTER_TEXT_DIRECT",
9: "ROUTER_TEXT_BROADCAST",
64: "CLIENT_ERROR",
65: "CLIENT_HISTORY",
66: "CLIENT_STATS",
67: "CLIENT_PING",
68: "CLIENT_PONG",
106: "CLIENT_ABORT",
}
StoreAndForward_RequestResponse_value = map[string]int32{
"UNSET": 0,
"ROUTER_ERROR": 1,
"ROUTER_HEARTBEAT": 2,
"ROUTER_PING": 3,
"ROUTER_PONG": 4,
"ROUTER_BUSY": 5,
"ROUTER_HISTORY": 6,
"ROUTER_STATS": 7,
"ROUTER_TEXT_DIRECT": 8,
"ROUTER_TEXT_BROADCAST": 9,
"CLIENT_ERROR": 64,
"CLIENT_HISTORY": 65,
"CLIENT_STATS": 66,
"CLIENT_PING": 67,
"CLIENT_PONG": 68,
"CLIENT_ABORT": 106,
}
)
func (x StoreAndForward_RequestResponse) Enum() *StoreAndForward_RequestResponse {
p := new(StoreAndForward_RequestResponse)
*p = x
return p
}
func (x StoreAndForward_RequestResponse) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StoreAndForward_RequestResponse) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_storeforward_proto_enumTypes[0].Descriptor()
}
func (StoreAndForward_RequestResponse) Type() protoreflect.EnumType {
return &file_meshtastic_storeforward_proto_enumTypes[0]
}
func (x StoreAndForward_RequestResponse) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StoreAndForward_RequestResponse.Descriptor instead.
func (StoreAndForward_RequestResponse) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 0}
}
// TODO: REPLACE
type StoreAndForward struct {
state protoimpl.MessageState `protogen:"open.v1"`
// TODO: REPLACE
Rr StoreAndForward_RequestResponse `protobuf:"varint,1,opt,name=rr,proto3,enum=meshtastic.StoreAndForward_RequestResponse" json:"rr,omitempty"`
// TODO: REPLACE
//
// Types that are valid to be assigned to Variant:
//
// *StoreAndForward_Stats
// *StoreAndForward_History_
// *StoreAndForward_Heartbeat_
// *StoreAndForward_Text
Variant isStoreAndForward_Variant `protobuf_oneof:"variant"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward) Reset() {
*x = StoreAndForward{}
mi := &file_meshtastic_storeforward_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward) ProtoMessage() {}
func (x *StoreAndForward) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_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 StoreAndForward.ProtoReflect.Descriptor instead.
func (*StoreAndForward) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0}
}
func (x *StoreAndForward) GetRr() StoreAndForward_RequestResponse {
if x != nil {
return x.Rr
}
return StoreAndForward_UNSET
}
func (x *StoreAndForward) GetVariant() isStoreAndForward_Variant {
if x != nil {
return x.Variant
}
return nil
}
func (x *StoreAndForward) GetStats() *StoreAndForward_Statistics {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Stats); ok {
return x.Stats
}
}
return nil
}
func (x *StoreAndForward) GetHistory() *StoreAndForward_History {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_History_); ok {
return x.History
}
}
return nil
}
func (x *StoreAndForward) GetHeartbeat() *StoreAndForward_Heartbeat {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Heartbeat_); ok {
return x.Heartbeat
}
}
return nil
}
func (x *StoreAndForward) GetText() []byte {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Text); ok {
return x.Text
}
}
return nil
}
type isStoreAndForward_Variant interface {
isStoreAndForward_Variant()
}
type StoreAndForward_Stats struct {
// TODO: REPLACE
Stats *StoreAndForward_Statistics `protobuf:"bytes,2,opt,name=stats,proto3,oneof"`
}
type StoreAndForward_History_ struct {
// TODO: REPLACE
History *StoreAndForward_History `protobuf:"bytes,3,opt,name=history,proto3,oneof"`
}
type StoreAndForward_Heartbeat_ struct {
// TODO: REPLACE
Heartbeat *StoreAndForward_Heartbeat `protobuf:"bytes,4,opt,name=heartbeat,proto3,oneof"`
}
type StoreAndForward_Text struct {
// Text from history message.
Text []byte `protobuf:"bytes,5,opt,name=text,proto3,oneof"`
}
func (*StoreAndForward_Stats) isStoreAndForward_Variant() {}
func (*StoreAndForward_History_) isStoreAndForward_Variant() {}
func (*StoreAndForward_Heartbeat_) isStoreAndForward_Variant() {}
func (*StoreAndForward_Text) isStoreAndForward_Variant() {}
// TODO: REPLACE
type StoreAndForward_Statistics struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Number of messages we have ever seen
MessagesTotal uint32 `protobuf:"varint,1,opt,name=messages_total,json=messagesTotal,proto3" json:"messages_total,omitempty"`
// Number of messages we have currently saved our history.
MessagesSaved uint32 `protobuf:"varint,2,opt,name=messages_saved,json=messagesSaved,proto3" json:"messages_saved,omitempty"`
// Maximum number of messages we will save
MessagesMax uint32 `protobuf:"varint,3,opt,name=messages_max,json=messagesMax,proto3" json:"messages_max,omitempty"`
// Router uptime in seconds
UpTime uint32 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"up_time,omitempty"`
// Number of times any client sent a request to the S&F.
Requests uint32 `protobuf:"varint,5,opt,name=requests,proto3" json:"requests,omitempty"`
// Number of times the history was requested.
RequestsHistory uint32 `protobuf:"varint,6,opt,name=requests_history,json=requestsHistory,proto3" json:"requests_history,omitempty"`
// Is the heartbeat enabled on the server?
Heartbeat bool `protobuf:"varint,7,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"`
// Maximum number of messages the server will return.
ReturnMax uint32 `protobuf:"varint,8,opt,name=return_max,json=returnMax,proto3" json:"return_max,omitempty"`
// Maximum history window in minutes the server will return messages from.
ReturnWindow uint32 `protobuf:"varint,9,opt,name=return_window,json=returnWindow,proto3" json:"return_window,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_Statistics) Reset() {
*x = StoreAndForward_Statistics{}
mi := &file_meshtastic_storeforward_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_Statistics) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_Statistics) ProtoMessage() {}
func (x *StoreAndForward_Statistics) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_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 StoreAndForward_Statistics.ProtoReflect.Descriptor instead.
func (*StoreAndForward_Statistics) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 0}
}
func (x *StoreAndForward_Statistics) GetMessagesTotal() uint32 {
if x != nil {
return x.MessagesTotal
}
return 0
}
func (x *StoreAndForward_Statistics) GetMessagesSaved() uint32 {
if x != nil {
return x.MessagesSaved
}
return 0
}
func (x *StoreAndForward_Statistics) GetMessagesMax() uint32 {
if x != nil {
return x.MessagesMax
}
return 0
}
func (x *StoreAndForward_Statistics) GetUpTime() uint32 {
if x != nil {
return x.UpTime
}
return 0
}
func (x *StoreAndForward_Statistics) GetRequests() uint32 {
if x != nil {
return x.Requests
}
return 0
}
func (x *StoreAndForward_Statistics) GetRequestsHistory() uint32 {
if x != nil {
return x.RequestsHistory
}
return 0
}
func (x *StoreAndForward_Statistics) GetHeartbeat() bool {
if x != nil {
return x.Heartbeat
}
return false
}
func (x *StoreAndForward_Statistics) GetReturnMax() uint32 {
if x != nil {
return x.ReturnMax
}
return 0
}
func (x *StoreAndForward_Statistics) GetReturnWindow() uint32 {
if x != nil {
return x.ReturnWindow
}
return 0
}
// TODO: REPLACE
type StoreAndForward_History struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Number of that will be sent to the client
HistoryMessages uint32 `protobuf:"varint,1,opt,name=history_messages,json=historyMessages,proto3" json:"history_messages,omitempty"`
// The window of messages that was used to filter the history client requested
Window uint32 `protobuf:"varint,2,opt,name=window,proto3" json:"window,omitempty"`
// Index in the packet history of the last message sent in a previous request to the server.
// Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client.
LastRequest uint32 `protobuf:"varint,3,opt,name=last_request,json=lastRequest,proto3" json:"last_request,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_History) Reset() {
*x = StoreAndForward_History{}
mi := &file_meshtastic_storeforward_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_History) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_History) ProtoMessage() {}
func (x *StoreAndForward_History) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[2]
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 StoreAndForward_History.ProtoReflect.Descriptor instead.
func (*StoreAndForward_History) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 1}
}
func (x *StoreAndForward_History) GetHistoryMessages() uint32 {
if x != nil {
return x.HistoryMessages
}
return 0
}
func (x *StoreAndForward_History) GetWindow() uint32 {
if x != nil {
return x.Window
}
return 0
}
func (x *StoreAndForward_History) GetLastRequest() uint32 {
if x != nil {
return x.LastRequest
}
return 0
}
// TODO: REPLACE
type StoreAndForward_Heartbeat struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Period in seconds that the heartbeat is sent out that will be sent to the client
Period uint32 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"`
// If set, this is not the primary Store & Forward router on the mesh
Secondary uint32 `protobuf:"varint,2,opt,name=secondary,proto3" json:"secondary,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_Heartbeat) Reset() {
*x = StoreAndForward_Heartbeat{}
mi := &file_meshtastic_storeforward_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_Heartbeat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_Heartbeat) ProtoMessage() {}
func (x *StoreAndForward_Heartbeat) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[3]
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 StoreAndForward_Heartbeat.ProtoReflect.Descriptor instead.
func (*StoreAndForward_Heartbeat) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 2}
}
func (x *StoreAndForward_Heartbeat) GetPeriod() uint32 {
if x != nil {
return x.Period
}
return 0
}
func (x *StoreAndForward_Heartbeat) GetSecondary() uint32 {
if x != nil {
return x.Secondary
}
return 0
}
var File_meshtastic_storeforward_proto protoreflect.FileDescriptor
const file_meshtastic_storeforward_proto_rawDesc = "" +
"\n" +
"\x1dmeshtastic/storeforward.proto\x12\n" +
"meshtastic\"\xec\b\n" +
"\x0fStoreAndForward\x12;\n" +
"\x02rr\x18\x01 \x01(\x0e2+.meshtastic.StoreAndForward.RequestResponseR\x02rr\x12>\n" +
"\x05stats\x18\x02 \x01(\v2&.meshtastic.StoreAndForward.StatisticsH\x00R\x05stats\x12?\n" +
"\ahistory\x18\x03 \x01(\v2#.meshtastic.StoreAndForward.HistoryH\x00R\ahistory\x12E\n" +
"\theartbeat\x18\x04 \x01(\v2%.meshtastic.StoreAndForward.HeartbeatH\x00R\theartbeat\x12\x14\n" +
"\x04text\x18\x05 \x01(\fH\x00R\x04text\x1a\xbf\x02\n" +
"\n" +
"Statistics\x12%\n" +
"\x0emessages_total\x18\x01 \x01(\rR\rmessagesTotal\x12%\n" +
"\x0emessages_saved\x18\x02 \x01(\rR\rmessagesSaved\x12!\n" +
"\fmessages_max\x18\x03 \x01(\rR\vmessagesMax\x12\x17\n" +
"\aup_time\x18\x04 \x01(\rR\x06upTime\x12\x1a\n" +
"\brequests\x18\x05 \x01(\rR\brequests\x12)\n" +
"\x10requests_history\x18\x06 \x01(\rR\x0frequestsHistory\x12\x1c\n" +
"\theartbeat\x18\a \x01(\bR\theartbeat\x12\x1d\n" +
"\n" +
"return_max\x18\b \x01(\rR\treturnMax\x12#\n" +
"\rreturn_window\x18\t \x01(\rR\freturnWindow\x1ao\n" +
"\aHistory\x12)\n" +
"\x10history_messages\x18\x01 \x01(\rR\x0fhistoryMessages\x12\x16\n" +
"\x06window\x18\x02 \x01(\rR\x06window\x12!\n" +
"\flast_request\x18\x03 \x01(\rR\vlastRequest\x1aA\n" +
"\tHeartbeat\x12\x16\n" +
"\x06period\x18\x01 \x01(\rR\x06period\x12\x1c\n" +
"\tsecondary\x18\x02 \x01(\rR\tsecondary\"\xbc\x02\n" +
"\x0fRequestResponse\x12\t\n" +
"\x05UNSET\x10\x00\x12\x10\n" +
"\fROUTER_ERROR\x10\x01\x12\x14\n" +
"\x10ROUTER_HEARTBEAT\x10\x02\x12\x0f\n" +
"\vROUTER_PING\x10\x03\x12\x0f\n" +
"\vROUTER_PONG\x10\x04\x12\x0f\n" +
"\vROUTER_BUSY\x10\x05\x12\x12\n" +
"\x0eROUTER_HISTORY\x10\x06\x12\x10\n" +
"\fROUTER_STATS\x10\a\x12\x16\n" +
"\x12ROUTER_TEXT_DIRECT\x10\b\x12\x19\n" +
"\x15ROUTER_TEXT_BROADCAST\x10\t\x12\x10\n" +
"\fCLIENT_ERROR\x10@\x12\x12\n" +
"\x0eCLIENT_HISTORY\x10A\x12\x10\n" +
"\fCLIENT_STATS\x10B\x12\x0f\n" +
"\vCLIENT_PING\x10C\x12\x0f\n" +
"\vCLIENT_PONG\x10D\x12\x10\n" +
"\fCLIENT_ABORT\x10jB\t\n" +
"\avariantBg\n" +
"\x13com.geeksville.meshB\x15StoreAndForwardProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_storeforward_proto_rawDescOnce sync.Once
file_meshtastic_storeforward_proto_rawDescData []byte
)
func file_meshtastic_storeforward_proto_rawDescGZIP() []byte {
file_meshtastic_storeforward_proto_rawDescOnce.Do(func() {
file_meshtastic_storeforward_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_storeforward_proto_rawDesc), len(file_meshtastic_storeforward_proto_rawDesc)))
})
return file_meshtastic_storeforward_proto_rawDescData
}
var file_meshtastic_storeforward_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_storeforward_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_meshtastic_storeforward_proto_goTypes = []any{
(StoreAndForward_RequestResponse)(0), // 0: meshtastic.StoreAndForward.RequestResponse
(*StoreAndForward)(nil), // 1: meshtastic.StoreAndForward
(*StoreAndForward_Statistics)(nil), // 2: meshtastic.StoreAndForward.Statistics
(*StoreAndForward_History)(nil), // 3: meshtastic.StoreAndForward.History
(*StoreAndForward_Heartbeat)(nil), // 4: meshtastic.StoreAndForward.Heartbeat
}
var file_meshtastic_storeforward_proto_depIdxs = []int32{
0, // 0: meshtastic.StoreAndForward.rr:type_name -> meshtastic.StoreAndForward.RequestResponse
2, // 1: meshtastic.StoreAndForward.stats:type_name -> meshtastic.StoreAndForward.Statistics
3, // 2: meshtastic.StoreAndForward.history:type_name -> meshtastic.StoreAndForward.History
4, // 3: meshtastic.StoreAndForward.heartbeat:type_name -> meshtastic.StoreAndForward.Heartbeat
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_meshtastic_storeforward_proto_init() }
func file_meshtastic_storeforward_proto_init() {
if File_meshtastic_storeforward_proto != nil {
return
}
file_meshtastic_storeforward_proto_msgTypes[0].OneofWrappers = []any{
(*StoreAndForward_Stats)(nil),
(*StoreAndForward_History_)(nil),
(*StoreAndForward_Heartbeat_)(nil),
(*StoreAndForward_Text)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_storeforward_proto_rawDesc), len(file_meshtastic_storeforward_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_storeforward_proto_goTypes,
DependencyIndexes: file_meshtastic_storeforward_proto_depIdxs,
EnumInfos: file_meshtastic_storeforward_proto_enumTypes,
MessageInfos: file_meshtastic_storeforward_proto_msgTypes,
}.Build()
File_meshtastic_storeforward_proto = out.File
file_meshtastic_storeforward_proto_goTypes = nil
file_meshtastic_storeforward_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
+228
View File
@@ -0,0 +1,228 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc v5.29.3
// source: meshtastic/xmodem.proto
package meshtastic
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 XModem_Control int32
const (
XModem_NUL XModem_Control = 0
XModem_SOH XModem_Control = 1
XModem_STX XModem_Control = 2
XModem_EOT XModem_Control = 4
XModem_ACK XModem_Control = 6
XModem_NAK XModem_Control = 21
XModem_CAN XModem_Control = 24
XModem_CTRLZ XModem_Control = 26
)
// Enum value maps for XModem_Control.
var (
XModem_Control_name = map[int32]string{
0: "NUL",
1: "SOH",
2: "STX",
4: "EOT",
6: "ACK",
21: "NAK",
24: "CAN",
26: "CTRLZ",
}
XModem_Control_value = map[string]int32{
"NUL": 0,
"SOH": 1,
"STX": 2,
"EOT": 4,
"ACK": 6,
"NAK": 21,
"CAN": 24,
"CTRLZ": 26,
}
)
func (x XModem_Control) Enum() *XModem_Control {
p := new(XModem_Control)
*p = x
return p
}
func (x XModem_Control) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (XModem_Control) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_xmodem_proto_enumTypes[0].Descriptor()
}
func (XModem_Control) Type() protoreflect.EnumType {
return &file_meshtastic_xmodem_proto_enumTypes[0]
}
func (x XModem_Control) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use XModem_Control.Descriptor instead.
func (XModem_Control) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_xmodem_proto_rawDescGZIP(), []int{0, 0}
}
type XModem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Control XModem_Control `protobuf:"varint,1,opt,name=control,proto3,enum=meshtastic.XModem_Control" json:"control,omitempty"`
Seq uint32 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
Crc16 uint32 `protobuf:"varint,3,opt,name=crc16,proto3" json:"crc16,omitempty"`
Buffer []byte `protobuf:"bytes,4,opt,name=buffer,proto3" json:"buffer,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *XModem) Reset() {
*x = XModem{}
mi := &file_meshtastic_xmodem_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *XModem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*XModem) ProtoMessage() {}
func (x *XModem) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_xmodem_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 XModem.ProtoReflect.Descriptor instead.
func (*XModem) Descriptor() ([]byte, []int) {
return file_meshtastic_xmodem_proto_rawDescGZIP(), []int{0}
}
func (x *XModem) GetControl() XModem_Control {
if x != nil {
return x.Control
}
return XModem_NUL
}
func (x *XModem) GetSeq() uint32 {
if x != nil {
return x.Seq
}
return 0
}
func (x *XModem) GetCrc16() uint32 {
if x != nil {
return x.Crc16
}
return 0
}
func (x *XModem) GetBuffer() []byte {
if x != nil {
return x.Buffer
}
return nil
}
var File_meshtastic_xmodem_proto protoreflect.FileDescriptor
const file_meshtastic_xmodem_proto_rawDesc = "" +
"\n" +
"\x17meshtastic/xmodem.proto\x12\n" +
"meshtastic\"\xd3\x01\n" +
"\x06XModem\x124\n" +
"\acontrol\x18\x01 \x01(\x0e2\x1a.meshtastic.XModem.ControlR\acontrol\x12\x10\n" +
"\x03seq\x18\x02 \x01(\rR\x03seq\x12\x14\n" +
"\x05crc16\x18\x03 \x01(\rR\x05crc16\x12\x16\n" +
"\x06buffer\x18\x04 \x01(\fR\x06buffer\"S\n" +
"\aControl\x12\a\n" +
"\x03NUL\x10\x00\x12\a\n" +
"\x03SOH\x10\x01\x12\a\n" +
"\x03STX\x10\x02\x12\a\n" +
"\x03EOT\x10\x04\x12\a\n" +
"\x03ACK\x10\x06\x12\a\n" +
"\x03NAK\x10\x15\x12\a\n" +
"\x03CAN\x10\x18\x12\t\n" +
"\x05CTRLZ\x10\x1aB^\n" +
"\x13com.geeksville.meshB\fXmodemProtosZ\x1fmeshstream/generated/meshtastic\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_xmodem_proto_rawDescOnce sync.Once
file_meshtastic_xmodem_proto_rawDescData []byte
)
func file_meshtastic_xmodem_proto_rawDescGZIP() []byte {
file_meshtastic_xmodem_proto_rawDescOnce.Do(func() {
file_meshtastic_xmodem_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_xmodem_proto_rawDesc), len(file_meshtastic_xmodem_proto_rawDesc)))
})
return file_meshtastic_xmodem_proto_rawDescData
}
var file_meshtastic_xmodem_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_xmodem_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_xmodem_proto_goTypes = []any{
(XModem_Control)(0), // 0: meshtastic.XModem.Control
(*XModem)(nil), // 1: meshtastic.XModem
}
var file_meshtastic_xmodem_proto_depIdxs = []int32{
0, // 0: meshtastic.XModem.control:type_name -> meshtastic.XModem.Control
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_xmodem_proto_init() }
func file_meshtastic_xmodem_proto_init() {
if File_meshtastic_xmodem_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_xmodem_proto_rawDesc), len(file_meshtastic_xmodem_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_xmodem_proto_goTypes,
DependencyIndexes: file_meshtastic_xmodem_proto_depIdxs,
EnumInfos: file_meshtastic_xmodem_proto_enumTypes,
MessageInfos: file_meshtastic_xmodem_proto_msgTypes,
}.Build()
File_meshtastic_xmodem_proto = out.File
file_meshtastic_xmodem_proto_goTypes = nil
file_meshtastic_xmodem_proto_depIdxs = nil
}