diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b32cec3 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +.PHONY: build run gen-proto clean tools + +# Build directories +BIN_DIR := bin +TOOLS_DIR := $(BIN_DIR)/tools + +# Tool commands +PROTOC_GEN_GO := $(TOOLS_DIR)/protoc-gen-go + +# Build the application +build: + go build -o meshstream + +# Run the application +run: build + ./meshstream + +# Generate Go code from Protocol Buffers +gen-proto: tools + mkdir -p proto/generated + PATH="$(TOOLS_DIR):$$PATH" protoc \ + -I./proto \ + --go_out=./proto/generated \ + --go_opt=paths=source_relative \ + ./proto/meshtastic/*.proto ./proto/nanopb.proto + +# Clean generated files +clean: + rm -f meshstream + rm -rf $(BIN_DIR) + find . -name "*.pb.go" -type f -delete + +# Install tools needed for development +tools: $(PROTOC_GEN_GO) + +$(TOOLS_DIR): + mkdir -p $(TOOLS_DIR) + +# Install the protoc-gen-go tool +$(PROTOC_GEN_GO): $(TOOLS_DIR) + GOBIN=$(abspath $(TOOLS_DIR)) go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \ No newline at end of file diff --git a/bin/tools/protoc-gen-go b/bin/tools/protoc-gen-go new file mode 100755 index 0000000..065553a Binary files /dev/null and b/bin/tools/protoc-gen-go differ diff --git a/decoder/decoder.go b/decoder/decoder.go new file mode 100644 index 0000000..1b73895 --- /dev/null +++ b/decoder/decoder.go @@ -0,0 +1,119 @@ +package decoder + +import ( + "encoding/json" + "fmt" + "strings" +) + +// PacketType represents the type of a Meshtastic packet +type PacketType string + +const ( + TypeJSON PacketType = "json" + TypeBinary PacketType = "binary" + TypeText PacketType = "text" +) + +// DecodedPacket contains information about a decoded packet +type DecodedPacket struct { + Topic string + Channel string + Type PacketType + JSONData map[string]interface{} + FromNode string + ToNode string + Text string + RawData []byte + Timestamp string +} + +// DecodePacket attempts to decode a packet from MQTT +func DecodePacket(topic string, payload []byte) (*DecodedPacket, error) { + packet := &DecodedPacket{ + Topic: topic, + RawData: payload, + } + + // Extract channel and other info from topic + parts := strings.Split(topic, "/") + if len(parts) < 4 { + return packet, fmt.Errorf("invalid topic format: %s", topic) + } + + // Set channel info (typically msh/REGION/STATE/NAME) + packet.Channel = strings.Join(parts[1:4], "/") + + // Determine packet type from topic + if strings.Contains(topic, "/json/") { + packet.Type = TypeJSON + if err := json.Unmarshal(payload, &packet.JSONData); err != nil { + return packet, fmt.Errorf("failed to parse JSON: %v", err) + } + + // Extract common fields + if from, ok := packet.JSONData["from"].(string); ok { + packet.FromNode = from + } + if to, ok := packet.JSONData["to"].(string); ok { + packet.ToNode = to + } + if text, ok := packet.JSONData["payload"].(string); ok { + packet.Text = text + } + if ts, ok := packet.JSONData["timestamp"].(string); ok { + packet.Timestamp = ts + } + } else if strings.Contains(topic, "/binary/") { + // Binary protobuf payload + packet.Type = TypeBinary + // Note: Actual protobuf decoding would be done here using the + // generated proto files, but it's a complex task since we need + // to determine which message type to use. + } else if strings.Contains(topic, "/text/") { + // Plain text payload + packet.Type = TypeText + packet.Text = string(payload) + } + + return packet, nil +} + +// FormatPacket formats a decoded packet for display +func FormatPacket(packet *DecodedPacket) string { + var builder strings.Builder + + builder.WriteString(fmt.Sprintf("Topic: %s\n", packet.Topic)) + builder.WriteString(fmt.Sprintf("Channel: %s\n", packet.Channel)) + + switch packet.Type { + case TypeJSON: + builder.WriteString("Type: JSON\n") + if packet.FromNode != "" { + builder.WriteString(fmt.Sprintf("From: %s\n", packet.FromNode)) + } + if packet.ToNode != "" { + builder.WriteString(fmt.Sprintf("To: %s\n", packet.ToNode)) + } + if packet.Text != "" { + builder.WriteString(fmt.Sprintf("Text: %s\n", packet.Text)) + } + if packet.Timestamp != "" { + builder.WriteString(fmt.Sprintf("Timestamp: %s\n", packet.Timestamp)) + } + + // Format remaining JSON data + jsonBytes, _ := json.MarshalIndent(packet.JSONData, "", " ") + builder.WriteString(fmt.Sprintf("Data: %s\n", jsonBytes)) + + case TypeBinary: + builder.WriteString("Type: Binary\n") + builder.WriteString(fmt.Sprintf("Hex: %x\n", packet.RawData)) + + case TypeText: + builder.WriteString("Type: Text\n") + builder.WriteString(fmt.Sprintf("Content: %s\n", packet.Text)) + } + + return builder.String() +} \ No newline at end of file diff --git a/go.mod b/go.mod index 0684b12..0f2d9b4 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,10 @@ module meshstream go 1.24.1 -require github.com/eclipse/paho.mqtt.golang v1.5.0 +require ( + github.com/eclipse/paho.mqtt.golang v1.5.0 + google.golang.org/protobuf v1.36.6 +) require ( github.com/gorilla/websocket v1.5.3 // indirect diff --git a/go.sum b/go.sum index b555dd0..b414f3b 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,14 @@ github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o= github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= diff --git a/main.go b/main.go index e63ad98..c9ba299 100644 --- a/main.go +++ b/main.go @@ -5,9 +5,12 @@ import ( "log" "os" "os/signal" + "strings" "syscall" "time" + "meshstream/decoder" + mqtt "github.com/eclipse/paho.mqtt.golang" ) @@ -20,11 +23,19 @@ const ( var messagePubHandler mqtt.MessageHandler = func(client mqtt.Client, msg mqtt.Message) { fmt.Printf("Received message from topic: %s\n", msg.Topic()) - fmt.Printf("Raw payload: %v\n", msg.Payload()) - // TODO: When protobuf compilation is set up, we can decode the messages - // using the Meshtastic protocol definitions in the proto/ directory - // Example decoding logic will be added in a future update + // Decode the packet + packet, err := decoder.DecodePacket(msg.Topic(), msg.Payload()) + if err != nil { + fmt.Printf("Error decoding packet: %v\n", err) + fmt.Printf("Raw payload: %s\n", msg.Payload()) + } else { + // Format and print the packet + formattedOutput := decoder.FormatPacket(packet) + fmt.Println(formattedOutput) + } + + fmt.Println(strings.Repeat("-", 80)) } var connectHandler mqtt.OnConnectHandler = func(client mqtt.Client) { diff --git a/meshstream b/meshstream new file mode 100755 index 0000000..ba54762 Binary files /dev/null and b/meshstream differ diff --git a/proto/generated/meshtastic/admin.pb.go b/proto/generated/meshtastic/admin.pb.go new file mode 100644 index 0000000..2930c37 --- /dev/null +++ b/proto/generated/meshtastic/admin.pb.go @@ -0,0 +1,1556 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.3 +// source: meshtastic/admin.proto + +package generated + +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 AdminMessage_ConfigType int32 + +const ( + // TODO: REPLACE + AdminMessage_DEVICE_CONFIG AdminMessage_ConfigType = 0 + // TODO: REPLACE + AdminMessage_POSITION_CONFIG AdminMessage_ConfigType = 1 + // TODO: REPLACE + AdminMessage_POWER_CONFIG AdminMessage_ConfigType = 2 + // TODO: REPLACE + AdminMessage_NETWORK_CONFIG AdminMessage_ConfigType = 3 + // TODO: REPLACE + AdminMessage_DISPLAY_CONFIG AdminMessage_ConfigType = 4 + // TODO: REPLACE + AdminMessage_LORA_CONFIG AdminMessage_ConfigType = 5 + // TODO: REPLACE + AdminMessage_BLUETOOTH_CONFIG AdminMessage_ConfigType = 6 + // TODO: REPLACE + AdminMessage_SECURITY_CONFIG AdminMessage_ConfigType = 7 + // Session key config + AdminMessage_SESSIONKEY_CONFIG AdminMessage_ConfigType = 8 + // device-ui config + AdminMessage_DEVICEUI_CONFIG AdminMessage_ConfigType = 9 +) + +// Enum value maps for AdminMessage_ConfigType. +var ( + AdminMessage_ConfigType_name = map[int32]string{ + 0: "DEVICE_CONFIG", + 1: "POSITION_CONFIG", + 2: "POWER_CONFIG", + 3: "NETWORK_CONFIG", + 4: "DISPLAY_CONFIG", + 5: "LORA_CONFIG", + 6: "BLUETOOTH_CONFIG", + 7: "SECURITY_CONFIG", + 8: "SESSIONKEY_CONFIG", + 9: "DEVICEUI_CONFIG", + } + AdminMessage_ConfigType_value = map[string]int32{ + "DEVICE_CONFIG": 0, + "POSITION_CONFIG": 1, + "POWER_CONFIG": 2, + "NETWORK_CONFIG": 3, + "DISPLAY_CONFIG": 4, + "LORA_CONFIG": 5, + "BLUETOOTH_CONFIG": 6, + "SECURITY_CONFIG": 7, + "SESSIONKEY_CONFIG": 8, + "DEVICEUI_CONFIG": 9, + } +) + +func (x AdminMessage_ConfigType) Enum() *AdminMessage_ConfigType { + p := new(AdminMessage_ConfigType) + *p = x + return p +} + +func (x AdminMessage_ConfigType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdminMessage_ConfigType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_admin_proto_enumTypes[0].Descriptor() +} + +func (AdminMessage_ConfigType) Type() protoreflect.EnumType { + return &file_meshtastic_admin_proto_enumTypes[0] +} + +func (x AdminMessage_ConfigType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdminMessage_ConfigType.Descriptor instead. +func (AdminMessage_ConfigType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{0, 0} +} + +// TODO: REPLACE +type AdminMessage_ModuleConfigType int32 + +const ( + // TODO: REPLACE + AdminMessage_MQTT_CONFIG AdminMessage_ModuleConfigType = 0 + // TODO: REPLACE + AdminMessage_SERIAL_CONFIG AdminMessage_ModuleConfigType = 1 + // TODO: REPLACE + AdminMessage_EXTNOTIF_CONFIG AdminMessage_ModuleConfigType = 2 + // TODO: REPLACE + AdminMessage_STOREFORWARD_CONFIG AdminMessage_ModuleConfigType = 3 + // TODO: REPLACE + AdminMessage_RANGETEST_CONFIG AdminMessage_ModuleConfigType = 4 + // TODO: REPLACE + AdminMessage_TELEMETRY_CONFIG AdminMessage_ModuleConfigType = 5 + // TODO: REPLACE + AdminMessage_CANNEDMSG_CONFIG AdminMessage_ModuleConfigType = 6 + // TODO: REPLACE + AdminMessage_AUDIO_CONFIG AdminMessage_ModuleConfigType = 7 + // TODO: REPLACE + AdminMessage_REMOTEHARDWARE_CONFIG AdminMessage_ModuleConfigType = 8 + // TODO: REPLACE + AdminMessage_NEIGHBORINFO_CONFIG AdminMessage_ModuleConfigType = 9 + // TODO: REPLACE + AdminMessage_AMBIENTLIGHTING_CONFIG AdminMessage_ModuleConfigType = 10 + // TODO: REPLACE + AdminMessage_DETECTIONSENSOR_CONFIG AdminMessage_ModuleConfigType = 11 + // TODO: REPLACE + AdminMessage_PAXCOUNTER_CONFIG AdminMessage_ModuleConfigType = 12 +) + +// Enum value maps for AdminMessage_ModuleConfigType. +var ( + AdminMessage_ModuleConfigType_name = map[int32]string{ + 0: "MQTT_CONFIG", + 1: "SERIAL_CONFIG", + 2: "EXTNOTIF_CONFIG", + 3: "STOREFORWARD_CONFIG", + 4: "RANGETEST_CONFIG", + 5: "TELEMETRY_CONFIG", + 6: "CANNEDMSG_CONFIG", + 7: "AUDIO_CONFIG", + 8: "REMOTEHARDWARE_CONFIG", + 9: "NEIGHBORINFO_CONFIG", + 10: "AMBIENTLIGHTING_CONFIG", + 11: "DETECTIONSENSOR_CONFIG", + 12: "PAXCOUNTER_CONFIG", + } + AdminMessage_ModuleConfigType_value = map[string]int32{ + "MQTT_CONFIG": 0, + "SERIAL_CONFIG": 1, + "EXTNOTIF_CONFIG": 2, + "STOREFORWARD_CONFIG": 3, + "RANGETEST_CONFIG": 4, + "TELEMETRY_CONFIG": 5, + "CANNEDMSG_CONFIG": 6, + "AUDIO_CONFIG": 7, + "REMOTEHARDWARE_CONFIG": 8, + "NEIGHBORINFO_CONFIG": 9, + "AMBIENTLIGHTING_CONFIG": 10, + "DETECTIONSENSOR_CONFIG": 11, + "PAXCOUNTER_CONFIG": 12, + } +) + +func (x AdminMessage_ModuleConfigType) Enum() *AdminMessage_ModuleConfigType { + p := new(AdminMessage_ModuleConfigType) + *p = x + return p +} + +func (x AdminMessage_ModuleConfigType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdminMessage_ModuleConfigType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_admin_proto_enumTypes[1].Descriptor() +} + +func (AdminMessage_ModuleConfigType) Type() protoreflect.EnumType { + return &file_meshtastic_admin_proto_enumTypes[1] +} + +func (x AdminMessage_ModuleConfigType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdminMessage_ModuleConfigType.Descriptor instead. +func (AdminMessage_ModuleConfigType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{0, 1} +} + +type AdminMessage_BackupLocation int32 + +const ( + // Backup to the internal flash + AdminMessage_FLASH AdminMessage_BackupLocation = 0 + // Backup to the SD card + AdminMessage_SD AdminMessage_BackupLocation = 1 +) + +// Enum value maps for AdminMessage_BackupLocation. +var ( + AdminMessage_BackupLocation_name = map[int32]string{ + 0: "FLASH", + 1: "SD", + } + AdminMessage_BackupLocation_value = map[string]int32{ + "FLASH": 0, + "SD": 1, + } +) + +func (x AdminMessage_BackupLocation) Enum() *AdminMessage_BackupLocation { + p := new(AdminMessage_BackupLocation) + *p = x + return p +} + +func (x AdminMessage_BackupLocation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AdminMessage_BackupLocation) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_admin_proto_enumTypes[2].Descriptor() +} + +func (AdminMessage_BackupLocation) Type() protoreflect.EnumType { + return &file_meshtastic_admin_proto_enumTypes[2] +} + +func (x AdminMessage_BackupLocation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AdminMessage_BackupLocation.Descriptor instead. +func (AdminMessage_BackupLocation) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{0, 2} +} + +// This message is handled by the Admin module and is responsible for all settings/channel read/write operations. +// This message is used to do settings operations to both remote AND local nodes. +// (Prior to 1.2 these operations were done via special ToRadio operations) +type AdminMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The node generates this key and sends it with any get_x_response packets. + // The client MUST include the same key with any set_x commands. Key expires after 300 seconds. + // Prevents replay attacks for admin messages. + SessionPasskey []byte `protobuf:"bytes,101,opt,name=session_passkey,json=sessionPasskey,proto3" json:"session_passkey,omitempty"` + // TODO: REPLACE + // + // Types that are valid to be assigned to PayloadVariant: + // + // *AdminMessage_GetChannelRequest + // *AdminMessage_GetChannelResponse + // *AdminMessage_GetOwnerRequest + // *AdminMessage_GetOwnerResponse + // *AdminMessage_GetConfigRequest + // *AdminMessage_GetConfigResponse + // *AdminMessage_GetModuleConfigRequest + // *AdminMessage_GetModuleConfigResponse + // *AdminMessage_GetCannedMessageModuleMessagesRequest + // *AdminMessage_GetCannedMessageModuleMessagesResponse + // *AdminMessage_GetDeviceMetadataRequest + // *AdminMessage_GetDeviceMetadataResponse + // *AdminMessage_GetRingtoneRequest + // *AdminMessage_GetRingtoneResponse + // *AdminMessage_GetDeviceConnectionStatusRequest + // *AdminMessage_GetDeviceConnectionStatusResponse + // *AdminMessage_SetHamMode + // *AdminMessage_GetNodeRemoteHardwarePinsRequest + // *AdminMessage_GetNodeRemoteHardwarePinsResponse + // *AdminMessage_EnterDfuModeRequest + // *AdminMessage_DeleteFileRequest + // *AdminMessage_SetScale + // *AdminMessage_BackupPreferences + // *AdminMessage_RestorePreferences + // *AdminMessage_RemoveBackupPreferences + // *AdminMessage_SetOwner + // *AdminMessage_SetChannel + // *AdminMessage_SetConfig + // *AdminMessage_SetModuleConfig + // *AdminMessage_SetCannedMessageModuleMessages + // *AdminMessage_SetRingtoneMessage + // *AdminMessage_RemoveByNodenum + // *AdminMessage_SetFavoriteNode + // *AdminMessage_RemoveFavoriteNode + // *AdminMessage_SetFixedPosition + // *AdminMessage_RemoveFixedPosition + // *AdminMessage_SetTimeOnly + // *AdminMessage_GetUiConfigRequest + // *AdminMessage_GetUiConfigResponse + // *AdminMessage_StoreUiConfig + // *AdminMessage_SetIgnoredNode + // *AdminMessage_RemoveIgnoredNode + // *AdminMessage_BeginEditSettings + // *AdminMessage_CommitEditSettings + // *AdminMessage_FactoryResetDevice + // *AdminMessage_RebootOtaSeconds + // *AdminMessage_ExitSimulator + // *AdminMessage_RebootSeconds + // *AdminMessage_ShutdownSeconds + // *AdminMessage_FactoryResetConfig + // *AdminMessage_NodedbReset + PayloadVariant isAdminMessage_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdminMessage) Reset() { + *x = AdminMessage{} + mi := &file_meshtastic_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdminMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminMessage) ProtoMessage() {} + +func (x *AdminMessage) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_admin_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 AdminMessage.ProtoReflect.Descriptor instead. +func (*AdminMessage) Descriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{0} +} + +func (x *AdminMessage) GetSessionPasskey() []byte { + if x != nil { + return x.SessionPasskey + } + return nil +} + +func (x *AdminMessage) GetPayloadVariant() isAdminMessage_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *AdminMessage) GetGetChannelRequest() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetChannelRequest); ok { + return x.GetChannelRequest + } + } + return 0 +} + +func (x *AdminMessage) GetGetChannelResponse() *Channel { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetChannelResponse); ok { + return x.GetChannelResponse + } + } + return nil +} + +func (x *AdminMessage) GetGetOwnerRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetOwnerRequest); ok { + return x.GetOwnerRequest + } + } + return false +} + +func (x *AdminMessage) GetGetOwnerResponse() *User { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetOwnerResponse); ok { + return x.GetOwnerResponse + } + } + return nil +} + +func (x *AdminMessage) GetGetConfigRequest() AdminMessage_ConfigType { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetConfigRequest); ok { + return x.GetConfigRequest + } + } + return AdminMessage_DEVICE_CONFIG +} + +func (x *AdminMessage) GetGetConfigResponse() *Config { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetConfigResponse); ok { + return x.GetConfigResponse + } + } + return nil +} + +func (x *AdminMessage) GetGetModuleConfigRequest() AdminMessage_ModuleConfigType { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetModuleConfigRequest); ok { + return x.GetModuleConfigRequest + } + } + return AdminMessage_MQTT_CONFIG +} + +func (x *AdminMessage) GetGetModuleConfigResponse() *ModuleConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetModuleConfigResponse); ok { + return x.GetModuleConfigResponse + } + } + return nil +} + +func (x *AdminMessage) GetGetCannedMessageModuleMessagesRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetCannedMessageModuleMessagesRequest); ok { + return x.GetCannedMessageModuleMessagesRequest + } + } + return false +} + +func (x *AdminMessage) GetGetCannedMessageModuleMessagesResponse() string { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetCannedMessageModuleMessagesResponse); ok { + return x.GetCannedMessageModuleMessagesResponse + } + } + return "" +} + +func (x *AdminMessage) GetGetDeviceMetadataRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetDeviceMetadataRequest); ok { + return x.GetDeviceMetadataRequest + } + } + return false +} + +func (x *AdminMessage) GetGetDeviceMetadataResponse() *DeviceMetadata { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetDeviceMetadataResponse); ok { + return x.GetDeviceMetadataResponse + } + } + return nil +} + +func (x *AdminMessage) GetGetRingtoneRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetRingtoneRequest); ok { + return x.GetRingtoneRequest + } + } + return false +} + +func (x *AdminMessage) GetGetRingtoneResponse() string { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetRingtoneResponse); ok { + return x.GetRingtoneResponse + } + } + return "" +} + +func (x *AdminMessage) GetGetDeviceConnectionStatusRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetDeviceConnectionStatusRequest); ok { + return x.GetDeviceConnectionStatusRequest + } + } + return false +} + +func (x *AdminMessage) GetGetDeviceConnectionStatusResponse() *DeviceConnectionStatus { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetDeviceConnectionStatusResponse); ok { + return x.GetDeviceConnectionStatusResponse + } + } + return nil +} + +func (x *AdminMessage) GetSetHamMode() *HamParameters { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetHamMode); ok { + return x.SetHamMode + } + } + return nil +} + +func (x *AdminMessage) GetGetNodeRemoteHardwarePinsRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetNodeRemoteHardwarePinsRequest); ok { + return x.GetNodeRemoteHardwarePinsRequest + } + } + return false +} + +func (x *AdminMessage) GetGetNodeRemoteHardwarePinsResponse() *NodeRemoteHardwarePinsResponse { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetNodeRemoteHardwarePinsResponse); ok { + return x.GetNodeRemoteHardwarePinsResponse + } + } + return nil +} + +func (x *AdminMessage) GetEnterDfuModeRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_EnterDfuModeRequest); ok { + return x.EnterDfuModeRequest + } + } + return false +} + +func (x *AdminMessage) GetDeleteFileRequest() string { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_DeleteFileRequest); ok { + return x.DeleteFileRequest + } + } + return "" +} + +func (x *AdminMessage) GetSetScale() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetScale); ok { + return x.SetScale + } + } + return 0 +} + +func (x *AdminMessage) GetBackupPreferences() AdminMessage_BackupLocation { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_BackupPreferences); ok { + return x.BackupPreferences + } + } + return AdminMessage_FLASH +} + +func (x *AdminMessage) GetRestorePreferences() AdminMessage_BackupLocation { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RestorePreferences); ok { + return x.RestorePreferences + } + } + return AdminMessage_FLASH +} + +func (x *AdminMessage) GetRemoveBackupPreferences() AdminMessage_BackupLocation { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RemoveBackupPreferences); ok { + return x.RemoveBackupPreferences + } + } + return AdminMessage_FLASH +} + +func (x *AdminMessage) GetSetOwner() *User { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetOwner); ok { + return x.SetOwner + } + } + return nil +} + +func (x *AdminMessage) GetSetChannel() *Channel { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetChannel); ok { + return x.SetChannel + } + } + return nil +} + +func (x *AdminMessage) GetSetConfig() *Config { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetConfig); ok { + return x.SetConfig + } + } + return nil +} + +func (x *AdminMessage) GetSetModuleConfig() *ModuleConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetModuleConfig); ok { + return x.SetModuleConfig + } + } + return nil +} + +func (x *AdminMessage) GetSetCannedMessageModuleMessages() string { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetCannedMessageModuleMessages); ok { + return x.SetCannedMessageModuleMessages + } + } + return "" +} + +func (x *AdminMessage) GetSetRingtoneMessage() string { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetRingtoneMessage); ok { + return x.SetRingtoneMessage + } + } + return "" +} + +func (x *AdminMessage) GetRemoveByNodenum() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RemoveByNodenum); ok { + return x.RemoveByNodenum + } + } + return 0 +} + +func (x *AdminMessage) GetSetFavoriteNode() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetFavoriteNode); ok { + return x.SetFavoriteNode + } + } + return 0 +} + +func (x *AdminMessage) GetRemoveFavoriteNode() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RemoveFavoriteNode); ok { + return x.RemoveFavoriteNode + } + } + return 0 +} + +func (x *AdminMessage) GetSetFixedPosition() *Position { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetFixedPosition); ok { + return x.SetFixedPosition + } + } + return nil +} + +func (x *AdminMessage) GetRemoveFixedPosition() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RemoveFixedPosition); ok { + return x.RemoveFixedPosition + } + } + return false +} + +func (x *AdminMessage) GetSetTimeOnly() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetTimeOnly); ok { + return x.SetTimeOnly + } + } + return 0 +} + +func (x *AdminMessage) GetGetUiConfigRequest() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetUiConfigRequest); ok { + return x.GetUiConfigRequest + } + } + return false +} + +func (x *AdminMessage) GetGetUiConfigResponse() *DeviceUIConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_GetUiConfigResponse); ok { + return x.GetUiConfigResponse + } + } + return nil +} + +func (x *AdminMessage) GetStoreUiConfig() *DeviceUIConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_StoreUiConfig); ok { + return x.StoreUiConfig + } + } + return nil +} + +func (x *AdminMessage) GetSetIgnoredNode() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_SetIgnoredNode); ok { + return x.SetIgnoredNode + } + } + return 0 +} + +func (x *AdminMessage) GetRemoveIgnoredNode() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RemoveIgnoredNode); ok { + return x.RemoveIgnoredNode + } + } + return 0 +} + +func (x *AdminMessage) GetBeginEditSettings() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_BeginEditSettings); ok { + return x.BeginEditSettings + } + } + return false +} + +func (x *AdminMessage) GetCommitEditSettings() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_CommitEditSettings); ok { + return x.CommitEditSettings + } + } + return false +} + +func (x *AdminMessage) GetFactoryResetDevice() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_FactoryResetDevice); ok { + return x.FactoryResetDevice + } + } + return 0 +} + +func (x *AdminMessage) GetRebootOtaSeconds() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RebootOtaSeconds); ok { + return x.RebootOtaSeconds + } + } + return 0 +} + +func (x *AdminMessage) GetExitSimulator() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_ExitSimulator); ok { + return x.ExitSimulator + } + } + return false +} + +func (x *AdminMessage) GetRebootSeconds() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_RebootSeconds); ok { + return x.RebootSeconds + } + } + return 0 +} + +func (x *AdminMessage) GetShutdownSeconds() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_ShutdownSeconds); ok { + return x.ShutdownSeconds + } + } + return 0 +} + +func (x *AdminMessage) GetFactoryResetConfig() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_FactoryResetConfig); ok { + return x.FactoryResetConfig + } + } + return 0 +} + +func (x *AdminMessage) GetNodedbReset() int32 { + if x != nil { + if x, ok := x.PayloadVariant.(*AdminMessage_NodedbReset); ok { + return x.NodedbReset + } + } + return 0 +} + +type isAdminMessage_PayloadVariant interface { + isAdminMessage_PayloadVariant() +} + +type AdminMessage_GetChannelRequest struct { + // Send the specified channel in the response to this message + // NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) + GetChannelRequest uint32 `protobuf:"varint,1,opt,name=get_channel_request,json=getChannelRequest,proto3,oneof"` +} + +type AdminMessage_GetChannelResponse struct { + // TODO: REPLACE + GetChannelResponse *Channel `protobuf:"bytes,2,opt,name=get_channel_response,json=getChannelResponse,proto3,oneof"` +} + +type AdminMessage_GetOwnerRequest struct { + // Send the current owner data in the response to this message. + GetOwnerRequest bool `protobuf:"varint,3,opt,name=get_owner_request,json=getOwnerRequest,proto3,oneof"` +} + +type AdminMessage_GetOwnerResponse struct { + // TODO: REPLACE + GetOwnerResponse *User `protobuf:"bytes,4,opt,name=get_owner_response,json=getOwnerResponse,proto3,oneof"` +} + +type AdminMessage_GetConfigRequest struct { + // Ask for the following config data to be sent + GetConfigRequest AdminMessage_ConfigType `protobuf:"varint,5,opt,name=get_config_request,json=getConfigRequest,proto3,enum=meshtastic.AdminMessage_ConfigType,oneof"` +} + +type AdminMessage_GetConfigResponse struct { + // Send the current Config in the response to this message. + GetConfigResponse *Config `protobuf:"bytes,6,opt,name=get_config_response,json=getConfigResponse,proto3,oneof"` +} + +type AdminMessage_GetModuleConfigRequest struct { + // Ask for the following config data to be sent + GetModuleConfigRequest AdminMessage_ModuleConfigType `protobuf:"varint,7,opt,name=get_module_config_request,json=getModuleConfigRequest,proto3,enum=meshtastic.AdminMessage_ModuleConfigType,oneof"` +} + +type AdminMessage_GetModuleConfigResponse struct { + // Send the current Config in the response to this message. + GetModuleConfigResponse *ModuleConfig `protobuf:"bytes,8,opt,name=get_module_config_response,json=getModuleConfigResponse,proto3,oneof"` +} + +type AdminMessage_GetCannedMessageModuleMessagesRequest struct { + // Get the Canned Message Module messages in the response to this message. + GetCannedMessageModuleMessagesRequest bool `protobuf:"varint,10,opt,name=get_canned_message_module_messages_request,json=getCannedMessageModuleMessagesRequest,proto3,oneof"` +} + +type AdminMessage_GetCannedMessageModuleMessagesResponse struct { + // Get the Canned Message Module messages in the response to this message. + GetCannedMessageModuleMessagesResponse string `protobuf:"bytes,11,opt,name=get_canned_message_module_messages_response,json=getCannedMessageModuleMessagesResponse,proto3,oneof"` +} + +type AdminMessage_GetDeviceMetadataRequest struct { + // Request the node to send device metadata (firmware, protobuf version, etc) + GetDeviceMetadataRequest bool `protobuf:"varint,12,opt,name=get_device_metadata_request,json=getDeviceMetadataRequest,proto3,oneof"` +} + +type AdminMessage_GetDeviceMetadataResponse struct { + // Device metadata response + GetDeviceMetadataResponse *DeviceMetadata `protobuf:"bytes,13,opt,name=get_device_metadata_response,json=getDeviceMetadataResponse,proto3,oneof"` +} + +type AdminMessage_GetRingtoneRequest struct { + // Get the Ringtone in the response to this message. + GetRingtoneRequest bool `protobuf:"varint,14,opt,name=get_ringtone_request,json=getRingtoneRequest,proto3,oneof"` +} + +type AdminMessage_GetRingtoneResponse struct { + // Get the Ringtone in the response to this message. + GetRingtoneResponse string `protobuf:"bytes,15,opt,name=get_ringtone_response,json=getRingtoneResponse,proto3,oneof"` +} + +type AdminMessage_GetDeviceConnectionStatusRequest struct { + // Request the node to send it's connection status + GetDeviceConnectionStatusRequest bool `protobuf:"varint,16,opt,name=get_device_connection_status_request,json=getDeviceConnectionStatusRequest,proto3,oneof"` +} + +type AdminMessage_GetDeviceConnectionStatusResponse struct { + // Device connection status response + GetDeviceConnectionStatusResponse *DeviceConnectionStatus `protobuf:"bytes,17,opt,name=get_device_connection_status_response,json=getDeviceConnectionStatusResponse,proto3,oneof"` +} + +type AdminMessage_SetHamMode struct { + // Setup a node for licensed amateur (ham) radio operation + SetHamMode *HamParameters `protobuf:"bytes,18,opt,name=set_ham_mode,json=setHamMode,proto3,oneof"` +} + +type AdminMessage_GetNodeRemoteHardwarePinsRequest struct { + // Get the mesh's nodes with their available gpio pins for RemoteHardware module use + GetNodeRemoteHardwarePinsRequest bool `protobuf:"varint,19,opt,name=get_node_remote_hardware_pins_request,json=getNodeRemoteHardwarePinsRequest,proto3,oneof"` +} + +type AdminMessage_GetNodeRemoteHardwarePinsResponse struct { + // Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use + GetNodeRemoteHardwarePinsResponse *NodeRemoteHardwarePinsResponse `protobuf:"bytes,20,opt,name=get_node_remote_hardware_pins_response,json=getNodeRemoteHardwarePinsResponse,proto3,oneof"` +} + +type AdminMessage_EnterDfuModeRequest struct { + // Enter (UF2) DFU mode + // Only implemented on NRF52 currently + EnterDfuModeRequest bool `protobuf:"varint,21,opt,name=enter_dfu_mode_request,json=enterDfuModeRequest,proto3,oneof"` +} + +type AdminMessage_DeleteFileRequest struct { + // Delete the file by the specified path from the device + DeleteFileRequest string `protobuf:"bytes,22,opt,name=delete_file_request,json=deleteFileRequest,proto3,oneof"` +} + +type AdminMessage_SetScale struct { + // Set zero and offset for scale chips + SetScale uint32 `protobuf:"varint,23,opt,name=set_scale,json=setScale,proto3,oneof"` +} + +type AdminMessage_BackupPreferences struct { + // Backup the node's preferences + BackupPreferences AdminMessage_BackupLocation `protobuf:"varint,24,opt,name=backup_preferences,json=backupPreferences,proto3,enum=meshtastic.AdminMessage_BackupLocation,oneof"` +} + +type AdminMessage_RestorePreferences struct { + // Restore the node's preferences + RestorePreferences AdminMessage_BackupLocation `protobuf:"varint,25,opt,name=restore_preferences,json=restorePreferences,proto3,enum=meshtastic.AdminMessage_BackupLocation,oneof"` +} + +type AdminMessage_RemoveBackupPreferences struct { + // Remove backups of the node's preferences + RemoveBackupPreferences AdminMessage_BackupLocation `protobuf:"varint,26,opt,name=remove_backup_preferences,json=removeBackupPreferences,proto3,enum=meshtastic.AdminMessage_BackupLocation,oneof"` +} + +type AdminMessage_SetOwner struct { + // Set the owner for this node + SetOwner *User `protobuf:"bytes,32,opt,name=set_owner,json=setOwner,proto3,oneof"` +} + +type AdminMessage_SetChannel struct { + // Set channels (using the new API). + // A special channel is the "primary channel". + // The other records are secondary channels. + // Note: only one channel can be marked as primary. + // If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. + SetChannel *Channel `protobuf:"bytes,33,opt,name=set_channel,json=setChannel,proto3,oneof"` +} + +type AdminMessage_SetConfig struct { + // Set the current Config + SetConfig *Config `protobuf:"bytes,34,opt,name=set_config,json=setConfig,proto3,oneof"` +} + +type AdminMessage_SetModuleConfig struct { + // Set the current Config + SetModuleConfig *ModuleConfig `protobuf:"bytes,35,opt,name=set_module_config,json=setModuleConfig,proto3,oneof"` +} + +type AdminMessage_SetCannedMessageModuleMessages struct { + // Set the Canned Message Module messages text. + SetCannedMessageModuleMessages string `protobuf:"bytes,36,opt,name=set_canned_message_module_messages,json=setCannedMessageModuleMessages,proto3,oneof"` +} + +type AdminMessage_SetRingtoneMessage struct { + // Set the ringtone for ExternalNotification. + SetRingtoneMessage string `protobuf:"bytes,37,opt,name=set_ringtone_message,json=setRingtoneMessage,proto3,oneof"` +} + +type AdminMessage_RemoveByNodenum struct { + // Remove the node by the specified node-num from the NodeDB on the device + RemoveByNodenum uint32 `protobuf:"varint,38,opt,name=remove_by_nodenum,json=removeByNodenum,proto3,oneof"` +} + +type AdminMessage_SetFavoriteNode struct { + // Set specified node-num to be favorited on the NodeDB on the device + SetFavoriteNode uint32 `protobuf:"varint,39,opt,name=set_favorite_node,json=setFavoriteNode,proto3,oneof"` +} + +type AdminMessage_RemoveFavoriteNode struct { + // Set specified node-num to be un-favorited on the NodeDB on the device + RemoveFavoriteNode uint32 `protobuf:"varint,40,opt,name=remove_favorite_node,json=removeFavoriteNode,proto3,oneof"` +} + +type AdminMessage_SetFixedPosition struct { + // Set fixed position data on the node and then set the position.fixed_position = true + SetFixedPosition *Position `protobuf:"bytes,41,opt,name=set_fixed_position,json=setFixedPosition,proto3,oneof"` +} + +type AdminMessage_RemoveFixedPosition struct { + // Clear fixed position coordinates and then set position.fixed_position = false + RemoveFixedPosition bool `protobuf:"varint,42,opt,name=remove_fixed_position,json=removeFixedPosition,proto3,oneof"` +} + +type AdminMessage_SetTimeOnly struct { + // Set time only on the node + // Convenience method to set the time on the node (as Net quality) without any other position data + SetTimeOnly uint32 `protobuf:"fixed32,43,opt,name=set_time_only,json=setTimeOnly,proto3,oneof"` +} + +type AdminMessage_GetUiConfigRequest struct { + // Tell the node to send the stored ui data. + GetUiConfigRequest bool `protobuf:"varint,44,opt,name=get_ui_config_request,json=getUiConfigRequest,proto3,oneof"` +} + +type AdminMessage_GetUiConfigResponse struct { + // Reply stored device ui data. + GetUiConfigResponse *DeviceUIConfig `protobuf:"bytes,45,opt,name=get_ui_config_response,json=getUiConfigResponse,proto3,oneof"` +} + +type AdminMessage_StoreUiConfig struct { + // Tell the node to store UI data persistently. + StoreUiConfig *DeviceUIConfig `protobuf:"bytes,46,opt,name=store_ui_config,json=storeUiConfig,proto3,oneof"` +} + +type AdminMessage_SetIgnoredNode struct { + // Set specified node-num to be ignored on the NodeDB on the device + SetIgnoredNode uint32 `protobuf:"varint,47,opt,name=set_ignored_node,json=setIgnoredNode,proto3,oneof"` +} + +type AdminMessage_RemoveIgnoredNode struct { + // Set specified node-num to be un-ignored on the NodeDB on the device + RemoveIgnoredNode uint32 `protobuf:"varint,48,opt,name=remove_ignored_node,json=removeIgnoredNode,proto3,oneof"` +} + +type AdminMessage_BeginEditSettings struct { + // Begins an edit transaction for config, module config, owner, and channel settings changes + // This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) + BeginEditSettings bool `protobuf:"varint,64,opt,name=begin_edit_settings,json=beginEditSettings,proto3,oneof"` +} + +type AdminMessage_CommitEditSettings struct { + // Commits an open transaction for any edits made to config, module config, owner, and channel settings + CommitEditSettings bool `protobuf:"varint,65,opt,name=commit_edit_settings,json=commitEditSettings,proto3,oneof"` +} + +type AdminMessage_FactoryResetDevice struct { + // Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. + FactoryResetDevice int32 `protobuf:"varint,94,opt,name=factory_reset_device,json=factoryResetDevice,proto3,oneof"` +} + +type AdminMessage_RebootOtaSeconds struct { + // Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) + // Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. + RebootOtaSeconds int32 `protobuf:"varint,95,opt,name=reboot_ota_seconds,json=rebootOtaSeconds,proto3,oneof"` +} + +type AdminMessage_ExitSimulator struct { + // This message is only supported for the simulator Portduino build. + // If received the simulator will exit successfully. + ExitSimulator bool `protobuf:"varint,96,opt,name=exit_simulator,json=exitSimulator,proto3,oneof"` +} + +type AdminMessage_RebootSeconds struct { + // Tell the node to reboot in this many seconds (or <0 to cancel reboot) + RebootSeconds int32 `protobuf:"varint,97,opt,name=reboot_seconds,json=rebootSeconds,proto3,oneof"` +} + +type AdminMessage_ShutdownSeconds struct { + // Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) + ShutdownSeconds int32 `protobuf:"varint,98,opt,name=shutdown_seconds,json=shutdownSeconds,proto3,oneof"` +} + +type AdminMessage_FactoryResetConfig struct { + // Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved. + FactoryResetConfig int32 `protobuf:"varint,99,opt,name=factory_reset_config,json=factoryResetConfig,proto3,oneof"` +} + +type AdminMessage_NodedbReset struct { + // Tell the node to reset the nodedb. + NodedbReset int32 `protobuf:"varint,100,opt,name=nodedb_reset,json=nodedbReset,proto3,oneof"` +} + +func (*AdminMessage_GetChannelRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetChannelResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetOwnerRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetOwnerResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetConfigRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetConfigResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetModuleConfigRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetModuleConfigResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetCannedMessageModuleMessagesRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetCannedMessageModuleMessagesResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetDeviceMetadataRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetDeviceMetadataResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetRingtoneRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetRingtoneResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetDeviceConnectionStatusRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetDeviceConnectionStatusResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetHamMode) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetNodeRemoteHardwarePinsRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetNodeRemoteHardwarePinsResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_EnterDfuModeRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_DeleteFileRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetScale) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_BackupPreferences) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RestorePreferences) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RemoveBackupPreferences) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetOwner) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetChannel) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetConfig) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetModuleConfig) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetCannedMessageModuleMessages) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetRingtoneMessage) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RemoveByNodenum) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetFavoriteNode) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RemoveFavoriteNode) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetFixedPosition) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RemoveFixedPosition) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetTimeOnly) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetUiConfigRequest) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_GetUiConfigResponse) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_StoreUiConfig) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_SetIgnoredNode) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RemoveIgnoredNode) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_BeginEditSettings) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_CommitEditSettings) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_FactoryResetDevice) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RebootOtaSeconds) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_ExitSimulator) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_RebootSeconds) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_ShutdownSeconds) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_FactoryResetConfig) isAdminMessage_PayloadVariant() {} + +func (*AdminMessage_NodedbReset) isAdminMessage_PayloadVariant() {} + +// Parameters for setting up Meshtastic for ameteur radio usage +type HamParameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Amateur radio call sign, eg. KD2ABC + CallSign string `protobuf:"bytes,1,opt,name=call_sign,json=callSign,proto3" json:"call_sign,omitempty"` + // Transmit power in dBm at the LoRA transceiver, not including any amplification + TxPower int32 `protobuf:"varint,2,opt,name=tx_power,json=txPower,proto3" json:"tx_power,omitempty"` + // The selected frequency of LoRA operation + // Please respect your local laws, regulations, and band plans. + // Ensure your radio is capable of operating of the selected frequency before setting this. + Frequency float32 `protobuf:"fixed32,3,opt,name=frequency,proto3" json:"frequency,omitempty"` + // Optional short name of user + ShortName string `protobuf:"bytes,4,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HamParameters) Reset() { + *x = HamParameters{} + mi := &file_meshtastic_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HamParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HamParameters) ProtoMessage() {} + +func (x *HamParameters) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_admin_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 HamParameters.ProtoReflect.Descriptor instead. +func (*HamParameters) Descriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{1} +} + +func (x *HamParameters) GetCallSign() string { + if x != nil { + return x.CallSign + } + return "" +} + +func (x *HamParameters) GetTxPower() int32 { + if x != nil { + return x.TxPower + } + return 0 +} + +func (x *HamParameters) GetFrequency() float32 { + if x != nil { + return x.Frequency + } + return 0 +} + +func (x *HamParameters) GetShortName() string { + if x != nil { + return x.ShortName + } + return "" +} + +// Response envelope for node_remote_hardware_pins +type NodeRemoteHardwarePinsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Nodes and their respective remote hardware GPIO pins + NodeRemoteHardwarePins []*NodeRemoteHardwarePin `protobuf:"bytes,1,rep,name=node_remote_hardware_pins,json=nodeRemoteHardwarePins,proto3" json:"node_remote_hardware_pins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NodeRemoteHardwarePinsResponse) Reset() { + *x = NodeRemoteHardwarePinsResponse{} + mi := &file_meshtastic_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NodeRemoteHardwarePinsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeRemoteHardwarePinsResponse) ProtoMessage() {} + +func (x *NodeRemoteHardwarePinsResponse) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_admin_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 NodeRemoteHardwarePinsResponse.ProtoReflect.Descriptor instead. +func (*NodeRemoteHardwarePinsResponse) Descriptor() ([]byte, []int) { + return file_meshtastic_admin_proto_rawDescGZIP(), []int{2} +} + +func (x *NodeRemoteHardwarePinsResponse) GetNodeRemoteHardwarePins() []*NodeRemoteHardwarePin { + if x != nil { + return x.NodeRemoteHardwarePins + } + return nil +} + +var File_meshtastic_admin_proto protoreflect.FileDescriptor + +const file_meshtastic_admin_proto_rawDesc = "" + + "\n" + + "\x16meshtastic/admin.proto\x12\n" + + "meshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\x1a\"meshtastic/connection_status.proto\x1a\x15meshtastic/mesh.proto\x1a\x1emeshtastic/module_config.proto\x1a\x1ameshtastic/device_ui.proto\"\xfd\x1e\n" + + "\fAdminMessage\x12'\n" + + "\x0fsession_passkey\x18e \x01(\fR\x0esessionPasskey\x120\n" + + "\x13get_channel_request\x18\x01 \x01(\rH\x00R\x11getChannelRequest\x12G\n" + + "\x14get_channel_response\x18\x02 \x01(\v2\x13.meshtastic.ChannelH\x00R\x12getChannelResponse\x12,\n" + + "\x11get_owner_request\x18\x03 \x01(\bH\x00R\x0fgetOwnerRequest\x12@\n" + + "\x12get_owner_response\x18\x04 \x01(\v2\x10.meshtastic.UserH\x00R\x10getOwnerResponse\x12S\n" + + "\x12get_config_request\x18\x05 \x01(\x0e2#.meshtastic.AdminMessage.ConfigTypeH\x00R\x10getConfigRequest\x12D\n" + + "\x13get_config_response\x18\x06 \x01(\v2\x12.meshtastic.ConfigH\x00R\x11getConfigResponse\x12f\n" + + "\x19get_module_config_request\x18\a \x01(\x0e2).meshtastic.AdminMessage.ModuleConfigTypeH\x00R\x16getModuleConfigRequest\x12W\n" + + "\x1aget_module_config_response\x18\b \x01(\v2\x18.meshtastic.ModuleConfigH\x00R\x17getModuleConfigResponse\x12[\n" + + "*get_canned_message_module_messages_request\x18\n" + + " \x01(\bH\x00R%getCannedMessageModuleMessagesRequest\x12]\n" + + "+get_canned_message_module_messages_response\x18\v \x01(\tH\x00R&getCannedMessageModuleMessagesResponse\x12?\n" + + "\x1bget_device_metadata_request\x18\f \x01(\bH\x00R\x18getDeviceMetadataRequest\x12]\n" + + "\x1cget_device_metadata_response\x18\r \x01(\v2\x1a.meshtastic.DeviceMetadataH\x00R\x19getDeviceMetadataResponse\x122\n" + + "\x14get_ringtone_request\x18\x0e \x01(\bH\x00R\x12getRingtoneRequest\x124\n" + + "\x15get_ringtone_response\x18\x0f \x01(\tH\x00R\x13getRingtoneResponse\x12P\n" + + "$get_device_connection_status_request\x18\x10 \x01(\bH\x00R getDeviceConnectionStatusRequest\x12v\n" + + "%get_device_connection_status_response\x18\x11 \x01(\v2\".meshtastic.DeviceConnectionStatusH\x00R!getDeviceConnectionStatusResponse\x12=\n" + + "\fset_ham_mode\x18\x12 \x01(\v2\x19.meshtastic.HamParametersH\x00R\n" + + "setHamMode\x12Q\n" + + "%get_node_remote_hardware_pins_request\x18\x13 \x01(\bH\x00R getNodeRemoteHardwarePinsRequest\x12\x7f\n" + + "&get_node_remote_hardware_pins_response\x18\x14 \x01(\v2*.meshtastic.NodeRemoteHardwarePinsResponseH\x00R!getNodeRemoteHardwarePinsResponse\x125\n" + + "\x16enter_dfu_mode_request\x18\x15 \x01(\bH\x00R\x13enterDfuModeRequest\x120\n" + + "\x13delete_file_request\x18\x16 \x01(\tH\x00R\x11deleteFileRequest\x12\x1d\n" + + "\tset_scale\x18\x17 \x01(\rH\x00R\bsetScale\x12X\n" + + "\x12backup_preferences\x18\x18 \x01(\x0e2'.meshtastic.AdminMessage.BackupLocationH\x00R\x11backupPreferences\x12Z\n" + + "\x13restore_preferences\x18\x19 \x01(\x0e2'.meshtastic.AdminMessage.BackupLocationH\x00R\x12restorePreferences\x12e\n" + + "\x19remove_backup_preferences\x18\x1a \x01(\x0e2'.meshtastic.AdminMessage.BackupLocationH\x00R\x17removeBackupPreferences\x12/\n" + + "\tset_owner\x18 \x01(\v2\x10.meshtastic.UserH\x00R\bsetOwner\x126\n" + + "\vset_channel\x18! \x01(\v2\x13.meshtastic.ChannelH\x00R\n" + + "setChannel\x123\n" + + "\n" + + "set_config\x18\" \x01(\v2\x12.meshtastic.ConfigH\x00R\tsetConfig\x12F\n" + + "\x11set_module_config\x18# \x01(\v2\x18.meshtastic.ModuleConfigH\x00R\x0fsetModuleConfig\x12L\n" + + "\"set_canned_message_module_messages\x18$ \x01(\tH\x00R\x1esetCannedMessageModuleMessages\x122\n" + + "\x14set_ringtone_message\x18% \x01(\tH\x00R\x12setRingtoneMessage\x12,\n" + + "\x11remove_by_nodenum\x18& \x01(\rH\x00R\x0fremoveByNodenum\x12,\n" + + "\x11set_favorite_node\x18' \x01(\rH\x00R\x0fsetFavoriteNode\x122\n" + + "\x14remove_favorite_node\x18( \x01(\rH\x00R\x12removeFavoriteNode\x12D\n" + + "\x12set_fixed_position\x18) \x01(\v2\x14.meshtastic.PositionH\x00R\x10setFixedPosition\x124\n" + + "\x15remove_fixed_position\x18* \x01(\bH\x00R\x13removeFixedPosition\x12$\n" + + "\rset_time_only\x18+ \x01(\aH\x00R\vsetTimeOnly\x123\n" + + "\x15get_ui_config_request\x18, \x01(\bH\x00R\x12getUiConfigRequest\x12Q\n" + + "\x16get_ui_config_response\x18- \x01(\v2\x1a.meshtastic.DeviceUIConfigH\x00R\x13getUiConfigResponse\x12D\n" + + "\x0fstore_ui_config\x18. \x01(\v2\x1a.meshtastic.DeviceUIConfigH\x00R\rstoreUiConfig\x12*\n" + + "\x10set_ignored_node\x18/ \x01(\rH\x00R\x0esetIgnoredNode\x120\n" + + "\x13remove_ignored_node\x180 \x01(\rH\x00R\x11removeIgnoredNode\x120\n" + + "\x13begin_edit_settings\x18@ \x01(\bH\x00R\x11beginEditSettings\x122\n" + + "\x14commit_edit_settings\x18A \x01(\bH\x00R\x12commitEditSettings\x122\n" + + "\x14factory_reset_device\x18^ \x01(\x05H\x00R\x12factoryResetDevice\x12.\n" + + "\x12reboot_ota_seconds\x18_ \x01(\x05H\x00R\x10rebootOtaSeconds\x12'\n" + + "\x0eexit_simulator\x18` \x01(\bH\x00R\rexitSimulator\x12'\n" + + "\x0ereboot_seconds\x18a \x01(\x05H\x00R\rrebootSeconds\x12+\n" + + "\x10shutdown_seconds\x18b \x01(\x05H\x00R\x0fshutdownSeconds\x122\n" + + "\x14factory_reset_config\x18c \x01(\x05H\x00R\x12factoryResetConfig\x12#\n" + + "\fnodedb_reset\x18d \x01(\x05H\x00R\vnodedbReset\"\xd6\x01\n" + + "\n" + + "ConfigType\x12\x11\n" + + "\rDEVICE_CONFIG\x10\x00\x12\x13\n" + + "\x0fPOSITION_CONFIG\x10\x01\x12\x10\n" + + "\fPOWER_CONFIG\x10\x02\x12\x12\n" + + "\x0eNETWORK_CONFIG\x10\x03\x12\x12\n" + + "\x0eDISPLAY_CONFIG\x10\x04\x12\x0f\n" + + "\vLORA_CONFIG\x10\x05\x12\x14\n" + + "\x10BLUETOOTH_CONFIG\x10\x06\x12\x13\n" + + "\x0fSECURITY_CONFIG\x10\a\x12\x15\n" + + "\x11SESSIONKEY_CONFIG\x10\b\x12\x13\n" + + "\x0fDEVICEUI_CONFIG\x10\t\"\xbb\x02\n" + + "\x10ModuleConfigType\x12\x0f\n" + + "\vMQTT_CONFIG\x10\x00\x12\x11\n" + + "\rSERIAL_CONFIG\x10\x01\x12\x13\n" + + "\x0fEXTNOTIF_CONFIG\x10\x02\x12\x17\n" + + "\x13STOREFORWARD_CONFIG\x10\x03\x12\x14\n" + + "\x10RANGETEST_CONFIG\x10\x04\x12\x14\n" + + "\x10TELEMETRY_CONFIG\x10\x05\x12\x14\n" + + "\x10CANNEDMSG_CONFIG\x10\x06\x12\x10\n" + + "\fAUDIO_CONFIG\x10\a\x12\x19\n" + + "\x15REMOTEHARDWARE_CONFIG\x10\b\x12\x17\n" + + "\x13NEIGHBORINFO_CONFIG\x10\t\x12\x1a\n" + + "\x16AMBIENTLIGHTING_CONFIG\x10\n" + + "\x12\x1a\n" + + "\x16DETECTIONSENSOR_CONFIG\x10\v\x12\x15\n" + + "\x11PAXCOUNTER_CONFIG\x10\f\"#\n" + + "\x0eBackupLocation\x12\t\n" + + "\x05FLASH\x10\x00\x12\x06\n" + + "\x02SD\x10\x01B\x11\n" + + "\x0fpayload_variant\"\x84\x01\n" + + "\rHamParameters\x12\x1b\n" + + "\tcall_sign\x18\x01 \x01(\tR\bcallSign\x12\x19\n" + + "\btx_power\x18\x02 \x01(\x05R\atxPower\x12\x1c\n" + + "\tfrequency\x18\x03 \x01(\x02R\tfrequency\x12\x1d\n" + + "\n" + + "short_name\x18\x04 \x01(\tR\tshortName\"~\n" + + "\x1eNodeRemoteHardwarePinsResponse\x12\\\n" + + "\x19node_remote_hardware_pins\x18\x01 \x03(\v2!.meshtastic.NodeRemoteHardwarePinR\x16nodeRemoteHardwarePinsB`\n" + + "\x13com.geeksville.meshB\vAdminProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_admin_proto_rawDescOnce sync.Once + file_meshtastic_admin_proto_rawDescData []byte +) + +func file_meshtastic_admin_proto_rawDescGZIP() []byte { + file_meshtastic_admin_proto_rawDescOnce.Do(func() { + file_meshtastic_admin_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_admin_proto_rawDesc), len(file_meshtastic_admin_proto_rawDesc))) + }) + return file_meshtastic_admin_proto_rawDescData +} + +var file_meshtastic_admin_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_meshtastic_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_meshtastic_admin_proto_goTypes = []any{ + (AdminMessage_ConfigType)(0), // 0: meshtastic.AdminMessage.ConfigType + (AdminMessage_ModuleConfigType)(0), // 1: meshtastic.AdminMessage.ModuleConfigType + (AdminMessage_BackupLocation)(0), // 2: meshtastic.AdminMessage.BackupLocation + (*AdminMessage)(nil), // 3: meshtastic.AdminMessage + (*HamParameters)(nil), // 4: meshtastic.HamParameters + (*NodeRemoteHardwarePinsResponse)(nil), // 5: meshtastic.NodeRemoteHardwarePinsResponse + (*Channel)(nil), // 6: meshtastic.Channel + (*User)(nil), // 7: meshtastic.User + (*Config)(nil), // 8: meshtastic.Config + (*ModuleConfig)(nil), // 9: meshtastic.ModuleConfig + (*DeviceMetadata)(nil), // 10: meshtastic.DeviceMetadata + (*DeviceConnectionStatus)(nil), // 11: meshtastic.DeviceConnectionStatus + (*Position)(nil), // 12: meshtastic.Position + (*DeviceUIConfig)(nil), // 13: meshtastic.DeviceUIConfig + (*NodeRemoteHardwarePin)(nil), // 14: meshtastic.NodeRemoteHardwarePin +} +var file_meshtastic_admin_proto_depIdxs = []int32{ + 6, // 0: meshtastic.AdminMessage.get_channel_response:type_name -> meshtastic.Channel + 7, // 1: meshtastic.AdminMessage.get_owner_response:type_name -> meshtastic.User + 0, // 2: meshtastic.AdminMessage.get_config_request:type_name -> meshtastic.AdminMessage.ConfigType + 8, // 3: meshtastic.AdminMessage.get_config_response:type_name -> meshtastic.Config + 1, // 4: meshtastic.AdminMessage.get_module_config_request:type_name -> meshtastic.AdminMessage.ModuleConfigType + 9, // 5: meshtastic.AdminMessage.get_module_config_response:type_name -> meshtastic.ModuleConfig + 10, // 6: meshtastic.AdminMessage.get_device_metadata_response:type_name -> meshtastic.DeviceMetadata + 11, // 7: meshtastic.AdminMessage.get_device_connection_status_response:type_name -> meshtastic.DeviceConnectionStatus + 4, // 8: meshtastic.AdminMessage.set_ham_mode:type_name -> meshtastic.HamParameters + 5, // 9: meshtastic.AdminMessage.get_node_remote_hardware_pins_response:type_name -> meshtastic.NodeRemoteHardwarePinsResponse + 2, // 10: meshtastic.AdminMessage.backup_preferences:type_name -> meshtastic.AdminMessage.BackupLocation + 2, // 11: meshtastic.AdminMessage.restore_preferences:type_name -> meshtastic.AdminMessage.BackupLocation + 2, // 12: meshtastic.AdminMessage.remove_backup_preferences:type_name -> meshtastic.AdminMessage.BackupLocation + 7, // 13: meshtastic.AdminMessage.set_owner:type_name -> meshtastic.User + 6, // 14: meshtastic.AdminMessage.set_channel:type_name -> meshtastic.Channel + 8, // 15: meshtastic.AdminMessage.set_config:type_name -> meshtastic.Config + 9, // 16: meshtastic.AdminMessage.set_module_config:type_name -> meshtastic.ModuleConfig + 12, // 17: meshtastic.AdminMessage.set_fixed_position:type_name -> meshtastic.Position + 13, // 18: meshtastic.AdminMessage.get_ui_config_response:type_name -> meshtastic.DeviceUIConfig + 13, // 19: meshtastic.AdminMessage.store_ui_config:type_name -> meshtastic.DeviceUIConfig + 14, // 20: meshtastic.NodeRemoteHardwarePinsResponse.node_remote_hardware_pins:type_name -> meshtastic.NodeRemoteHardwarePin + 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_admin_proto_init() } +func file_meshtastic_admin_proto_init() { + if File_meshtastic_admin_proto != nil { + return + } + file_meshtastic_channel_proto_init() + file_meshtastic_config_proto_init() + file_meshtastic_connection_status_proto_init() + file_meshtastic_mesh_proto_init() + file_meshtastic_module_config_proto_init() + file_meshtastic_device_ui_proto_init() + file_meshtastic_admin_proto_msgTypes[0].OneofWrappers = []any{ + (*AdminMessage_GetChannelRequest)(nil), + (*AdminMessage_GetChannelResponse)(nil), + (*AdminMessage_GetOwnerRequest)(nil), + (*AdminMessage_GetOwnerResponse)(nil), + (*AdminMessage_GetConfigRequest)(nil), + (*AdminMessage_GetConfigResponse)(nil), + (*AdminMessage_GetModuleConfigRequest)(nil), + (*AdminMessage_GetModuleConfigResponse)(nil), + (*AdminMessage_GetCannedMessageModuleMessagesRequest)(nil), + (*AdminMessage_GetCannedMessageModuleMessagesResponse)(nil), + (*AdminMessage_GetDeviceMetadataRequest)(nil), + (*AdminMessage_GetDeviceMetadataResponse)(nil), + (*AdminMessage_GetRingtoneRequest)(nil), + (*AdminMessage_GetRingtoneResponse)(nil), + (*AdminMessage_GetDeviceConnectionStatusRequest)(nil), + (*AdminMessage_GetDeviceConnectionStatusResponse)(nil), + (*AdminMessage_SetHamMode)(nil), + (*AdminMessage_GetNodeRemoteHardwarePinsRequest)(nil), + (*AdminMessage_GetNodeRemoteHardwarePinsResponse)(nil), + (*AdminMessage_EnterDfuModeRequest)(nil), + (*AdminMessage_DeleteFileRequest)(nil), + (*AdminMessage_SetScale)(nil), + (*AdminMessage_BackupPreferences)(nil), + (*AdminMessage_RestorePreferences)(nil), + (*AdminMessage_RemoveBackupPreferences)(nil), + (*AdminMessage_SetOwner)(nil), + (*AdminMessage_SetChannel)(nil), + (*AdminMessage_SetConfig)(nil), + (*AdminMessage_SetModuleConfig)(nil), + (*AdminMessage_SetCannedMessageModuleMessages)(nil), + (*AdminMessage_SetRingtoneMessage)(nil), + (*AdminMessage_RemoveByNodenum)(nil), + (*AdminMessage_SetFavoriteNode)(nil), + (*AdminMessage_RemoveFavoriteNode)(nil), + (*AdminMessage_SetFixedPosition)(nil), + (*AdminMessage_RemoveFixedPosition)(nil), + (*AdminMessage_SetTimeOnly)(nil), + (*AdminMessage_GetUiConfigRequest)(nil), + (*AdminMessage_GetUiConfigResponse)(nil), + (*AdminMessage_StoreUiConfig)(nil), + (*AdminMessage_SetIgnoredNode)(nil), + (*AdminMessage_RemoveIgnoredNode)(nil), + (*AdminMessage_BeginEditSettings)(nil), + (*AdminMessage_CommitEditSettings)(nil), + (*AdminMessage_FactoryResetDevice)(nil), + (*AdminMessage_RebootOtaSeconds)(nil), + (*AdminMessage_ExitSimulator)(nil), + (*AdminMessage_RebootSeconds)(nil), + (*AdminMessage_ShutdownSeconds)(nil), + (*AdminMessage_FactoryResetConfig)(nil), + (*AdminMessage_NodedbReset)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_admin_proto_rawDesc), len(file_meshtastic_admin_proto_rawDesc)), + NumEnums: 3, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_admin_proto_goTypes, + DependencyIndexes: file_meshtastic_admin_proto_depIdxs, + EnumInfos: file_meshtastic_admin_proto_enumTypes, + MessageInfos: file_meshtastic_admin_proto_msgTypes, + }.Build() + File_meshtastic_admin_proto = out.File + file_meshtastic_admin_proto_goTypes = nil + file_meshtastic_admin_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/apponly.pb.go b/proto/generated/meshtastic/apponly.pb.go new file mode 100644 index 0000000..88979b0 --- /dev/null +++ b/proto/generated/meshtastic/apponly.pb.go @@ -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 generated + +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" + + "loraConfigBb\n" + + "\x13com.geeksville.meshB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/atak.pb.go b/proto/generated/meshtastic/atak.pb.go new file mode 100644 index 0000000..fe14c35 --- /dev/null +++ b/proto/generated/meshtastic/atak.pb.go @@ -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 generated + +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 +// +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 +// +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\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/cannedmessages.pb.go b/proto/generated/meshtastic/cannedmessages.pb.go new file mode 100644 index 0000000..c40f0ba --- /dev/null +++ b/proto/generated/meshtastic/cannedmessages.pb.go @@ -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 generated + +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\bmessagesBn\n" + + "\x13com.geeksville.meshB\x19CannedMessageConfigProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/channel.pb.go b/proto/generated/meshtastic/channel.pb.go new file mode 100644 index 0000000..6a611bb --- /dev/null +++ b/proto/generated/meshtastic/channel.pb.go @@ -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 generated + +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\x02Bb\n" + + "\x13com.geeksville.meshB\rChannelProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/clientonly.pb.go b/proto/generated/meshtastic/clientonly.pb.go new file mode 100644 index 0000000..2a4d429 --- /dev/null +++ b/proto/generated/meshtastic/clientonly.pb.go @@ -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 generated + +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_messagesBe\n" + + "\x13com.geeksville.meshB\x10ClientOnlyProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/config.pb.go b/proto/generated/meshtastic/config.pb.go new file mode 100644 index 0000000..a98ccdd --- /dev/null +++ b/proto/generated/meshtastic/config.pb.go @@ -0,0 +1,2857 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.3 +// source: meshtastic/config.proto + +package generated + +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) +) + +// Defines the device's role on the Mesh network +type Config_DeviceConfig_Role int32 + +const ( + // Description: App connected or stand alone messaging device. + // Technical Details: Default Role + Config_DeviceConfig_CLIENT Config_DeviceConfig_Role = 0 + // Description: Device that does not forward packets from other devices. + Config_DeviceConfig_CLIENT_MUTE Config_DeviceConfig_Role = 1 + // Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. + // Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps. + // + // The wifi radio and the oled screen will be put to sleep. + // This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. + Config_DeviceConfig_ROUTER Config_DeviceConfig_Role = 2 + // Deprecated: Marked as deprecated in meshtastic/config.proto. + Config_DeviceConfig_ROUTER_CLIENT Config_DeviceConfig_Role = 3 + // Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. + // Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry + // + // or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate. + Config_DeviceConfig_REPEATER Config_DeviceConfig_Role = 4 + // Description: Broadcasts GPS position packets as priority. + // Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default. + // + // When used in conjunction with power.is_power_saving = true, nodes will wake up, + // send position, and then sleep for position.position_broadcast_secs seconds. + Config_DeviceConfig_TRACKER Config_DeviceConfig_Role = 5 + // Description: Broadcasts telemetry packets as priority. + // Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + // + // When used in conjunction with power.is_power_saving = true, nodes will wake up, + // send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. + Config_DeviceConfig_SENSOR Config_DeviceConfig_Role = 6 + // Description: Optimized for ATAK system communication and reduces routine broadcasts. + // Technical Details: Used for nodes dedicated for connection to an ATAK EUD. + // + // Turns off many of the routine broadcasts to favor CoT packet stream + // from the Meshtastic ATAK plugin -> IMeshService -> Node + Config_DeviceConfig_TAK Config_DeviceConfig_Role = 7 + // Description: Device that only broadcasts as needed for stealth or power savings. + // Technical Details: Used for nodes that "only speak when spoken to" + // + // Turns all of the routine broadcasts but allows for ad-hoc communication + // Still rebroadcasts, but with local only rebroadcast mode (known meshes only) + // Can be used for clandestine operation or to dramatically reduce airtime / power consumption + Config_DeviceConfig_CLIENT_HIDDEN Config_DeviceConfig_Role = 8 + // Description: Broadcasts location as message to default channel regularly for to assist with device recovery. + // Technical Details: Used to automatically send a text message to the mesh + // + // with the current position of the device on a frequent interval: + // "I'm lost! Position: lat / long" + Config_DeviceConfig_LOST_AND_FOUND Config_DeviceConfig_Role = 9 + // Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts. + // Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream + // + // and automatic TAK PLI (position location information) broadcasts. + // Uses position module configuration to determine TAK PLI broadcast interval. + Config_DeviceConfig_TAK_TRACKER Config_DeviceConfig_Role = 10 + // Description: Will always rebroadcast packets, but will do so after all other modes. + // Technical Details: Used for router nodes that are intended to provide additional coverage + // + // in areas not already covered by other routers, or to bridge around problematic terrain, + // but should not be given priority over other routers in order to avoid unnecessaraily + // consuming hops. + Config_DeviceConfig_ROUTER_LATE Config_DeviceConfig_Role = 11 +) + +// Enum value maps for Config_DeviceConfig_Role. +var ( + Config_DeviceConfig_Role_name = map[int32]string{ + 0: "CLIENT", + 1: "CLIENT_MUTE", + 2: "ROUTER", + 3: "ROUTER_CLIENT", + 4: "REPEATER", + 5: "TRACKER", + 6: "SENSOR", + 7: "TAK", + 8: "CLIENT_HIDDEN", + 9: "LOST_AND_FOUND", + 10: "TAK_TRACKER", + 11: "ROUTER_LATE", + } + Config_DeviceConfig_Role_value = map[string]int32{ + "CLIENT": 0, + "CLIENT_MUTE": 1, + "ROUTER": 2, + "ROUTER_CLIENT": 3, + "REPEATER": 4, + "TRACKER": 5, + "SENSOR": 6, + "TAK": 7, + "CLIENT_HIDDEN": 8, + "LOST_AND_FOUND": 9, + "TAK_TRACKER": 10, + "ROUTER_LATE": 11, + } +) + +func (x Config_DeviceConfig_Role) Enum() *Config_DeviceConfig_Role { + p := new(Config_DeviceConfig_Role) + *p = x + return p +} + +func (x Config_DeviceConfig_Role) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DeviceConfig_Role) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[0].Descriptor() +} + +func (Config_DeviceConfig_Role) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[0] +} + +func (x Config_DeviceConfig_Role) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DeviceConfig_Role.Descriptor instead. +func (Config_DeviceConfig_Role) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// Defines the device's behavior for how messages are rebroadcast +type Config_DeviceConfig_RebroadcastMode int32 + +const ( + // Default behavior. + // Rebroadcast any observed message, if it was on our private channel or from another mesh with the same lora params. + Config_DeviceConfig_ALL Config_DeviceConfig_RebroadcastMode = 0 + // Same as behavior as ALL but skips packet decoding and simply rebroadcasts them. + // Only available in Repeater role. Setting this on any other roles will result in ALL behavior. + Config_DeviceConfig_ALL_SKIP_DECODING Config_DeviceConfig_RebroadcastMode = 1 + // Ignores observed messages from foreign meshes that are open or those which it cannot decrypt. + // Only rebroadcasts message on the nodes local primary / secondary channels. + Config_DeviceConfig_LOCAL_ONLY Config_DeviceConfig_RebroadcastMode = 2 + // Ignores observed messages from foreign meshes like LOCAL_ONLY, + // but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) + Config_DeviceConfig_KNOWN_ONLY Config_DeviceConfig_RebroadcastMode = 3 + // Only permitted for SENSOR, TRACKER and TAK_TRACKER roles, this will inhibit all rebroadcasts, not unlike CLIENT_MUTE role. + Config_DeviceConfig_NONE Config_DeviceConfig_RebroadcastMode = 4 + // Ignores packets from non-standard portnums such as: TAK, RangeTest, PaxCounter, etc. + // Only rebroadcasts packets with standard portnums: NodeInfo, Text, Position, Telemetry, and Routing. + Config_DeviceConfig_CORE_PORTNUMS_ONLY Config_DeviceConfig_RebroadcastMode = 5 +) + +// Enum value maps for Config_DeviceConfig_RebroadcastMode. +var ( + Config_DeviceConfig_RebroadcastMode_name = map[int32]string{ + 0: "ALL", + 1: "ALL_SKIP_DECODING", + 2: "LOCAL_ONLY", + 3: "KNOWN_ONLY", + 4: "NONE", + 5: "CORE_PORTNUMS_ONLY", + } + Config_DeviceConfig_RebroadcastMode_value = map[string]int32{ + "ALL": 0, + "ALL_SKIP_DECODING": 1, + "LOCAL_ONLY": 2, + "KNOWN_ONLY": 3, + "NONE": 4, + "CORE_PORTNUMS_ONLY": 5, + } +) + +func (x Config_DeviceConfig_RebroadcastMode) Enum() *Config_DeviceConfig_RebroadcastMode { + p := new(Config_DeviceConfig_RebroadcastMode) + *p = x + return p +} + +func (x Config_DeviceConfig_RebroadcastMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DeviceConfig_RebroadcastMode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[1].Descriptor() +} + +func (Config_DeviceConfig_RebroadcastMode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[1] +} + +func (x Config_DeviceConfig_RebroadcastMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DeviceConfig_RebroadcastMode.Descriptor instead. +func (Config_DeviceConfig_RebroadcastMode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 0, 1} +} + +// Bit field of boolean configuration options, indicating which optional +// fields to include when assembling POSITION messages. +// Longitude, latitude, altitude, speed, heading, and DOP +// are always included (also time if GPS-synced) +// NOTE: the more fields are included, the larger the message will be - +// +// leading to longer airtime and a higher risk of packet loss +type Config_PositionConfig_PositionFlags int32 + +const ( + // Required for compilation + Config_PositionConfig_UNSET Config_PositionConfig_PositionFlags = 0 + // Include an altitude value (if available) + Config_PositionConfig_ALTITUDE Config_PositionConfig_PositionFlags = 1 + // Altitude value is MSL + Config_PositionConfig_ALTITUDE_MSL Config_PositionConfig_PositionFlags = 2 + // Include geoidal separation + Config_PositionConfig_GEOIDAL_SEPARATION Config_PositionConfig_PositionFlags = 4 + // Include the DOP value ; PDOP used by default, see below + Config_PositionConfig_DOP Config_PositionConfig_PositionFlags = 8 + // If POS_DOP set, send separate HDOP / VDOP values instead of PDOP + Config_PositionConfig_HVDOP Config_PositionConfig_PositionFlags = 16 + // Include number of "satellites in view" + Config_PositionConfig_SATINVIEW Config_PositionConfig_PositionFlags = 32 + // Include a sequence number incremented per packet + Config_PositionConfig_SEQ_NO Config_PositionConfig_PositionFlags = 64 + // Include positional timestamp (from GPS solution) + Config_PositionConfig_TIMESTAMP Config_PositionConfig_PositionFlags = 128 + // Include positional heading + // Intended for use with vehicle not walking speeds + // walking speeds are likely to be error prone like the compass + Config_PositionConfig_HEADING Config_PositionConfig_PositionFlags = 256 + // Include positional speed + // Intended for use with vehicle not walking speeds + // walking speeds are likely to be error prone like the compass + Config_PositionConfig_SPEED Config_PositionConfig_PositionFlags = 512 +) + +// Enum value maps for Config_PositionConfig_PositionFlags. +var ( + Config_PositionConfig_PositionFlags_name = map[int32]string{ + 0: "UNSET", + 1: "ALTITUDE", + 2: "ALTITUDE_MSL", + 4: "GEOIDAL_SEPARATION", + 8: "DOP", + 16: "HVDOP", + 32: "SATINVIEW", + 64: "SEQ_NO", + 128: "TIMESTAMP", + 256: "HEADING", + 512: "SPEED", + } + Config_PositionConfig_PositionFlags_value = map[string]int32{ + "UNSET": 0, + "ALTITUDE": 1, + "ALTITUDE_MSL": 2, + "GEOIDAL_SEPARATION": 4, + "DOP": 8, + "HVDOP": 16, + "SATINVIEW": 32, + "SEQ_NO": 64, + "TIMESTAMP": 128, + "HEADING": 256, + "SPEED": 512, + } +) + +func (x Config_PositionConfig_PositionFlags) Enum() *Config_PositionConfig_PositionFlags { + p := new(Config_PositionConfig_PositionFlags) + *p = x + return p +} + +func (x Config_PositionConfig_PositionFlags) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_PositionConfig_PositionFlags) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[2].Descriptor() +} + +func (Config_PositionConfig_PositionFlags) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[2] +} + +func (x Config_PositionConfig_PositionFlags) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_PositionConfig_PositionFlags.Descriptor instead. +func (Config_PositionConfig_PositionFlags) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 1, 0} +} + +type Config_PositionConfig_GpsMode int32 + +const ( + // GPS is present but disabled + Config_PositionConfig_DISABLED Config_PositionConfig_GpsMode = 0 + // GPS is present and enabled + Config_PositionConfig_ENABLED Config_PositionConfig_GpsMode = 1 + // GPS is not present on the device + Config_PositionConfig_NOT_PRESENT Config_PositionConfig_GpsMode = 2 +) + +// Enum value maps for Config_PositionConfig_GpsMode. +var ( + Config_PositionConfig_GpsMode_name = map[int32]string{ + 0: "DISABLED", + 1: "ENABLED", + 2: "NOT_PRESENT", + } + Config_PositionConfig_GpsMode_value = map[string]int32{ + "DISABLED": 0, + "ENABLED": 1, + "NOT_PRESENT": 2, + } +) + +func (x Config_PositionConfig_GpsMode) Enum() *Config_PositionConfig_GpsMode { + p := new(Config_PositionConfig_GpsMode) + *p = x + return p +} + +func (x Config_PositionConfig_GpsMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_PositionConfig_GpsMode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[3].Descriptor() +} + +func (Config_PositionConfig_GpsMode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[3] +} + +func (x Config_PositionConfig_GpsMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_PositionConfig_GpsMode.Descriptor instead. +func (Config_PositionConfig_GpsMode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 1, 1} +} + +type Config_NetworkConfig_AddressMode int32 + +const ( + // obtain ip address via DHCP + Config_NetworkConfig_DHCP Config_NetworkConfig_AddressMode = 0 + // use static ip address + Config_NetworkConfig_STATIC Config_NetworkConfig_AddressMode = 1 +) + +// Enum value maps for Config_NetworkConfig_AddressMode. +var ( + Config_NetworkConfig_AddressMode_name = map[int32]string{ + 0: "DHCP", + 1: "STATIC", + } + Config_NetworkConfig_AddressMode_value = map[string]int32{ + "DHCP": 0, + "STATIC": 1, + } +) + +func (x Config_NetworkConfig_AddressMode) Enum() *Config_NetworkConfig_AddressMode { + p := new(Config_NetworkConfig_AddressMode) + *p = x + return p +} + +func (x Config_NetworkConfig_AddressMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_NetworkConfig_AddressMode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[4].Descriptor() +} + +func (Config_NetworkConfig_AddressMode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[4] +} + +func (x Config_NetworkConfig_AddressMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_NetworkConfig_AddressMode.Descriptor instead. +func (Config_NetworkConfig_AddressMode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 3, 0} +} + +// Available flags auxiliary network protocols +type Config_NetworkConfig_ProtocolFlags int32 + +const ( + // Do not broadcast packets over any network protocol + Config_NetworkConfig_NO_BROADCAST Config_NetworkConfig_ProtocolFlags = 0 + // Enable broadcasting packets via UDP over the local network + Config_NetworkConfig_UDP_BROADCAST Config_NetworkConfig_ProtocolFlags = 1 +) + +// Enum value maps for Config_NetworkConfig_ProtocolFlags. +var ( + Config_NetworkConfig_ProtocolFlags_name = map[int32]string{ + 0: "NO_BROADCAST", + 1: "UDP_BROADCAST", + } + Config_NetworkConfig_ProtocolFlags_value = map[string]int32{ + "NO_BROADCAST": 0, + "UDP_BROADCAST": 1, + } +) + +func (x Config_NetworkConfig_ProtocolFlags) Enum() *Config_NetworkConfig_ProtocolFlags { + p := new(Config_NetworkConfig_ProtocolFlags) + *p = x + return p +} + +func (x Config_NetworkConfig_ProtocolFlags) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_NetworkConfig_ProtocolFlags) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[5].Descriptor() +} + +func (Config_NetworkConfig_ProtocolFlags) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[5] +} + +func (x Config_NetworkConfig_ProtocolFlags) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_NetworkConfig_ProtocolFlags.Descriptor instead. +func (Config_NetworkConfig_ProtocolFlags) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 3, 1} +} + +// How the GPS coordinates are displayed on the OLED screen. +type Config_DisplayConfig_GpsCoordinateFormat int32 + +const ( + // GPS coordinates are displayed in the normal decimal degrees format: + // DD.DDDDDD DDD.DDDDDD + Config_DisplayConfig_DEC Config_DisplayConfig_GpsCoordinateFormat = 0 + // GPS coordinates are displayed in the degrees minutes seconds format: + // DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant + Config_DisplayConfig_DMS Config_DisplayConfig_GpsCoordinateFormat = 1 + // Universal Transverse Mercator format: + // ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing + Config_DisplayConfig_UTM Config_DisplayConfig_GpsCoordinateFormat = 2 + // Military Grid Reference System format: + // ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, + // E is easting, N is northing + Config_DisplayConfig_MGRS Config_DisplayConfig_GpsCoordinateFormat = 3 + // Open Location Code (aka Plus Codes). + Config_DisplayConfig_OLC Config_DisplayConfig_GpsCoordinateFormat = 4 + // Ordnance Survey Grid Reference (the National Grid System of the UK). + // Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, + // E is the easting, N is the northing + Config_DisplayConfig_OSGR Config_DisplayConfig_GpsCoordinateFormat = 5 +) + +// Enum value maps for Config_DisplayConfig_GpsCoordinateFormat. +var ( + Config_DisplayConfig_GpsCoordinateFormat_name = map[int32]string{ + 0: "DEC", + 1: "DMS", + 2: "UTM", + 3: "MGRS", + 4: "OLC", + 5: "OSGR", + } + Config_DisplayConfig_GpsCoordinateFormat_value = map[string]int32{ + "DEC": 0, + "DMS": 1, + "UTM": 2, + "MGRS": 3, + "OLC": 4, + "OSGR": 5, + } +) + +func (x Config_DisplayConfig_GpsCoordinateFormat) Enum() *Config_DisplayConfig_GpsCoordinateFormat { + p := new(Config_DisplayConfig_GpsCoordinateFormat) + *p = x + return p +} + +func (x Config_DisplayConfig_GpsCoordinateFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DisplayConfig_GpsCoordinateFormat) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[6].Descriptor() +} + +func (Config_DisplayConfig_GpsCoordinateFormat) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[6] +} + +func (x Config_DisplayConfig_GpsCoordinateFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DisplayConfig_GpsCoordinateFormat.Descriptor instead. +func (Config_DisplayConfig_GpsCoordinateFormat) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4, 0} +} + +// Unit display preference +type Config_DisplayConfig_DisplayUnits int32 + +const ( + // Metric (Default) + Config_DisplayConfig_METRIC Config_DisplayConfig_DisplayUnits = 0 + // Imperial + Config_DisplayConfig_IMPERIAL Config_DisplayConfig_DisplayUnits = 1 +) + +// Enum value maps for Config_DisplayConfig_DisplayUnits. +var ( + Config_DisplayConfig_DisplayUnits_name = map[int32]string{ + 0: "METRIC", + 1: "IMPERIAL", + } + Config_DisplayConfig_DisplayUnits_value = map[string]int32{ + "METRIC": 0, + "IMPERIAL": 1, + } +) + +func (x Config_DisplayConfig_DisplayUnits) Enum() *Config_DisplayConfig_DisplayUnits { + p := new(Config_DisplayConfig_DisplayUnits) + *p = x + return p +} + +func (x Config_DisplayConfig_DisplayUnits) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DisplayConfig_DisplayUnits) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[7].Descriptor() +} + +func (Config_DisplayConfig_DisplayUnits) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[7] +} + +func (x Config_DisplayConfig_DisplayUnits) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DisplayConfig_DisplayUnits.Descriptor instead. +func (Config_DisplayConfig_DisplayUnits) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4, 1} +} + +// Override OLED outo detect with this if it fails. +type Config_DisplayConfig_OledType int32 + +const ( + // Default / Autodetect + Config_DisplayConfig_OLED_AUTO Config_DisplayConfig_OledType = 0 + // Default / Autodetect + Config_DisplayConfig_OLED_SSD1306 Config_DisplayConfig_OledType = 1 + // Default / Autodetect + Config_DisplayConfig_OLED_SH1106 Config_DisplayConfig_OledType = 2 + // Can not be auto detected but set by proto. Used for 128x128 screens + Config_DisplayConfig_OLED_SH1107 Config_DisplayConfig_OledType = 3 + // Can not be auto detected but set by proto. Used for 128x64 screens + Config_DisplayConfig_OLED_SH1107_128_64 Config_DisplayConfig_OledType = 4 +) + +// Enum value maps for Config_DisplayConfig_OledType. +var ( + Config_DisplayConfig_OledType_name = map[int32]string{ + 0: "OLED_AUTO", + 1: "OLED_SSD1306", + 2: "OLED_SH1106", + 3: "OLED_SH1107", + 4: "OLED_SH1107_128_64", + } + Config_DisplayConfig_OledType_value = map[string]int32{ + "OLED_AUTO": 0, + "OLED_SSD1306": 1, + "OLED_SH1106": 2, + "OLED_SH1107": 3, + "OLED_SH1107_128_64": 4, + } +) + +func (x Config_DisplayConfig_OledType) Enum() *Config_DisplayConfig_OledType { + p := new(Config_DisplayConfig_OledType) + *p = x + return p +} + +func (x Config_DisplayConfig_OledType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DisplayConfig_OledType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[8].Descriptor() +} + +func (Config_DisplayConfig_OledType) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[8] +} + +func (x Config_DisplayConfig_OledType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DisplayConfig_OledType.Descriptor instead. +func (Config_DisplayConfig_OledType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4, 2} +} + +type Config_DisplayConfig_DisplayMode int32 + +const ( + // Default. The old style for the 128x64 OLED screen + Config_DisplayConfig_DEFAULT Config_DisplayConfig_DisplayMode = 0 + // Rearrange display elements to cater for bicolor OLED displays + Config_DisplayConfig_TWOCOLOR Config_DisplayConfig_DisplayMode = 1 + // Same as TwoColor, but with inverted top bar. Not so good for Epaper displays + Config_DisplayConfig_INVERTED Config_DisplayConfig_DisplayMode = 2 + // TFT Full Color Displays (not implemented yet) + Config_DisplayConfig_COLOR Config_DisplayConfig_DisplayMode = 3 +) + +// Enum value maps for Config_DisplayConfig_DisplayMode. +var ( + Config_DisplayConfig_DisplayMode_name = map[int32]string{ + 0: "DEFAULT", + 1: "TWOCOLOR", + 2: "INVERTED", + 3: "COLOR", + } + Config_DisplayConfig_DisplayMode_value = map[string]int32{ + "DEFAULT": 0, + "TWOCOLOR": 1, + "INVERTED": 2, + "COLOR": 3, + } +) + +func (x Config_DisplayConfig_DisplayMode) Enum() *Config_DisplayConfig_DisplayMode { + p := new(Config_DisplayConfig_DisplayMode) + *p = x + return p +} + +func (x Config_DisplayConfig_DisplayMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DisplayConfig_DisplayMode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[9].Descriptor() +} + +func (Config_DisplayConfig_DisplayMode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[9] +} + +func (x Config_DisplayConfig_DisplayMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DisplayConfig_DisplayMode.Descriptor instead. +func (Config_DisplayConfig_DisplayMode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4, 3} +} + +type Config_DisplayConfig_CompassOrientation int32 + +const ( + // The compass and the display are in the same orientation. + Config_DisplayConfig_DEGREES_0 Config_DisplayConfig_CompassOrientation = 0 + // Rotate the compass by 90 degrees. + Config_DisplayConfig_DEGREES_90 Config_DisplayConfig_CompassOrientation = 1 + // Rotate the compass by 180 degrees. + Config_DisplayConfig_DEGREES_180 Config_DisplayConfig_CompassOrientation = 2 + // Rotate the compass by 270 degrees. + Config_DisplayConfig_DEGREES_270 Config_DisplayConfig_CompassOrientation = 3 + // Don't rotate the compass, but invert the result. + Config_DisplayConfig_DEGREES_0_INVERTED Config_DisplayConfig_CompassOrientation = 4 + // Rotate the compass by 90 degrees and invert. + Config_DisplayConfig_DEGREES_90_INVERTED Config_DisplayConfig_CompassOrientation = 5 + // Rotate the compass by 180 degrees and invert. + Config_DisplayConfig_DEGREES_180_INVERTED Config_DisplayConfig_CompassOrientation = 6 + // Rotate the compass by 270 degrees and invert. + Config_DisplayConfig_DEGREES_270_INVERTED Config_DisplayConfig_CompassOrientation = 7 +) + +// Enum value maps for Config_DisplayConfig_CompassOrientation. +var ( + Config_DisplayConfig_CompassOrientation_name = map[int32]string{ + 0: "DEGREES_0", + 1: "DEGREES_90", + 2: "DEGREES_180", + 3: "DEGREES_270", + 4: "DEGREES_0_INVERTED", + 5: "DEGREES_90_INVERTED", + 6: "DEGREES_180_INVERTED", + 7: "DEGREES_270_INVERTED", + } + Config_DisplayConfig_CompassOrientation_value = map[string]int32{ + "DEGREES_0": 0, + "DEGREES_90": 1, + "DEGREES_180": 2, + "DEGREES_270": 3, + "DEGREES_0_INVERTED": 4, + "DEGREES_90_INVERTED": 5, + "DEGREES_180_INVERTED": 6, + "DEGREES_270_INVERTED": 7, + } +) + +func (x Config_DisplayConfig_CompassOrientation) Enum() *Config_DisplayConfig_CompassOrientation { + p := new(Config_DisplayConfig_CompassOrientation) + *p = x + return p +} + +func (x Config_DisplayConfig_CompassOrientation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_DisplayConfig_CompassOrientation) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[10].Descriptor() +} + +func (Config_DisplayConfig_CompassOrientation) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[10] +} + +func (x Config_DisplayConfig_CompassOrientation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_DisplayConfig_CompassOrientation.Descriptor instead. +func (Config_DisplayConfig_CompassOrientation) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4, 4} +} + +type Config_LoRaConfig_RegionCode int32 + +const ( + // Region is not set + Config_LoRaConfig_UNSET Config_LoRaConfig_RegionCode = 0 + // United States + Config_LoRaConfig_US Config_LoRaConfig_RegionCode = 1 + // European Union 433mhz + Config_LoRaConfig_EU_433 Config_LoRaConfig_RegionCode = 2 + // European Union 868mhz + Config_LoRaConfig_EU_868 Config_LoRaConfig_RegionCode = 3 + // China + Config_LoRaConfig_CN Config_LoRaConfig_RegionCode = 4 + // Japan + Config_LoRaConfig_JP Config_LoRaConfig_RegionCode = 5 + // Australia / New Zealand + Config_LoRaConfig_ANZ Config_LoRaConfig_RegionCode = 6 + // Korea + Config_LoRaConfig_KR Config_LoRaConfig_RegionCode = 7 + // Taiwan + Config_LoRaConfig_TW Config_LoRaConfig_RegionCode = 8 + // Russia + Config_LoRaConfig_RU Config_LoRaConfig_RegionCode = 9 + // India + Config_LoRaConfig_IN Config_LoRaConfig_RegionCode = 10 + // New Zealand 865mhz + Config_LoRaConfig_NZ_865 Config_LoRaConfig_RegionCode = 11 + // Thailand + Config_LoRaConfig_TH Config_LoRaConfig_RegionCode = 12 + // WLAN Band + Config_LoRaConfig_LORA_24 Config_LoRaConfig_RegionCode = 13 + // Ukraine 433mhz + Config_LoRaConfig_UA_433 Config_LoRaConfig_RegionCode = 14 + // Ukraine 868mhz + Config_LoRaConfig_UA_868 Config_LoRaConfig_RegionCode = 15 + // Malaysia 433mhz + Config_LoRaConfig_MY_433 Config_LoRaConfig_RegionCode = 16 + // Malaysia 919mhz + Config_LoRaConfig_MY_919 Config_LoRaConfig_RegionCode = 17 + // Singapore 923mhz + Config_LoRaConfig_SG_923 Config_LoRaConfig_RegionCode = 18 + // Philippines 433mhz + Config_LoRaConfig_PH_433 Config_LoRaConfig_RegionCode = 19 + // Philippines 868mhz + Config_LoRaConfig_PH_868 Config_LoRaConfig_RegionCode = 20 + // Philippines 915mhz + Config_LoRaConfig_PH_915 Config_LoRaConfig_RegionCode = 21 +) + +// Enum value maps for Config_LoRaConfig_RegionCode. +var ( + Config_LoRaConfig_RegionCode_name = map[int32]string{ + 0: "UNSET", + 1: "US", + 2: "EU_433", + 3: "EU_868", + 4: "CN", + 5: "JP", + 6: "ANZ", + 7: "KR", + 8: "TW", + 9: "RU", + 10: "IN", + 11: "NZ_865", + 12: "TH", + 13: "LORA_24", + 14: "UA_433", + 15: "UA_868", + 16: "MY_433", + 17: "MY_919", + 18: "SG_923", + 19: "PH_433", + 20: "PH_868", + 21: "PH_915", + } + Config_LoRaConfig_RegionCode_value = map[string]int32{ + "UNSET": 0, + "US": 1, + "EU_433": 2, + "EU_868": 3, + "CN": 4, + "JP": 5, + "ANZ": 6, + "KR": 7, + "TW": 8, + "RU": 9, + "IN": 10, + "NZ_865": 11, + "TH": 12, + "LORA_24": 13, + "UA_433": 14, + "UA_868": 15, + "MY_433": 16, + "MY_919": 17, + "SG_923": 18, + "PH_433": 19, + "PH_868": 20, + "PH_915": 21, + } +) + +func (x Config_LoRaConfig_RegionCode) Enum() *Config_LoRaConfig_RegionCode { + p := new(Config_LoRaConfig_RegionCode) + *p = x + return p +} + +func (x Config_LoRaConfig_RegionCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_LoRaConfig_RegionCode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[11].Descriptor() +} + +func (Config_LoRaConfig_RegionCode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[11] +} + +func (x Config_LoRaConfig_RegionCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_LoRaConfig_RegionCode.Descriptor instead. +func (Config_LoRaConfig_RegionCode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 5, 0} +} + +// Standard predefined channel settings +// Note: these mappings must match ModemPreset Choice in the device code. +type Config_LoRaConfig_ModemPreset int32 + +const ( + // Long Range - Fast + Config_LoRaConfig_LONG_FAST Config_LoRaConfig_ModemPreset = 0 + // Long Range - Slow + Config_LoRaConfig_LONG_SLOW Config_LoRaConfig_ModemPreset = 1 + // Very Long Range - Slow + // Deprecated in 2.5: Works only with txco and is unusably slow + // + // Deprecated: Marked as deprecated in meshtastic/config.proto. + Config_LoRaConfig_VERY_LONG_SLOW Config_LoRaConfig_ModemPreset = 2 + // Medium Range - Slow + Config_LoRaConfig_MEDIUM_SLOW Config_LoRaConfig_ModemPreset = 3 + // Medium Range - Fast + Config_LoRaConfig_MEDIUM_FAST Config_LoRaConfig_ModemPreset = 4 + // Short Range - Slow + Config_LoRaConfig_SHORT_SLOW Config_LoRaConfig_ModemPreset = 5 + // Short Range - Fast + Config_LoRaConfig_SHORT_FAST Config_LoRaConfig_ModemPreset = 6 + // Long Range - Moderately Fast + Config_LoRaConfig_LONG_MODERATE Config_LoRaConfig_ModemPreset = 7 + // Short Range - Turbo + // This is the fastest preset and the only one with 500kHz bandwidth. + // It is not legal to use in all regions due to this wider bandwidth. + Config_LoRaConfig_SHORT_TURBO Config_LoRaConfig_ModemPreset = 8 +) + +// Enum value maps for Config_LoRaConfig_ModemPreset. +var ( + Config_LoRaConfig_ModemPreset_name = map[int32]string{ + 0: "LONG_FAST", + 1: "LONG_SLOW", + 2: "VERY_LONG_SLOW", + 3: "MEDIUM_SLOW", + 4: "MEDIUM_FAST", + 5: "SHORT_SLOW", + 6: "SHORT_FAST", + 7: "LONG_MODERATE", + 8: "SHORT_TURBO", + } + Config_LoRaConfig_ModemPreset_value = map[string]int32{ + "LONG_FAST": 0, + "LONG_SLOW": 1, + "VERY_LONG_SLOW": 2, + "MEDIUM_SLOW": 3, + "MEDIUM_FAST": 4, + "SHORT_SLOW": 5, + "SHORT_FAST": 6, + "LONG_MODERATE": 7, + "SHORT_TURBO": 8, + } +) + +func (x Config_LoRaConfig_ModemPreset) Enum() *Config_LoRaConfig_ModemPreset { + p := new(Config_LoRaConfig_ModemPreset) + *p = x + return p +} + +func (x Config_LoRaConfig_ModemPreset) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_LoRaConfig_ModemPreset) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[12].Descriptor() +} + +func (Config_LoRaConfig_ModemPreset) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[12] +} + +func (x Config_LoRaConfig_ModemPreset) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_LoRaConfig_ModemPreset.Descriptor instead. +func (Config_LoRaConfig_ModemPreset) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 5, 1} +} + +type Config_BluetoothConfig_PairingMode int32 + +const ( + // Device generates a random PIN that will be shown on the screen of the device for pairing + Config_BluetoothConfig_RANDOM_PIN Config_BluetoothConfig_PairingMode = 0 + // Device requires a specified fixed PIN for pairing + Config_BluetoothConfig_FIXED_PIN Config_BluetoothConfig_PairingMode = 1 + // Device requires no PIN for pairing + Config_BluetoothConfig_NO_PIN Config_BluetoothConfig_PairingMode = 2 +) + +// Enum value maps for Config_BluetoothConfig_PairingMode. +var ( + Config_BluetoothConfig_PairingMode_name = map[int32]string{ + 0: "RANDOM_PIN", + 1: "FIXED_PIN", + 2: "NO_PIN", + } + Config_BluetoothConfig_PairingMode_value = map[string]int32{ + "RANDOM_PIN": 0, + "FIXED_PIN": 1, + "NO_PIN": 2, + } +) + +func (x Config_BluetoothConfig_PairingMode) Enum() *Config_BluetoothConfig_PairingMode { + p := new(Config_BluetoothConfig_PairingMode) + *p = x + return p +} + +func (x Config_BluetoothConfig_PairingMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Config_BluetoothConfig_PairingMode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_config_proto_enumTypes[13].Descriptor() +} + +func (Config_BluetoothConfig_PairingMode) Type() protoreflect.EnumType { + return &file_meshtastic_config_proto_enumTypes[13] +} + +func (x Config_BluetoothConfig_PairingMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Config_BluetoothConfig_PairingMode.Descriptor instead. +func (Config_BluetoothConfig_PairingMode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 6, 0} +} + +type Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Payload Variant + // + // Types that are valid to be assigned to PayloadVariant: + // + // *Config_Device + // *Config_Position + // *Config_Power + // *Config_Network + // *Config_Display + // *Config_Lora + // *Config_Bluetooth + // *Config_Security + // *Config_Sessionkey + // *Config_DeviceUi + PayloadVariant isConfig_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config) Reset() { + *x = Config{} + mi := &file_meshtastic_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config) ProtoMessage() {} + +func (x *Config) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0} +} + +func (x *Config) GetPayloadVariant() isConfig_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *Config) GetDevice() *Config_DeviceConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Device); ok { + return x.Device + } + } + return nil +} + +func (x *Config) GetPosition() *Config_PositionConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Position); ok { + return x.Position + } + } + return nil +} + +func (x *Config) GetPower() *Config_PowerConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Power); ok { + return x.Power + } + } + return nil +} + +func (x *Config) GetNetwork() *Config_NetworkConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Network); ok { + return x.Network + } + } + return nil +} + +func (x *Config) GetDisplay() *Config_DisplayConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Display); ok { + return x.Display + } + } + return nil +} + +func (x *Config) GetLora() *Config_LoRaConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Lora); ok { + return x.Lora + } + } + return nil +} + +func (x *Config) GetBluetooth() *Config_BluetoothConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Bluetooth); ok { + return x.Bluetooth + } + } + return nil +} + +func (x *Config) GetSecurity() *Config_SecurityConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Security); ok { + return x.Security + } + } + return nil +} + +func (x *Config) GetSessionkey() *Config_SessionkeyConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_Sessionkey); ok { + return x.Sessionkey + } + } + return nil +} + +func (x *Config) GetDeviceUi() *DeviceUIConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*Config_DeviceUi); ok { + return x.DeviceUi + } + } + return nil +} + +type isConfig_PayloadVariant interface { + isConfig_PayloadVariant() +} + +type Config_Device struct { + Device *Config_DeviceConfig `protobuf:"bytes,1,opt,name=device,proto3,oneof"` +} + +type Config_Position struct { + Position *Config_PositionConfig `protobuf:"bytes,2,opt,name=position,proto3,oneof"` +} + +type Config_Power struct { + Power *Config_PowerConfig `protobuf:"bytes,3,opt,name=power,proto3,oneof"` +} + +type Config_Network struct { + Network *Config_NetworkConfig `protobuf:"bytes,4,opt,name=network,proto3,oneof"` +} + +type Config_Display struct { + Display *Config_DisplayConfig `protobuf:"bytes,5,opt,name=display,proto3,oneof"` +} + +type Config_Lora struct { + Lora *Config_LoRaConfig `protobuf:"bytes,6,opt,name=lora,proto3,oneof"` +} + +type Config_Bluetooth struct { + Bluetooth *Config_BluetoothConfig `protobuf:"bytes,7,opt,name=bluetooth,proto3,oneof"` +} + +type Config_Security struct { + Security *Config_SecurityConfig `protobuf:"bytes,8,opt,name=security,proto3,oneof"` +} + +type Config_Sessionkey struct { + Sessionkey *Config_SessionkeyConfig `protobuf:"bytes,9,opt,name=sessionkey,proto3,oneof"` +} + +type Config_DeviceUi struct { + DeviceUi *DeviceUIConfig `protobuf:"bytes,10,opt,name=device_ui,json=deviceUi,proto3,oneof"` +} + +func (*Config_Device) isConfig_PayloadVariant() {} + +func (*Config_Position) isConfig_PayloadVariant() {} + +func (*Config_Power) isConfig_PayloadVariant() {} + +func (*Config_Network) isConfig_PayloadVariant() {} + +func (*Config_Display) isConfig_PayloadVariant() {} + +func (*Config_Lora) isConfig_PayloadVariant() {} + +func (*Config_Bluetooth) isConfig_PayloadVariant() {} + +func (*Config_Security) isConfig_PayloadVariant() {} + +func (*Config_Sessionkey) isConfig_PayloadVariant() {} + +func (*Config_DeviceUi) isConfig_PayloadVariant() {} + +// Configuration +type Config_DeviceConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sets the role of node + Role Config_DeviceConfig_Role `protobuf:"varint,1,opt,name=role,proto3,enum=meshtastic.Config_DeviceConfig_Role" json:"role,omitempty"` + // Disabling this will disable the SerialConsole by not initilizing the StreamAPI + // Moved to SecurityConfig + // + // Deprecated: Marked as deprecated in meshtastic/config.proto. + SerialEnabled bool `protobuf:"varint,2,opt,name=serial_enabled,json=serialEnabled,proto3" json:"serial_enabled,omitempty"` + // For boards without a hard wired button, this is the pin number that will be used + // Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. + ButtonGpio uint32 `protobuf:"varint,4,opt,name=button_gpio,json=buttonGpio,proto3" json:"button_gpio,omitempty"` + // For boards without a PWM buzzer, this is the pin number that will be used + // Defaults to PIN_BUZZER if defined. + BuzzerGpio uint32 `protobuf:"varint,5,opt,name=buzzer_gpio,json=buzzerGpio,proto3" json:"buzzer_gpio,omitempty"` + // Sets the role of node + RebroadcastMode Config_DeviceConfig_RebroadcastMode `protobuf:"varint,6,opt,name=rebroadcast_mode,json=rebroadcastMode,proto3,enum=meshtastic.Config_DeviceConfig_RebroadcastMode" json:"rebroadcast_mode,omitempty"` + // Send our nodeinfo this often + // Defaults to 900 Seconds (15 minutes) + NodeInfoBroadcastSecs uint32 `protobuf:"varint,7,opt,name=node_info_broadcast_secs,json=nodeInfoBroadcastSecs,proto3" json:"node_info_broadcast_secs,omitempty"` + // Treat double tap interrupt on supported accelerometers as a button press if set to true + DoubleTapAsButtonPress bool `protobuf:"varint,8,opt,name=double_tap_as_button_press,json=doubleTapAsButtonPress,proto3" json:"double_tap_as_button_press,omitempty"` + // If true, device is considered to be "managed" by a mesh administrator + // Clients should then limit available configuration and administrative options inside the user interface + // Moved to SecurityConfig + // + // Deprecated: Marked as deprecated in meshtastic/config.proto. + IsManaged bool `protobuf:"varint,9,opt,name=is_managed,json=isManaged,proto3" json:"is_managed,omitempty"` + // Disables the triple-press of user button to enable or disable GPS + DisableTripleClick bool `protobuf:"varint,10,opt,name=disable_triple_click,json=disableTripleClick,proto3" json:"disable_triple_click,omitempty"` + // POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. + Tzdef string `protobuf:"bytes,11,opt,name=tzdef,proto3" json:"tzdef,omitempty"` + // If true, disable the default blinking LED (LED_PIN) behavior on the device + LedHeartbeatDisabled bool `protobuf:"varint,12,opt,name=led_heartbeat_disabled,json=ledHeartbeatDisabled,proto3" json:"led_heartbeat_disabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_DeviceConfig) Reset() { + *x = Config_DeviceConfig{} + mi := &file_meshtastic_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_DeviceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_DeviceConfig) ProtoMessage() {} + +func (x *Config_DeviceConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_DeviceConfig.ProtoReflect.Descriptor instead. +func (*Config_DeviceConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Config_DeviceConfig) GetRole() Config_DeviceConfig_Role { + if x != nil { + return x.Role + } + return Config_DeviceConfig_CLIENT +} + +// Deprecated: Marked as deprecated in meshtastic/config.proto. +func (x *Config_DeviceConfig) GetSerialEnabled() bool { + if x != nil { + return x.SerialEnabled + } + return false +} + +func (x *Config_DeviceConfig) GetButtonGpio() uint32 { + if x != nil { + return x.ButtonGpio + } + return 0 +} + +func (x *Config_DeviceConfig) GetBuzzerGpio() uint32 { + if x != nil { + return x.BuzzerGpio + } + return 0 +} + +func (x *Config_DeviceConfig) GetRebroadcastMode() Config_DeviceConfig_RebroadcastMode { + if x != nil { + return x.RebroadcastMode + } + return Config_DeviceConfig_ALL +} + +func (x *Config_DeviceConfig) GetNodeInfoBroadcastSecs() uint32 { + if x != nil { + return x.NodeInfoBroadcastSecs + } + return 0 +} + +func (x *Config_DeviceConfig) GetDoubleTapAsButtonPress() bool { + if x != nil { + return x.DoubleTapAsButtonPress + } + return false +} + +// Deprecated: Marked as deprecated in meshtastic/config.proto. +func (x *Config_DeviceConfig) GetIsManaged() bool { + if x != nil { + return x.IsManaged + } + return false +} + +func (x *Config_DeviceConfig) GetDisableTripleClick() bool { + if x != nil { + return x.DisableTripleClick + } + return false +} + +func (x *Config_DeviceConfig) GetTzdef() string { + if x != nil { + return x.Tzdef + } + return "" +} + +func (x *Config_DeviceConfig) GetLedHeartbeatDisabled() bool { + if x != nil { + return x.LedHeartbeatDisabled + } + return false +} + +// Position Config +type Config_PositionConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // We should send our position this often (but only if it has changed significantly) + // Defaults to 15 minutes + PositionBroadcastSecs uint32 `protobuf:"varint,1,opt,name=position_broadcast_secs,json=positionBroadcastSecs,proto3" json:"position_broadcast_secs,omitempty"` + // Adaptive position braoadcast, which is now the default. + PositionBroadcastSmartEnabled bool `protobuf:"varint,2,opt,name=position_broadcast_smart_enabled,json=positionBroadcastSmartEnabled,proto3" json:"position_broadcast_smart_enabled,omitempty"` + // If set, this node is at a fixed position. + // We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node. + // The lat/lon/alt can be set by an internal GPS or with the help of the app. + FixedPosition bool `protobuf:"varint,3,opt,name=fixed_position,json=fixedPosition,proto3" json:"fixed_position,omitempty"` + // Is GPS enabled for this node? + // + // Deprecated: Marked as deprecated in meshtastic/config.proto. + GpsEnabled bool `protobuf:"varint,4,opt,name=gps_enabled,json=gpsEnabled,proto3" json:"gps_enabled,omitempty"` + // How often should we try to get GPS position (in seconds) + // or zero for the default of once every 30 seconds + // or a very large value (maxint) to update only once at boot. + GpsUpdateInterval uint32 `protobuf:"varint,5,opt,name=gps_update_interval,json=gpsUpdateInterval,proto3" json:"gps_update_interval,omitempty"` + // Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time + // + // Deprecated: Marked as deprecated in meshtastic/config.proto. + GpsAttemptTime uint32 `protobuf:"varint,6,opt,name=gps_attempt_time,json=gpsAttemptTime,proto3" json:"gps_attempt_time,omitempty"` + // Bit field of boolean configuration options for POSITION messages + // (bitwise OR of PositionFlags) + PositionFlags uint32 `protobuf:"varint,7,opt,name=position_flags,json=positionFlags,proto3" json:"position_flags,omitempty"` + // (Re)define GPS_RX_PIN for your board. + RxGpio uint32 `protobuf:"varint,8,opt,name=rx_gpio,json=rxGpio,proto3" json:"rx_gpio,omitempty"` + // (Re)define GPS_TX_PIN for your board. + TxGpio uint32 `protobuf:"varint,9,opt,name=tx_gpio,json=txGpio,proto3" json:"tx_gpio,omitempty"` + // The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + BroadcastSmartMinimumDistance uint32 `protobuf:"varint,10,opt,name=broadcast_smart_minimum_distance,json=broadcastSmartMinimumDistance,proto3" json:"broadcast_smart_minimum_distance,omitempty"` + // The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + BroadcastSmartMinimumIntervalSecs uint32 `protobuf:"varint,11,opt,name=broadcast_smart_minimum_interval_secs,json=broadcastSmartMinimumIntervalSecs,proto3" json:"broadcast_smart_minimum_interval_secs,omitempty"` + // (Re)define PIN_GPS_EN for your board. + GpsEnGpio uint32 `protobuf:"varint,12,opt,name=gps_en_gpio,json=gpsEnGpio,proto3" json:"gps_en_gpio,omitempty"` + // Set where GPS is enabled, disabled, or not present + GpsMode Config_PositionConfig_GpsMode `protobuf:"varint,13,opt,name=gps_mode,json=gpsMode,proto3,enum=meshtastic.Config_PositionConfig_GpsMode" json:"gps_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_PositionConfig) Reset() { + *x = Config_PositionConfig{} + mi := &file_meshtastic_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_PositionConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_PositionConfig) ProtoMessage() {} + +func (x *Config_PositionConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_PositionConfig.ProtoReflect.Descriptor instead. +func (*Config_PositionConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Config_PositionConfig) GetPositionBroadcastSecs() uint32 { + if x != nil { + return x.PositionBroadcastSecs + } + return 0 +} + +func (x *Config_PositionConfig) GetPositionBroadcastSmartEnabled() bool { + if x != nil { + return x.PositionBroadcastSmartEnabled + } + return false +} + +func (x *Config_PositionConfig) GetFixedPosition() bool { + if x != nil { + return x.FixedPosition + } + return false +} + +// Deprecated: Marked as deprecated in meshtastic/config.proto. +func (x *Config_PositionConfig) GetGpsEnabled() bool { + if x != nil { + return x.GpsEnabled + } + return false +} + +func (x *Config_PositionConfig) GetGpsUpdateInterval() uint32 { + if x != nil { + return x.GpsUpdateInterval + } + return 0 +} + +// Deprecated: Marked as deprecated in meshtastic/config.proto. +func (x *Config_PositionConfig) GetGpsAttemptTime() uint32 { + if x != nil { + return x.GpsAttemptTime + } + return 0 +} + +func (x *Config_PositionConfig) GetPositionFlags() uint32 { + if x != nil { + return x.PositionFlags + } + return 0 +} + +func (x *Config_PositionConfig) GetRxGpio() uint32 { + if x != nil { + return x.RxGpio + } + return 0 +} + +func (x *Config_PositionConfig) GetTxGpio() uint32 { + if x != nil { + return x.TxGpio + } + return 0 +} + +func (x *Config_PositionConfig) GetBroadcastSmartMinimumDistance() uint32 { + if x != nil { + return x.BroadcastSmartMinimumDistance + } + return 0 +} + +func (x *Config_PositionConfig) GetBroadcastSmartMinimumIntervalSecs() uint32 { + if x != nil { + return x.BroadcastSmartMinimumIntervalSecs + } + return 0 +} + +func (x *Config_PositionConfig) GetGpsEnGpio() uint32 { + if x != nil { + return x.GpsEnGpio + } + return 0 +} + +func (x *Config_PositionConfig) GetGpsMode() Config_PositionConfig_GpsMode { + if x != nil { + return x.GpsMode + } + return Config_PositionConfig_DISABLED +} + +// Power Config\ +// See [Power Config](/docs/settings/config/power) for additional power config details. +type Config_PowerConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + // Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. + // Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles + IsPowerSaving bool `protobuf:"varint,1,opt,name=is_power_saving,json=isPowerSaving,proto3" json:"is_power_saving,omitempty"` + // Description: If non-zero, the device will fully power off this many seconds after external power is removed. + OnBatteryShutdownAfterSecs uint32 `protobuf:"varint,2,opt,name=on_battery_shutdown_after_secs,json=onBatteryShutdownAfterSecs,proto3" json:"on_battery_shutdown_after_secs,omitempty"` + // Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) + // Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. + // https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override + // Should be set to floating point value between 2 and 6 + AdcMultiplierOverride float32 `protobuf:"fixed32,3,opt,name=adc_multiplier_override,json=adcMultiplierOverride,proto3" json:"adc_multiplier_override,omitempty"` + // Description: The number of seconds for to wait before turning off BLE in No Bluetooth states + // Technical Details: ESP32 Only 0 for default of 1 minute + WaitBluetoothSecs uint32 `protobuf:"varint,4,opt,name=wait_bluetooth_secs,json=waitBluetoothSecs,proto3" json:"wait_bluetooth_secs,omitempty"` + // Super Deep Sleep Seconds + // While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep + // for this value (default 1 year) or a button press + // 0 for default of one year + SdsSecs uint32 `protobuf:"varint,6,opt,name=sds_secs,json=sdsSecs,proto3" json:"sds_secs,omitempty"` + // Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on + // Technical Details: ESP32 Only 0 for default of 300 + LsSecs uint32 `protobuf:"varint,7,opt,name=ls_secs,json=lsSecs,proto3" json:"ls_secs,omitempty"` + // Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value + // Technical Details: ESP32 Only 0 for default of 10 seconds + MinWakeSecs uint32 `protobuf:"varint,8,opt,name=min_wake_secs,json=minWakeSecs,proto3" json:"min_wake_secs,omitempty"` + // I2C address of INA_2XX to use for reading device battery voltage + DeviceBatteryInaAddress uint32 `protobuf:"varint,9,opt,name=device_battery_ina_address,json=deviceBatteryInaAddress,proto3" json:"device_battery_ina_address,omitempty"` + // If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled. + // Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. + PowermonEnables uint64 `protobuf:"varint,32,opt,name=powermon_enables,json=powermonEnables,proto3" json:"powermon_enables,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_PowerConfig) Reset() { + *x = Config_PowerConfig{} + mi := &file_meshtastic_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_PowerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_PowerConfig) ProtoMessage() {} + +func (x *Config_PowerConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_PowerConfig.ProtoReflect.Descriptor instead. +func (*Config_PowerConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *Config_PowerConfig) GetIsPowerSaving() bool { + if x != nil { + return x.IsPowerSaving + } + return false +} + +func (x *Config_PowerConfig) GetOnBatteryShutdownAfterSecs() uint32 { + if x != nil { + return x.OnBatteryShutdownAfterSecs + } + return 0 +} + +func (x *Config_PowerConfig) GetAdcMultiplierOverride() float32 { + if x != nil { + return x.AdcMultiplierOverride + } + return 0 +} + +func (x *Config_PowerConfig) GetWaitBluetoothSecs() uint32 { + if x != nil { + return x.WaitBluetoothSecs + } + return 0 +} + +func (x *Config_PowerConfig) GetSdsSecs() uint32 { + if x != nil { + return x.SdsSecs + } + return 0 +} + +func (x *Config_PowerConfig) GetLsSecs() uint32 { + if x != nil { + return x.LsSecs + } + return 0 +} + +func (x *Config_PowerConfig) GetMinWakeSecs() uint32 { + if x != nil { + return x.MinWakeSecs + } + return 0 +} + +func (x *Config_PowerConfig) GetDeviceBatteryInaAddress() uint32 { + if x != nil { + return x.DeviceBatteryInaAddress + } + return 0 +} + +func (x *Config_PowerConfig) GetPowermonEnables() uint64 { + if x != nil { + return x.PowermonEnables + } + return 0 +} + +// Network Config +type Config_NetworkConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable WiFi (disables Bluetooth) + WifiEnabled bool `protobuf:"varint,1,opt,name=wifi_enabled,json=wifiEnabled,proto3" json:"wifi_enabled,omitempty"` + // If set, this node will try to join the specified wifi network and + // acquire an address via DHCP + WifiSsid string `protobuf:"bytes,3,opt,name=wifi_ssid,json=wifiSsid,proto3" json:"wifi_ssid,omitempty"` + // If set, will be use to authenticate to the named wifi + WifiPsk string `protobuf:"bytes,4,opt,name=wifi_psk,json=wifiPsk,proto3" json:"wifi_psk,omitempty"` + // NTP server to use if WiFi is conneced, defaults to `meshtastic.pool.ntp.org` + NtpServer string `protobuf:"bytes,5,opt,name=ntp_server,json=ntpServer,proto3" json:"ntp_server,omitempty"` + // Enable Ethernet + EthEnabled bool `protobuf:"varint,6,opt,name=eth_enabled,json=ethEnabled,proto3" json:"eth_enabled,omitempty"` + // acquire an address via DHCP or assign static + AddressMode Config_NetworkConfig_AddressMode `protobuf:"varint,7,opt,name=address_mode,json=addressMode,proto3,enum=meshtastic.Config_NetworkConfig_AddressMode" json:"address_mode,omitempty"` + // struct to keep static address + Ipv4Config *Config_NetworkConfig_IpV4Config `protobuf:"bytes,8,opt,name=ipv4_config,json=ipv4Config,proto3" json:"ipv4_config,omitempty"` + // rsyslog Server and Port + RsyslogServer string `protobuf:"bytes,9,opt,name=rsyslog_server,json=rsyslogServer,proto3" json:"rsyslog_server,omitempty"` + // Flags for enabling/disabling network protocols + EnabledProtocols uint32 `protobuf:"varint,10,opt,name=enabled_protocols,json=enabledProtocols,proto3" json:"enabled_protocols,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_NetworkConfig) Reset() { + *x = Config_NetworkConfig{} + mi := &file_meshtastic_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_NetworkConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_NetworkConfig) ProtoMessage() {} + +func (x *Config_NetworkConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_NetworkConfig.ProtoReflect.Descriptor instead. +func (*Config_NetworkConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *Config_NetworkConfig) GetWifiEnabled() bool { + if x != nil { + return x.WifiEnabled + } + return false +} + +func (x *Config_NetworkConfig) GetWifiSsid() string { + if x != nil { + return x.WifiSsid + } + return "" +} + +func (x *Config_NetworkConfig) GetWifiPsk() string { + if x != nil { + return x.WifiPsk + } + return "" +} + +func (x *Config_NetworkConfig) GetNtpServer() string { + if x != nil { + return x.NtpServer + } + return "" +} + +func (x *Config_NetworkConfig) GetEthEnabled() bool { + if x != nil { + return x.EthEnabled + } + return false +} + +func (x *Config_NetworkConfig) GetAddressMode() Config_NetworkConfig_AddressMode { + if x != nil { + return x.AddressMode + } + return Config_NetworkConfig_DHCP +} + +func (x *Config_NetworkConfig) GetIpv4Config() *Config_NetworkConfig_IpV4Config { + if x != nil { + return x.Ipv4Config + } + return nil +} + +func (x *Config_NetworkConfig) GetRsyslogServer() string { + if x != nil { + return x.RsyslogServer + } + return "" +} + +func (x *Config_NetworkConfig) GetEnabledProtocols() uint32 { + if x != nil { + return x.EnabledProtocols + } + return 0 +} + +// Display Config +type Config_DisplayConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Number of seconds the screen stays on after pressing the user button or receiving a message + // 0 for default of one minute MAXUINT for always on + ScreenOnSecs uint32 `protobuf:"varint,1,opt,name=screen_on_secs,json=screenOnSecs,proto3" json:"screen_on_secs,omitempty"` + // How the GPS coordinates are formatted on the OLED screen. + GpsFormat Config_DisplayConfig_GpsCoordinateFormat `protobuf:"varint,2,opt,name=gps_format,json=gpsFormat,proto3,enum=meshtastic.Config_DisplayConfig_GpsCoordinateFormat" json:"gps_format,omitempty"` + // Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. + // Potentially useful for devices without user buttons. + AutoScreenCarouselSecs uint32 `protobuf:"varint,3,opt,name=auto_screen_carousel_secs,json=autoScreenCarouselSecs,proto3" json:"auto_screen_carousel_secs,omitempty"` + // If this is set, the displayed compass will always point north. if unset, the old behaviour + // (top of display is heading direction) is used. + CompassNorthTop bool `protobuf:"varint,4,opt,name=compass_north_top,json=compassNorthTop,proto3" json:"compass_north_top,omitempty"` + // Flip screen vertically, for cases that mount the screen upside down + FlipScreen bool `protobuf:"varint,5,opt,name=flip_screen,json=flipScreen,proto3" json:"flip_screen,omitempty"` + // Perferred display units + Units Config_DisplayConfig_DisplayUnits `protobuf:"varint,6,opt,name=units,proto3,enum=meshtastic.Config_DisplayConfig_DisplayUnits" json:"units,omitempty"` + // Override auto-detect in screen + Oled Config_DisplayConfig_OledType `protobuf:"varint,7,opt,name=oled,proto3,enum=meshtastic.Config_DisplayConfig_OledType" json:"oled,omitempty"` + // Display Mode + Displaymode Config_DisplayConfig_DisplayMode `protobuf:"varint,8,opt,name=displaymode,proto3,enum=meshtastic.Config_DisplayConfig_DisplayMode" json:"displaymode,omitempty"` + // Print first line in pseudo-bold? FALSE is original style, TRUE is bold + HeadingBold bool `protobuf:"varint,9,opt,name=heading_bold,json=headingBold,proto3" json:"heading_bold,omitempty"` + // Should we wake the screen up on accelerometer detected motion or tap + WakeOnTapOrMotion bool `protobuf:"varint,10,opt,name=wake_on_tap_or_motion,json=wakeOnTapOrMotion,proto3" json:"wake_on_tap_or_motion,omitempty"` + // Indicates how to rotate or invert the compass output to accurate display on the display. + CompassOrientation Config_DisplayConfig_CompassOrientation `protobuf:"varint,11,opt,name=compass_orientation,json=compassOrientation,proto3,enum=meshtastic.Config_DisplayConfig_CompassOrientation" json:"compass_orientation,omitempty"` + // If false (default), the device will display the time in 24-hour format on screen. + // If true, the device will display the time in 12-hour format on screen. + Use_12HClock bool `protobuf:"varint,12,opt,name=use_12h_clock,json=use12hClock,proto3" json:"use_12h_clock,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_DisplayConfig) Reset() { + *x = Config_DisplayConfig{} + mi := &file_meshtastic_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_DisplayConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_DisplayConfig) ProtoMessage() {} + +func (x *Config_DisplayConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_DisplayConfig.ProtoReflect.Descriptor instead. +func (*Config_DisplayConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *Config_DisplayConfig) GetScreenOnSecs() uint32 { + if x != nil { + return x.ScreenOnSecs + } + return 0 +} + +func (x *Config_DisplayConfig) GetGpsFormat() Config_DisplayConfig_GpsCoordinateFormat { + if x != nil { + return x.GpsFormat + } + return Config_DisplayConfig_DEC +} + +func (x *Config_DisplayConfig) GetAutoScreenCarouselSecs() uint32 { + if x != nil { + return x.AutoScreenCarouselSecs + } + return 0 +} + +func (x *Config_DisplayConfig) GetCompassNorthTop() bool { + if x != nil { + return x.CompassNorthTop + } + return false +} + +func (x *Config_DisplayConfig) GetFlipScreen() bool { + if x != nil { + return x.FlipScreen + } + return false +} + +func (x *Config_DisplayConfig) GetUnits() Config_DisplayConfig_DisplayUnits { + if x != nil { + return x.Units + } + return Config_DisplayConfig_METRIC +} + +func (x *Config_DisplayConfig) GetOled() Config_DisplayConfig_OledType { + if x != nil { + return x.Oled + } + return Config_DisplayConfig_OLED_AUTO +} + +func (x *Config_DisplayConfig) GetDisplaymode() Config_DisplayConfig_DisplayMode { + if x != nil { + return x.Displaymode + } + return Config_DisplayConfig_DEFAULT +} + +func (x *Config_DisplayConfig) GetHeadingBold() bool { + if x != nil { + return x.HeadingBold + } + return false +} + +func (x *Config_DisplayConfig) GetWakeOnTapOrMotion() bool { + if x != nil { + return x.WakeOnTapOrMotion + } + return false +} + +func (x *Config_DisplayConfig) GetCompassOrientation() Config_DisplayConfig_CompassOrientation { + if x != nil { + return x.CompassOrientation + } + return Config_DisplayConfig_DEGREES_0 +} + +func (x *Config_DisplayConfig) GetUse_12HClock() bool { + if x != nil { + return x.Use_12HClock + } + return false +} + +// Lora Config +type Config_LoRaConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate` + // will be taked from their respective manually defined fields + UsePreset bool `protobuf:"varint,1,opt,name=use_preset,json=usePreset,proto3" json:"use_preset,omitempty"` + // Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. + // As a heuristic: If bandwidth is specified, do not use modem_config. + // Because protobufs take ZERO space when the value is zero this works out nicely. + // This value is replaced by bandwidth/spread_factor/coding_rate. + // If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. + ModemPreset Config_LoRaConfig_ModemPreset `protobuf:"varint,2,opt,name=modem_preset,json=modemPreset,proto3,enum=meshtastic.Config_LoRaConfig_ModemPreset" json:"modem_preset,omitempty"` + // Bandwidth in MHz + // Certain bandwidth numbers are 'special' and will be converted to the + // appropriate floating point value: 31 -> 31.25MHz + Bandwidth uint32 `protobuf:"varint,3,opt,name=bandwidth,proto3" json:"bandwidth,omitempty"` + // A number from 7 to 12. + // Indicates number of chirps per symbol as 1< 7 results in the default + HopLimit uint32 `protobuf:"varint,8,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` + // Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. + // Defaults to false + TxEnabled bool `protobuf:"varint,9,opt,name=tx_enabled,json=txEnabled,proto3" json:"tx_enabled,omitempty"` + // If zero, then use default max legal continuous power (ie. something that won't + // burn out the radio hardware) + // In most cases you should use zero here. + // Units are in dBm. + TxPower int32 `protobuf:"varint,10,opt,name=tx_power,json=txPower,proto3" json:"tx_power,omitempty"` + // This controls the actual hardware frequency the radio transmits on. + // Most users should never need to be exposed to this field/concept. + // A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). + // If ZERO then the rule is "use the old channel name hash based + // algorithm to derive the channel number") + // If using the hash algorithm the channel number will be: hash(channel_name) % + // NUM_CHANNELS (Where num channels depends on the regulatory region). + ChannelNum uint32 `protobuf:"varint,11,opt,name=channel_num,json=channelNum,proto3" json:"channel_num,omitempty"` + // If true, duty cycle limits will be exceeded and thus you're possibly not following + // the local regulations if you're not a HAM. + // Has no effect if the duty cycle of the used region is 100%. + OverrideDutyCycle bool `protobuf:"varint,12,opt,name=override_duty_cycle,json=overrideDutyCycle,proto3" json:"override_duty_cycle,omitempty"` + // If true, sets RX boosted gain mode on SX126X based radios + Sx126XRxBoostedGain bool `protobuf:"varint,13,opt,name=sx126x_rx_boosted_gain,json=sx126xRxBoostedGain,proto3" json:"sx126x_rx_boosted_gain,omitempty"` + // This parameter is for advanced users and licensed HAM radio operators. + // Ignore Channel Calculation and use this frequency instead. The frequency_offset + // will still be applied. This will allow you to use out-of-band frequencies. + // Please respect your local laws and regulations. If you are a HAM, make sure you + // enable HAM mode and turn off encryption. + OverrideFrequency float32 `protobuf:"fixed32,14,opt,name=override_frequency,json=overrideFrequency,proto3" json:"override_frequency,omitempty"` + // If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. + PaFanDisabled bool `protobuf:"varint,15,opt,name=pa_fan_disabled,json=paFanDisabled,proto3" json:"pa_fan_disabled,omitempty"` + // For testing it is useful sometimes to force a node to never listen to + // particular other nodes (simulating radio out of range). All nodenums listed + // in ignore_incoming will have packets they send dropped on receive (by router.cpp) + IgnoreIncoming []uint32 `protobuf:"varint,103,rep,packed,name=ignore_incoming,json=ignoreIncoming,proto3" json:"ignore_incoming,omitempty"` + // If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. + IgnoreMqtt bool `protobuf:"varint,104,opt,name=ignore_mqtt,json=ignoreMqtt,proto3" json:"ignore_mqtt,omitempty"` + // Sets the ok_to_mqtt bit on outgoing packets + ConfigOkToMqtt bool `protobuf:"varint,105,opt,name=config_ok_to_mqtt,json=configOkToMqtt,proto3" json:"config_ok_to_mqtt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_LoRaConfig) Reset() { + *x = Config_LoRaConfig{} + mi := &file_meshtastic_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_LoRaConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_LoRaConfig) ProtoMessage() {} + +func (x *Config_LoRaConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_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 Config_LoRaConfig.ProtoReflect.Descriptor instead. +func (*Config_LoRaConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *Config_LoRaConfig) GetUsePreset() bool { + if x != nil { + return x.UsePreset + } + return false +} + +func (x *Config_LoRaConfig) GetModemPreset() Config_LoRaConfig_ModemPreset { + if x != nil { + return x.ModemPreset + } + return Config_LoRaConfig_LONG_FAST +} + +func (x *Config_LoRaConfig) GetBandwidth() uint32 { + if x != nil { + return x.Bandwidth + } + return 0 +} + +func (x *Config_LoRaConfig) GetSpreadFactor() uint32 { + if x != nil { + return x.SpreadFactor + } + return 0 +} + +func (x *Config_LoRaConfig) GetCodingRate() uint32 { + if x != nil { + return x.CodingRate + } + return 0 +} + +func (x *Config_LoRaConfig) GetFrequencyOffset() float32 { + if x != nil { + return x.FrequencyOffset + } + return 0 +} + +func (x *Config_LoRaConfig) GetRegion() Config_LoRaConfig_RegionCode { + if x != nil { + return x.Region + } + return Config_LoRaConfig_UNSET +} + +func (x *Config_LoRaConfig) GetHopLimit() uint32 { + if x != nil { + return x.HopLimit + } + return 0 +} + +func (x *Config_LoRaConfig) GetTxEnabled() bool { + if x != nil { + return x.TxEnabled + } + return false +} + +func (x *Config_LoRaConfig) GetTxPower() int32 { + if x != nil { + return x.TxPower + } + return 0 +} + +func (x *Config_LoRaConfig) GetChannelNum() uint32 { + if x != nil { + return x.ChannelNum + } + return 0 +} + +func (x *Config_LoRaConfig) GetOverrideDutyCycle() bool { + if x != nil { + return x.OverrideDutyCycle + } + return false +} + +func (x *Config_LoRaConfig) GetSx126XRxBoostedGain() bool { + if x != nil { + return x.Sx126XRxBoostedGain + } + return false +} + +func (x *Config_LoRaConfig) GetOverrideFrequency() float32 { + if x != nil { + return x.OverrideFrequency + } + return 0 +} + +func (x *Config_LoRaConfig) GetPaFanDisabled() bool { + if x != nil { + return x.PaFanDisabled + } + return false +} + +func (x *Config_LoRaConfig) GetIgnoreIncoming() []uint32 { + if x != nil { + return x.IgnoreIncoming + } + return nil +} + +func (x *Config_LoRaConfig) GetIgnoreMqtt() bool { + if x != nil { + return x.IgnoreMqtt + } + return false +} + +func (x *Config_LoRaConfig) GetConfigOkToMqtt() bool { + if x != nil { + return x.ConfigOkToMqtt + } + return false +} + +type Config_BluetoothConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable Bluetooth on the device + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Determines the pairing strategy for the device + Mode Config_BluetoothConfig_PairingMode `protobuf:"varint,2,opt,name=mode,proto3,enum=meshtastic.Config_BluetoothConfig_PairingMode" json:"mode,omitempty"` + // Specified PIN for PairingMode.FixedPin + FixedPin uint32 `protobuf:"varint,3,opt,name=fixed_pin,json=fixedPin,proto3" json:"fixed_pin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_BluetoothConfig) Reset() { + *x = Config_BluetoothConfig{} + mi := &file_meshtastic_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_BluetoothConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_BluetoothConfig) ProtoMessage() {} + +func (x *Config_BluetoothConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_proto_msgTypes[7] + 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 Config_BluetoothConfig.ProtoReflect.Descriptor instead. +func (*Config_BluetoothConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *Config_BluetoothConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *Config_BluetoothConfig) GetMode() Config_BluetoothConfig_PairingMode { + if x != nil { + return x.Mode + } + return Config_BluetoothConfig_RANDOM_PIN +} + +func (x *Config_BluetoothConfig) GetFixedPin() uint32 { + if x != nil { + return x.FixedPin + } + return 0 +} + +type Config_SecurityConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The public key of the user's device. + // Sent out to other nodes on the mesh to allow them to compute a shared secret key. + PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The private key of the device. + // Used to create a shared key with a remote device. + PrivateKey []byte `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The public key authorized to send admin messages to this node. + AdminKey [][]byte `protobuf:"bytes,3,rep,name=admin_key,json=adminKey,proto3" json:"admin_key,omitempty"` + // If true, device is considered to be "managed" by a mesh administrator via admin messages + // Device is managed by a mesh administrator. + IsManaged bool `protobuf:"varint,4,opt,name=is_managed,json=isManaged,proto3" json:"is_managed,omitempty"` + // Serial Console over the Stream API." + SerialEnabled bool `protobuf:"varint,5,opt,name=serial_enabled,json=serialEnabled,proto3" json:"serial_enabled,omitempty"` + // By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). + // Output live debug logging over serial or bluetooth is set to true. + DebugLogApiEnabled bool `protobuf:"varint,6,opt,name=debug_log_api_enabled,json=debugLogApiEnabled,proto3" json:"debug_log_api_enabled,omitempty"` + // Allow incoming device control over the insecure legacy admin channel. + AdminChannelEnabled bool `protobuf:"varint,8,opt,name=admin_channel_enabled,json=adminChannelEnabled,proto3" json:"admin_channel_enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_SecurityConfig) Reset() { + *x = Config_SecurityConfig{} + mi := &file_meshtastic_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_SecurityConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_SecurityConfig) ProtoMessage() {} + +func (x *Config_SecurityConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_proto_msgTypes[8] + 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 Config_SecurityConfig.ProtoReflect.Descriptor instead. +func (*Config_SecurityConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 7} +} + +func (x *Config_SecurityConfig) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Config_SecurityConfig) GetPrivateKey() []byte { + if x != nil { + return x.PrivateKey + } + return nil +} + +func (x *Config_SecurityConfig) GetAdminKey() [][]byte { + if x != nil { + return x.AdminKey + } + return nil +} + +func (x *Config_SecurityConfig) GetIsManaged() bool { + if x != nil { + return x.IsManaged + } + return false +} + +func (x *Config_SecurityConfig) GetSerialEnabled() bool { + if x != nil { + return x.SerialEnabled + } + return false +} + +func (x *Config_SecurityConfig) GetDebugLogApiEnabled() bool { + if x != nil { + return x.DebugLogApiEnabled + } + return false +} + +func (x *Config_SecurityConfig) GetAdminChannelEnabled() bool { + if x != nil { + return x.AdminChannelEnabled + } + return false +} + +// Blank config request, strictly for getting the session key +type Config_SessionkeyConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_SessionkeyConfig) Reset() { + *x = Config_SessionkeyConfig{} + mi := &file_meshtastic_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_SessionkeyConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_SessionkeyConfig) ProtoMessage() {} + +func (x *Config_SessionkeyConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_proto_msgTypes[9] + 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 Config_SessionkeyConfig.ProtoReflect.Descriptor instead. +func (*Config_SessionkeyConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 8} +} + +type Config_NetworkConfig_IpV4Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Static IP address + Ip uint32 `protobuf:"fixed32,1,opt,name=ip,proto3" json:"ip,omitempty"` + // Static gateway address + Gateway uint32 `protobuf:"fixed32,2,opt,name=gateway,proto3" json:"gateway,omitempty"` + // Static subnet mask + Subnet uint32 `protobuf:"fixed32,3,opt,name=subnet,proto3" json:"subnet,omitempty"` + // Static DNS server address + Dns uint32 `protobuf:"fixed32,4,opt,name=dns,proto3" json:"dns,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Config_NetworkConfig_IpV4Config) Reset() { + *x = Config_NetworkConfig_IpV4Config{} + mi := &file_meshtastic_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Config_NetworkConfig_IpV4Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Config_NetworkConfig_IpV4Config) ProtoMessage() {} + +func (x *Config_NetworkConfig_IpV4Config) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_config_proto_msgTypes[10] + 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 Config_NetworkConfig_IpV4Config.ProtoReflect.Descriptor instead. +func (*Config_NetworkConfig_IpV4Config) Descriptor() ([]byte, []int) { + return file_meshtastic_config_proto_rawDescGZIP(), []int{0, 3, 0} +} + +func (x *Config_NetworkConfig_IpV4Config) GetIp() uint32 { + if x != nil { + return x.Ip + } + return 0 +} + +func (x *Config_NetworkConfig_IpV4Config) GetGateway() uint32 { + if x != nil { + return x.Gateway + } + return 0 +} + +func (x *Config_NetworkConfig_IpV4Config) GetSubnet() uint32 { + if x != nil { + return x.Subnet + } + return 0 +} + +func (x *Config_NetworkConfig_IpV4Config) GetDns() uint32 { + if x != nil { + return x.Dns + } + return 0 +} + +var File_meshtastic_config_proto protoreflect.FileDescriptor + +const file_meshtastic_config_proto_rawDesc = "" + + "\n" + + "\x17meshtastic/config.proto\x12\n" + + "meshtastic\x1a\x1ameshtastic/device_ui.proto\"\x9e1\n" + + "\x06Config\x129\n" + + "\x06device\x18\x01 \x01(\v2\x1f.meshtastic.Config.DeviceConfigH\x00R\x06device\x12?\n" + + "\bposition\x18\x02 \x01(\v2!.meshtastic.Config.PositionConfigH\x00R\bposition\x126\n" + + "\x05power\x18\x03 \x01(\v2\x1e.meshtastic.Config.PowerConfigH\x00R\x05power\x12<\n" + + "\anetwork\x18\x04 \x01(\v2 .meshtastic.Config.NetworkConfigH\x00R\anetwork\x12<\n" + + "\adisplay\x18\x05 \x01(\v2 .meshtastic.Config.DisplayConfigH\x00R\adisplay\x123\n" + + "\x04lora\x18\x06 \x01(\v2\x1d.meshtastic.Config.LoRaConfigH\x00R\x04lora\x12B\n" + + "\tbluetooth\x18\a \x01(\v2\".meshtastic.Config.BluetoothConfigH\x00R\tbluetooth\x12?\n" + + "\bsecurity\x18\b \x01(\v2!.meshtastic.Config.SecurityConfigH\x00R\bsecurity\x12E\n" + + "\n" + + "sessionkey\x18\t \x01(\v2#.meshtastic.Config.SessionkeyConfigH\x00R\n" + + "sessionkey\x129\n" + + "\tdevice_ui\x18\n" + + " \x01(\v2\x1a.meshtastic.DeviceUIConfigH\x00R\bdeviceUi\x1a\xde\x06\n" + + "\fDeviceConfig\x128\n" + + "\x04role\x18\x01 \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x12)\n" + + "\x0eserial_enabled\x18\x02 \x01(\bB\x02\x18\x01R\rserialEnabled\x12\x1f\n" + + "\vbutton_gpio\x18\x04 \x01(\rR\n" + + "buttonGpio\x12\x1f\n" + + "\vbuzzer_gpio\x18\x05 \x01(\rR\n" + + "buzzerGpio\x12Z\n" + + "\x10rebroadcast_mode\x18\x06 \x01(\x0e2/.meshtastic.Config.DeviceConfig.RebroadcastModeR\x0frebroadcastMode\x127\n" + + "\x18node_info_broadcast_secs\x18\a \x01(\rR\x15nodeInfoBroadcastSecs\x12:\n" + + "\x1adouble_tap_as_button_press\x18\b \x01(\bR\x16doubleTapAsButtonPress\x12!\n" + + "\n" + + "is_managed\x18\t \x01(\bB\x02\x18\x01R\tisManaged\x120\n" + + "\x14disable_triple_click\x18\n" + + " \x01(\bR\x12disableTripleClick\x12\x14\n" + + "\x05tzdef\x18\v \x01(\tR\x05tzdef\x124\n" + + "\x16led_heartbeat_disabled\x18\f \x01(\bR\x14ledHeartbeatDisabled\"\xbf\x01\n" + + "\x04Role\x12\n" + + "\n" + + "\x06CLIENT\x10\x00\x12\x0f\n" + + "\vCLIENT_MUTE\x10\x01\x12\n" + + "\n" + + "\x06ROUTER\x10\x02\x12\x15\n" + + "\rROUTER_CLIENT\x10\x03\x1a\x02\b\x01\x12\f\n" + + "\bREPEATER\x10\x04\x12\v\n" + + "\aTRACKER\x10\x05\x12\n" + + "\n" + + "\x06SENSOR\x10\x06\x12\a\n" + + "\x03TAK\x10\a\x12\x11\n" + + "\rCLIENT_HIDDEN\x10\b\x12\x12\n" + + "\x0eLOST_AND_FOUND\x10\t\x12\x0f\n" + + "\vTAK_TRACKER\x10\n" + + "\x12\x0f\n" + + "\vROUTER_LATE\x10\v\"s\n" + + "\x0fRebroadcastMode\x12\a\n" + + "\x03ALL\x10\x00\x12\x15\n" + + "\x11ALL_SKIP_DECODING\x10\x01\x12\x0e\n" + + "\n" + + "LOCAL_ONLY\x10\x02\x12\x0e\n" + + "\n" + + "KNOWN_ONLY\x10\x03\x12\b\n" + + "\x04NONE\x10\x04\x12\x16\n" + + "\x12CORE_PORTNUMS_ONLY\x10\x05\x1a\xfa\x06\n" + + "\x0ePositionConfig\x126\n" + + "\x17position_broadcast_secs\x18\x01 \x01(\rR\x15positionBroadcastSecs\x12G\n" + + " position_broadcast_smart_enabled\x18\x02 \x01(\bR\x1dpositionBroadcastSmartEnabled\x12%\n" + + "\x0efixed_position\x18\x03 \x01(\bR\rfixedPosition\x12#\n" + + "\vgps_enabled\x18\x04 \x01(\bB\x02\x18\x01R\n" + + "gpsEnabled\x12.\n" + + "\x13gps_update_interval\x18\x05 \x01(\rR\x11gpsUpdateInterval\x12,\n" + + "\x10gps_attempt_time\x18\x06 \x01(\rB\x02\x18\x01R\x0egpsAttemptTime\x12%\n" + + "\x0eposition_flags\x18\a \x01(\rR\rpositionFlags\x12\x17\n" + + "\arx_gpio\x18\b \x01(\rR\x06rxGpio\x12\x17\n" + + "\atx_gpio\x18\t \x01(\rR\x06txGpio\x12G\n" + + " broadcast_smart_minimum_distance\x18\n" + + " \x01(\rR\x1dbroadcastSmartMinimumDistance\x12P\n" + + "%broadcast_smart_minimum_interval_secs\x18\v \x01(\rR!broadcastSmartMinimumIntervalSecs\x12\x1e\n" + + "\vgps_en_gpio\x18\f \x01(\rR\tgpsEnGpio\x12D\n" + + "\bgps_mode\x18\r \x01(\x0e2).meshtastic.Config.PositionConfig.GpsModeR\agpsMode\"\xab\x01\n" + + "\rPositionFlags\x12\t\n" + + "\x05UNSET\x10\x00\x12\f\n" + + "\bALTITUDE\x10\x01\x12\x10\n" + + "\fALTITUDE_MSL\x10\x02\x12\x16\n" + + "\x12GEOIDAL_SEPARATION\x10\x04\x12\a\n" + + "\x03DOP\x10\b\x12\t\n" + + "\x05HVDOP\x10\x10\x12\r\n" + + "\tSATINVIEW\x10 \x12\n" + + "\n" + + "\x06SEQ_NO\x10@\x12\x0e\n" + + "\tTIMESTAMP\x10\x80\x01\x12\f\n" + + "\aHEADING\x10\x80\x02\x12\n" + + "\n" + + "\x05SPEED\x10\x80\x04\"5\n" + + "\aGpsMode\x12\f\n" + + "\bDISABLED\x10\x00\x12\v\n" + + "\aENABLED\x10\x01\x12\x0f\n" + + "\vNOT_PRESENT\x10\x02\x1a\xa1\x03\n" + + "\vPowerConfig\x12&\n" + + "\x0fis_power_saving\x18\x01 \x01(\bR\risPowerSaving\x12B\n" + + "\x1eon_battery_shutdown_after_secs\x18\x02 \x01(\rR\x1aonBatteryShutdownAfterSecs\x126\n" + + "\x17adc_multiplier_override\x18\x03 \x01(\x02R\x15adcMultiplierOverride\x12.\n" + + "\x13wait_bluetooth_secs\x18\x04 \x01(\rR\x11waitBluetoothSecs\x12\x19\n" + + "\bsds_secs\x18\x06 \x01(\rR\asdsSecs\x12\x17\n" + + "\als_secs\x18\a \x01(\rR\x06lsSecs\x12\"\n" + + "\rmin_wake_secs\x18\b \x01(\rR\vminWakeSecs\x12;\n" + + "\x1adevice_battery_ina_address\x18\t \x01(\rR\x17deviceBatteryInaAddress\x12)\n" + + "\x10powermon_enables\x18 \x01(\x04R\x0fpowermonEnables\x1a\xda\x04\n" + + "\rNetworkConfig\x12!\n" + + "\fwifi_enabled\x18\x01 \x01(\bR\vwifiEnabled\x12\x1b\n" + + "\twifi_ssid\x18\x03 \x01(\tR\bwifiSsid\x12\x19\n" + + "\bwifi_psk\x18\x04 \x01(\tR\awifiPsk\x12\x1d\n" + + "\n" + + "ntp_server\x18\x05 \x01(\tR\tntpServer\x12\x1f\n" + + "\veth_enabled\x18\x06 \x01(\bR\n" + + "ethEnabled\x12O\n" + + "\faddress_mode\x18\a \x01(\x0e2,.meshtastic.Config.NetworkConfig.AddressModeR\vaddressMode\x12L\n" + + "\vipv4_config\x18\b \x01(\v2+.meshtastic.Config.NetworkConfig.IpV4ConfigR\n" + + "ipv4Config\x12%\n" + + "\x0ersyslog_server\x18\t \x01(\tR\rrsyslogServer\x12+\n" + + "\x11enabled_protocols\x18\n" + + " \x01(\rR\x10enabledProtocols\x1a`\n" + + "\n" + + "IpV4Config\x12\x0e\n" + + "\x02ip\x18\x01 \x01(\aR\x02ip\x12\x18\n" + + "\agateway\x18\x02 \x01(\aR\agateway\x12\x16\n" + + "\x06subnet\x18\x03 \x01(\aR\x06subnet\x12\x10\n" + + "\x03dns\x18\x04 \x01(\aR\x03dns\"#\n" + + "\vAddressMode\x12\b\n" + + "\x04DHCP\x10\x00\x12\n" + + "\n" + + "\x06STATIC\x10\x01\"4\n" + + "\rProtocolFlags\x12\x10\n" + + "\fNO_BROADCAST\x10\x00\x12\x11\n" + + "\rUDP_BROADCAST\x10\x01\x1a\xa5\t\n" + + "\rDisplayConfig\x12$\n" + + "\x0escreen_on_secs\x18\x01 \x01(\rR\fscreenOnSecs\x12S\n" + + "\n" + + "gps_format\x18\x02 \x01(\x0e24.meshtastic.Config.DisplayConfig.GpsCoordinateFormatR\tgpsFormat\x129\n" + + "\x19auto_screen_carousel_secs\x18\x03 \x01(\rR\x16autoScreenCarouselSecs\x12*\n" + + "\x11compass_north_top\x18\x04 \x01(\bR\x0fcompassNorthTop\x12\x1f\n" + + "\vflip_screen\x18\x05 \x01(\bR\n" + + "flipScreen\x12C\n" + + "\x05units\x18\x06 \x01(\x0e2-.meshtastic.Config.DisplayConfig.DisplayUnitsR\x05units\x12=\n" + + "\x04oled\x18\a \x01(\x0e2).meshtastic.Config.DisplayConfig.OledTypeR\x04oled\x12N\n" + + "\vdisplaymode\x18\b \x01(\x0e2,.meshtastic.Config.DisplayConfig.DisplayModeR\vdisplaymode\x12!\n" + + "\fheading_bold\x18\t \x01(\bR\vheadingBold\x120\n" + + "\x15wake_on_tap_or_motion\x18\n" + + " \x01(\bR\x11wakeOnTapOrMotion\x12d\n" + + "\x13compass_orientation\x18\v \x01(\x0e23.meshtastic.Config.DisplayConfig.CompassOrientationR\x12compassOrientation\x12\"\n" + + "\ruse_12h_clock\x18\f \x01(\bR\vuse12hClock\"M\n" + + "\x13GpsCoordinateFormat\x12\a\n" + + "\x03DEC\x10\x00\x12\a\n" + + "\x03DMS\x10\x01\x12\a\n" + + "\x03UTM\x10\x02\x12\b\n" + + "\x04MGRS\x10\x03\x12\a\n" + + "\x03OLC\x10\x04\x12\b\n" + + "\x04OSGR\x10\x05\"(\n" + + "\fDisplayUnits\x12\n" + + "\n" + + "\x06METRIC\x10\x00\x12\f\n" + + "\bIMPERIAL\x10\x01\"e\n" + + "\bOledType\x12\r\n" + + "\tOLED_AUTO\x10\x00\x12\x10\n" + + "\fOLED_SSD1306\x10\x01\x12\x0f\n" + + "\vOLED_SH1106\x10\x02\x12\x0f\n" + + "\vOLED_SH1107\x10\x03\x12\x16\n" + + "\x12OLED_SH1107_128_64\x10\x04\"A\n" + + "\vDisplayMode\x12\v\n" + + "\aDEFAULT\x10\x00\x12\f\n" + + "\bTWOCOLOR\x10\x01\x12\f\n" + + "\bINVERTED\x10\x02\x12\t\n" + + "\x05COLOR\x10\x03\"\xba\x01\n" + + "\x12CompassOrientation\x12\r\n" + + "\tDEGREES_0\x10\x00\x12\x0e\n" + + "\n" + + "DEGREES_90\x10\x01\x12\x0f\n" + + "\vDEGREES_180\x10\x02\x12\x0f\n" + + "\vDEGREES_270\x10\x03\x12\x16\n" + + "\x12DEGREES_0_INVERTED\x10\x04\x12\x17\n" + + "\x13DEGREES_90_INVERTED\x10\x05\x12\x18\n" + + "\x14DEGREES_180_INVERTED\x10\x06\x12\x18\n" + + "\x14DEGREES_270_INVERTED\x10\a\x1a\x93\t\n" + + "\n" + + "LoRaConfig\x12\x1d\n" + + "\n" + + "use_preset\x18\x01 \x01(\bR\tusePreset\x12L\n" + + "\fmodem_preset\x18\x02 \x01(\x0e2).meshtastic.Config.LoRaConfig.ModemPresetR\vmodemPreset\x12\x1c\n" + + "\tbandwidth\x18\x03 \x01(\rR\tbandwidth\x12#\n" + + "\rspread_factor\x18\x04 \x01(\rR\fspreadFactor\x12\x1f\n" + + "\vcoding_rate\x18\x05 \x01(\rR\n" + + "codingRate\x12)\n" + + "\x10frequency_offset\x18\x06 \x01(\x02R\x0ffrequencyOffset\x12@\n" + + "\x06region\x18\a \x01(\x0e2(.meshtastic.Config.LoRaConfig.RegionCodeR\x06region\x12\x1b\n" + + "\thop_limit\x18\b \x01(\rR\bhopLimit\x12\x1d\n" + + "\n" + + "tx_enabled\x18\t \x01(\bR\ttxEnabled\x12\x19\n" + + "\btx_power\x18\n" + + " \x01(\x05R\atxPower\x12\x1f\n" + + "\vchannel_num\x18\v \x01(\rR\n" + + "channelNum\x12.\n" + + "\x13override_duty_cycle\x18\f \x01(\bR\x11overrideDutyCycle\x123\n" + + "\x16sx126x_rx_boosted_gain\x18\r \x01(\bR\x13sx126xRxBoostedGain\x12-\n" + + "\x12override_frequency\x18\x0e \x01(\x02R\x11overrideFrequency\x12&\n" + + "\x0fpa_fan_disabled\x18\x0f \x01(\bR\rpaFanDisabled\x12'\n" + + "\x0fignore_incoming\x18g \x03(\rR\x0eignoreIncoming\x12\x1f\n" + + "\vignore_mqtt\x18h \x01(\bR\n" + + "ignoreMqtt\x12)\n" + + "\x11config_ok_to_mqtt\x18i \x01(\bR\x0econfigOkToMqtt\"\xf1\x01\n" + + "\n" + + "RegionCode\x12\t\n" + + "\x05UNSET\x10\x00\x12\x06\n" + + "\x02US\x10\x01\x12\n" + + "\n" + + "\x06EU_433\x10\x02\x12\n" + + "\n" + + "\x06EU_868\x10\x03\x12\x06\n" + + "\x02CN\x10\x04\x12\x06\n" + + "\x02JP\x10\x05\x12\a\n" + + "\x03ANZ\x10\x06\x12\x06\n" + + "\x02KR\x10\a\x12\x06\n" + + "\x02TW\x10\b\x12\x06\n" + + "\x02RU\x10\t\x12\x06\n" + + "\x02IN\x10\n" + + "\x12\n" + + "\n" + + "\x06NZ_865\x10\v\x12\x06\n" + + "\x02TH\x10\f\x12\v\n" + + "\aLORA_24\x10\r\x12\n" + + "\n" + + "\x06UA_433\x10\x0e\x12\n" + + "\n" + + "\x06UA_868\x10\x0f\x12\n" + + "\n" + + "\x06MY_433\x10\x10\x12\n" + + "\n" + + "\x06MY_919\x10\x11\x12\n" + + "\n" + + "\x06SG_923\x10\x12\x12\n" + + "\n" + + "\x06PH_433\x10\x13\x12\n" + + "\n" + + "\x06PH_868\x10\x14\x12\n" + + "\n" + + "\x06PH_915\x10\x15\"\xa9\x01\n" + + "\vModemPreset\x12\r\n" + + "\tLONG_FAST\x10\x00\x12\r\n" + + "\tLONG_SLOW\x10\x01\x12\x16\n" + + "\x0eVERY_LONG_SLOW\x10\x02\x1a\x02\b\x01\x12\x0f\n" + + "\vMEDIUM_SLOW\x10\x03\x12\x0f\n" + + "\vMEDIUM_FAST\x10\x04\x12\x0e\n" + + "\n" + + "SHORT_SLOW\x10\x05\x12\x0e\n" + + "\n" + + "SHORT_FAST\x10\x06\x12\x11\n" + + "\rLONG_MODERATE\x10\a\x12\x0f\n" + + "\vSHORT_TURBO\x10\b\x1a\xc6\x01\n" + + "\x0fBluetoothConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12B\n" + + "\x04mode\x18\x02 \x01(\x0e2..meshtastic.Config.BluetoothConfig.PairingModeR\x04mode\x12\x1b\n" + + "\tfixed_pin\x18\x03 \x01(\rR\bfixedPin\"8\n" + + "\vPairingMode\x12\x0e\n" + + "\n" + + "RANDOM_PIN\x10\x00\x12\r\n" + + "\tFIXED_PIN\x10\x01\x12\n" + + "\n" + + "\x06NO_PIN\x10\x02\x1a\x9a\x02\n" + + "\x0eSecurityConfig\x12\x1d\n" + + "\n" + + "public_key\x18\x01 \x01(\fR\tpublicKey\x12\x1f\n" + + "\vprivate_key\x18\x02 \x01(\fR\n" + + "privateKey\x12\x1b\n" + + "\tadmin_key\x18\x03 \x03(\fR\badminKey\x12\x1d\n" + + "\n" + + "is_managed\x18\x04 \x01(\bR\tisManaged\x12%\n" + + "\x0eserial_enabled\x18\x05 \x01(\bR\rserialEnabled\x121\n" + + "\x15debug_log_api_enabled\x18\x06 \x01(\bR\x12debugLogApiEnabled\x122\n" + + "\x15admin_channel_enabled\x18\b \x01(\bR\x13adminChannelEnabled\x1a\x12\n" + + "\x10SessionkeyConfigB\x11\n" + + "\x0fpayload_variantBa\n" + + "\x13com.geeksville.meshB\fConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_config_proto_rawDescOnce sync.Once + file_meshtastic_config_proto_rawDescData []byte +) + +func file_meshtastic_config_proto_rawDescGZIP() []byte { + file_meshtastic_config_proto_rawDescOnce.Do(func() { + file_meshtastic_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_config_proto_rawDesc), len(file_meshtastic_config_proto_rawDesc))) + }) + return file_meshtastic_config_proto_rawDescData +} + +var file_meshtastic_config_proto_enumTypes = make([]protoimpl.EnumInfo, 14) +var file_meshtastic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_meshtastic_config_proto_goTypes = []any{ + (Config_DeviceConfig_Role)(0), // 0: meshtastic.Config.DeviceConfig.Role + (Config_DeviceConfig_RebroadcastMode)(0), // 1: meshtastic.Config.DeviceConfig.RebroadcastMode + (Config_PositionConfig_PositionFlags)(0), // 2: meshtastic.Config.PositionConfig.PositionFlags + (Config_PositionConfig_GpsMode)(0), // 3: meshtastic.Config.PositionConfig.GpsMode + (Config_NetworkConfig_AddressMode)(0), // 4: meshtastic.Config.NetworkConfig.AddressMode + (Config_NetworkConfig_ProtocolFlags)(0), // 5: meshtastic.Config.NetworkConfig.ProtocolFlags + (Config_DisplayConfig_GpsCoordinateFormat)(0), // 6: meshtastic.Config.DisplayConfig.GpsCoordinateFormat + (Config_DisplayConfig_DisplayUnits)(0), // 7: meshtastic.Config.DisplayConfig.DisplayUnits + (Config_DisplayConfig_OledType)(0), // 8: meshtastic.Config.DisplayConfig.OledType + (Config_DisplayConfig_DisplayMode)(0), // 9: meshtastic.Config.DisplayConfig.DisplayMode + (Config_DisplayConfig_CompassOrientation)(0), // 10: meshtastic.Config.DisplayConfig.CompassOrientation + (Config_LoRaConfig_RegionCode)(0), // 11: meshtastic.Config.LoRaConfig.RegionCode + (Config_LoRaConfig_ModemPreset)(0), // 12: meshtastic.Config.LoRaConfig.ModemPreset + (Config_BluetoothConfig_PairingMode)(0), // 13: meshtastic.Config.BluetoothConfig.PairingMode + (*Config)(nil), // 14: meshtastic.Config + (*Config_DeviceConfig)(nil), // 15: meshtastic.Config.DeviceConfig + (*Config_PositionConfig)(nil), // 16: meshtastic.Config.PositionConfig + (*Config_PowerConfig)(nil), // 17: meshtastic.Config.PowerConfig + (*Config_NetworkConfig)(nil), // 18: meshtastic.Config.NetworkConfig + (*Config_DisplayConfig)(nil), // 19: meshtastic.Config.DisplayConfig + (*Config_LoRaConfig)(nil), // 20: meshtastic.Config.LoRaConfig + (*Config_BluetoothConfig)(nil), // 21: meshtastic.Config.BluetoothConfig + (*Config_SecurityConfig)(nil), // 22: meshtastic.Config.SecurityConfig + (*Config_SessionkeyConfig)(nil), // 23: meshtastic.Config.SessionkeyConfig + (*Config_NetworkConfig_IpV4Config)(nil), // 24: meshtastic.Config.NetworkConfig.IpV4Config + (*DeviceUIConfig)(nil), // 25: meshtastic.DeviceUIConfig +} +var file_meshtastic_config_proto_depIdxs = []int32{ + 15, // 0: meshtastic.Config.device:type_name -> meshtastic.Config.DeviceConfig + 16, // 1: meshtastic.Config.position:type_name -> meshtastic.Config.PositionConfig + 17, // 2: meshtastic.Config.power:type_name -> meshtastic.Config.PowerConfig + 18, // 3: meshtastic.Config.network:type_name -> meshtastic.Config.NetworkConfig + 19, // 4: meshtastic.Config.display:type_name -> meshtastic.Config.DisplayConfig + 20, // 5: meshtastic.Config.lora:type_name -> meshtastic.Config.LoRaConfig + 21, // 6: meshtastic.Config.bluetooth:type_name -> meshtastic.Config.BluetoothConfig + 22, // 7: meshtastic.Config.security:type_name -> meshtastic.Config.SecurityConfig + 23, // 8: meshtastic.Config.sessionkey:type_name -> meshtastic.Config.SessionkeyConfig + 25, // 9: meshtastic.Config.device_ui:type_name -> meshtastic.DeviceUIConfig + 0, // 10: meshtastic.Config.DeviceConfig.role:type_name -> meshtastic.Config.DeviceConfig.Role + 1, // 11: meshtastic.Config.DeviceConfig.rebroadcast_mode:type_name -> meshtastic.Config.DeviceConfig.RebroadcastMode + 3, // 12: meshtastic.Config.PositionConfig.gps_mode:type_name -> meshtastic.Config.PositionConfig.GpsMode + 4, // 13: meshtastic.Config.NetworkConfig.address_mode:type_name -> meshtastic.Config.NetworkConfig.AddressMode + 24, // 14: meshtastic.Config.NetworkConfig.ipv4_config:type_name -> meshtastic.Config.NetworkConfig.IpV4Config + 6, // 15: meshtastic.Config.DisplayConfig.gps_format:type_name -> meshtastic.Config.DisplayConfig.GpsCoordinateFormat + 7, // 16: meshtastic.Config.DisplayConfig.units:type_name -> meshtastic.Config.DisplayConfig.DisplayUnits + 8, // 17: meshtastic.Config.DisplayConfig.oled:type_name -> meshtastic.Config.DisplayConfig.OledType + 9, // 18: meshtastic.Config.DisplayConfig.displaymode:type_name -> meshtastic.Config.DisplayConfig.DisplayMode + 10, // 19: meshtastic.Config.DisplayConfig.compass_orientation:type_name -> meshtastic.Config.DisplayConfig.CompassOrientation + 12, // 20: meshtastic.Config.LoRaConfig.modem_preset:type_name -> meshtastic.Config.LoRaConfig.ModemPreset + 11, // 21: meshtastic.Config.LoRaConfig.region:type_name -> meshtastic.Config.LoRaConfig.RegionCode + 13, // 22: meshtastic.Config.BluetoothConfig.mode:type_name -> meshtastic.Config.BluetoothConfig.PairingMode + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_meshtastic_config_proto_init() } +func file_meshtastic_config_proto_init() { + if File_meshtastic_config_proto != nil { + return + } + file_meshtastic_device_ui_proto_init() + file_meshtastic_config_proto_msgTypes[0].OneofWrappers = []any{ + (*Config_Device)(nil), + (*Config_Position)(nil), + (*Config_Power)(nil), + (*Config_Network)(nil), + (*Config_Display)(nil), + (*Config_Lora)(nil), + (*Config_Bluetooth)(nil), + (*Config_Security)(nil), + (*Config_Sessionkey)(nil), + (*Config_DeviceUi)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_config_proto_rawDesc), len(file_meshtastic_config_proto_rawDesc)), + NumEnums: 14, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_config_proto_goTypes, + DependencyIndexes: file_meshtastic_config_proto_depIdxs, + EnumInfos: file_meshtastic_config_proto_enumTypes, + MessageInfos: file_meshtastic_config_proto_msgTypes, + }.Build() + File_meshtastic_config_proto = out.File + file_meshtastic_config_proto_goTypes = nil + file_meshtastic_config_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/connection_status.pb.go b/proto/generated/meshtastic/connection_status.pb.go new file mode 100644 index 0000000..531d7a6 --- /dev/null +++ b/proto/generated/meshtastic/connection_status.pb.go @@ -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 generated + +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\visConnectedBe\n" + + "\x13com.geeksville.meshB\x10ConnStatusProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/device_ui.pb.go b/proto/generated/meshtastic/device_ui.pb.go new file mode 100644 index 0000000..21f8da7 --- /dev/null +++ b/proto/generated/meshtastic/device_ui.pb.go @@ -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 generated + +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\x1fBc\n" + + "\x13com.geeksville.meshB\x0eDeviceUIProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/deviceonly.pb.go b/proto/generated/meshtastic/deviceonly.pb.go new file mode 100644 index 0000000..edc6439 --- /dev/null +++ b/proto/generated/meshtastic/deviceonly.pb.go @@ -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 generated + +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\fnanopb.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::vectorR\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\x05ownerBm\x92?\v\xc2\x01\b\n" + + "\x13com.geeksville.meshB\n" + + "DeviceOnlyZ\"github.com/meshtastic/go/generated\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_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 +} diff --git a/proto/generated/meshtastic/interdevice.pb.go b/proto/generated/meshtastic/interdevice.pb.go new file mode 100644 index 0000000..46e15e5 --- /dev/null +++ b/proto/generated/meshtastic/interdevice.pb.go @@ -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 generated + +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\x01Bf\n" + + "\x13com.geeksville.meshB\x11InterdeviceProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_interdevice_proto_rawDescOnce sync.Once + file_meshtastic_interdevice_proto_rawDescData []byte +) + +func file_meshtastic_interdevice_proto_rawDescGZIP() []byte { + file_meshtastic_interdevice_proto_rawDescOnce.Do(func() { + file_meshtastic_interdevice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_interdevice_proto_rawDesc), len(file_meshtastic_interdevice_proto_rawDesc))) + }) + return file_meshtastic_interdevice_proto_rawDescData +} + +var file_meshtastic_interdevice_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_meshtastic_interdevice_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_meshtastic_interdevice_proto_goTypes = []any{ + (MessageType)(0), // 0: meshtastic.MessageType + (*SensorData)(nil), // 1: meshtastic.SensorData + (*InterdeviceMessage)(nil), // 2: meshtastic.InterdeviceMessage +} +var file_meshtastic_interdevice_proto_depIdxs = []int32{ + 0, // 0: meshtastic.SensorData.type:type_name -> meshtastic.MessageType + 1, // 1: meshtastic.InterdeviceMessage.sensor:type_name -> meshtastic.SensorData + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_meshtastic_interdevice_proto_init() } +func file_meshtastic_interdevice_proto_init() { + if File_meshtastic_interdevice_proto != nil { + return + } + file_meshtastic_interdevice_proto_msgTypes[0].OneofWrappers = []any{ + (*SensorData_FloatValue)(nil), + (*SensorData_Uint32Value)(nil), + } + file_meshtastic_interdevice_proto_msgTypes[1].OneofWrappers = []any{ + (*InterdeviceMessage_Nmea)(nil), + (*InterdeviceMessage_Sensor)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_interdevice_proto_rawDesc), len(file_meshtastic_interdevice_proto_rawDesc)), + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_interdevice_proto_goTypes, + DependencyIndexes: file_meshtastic_interdevice_proto_depIdxs, + EnumInfos: file_meshtastic_interdevice_proto_enumTypes, + MessageInfos: file_meshtastic_interdevice_proto_msgTypes, + }.Build() + File_meshtastic_interdevice_proto = out.File + file_meshtastic_interdevice_proto_goTypes = nil + file_meshtastic_interdevice_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/localonly.pb.go b/proto/generated/meshtastic/localonly.pb.go new file mode 100644 index 0000000..7a53027 --- /dev/null +++ b/proto/generated/meshtastic/localonly.pb.go @@ -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 generated + +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\aversionBd\n" + + "\x13com.geeksville.meshB\x0fLocalOnlyProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/mesh.pb.go b/proto/generated/meshtastic/mesh.pb.go new file mode 100644 index 0000000..ef65b85 --- /dev/null +++ b/proto/generated/meshtastic/mesh.pb.go @@ -0,0 +1,4783 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.3 +// source: meshtastic/mesh.proto + +package generated + +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) +) + +// Note: these enum names must EXACTLY match the string used in the device +// bin/build-all.sh script. +// Because they will be used to find firmware filenames in the android app for OTA updates. +// To match the old style filenames, _ is converted to -, p is converted to . +type HardwareModel int32 + +const ( + // TODO: REPLACE + HardwareModel_UNSET HardwareModel = 0 + // TODO: REPLACE + HardwareModel_TLORA_V2 HardwareModel = 1 + // TODO: REPLACE + HardwareModel_TLORA_V1 HardwareModel = 2 + // TODO: REPLACE + HardwareModel_TLORA_V2_1_1P6 HardwareModel = 3 + // TODO: REPLACE + HardwareModel_TBEAM HardwareModel = 4 + // The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 + // (see HELTEC_V2 for the new version). + HardwareModel_HELTEC_V2_0 HardwareModel = 5 + // TODO: REPLACE + HardwareModel_TBEAM_V0P7 HardwareModel = 6 + // TODO: REPLACE + HardwareModel_T_ECHO HardwareModel = 7 + // TODO: REPLACE + HardwareModel_TLORA_V1_1P3 HardwareModel = 8 + // TODO: REPLACE + HardwareModel_RAK4631 HardwareModel = 9 + // The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. + // Sadly they did not update anything on the silkscreen to identify this board + HardwareModel_HELTEC_V2_1 HardwareModel = 10 + // Ancient heltec WiFi_Lora_32 board + HardwareModel_HELTEC_V1 HardwareModel = 11 + // New T-BEAM with ESP32-S3 CPU + HardwareModel_LILYGO_TBEAM_S3_CORE HardwareModel = 12 + // RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ + HardwareModel_RAK11200 HardwareModel = 13 + // B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano + HardwareModel_NANO_G1 HardwareModel = 14 + // TODO: REPLACE + HardwareModel_TLORA_V2_1_1P8 HardwareModel = 15 + // TODO: REPLACE + HardwareModel_TLORA_T3_S3 HardwareModel = 16 + // B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer + HardwareModel_NANO_G1_EXPLORER HardwareModel = 17 + // B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra + HardwareModel_NANO_G2_ULTRA HardwareModel = 18 + // LoRAType device: https://loratype.org/ + HardwareModel_LORA_TYPE HardwareModel = 19 + // wiphone https://www.wiphone.io/ + HardwareModel_WIPHONE HardwareModel = 20 + // WIO Tracker WM1110 family from Seeed Studio. Includes wio-1110-tracker and wio-1110-sdk + HardwareModel_WIO_WM1110 HardwareModel = 21 + // RAK2560 Solar base station based on RAK4630 + HardwareModel_RAK2560 HardwareModel = 22 + // Heltec HRU-3601: https://heltec.org/project/hru-3601/ + HardwareModel_HELTEC_HRU_3601 HardwareModel = 23 + // Heltec Wireless Bridge + HardwareModel_HELTEC_WIRELESS_BRIDGE HardwareModel = 24 + // B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station + HardwareModel_STATION_G1 HardwareModel = 25 + // RAK11310 (RP2040 + SX1262) + HardwareModel_RAK11310 HardwareModel = 26 + // Makerfabs SenseLoRA Receiver (RP2040 + RFM96) + HardwareModel_SENSELORA_RP2040 HardwareModel = 27 + // Makerfabs SenseLoRA Industrial Monitor (ESP32-S3 + RFM96) + HardwareModel_SENSELORA_S3 HardwareModel = 28 + // Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone + HardwareModel_CANARYONE HardwareModel = 29 + // Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm + HardwareModel_RP2040_LORA HardwareModel = 30 + // B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 + HardwareModel_STATION_G2 HardwareModel = 31 + // --------------------------------------------------------------------------- + // Less common/prototype boards listed here (needs one more byte over the air) + // --------------------------------------------------------------------------- + HardwareModel_LORA_RELAY_V1 HardwareModel = 32 + // TODO: REPLACE + HardwareModel_NRF52840DK HardwareModel = 33 + // TODO: REPLACE + HardwareModel_PPR HardwareModel = 34 + // TODO: REPLACE + HardwareModel_GENIEBLOCKS HardwareModel = 35 + // TODO: REPLACE + HardwareModel_NRF52_UNKNOWN HardwareModel = 36 + // TODO: REPLACE + HardwareModel_PORTDUINO HardwareModel = 37 + // The simulator built into the android app + HardwareModel_ANDROID_SIM HardwareModel = 38 + // Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics + HardwareModel_DIY_V1 HardwareModel = 39 + // nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ + HardwareModel_NRF52840_PCA10059 HardwareModel = 40 + // Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 + HardwareModel_DR_DEV HardwareModel = 41 + // M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ + HardwareModel_M5STACK HardwareModel = 42 + // New Heltec LoRA32 with ESP32-S3 CPU + HardwareModel_HELTEC_V3 HardwareModel = 43 + // New Heltec Wireless Stick Lite with ESP32-S3 CPU + HardwareModel_HELTEC_WSL_V3 HardwareModel = 44 + // New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU + HardwareModel_BETAFPV_2400_TX HardwareModel = 45 + // BetaFPV ExpressLRS "Nano" TX Module 900MHz with ESP32 CPU + HardwareModel_BETAFPV_900_NANO_TX HardwareModel = 46 + // Raspberry Pi Pico (W) with Waveshare SX1262 LoRa Node Module + HardwareModel_RPI_PICO HardwareModel = 47 + // Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + // Newer V1.1, version is written on the PCB near the display. + HardwareModel_HELTEC_WIRELESS_TRACKER HardwareModel = 48 + // Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display + HardwareModel_HELTEC_WIRELESS_PAPER HardwareModel = 49 + // LilyGo T-Deck with ESP32-S3 CPU, Keyboard and IPS display + HardwareModel_T_DECK HardwareModel = 50 + // LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display + HardwareModel_T_WATCH_S3 HardwareModel = 51 + // Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display + HardwareModel_PICOMPUTER_S3 HardwareModel = 52 + // Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa + HardwareModel_HELTEC_HT62 HardwareModel = 53 + // EBYTE SPI LoRa module and ESP32-S3 + HardwareModel_EBYTE_ESP32_S3 HardwareModel = 54 + // Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink + HardwareModel_ESP32_S3_PICO HardwareModel = 55 + // CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom + // Lora module can be swapped out for a Heltec RA-62 which is "almost" pin compatible + // with one cut and one jumper Meshtastic works + HardwareModel_CHATTER_2 HardwareModel = 56 + // Heltec Wireless Paper, With ESP32-S3 CPU and E-Ink display + // Older "V1.0" Variant, has no "version sticker" + // E-Ink model is DEPG0213BNS800 + // Tab on the screen protector is RED + // Flex connector marking is FPC-7528B + HardwareModel_HELTEC_WIRELESS_PAPER_V1_0 HardwareModel = 57 + // Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + // Older "V1.0" Variant + HardwareModel_HELTEC_WIRELESS_TRACKER_V1_0 HardwareModel = 58 + // unPhone with ESP32-S3, TFT touchscreen, LSM6DS3TR-C accelerometer and gyroscope + HardwareModel_UNPHONE HardwareModel = 59 + // Teledatics TD-LORAC NRF52840 based M.2 LoRA module + // Compatible with the TD-WRLS development board + HardwareModel_TD_LORAC HardwareModel = 60 + // CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 + HardwareModel_CDEBYTE_EORA_S3 HardwareModel = 61 + // TWC_MESH_V4 + // Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS + HardwareModel_TWC_MESH_V4 HardwareModel = 62 + // NRF52_PROMICRO_DIY + // Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS + HardwareModel_NRF52_PROMICRO_DIY HardwareModel = 63 + // RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module + // ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS + HardwareModel_RADIOMASTER_900_BANDIT_NANO HardwareModel = 64 + // Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors + HardwareModel_HELTEC_CAPSULE_SENSOR_V3 HardwareModel = 65 + // Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display + HardwareModel_HELTEC_VISION_MASTER_T190 HardwareModel = 66 + // Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display + HardwareModel_HELTEC_VISION_MASTER_E213 HardwareModel = 67 + // Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display + HardwareModel_HELTEC_VISION_MASTER_E290 HardwareModel = 68 + // Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design, + // specifically adapted for the Meshtatic project + HardwareModel_HELTEC_MESH_NODE_T114 HardwareModel = 69 + // Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor + HardwareModel_SENSECAP_INDICATOR HardwareModel = 70 + // Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. + HardwareModel_TRACKER_T1000_E HardwareModel = 71 + // RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) + HardwareModel_RAK3172 HardwareModel = 72 + // Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. + HardwareModel_WIO_E5 HardwareModel = 73 + // RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module + // SSD1306 OLED and No GPS + HardwareModel_RADIOMASTER_900_BANDIT HardwareModel = 74 + // Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. + HardwareModel_ME25LS01_4Y10TD HardwareModel = 75 + // RP2040_FEATHER_RFM95 + // Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED + // https://www.adafruit.com/product/5714 + // https://www.adafruit.com/product/326 + // https://www.adafruit.com/product/938 + // + // ^^^ short A0 to switch to I2C address 0x3C + HardwareModel_RP2040_FEATHER_RFM95 HardwareModel = 76 + // M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ + HardwareModel_M5STACK_COREBASIC HardwareModel = 77 + HardwareModel_M5STACK_CORE2 HardwareModel = 78 + // Pico2 with Waveshare Hat, same as Pico + HardwareModel_RPI_PICO2 HardwareModel = 79 + // M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ + HardwareModel_M5STACK_CORES3 HardwareModel = 80 + // Seeed XIAO S3 DK + HardwareModel_SEEED_XIAO_S3 HardwareModel = 81 + // Nordic nRF52840+Semtech SX1262 LoRa BLE Combo Module. nRF52840+SX1262 MS24SF1 + HardwareModel_MS24SF1 HardwareModel = 82 + // Lilygo TLora-C6 with the new ESP32-C6 MCU + HardwareModel_TLORA_C6 HardwareModel = 83 + // WisMesh Tap + // RAK-4631 w/ TFT in injection modled case + HardwareModel_WISMESH_TAP HardwareModel = 84 + // Similar to PORTDUINO but used by Routastic devices, this is not any + // particular device and does not run Meshtastic's code but supports + // the same frame format. + // Runs on linux, see https://github.com/Jorropo/routastic + HardwareModel_ROUTASTIC HardwareModel = 85 + // Mesh-Tab, esp32 based + // https://github.com/valzzu/Mesh-Tab + HardwareModel_MESH_TAB HardwareModel = 86 + // MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog + // https://www.loraitalia.it + HardwareModel_MESHLINK HardwareModel = 87 + // Seeed XIAO nRF52840 + Wio SX1262 kit + HardwareModel_XIAO_NRF52_KIT HardwareModel = 88 + // Elecrow ThinkNode M1 & M2 + // https://www.elecrow.com/wiki/ThinkNode-M1_Transceiver_Device(Meshtastic)_Power_By_nRF52840.html + // https://www.elecrow.com/wiki/ThinkNode-M2_Transceiver_Device(Meshtastic)_Power_By_NRF52840.html (this actually uses ESP32-S3) + HardwareModel_THINKNODE_M1 HardwareModel = 89 + HardwareModel_THINKNODE_M2 HardwareModel = 90 + // Lilygo T-ETH-Elite + HardwareModel_T_ETH_ELITE HardwareModel = 91 + // Heltec HRI-3621 industrial probe + HardwareModel_HELTEC_SENSOR_HUB HardwareModel = 92 + // Reserved Fried Chicken ID for future use + HardwareModel_RESERVED_FRIED_CHICKEN HardwareModel = 93 + // Heltec Magnetic Power Bank with Meshtastic compatible + HardwareModel_HELTEC_MESH_POCKET HardwareModel = 94 + // Seeed Solar Node + HardwareModel_SEEED_SOLAR_NODE HardwareModel = 95 + // NomadStar Meteor Pro https://nomadstar.ch/ + HardwareModel_NOMADSTAR_METEOR_PRO HardwareModel = 96 + // Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin + HardwareModel_CROWPANEL HardwareModel = 97 + // ------------------------------------------------------------------------------------------------------------------------------------------ + // Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. + // ------------------------------------------------------------------------------------------------------------------------------------------ + HardwareModel_PRIVATE_HW HardwareModel = 255 +) + +// Enum value maps for HardwareModel. +var ( + HardwareModel_name = map[int32]string{ + 0: "UNSET", + 1: "TLORA_V2", + 2: "TLORA_V1", + 3: "TLORA_V2_1_1P6", + 4: "TBEAM", + 5: "HELTEC_V2_0", + 6: "TBEAM_V0P7", + 7: "T_ECHO", + 8: "TLORA_V1_1P3", + 9: "RAK4631", + 10: "HELTEC_V2_1", + 11: "HELTEC_V1", + 12: "LILYGO_TBEAM_S3_CORE", + 13: "RAK11200", + 14: "NANO_G1", + 15: "TLORA_V2_1_1P8", + 16: "TLORA_T3_S3", + 17: "NANO_G1_EXPLORER", + 18: "NANO_G2_ULTRA", + 19: "LORA_TYPE", + 20: "WIPHONE", + 21: "WIO_WM1110", + 22: "RAK2560", + 23: "HELTEC_HRU_3601", + 24: "HELTEC_WIRELESS_BRIDGE", + 25: "STATION_G1", + 26: "RAK11310", + 27: "SENSELORA_RP2040", + 28: "SENSELORA_S3", + 29: "CANARYONE", + 30: "RP2040_LORA", + 31: "STATION_G2", + 32: "LORA_RELAY_V1", + 33: "NRF52840DK", + 34: "PPR", + 35: "GENIEBLOCKS", + 36: "NRF52_UNKNOWN", + 37: "PORTDUINO", + 38: "ANDROID_SIM", + 39: "DIY_V1", + 40: "NRF52840_PCA10059", + 41: "DR_DEV", + 42: "M5STACK", + 43: "HELTEC_V3", + 44: "HELTEC_WSL_V3", + 45: "BETAFPV_2400_TX", + 46: "BETAFPV_900_NANO_TX", + 47: "RPI_PICO", + 48: "HELTEC_WIRELESS_TRACKER", + 49: "HELTEC_WIRELESS_PAPER", + 50: "T_DECK", + 51: "T_WATCH_S3", + 52: "PICOMPUTER_S3", + 53: "HELTEC_HT62", + 54: "EBYTE_ESP32_S3", + 55: "ESP32_S3_PICO", + 56: "CHATTER_2", + 57: "HELTEC_WIRELESS_PAPER_V1_0", + 58: "HELTEC_WIRELESS_TRACKER_V1_0", + 59: "UNPHONE", + 60: "TD_LORAC", + 61: "CDEBYTE_EORA_S3", + 62: "TWC_MESH_V4", + 63: "NRF52_PROMICRO_DIY", + 64: "RADIOMASTER_900_BANDIT_NANO", + 65: "HELTEC_CAPSULE_SENSOR_V3", + 66: "HELTEC_VISION_MASTER_T190", + 67: "HELTEC_VISION_MASTER_E213", + 68: "HELTEC_VISION_MASTER_E290", + 69: "HELTEC_MESH_NODE_T114", + 70: "SENSECAP_INDICATOR", + 71: "TRACKER_T1000_E", + 72: "RAK3172", + 73: "WIO_E5", + 74: "RADIOMASTER_900_BANDIT", + 75: "ME25LS01_4Y10TD", + 76: "RP2040_FEATHER_RFM95", + 77: "M5STACK_COREBASIC", + 78: "M5STACK_CORE2", + 79: "RPI_PICO2", + 80: "M5STACK_CORES3", + 81: "SEEED_XIAO_S3", + 82: "MS24SF1", + 83: "TLORA_C6", + 84: "WISMESH_TAP", + 85: "ROUTASTIC", + 86: "MESH_TAB", + 87: "MESHLINK", + 88: "XIAO_NRF52_KIT", + 89: "THINKNODE_M1", + 90: "THINKNODE_M2", + 91: "T_ETH_ELITE", + 92: "HELTEC_SENSOR_HUB", + 93: "RESERVED_FRIED_CHICKEN", + 94: "HELTEC_MESH_POCKET", + 95: "SEEED_SOLAR_NODE", + 96: "NOMADSTAR_METEOR_PRO", + 97: "CROWPANEL", + 255: "PRIVATE_HW", + } + HardwareModel_value = map[string]int32{ + "UNSET": 0, + "TLORA_V2": 1, + "TLORA_V1": 2, + "TLORA_V2_1_1P6": 3, + "TBEAM": 4, + "HELTEC_V2_0": 5, + "TBEAM_V0P7": 6, + "T_ECHO": 7, + "TLORA_V1_1P3": 8, + "RAK4631": 9, + "HELTEC_V2_1": 10, + "HELTEC_V1": 11, + "LILYGO_TBEAM_S3_CORE": 12, + "RAK11200": 13, + "NANO_G1": 14, + "TLORA_V2_1_1P8": 15, + "TLORA_T3_S3": 16, + "NANO_G1_EXPLORER": 17, + "NANO_G2_ULTRA": 18, + "LORA_TYPE": 19, + "WIPHONE": 20, + "WIO_WM1110": 21, + "RAK2560": 22, + "HELTEC_HRU_3601": 23, + "HELTEC_WIRELESS_BRIDGE": 24, + "STATION_G1": 25, + "RAK11310": 26, + "SENSELORA_RP2040": 27, + "SENSELORA_S3": 28, + "CANARYONE": 29, + "RP2040_LORA": 30, + "STATION_G2": 31, + "LORA_RELAY_V1": 32, + "NRF52840DK": 33, + "PPR": 34, + "GENIEBLOCKS": 35, + "NRF52_UNKNOWN": 36, + "PORTDUINO": 37, + "ANDROID_SIM": 38, + "DIY_V1": 39, + "NRF52840_PCA10059": 40, + "DR_DEV": 41, + "M5STACK": 42, + "HELTEC_V3": 43, + "HELTEC_WSL_V3": 44, + "BETAFPV_2400_TX": 45, + "BETAFPV_900_NANO_TX": 46, + "RPI_PICO": 47, + "HELTEC_WIRELESS_TRACKER": 48, + "HELTEC_WIRELESS_PAPER": 49, + "T_DECK": 50, + "T_WATCH_S3": 51, + "PICOMPUTER_S3": 52, + "HELTEC_HT62": 53, + "EBYTE_ESP32_S3": 54, + "ESP32_S3_PICO": 55, + "CHATTER_2": 56, + "HELTEC_WIRELESS_PAPER_V1_0": 57, + "HELTEC_WIRELESS_TRACKER_V1_0": 58, + "UNPHONE": 59, + "TD_LORAC": 60, + "CDEBYTE_EORA_S3": 61, + "TWC_MESH_V4": 62, + "NRF52_PROMICRO_DIY": 63, + "RADIOMASTER_900_BANDIT_NANO": 64, + "HELTEC_CAPSULE_SENSOR_V3": 65, + "HELTEC_VISION_MASTER_T190": 66, + "HELTEC_VISION_MASTER_E213": 67, + "HELTEC_VISION_MASTER_E290": 68, + "HELTEC_MESH_NODE_T114": 69, + "SENSECAP_INDICATOR": 70, + "TRACKER_T1000_E": 71, + "RAK3172": 72, + "WIO_E5": 73, + "RADIOMASTER_900_BANDIT": 74, + "ME25LS01_4Y10TD": 75, + "RP2040_FEATHER_RFM95": 76, + "M5STACK_COREBASIC": 77, + "M5STACK_CORE2": 78, + "RPI_PICO2": 79, + "M5STACK_CORES3": 80, + "SEEED_XIAO_S3": 81, + "MS24SF1": 82, + "TLORA_C6": 83, + "WISMESH_TAP": 84, + "ROUTASTIC": 85, + "MESH_TAB": 86, + "MESHLINK": 87, + "XIAO_NRF52_KIT": 88, + "THINKNODE_M1": 89, + "THINKNODE_M2": 90, + "T_ETH_ELITE": 91, + "HELTEC_SENSOR_HUB": 92, + "RESERVED_FRIED_CHICKEN": 93, + "HELTEC_MESH_POCKET": 94, + "SEEED_SOLAR_NODE": 95, + "NOMADSTAR_METEOR_PRO": 96, + "CROWPANEL": 97, + "PRIVATE_HW": 255, + } +) + +func (x HardwareModel) Enum() *HardwareModel { + p := new(HardwareModel) + *p = x + return p +} + +func (x HardwareModel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HardwareModel) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[0].Descriptor() +} + +func (HardwareModel) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[0] +} + +func (x HardwareModel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HardwareModel.Descriptor instead. +func (HardwareModel) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{0} +} + +// Shared constants between device and phone +type Constants int32 + +const ( + // First enum must be zero, and we are just using this enum to + // pass int constants between two very different environments + Constants_ZERO Constants = 0 + // From mesh.options + // note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is + // outside of this envelope + Constants_DATA_PAYLOAD_LEN Constants = 233 +) + +// Enum value maps for Constants. +var ( + Constants_name = map[int32]string{ + 0: "ZERO", + 233: "DATA_PAYLOAD_LEN", + } + Constants_value = map[string]int32{ + "ZERO": 0, + "DATA_PAYLOAD_LEN": 233, + } +) + +func (x Constants) Enum() *Constants { + p := new(Constants) + *p = x + return p +} + +func (x Constants) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Constants) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[1].Descriptor() +} + +func (Constants) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[1] +} + +func (x Constants) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Constants.Descriptor instead. +func (Constants) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{1} +} + +// Error codes for critical errors +// The device might report these fault codes on the screen. +// If you encounter a fault code, please post on the meshtastic.discourse.group +// and we'll try to help. +type CriticalErrorCode int32 + +const ( + // TODO: REPLACE + CriticalErrorCode_NONE CriticalErrorCode = 0 + // A software bug was detected while trying to send lora + CriticalErrorCode_TX_WATCHDOG CriticalErrorCode = 1 + // A software bug was detected on entry to sleep + CriticalErrorCode_SLEEP_ENTER_WAIT CriticalErrorCode = 2 + // No Lora radio hardware could be found + CriticalErrorCode_NO_RADIO CriticalErrorCode = 3 + // Not normally used + CriticalErrorCode_UNSPECIFIED CriticalErrorCode = 4 + // We failed while configuring a UBlox GPS + CriticalErrorCode_UBLOX_UNIT_FAILED CriticalErrorCode = 5 + // This board was expected to have a power management chip and it is missing or broken + CriticalErrorCode_NO_AXP192 CriticalErrorCode = 6 + // The channel tried to set a radio setting which is not supported by this chipset, + // radio comms settings are now undefined. + CriticalErrorCode_INVALID_RADIO_SETTING CriticalErrorCode = 7 + // Radio transmit hardware failure. We sent data to the radio chip, but it didn't + // reply with an interrupt. + CriticalErrorCode_TRANSMIT_FAILED CriticalErrorCode = 8 + // We detected that the main CPU voltage dropped below the minimum acceptable value + CriticalErrorCode_BROWNOUT CriticalErrorCode = 9 + // Selftest of SX1262 radio chip failed + CriticalErrorCode_SX1262_FAILURE CriticalErrorCode = 10 + // A (likely software but possibly hardware) failure was detected while trying to send packets. + // If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug + CriticalErrorCode_RADIO_SPI_BUG CriticalErrorCode = 11 + // Corruption was detected on the flash filesystem but we were able to repair things. + // If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. + CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE CriticalErrorCode = 12 + // Corruption was detected on the flash filesystem but we were unable to repair things. + // NOTE: Your node will probably need to be reconfigured the next time it reboots (it will lose the region code etc...) + // If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. + CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE CriticalErrorCode = 13 +) + +// Enum value maps for CriticalErrorCode. +var ( + CriticalErrorCode_name = map[int32]string{ + 0: "NONE", + 1: "TX_WATCHDOG", + 2: "SLEEP_ENTER_WAIT", + 3: "NO_RADIO", + 4: "UNSPECIFIED", + 5: "UBLOX_UNIT_FAILED", + 6: "NO_AXP192", + 7: "INVALID_RADIO_SETTING", + 8: "TRANSMIT_FAILED", + 9: "BROWNOUT", + 10: "SX1262_FAILURE", + 11: "RADIO_SPI_BUG", + 12: "FLASH_CORRUPTION_RECOVERABLE", + 13: "FLASH_CORRUPTION_UNRECOVERABLE", + } + CriticalErrorCode_value = map[string]int32{ + "NONE": 0, + "TX_WATCHDOG": 1, + "SLEEP_ENTER_WAIT": 2, + "NO_RADIO": 3, + "UNSPECIFIED": 4, + "UBLOX_UNIT_FAILED": 5, + "NO_AXP192": 6, + "INVALID_RADIO_SETTING": 7, + "TRANSMIT_FAILED": 8, + "BROWNOUT": 9, + "SX1262_FAILURE": 10, + "RADIO_SPI_BUG": 11, + "FLASH_CORRUPTION_RECOVERABLE": 12, + "FLASH_CORRUPTION_UNRECOVERABLE": 13, + } +) + +func (x CriticalErrorCode) Enum() *CriticalErrorCode { + p := new(CriticalErrorCode) + *p = x + return p +} + +func (x CriticalErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CriticalErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[2].Descriptor() +} + +func (CriticalErrorCode) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[2] +} + +func (x CriticalErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CriticalErrorCode.Descriptor instead. +func (CriticalErrorCode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{2} +} + +// Enum for modules excluded from a device's configuration. +// Each value represents a ModuleConfigType that can be toggled as excluded +// by setting its corresponding bit in the `excluded_modules` bitmask field. +type ExcludedModules int32 + +const ( + // Default value of 0 indicates no modules are excluded. + ExcludedModules_EXCLUDED_NONE ExcludedModules = 0 + // MQTT module + ExcludedModules_MQTT_CONFIG ExcludedModules = 1 + // Serial module + ExcludedModules_SERIAL_CONFIG ExcludedModules = 2 + // External Notification module + ExcludedModules_EXTNOTIF_CONFIG ExcludedModules = 4 + // Store and Forward module + ExcludedModules_STOREFORWARD_CONFIG ExcludedModules = 8 + // Range Test module + ExcludedModules_RANGETEST_CONFIG ExcludedModules = 16 + // Telemetry module + ExcludedModules_TELEMETRY_CONFIG ExcludedModules = 32 + // Canned Message module + ExcludedModules_CANNEDMSG_CONFIG ExcludedModules = 64 + // Audio module + ExcludedModules_AUDIO_CONFIG ExcludedModules = 128 + // Remote Hardware module + ExcludedModules_REMOTEHARDWARE_CONFIG ExcludedModules = 256 + // Neighbor Info module + ExcludedModules_NEIGHBORINFO_CONFIG ExcludedModules = 512 + // Ambient Lighting module + ExcludedModules_AMBIENTLIGHTING_CONFIG ExcludedModules = 1024 + // Detection Sensor module + ExcludedModules_DETECTIONSENSOR_CONFIG ExcludedModules = 2048 + // Paxcounter module + ExcludedModules_PAXCOUNTER_CONFIG ExcludedModules = 4096 + // Bluetooth config (not technically a module, but used to indicate bluetooth capabilities) + ExcludedModules_BLUETOOTH_CONFIG ExcludedModules = 8192 + // Network config (not technically a module, but used to indicate network capabilities) + ExcludedModules_NETWORK_CONFIG ExcludedModules = 16384 +) + +// Enum value maps for ExcludedModules. +var ( + ExcludedModules_name = map[int32]string{ + 0: "EXCLUDED_NONE", + 1: "MQTT_CONFIG", + 2: "SERIAL_CONFIG", + 4: "EXTNOTIF_CONFIG", + 8: "STOREFORWARD_CONFIG", + 16: "RANGETEST_CONFIG", + 32: "TELEMETRY_CONFIG", + 64: "CANNEDMSG_CONFIG", + 128: "AUDIO_CONFIG", + 256: "REMOTEHARDWARE_CONFIG", + 512: "NEIGHBORINFO_CONFIG", + 1024: "AMBIENTLIGHTING_CONFIG", + 2048: "DETECTIONSENSOR_CONFIG", + 4096: "PAXCOUNTER_CONFIG", + 8192: "BLUETOOTH_CONFIG", + 16384: "NETWORK_CONFIG", + } + ExcludedModules_value = map[string]int32{ + "EXCLUDED_NONE": 0, + "MQTT_CONFIG": 1, + "SERIAL_CONFIG": 2, + "EXTNOTIF_CONFIG": 4, + "STOREFORWARD_CONFIG": 8, + "RANGETEST_CONFIG": 16, + "TELEMETRY_CONFIG": 32, + "CANNEDMSG_CONFIG": 64, + "AUDIO_CONFIG": 128, + "REMOTEHARDWARE_CONFIG": 256, + "NEIGHBORINFO_CONFIG": 512, + "AMBIENTLIGHTING_CONFIG": 1024, + "DETECTIONSENSOR_CONFIG": 2048, + "PAXCOUNTER_CONFIG": 4096, + "BLUETOOTH_CONFIG": 8192, + "NETWORK_CONFIG": 16384, + } +) + +func (x ExcludedModules) Enum() *ExcludedModules { + p := new(ExcludedModules) + *p = x + return p +} + +func (x ExcludedModules) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExcludedModules) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[3].Descriptor() +} + +func (ExcludedModules) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[3] +} + +func (x ExcludedModules) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ExcludedModules.Descriptor instead. +func (ExcludedModules) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{3} +} + +// How the location was acquired: manual, onboard GPS, external (EUD) GPS +type Position_LocSource int32 + +const ( + // TODO: REPLACE + Position_LOC_UNSET Position_LocSource = 0 + // TODO: REPLACE + Position_LOC_MANUAL Position_LocSource = 1 + // TODO: REPLACE + Position_LOC_INTERNAL Position_LocSource = 2 + // TODO: REPLACE + Position_LOC_EXTERNAL Position_LocSource = 3 +) + +// Enum value maps for Position_LocSource. +var ( + Position_LocSource_name = map[int32]string{ + 0: "LOC_UNSET", + 1: "LOC_MANUAL", + 2: "LOC_INTERNAL", + 3: "LOC_EXTERNAL", + } + Position_LocSource_value = map[string]int32{ + "LOC_UNSET": 0, + "LOC_MANUAL": 1, + "LOC_INTERNAL": 2, + "LOC_EXTERNAL": 3, + } +) + +func (x Position_LocSource) Enum() *Position_LocSource { + p := new(Position_LocSource) + *p = x + return p +} + +func (x Position_LocSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Position_LocSource) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[4].Descriptor() +} + +func (Position_LocSource) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[4] +} + +func (x Position_LocSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Position_LocSource.Descriptor instead. +func (Position_LocSource) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{0, 0} +} + +// How the altitude was acquired: manual, GPS int/ext, etc +// Default: same as location_source if present +type Position_AltSource int32 + +const ( + // TODO: REPLACE + Position_ALT_UNSET Position_AltSource = 0 + // TODO: REPLACE + Position_ALT_MANUAL Position_AltSource = 1 + // TODO: REPLACE + Position_ALT_INTERNAL Position_AltSource = 2 + // TODO: REPLACE + Position_ALT_EXTERNAL Position_AltSource = 3 + // TODO: REPLACE + Position_ALT_BAROMETRIC Position_AltSource = 4 +) + +// Enum value maps for Position_AltSource. +var ( + Position_AltSource_name = map[int32]string{ + 0: "ALT_UNSET", + 1: "ALT_MANUAL", + 2: "ALT_INTERNAL", + 3: "ALT_EXTERNAL", + 4: "ALT_BAROMETRIC", + } + Position_AltSource_value = map[string]int32{ + "ALT_UNSET": 0, + "ALT_MANUAL": 1, + "ALT_INTERNAL": 2, + "ALT_EXTERNAL": 3, + "ALT_BAROMETRIC": 4, + } +) + +func (x Position_AltSource) Enum() *Position_AltSource { + p := new(Position_AltSource) + *p = x + return p +} + +func (x Position_AltSource) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Position_AltSource) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[5].Descriptor() +} + +func (Position_AltSource) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[5] +} + +func (x Position_AltSource) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Position_AltSource.Descriptor instead. +func (Position_AltSource) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{0, 1} +} + +// A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide +// details on the type of failure). +type Routing_Error int32 + +const ( + // This message is not a failure + Routing_NONE Routing_Error = 0 + // Our node doesn't have a route to the requested destination anymore. + Routing_NO_ROUTE Routing_Error = 1 + // We received a nak while trying to forward on your behalf + Routing_GOT_NAK Routing_Error = 2 + // TODO: REPLACE + Routing_TIMEOUT Routing_Error = 3 + // No suitable interface could be found for delivering this packet + Routing_NO_INTERFACE Routing_Error = 4 + // We reached the max retransmission count (typically for naive flood routing) + Routing_MAX_RETRANSMIT Routing_Error = 5 + // No suitable channel was found for sending this packet (i.e. was requested channel index disabled?) + Routing_NO_CHANNEL Routing_Error = 6 + // The packet was too big for sending (exceeds interface MTU after encoding) + Routing_TOO_LARGE Routing_Error = 7 + // The request had want_response set, the request reached the destination node, but no service on that node wants to send a response + // (possibly due to bad channel permissions) + Routing_NO_RESPONSE Routing_Error = 8 + // Cannot send currently because duty cycle regulations will be violated. + Routing_DUTY_CYCLE_LIMIT Routing_Error = 9 + // The application layer service on the remote node received your request, but considered your request somehow invalid + Routing_BAD_REQUEST Routing_Error = 32 + // The application layer service on the remote node received your request, but considered your request not authorized + // (i.e you did not send the request on the required bound channel) + Routing_NOT_AUTHORIZED Routing_Error = 33 + // The client specified a PKI transport, but the node was unable to send the packet using PKI (and did not send the message at all) + Routing_PKI_FAILED Routing_Error = 34 + // The receiving node does not have a Public Key to decode with + Routing_PKI_UNKNOWN_PUBKEY Routing_Error = 35 + // Admin packet otherwise checks out, but uses a bogus or expired session key + Routing_ADMIN_BAD_SESSION_KEY Routing_Error = 36 + // Admin packet sent using PKC, but not from a public key on the admin key list + Routing_ADMIN_PUBLIC_KEY_UNAUTHORIZED Routing_Error = 37 +) + +// Enum value maps for Routing_Error. +var ( + Routing_Error_name = map[int32]string{ + 0: "NONE", + 1: "NO_ROUTE", + 2: "GOT_NAK", + 3: "TIMEOUT", + 4: "NO_INTERFACE", + 5: "MAX_RETRANSMIT", + 6: "NO_CHANNEL", + 7: "TOO_LARGE", + 8: "NO_RESPONSE", + 9: "DUTY_CYCLE_LIMIT", + 32: "BAD_REQUEST", + 33: "NOT_AUTHORIZED", + 34: "PKI_FAILED", + 35: "PKI_UNKNOWN_PUBKEY", + 36: "ADMIN_BAD_SESSION_KEY", + 37: "ADMIN_PUBLIC_KEY_UNAUTHORIZED", + } + Routing_Error_value = map[string]int32{ + "NONE": 0, + "NO_ROUTE": 1, + "GOT_NAK": 2, + "TIMEOUT": 3, + "NO_INTERFACE": 4, + "MAX_RETRANSMIT": 5, + "NO_CHANNEL": 6, + "TOO_LARGE": 7, + "NO_RESPONSE": 8, + "DUTY_CYCLE_LIMIT": 9, + "BAD_REQUEST": 32, + "NOT_AUTHORIZED": 33, + "PKI_FAILED": 34, + "PKI_UNKNOWN_PUBKEY": 35, + "ADMIN_BAD_SESSION_KEY": 36, + "ADMIN_PUBLIC_KEY_UNAUTHORIZED": 37, + } +) + +func (x Routing_Error) Enum() *Routing_Error { + p := new(Routing_Error) + *p = x + return p +} + +func (x Routing_Error) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Routing_Error) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[6].Descriptor() +} + +func (Routing_Error) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[6] +} + +func (x Routing_Error) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Routing_Error.Descriptor instead. +func (Routing_Error) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{3, 0} +} + +// The priority of this message for sending. +// Higher priorities are sent first (when managing the transmit queue). +// This field is never sent over the air, it is only used internally inside of a local device node. +// API clients (either on the local node or connected directly to the node) +// can set this parameter if necessary. +// (values must be <= 127 to keep protobuf field to one byte in size. +// Detailed background on this field: +// I noticed a funny side effect of lora being so slow: Usually when making +// a protocol there isn’t much need to use message priority to change the order +// of transmission (because interfaces are fairly fast). +// But for lora where packets can take a few seconds each, it is very important +// to make sure that critical packets are sent ASAP. +// In the case of meshtastic that means we want to send protocol acks as soon as possible +// (to prevent unneeded retransmissions), we want routing messages to be sent next, +// then messages marked as reliable and finally 'background' packets like periodic position updates. +// So I bit the bullet and implemented a new (internal - not sent over the air) +// field in MeshPacket called 'priority'. +// And the transmission queue in the router object is now a priority queue. +type MeshPacket_Priority int32 + +const ( + // Treated as Priority.DEFAULT + MeshPacket_UNSET MeshPacket_Priority = 0 + // TODO: REPLACE + MeshPacket_MIN MeshPacket_Priority = 1 + // Background position updates are sent with very low priority - + // if the link is super congested they might not go out at all + MeshPacket_BACKGROUND MeshPacket_Priority = 10 + // This priority is used for most messages that don't have a priority set + MeshPacket_DEFAULT MeshPacket_Priority = 64 + // If priority is unset but the message is marked as want_ack, + // assume it is important and use a slightly higher priority + MeshPacket_RELIABLE MeshPacket_Priority = 70 + // If priority is unset but the packet is a response to a request, we want it to get there relatively quickly. + // Furthermore, responses stop relaying packets directed to a node early. + MeshPacket_RESPONSE MeshPacket_Priority = 80 + // Higher priority for specific message types (portnums) to distinguish between other reliable packets. + MeshPacket_HIGH MeshPacket_Priority = 100 + // Higher priority alert message used for critical alerts which take priority over other reliable packets. + MeshPacket_ALERT MeshPacket_Priority = 110 + // Ack/naks are sent with very high priority to ensure that retransmission + // stops as soon as possible + MeshPacket_ACK MeshPacket_Priority = 120 + // TODO: REPLACE + MeshPacket_MAX MeshPacket_Priority = 127 +) + +// Enum value maps for MeshPacket_Priority. +var ( + MeshPacket_Priority_name = map[int32]string{ + 0: "UNSET", + 1: "MIN", + 10: "BACKGROUND", + 64: "DEFAULT", + 70: "RELIABLE", + 80: "RESPONSE", + 100: "HIGH", + 110: "ALERT", + 120: "ACK", + 127: "MAX", + } + MeshPacket_Priority_value = map[string]int32{ + "UNSET": 0, + "MIN": 1, + "BACKGROUND": 10, + "DEFAULT": 64, + "RELIABLE": 70, + "RESPONSE": 80, + "HIGH": 100, + "ALERT": 110, + "ACK": 120, + "MAX": 127, + } +) + +func (x MeshPacket_Priority) Enum() *MeshPacket_Priority { + p := new(MeshPacket_Priority) + *p = x + return p +} + +func (x MeshPacket_Priority) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MeshPacket_Priority) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[7].Descriptor() +} + +func (MeshPacket_Priority) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[7] +} + +func (x MeshPacket_Priority) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MeshPacket_Priority.Descriptor instead. +func (MeshPacket_Priority) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{7, 0} +} + +// Identify if this is a delayed packet +type MeshPacket_Delayed int32 + +const ( + // If unset, the message is being sent in real time. + MeshPacket_NO_DELAY MeshPacket_Delayed = 0 + // The message is delayed and was originally a broadcast + MeshPacket_DELAYED_BROADCAST MeshPacket_Delayed = 1 + // The message is delayed and was originally a direct message + MeshPacket_DELAYED_DIRECT MeshPacket_Delayed = 2 +) + +// Enum value maps for MeshPacket_Delayed. +var ( + MeshPacket_Delayed_name = map[int32]string{ + 0: "NO_DELAY", + 1: "DELAYED_BROADCAST", + 2: "DELAYED_DIRECT", + } + MeshPacket_Delayed_value = map[string]int32{ + "NO_DELAY": 0, + "DELAYED_BROADCAST": 1, + "DELAYED_DIRECT": 2, + } +) + +func (x MeshPacket_Delayed) Enum() *MeshPacket_Delayed { + p := new(MeshPacket_Delayed) + *p = x + return p +} + +func (x MeshPacket_Delayed) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MeshPacket_Delayed) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[8].Descriptor() +} + +func (MeshPacket_Delayed) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[8] +} + +func (x MeshPacket_Delayed) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MeshPacket_Delayed.Descriptor instead. +func (MeshPacket_Delayed) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{7, 1} +} + +// Log levels, chosen to match python logging conventions. +type LogRecord_Level int32 + +const ( + // Log levels, chosen to match python logging conventions. + LogRecord_UNSET LogRecord_Level = 0 + // Log levels, chosen to match python logging conventions. + LogRecord_CRITICAL LogRecord_Level = 50 + // Log levels, chosen to match python logging conventions. + LogRecord_ERROR LogRecord_Level = 40 + // Log levels, chosen to match python logging conventions. + LogRecord_WARNING LogRecord_Level = 30 + // Log levels, chosen to match python logging conventions. + LogRecord_INFO LogRecord_Level = 20 + // Log levels, chosen to match python logging conventions. + LogRecord_DEBUG LogRecord_Level = 10 + // Log levels, chosen to match python logging conventions. + LogRecord_TRACE LogRecord_Level = 5 +) + +// Enum value maps for LogRecord_Level. +var ( + LogRecord_Level_name = map[int32]string{ + 0: "UNSET", + 50: "CRITICAL", + 40: "ERROR", + 30: "WARNING", + 20: "INFO", + 10: "DEBUG", + 5: "TRACE", + } + LogRecord_Level_value = map[string]int32{ + "UNSET": 0, + "CRITICAL": 50, + "ERROR": 40, + "WARNING": 30, + "INFO": 20, + "DEBUG": 10, + "TRACE": 5, + } +) + +func (x LogRecord_Level) Enum() *LogRecord_Level { + p := new(LogRecord_Level) + *p = x + return p +} + +func (x LogRecord_Level) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogRecord_Level) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_mesh_proto_enumTypes[9].Descriptor() +} + +func (LogRecord_Level) Type() protoreflect.EnumType { + return &file_meshtastic_mesh_proto_enumTypes[9] +} + +func (x LogRecord_Level) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogRecord_Level.Descriptor instead. +func (LogRecord_Level) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{10, 0} +} + +// A GPS Position +type Position 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,oneof" json:"latitude_i,omitempty"` + // TODO: REPLACE + LongitudeI *int32 `protobuf:"fixed32,2,opt,name=longitude_i,json=longitudeI,proto3,oneof" json:"longitude_i,omitempty"` + // In meters above MSL (but see issue #359) + Altitude *int32 `protobuf:"varint,3,opt,name=altitude,proto3,oneof" 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 time if it is sent over + // the mesh (because there are devices on the mesh without GPS or RTC). + // 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"` + // TODO: REPLACE + AltitudeSource Position_AltSource `protobuf:"varint,6,opt,name=altitude_source,json=altitudeSource,proto3,enum=meshtastic.Position_AltSource" json:"altitude_source,omitempty"` + // Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds + Timestamp uint32 `protobuf:"fixed32,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // Pos. timestamp milliseconds adjustment (rarely available or required) + TimestampMillisAdjust int32 `protobuf:"varint,8,opt,name=timestamp_millis_adjust,json=timestampMillisAdjust,proto3" json:"timestamp_millis_adjust,omitempty"` + // HAE altitude in meters - can be used instead of MSL altitude + AltitudeHae *int32 `protobuf:"zigzag32,9,opt,name=altitude_hae,json=altitudeHae,proto3,oneof" json:"altitude_hae,omitempty"` + // Geoidal separation in meters + AltitudeGeoidalSeparation *int32 `protobuf:"zigzag32,10,opt,name=altitude_geoidal_separation,json=altitudeGeoidalSeparation,proto3,oneof" json:"altitude_geoidal_separation,omitempty"` + // Horizontal, Vertical and Position Dilution of Precision, in 1/100 units + // - PDOP is sufficient for most cases + // - for higher precision scenarios, HDOP and VDOP can be used instead, + // in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) + // + // TODO: REMOVE/INTEGRATE + PDOP uint32 `protobuf:"varint,11,opt,name=PDOP,proto3" json:"PDOP,omitempty"` + // TODO: REPLACE + HDOP uint32 `protobuf:"varint,12,opt,name=HDOP,proto3" json:"HDOP,omitempty"` + // TODO: REPLACE + VDOP uint32 `protobuf:"varint,13,opt,name=VDOP,proto3" json:"VDOP,omitempty"` + // GPS accuracy (a hardware specific constant) in mm + // + // multiplied with DOP to calculate positional accuracy + // + // Default: "'bout three meters-ish" :) + GpsAccuracy uint32 `protobuf:"varint,14,opt,name=gps_accuracy,json=gpsAccuracy,proto3" json:"gps_accuracy,omitempty"` + // Ground speed in m/s and True North TRACK in 1/100 degrees + // Clarification of terms: + // - "track" is the direction of motion (measured in horizontal plane) + // - "heading" is where the fuselage points (measured in horizontal plane) + // - "yaw" indicates a relative rotation about the vertical axis + // TODO: REMOVE/INTEGRATE + GroundSpeed *uint32 `protobuf:"varint,15,opt,name=ground_speed,json=groundSpeed,proto3,oneof" json:"ground_speed,omitempty"` + // TODO: REPLACE + GroundTrack *uint32 `protobuf:"varint,16,opt,name=ground_track,json=groundTrack,proto3,oneof" json:"ground_track,omitempty"` + // GPS fix quality (from NMEA GxGGA statement or similar) + FixQuality uint32 `protobuf:"varint,17,opt,name=fix_quality,json=fixQuality,proto3" json:"fix_quality,omitempty"` + // GPS fix type 2D/3D (from NMEA GxGSA statement) + FixType uint32 `protobuf:"varint,18,opt,name=fix_type,json=fixType,proto3" json:"fix_type,omitempty"` + // GPS "Satellites in View" number + SatsInView uint32 `protobuf:"varint,19,opt,name=sats_in_view,json=satsInView,proto3" json:"sats_in_view,omitempty"` + // Sensor ID - in case multiple positioning sensors are being used + SensorId uint32 `protobuf:"varint,20,opt,name=sensor_id,json=sensorId,proto3" json:"sensor_id,omitempty"` + // Estimated/expected time (in seconds) until next update: + // - if we update at fixed intervals of X seconds, use X + // - if we update at dynamic intervals (based on relative movement etc), + // but "AT LEAST every Y seconds", use Y + NextUpdate uint32 `protobuf:"varint,21,opt,name=next_update,json=nextUpdate,proto3" json:"next_update,omitempty"` + // A sequence number, incremented with each Position message to help + // + // detect lost updates if needed + SeqNumber uint32 `protobuf:"varint,22,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` + // Indicates the bits of precision set by the sending node + PrecisionBits uint32 `protobuf:"varint,23,opt,name=precision_bits,json=precisionBits,proto3" json:"precision_bits,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Position) Reset() { + *x = Position{} + mi := &file_meshtastic_mesh_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Position) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Position) ProtoMessage() {} + +func (x *Position) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 Position.ProtoReflect.Descriptor instead. +func (*Position) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{0} +} + +func (x *Position) GetLatitudeI() int32 { + if x != nil && x.LatitudeI != nil { + return *x.LatitudeI + } + return 0 +} + +func (x *Position) GetLongitudeI() int32 { + if x != nil && x.LongitudeI != nil { + return *x.LongitudeI + } + return 0 +} + +func (x *Position) GetAltitude() int32 { + if x != nil && x.Altitude != nil { + return *x.Altitude + } + return 0 +} + +func (x *Position) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *Position) GetLocationSource() Position_LocSource { + if x != nil { + return x.LocationSource + } + return Position_LOC_UNSET +} + +func (x *Position) GetAltitudeSource() Position_AltSource { + if x != nil { + return x.AltitudeSource + } + return Position_ALT_UNSET +} + +func (x *Position) GetTimestamp() uint32 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Position) GetTimestampMillisAdjust() int32 { + if x != nil { + return x.TimestampMillisAdjust + } + return 0 +} + +func (x *Position) GetAltitudeHae() int32 { + if x != nil && x.AltitudeHae != nil { + return *x.AltitudeHae + } + return 0 +} + +func (x *Position) GetAltitudeGeoidalSeparation() int32 { + if x != nil && x.AltitudeGeoidalSeparation != nil { + return *x.AltitudeGeoidalSeparation + } + return 0 +} + +func (x *Position) GetPDOP() uint32 { + if x != nil { + return x.PDOP + } + return 0 +} + +func (x *Position) GetHDOP() uint32 { + if x != nil { + return x.HDOP + } + return 0 +} + +func (x *Position) GetVDOP() uint32 { + if x != nil { + return x.VDOP + } + return 0 +} + +func (x *Position) GetGpsAccuracy() uint32 { + if x != nil { + return x.GpsAccuracy + } + return 0 +} + +func (x *Position) GetGroundSpeed() uint32 { + if x != nil && x.GroundSpeed != nil { + return *x.GroundSpeed + } + return 0 +} + +func (x *Position) GetGroundTrack() uint32 { + if x != nil && x.GroundTrack != nil { + return *x.GroundTrack + } + return 0 +} + +func (x *Position) GetFixQuality() uint32 { + if x != nil { + return x.FixQuality + } + return 0 +} + +func (x *Position) GetFixType() uint32 { + if x != nil { + return x.FixType + } + return 0 +} + +func (x *Position) GetSatsInView() uint32 { + if x != nil { + return x.SatsInView + } + return 0 +} + +func (x *Position) GetSensorId() uint32 { + if x != nil { + return x.SensorId + } + return 0 +} + +func (x *Position) GetNextUpdate() uint32 { + if x != nil { + return x.NextUpdate + } + return 0 +} + +func (x *Position) GetSeqNumber() uint32 { + if x != nil { + return x.SeqNumber + } + return 0 +} + +func (x *Position) GetPrecisionBits() uint32 { + if x != nil { + return x.PrecisionBits + } + return 0 +} + +// Broadcast when a newly powered mesh node wants to find a node num it can use +// Sent from the phone over bluetooth to set the user id for the owner of this node. +// Also sent from nodes to each other when a new node signs on (so all clients can have this info) +// The algorithm is as follows: +// when a node starts up, it broadcasts their user and the normal flow is for all +// other nodes to reply with their User as well (so the new node can build its nodedb) +// If a node ever receives a User (not just the first broadcast) message where +// the sender node number equals our node number, that indicates a collision has +// occurred and the following steps should happen: +// If the receiving node (that was already in the mesh)'s macaddr is LOWER than the +// new User who just tried to sign in: it gets to keep its nodenum. +// We send a broadcast message of OUR User (we use a broadcast so that the other node can +// receive our message, considering we have the same id - it also serves to let +// observers correct their nodedb) - this case is rare so it should be okay. +// If any node receives a User where the macaddr is GTE than their local macaddr, +// they have been vetoed and should pick a new random nodenum (filtering against +// whatever it knows about the nodedb) and rebroadcast their User. +// A few nodenums are reserved and will never be requested: +// 0xff - broadcast +// 0 through 3 - for future use +type User struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A globally unique ID string for this user. + // In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>. + // Note: app developers are encouraged to also use the following standard + // node IDs "^all" (for broadcast), "^local" (for the locally connected node) + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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"` + // Deprecated in Meshtastic 2.1.x + // This is the addr of the radio. + // Not populated by the phone, but added by the esp32 when broadcasting + // + // Deprecated: Marked as deprecated in meshtastic/mesh.proto. + Macaddr []byte `protobuf:"bytes,4,opt,name=macaddr,proto3" json:"macaddr,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,5,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,6,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,7,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,8,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *User) Reset() { + *x = User{} + mi := &file_meshtastic_mesh_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{1} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetLongName() string { + if x != nil { + return x.LongName + } + return "" +} + +func (x *User) GetShortName() string { + if x != nil { + return x.ShortName + } + return "" +} + +// Deprecated: Marked as deprecated in meshtastic/mesh.proto. +func (x *User) GetMacaddr() []byte { + if x != nil { + return x.Macaddr + } + return nil +} + +func (x *User) GetHwModel() HardwareModel { + if x != nil { + return x.HwModel + } + return HardwareModel_UNSET +} + +func (x *User) GetIsLicensed() bool { + if x != nil { + return x.IsLicensed + } + return false +} + +func (x *User) GetRole() Config_DeviceConfig_Role { + if x != nil { + return x.Role + } + return Config_DeviceConfig_CLIENT +} + +func (x *User) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +// A message used in a traceroute +type RouteDiscovery struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The list of nodenums this packet has visited so far to the destination. + Route []uint32 `protobuf:"fixed32,1,rep,packed,name=route,proto3" json:"route,omitempty"` + // The list of SNRs (in dB, scaled by 4) in the route towards the destination. + SnrTowards []int32 `protobuf:"varint,2,rep,packed,name=snr_towards,json=snrTowards,proto3" json:"snr_towards,omitempty"` + // The list of nodenums the packet has visited on the way back from the destination. + RouteBack []uint32 `protobuf:"fixed32,3,rep,packed,name=route_back,json=routeBack,proto3" json:"route_back,omitempty"` + // The list of SNRs (in dB, scaled by 4) in the route back from the destination. + SnrBack []int32 `protobuf:"varint,4,rep,packed,name=snr_back,json=snrBack,proto3" json:"snr_back,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RouteDiscovery) Reset() { + *x = RouteDiscovery{} + mi := &file_meshtastic_mesh_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RouteDiscovery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RouteDiscovery) ProtoMessage() {} + +func (x *RouteDiscovery) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 RouteDiscovery.ProtoReflect.Descriptor instead. +func (*RouteDiscovery) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{2} +} + +func (x *RouteDiscovery) GetRoute() []uint32 { + if x != nil { + return x.Route + } + return nil +} + +func (x *RouteDiscovery) GetSnrTowards() []int32 { + if x != nil { + return x.SnrTowards + } + return nil +} + +func (x *RouteDiscovery) GetRouteBack() []uint32 { + if x != nil { + return x.RouteBack + } + return nil +} + +func (x *RouteDiscovery) GetSnrBack() []int32 { + if x != nil { + return x.SnrBack + } + return nil +} + +// A Routing control Data packet handled by the routing module +type Routing struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *Routing_RouteRequest + // *Routing_RouteReply + // *Routing_ErrorReason + Variant isRouting_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Routing) Reset() { + *x = Routing{} + mi := &file_meshtastic_mesh_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Routing) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Routing) ProtoMessage() {} + +func (x *Routing) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 Routing.ProtoReflect.Descriptor instead. +func (*Routing) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{3} +} + +func (x *Routing) GetVariant() isRouting_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Routing) GetRouteRequest() *RouteDiscovery { + if x != nil { + if x, ok := x.Variant.(*Routing_RouteRequest); ok { + return x.RouteRequest + } + } + return nil +} + +func (x *Routing) GetRouteReply() *RouteDiscovery { + if x != nil { + if x, ok := x.Variant.(*Routing_RouteReply); ok { + return x.RouteReply + } + } + return nil +} + +func (x *Routing) GetErrorReason() Routing_Error { + if x != nil { + if x, ok := x.Variant.(*Routing_ErrorReason); ok { + return x.ErrorReason + } + } + return Routing_NONE +} + +type isRouting_Variant interface { + isRouting_Variant() +} + +type Routing_RouteRequest struct { + // A route request going from the requester + RouteRequest *RouteDiscovery `protobuf:"bytes,1,opt,name=route_request,json=routeRequest,proto3,oneof"` +} + +type Routing_RouteReply struct { + // A route reply + RouteReply *RouteDiscovery `protobuf:"bytes,2,opt,name=route_reply,json=routeReply,proto3,oneof"` +} + +type Routing_ErrorReason struct { + // A failure in delivering a message (usually used for routing control messages, but might be provided + // in addition to ack.fail_id to provide details on the type of failure). + ErrorReason Routing_Error `protobuf:"varint,3,opt,name=error_reason,json=errorReason,proto3,enum=meshtastic.Routing_Error,oneof"` +} + +func (*Routing_RouteRequest) isRouting_Variant() {} + +func (*Routing_RouteReply) isRouting_Variant() {} + +func (*Routing_ErrorReason) isRouting_Variant() {} + +// (Formerly called SubPacket) +// The payload portion fo a packet, this is the actual bytes that are sent +// inside a radio packet (because from/to are broken out by the comms library) +type Data struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Formerly named typ and of type Type + Portnum PortNum `protobuf:"varint,1,opt,name=portnum,proto3,enum=meshtastic.PortNum" json:"portnum,omitempty"` + // TODO: REPLACE + Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + // Not normally used, but for testing a sender can request that recipient + // responds in kind (i.e. if it received a position, it should unicast back it's position). + // Note: that if you set this on a broadcast you will receive many replies. + WantResponse bool `protobuf:"varint,3,opt,name=want_response,json=wantResponse,proto3" json:"want_response,omitempty"` + // The address of the destination node. + // This field is is filled in by the mesh radio device software, application + // layer software should never need it. + // RouteDiscovery messages _must_ populate this. + // Other message types might need to if they are doing multihop routing. + Dest uint32 `protobuf:"fixed32,4,opt,name=dest,proto3" json:"dest,omitempty"` + // The address of the original sender for this message. + // This field should _only_ be populated for reliable multihop packets (to keep + // packets small). + Source uint32 `protobuf:"fixed32,5,opt,name=source,proto3" json:"source,omitempty"` + // Only used in routing or response messages. + // Indicates the original message ID that this message is reporting failure on. (formerly called original_id) + RequestId uint32 `protobuf:"fixed32,6,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // If set, this message is intened to be a reply to a previously sent message with the defined id. + ReplyId uint32 `protobuf:"fixed32,7,opt,name=reply_id,json=replyId,proto3" json:"reply_id,omitempty"` + // Defaults to false. If true, then what is in the payload should be treated as an emoji like giving + // a message a heart or poop emoji. + Emoji uint32 `protobuf:"fixed32,8,opt,name=emoji,proto3" json:"emoji,omitempty"` + // Bitfield for extra flags. First use is to indicate that user approves the packet being uploaded to MQTT. + Bitfield *uint32 `protobuf:"varint,9,opt,name=bitfield,proto3,oneof" json:"bitfield,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Data) Reset() { + *x = Data{} + mi := &file_meshtastic_mesh_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{4} +} + +func (x *Data) GetPortnum() PortNum { + if x != nil { + return x.Portnum + } + return PortNum_UNKNOWN_APP +} + +func (x *Data) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Data) GetWantResponse() bool { + if x != nil { + return x.WantResponse + } + return false +} + +func (x *Data) GetDest() uint32 { + if x != nil { + return x.Dest + } + return 0 +} + +func (x *Data) GetSource() uint32 { + if x != nil { + return x.Source + } + return 0 +} + +func (x *Data) GetRequestId() uint32 { + if x != nil { + return x.RequestId + } + return 0 +} + +func (x *Data) GetReplyId() uint32 { + if x != nil { + return x.ReplyId + } + return 0 +} + +func (x *Data) GetEmoji() uint32 { + if x != nil { + return x.Emoji + } + return 0 +} + +func (x *Data) GetBitfield() uint32 { + if x != nil && x.Bitfield != nil { + return *x.Bitfield + } + return 0 +} + +// Waypoint message, used to share arbitrary locations across the mesh +type Waypoint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Id of the waypoint + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // latitude_i + LatitudeI *int32 `protobuf:"fixed32,2,opt,name=latitude_i,json=latitudeI,proto3,oneof" json:"latitude_i,omitempty"` + // longitude_i + LongitudeI *int32 `protobuf:"fixed32,3,opt,name=longitude_i,json=longitudeI,proto3,oneof" json:"longitude_i,omitempty"` + // Time the waypoint is to expire (epoch) + Expire uint32 `protobuf:"varint,4,opt,name=expire,proto3" json:"expire,omitempty"` + // If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. + // If zero, the waypoint is open to be edited by any member of the mesh. + LockedTo uint32 `protobuf:"varint,5,opt,name=locked_to,json=lockedTo,proto3" json:"locked_to,omitempty"` + // Name of the waypoint - max 30 chars + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // Description of the waypoint - max 100 chars + Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` + // Designator icon for the waypoint in the form of a unicode emoji + Icon uint32 `protobuf:"fixed32,8,opt,name=icon,proto3" json:"icon,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Waypoint) Reset() { + *x = Waypoint{} + mi := &file_meshtastic_mesh_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Waypoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Waypoint) ProtoMessage() {} + +func (x *Waypoint) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 Waypoint.ProtoReflect.Descriptor instead. +func (*Waypoint) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{5} +} + +func (x *Waypoint) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Waypoint) GetLatitudeI() int32 { + if x != nil && x.LatitudeI != nil { + return *x.LatitudeI + } + return 0 +} + +func (x *Waypoint) GetLongitudeI() int32 { + if x != nil && x.LongitudeI != nil { + return *x.LongitudeI + } + return 0 +} + +func (x *Waypoint) GetExpire() uint32 { + if x != nil { + return x.Expire + } + return 0 +} + +func (x *Waypoint) GetLockedTo() uint32 { + if x != nil { + return x.LockedTo + } + return 0 +} + +func (x *Waypoint) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Waypoint) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Waypoint) GetIcon() uint32 { + if x != nil { + return x.Icon + } + return 0 +} + +// This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server +type MqttClientProxyMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The MQTT topic this message will be sent /received on + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + // The actual service envelope payload or text for mqtt pub / sub + // + // Types that are valid to be assigned to PayloadVariant: + // + // *MqttClientProxyMessage_Data + // *MqttClientProxyMessage_Text + PayloadVariant isMqttClientProxyMessage_PayloadVariant `protobuf_oneof:"payload_variant"` + // Whether the message should be retained (or not) + Retained bool `protobuf:"varint,4,opt,name=retained,proto3" json:"retained,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MqttClientProxyMessage) Reset() { + *x = MqttClientProxyMessage{} + mi := &file_meshtastic_mesh_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MqttClientProxyMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MqttClientProxyMessage) ProtoMessage() {} + +func (x *MqttClientProxyMessage) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_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 MqttClientProxyMessage.ProtoReflect.Descriptor instead. +func (*MqttClientProxyMessage) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{6} +} + +func (x *MqttClientProxyMessage) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *MqttClientProxyMessage) GetPayloadVariant() isMqttClientProxyMessage_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *MqttClientProxyMessage) GetData() []byte { + if x != nil { + if x, ok := x.PayloadVariant.(*MqttClientProxyMessage_Data); ok { + return x.Data + } + } + return nil +} + +func (x *MqttClientProxyMessage) GetText() string { + if x != nil { + if x, ok := x.PayloadVariant.(*MqttClientProxyMessage_Text); ok { + return x.Text + } + } + return "" +} + +func (x *MqttClientProxyMessage) GetRetained() bool { + if x != nil { + return x.Retained + } + return false +} + +type isMqttClientProxyMessage_PayloadVariant interface { + isMqttClientProxyMessage_PayloadVariant() +} + +type MqttClientProxyMessage_Data struct { + // Bytes + Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"` +} + +type MqttClientProxyMessage_Text struct { + // Text + Text string `protobuf:"bytes,3,opt,name=text,proto3,oneof"` +} + +func (*MqttClientProxyMessage_Data) isMqttClientProxyMessage_PayloadVariant() {} + +func (*MqttClientProxyMessage_Text) isMqttClientProxyMessage_PayloadVariant() {} + +// A packet envelope sent/received over the mesh +// only payload_variant is sent in the payload portion of the LORA packet. +// The other fields are either not sent at all, or sent in the special 16 byte LORA header. +type MeshPacket struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The sending node number. + // Note: Our crypto implementation uses this field as well. + // See [crypto](/docs/overview/encryption) for details. + From uint32 `protobuf:"fixed32,1,opt,name=from,proto3" json:"from,omitempty"` + // The (immediate) destination for this packet + To uint32 `protobuf:"fixed32,2,opt,name=to,proto3" json:"to,omitempty"` + // (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. + // If unset, packet was on the primary channel. + // A particular node might know only a subset of channels in use on the mesh. + // Therefore channel_index is inherently a local concept and meaningless to send between nodes. + // Very briefly, while sending and receiving deep inside the device Router code, this field instead + // contains the 'channel hash' instead of the index. + // This 'trick' is only used while the payload_variant is an 'encrypted'. + Channel uint32 `protobuf:"varint,3,opt,name=channel,proto3" json:"channel,omitempty"` + // Types that are valid to be assigned to PayloadVariant: + // + // *MeshPacket_Decoded + // *MeshPacket_Encrypted + PayloadVariant isMeshPacket_PayloadVariant `protobuf_oneof:"payload_variant"` + // A unique ID for this packet. + // Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). + // Otherwise a unique ID for this packet, useful for flooding algorithms. + // ID only needs to be unique on a _per sender_ basis, and it only + // needs to be unique for a few minutes (long enough to last for the length of + // any ACK or the completion of a mesh broadcast flood). + // Note: Our crypto implementation uses this id as well. + // See [crypto](/docs/overview/encryption) for details. + Id uint32 `protobuf:"fixed32,6,opt,name=id,proto3" json:"id,omitempty"` + // The time this message was received by the esp32 (secs since 1970). + // Note: this field is _never_ sent on the radio link itself (to save space) Times + // are typically not sent over the mesh, but they will be added to any Packet + // (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) + RxTime uint32 `protobuf:"fixed32,7,opt,name=rx_time,json=rxTime,proto3" json:"rx_time,omitempty"` + // *Never* sent over the radio links. + // Set during reception to indicate the SNR of this packet. + // Used to collect statistics on current link quality. + RxSnr float32 `protobuf:"fixed32,8,opt,name=rx_snr,json=rxSnr,proto3" json:"rx_snr,omitempty"` + // If unset treated as zero (no forwarding, send to direct neighbor nodes only) + // if 1, allow hopping through one node, etc... + // For our usecase real world topologies probably have a max of about 3. + // This field is normally placed into a few of bits in the header. + HopLimit uint32 `protobuf:"varint,9,opt,name=hop_limit,json=hopLimit,proto3" json:"hop_limit,omitempty"` + // This packet is being sent as a reliable message, we would prefer it to arrive at the destination. + // We would like to receive a ack packet in response. + // Broadcasts messages treat this flag specially: Since acks for broadcasts would + // rapidly flood the channel, the normal ack behavior is suppressed. + // Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm). + // If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message. + // So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender. + // If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic. + // Note: This flag is normally sent in a flag bit in the header when sent over the wire + WantAck bool `protobuf:"varint,10,opt,name=want_ack,json=wantAck,proto3" json:"want_ack,omitempty"` + // The priority of this message for sending. + // See MeshPacket.Priority description for more details. + Priority MeshPacket_Priority `protobuf:"varint,11,opt,name=priority,proto3,enum=meshtastic.MeshPacket_Priority" json:"priority,omitempty"` + // rssi of received packet. Only sent to phone for dispay purposes. + RxRssi int32 `protobuf:"varint,12,opt,name=rx_rssi,json=rxRssi,proto3" json:"rx_rssi,omitempty"` + // Describe if this message is delayed + // + // Deprecated: Marked as deprecated in meshtastic/mesh.proto. + Delayed MeshPacket_Delayed `protobuf:"varint,13,opt,name=delayed,proto3,enum=meshtastic.MeshPacket_Delayed" json:"delayed,omitempty"` + // Describes whether this packet passed via MQTT somewhere along the path it currently took. + ViaMqtt bool `protobuf:"varint,14,opt,name=via_mqtt,json=viaMqtt,proto3" json:"via_mqtt,omitempty"` + // Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. + // When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. + HopStart uint32 `protobuf:"varint,15,opt,name=hop_start,json=hopStart,proto3" json:"hop_start,omitempty"` + // Records the public key the packet was encrypted with, if applicable. + PublicKey []byte `protobuf:"bytes,16,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // Indicates whether the packet was en/decrypted using PKI + PkiEncrypted bool `protobuf:"varint,17,opt,name=pki_encrypted,json=pkiEncrypted,proto3" json:"pki_encrypted,omitempty"` + // Last byte of the node number of the node that should be used as the next hop in routing. + // Set by the firmware internally, clients are not supposed to set this. + NextHop uint32 `protobuf:"varint,18,opt,name=next_hop,json=nextHop,proto3" json:"next_hop,omitempty"` + // Last byte of the node number of the node that will relay/relayed this packet. + // Set by the firmware internally, clients are not supposed to set this. + RelayNode uint32 `protobuf:"varint,19,opt,name=relay_node,json=relayNode,proto3" json:"relay_node,omitempty"` + // *Never* sent over the radio links. + // Timestamp after which this packet may be sent. + // Set by the firmware internally, clients are not supposed to set this. + TxAfter uint32 `protobuf:"varint,20,opt,name=tx_after,json=txAfter,proto3" json:"tx_after,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MeshPacket) Reset() { + *x = MeshPacket{} + mi := &file_meshtastic_mesh_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MeshPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MeshPacket) ProtoMessage() {} + +func (x *MeshPacket) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[7] + 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 MeshPacket.ProtoReflect.Descriptor instead. +func (*MeshPacket) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{7} +} + +func (x *MeshPacket) GetFrom() uint32 { + if x != nil { + return x.From + } + return 0 +} + +func (x *MeshPacket) GetTo() uint32 { + if x != nil { + return x.To + } + return 0 +} + +func (x *MeshPacket) GetChannel() uint32 { + if x != nil { + return x.Channel + } + return 0 +} + +func (x *MeshPacket) GetPayloadVariant() isMeshPacket_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *MeshPacket) GetDecoded() *Data { + if x != nil { + if x, ok := x.PayloadVariant.(*MeshPacket_Decoded); ok { + return x.Decoded + } + } + return nil +} + +func (x *MeshPacket) GetEncrypted() []byte { + if x != nil { + if x, ok := x.PayloadVariant.(*MeshPacket_Encrypted); ok { + return x.Encrypted + } + } + return nil +} + +func (x *MeshPacket) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *MeshPacket) GetRxTime() uint32 { + if x != nil { + return x.RxTime + } + return 0 +} + +func (x *MeshPacket) GetRxSnr() float32 { + if x != nil { + return x.RxSnr + } + return 0 +} + +func (x *MeshPacket) GetHopLimit() uint32 { + if x != nil { + return x.HopLimit + } + return 0 +} + +func (x *MeshPacket) GetWantAck() bool { + if x != nil { + return x.WantAck + } + return false +} + +func (x *MeshPacket) GetPriority() MeshPacket_Priority { + if x != nil { + return x.Priority + } + return MeshPacket_UNSET +} + +func (x *MeshPacket) GetRxRssi() int32 { + if x != nil { + return x.RxRssi + } + return 0 +} + +// Deprecated: Marked as deprecated in meshtastic/mesh.proto. +func (x *MeshPacket) GetDelayed() MeshPacket_Delayed { + if x != nil { + return x.Delayed + } + return MeshPacket_NO_DELAY +} + +func (x *MeshPacket) GetViaMqtt() bool { + if x != nil { + return x.ViaMqtt + } + return false +} + +func (x *MeshPacket) GetHopStart() uint32 { + if x != nil { + return x.HopStart + } + return 0 +} + +func (x *MeshPacket) GetPublicKey() []byte { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *MeshPacket) GetPkiEncrypted() bool { + if x != nil { + return x.PkiEncrypted + } + return false +} + +func (x *MeshPacket) GetNextHop() uint32 { + if x != nil { + return x.NextHop + } + return 0 +} + +func (x *MeshPacket) GetRelayNode() uint32 { + if x != nil { + return x.RelayNode + } + return 0 +} + +func (x *MeshPacket) GetTxAfter() uint32 { + if x != nil { + return x.TxAfter + } + return 0 +} + +type isMeshPacket_PayloadVariant interface { + isMeshPacket_PayloadVariant() +} + +type MeshPacket_Decoded struct { + // TODO: REPLACE + Decoded *Data `protobuf:"bytes,4,opt,name=decoded,proto3,oneof"` +} + +type MeshPacket_Encrypted struct { + // TODO: REPLACE + Encrypted []byte `protobuf:"bytes,5,opt,name=encrypted,proto3,oneof"` +} + +func (*MeshPacket_Decoded) isMeshPacket_PayloadVariant() {} + +func (*MeshPacket_Encrypted) isMeshPacket_PayloadVariant() {} + +// The bluetooth to device link: +// Old BTLE protocol docs from TODO, merge in above and make real docs... +// use protocol buffers, and NanoPB +// messages from device to phone: +// POSITION_UPDATE (..., time) +// TEXT_RECEIVED(from, text, time) +// OPAQUE_RECEIVED(from, payload, time) (for signal messages or other applications) +// messages from phone to device: +// SET_MYID(id, human readable long, human readable short) (send down the unique ID +// string used for this node, a human readable string shown for that id, and a very +// short human readable string suitable for oled screen) SEND_OPAQUE(dest, payload) +// (for signal messages or other applications) SEND_TEXT(dest, text) Get all +// nodes() (returns list of nodes, with full info, last time seen, loc, battery +// level etc) SET_CONFIG (switches device to a new set of radio params and +// preshared key, drops all existing nodes, force our node to rejoin this new group) +// Full information about a node on the mesh +type NodeInfo 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 *User `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 *Position `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"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NodeInfo) Reset() { + *x = NodeInfo{} + mi := &file_meshtastic_mesh_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeInfo) ProtoMessage() {} + +func (x *NodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[8] + 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 NodeInfo.ProtoReflect.Descriptor instead. +func (*NodeInfo) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{8} +} + +func (x *NodeInfo) GetNum() uint32 { + if x != nil { + return x.Num + } + return 0 +} + +func (x *NodeInfo) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +func (x *NodeInfo) GetPosition() *Position { + if x != nil { + return x.Position + } + return nil +} + +func (x *NodeInfo) GetSnr() float32 { + if x != nil { + return x.Snr + } + return 0 +} + +func (x *NodeInfo) GetLastHeard() uint32 { + if x != nil { + return x.LastHeard + } + return 0 +} + +func (x *NodeInfo) GetDeviceMetrics() *DeviceMetrics { + if x != nil { + return x.DeviceMetrics + } + return nil +} + +func (x *NodeInfo) GetChannel() uint32 { + if x != nil { + return x.Channel + } + return 0 +} + +func (x *NodeInfo) GetViaMqtt() bool { + if x != nil { + return x.ViaMqtt + } + return false +} + +func (x *NodeInfo) GetHopsAway() uint32 { + if x != nil && x.HopsAway != nil { + return *x.HopsAway + } + return 0 +} + +func (x *NodeInfo) GetIsFavorite() bool { + if x != nil { + return x.IsFavorite + } + return false +} + +func (x *NodeInfo) GetIsIgnored() bool { + if x != nil { + return x.IsIgnored + } + return false +} + +// Unique local debugging info for this node +// Note: we don't include position or the user info, because that will come in the +// Sent to the phone in response to WantNodes. +type MyNodeInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Tells the phone what our node number is, default starting value is + // lowbyte of macaddr, but it will be fixed if that is already in use + MyNodeNum uint32 `protobuf:"varint,1,opt,name=my_node_num,json=myNodeNum,proto3" json:"my_node_num,omitempty"` + // The total number of reboots this node has ever encountered + // (well - since the last time we discarded preferences) + RebootCount uint32 `protobuf:"varint,8,opt,name=reboot_count,json=rebootCount,proto3" json:"reboot_count,omitempty"` + // The minimum app version that can talk to this device. + // Phone/PC apps should compare this to their build number and if too low tell the user they must update their app + MinAppVersion uint32 `protobuf:"varint,11,opt,name=min_app_version,json=minAppVersion,proto3" json:"min_app_version,omitempty"` + // Unique hardware identifier for this device + DeviceId []byte `protobuf:"bytes,12,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + // The PlatformIO environment used to build this firmware + PioEnv string `protobuf:"bytes,13,opt,name=pio_env,json=pioEnv,proto3" json:"pio_env,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MyNodeInfo) Reset() { + *x = MyNodeInfo{} + mi := &file_meshtastic_mesh_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MyNodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MyNodeInfo) ProtoMessage() {} + +func (x *MyNodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[9] + 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 MyNodeInfo.ProtoReflect.Descriptor instead. +func (*MyNodeInfo) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{9} +} + +func (x *MyNodeInfo) GetMyNodeNum() uint32 { + if x != nil { + return x.MyNodeNum + } + return 0 +} + +func (x *MyNodeInfo) GetRebootCount() uint32 { + if x != nil { + return x.RebootCount + } + return 0 +} + +func (x *MyNodeInfo) GetMinAppVersion() uint32 { + if x != nil { + return x.MinAppVersion + } + return 0 +} + +func (x *MyNodeInfo) GetDeviceId() []byte { + if x != nil { + return x.DeviceId + } + return nil +} + +func (x *MyNodeInfo) GetPioEnv() string { + if x != nil { + return x.PioEnv + } + return "" +} + +// Debug output from the device. +// To minimize the size of records inside the device code, if a time/source/level is not set +// on the message it is assumed to be a continuation of the previously sent message. +// This allows the device code to use fixed maxlen 64 byte strings for messages, +// and then extend as needed by emitting multiple records. +type LogRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Log levels, chosen to match python logging conventions. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // Seconds since 1970 - or 0 for unknown/unset + Time uint32 `protobuf:"fixed32,2,opt,name=time,proto3" json:"time,omitempty"` + // Usually based on thread name - if known + Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"` + // Not yet set + Level LogRecord_Level `protobuf:"varint,4,opt,name=level,proto3,enum=meshtastic.LogRecord_Level" json:"level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogRecord) Reset() { + *x = LogRecord{} + mi := &file_meshtastic_mesh_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogRecord) ProtoMessage() {} + +func (x *LogRecord) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[10] + 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 LogRecord.ProtoReflect.Descriptor instead. +func (*LogRecord) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{10} +} + +func (x *LogRecord) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *LogRecord) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *LogRecord) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *LogRecord) GetLevel() LogRecord_Level { + if x != nil { + return x.Level + } + return LogRecord_UNSET +} + +type QueueStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Last attempt to queue status, ErrorCode + Res int32 `protobuf:"varint,1,opt,name=res,proto3" json:"res,omitempty"` + // Free entries in the outgoing queue + Free uint32 `protobuf:"varint,2,opt,name=free,proto3" json:"free,omitempty"` + // Maximum entries in the outgoing queue + Maxlen uint32 `protobuf:"varint,3,opt,name=maxlen,proto3" json:"maxlen,omitempty"` + // What was mesh packet id that generated this response? + MeshPacketId uint32 `protobuf:"varint,4,opt,name=mesh_packet_id,json=meshPacketId,proto3" json:"mesh_packet_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *QueueStatus) Reset() { + *x = QueueStatus{} + mi := &file_meshtastic_mesh_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *QueueStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueueStatus) ProtoMessage() {} + +func (x *QueueStatus) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[11] + 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 QueueStatus.ProtoReflect.Descriptor instead. +func (*QueueStatus) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{11} +} + +func (x *QueueStatus) GetRes() int32 { + if x != nil { + return x.Res + } + return 0 +} + +func (x *QueueStatus) GetFree() uint32 { + if x != nil { + return x.Free + } + return 0 +} + +func (x *QueueStatus) GetMaxlen() uint32 { + if x != nil { + return x.Maxlen + } + return 0 +} + +func (x *QueueStatus) GetMeshPacketId() uint32 { + if x != nil { + return x.MeshPacketId + } + return 0 +} + +// Packets from the radio to the phone will appear on the fromRadio characteristic. +// It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? +// It will sit in that descriptor until consumed by the phone, +// at which point the next item in the FIFO will be populated. +type FromRadio struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The packet id, used to allow the phone to request missing read packets from the FIFO, + // see our bluetooth docs + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Log levels, chosen to match python logging conventions. + // + // Types that are valid to be assigned to PayloadVariant: + // + // *FromRadio_Packet + // *FromRadio_MyInfo + // *FromRadio_NodeInfo + // *FromRadio_Config + // *FromRadio_LogRecord + // *FromRadio_ConfigCompleteId + // *FromRadio_Rebooted + // *FromRadio_ModuleConfig + // *FromRadio_Channel + // *FromRadio_QueueStatus + // *FromRadio_XmodemPacket + // *FromRadio_Metadata + // *FromRadio_MqttClientProxyMessage + // *FromRadio_FileInfo + // *FromRadio_ClientNotification + // *FromRadio_DeviceuiConfig + PayloadVariant isFromRadio_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FromRadio) Reset() { + *x = FromRadio{} + mi := &file_meshtastic_mesh_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FromRadio) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FromRadio) ProtoMessage() {} + +func (x *FromRadio) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[12] + 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 FromRadio.ProtoReflect.Descriptor instead. +func (*FromRadio) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{12} +} + +func (x *FromRadio) GetId() uint32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *FromRadio) GetPayloadVariant() isFromRadio_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *FromRadio) GetPacket() *MeshPacket { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_Packet); ok { + return x.Packet + } + } + return nil +} + +func (x *FromRadio) GetMyInfo() *MyNodeInfo { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_MyInfo); ok { + return x.MyInfo + } + } + return nil +} + +func (x *FromRadio) GetNodeInfo() *NodeInfo { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_NodeInfo); ok { + return x.NodeInfo + } + } + return nil +} + +func (x *FromRadio) GetConfig() *Config { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_Config); ok { + return x.Config + } + } + return nil +} + +func (x *FromRadio) GetLogRecord() *LogRecord { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_LogRecord); ok { + return x.LogRecord + } + } + return nil +} + +func (x *FromRadio) GetConfigCompleteId() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_ConfigCompleteId); ok { + return x.ConfigCompleteId + } + } + return 0 +} + +func (x *FromRadio) GetRebooted() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_Rebooted); ok { + return x.Rebooted + } + } + return false +} + +func (x *FromRadio) GetModuleConfig() *ModuleConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_ModuleConfig); ok { + return x.ModuleConfig + } + } + return nil +} + +func (x *FromRadio) GetChannel() *Channel { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_Channel); ok { + return x.Channel + } + } + return nil +} + +func (x *FromRadio) GetQueueStatus() *QueueStatus { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_QueueStatus); ok { + return x.QueueStatus + } + } + return nil +} + +func (x *FromRadio) GetXmodemPacket() *XModem { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_XmodemPacket); ok { + return x.XmodemPacket + } + } + return nil +} + +func (x *FromRadio) GetMetadata() *DeviceMetadata { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_Metadata); ok { + return x.Metadata + } + } + return nil +} + +func (x *FromRadio) GetMqttClientProxyMessage() *MqttClientProxyMessage { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_MqttClientProxyMessage); ok { + return x.MqttClientProxyMessage + } + } + return nil +} + +func (x *FromRadio) GetFileInfo() *FileInfo { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_FileInfo); ok { + return x.FileInfo + } + } + return nil +} + +func (x *FromRadio) GetClientNotification() *ClientNotification { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_ClientNotification); ok { + return x.ClientNotification + } + } + return nil +} + +func (x *FromRadio) GetDeviceuiConfig() *DeviceUIConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*FromRadio_DeviceuiConfig); ok { + return x.DeviceuiConfig + } + } + return nil +} + +type isFromRadio_PayloadVariant interface { + isFromRadio_PayloadVariant() +} + +type FromRadio_Packet struct { + // Log levels, chosen to match python logging conventions. + Packet *MeshPacket `protobuf:"bytes,2,opt,name=packet,proto3,oneof"` +} + +type FromRadio_MyInfo struct { + // Tells the phone what our node number is, can be -1 if we've not yet joined a mesh. + // NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + MyInfo *MyNodeInfo `protobuf:"bytes,3,opt,name=my_info,json=myInfo,proto3,oneof"` +} + +type FromRadio_NodeInfo struct { + // One packet is sent for each node in the on radio DB + // starts over with the first node in our DB + NodeInfo *NodeInfo `protobuf:"bytes,4,opt,name=node_info,json=nodeInfo,proto3,oneof"` +} + +type FromRadio_Config struct { + // Include a part of the config (was: RadioConfig radio) + Config *Config `protobuf:"bytes,5,opt,name=config,proto3,oneof"` +} + +type FromRadio_LogRecord struct { + // Set to send debug console output over our protobuf stream + LogRecord *LogRecord `protobuf:"bytes,6,opt,name=log_record,json=logRecord,proto3,oneof"` +} + +type FromRadio_ConfigCompleteId struct { + // Sent as true once the device has finished sending all of the responses to want_config + // recipient should check if this ID matches our original request nonce, if + // not, it means your config responses haven't started yet. + // NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + ConfigCompleteId uint32 `protobuf:"varint,7,opt,name=config_complete_id,json=configCompleteId,proto3,oneof"` +} + +type FromRadio_Rebooted struct { + // Sent to tell clients the radio has just rebooted. + // Set to true if present. + // Not used on all transports, currently just used for the serial console. + // NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + Rebooted bool `protobuf:"varint,8,opt,name=rebooted,proto3,oneof"` +} + +type FromRadio_ModuleConfig struct { + // Include module config + ModuleConfig *ModuleConfig `protobuf:"bytes,9,opt,name=moduleConfig,proto3,oneof"` +} + +type FromRadio_Channel struct { + // One packet is sent for each channel + Channel *Channel `protobuf:"bytes,10,opt,name=channel,proto3,oneof"` +} + +type FromRadio_QueueStatus struct { + // Queue status info + QueueStatus *QueueStatus `protobuf:"bytes,11,opt,name=queueStatus,proto3,oneof"` +} + +type FromRadio_XmodemPacket struct { + // File Transfer Chunk + XmodemPacket *XModem `protobuf:"bytes,12,opt,name=xmodemPacket,proto3,oneof"` +} + +type FromRadio_Metadata struct { + // Device metadata message + Metadata *DeviceMetadata `protobuf:"bytes,13,opt,name=metadata,proto3,oneof"` +} + +type FromRadio_MqttClientProxyMessage struct { + // MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) + MqttClientProxyMessage *MqttClientProxyMessage `protobuf:"bytes,14,opt,name=mqttClientProxyMessage,proto3,oneof"` +} + +type FromRadio_FileInfo struct { + // File system manifest messages + FileInfo *FileInfo `protobuf:"bytes,15,opt,name=fileInfo,proto3,oneof"` +} + +type FromRadio_ClientNotification struct { + // Notification message to the client + ClientNotification *ClientNotification `protobuf:"bytes,16,opt,name=clientNotification,proto3,oneof"` +} + +type FromRadio_DeviceuiConfig struct { + // Persistent data for device-ui + DeviceuiConfig *DeviceUIConfig `protobuf:"bytes,17,opt,name=deviceuiConfig,proto3,oneof"` +} + +func (*FromRadio_Packet) isFromRadio_PayloadVariant() {} + +func (*FromRadio_MyInfo) isFromRadio_PayloadVariant() {} + +func (*FromRadio_NodeInfo) isFromRadio_PayloadVariant() {} + +func (*FromRadio_Config) isFromRadio_PayloadVariant() {} + +func (*FromRadio_LogRecord) isFromRadio_PayloadVariant() {} + +func (*FromRadio_ConfigCompleteId) isFromRadio_PayloadVariant() {} + +func (*FromRadio_Rebooted) isFromRadio_PayloadVariant() {} + +func (*FromRadio_ModuleConfig) isFromRadio_PayloadVariant() {} + +func (*FromRadio_Channel) isFromRadio_PayloadVariant() {} + +func (*FromRadio_QueueStatus) isFromRadio_PayloadVariant() {} + +func (*FromRadio_XmodemPacket) isFromRadio_PayloadVariant() {} + +func (*FromRadio_Metadata) isFromRadio_PayloadVariant() {} + +func (*FromRadio_MqttClientProxyMessage) isFromRadio_PayloadVariant() {} + +func (*FromRadio_FileInfo) isFromRadio_PayloadVariant() {} + +func (*FromRadio_ClientNotification) isFromRadio_PayloadVariant() {} + +func (*FromRadio_DeviceuiConfig) isFromRadio_PayloadVariant() {} + +// A notification message from the device to the client +// To be used for important messages that should to be displayed to the user +// in the form of push notifications or validation messages when saving +// invalid configuration. +type ClientNotification struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The id of the packet we're notifying in response to + ReplyId *uint32 `protobuf:"varint,1,opt,name=reply_id,json=replyId,proto3,oneof" json:"reply_id,omitempty"` + // Seconds since 1970 - or 0 for unknown/unset + Time uint32 `protobuf:"fixed32,2,opt,name=time,proto3" json:"time,omitempty"` + // The level type of notification + Level LogRecord_Level `protobuf:"varint,3,opt,name=level,proto3,enum=meshtastic.LogRecord_Level" json:"level,omitempty"` + // The message body of the notification + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ClientNotification) Reset() { + *x = ClientNotification{} + mi := &file_meshtastic_mesh_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ClientNotification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientNotification) ProtoMessage() {} + +func (x *ClientNotification) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[13] + 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 ClientNotification.ProtoReflect.Descriptor instead. +func (*ClientNotification) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{13} +} + +func (x *ClientNotification) GetReplyId() uint32 { + if x != nil && x.ReplyId != nil { + return *x.ReplyId + } + return 0 +} + +func (x *ClientNotification) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *ClientNotification) GetLevel() LogRecord_Level { + if x != nil { + return x.Level + } + return LogRecord_UNSET +} + +func (x *ClientNotification) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Individual File info for the device +type FileInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The fully qualified path of the file + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + // The size of the file in bytes + SizeBytes uint32 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FileInfo) Reset() { + *x = FileInfo{} + mi := &file_meshtastic_mesh_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileInfo) ProtoMessage() {} + +func (x *FileInfo) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[14] + 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 FileInfo.ProtoReflect.Descriptor instead. +func (*FileInfo) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{14} +} + +func (x *FileInfo) GetFileName() string { + if x != nil { + return x.FileName + } + return "" +} + +func (x *FileInfo) GetSizeBytes() uint32 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +// Packets/commands to the radio will be written (reliably) to the toRadio characteristic. +// Once the write completes the phone can assume it is handled. +type ToRadio struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Log levels, chosen to match python logging conventions. + // + // Types that are valid to be assigned to PayloadVariant: + // + // *ToRadio_Packet + // *ToRadio_WantConfigId + // *ToRadio_Disconnect + // *ToRadio_XmodemPacket + // *ToRadio_MqttClientProxyMessage + // *ToRadio_Heartbeat + PayloadVariant isToRadio_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ToRadio) Reset() { + *x = ToRadio{} + mi := &file_meshtastic_mesh_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ToRadio) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ToRadio) ProtoMessage() {} + +func (x *ToRadio) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[15] + 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 ToRadio.ProtoReflect.Descriptor instead. +func (*ToRadio) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{15} +} + +func (x *ToRadio) GetPayloadVariant() isToRadio_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *ToRadio) GetPacket() *MeshPacket { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_Packet); ok { + return x.Packet + } + } + return nil +} + +func (x *ToRadio) GetWantConfigId() uint32 { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_WantConfigId); ok { + return x.WantConfigId + } + } + return 0 +} + +func (x *ToRadio) GetDisconnect() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_Disconnect); ok { + return x.Disconnect + } + } + return false +} + +func (x *ToRadio) GetXmodemPacket() *XModem { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_XmodemPacket); ok { + return x.XmodemPacket + } + } + return nil +} + +func (x *ToRadio) GetMqttClientProxyMessage() *MqttClientProxyMessage { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_MqttClientProxyMessage); ok { + return x.MqttClientProxyMessage + } + } + return nil +} + +func (x *ToRadio) GetHeartbeat() *Heartbeat { + if x != nil { + if x, ok := x.PayloadVariant.(*ToRadio_Heartbeat); ok { + return x.Heartbeat + } + } + return nil +} + +type isToRadio_PayloadVariant interface { + isToRadio_PayloadVariant() +} + +type ToRadio_Packet struct { + // Send this packet on the mesh + Packet *MeshPacket `protobuf:"bytes,1,opt,name=packet,proto3,oneof"` +} + +type ToRadio_WantConfigId struct { + // Phone wants radio to send full node db to the phone, This is + // typically the first packet sent to the radio when the phone gets a + // bluetooth connection. The radio will respond by sending back a + // MyNodeInfo, a owner, a radio config and a series of + // FromRadio.node_infos, and config_complete + // the integer you write into this field will be reported back in the + // config_complete_id response this allows clients to never be confused by + // a stale old partially sent config. + WantConfigId uint32 `protobuf:"varint,3,opt,name=want_config_id,json=wantConfigId,proto3,oneof"` +} + +type ToRadio_Disconnect struct { + // Tell API server we are disconnecting now. + // This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. + // (Sending this message is optional for clients) + Disconnect bool `protobuf:"varint,4,opt,name=disconnect,proto3,oneof"` +} + +type ToRadio_XmodemPacket struct { + XmodemPacket *XModem `protobuf:"bytes,5,opt,name=xmodemPacket,proto3,oneof"` +} + +type ToRadio_MqttClientProxyMessage struct { + // MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) + MqttClientProxyMessage *MqttClientProxyMessage `protobuf:"bytes,6,opt,name=mqttClientProxyMessage,proto3,oneof"` +} + +type ToRadio_Heartbeat struct { + // Heartbeat message (used to keep the device connection awake on serial) + Heartbeat *Heartbeat `protobuf:"bytes,7,opt,name=heartbeat,proto3,oneof"` +} + +func (*ToRadio_Packet) isToRadio_PayloadVariant() {} + +func (*ToRadio_WantConfigId) isToRadio_PayloadVariant() {} + +func (*ToRadio_Disconnect) isToRadio_PayloadVariant() {} + +func (*ToRadio_XmodemPacket) isToRadio_PayloadVariant() {} + +func (*ToRadio_MqttClientProxyMessage) isToRadio_PayloadVariant() {} + +func (*ToRadio_Heartbeat) isToRadio_PayloadVariant() {} + +// Compressed message payload +type Compressed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // PortNum to determine the how to handle the compressed payload. + Portnum PortNum `protobuf:"varint,1,opt,name=portnum,proto3,enum=meshtastic.PortNum" json:"portnum,omitempty"` + // Compressed data. + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Compressed) Reset() { + *x = Compressed{} + mi := &file_meshtastic_mesh_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Compressed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Compressed) ProtoMessage() {} + +func (x *Compressed) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[16] + 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 Compressed.ProtoReflect.Descriptor instead. +func (*Compressed) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{16} +} + +func (x *Compressed) GetPortnum() PortNum { + if x != nil { + return x.Portnum + } + return PortNum_UNKNOWN_APP +} + +func (x *Compressed) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// Full info on edges for a single node +type NeighborInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The node ID of the node sending info on its neighbors + NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // Field to pass neighbor info for the next sending cycle + LastSentById uint32 `protobuf:"varint,2,opt,name=last_sent_by_id,json=lastSentById,proto3" json:"last_sent_by_id,omitempty"` + // Broadcast interval of the represented node (in seconds) + NodeBroadcastIntervalSecs uint32 `protobuf:"varint,3,opt,name=node_broadcast_interval_secs,json=nodeBroadcastIntervalSecs,proto3" json:"node_broadcast_interval_secs,omitempty"` + // The list of out edges from this node + Neighbors []*Neighbor `protobuf:"bytes,4,rep,name=neighbors,proto3" json:"neighbors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NeighborInfo) Reset() { + *x = NeighborInfo{} + mi := &file_meshtastic_mesh_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NeighborInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NeighborInfo) ProtoMessage() {} + +func (x *NeighborInfo) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[17] + 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 NeighborInfo.ProtoReflect.Descriptor instead. +func (*NeighborInfo) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{17} +} + +func (x *NeighborInfo) GetNodeId() uint32 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *NeighborInfo) GetLastSentById() uint32 { + if x != nil { + return x.LastSentById + } + return 0 +} + +func (x *NeighborInfo) GetNodeBroadcastIntervalSecs() uint32 { + if x != nil { + return x.NodeBroadcastIntervalSecs + } + return 0 +} + +func (x *NeighborInfo) GetNeighbors() []*Neighbor { + if x != nil { + return x.Neighbors + } + return nil +} + +// A single edge in the mesh +type Neighbor struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Node ID of neighbor + NodeId uint32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + // SNR of last heard message + Snr float32 `protobuf:"fixed32,2,opt,name=snr,proto3" json:"snr,omitempty"` + // Reception time (in secs since 1970) of last message that was last sent by this ID. + // Note: this is for local storage only and will not be sent out over the mesh. + LastRxTime uint32 `protobuf:"fixed32,3,opt,name=last_rx_time,json=lastRxTime,proto3" json:"last_rx_time,omitempty"` + // Broadcast interval of this neighbor (in seconds). + // Note: this is for local storage only and will not be sent out over the mesh. + NodeBroadcastIntervalSecs uint32 `protobuf:"varint,4,opt,name=node_broadcast_interval_secs,json=nodeBroadcastIntervalSecs,proto3" json:"node_broadcast_interval_secs,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Neighbor) Reset() { + *x = Neighbor{} + mi := &file_meshtastic_mesh_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Neighbor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Neighbor) ProtoMessage() {} + +func (x *Neighbor) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[18] + 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 Neighbor.ProtoReflect.Descriptor instead. +func (*Neighbor) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{18} +} + +func (x *Neighbor) GetNodeId() uint32 { + if x != nil { + return x.NodeId + } + return 0 +} + +func (x *Neighbor) GetSnr() float32 { + if x != nil { + return x.Snr + } + return 0 +} + +func (x *Neighbor) GetLastRxTime() uint32 { + if x != nil { + return x.LastRxTime + } + return 0 +} + +func (x *Neighbor) GetNodeBroadcastIntervalSecs() uint32 { + if x != nil { + return x.NodeBroadcastIntervalSecs + } + return 0 +} + +// Device metadata response +type DeviceMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Device firmware version string + FirmwareVersion string `protobuf:"bytes,1,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmware_version,omitempty"` + // Device state version + DeviceStateVersion uint32 `protobuf:"varint,2,opt,name=device_state_version,json=deviceStateVersion,proto3" json:"device_state_version,omitempty"` + // Indicates whether the device can shutdown CPU natively or via power management chip + CanShutdown bool `protobuf:"varint,3,opt,name=canShutdown,proto3" json:"canShutdown,omitempty"` + // Indicates that the device has native wifi capability + HasWifi bool `protobuf:"varint,4,opt,name=hasWifi,proto3" json:"hasWifi,omitempty"` + // Indicates that the device has native bluetooth capability + HasBluetooth bool `protobuf:"varint,5,opt,name=hasBluetooth,proto3" json:"hasBluetooth,omitempty"` + // Indicates that the device has an ethernet peripheral + HasEthernet bool `protobuf:"varint,6,opt,name=hasEthernet,proto3" json:"hasEthernet,omitempty"` + // Indicates that the device's role in the mesh + Role Config_DeviceConfig_Role `protobuf:"varint,7,opt,name=role,proto3,enum=meshtastic.Config_DeviceConfig_Role" json:"role,omitempty"` + // Indicates the device's current enabled position flags + PositionFlags uint32 `protobuf:"varint,8,opt,name=position_flags,json=positionFlags,proto3" json:"position_flags,omitempty"` + // Device hardware model + HwModel HardwareModel `protobuf:"varint,9,opt,name=hw_model,json=hwModel,proto3,enum=meshtastic.HardwareModel" json:"hw_model,omitempty"` + // Has Remote Hardware enabled + HasRemoteHardware bool `protobuf:"varint,10,opt,name=hasRemoteHardware,proto3" json:"hasRemoteHardware,omitempty"` + // Has PKC capabilities + HasPKC bool `protobuf:"varint,11,opt,name=hasPKC,proto3" json:"hasPKC,omitempty"` + // Bit field of boolean for excluded modules + // (bitwise OR of ExcludedModules) + ExcludedModules uint32 `protobuf:"varint,12,opt,name=excluded_modules,json=excludedModules,proto3" json:"excluded_modules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeviceMetadata) Reset() { + *x = DeviceMetadata{} + mi := &file_meshtastic_mesh_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeviceMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeviceMetadata) ProtoMessage() {} + +func (x *DeviceMetadata) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[19] + 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 DeviceMetadata.ProtoReflect.Descriptor instead. +func (*DeviceMetadata) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{19} +} + +func (x *DeviceMetadata) GetFirmwareVersion() string { + if x != nil { + return x.FirmwareVersion + } + return "" +} + +func (x *DeviceMetadata) GetDeviceStateVersion() uint32 { + if x != nil { + return x.DeviceStateVersion + } + return 0 +} + +func (x *DeviceMetadata) GetCanShutdown() bool { + if x != nil { + return x.CanShutdown + } + return false +} + +func (x *DeviceMetadata) GetHasWifi() bool { + if x != nil { + return x.HasWifi + } + return false +} + +func (x *DeviceMetadata) GetHasBluetooth() bool { + if x != nil { + return x.HasBluetooth + } + return false +} + +func (x *DeviceMetadata) GetHasEthernet() bool { + if x != nil { + return x.HasEthernet + } + return false +} + +func (x *DeviceMetadata) GetRole() Config_DeviceConfig_Role { + if x != nil { + return x.Role + } + return Config_DeviceConfig_CLIENT +} + +func (x *DeviceMetadata) GetPositionFlags() uint32 { + if x != nil { + return x.PositionFlags + } + return 0 +} + +func (x *DeviceMetadata) GetHwModel() HardwareModel { + if x != nil { + return x.HwModel + } + return HardwareModel_UNSET +} + +func (x *DeviceMetadata) GetHasRemoteHardware() bool { + if x != nil { + return x.HasRemoteHardware + } + return false +} + +func (x *DeviceMetadata) GetHasPKC() bool { + if x != nil { + return x.HasPKC + } + return false +} + +func (x *DeviceMetadata) GetExcludedModules() uint32 { + if x != nil { + return x.ExcludedModules + } + return 0 +} + +// A heartbeat message is sent to the node from the client to keep the connection alive. +// This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. +type Heartbeat struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Heartbeat) Reset() { + *x = Heartbeat{} + mi := &file_meshtastic_mesh_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Heartbeat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Heartbeat) ProtoMessage() {} + +func (x *Heartbeat) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[20] + 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 Heartbeat.ProtoReflect.Descriptor instead. +func (*Heartbeat) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{20} +} + +// RemoteHardwarePins associated with a node +type NodeRemoteHardwarePin struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The node_num exposing the available gpio pin + NodeNum uint32 `protobuf:"varint,1,opt,name=node_num,json=nodeNum,proto3" json:"node_num,omitempty"` + // The the available gpio pin for usage with RemoteHardware module + Pin *RemoteHardwarePin `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NodeRemoteHardwarePin) Reset() { + *x = NodeRemoteHardwarePin{} + mi := &file_meshtastic_mesh_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NodeRemoteHardwarePin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NodeRemoteHardwarePin) ProtoMessage() {} + +func (x *NodeRemoteHardwarePin) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[21] + 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 NodeRemoteHardwarePin.ProtoReflect.Descriptor instead. +func (*NodeRemoteHardwarePin) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{21} +} + +func (x *NodeRemoteHardwarePin) GetNodeNum() uint32 { + if x != nil { + return x.NodeNum + } + return 0 +} + +func (x *NodeRemoteHardwarePin) GetPin() *RemoteHardwarePin { + if x != nil { + return x.Pin + } + return nil +} + +type ChunkedPayload struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ID of the entire payload + PayloadId uint32 `protobuf:"varint,1,opt,name=payload_id,json=payloadId,proto3" json:"payload_id,omitempty"` + // The total number of chunks in the payload + ChunkCount uint32 `protobuf:"varint,2,opt,name=chunk_count,json=chunkCount,proto3" json:"chunk_count,omitempty"` + // The current chunk index in the total + ChunkIndex uint32 `protobuf:"varint,3,opt,name=chunk_index,json=chunkIndex,proto3" json:"chunk_index,omitempty"` + // The binary data of the current chunk + PayloadChunk []byte `protobuf:"bytes,4,opt,name=payload_chunk,json=payloadChunk,proto3" json:"payload_chunk,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChunkedPayload) Reset() { + *x = ChunkedPayload{} + mi := &file_meshtastic_mesh_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChunkedPayload) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunkedPayload) ProtoMessage() {} + +func (x *ChunkedPayload) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[22] + 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 ChunkedPayload.ProtoReflect.Descriptor instead. +func (*ChunkedPayload) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{22} +} + +func (x *ChunkedPayload) GetPayloadId() uint32 { + if x != nil { + return x.PayloadId + } + return 0 +} + +func (x *ChunkedPayload) GetChunkCount() uint32 { + if x != nil { + return x.ChunkCount + } + return 0 +} + +func (x *ChunkedPayload) GetChunkIndex() uint32 { + if x != nil { + return x.ChunkIndex + } + return 0 +} + +func (x *ChunkedPayload) GetPayloadChunk() []byte { + if x != nil { + return x.PayloadChunk + } + return nil +} + +// Wrapper message for broken repeated oneof support +type ResendChunks struct { + state protoimpl.MessageState `protogen:"open.v1"` + Chunks []uint32 `protobuf:"varint,1,rep,packed,name=chunks,proto3" json:"chunks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ResendChunks) Reset() { + *x = ResendChunks{} + mi := &file_meshtastic_mesh_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResendChunks) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResendChunks) ProtoMessage() {} + +func (x *ResendChunks) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[23] + 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 ResendChunks.ProtoReflect.Descriptor instead. +func (*ResendChunks) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{23} +} + +func (x *ResendChunks) GetChunks() []uint32 { + if x != nil { + return x.Chunks + } + return nil +} + +// Responses to a ChunkedPayload request +type ChunkedPayloadResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ID of the entire payload + PayloadId uint32 `protobuf:"varint,1,opt,name=payload_id,json=payloadId,proto3" json:"payload_id,omitempty"` + // Types that are valid to be assigned to PayloadVariant: + // + // *ChunkedPayloadResponse_RequestTransfer + // *ChunkedPayloadResponse_AcceptTransfer + // *ChunkedPayloadResponse_ResendChunks + PayloadVariant isChunkedPayloadResponse_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChunkedPayloadResponse) Reset() { + *x = ChunkedPayloadResponse{} + mi := &file_meshtastic_mesh_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChunkedPayloadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChunkedPayloadResponse) ProtoMessage() {} + +func (x *ChunkedPayloadResponse) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_mesh_proto_msgTypes[24] + 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 ChunkedPayloadResponse.ProtoReflect.Descriptor instead. +func (*ChunkedPayloadResponse) Descriptor() ([]byte, []int) { + return file_meshtastic_mesh_proto_rawDescGZIP(), []int{24} +} + +func (x *ChunkedPayloadResponse) GetPayloadId() uint32 { + if x != nil { + return x.PayloadId + } + return 0 +} + +func (x *ChunkedPayloadResponse) GetPayloadVariant() isChunkedPayloadResponse_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *ChunkedPayloadResponse) GetRequestTransfer() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*ChunkedPayloadResponse_RequestTransfer); ok { + return x.RequestTransfer + } + } + return false +} + +func (x *ChunkedPayloadResponse) GetAcceptTransfer() bool { + if x != nil { + if x, ok := x.PayloadVariant.(*ChunkedPayloadResponse_AcceptTransfer); ok { + return x.AcceptTransfer + } + } + return false +} + +func (x *ChunkedPayloadResponse) GetResendChunks() *ResendChunks { + if x != nil { + if x, ok := x.PayloadVariant.(*ChunkedPayloadResponse_ResendChunks); ok { + return x.ResendChunks + } + } + return nil +} + +type isChunkedPayloadResponse_PayloadVariant interface { + isChunkedPayloadResponse_PayloadVariant() +} + +type ChunkedPayloadResponse_RequestTransfer struct { + // Request to transfer chunked payload + RequestTransfer bool `protobuf:"varint,2,opt,name=request_transfer,json=requestTransfer,proto3,oneof"` +} + +type ChunkedPayloadResponse_AcceptTransfer struct { + // Accept the transfer chunked payload + AcceptTransfer bool `protobuf:"varint,3,opt,name=accept_transfer,json=acceptTransfer,proto3,oneof"` +} + +type ChunkedPayloadResponse_ResendChunks struct { + // Request missing indexes in the chunked payload + ResendChunks *ResendChunks `protobuf:"bytes,4,opt,name=resend_chunks,json=resendChunks,proto3,oneof"` +} + +func (*ChunkedPayloadResponse_RequestTransfer) isChunkedPayloadResponse_PayloadVariant() {} + +func (*ChunkedPayloadResponse_AcceptTransfer) isChunkedPayloadResponse_PayloadVariant() {} + +func (*ChunkedPayloadResponse_ResendChunks) isChunkedPayloadResponse_PayloadVariant() {} + +var File_meshtastic_mesh_proto protoreflect.FileDescriptor + +const file_meshtastic_mesh_proto_rawDesc = "" + + "\n" + + "\x15meshtastic/mesh.proto\x12\n" + + "meshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\x1a\x1emeshtastic/module_config.proto\x1a\x19meshtastic/portnums.proto\x1a\x1ameshtastic/telemetry.proto\x1a\x17meshtastic/xmodem.proto\x1a\x1ameshtastic/device_ui.proto\"\xa2\t\n" + + "\bPosition\x12\"\n" + + "\n" + + "latitude_i\x18\x01 \x01(\x0fH\x00R\tlatitudeI\x88\x01\x01\x12$\n" + + "\vlongitude_i\x18\x02 \x01(\x0fH\x01R\n" + + "longitudeI\x88\x01\x01\x12\x1f\n" + + "\baltitude\x18\x03 \x01(\x05H\x02R\baltitude\x88\x01\x01\x12\x12\n" + + "\x04time\x18\x04 \x01(\aR\x04time\x12G\n" + + "\x0flocation_source\x18\x05 \x01(\x0e2\x1e.meshtastic.Position.LocSourceR\x0elocationSource\x12G\n" + + "\x0faltitude_source\x18\x06 \x01(\x0e2\x1e.meshtastic.Position.AltSourceR\x0ealtitudeSource\x12\x1c\n" + + "\ttimestamp\x18\a \x01(\aR\ttimestamp\x126\n" + + "\x17timestamp_millis_adjust\x18\b \x01(\x05R\x15timestampMillisAdjust\x12&\n" + + "\faltitude_hae\x18\t \x01(\x11H\x03R\valtitudeHae\x88\x01\x01\x12C\n" + + "\x1baltitude_geoidal_separation\x18\n" + + " \x01(\x11H\x04R\x19altitudeGeoidalSeparation\x88\x01\x01\x12\x12\n" + + "\x04PDOP\x18\v \x01(\rR\x04PDOP\x12\x12\n" + + "\x04HDOP\x18\f \x01(\rR\x04HDOP\x12\x12\n" + + "\x04VDOP\x18\r \x01(\rR\x04VDOP\x12!\n" + + "\fgps_accuracy\x18\x0e \x01(\rR\vgpsAccuracy\x12&\n" + + "\fground_speed\x18\x0f \x01(\rH\x05R\vgroundSpeed\x88\x01\x01\x12&\n" + + "\fground_track\x18\x10 \x01(\rH\x06R\vgroundTrack\x88\x01\x01\x12\x1f\n" + + "\vfix_quality\x18\x11 \x01(\rR\n" + + "fixQuality\x12\x19\n" + + "\bfix_type\x18\x12 \x01(\rR\afixType\x12 \n" + + "\fsats_in_view\x18\x13 \x01(\rR\n" + + "satsInView\x12\x1b\n" + + "\tsensor_id\x18\x14 \x01(\rR\bsensorId\x12\x1f\n" + + "\vnext_update\x18\x15 \x01(\rR\n" + + "nextUpdate\x12\x1d\n" + + "\n" + + "seq_number\x18\x16 \x01(\rR\tseqNumber\x12%\n" + + "\x0eprecision_bits\x18\x17 \x01(\rR\rprecisionBits\"N\n" + + "\tLocSource\x12\r\n" + + "\tLOC_UNSET\x10\x00\x12\x0e\n" + + "\n" + + "LOC_MANUAL\x10\x01\x12\x10\n" + + "\fLOC_INTERNAL\x10\x02\x12\x10\n" + + "\fLOC_EXTERNAL\x10\x03\"b\n" + + "\tAltSource\x12\r\n" + + "\tALT_UNSET\x10\x00\x12\x0e\n" + + "\n" + + "ALT_MANUAL\x10\x01\x12\x10\n" + + "\fALT_INTERNAL\x10\x02\x12\x10\n" + + "\fALT_EXTERNAL\x10\x03\x12\x12\n" + + "\x0eALT_BAROMETRIC\x10\x04B\r\n" + + "\v_latitude_iB\x0e\n" + + "\f_longitude_iB\v\n" + + "\t_altitudeB\x0f\n" + + "\r_altitude_haeB\x1e\n" + + "\x1c_altitude_geoidal_separationB\x0f\n" + + "\r_ground_speedB\x0f\n" + + "\r_ground_track\"\xa0\x02\n" + + "\x04User\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" + + "\tlong_name\x18\x02 \x01(\tR\blongName\x12\x1d\n" + + "\n" + + "short_name\x18\x03 \x01(\tR\tshortName\x12\x1c\n" + + "\amacaddr\x18\x04 \x01(\fB\x02\x18\x01R\amacaddr\x124\n" + + "\bhw_model\x18\x05 \x01(\x0e2\x19.meshtastic.HardwareModelR\ahwModel\x12\x1f\n" + + "\vis_licensed\x18\x06 \x01(\bR\n" + + "isLicensed\x128\n" + + "\x04role\x18\a \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x12\x1d\n" + + "\n" + + "public_key\x18\b \x01(\fR\tpublicKey\"\x81\x01\n" + + "\x0eRouteDiscovery\x12\x14\n" + + "\x05route\x18\x01 \x03(\aR\x05route\x12\x1f\n" + + "\vsnr_towards\x18\x02 \x03(\x05R\n" + + "snrTowards\x12\x1d\n" + + "\n" + + "route_back\x18\x03 \x03(\aR\trouteBack\x12\x19\n" + + "\bsnr_back\x18\x04 \x03(\x05R\asnrBack\"\x89\x04\n" + + "\aRouting\x12A\n" + + "\rroute_request\x18\x01 \x01(\v2\x1a.meshtastic.RouteDiscoveryH\x00R\frouteRequest\x12=\n" + + "\vroute_reply\x18\x02 \x01(\v2\x1a.meshtastic.RouteDiscoveryH\x00R\n" + + "routeReply\x12>\n" + + "\ferror_reason\x18\x03 \x01(\x0e2\x19.meshtastic.Routing.ErrorH\x00R\verrorReason\"\xb0\x02\n" + + "\x05Error\x12\b\n" + + "\x04NONE\x10\x00\x12\f\n" + + "\bNO_ROUTE\x10\x01\x12\v\n" + + "\aGOT_NAK\x10\x02\x12\v\n" + + "\aTIMEOUT\x10\x03\x12\x10\n" + + "\fNO_INTERFACE\x10\x04\x12\x12\n" + + "\x0eMAX_RETRANSMIT\x10\x05\x12\x0e\n" + + "\n" + + "NO_CHANNEL\x10\x06\x12\r\n" + + "\tTOO_LARGE\x10\a\x12\x0f\n" + + "\vNO_RESPONSE\x10\b\x12\x14\n" + + "\x10DUTY_CYCLE_LIMIT\x10\t\x12\x0f\n" + + "\vBAD_REQUEST\x10 \x12\x12\n" + + "\x0eNOT_AUTHORIZED\x10!\x12\x0e\n" + + "\n" + + "PKI_FAILED\x10\"\x12\x16\n" + + "\x12PKI_UNKNOWN_PUBKEY\x10#\x12\x19\n" + + "\x15ADMIN_BAD_SESSION_KEY\x10$\x12!\n" + + "\x1dADMIN_PUBLIC_KEY_UNAUTHORIZED\x10%B\t\n" + + "\avariant\"\x9e\x02\n" + + "\x04Data\x12-\n" + + "\aportnum\x18\x01 \x01(\x0e2\x13.meshtastic.PortNumR\aportnum\x12\x18\n" + + "\apayload\x18\x02 \x01(\fR\apayload\x12#\n" + + "\rwant_response\x18\x03 \x01(\bR\fwantResponse\x12\x12\n" + + "\x04dest\x18\x04 \x01(\aR\x04dest\x12\x16\n" + + "\x06source\x18\x05 \x01(\aR\x06source\x12\x1d\n" + + "\n" + + "request_id\x18\x06 \x01(\aR\trequestId\x12\x19\n" + + "\breply_id\x18\a \x01(\aR\areplyId\x12\x14\n" + + "\x05emoji\x18\b \x01(\aR\x05emoji\x12\x1f\n" + + "\bbitfield\x18\t \x01(\rH\x00R\bbitfield\x88\x01\x01B\v\n" + + "\t_bitfield\"\x82\x02\n" + + "\bWaypoint\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x12\"\n" + + "\n" + + "latitude_i\x18\x02 \x01(\x0fH\x00R\tlatitudeI\x88\x01\x01\x12$\n" + + "\vlongitude_i\x18\x03 \x01(\x0fH\x01R\n" + + "longitudeI\x88\x01\x01\x12\x16\n" + + "\x06expire\x18\x04 \x01(\rR\x06expire\x12\x1b\n" + + "\tlocked_to\x18\x05 \x01(\rR\blockedTo\x12\x12\n" + + "\x04name\x18\x06 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\a \x01(\tR\vdescription\x12\x12\n" + + "\x04icon\x18\b \x01(\aR\x04iconB\r\n" + + "\v_latitude_iB\x0e\n" + + "\f_longitude_i\"\x89\x01\n" + + "\x16MqttClientProxyMessage\x12\x14\n" + + "\x05topic\x18\x01 \x01(\tR\x05topic\x12\x14\n" + + "\x04data\x18\x02 \x01(\fH\x00R\x04data\x12\x14\n" + + "\x04text\x18\x03 \x01(\tH\x00R\x04text\x12\x1a\n" + + "\bretained\x18\x04 \x01(\bR\bretainedB\x11\n" + + "\x0fpayload_variant\"\xcc\x06\n" + + "\n" + + "MeshPacket\x12\x12\n" + + "\x04from\x18\x01 \x01(\aR\x04from\x12\x0e\n" + + "\x02to\x18\x02 \x01(\aR\x02to\x12\x18\n" + + "\achannel\x18\x03 \x01(\rR\achannel\x12,\n" + + "\adecoded\x18\x04 \x01(\v2\x10.meshtastic.DataH\x00R\adecoded\x12\x1e\n" + + "\tencrypted\x18\x05 \x01(\fH\x00R\tencrypted\x12\x0e\n" + + "\x02id\x18\x06 \x01(\aR\x02id\x12\x17\n" + + "\arx_time\x18\a \x01(\aR\x06rxTime\x12\x15\n" + + "\x06rx_snr\x18\b \x01(\x02R\x05rxSnr\x12\x1b\n" + + "\thop_limit\x18\t \x01(\rR\bhopLimit\x12\x19\n" + + "\bwant_ack\x18\n" + + " \x01(\bR\awantAck\x12;\n" + + "\bpriority\x18\v \x01(\x0e2\x1f.meshtastic.MeshPacket.PriorityR\bpriority\x12\x17\n" + + "\arx_rssi\x18\f \x01(\x05R\x06rxRssi\x12<\n" + + "\adelayed\x18\r \x01(\x0e2\x1e.meshtastic.MeshPacket.DelayedB\x02\x18\x01R\adelayed\x12\x19\n" + + "\bvia_mqtt\x18\x0e \x01(\bR\aviaMqtt\x12\x1b\n" + + "\thop_start\x18\x0f \x01(\rR\bhopStart\x12\x1d\n" + + "\n" + + "public_key\x18\x10 \x01(\fR\tpublicKey\x12#\n" + + "\rpki_encrypted\x18\x11 \x01(\bR\fpkiEncrypted\x12\x19\n" + + "\bnext_hop\x18\x12 \x01(\rR\anextHop\x12\x1d\n" + + "\n" + + "relay_node\x18\x13 \x01(\rR\trelayNode\x12\x19\n" + + "\btx_after\x18\x14 \x01(\rR\atxAfter\"~\n" + + "\bPriority\x12\t\n" + + "\x05UNSET\x10\x00\x12\a\n" + + "\x03MIN\x10\x01\x12\x0e\n" + + "\n" + + "BACKGROUND\x10\n" + + "\x12\v\n" + + "\aDEFAULT\x10@\x12\f\n" + + "\bRELIABLE\x10F\x12\f\n" + + "\bRESPONSE\x10P\x12\b\n" + + "\x04HIGH\x10d\x12\t\n" + + "\x05ALERT\x10n\x12\a\n" + + "\x03ACK\x10x\x12\a\n" + + "\x03MAX\x10\x7f\"B\n" + + "\aDelayed\x12\f\n" + + "\bNO_DELAY\x10\x00\x12\x15\n" + + "\x11DELAYED_BROADCAST\x10\x01\x12\x12\n" + + "\x0eDELAYED_DIRECT\x10\x02B\x11\n" + + "\x0fpayload_variant\"\x8c\x03\n" + + "\bNodeInfo\x12\x10\n" + + "\x03num\x18\x01 \x01(\rR\x03num\x12$\n" + + "\x04user\x18\x02 \x01(\v2\x10.meshtastic.UserR\x04user\x120\n" + + "\bposition\x18\x03 \x01(\v2\x14.meshtastic.PositionR\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\tisIgnoredB\f\n" + + "\n" + + "_hops_away\"\xad\x01\n" + + "\n" + + "MyNodeInfo\x12\x1e\n" + + "\vmy_node_num\x18\x01 \x01(\rR\tmyNodeNum\x12!\n" + + "\freboot_count\x18\b \x01(\rR\vrebootCount\x12&\n" + + "\x0fmin_app_version\x18\v \x01(\rR\rminAppVersion\x12\x1b\n" + + "\tdevice_id\x18\f \x01(\fR\bdeviceId\x12\x17\n" + + "\apio_env\x18\r \x01(\tR\x06pioEnv\"\xde\x01\n" + + "\tLogRecord\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\x12\x12\n" + + "\x04time\x18\x02 \x01(\aR\x04time\x12\x16\n" + + "\x06source\x18\x03 \x01(\tR\x06source\x121\n" + + "\x05level\x18\x04 \x01(\x0e2\x1b.meshtastic.LogRecord.LevelR\x05level\"X\n" + + "\x05Level\x12\t\n" + + "\x05UNSET\x10\x00\x12\f\n" + + "\bCRITICAL\x102\x12\t\n" + + "\x05ERROR\x10(\x12\v\n" + + "\aWARNING\x10\x1e\x12\b\n" + + "\x04INFO\x10\x14\x12\t\n" + + "\x05DEBUG\x10\n" + + "\x12\t\n" + + "\x05TRACE\x10\x05\"q\n" + + "\vQueueStatus\x12\x10\n" + + "\x03res\x18\x01 \x01(\x05R\x03res\x12\x12\n" + + "\x04free\x18\x02 \x01(\rR\x04free\x12\x16\n" + + "\x06maxlen\x18\x03 \x01(\rR\x06maxlen\x12$\n" + + "\x0emesh_packet_id\x18\x04 \x01(\rR\fmeshPacketId\"\xc8\a\n" + + "\tFromRadio\x12\x0e\n" + + "\x02id\x18\x01 \x01(\rR\x02id\x120\n" + + "\x06packet\x18\x02 \x01(\v2\x16.meshtastic.MeshPacketH\x00R\x06packet\x121\n" + + "\amy_info\x18\x03 \x01(\v2\x16.meshtastic.MyNodeInfoH\x00R\x06myInfo\x123\n" + + "\tnode_info\x18\x04 \x01(\v2\x14.meshtastic.NodeInfoH\x00R\bnodeInfo\x12,\n" + + "\x06config\x18\x05 \x01(\v2\x12.meshtastic.ConfigH\x00R\x06config\x126\n" + + "\n" + + "log_record\x18\x06 \x01(\v2\x15.meshtastic.LogRecordH\x00R\tlogRecord\x12.\n" + + "\x12config_complete_id\x18\a \x01(\rH\x00R\x10configCompleteId\x12\x1c\n" + + "\brebooted\x18\b \x01(\bH\x00R\brebooted\x12>\n" + + "\fmoduleConfig\x18\t \x01(\v2\x18.meshtastic.ModuleConfigH\x00R\fmoduleConfig\x12/\n" + + "\achannel\x18\n" + + " \x01(\v2\x13.meshtastic.ChannelH\x00R\achannel\x12;\n" + + "\vqueueStatus\x18\v \x01(\v2\x17.meshtastic.QueueStatusH\x00R\vqueueStatus\x128\n" + + "\fxmodemPacket\x18\f \x01(\v2\x12.meshtastic.XModemH\x00R\fxmodemPacket\x128\n" + + "\bmetadata\x18\r \x01(\v2\x1a.meshtastic.DeviceMetadataH\x00R\bmetadata\x12\\\n" + + "\x16mqttClientProxyMessage\x18\x0e \x01(\v2\".meshtastic.MqttClientProxyMessageH\x00R\x16mqttClientProxyMessage\x122\n" + + "\bfileInfo\x18\x0f \x01(\v2\x14.meshtastic.FileInfoH\x00R\bfileInfo\x12P\n" + + "\x12clientNotification\x18\x10 \x01(\v2\x1e.meshtastic.ClientNotificationH\x00R\x12clientNotification\x12D\n" + + "\x0edeviceuiConfig\x18\x11 \x01(\v2\x1a.meshtastic.DeviceUIConfigH\x00R\x0edeviceuiConfigB\x11\n" + + "\x0fpayload_variant\"\xa2\x01\n" + + "\x12ClientNotification\x12\x1e\n" + + "\breply_id\x18\x01 \x01(\rH\x00R\areplyId\x88\x01\x01\x12\x12\n" + + "\x04time\x18\x02 \x01(\aR\x04time\x121\n" + + "\x05level\x18\x03 \x01(\x0e2\x1b.meshtastic.LogRecord.LevelR\x05level\x12\x18\n" + + "\amessage\x18\x04 \x01(\tR\amessageB\v\n" + + "\t_reply_id\"F\n" + + "\bFileInfo\x12\x1b\n" + + "\tfile_name\x18\x01 \x01(\tR\bfileName\x12\x1d\n" + + "\n" + + "size_bytes\x18\x02 \x01(\rR\tsizeBytes\"\xe7\x02\n" + + "\aToRadio\x120\n" + + "\x06packet\x18\x01 \x01(\v2\x16.meshtastic.MeshPacketH\x00R\x06packet\x12&\n" + + "\x0ewant_config_id\x18\x03 \x01(\rH\x00R\fwantConfigId\x12 \n" + + "\n" + + "disconnect\x18\x04 \x01(\bH\x00R\n" + + "disconnect\x128\n" + + "\fxmodemPacket\x18\x05 \x01(\v2\x12.meshtastic.XModemH\x00R\fxmodemPacket\x12\\\n" + + "\x16mqttClientProxyMessage\x18\x06 \x01(\v2\".meshtastic.MqttClientProxyMessageH\x00R\x16mqttClientProxyMessage\x125\n" + + "\theartbeat\x18\a \x01(\v2\x15.meshtastic.HeartbeatH\x00R\theartbeatB\x11\n" + + "\x0fpayload_variant\"O\n" + + "\n" + + "Compressed\x12-\n" + + "\aportnum\x18\x01 \x01(\x0e2\x13.meshtastic.PortNumR\aportnum\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\"\xc3\x01\n" + + "\fNeighborInfo\x12\x17\n" + + "\anode_id\x18\x01 \x01(\rR\x06nodeId\x12%\n" + + "\x0flast_sent_by_id\x18\x02 \x01(\rR\flastSentById\x12?\n" + + "\x1cnode_broadcast_interval_secs\x18\x03 \x01(\rR\x19nodeBroadcastIntervalSecs\x122\n" + + "\tneighbors\x18\x04 \x03(\v2\x14.meshtastic.NeighborR\tneighbors\"\x98\x01\n" + + "\bNeighbor\x12\x17\n" + + "\anode_id\x18\x01 \x01(\rR\x06nodeId\x12\x10\n" + + "\x03snr\x18\x02 \x01(\x02R\x03snr\x12 \n" + + "\flast_rx_time\x18\x03 \x01(\aR\n" + + "lastRxTime\x12?\n" + + "\x1cnode_broadcast_interval_secs\x18\x04 \x01(\rR\x19nodeBroadcastIntervalSecs\"\xf7\x03\n" + + "\x0eDeviceMetadata\x12)\n" + + "\x10firmware_version\x18\x01 \x01(\tR\x0ffirmwareVersion\x120\n" + + "\x14device_state_version\x18\x02 \x01(\rR\x12deviceStateVersion\x12 \n" + + "\vcanShutdown\x18\x03 \x01(\bR\vcanShutdown\x12\x18\n" + + "\ahasWifi\x18\x04 \x01(\bR\ahasWifi\x12\"\n" + + "\fhasBluetooth\x18\x05 \x01(\bR\fhasBluetooth\x12 \n" + + "\vhasEthernet\x18\x06 \x01(\bR\vhasEthernet\x128\n" + + "\x04role\x18\a \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x12%\n" + + "\x0eposition_flags\x18\b \x01(\rR\rpositionFlags\x124\n" + + "\bhw_model\x18\t \x01(\x0e2\x19.meshtastic.HardwareModelR\ahwModel\x12,\n" + + "\x11hasRemoteHardware\x18\n" + + " \x01(\bR\x11hasRemoteHardware\x12\x16\n" + + "\x06hasPKC\x18\v \x01(\bR\x06hasPKC\x12)\n" + + "\x10excluded_modules\x18\f \x01(\rR\x0fexcludedModules\"\v\n" + + "\tHeartbeat\"c\n" + + "\x15NodeRemoteHardwarePin\x12\x19\n" + + "\bnode_num\x18\x01 \x01(\rR\anodeNum\x12/\n" + + "\x03pin\x18\x02 \x01(\v2\x1d.meshtastic.RemoteHardwarePinR\x03pin\"\x96\x01\n" + + "\x0eChunkedPayload\x12\x1d\n" + + "\n" + + "payload_id\x18\x01 \x01(\rR\tpayloadId\x12\x1f\n" + + "\vchunk_count\x18\x02 \x01(\rR\n" + + "chunkCount\x12\x1f\n" + + "\vchunk_index\x18\x03 \x01(\rR\n" + + "chunkIndex\x12#\n" + + "\rpayload_chunk\x18\x04 \x01(\fR\fpayloadChunk\"'\n" + + "\rresend_chunks\x12\x16\n" + + "\x06chunks\x18\x01 \x03(\rR\x06chunks\"\xe4\x01\n" + + "\x16ChunkedPayloadResponse\x12\x1d\n" + + "\n" + + "payload_id\x18\x01 \x01(\rR\tpayloadId\x12+\n" + + "\x10request_transfer\x18\x02 \x01(\bH\x00R\x0frequestTransfer\x12)\n" + + "\x0faccept_transfer\x18\x03 \x01(\bH\x00R\x0eacceptTransfer\x12@\n" + + "\rresend_chunks\x18\x04 \x01(\v2\x19.meshtastic.resend_chunksH\x00R\fresendChunksB\x11\n" + + "\x0fpayload_variant*\xda\x0e\n" + + "\rHardwareModel\x12\t\n" + + "\x05UNSET\x10\x00\x12\f\n" + + "\bTLORA_V2\x10\x01\x12\f\n" + + "\bTLORA_V1\x10\x02\x12\x12\n" + + "\x0eTLORA_V2_1_1P6\x10\x03\x12\t\n" + + "\x05TBEAM\x10\x04\x12\x0f\n" + + "\vHELTEC_V2_0\x10\x05\x12\x0e\n" + + "\n" + + "TBEAM_V0P7\x10\x06\x12\n" + + "\n" + + "\x06T_ECHO\x10\a\x12\x10\n" + + "\fTLORA_V1_1P3\x10\b\x12\v\n" + + "\aRAK4631\x10\t\x12\x0f\n" + + "\vHELTEC_V2_1\x10\n" + + "\x12\r\n" + + "\tHELTEC_V1\x10\v\x12\x18\n" + + "\x14LILYGO_TBEAM_S3_CORE\x10\f\x12\f\n" + + "\bRAK11200\x10\r\x12\v\n" + + "\aNANO_G1\x10\x0e\x12\x12\n" + + "\x0eTLORA_V2_1_1P8\x10\x0f\x12\x0f\n" + + "\vTLORA_T3_S3\x10\x10\x12\x14\n" + + "\x10NANO_G1_EXPLORER\x10\x11\x12\x11\n" + + "\rNANO_G2_ULTRA\x10\x12\x12\r\n" + + "\tLORA_TYPE\x10\x13\x12\v\n" + + "\aWIPHONE\x10\x14\x12\x0e\n" + + "\n" + + "WIO_WM1110\x10\x15\x12\v\n" + + "\aRAK2560\x10\x16\x12\x13\n" + + "\x0fHELTEC_HRU_3601\x10\x17\x12\x1a\n" + + "\x16HELTEC_WIRELESS_BRIDGE\x10\x18\x12\x0e\n" + + "\n" + + "STATION_G1\x10\x19\x12\f\n" + + "\bRAK11310\x10\x1a\x12\x14\n" + + "\x10SENSELORA_RP2040\x10\x1b\x12\x10\n" + + "\fSENSELORA_S3\x10\x1c\x12\r\n" + + "\tCANARYONE\x10\x1d\x12\x0f\n" + + "\vRP2040_LORA\x10\x1e\x12\x0e\n" + + "\n" + + "STATION_G2\x10\x1f\x12\x11\n" + + "\rLORA_RELAY_V1\x10 \x12\x0e\n" + + "\n" + + "NRF52840DK\x10!\x12\a\n" + + "\x03PPR\x10\"\x12\x0f\n" + + "\vGENIEBLOCKS\x10#\x12\x11\n" + + "\rNRF52_UNKNOWN\x10$\x12\r\n" + + "\tPORTDUINO\x10%\x12\x0f\n" + + "\vANDROID_SIM\x10&\x12\n" + + "\n" + + "\x06DIY_V1\x10'\x12\x15\n" + + "\x11NRF52840_PCA10059\x10(\x12\n" + + "\n" + + "\x06DR_DEV\x10)\x12\v\n" + + "\aM5STACK\x10*\x12\r\n" + + "\tHELTEC_V3\x10+\x12\x11\n" + + "\rHELTEC_WSL_V3\x10,\x12\x13\n" + + "\x0fBETAFPV_2400_TX\x10-\x12\x17\n" + + "\x13BETAFPV_900_NANO_TX\x10.\x12\f\n" + + "\bRPI_PICO\x10/\x12\x1b\n" + + "\x17HELTEC_WIRELESS_TRACKER\x100\x12\x19\n" + + "\x15HELTEC_WIRELESS_PAPER\x101\x12\n" + + "\n" + + "\x06T_DECK\x102\x12\x0e\n" + + "\n" + + "T_WATCH_S3\x103\x12\x11\n" + + "\rPICOMPUTER_S3\x104\x12\x0f\n" + + "\vHELTEC_HT62\x105\x12\x12\n" + + "\x0eEBYTE_ESP32_S3\x106\x12\x11\n" + + "\rESP32_S3_PICO\x107\x12\r\n" + + "\tCHATTER_2\x108\x12\x1e\n" + + "\x1aHELTEC_WIRELESS_PAPER_V1_0\x109\x12 \n" + + "\x1cHELTEC_WIRELESS_TRACKER_V1_0\x10:\x12\v\n" + + "\aUNPHONE\x10;\x12\f\n" + + "\bTD_LORAC\x10<\x12\x13\n" + + "\x0fCDEBYTE_EORA_S3\x10=\x12\x0f\n" + + "\vTWC_MESH_V4\x10>\x12\x16\n" + + "\x12NRF52_PROMICRO_DIY\x10?\x12\x1f\n" + + "\x1bRADIOMASTER_900_BANDIT_NANO\x10@\x12\x1c\n" + + "\x18HELTEC_CAPSULE_SENSOR_V3\x10A\x12\x1d\n" + + "\x19HELTEC_VISION_MASTER_T190\x10B\x12\x1d\n" + + "\x19HELTEC_VISION_MASTER_E213\x10C\x12\x1d\n" + + "\x19HELTEC_VISION_MASTER_E290\x10D\x12\x19\n" + + "\x15HELTEC_MESH_NODE_T114\x10E\x12\x16\n" + + "\x12SENSECAP_INDICATOR\x10F\x12\x13\n" + + "\x0fTRACKER_T1000_E\x10G\x12\v\n" + + "\aRAK3172\x10H\x12\n" + + "\n" + + "\x06WIO_E5\x10I\x12\x1a\n" + + "\x16RADIOMASTER_900_BANDIT\x10J\x12\x13\n" + + "\x0fME25LS01_4Y10TD\x10K\x12\x18\n" + + "\x14RP2040_FEATHER_RFM95\x10L\x12\x15\n" + + "\x11M5STACK_COREBASIC\x10M\x12\x11\n" + + "\rM5STACK_CORE2\x10N\x12\r\n" + + "\tRPI_PICO2\x10O\x12\x12\n" + + "\x0eM5STACK_CORES3\x10P\x12\x11\n" + + "\rSEEED_XIAO_S3\x10Q\x12\v\n" + + "\aMS24SF1\x10R\x12\f\n" + + "\bTLORA_C6\x10S\x12\x0f\n" + + "\vWISMESH_TAP\x10T\x12\r\n" + + "\tROUTASTIC\x10U\x12\f\n" + + "\bMESH_TAB\x10V\x12\f\n" + + "\bMESHLINK\x10W\x12\x12\n" + + "\x0eXIAO_NRF52_KIT\x10X\x12\x10\n" + + "\fTHINKNODE_M1\x10Y\x12\x10\n" + + "\fTHINKNODE_M2\x10Z\x12\x0f\n" + + "\vT_ETH_ELITE\x10[\x12\x15\n" + + "\x11HELTEC_SENSOR_HUB\x10\\\x12\x1a\n" + + "\x16RESERVED_FRIED_CHICKEN\x10]\x12\x16\n" + + "\x12HELTEC_MESH_POCKET\x10^\x12\x14\n" + + "\x10SEEED_SOLAR_NODE\x10_\x12\x18\n" + + "\x14NOMADSTAR_METEOR_PRO\x10`\x12\r\n" + + "\tCROWPANEL\x10a\x12\x0f\n" + + "\n" + + "PRIVATE_HW\x10\xff\x01*,\n" + + "\tConstants\x12\b\n" + + "\x04ZERO\x10\x00\x12\x15\n" + + "\x10DATA_PAYLOAD_LEN\x10\xe9\x01*\xb4\x02\n" + + "\x11CriticalErrorCode\x12\b\n" + + "\x04NONE\x10\x00\x12\x0f\n" + + "\vTX_WATCHDOG\x10\x01\x12\x14\n" + + "\x10SLEEP_ENTER_WAIT\x10\x02\x12\f\n" + + "\bNO_RADIO\x10\x03\x12\x0f\n" + + "\vUNSPECIFIED\x10\x04\x12\x15\n" + + "\x11UBLOX_UNIT_FAILED\x10\x05\x12\r\n" + + "\tNO_AXP192\x10\x06\x12\x19\n" + + "\x15INVALID_RADIO_SETTING\x10\a\x12\x13\n" + + "\x0fTRANSMIT_FAILED\x10\b\x12\f\n" + + "\bBROWNOUT\x10\t\x12\x12\n" + + "\x0eSX1262_FAILURE\x10\n" + + "\x12\x11\n" + + "\rRADIO_SPI_BUG\x10\v\x12 \n" + + "\x1cFLASH_CORRUPTION_RECOVERABLE\x10\f\x12\"\n" + + "\x1eFLASH_CORRUPTION_UNRECOVERABLE\x10\r*\x80\x03\n" + + "\x0fExcludedModules\x12\x11\n" + + "\rEXCLUDED_NONE\x10\x00\x12\x0f\n" + + "\vMQTT_CONFIG\x10\x01\x12\x11\n" + + "\rSERIAL_CONFIG\x10\x02\x12\x13\n" + + "\x0fEXTNOTIF_CONFIG\x10\x04\x12\x17\n" + + "\x13STOREFORWARD_CONFIG\x10\b\x12\x14\n" + + "\x10RANGETEST_CONFIG\x10\x10\x12\x14\n" + + "\x10TELEMETRY_CONFIG\x10 \x12\x14\n" + + "\x10CANNEDMSG_CONFIG\x10@\x12\x11\n" + + "\fAUDIO_CONFIG\x10\x80\x01\x12\x1a\n" + + "\x15REMOTEHARDWARE_CONFIG\x10\x80\x02\x12\x18\n" + + "\x13NEIGHBORINFO_CONFIG\x10\x80\x04\x12\x1b\n" + + "\x16AMBIENTLIGHTING_CONFIG\x10\x80\b\x12\x1b\n" + + "\x16DETECTIONSENSOR_CONFIG\x10\x80\x10\x12\x16\n" + + "\x11PAXCOUNTER_CONFIG\x10\x80 \x12\x15\n" + + "\x10BLUETOOTH_CONFIG\x10\x80@\x12\x14\n" + + "\x0eNETWORK_CONFIG\x10\x80\x80\x01B_\n" + + "\x13com.geeksville.meshB\n" + + "MeshProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_mesh_proto_rawDescOnce sync.Once + file_meshtastic_mesh_proto_rawDescData []byte +) + +func file_meshtastic_mesh_proto_rawDescGZIP() []byte { + file_meshtastic_mesh_proto_rawDescOnce.Do(func() { + file_meshtastic_mesh_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_mesh_proto_rawDesc), len(file_meshtastic_mesh_proto_rawDesc))) + }) + return file_meshtastic_mesh_proto_rawDescData +} + +var file_meshtastic_mesh_proto_enumTypes = make([]protoimpl.EnumInfo, 10) +var file_meshtastic_mesh_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_meshtastic_mesh_proto_goTypes = []any{ + (HardwareModel)(0), // 0: meshtastic.HardwareModel + (Constants)(0), // 1: meshtastic.Constants + (CriticalErrorCode)(0), // 2: meshtastic.CriticalErrorCode + (ExcludedModules)(0), // 3: meshtastic.ExcludedModules + (Position_LocSource)(0), // 4: meshtastic.Position.LocSource + (Position_AltSource)(0), // 5: meshtastic.Position.AltSource + (Routing_Error)(0), // 6: meshtastic.Routing.Error + (MeshPacket_Priority)(0), // 7: meshtastic.MeshPacket.Priority + (MeshPacket_Delayed)(0), // 8: meshtastic.MeshPacket.Delayed + (LogRecord_Level)(0), // 9: meshtastic.LogRecord.Level + (*Position)(nil), // 10: meshtastic.Position + (*User)(nil), // 11: meshtastic.User + (*RouteDiscovery)(nil), // 12: meshtastic.RouteDiscovery + (*Routing)(nil), // 13: meshtastic.Routing + (*Data)(nil), // 14: meshtastic.Data + (*Waypoint)(nil), // 15: meshtastic.Waypoint + (*MqttClientProxyMessage)(nil), // 16: meshtastic.MqttClientProxyMessage + (*MeshPacket)(nil), // 17: meshtastic.MeshPacket + (*NodeInfo)(nil), // 18: meshtastic.NodeInfo + (*MyNodeInfo)(nil), // 19: meshtastic.MyNodeInfo + (*LogRecord)(nil), // 20: meshtastic.LogRecord + (*QueueStatus)(nil), // 21: meshtastic.QueueStatus + (*FromRadio)(nil), // 22: meshtastic.FromRadio + (*ClientNotification)(nil), // 23: meshtastic.ClientNotification + (*FileInfo)(nil), // 24: meshtastic.FileInfo + (*ToRadio)(nil), // 25: meshtastic.ToRadio + (*Compressed)(nil), // 26: meshtastic.Compressed + (*NeighborInfo)(nil), // 27: meshtastic.NeighborInfo + (*Neighbor)(nil), // 28: meshtastic.Neighbor + (*DeviceMetadata)(nil), // 29: meshtastic.DeviceMetadata + (*Heartbeat)(nil), // 30: meshtastic.Heartbeat + (*NodeRemoteHardwarePin)(nil), // 31: meshtastic.NodeRemoteHardwarePin + (*ChunkedPayload)(nil), // 32: meshtastic.ChunkedPayload + (*ResendChunks)(nil), // 33: meshtastic.resend_chunks + (*ChunkedPayloadResponse)(nil), // 34: meshtastic.ChunkedPayloadResponse + (Config_DeviceConfig_Role)(0), // 35: meshtastic.Config.DeviceConfig.Role + (PortNum)(0), // 36: meshtastic.PortNum + (*DeviceMetrics)(nil), // 37: meshtastic.DeviceMetrics + (*Config)(nil), // 38: meshtastic.Config + (*ModuleConfig)(nil), // 39: meshtastic.ModuleConfig + (*Channel)(nil), // 40: meshtastic.Channel + (*XModem)(nil), // 41: meshtastic.XModem + (*DeviceUIConfig)(nil), // 42: meshtastic.DeviceUIConfig + (*RemoteHardwarePin)(nil), // 43: meshtastic.RemoteHardwarePin +} +var file_meshtastic_mesh_proto_depIdxs = []int32{ + 4, // 0: meshtastic.Position.location_source:type_name -> meshtastic.Position.LocSource + 5, // 1: meshtastic.Position.altitude_source:type_name -> meshtastic.Position.AltSource + 0, // 2: meshtastic.User.hw_model:type_name -> meshtastic.HardwareModel + 35, // 3: meshtastic.User.role:type_name -> meshtastic.Config.DeviceConfig.Role + 12, // 4: meshtastic.Routing.route_request:type_name -> meshtastic.RouteDiscovery + 12, // 5: meshtastic.Routing.route_reply:type_name -> meshtastic.RouteDiscovery + 6, // 6: meshtastic.Routing.error_reason:type_name -> meshtastic.Routing.Error + 36, // 7: meshtastic.Data.portnum:type_name -> meshtastic.PortNum + 14, // 8: meshtastic.MeshPacket.decoded:type_name -> meshtastic.Data + 7, // 9: meshtastic.MeshPacket.priority:type_name -> meshtastic.MeshPacket.Priority + 8, // 10: meshtastic.MeshPacket.delayed:type_name -> meshtastic.MeshPacket.Delayed + 11, // 11: meshtastic.NodeInfo.user:type_name -> meshtastic.User + 10, // 12: meshtastic.NodeInfo.position:type_name -> meshtastic.Position + 37, // 13: meshtastic.NodeInfo.device_metrics:type_name -> meshtastic.DeviceMetrics + 9, // 14: meshtastic.LogRecord.level:type_name -> meshtastic.LogRecord.Level + 17, // 15: meshtastic.FromRadio.packet:type_name -> meshtastic.MeshPacket + 19, // 16: meshtastic.FromRadio.my_info:type_name -> meshtastic.MyNodeInfo + 18, // 17: meshtastic.FromRadio.node_info:type_name -> meshtastic.NodeInfo + 38, // 18: meshtastic.FromRadio.config:type_name -> meshtastic.Config + 20, // 19: meshtastic.FromRadio.log_record:type_name -> meshtastic.LogRecord + 39, // 20: meshtastic.FromRadio.moduleConfig:type_name -> meshtastic.ModuleConfig + 40, // 21: meshtastic.FromRadio.channel:type_name -> meshtastic.Channel + 21, // 22: meshtastic.FromRadio.queueStatus:type_name -> meshtastic.QueueStatus + 41, // 23: meshtastic.FromRadio.xmodemPacket:type_name -> meshtastic.XModem + 29, // 24: meshtastic.FromRadio.metadata:type_name -> meshtastic.DeviceMetadata + 16, // 25: meshtastic.FromRadio.mqttClientProxyMessage:type_name -> meshtastic.MqttClientProxyMessage + 24, // 26: meshtastic.FromRadio.fileInfo:type_name -> meshtastic.FileInfo + 23, // 27: meshtastic.FromRadio.clientNotification:type_name -> meshtastic.ClientNotification + 42, // 28: meshtastic.FromRadio.deviceuiConfig:type_name -> meshtastic.DeviceUIConfig + 9, // 29: meshtastic.ClientNotification.level:type_name -> meshtastic.LogRecord.Level + 17, // 30: meshtastic.ToRadio.packet:type_name -> meshtastic.MeshPacket + 41, // 31: meshtastic.ToRadio.xmodemPacket:type_name -> meshtastic.XModem + 16, // 32: meshtastic.ToRadio.mqttClientProxyMessage:type_name -> meshtastic.MqttClientProxyMessage + 30, // 33: meshtastic.ToRadio.heartbeat:type_name -> meshtastic.Heartbeat + 36, // 34: meshtastic.Compressed.portnum:type_name -> meshtastic.PortNum + 28, // 35: meshtastic.NeighborInfo.neighbors:type_name -> meshtastic.Neighbor + 35, // 36: meshtastic.DeviceMetadata.role:type_name -> meshtastic.Config.DeviceConfig.Role + 0, // 37: meshtastic.DeviceMetadata.hw_model:type_name -> meshtastic.HardwareModel + 43, // 38: meshtastic.NodeRemoteHardwarePin.pin:type_name -> meshtastic.RemoteHardwarePin + 33, // 39: meshtastic.ChunkedPayloadResponse.resend_chunks:type_name -> meshtastic.resend_chunks + 40, // [40:40] is the sub-list for method output_type + 40, // [40:40] is the sub-list for method input_type + 40, // [40:40] is the sub-list for extension type_name + 40, // [40:40] is the sub-list for extension extendee + 0, // [0:40] is the sub-list for field type_name +} + +func init() { file_meshtastic_mesh_proto_init() } +func file_meshtastic_mesh_proto_init() { + if File_meshtastic_mesh_proto != nil { + return + } + file_meshtastic_channel_proto_init() + file_meshtastic_config_proto_init() + file_meshtastic_module_config_proto_init() + file_meshtastic_portnums_proto_init() + file_meshtastic_telemetry_proto_init() + file_meshtastic_xmodem_proto_init() + file_meshtastic_device_ui_proto_init() + file_meshtastic_mesh_proto_msgTypes[0].OneofWrappers = []any{} + file_meshtastic_mesh_proto_msgTypes[3].OneofWrappers = []any{ + (*Routing_RouteRequest)(nil), + (*Routing_RouteReply)(nil), + (*Routing_ErrorReason)(nil), + } + file_meshtastic_mesh_proto_msgTypes[4].OneofWrappers = []any{} + file_meshtastic_mesh_proto_msgTypes[5].OneofWrappers = []any{} + file_meshtastic_mesh_proto_msgTypes[6].OneofWrappers = []any{ + (*MqttClientProxyMessage_Data)(nil), + (*MqttClientProxyMessage_Text)(nil), + } + file_meshtastic_mesh_proto_msgTypes[7].OneofWrappers = []any{ + (*MeshPacket_Decoded)(nil), + (*MeshPacket_Encrypted)(nil), + } + file_meshtastic_mesh_proto_msgTypes[8].OneofWrappers = []any{} + file_meshtastic_mesh_proto_msgTypes[12].OneofWrappers = []any{ + (*FromRadio_Packet)(nil), + (*FromRadio_MyInfo)(nil), + (*FromRadio_NodeInfo)(nil), + (*FromRadio_Config)(nil), + (*FromRadio_LogRecord)(nil), + (*FromRadio_ConfigCompleteId)(nil), + (*FromRadio_Rebooted)(nil), + (*FromRadio_ModuleConfig)(nil), + (*FromRadio_Channel)(nil), + (*FromRadio_QueueStatus)(nil), + (*FromRadio_XmodemPacket)(nil), + (*FromRadio_Metadata)(nil), + (*FromRadio_MqttClientProxyMessage)(nil), + (*FromRadio_FileInfo)(nil), + (*FromRadio_ClientNotification)(nil), + (*FromRadio_DeviceuiConfig)(nil), + } + file_meshtastic_mesh_proto_msgTypes[13].OneofWrappers = []any{} + file_meshtastic_mesh_proto_msgTypes[15].OneofWrappers = []any{ + (*ToRadio_Packet)(nil), + (*ToRadio_WantConfigId)(nil), + (*ToRadio_Disconnect)(nil), + (*ToRadio_XmodemPacket)(nil), + (*ToRadio_MqttClientProxyMessage)(nil), + (*ToRadio_Heartbeat)(nil), + } + file_meshtastic_mesh_proto_msgTypes[24].OneofWrappers = []any{ + (*ChunkedPayloadResponse_RequestTransfer)(nil), + (*ChunkedPayloadResponse_AcceptTransfer)(nil), + (*ChunkedPayloadResponse_ResendChunks)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_mesh_proto_rawDesc), len(file_meshtastic_mesh_proto_rawDesc)), + NumEnums: 10, + NumMessages: 25, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_mesh_proto_goTypes, + DependencyIndexes: file_meshtastic_mesh_proto_depIdxs, + EnumInfos: file_meshtastic_mesh_proto_enumTypes, + MessageInfos: file_meshtastic_mesh_proto_msgTypes, + }.Build() + File_meshtastic_mesh_proto = out.File + file_meshtastic_mesh_proto_goTypes = nil + file_meshtastic_mesh_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/module_config.pb.go b/proto/generated/meshtastic/module_config.pb.go new file mode 100644 index 0000000..c0257c4 --- /dev/null +++ b/proto/generated/meshtastic/module_config.pb.go @@ -0,0 +1,2552 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.3 +// source: meshtastic/module_config.proto + +package generated + +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 RemoteHardwarePinType int32 + +const ( + // Unset/unused + RemoteHardwarePinType_UNKNOWN RemoteHardwarePinType = 0 + // GPIO pin can be read (if it is high / low) + RemoteHardwarePinType_DIGITAL_READ RemoteHardwarePinType = 1 + // GPIO pin can be written to (high / low) + RemoteHardwarePinType_DIGITAL_WRITE RemoteHardwarePinType = 2 +) + +// Enum value maps for RemoteHardwarePinType. +var ( + RemoteHardwarePinType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "DIGITAL_READ", + 2: "DIGITAL_WRITE", + } + RemoteHardwarePinType_value = map[string]int32{ + "UNKNOWN": 0, + "DIGITAL_READ": 1, + "DIGITAL_WRITE": 2, + } +) + +func (x RemoteHardwarePinType) Enum() *RemoteHardwarePinType { + p := new(RemoteHardwarePinType) + *p = x + return p +} + +func (x RemoteHardwarePinType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RemoteHardwarePinType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[0].Descriptor() +} + +func (RemoteHardwarePinType) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[0] +} + +func (x RemoteHardwarePinType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RemoteHardwarePinType.Descriptor instead. +func (RemoteHardwarePinType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0} +} + +type ModuleConfig_DetectionSensorConfig_TriggerType int32 + +const ( + // Event is triggered if pin is low + ModuleConfig_DetectionSensorConfig_LOGIC_LOW ModuleConfig_DetectionSensorConfig_TriggerType = 0 + // Event is triggered if pin is high + ModuleConfig_DetectionSensorConfig_LOGIC_HIGH ModuleConfig_DetectionSensorConfig_TriggerType = 1 + // Event is triggered when pin goes high to low + ModuleConfig_DetectionSensorConfig_FALLING_EDGE ModuleConfig_DetectionSensorConfig_TriggerType = 2 + // Event is triggered when pin goes low to high + ModuleConfig_DetectionSensorConfig_RISING_EDGE ModuleConfig_DetectionSensorConfig_TriggerType = 3 + // Event is triggered on every pin state change, low is considered to be + // "active" + ModuleConfig_DetectionSensorConfig_EITHER_EDGE_ACTIVE_LOW ModuleConfig_DetectionSensorConfig_TriggerType = 4 + // Event is triggered on every pin state change, high is considered to be + // "active" + ModuleConfig_DetectionSensorConfig_EITHER_EDGE_ACTIVE_HIGH ModuleConfig_DetectionSensorConfig_TriggerType = 5 +) + +// Enum value maps for ModuleConfig_DetectionSensorConfig_TriggerType. +var ( + ModuleConfig_DetectionSensorConfig_TriggerType_name = map[int32]string{ + 0: "LOGIC_LOW", + 1: "LOGIC_HIGH", + 2: "FALLING_EDGE", + 3: "RISING_EDGE", + 4: "EITHER_EDGE_ACTIVE_LOW", + 5: "EITHER_EDGE_ACTIVE_HIGH", + } + ModuleConfig_DetectionSensorConfig_TriggerType_value = map[string]int32{ + "LOGIC_LOW": 0, + "LOGIC_HIGH": 1, + "FALLING_EDGE": 2, + "RISING_EDGE": 3, + "EITHER_EDGE_ACTIVE_LOW": 4, + "EITHER_EDGE_ACTIVE_HIGH": 5, + } +) + +func (x ModuleConfig_DetectionSensorConfig_TriggerType) Enum() *ModuleConfig_DetectionSensorConfig_TriggerType { + p := new(ModuleConfig_DetectionSensorConfig_TriggerType) + *p = x + return p +} + +func (x ModuleConfig_DetectionSensorConfig_TriggerType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ModuleConfig_DetectionSensorConfig_TriggerType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[1].Descriptor() +} + +func (ModuleConfig_DetectionSensorConfig_TriggerType) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[1] +} + +func (x ModuleConfig_DetectionSensorConfig_TriggerType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ModuleConfig_DetectionSensorConfig_TriggerType.Descriptor instead. +func (ModuleConfig_DetectionSensorConfig_TriggerType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 4, 0} +} + +// Baudrate for codec2 voice +type ModuleConfig_AudioConfig_Audio_Baud int32 + +const ( + ModuleConfig_AudioConfig_CODEC2_DEFAULT ModuleConfig_AudioConfig_Audio_Baud = 0 + ModuleConfig_AudioConfig_CODEC2_3200 ModuleConfig_AudioConfig_Audio_Baud = 1 + ModuleConfig_AudioConfig_CODEC2_2400 ModuleConfig_AudioConfig_Audio_Baud = 2 + ModuleConfig_AudioConfig_CODEC2_1600 ModuleConfig_AudioConfig_Audio_Baud = 3 + ModuleConfig_AudioConfig_CODEC2_1400 ModuleConfig_AudioConfig_Audio_Baud = 4 + ModuleConfig_AudioConfig_CODEC2_1300 ModuleConfig_AudioConfig_Audio_Baud = 5 + ModuleConfig_AudioConfig_CODEC2_1200 ModuleConfig_AudioConfig_Audio_Baud = 6 + ModuleConfig_AudioConfig_CODEC2_700 ModuleConfig_AudioConfig_Audio_Baud = 7 + ModuleConfig_AudioConfig_CODEC2_700B ModuleConfig_AudioConfig_Audio_Baud = 8 +) + +// Enum value maps for ModuleConfig_AudioConfig_Audio_Baud. +var ( + ModuleConfig_AudioConfig_Audio_Baud_name = map[int32]string{ + 0: "CODEC2_DEFAULT", + 1: "CODEC2_3200", + 2: "CODEC2_2400", + 3: "CODEC2_1600", + 4: "CODEC2_1400", + 5: "CODEC2_1300", + 6: "CODEC2_1200", + 7: "CODEC2_700", + 8: "CODEC2_700B", + } + ModuleConfig_AudioConfig_Audio_Baud_value = map[string]int32{ + "CODEC2_DEFAULT": 0, + "CODEC2_3200": 1, + "CODEC2_2400": 2, + "CODEC2_1600": 3, + "CODEC2_1400": 4, + "CODEC2_1300": 5, + "CODEC2_1200": 6, + "CODEC2_700": 7, + "CODEC2_700B": 8, + } +) + +func (x ModuleConfig_AudioConfig_Audio_Baud) Enum() *ModuleConfig_AudioConfig_Audio_Baud { + p := new(ModuleConfig_AudioConfig_Audio_Baud) + *p = x + return p +} + +func (x ModuleConfig_AudioConfig_Audio_Baud) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ModuleConfig_AudioConfig_Audio_Baud) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[2].Descriptor() +} + +func (ModuleConfig_AudioConfig_Audio_Baud) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[2] +} + +func (x ModuleConfig_AudioConfig_Audio_Baud) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ModuleConfig_AudioConfig_Audio_Baud.Descriptor instead. +func (ModuleConfig_AudioConfig_Audio_Baud) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 5, 0} +} + +// TODO: REPLACE +type ModuleConfig_SerialConfig_Serial_Baud int32 + +const ( + ModuleConfig_SerialConfig_BAUD_DEFAULT ModuleConfig_SerialConfig_Serial_Baud = 0 + ModuleConfig_SerialConfig_BAUD_110 ModuleConfig_SerialConfig_Serial_Baud = 1 + ModuleConfig_SerialConfig_BAUD_300 ModuleConfig_SerialConfig_Serial_Baud = 2 + ModuleConfig_SerialConfig_BAUD_600 ModuleConfig_SerialConfig_Serial_Baud = 3 + ModuleConfig_SerialConfig_BAUD_1200 ModuleConfig_SerialConfig_Serial_Baud = 4 + ModuleConfig_SerialConfig_BAUD_2400 ModuleConfig_SerialConfig_Serial_Baud = 5 + ModuleConfig_SerialConfig_BAUD_4800 ModuleConfig_SerialConfig_Serial_Baud = 6 + ModuleConfig_SerialConfig_BAUD_9600 ModuleConfig_SerialConfig_Serial_Baud = 7 + ModuleConfig_SerialConfig_BAUD_19200 ModuleConfig_SerialConfig_Serial_Baud = 8 + ModuleConfig_SerialConfig_BAUD_38400 ModuleConfig_SerialConfig_Serial_Baud = 9 + ModuleConfig_SerialConfig_BAUD_57600 ModuleConfig_SerialConfig_Serial_Baud = 10 + ModuleConfig_SerialConfig_BAUD_115200 ModuleConfig_SerialConfig_Serial_Baud = 11 + ModuleConfig_SerialConfig_BAUD_230400 ModuleConfig_SerialConfig_Serial_Baud = 12 + ModuleConfig_SerialConfig_BAUD_460800 ModuleConfig_SerialConfig_Serial_Baud = 13 + ModuleConfig_SerialConfig_BAUD_576000 ModuleConfig_SerialConfig_Serial_Baud = 14 + ModuleConfig_SerialConfig_BAUD_921600 ModuleConfig_SerialConfig_Serial_Baud = 15 +) + +// Enum value maps for ModuleConfig_SerialConfig_Serial_Baud. +var ( + ModuleConfig_SerialConfig_Serial_Baud_name = map[int32]string{ + 0: "BAUD_DEFAULT", + 1: "BAUD_110", + 2: "BAUD_300", + 3: "BAUD_600", + 4: "BAUD_1200", + 5: "BAUD_2400", + 6: "BAUD_4800", + 7: "BAUD_9600", + 8: "BAUD_19200", + 9: "BAUD_38400", + 10: "BAUD_57600", + 11: "BAUD_115200", + 12: "BAUD_230400", + 13: "BAUD_460800", + 14: "BAUD_576000", + 15: "BAUD_921600", + } + ModuleConfig_SerialConfig_Serial_Baud_value = map[string]int32{ + "BAUD_DEFAULT": 0, + "BAUD_110": 1, + "BAUD_300": 2, + "BAUD_600": 3, + "BAUD_1200": 4, + "BAUD_2400": 5, + "BAUD_4800": 6, + "BAUD_9600": 7, + "BAUD_19200": 8, + "BAUD_38400": 9, + "BAUD_57600": 10, + "BAUD_115200": 11, + "BAUD_230400": 12, + "BAUD_460800": 13, + "BAUD_576000": 14, + "BAUD_921600": 15, + } +) + +func (x ModuleConfig_SerialConfig_Serial_Baud) Enum() *ModuleConfig_SerialConfig_Serial_Baud { + p := new(ModuleConfig_SerialConfig_Serial_Baud) + *p = x + return p +} + +func (x ModuleConfig_SerialConfig_Serial_Baud) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ModuleConfig_SerialConfig_Serial_Baud) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[3].Descriptor() +} + +func (ModuleConfig_SerialConfig_Serial_Baud) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[3] +} + +func (x ModuleConfig_SerialConfig_Serial_Baud) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ModuleConfig_SerialConfig_Serial_Baud.Descriptor instead. +func (ModuleConfig_SerialConfig_Serial_Baud) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 7, 0} +} + +// TODO: REPLACE +type ModuleConfig_SerialConfig_Serial_Mode int32 + +const ( + ModuleConfig_SerialConfig_DEFAULT ModuleConfig_SerialConfig_Serial_Mode = 0 + ModuleConfig_SerialConfig_SIMPLE ModuleConfig_SerialConfig_Serial_Mode = 1 + ModuleConfig_SerialConfig_PROTO ModuleConfig_SerialConfig_Serial_Mode = 2 + ModuleConfig_SerialConfig_TEXTMSG ModuleConfig_SerialConfig_Serial_Mode = 3 + ModuleConfig_SerialConfig_NMEA ModuleConfig_SerialConfig_Serial_Mode = 4 + // NMEA messages specifically tailored for CalTopo + ModuleConfig_SerialConfig_CALTOPO ModuleConfig_SerialConfig_Serial_Mode = 5 + // Ecowitt WS85 weather station + ModuleConfig_SerialConfig_WS85 ModuleConfig_SerialConfig_Serial_Mode = 6 +) + +// Enum value maps for ModuleConfig_SerialConfig_Serial_Mode. +var ( + ModuleConfig_SerialConfig_Serial_Mode_name = map[int32]string{ + 0: "DEFAULT", + 1: "SIMPLE", + 2: "PROTO", + 3: "TEXTMSG", + 4: "NMEA", + 5: "CALTOPO", + 6: "WS85", + } + ModuleConfig_SerialConfig_Serial_Mode_value = map[string]int32{ + "DEFAULT": 0, + "SIMPLE": 1, + "PROTO": 2, + "TEXTMSG": 3, + "NMEA": 4, + "CALTOPO": 5, + "WS85": 6, + } +) + +func (x ModuleConfig_SerialConfig_Serial_Mode) Enum() *ModuleConfig_SerialConfig_Serial_Mode { + p := new(ModuleConfig_SerialConfig_Serial_Mode) + *p = x + return p +} + +func (x ModuleConfig_SerialConfig_Serial_Mode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ModuleConfig_SerialConfig_Serial_Mode) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[4].Descriptor() +} + +func (ModuleConfig_SerialConfig_Serial_Mode) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[4] +} + +func (x ModuleConfig_SerialConfig_Serial_Mode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ModuleConfig_SerialConfig_Serial_Mode.Descriptor instead. +func (ModuleConfig_SerialConfig_Serial_Mode) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 7, 1} +} + +// TODO: REPLACE +type ModuleConfig_CannedMessageConfig_InputEventChar int32 + +const ( + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_NONE ModuleConfig_CannedMessageConfig_InputEventChar = 0 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_UP ModuleConfig_CannedMessageConfig_InputEventChar = 17 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_DOWN ModuleConfig_CannedMessageConfig_InputEventChar = 18 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_LEFT ModuleConfig_CannedMessageConfig_InputEventChar = 19 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_RIGHT ModuleConfig_CannedMessageConfig_InputEventChar = 20 + // '\n' + ModuleConfig_CannedMessageConfig_SELECT ModuleConfig_CannedMessageConfig_InputEventChar = 10 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_BACK ModuleConfig_CannedMessageConfig_InputEventChar = 27 + // TODO: REPLACE + ModuleConfig_CannedMessageConfig_CANCEL ModuleConfig_CannedMessageConfig_InputEventChar = 24 +) + +// Enum value maps for ModuleConfig_CannedMessageConfig_InputEventChar. +var ( + ModuleConfig_CannedMessageConfig_InputEventChar_name = map[int32]string{ + 0: "NONE", + 17: "UP", + 18: "DOWN", + 19: "LEFT", + 20: "RIGHT", + 10: "SELECT", + 27: "BACK", + 24: "CANCEL", + } + ModuleConfig_CannedMessageConfig_InputEventChar_value = map[string]int32{ + "NONE": 0, + "UP": 17, + "DOWN": 18, + "LEFT": 19, + "RIGHT": 20, + "SELECT": 10, + "BACK": 27, + "CANCEL": 24, + } +) + +func (x ModuleConfig_CannedMessageConfig_InputEventChar) Enum() *ModuleConfig_CannedMessageConfig_InputEventChar { + p := new(ModuleConfig_CannedMessageConfig_InputEventChar) + *p = x + return p +} + +func (x ModuleConfig_CannedMessageConfig_InputEventChar) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ModuleConfig_CannedMessageConfig_InputEventChar) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_module_config_proto_enumTypes[5].Descriptor() +} + +func (ModuleConfig_CannedMessageConfig_InputEventChar) Type() protoreflect.EnumType { + return &file_meshtastic_module_config_proto_enumTypes[5] +} + +func (x ModuleConfig_CannedMessageConfig_InputEventChar) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ModuleConfig_CannedMessageConfig_InputEventChar.Descriptor instead. +func (ModuleConfig_CannedMessageConfig_InputEventChar) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 12, 0} +} + +// Module Config +type ModuleConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // TODO: REPLACE + // + // Types that are valid to be assigned to PayloadVariant: + // + // *ModuleConfig_Mqtt + // *ModuleConfig_Serial + // *ModuleConfig_ExternalNotification + // *ModuleConfig_StoreForward + // *ModuleConfig_RangeTest + // *ModuleConfig_Telemetry + // *ModuleConfig_CannedMessage + // *ModuleConfig_Audio + // *ModuleConfig_RemoteHardware + // *ModuleConfig_NeighborInfo + // *ModuleConfig_AmbientLighting + // *ModuleConfig_DetectionSensor + // *ModuleConfig_Paxcounter + PayloadVariant isModuleConfig_PayloadVariant `protobuf_oneof:"payload_variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig) Reset() { + *x = ModuleConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig) ProtoMessage() {} + +func (x *ModuleConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0} +} + +func (x *ModuleConfig) GetPayloadVariant() isModuleConfig_PayloadVariant { + if x != nil { + return x.PayloadVariant + } + return nil +} + +func (x *ModuleConfig) GetMqtt() *ModuleConfig_MQTTConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_Mqtt); ok { + return x.Mqtt + } + } + return nil +} + +func (x *ModuleConfig) GetSerial() *ModuleConfig_SerialConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_Serial); ok { + return x.Serial + } + } + return nil +} + +func (x *ModuleConfig) GetExternalNotification() *ModuleConfig_ExternalNotificationConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_ExternalNotification); ok { + return x.ExternalNotification + } + } + return nil +} + +func (x *ModuleConfig) GetStoreForward() *ModuleConfig_StoreForwardConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_StoreForward); ok { + return x.StoreForward + } + } + return nil +} + +func (x *ModuleConfig) GetRangeTest() *ModuleConfig_RangeTestConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_RangeTest); ok { + return x.RangeTest + } + } + return nil +} + +func (x *ModuleConfig) GetTelemetry() *ModuleConfig_TelemetryConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_Telemetry); ok { + return x.Telemetry + } + } + return nil +} + +func (x *ModuleConfig) GetCannedMessage() *ModuleConfig_CannedMessageConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_CannedMessage); ok { + return x.CannedMessage + } + } + return nil +} + +func (x *ModuleConfig) GetAudio() *ModuleConfig_AudioConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_Audio); ok { + return x.Audio + } + } + return nil +} + +func (x *ModuleConfig) GetRemoteHardware() *ModuleConfig_RemoteHardwareConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_RemoteHardware); ok { + return x.RemoteHardware + } + } + return nil +} + +func (x *ModuleConfig) GetNeighborInfo() *ModuleConfig_NeighborInfoConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_NeighborInfo); ok { + return x.NeighborInfo + } + } + return nil +} + +func (x *ModuleConfig) GetAmbientLighting() *ModuleConfig_AmbientLightingConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_AmbientLighting); ok { + return x.AmbientLighting + } + } + return nil +} + +func (x *ModuleConfig) GetDetectionSensor() *ModuleConfig_DetectionSensorConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_DetectionSensor); ok { + return x.DetectionSensor + } + } + return nil +} + +func (x *ModuleConfig) GetPaxcounter() *ModuleConfig_PaxcounterConfig { + if x != nil { + if x, ok := x.PayloadVariant.(*ModuleConfig_Paxcounter); ok { + return x.Paxcounter + } + } + return nil +} + +type isModuleConfig_PayloadVariant interface { + isModuleConfig_PayloadVariant() +} + +type ModuleConfig_Mqtt struct { + // TODO: REPLACE + Mqtt *ModuleConfig_MQTTConfig `protobuf:"bytes,1,opt,name=mqtt,proto3,oneof"` +} + +type ModuleConfig_Serial struct { + // TODO: REPLACE + Serial *ModuleConfig_SerialConfig `protobuf:"bytes,2,opt,name=serial,proto3,oneof"` +} + +type ModuleConfig_ExternalNotification struct { + // TODO: REPLACE + ExternalNotification *ModuleConfig_ExternalNotificationConfig `protobuf:"bytes,3,opt,name=external_notification,json=externalNotification,proto3,oneof"` +} + +type ModuleConfig_StoreForward struct { + // TODO: REPLACE + StoreForward *ModuleConfig_StoreForwardConfig `protobuf:"bytes,4,opt,name=store_forward,json=storeForward,proto3,oneof"` +} + +type ModuleConfig_RangeTest struct { + // TODO: REPLACE + RangeTest *ModuleConfig_RangeTestConfig `protobuf:"bytes,5,opt,name=range_test,json=rangeTest,proto3,oneof"` +} + +type ModuleConfig_Telemetry struct { + // TODO: REPLACE + Telemetry *ModuleConfig_TelemetryConfig `protobuf:"bytes,6,opt,name=telemetry,proto3,oneof"` +} + +type ModuleConfig_CannedMessage struct { + // TODO: REPLACE + CannedMessage *ModuleConfig_CannedMessageConfig `protobuf:"bytes,7,opt,name=canned_message,json=cannedMessage,proto3,oneof"` +} + +type ModuleConfig_Audio struct { + // TODO: REPLACE + Audio *ModuleConfig_AudioConfig `protobuf:"bytes,8,opt,name=audio,proto3,oneof"` +} + +type ModuleConfig_RemoteHardware struct { + // TODO: REPLACE + RemoteHardware *ModuleConfig_RemoteHardwareConfig `protobuf:"bytes,9,opt,name=remote_hardware,json=remoteHardware,proto3,oneof"` +} + +type ModuleConfig_NeighborInfo struct { + // TODO: REPLACE + NeighborInfo *ModuleConfig_NeighborInfoConfig `protobuf:"bytes,10,opt,name=neighbor_info,json=neighborInfo,proto3,oneof"` +} + +type ModuleConfig_AmbientLighting struct { + // TODO: REPLACE + AmbientLighting *ModuleConfig_AmbientLightingConfig `protobuf:"bytes,11,opt,name=ambient_lighting,json=ambientLighting,proto3,oneof"` +} + +type ModuleConfig_DetectionSensor struct { + // TODO: REPLACE + DetectionSensor *ModuleConfig_DetectionSensorConfig `protobuf:"bytes,12,opt,name=detection_sensor,json=detectionSensor,proto3,oneof"` +} + +type ModuleConfig_Paxcounter struct { + // TODO: REPLACE + Paxcounter *ModuleConfig_PaxcounterConfig `protobuf:"bytes,13,opt,name=paxcounter,proto3,oneof"` +} + +func (*ModuleConfig_Mqtt) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_Serial) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_ExternalNotification) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_StoreForward) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_RangeTest) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_Telemetry) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_CannedMessage) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_Audio) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_RemoteHardware) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_NeighborInfo) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_AmbientLighting) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_DetectionSensor) isModuleConfig_PayloadVariant() {} + +func (*ModuleConfig_Paxcounter) isModuleConfig_PayloadVariant() {} + +// A GPIO pin definition for remote hardware module +type RemoteHardwarePin struct { + state protoimpl.MessageState `protogen:"open.v1"` + // GPIO Pin number (must match Arduino) + GpioPin uint32 `protobuf:"varint,1,opt,name=gpio_pin,json=gpioPin,proto3" json:"gpio_pin,omitempty"` + // Name for the GPIO pin (i.e. Front gate, mailbox, etc) + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Type of GPIO access available to consumers on the mesh + Type RemoteHardwarePinType `protobuf:"varint,3,opt,name=type,proto3,enum=meshtastic.RemoteHardwarePinType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoteHardwarePin) Reset() { + *x = RemoteHardwarePin{} + mi := &file_meshtastic_module_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoteHardwarePin) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoteHardwarePin) ProtoMessage() {} + +func (x *RemoteHardwarePin) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 RemoteHardwarePin.ProtoReflect.Descriptor instead. +func (*RemoteHardwarePin) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{1} +} + +func (x *RemoteHardwarePin) GetGpioPin() uint32 { + if x != nil { + return x.GpioPin + } + return 0 +} + +func (x *RemoteHardwarePin) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RemoteHardwarePin) GetType() RemoteHardwarePinType { + if x != nil { + return x.Type + } + return RemoteHardwarePinType_UNKNOWN +} + +// MQTT Client Config +type ModuleConfig_MQTTConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as + // is_uplink_enabled or is_downlink_enabled. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // The server to use for our MQTT global message gateway feature. + // If not set, the default server will be used + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // MQTT username to use (most useful for a custom MQTT server). + // If using a custom server, this will be honoured even if empty. + // If using the default server, this will only be honoured if set, otherwise the device will use the default username + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + // MQTT password to use (most useful for a custom MQTT server). + // If using a custom server, this will be honoured even if empty. + // If using the default server, this will only be honoured if set, otherwise the device will use the default password + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + // Whether to send encrypted or decrypted packets to MQTT. + // This parameter is only honoured if you also set server + // (the default official mqtt.meshtastic.org server can handle encrypted packets) + // Decrypted packets may be useful for external systems that want to consume meshtastic packets + EncryptionEnabled bool `protobuf:"varint,5,opt,name=encryption_enabled,json=encryptionEnabled,proto3" json:"encryption_enabled,omitempty"` + // Whether to send / consume json packets on MQTT + JsonEnabled bool `protobuf:"varint,6,opt,name=json_enabled,json=jsonEnabled,proto3" json:"json_enabled,omitempty"` + // If true, we attempt to establish a secure connection using TLS + TlsEnabled bool `protobuf:"varint,7,opt,name=tls_enabled,json=tlsEnabled,proto3" json:"tls_enabled,omitempty"` + // The root topic to use for MQTT messages. Default is "msh". + // This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs + Root string `protobuf:"bytes,8,opt,name=root,proto3" json:"root,omitempty"` + // If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection + ProxyToClientEnabled bool `protobuf:"varint,9,opt,name=proxy_to_client_enabled,json=proxyToClientEnabled,proto3" json:"proxy_to_client_enabled,omitempty"` + // If true, we will periodically report unencrypted information about our node to a map via MQTT + MapReportingEnabled bool `protobuf:"varint,10,opt,name=map_reporting_enabled,json=mapReportingEnabled,proto3" json:"map_reporting_enabled,omitempty"` + // Settings for reporting information about our node to a map via MQTT + MapReportSettings *ModuleConfig_MapReportSettings `protobuf:"bytes,11,opt,name=map_report_settings,json=mapReportSettings,proto3" json:"map_report_settings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_MQTTConfig) Reset() { + *x = ModuleConfig_MQTTConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_MQTTConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_MQTTConfig) ProtoMessage() {} + +func (x *ModuleConfig_MQTTConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig_MQTTConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_MQTTConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ModuleConfig_MQTTConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ModuleConfig_MQTTConfig) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ModuleConfig_MQTTConfig) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *ModuleConfig_MQTTConfig) GetEncryptionEnabled() bool { + if x != nil { + return x.EncryptionEnabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetJsonEnabled() bool { + if x != nil { + return x.JsonEnabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetTlsEnabled() bool { + if x != nil { + return x.TlsEnabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetRoot() string { + if x != nil { + return x.Root + } + return "" +} + +func (x *ModuleConfig_MQTTConfig) GetProxyToClientEnabled() bool { + if x != nil { + return x.ProxyToClientEnabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetMapReportingEnabled() bool { + if x != nil { + return x.MapReportingEnabled + } + return false +} + +func (x *ModuleConfig_MQTTConfig) GetMapReportSettings() *ModuleConfig_MapReportSettings { + if x != nil { + return x.MapReportSettings + } + return nil +} + +// Settings for reporting unencrypted information about our node to a map via MQTT +type ModuleConfig_MapReportSettings struct { + state protoimpl.MessageState `protogen:"open.v1"` + // How often we should report our info to the map (in seconds) + PublishIntervalSecs uint32 `protobuf:"varint,1,opt,name=publish_interval_secs,json=publishIntervalSecs,proto3" json:"publish_interval_secs,omitempty"` + // Bits of precision for the location sent (default of 32 is full precision). + PositionPrecision uint32 `protobuf:"varint,2,opt,name=position_precision,json=positionPrecision,proto3" json:"position_precision,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_MapReportSettings) Reset() { + *x = ModuleConfig_MapReportSettings{} + mi := &file_meshtastic_module_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_MapReportSettings) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_MapReportSettings) ProtoMessage() {} + +func (x *ModuleConfig_MapReportSettings) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig_MapReportSettings.ProtoReflect.Descriptor instead. +func (*ModuleConfig_MapReportSettings) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ModuleConfig_MapReportSettings) GetPublishIntervalSecs() uint32 { + if x != nil { + return x.PublishIntervalSecs + } + return 0 +} + +func (x *ModuleConfig_MapReportSettings) GetPositionPrecision() uint32 { + if x != nil { + return x.PositionPrecision + } + return 0 +} + +// RemoteHardwareModule Config +type ModuleConfig_RemoteHardwareConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether the Module is enabled + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Whether the Module allows consumers to read / write to pins not defined in available_pins + AllowUndefinedPinAccess bool `protobuf:"varint,2,opt,name=allow_undefined_pin_access,json=allowUndefinedPinAccess,proto3" json:"allow_undefined_pin_access,omitempty"` + // Exposes the available pins to the mesh for reading and writing + AvailablePins []*RemoteHardwarePin `protobuf:"bytes,3,rep,name=available_pins,json=availablePins,proto3" json:"available_pins,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_RemoteHardwareConfig) Reset() { + *x = ModuleConfig_RemoteHardwareConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_RemoteHardwareConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_RemoteHardwareConfig) ProtoMessage() {} + +func (x *ModuleConfig_RemoteHardwareConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig_RemoteHardwareConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_RemoteHardwareConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *ModuleConfig_RemoteHardwareConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_RemoteHardwareConfig) GetAllowUndefinedPinAccess() bool { + if x != nil { + return x.AllowUndefinedPinAccess + } + return false +} + +func (x *ModuleConfig_RemoteHardwareConfig) GetAvailablePins() []*RemoteHardwarePin { + if x != nil { + return x.AvailablePins + } + return nil +} + +// NeighborInfoModule Config +type ModuleConfig_NeighborInfoConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether the Module is enabled + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Interval in seconds of how often we should try to send our + // Neighbor Info (minimum is 14400, i.e., 4 hours) + UpdateInterval uint32 `protobuf:"varint,2,opt,name=update_interval,json=updateInterval,proto3" json:"update_interval,omitempty"` + // Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa. + // Note that this is not available on a channel with default key and name. + TransmitOverLora bool `protobuf:"varint,3,opt,name=transmit_over_lora,json=transmitOverLora,proto3" json:"transmit_over_lora,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_NeighborInfoConfig) Reset() { + *x = ModuleConfig_NeighborInfoConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_NeighborInfoConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_NeighborInfoConfig) ProtoMessage() {} + +func (x *ModuleConfig_NeighborInfoConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig_NeighborInfoConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_NeighborInfoConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *ModuleConfig_NeighborInfoConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_NeighborInfoConfig) GetUpdateInterval() uint32 { + if x != nil { + return x.UpdateInterval + } + return 0 +} + +func (x *ModuleConfig_NeighborInfoConfig) GetTransmitOverLora() bool { + if x != nil { + return x.TransmitOverLora + } + return false +} + +// Detection Sensor Module Config +type ModuleConfig_DetectionSensorConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether the Module is enabled + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Interval in seconds of how often we can send a message to the mesh when a + // trigger event is detected + MinimumBroadcastSecs uint32 `protobuf:"varint,2,opt,name=minimum_broadcast_secs,json=minimumBroadcastSecs,proto3" json:"minimum_broadcast_secs,omitempty"` + // Interval in seconds of how often we should send a message to the mesh + // with the current state regardless of trigger events When set to 0, only + // trigger events will be broadcasted Works as a sort of status heartbeat + // for peace of mind + StateBroadcastSecs uint32 `protobuf:"varint,3,opt,name=state_broadcast_secs,json=stateBroadcastSecs,proto3" json:"state_broadcast_secs,omitempty"` + // Send ASCII bell with alert message + // Useful for triggering ext. notification on bell + SendBell bool `protobuf:"varint,4,opt,name=send_bell,json=sendBell,proto3" json:"send_bell,omitempty"` + // Friendly name used to format message sent to mesh + // Example: A name "Motion" would result in a message "Motion detected" + // Maximum length of 20 characters + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + // GPIO pin to monitor for state changes + MonitorPin uint32 `protobuf:"varint,6,opt,name=monitor_pin,json=monitorPin,proto3" json:"monitor_pin,omitempty"` + // The type of trigger event to be used + DetectionTriggerType ModuleConfig_DetectionSensorConfig_TriggerType `protobuf:"varint,7,opt,name=detection_trigger_type,json=detectionTriggerType,proto3,enum=meshtastic.ModuleConfig_DetectionSensorConfig_TriggerType" json:"detection_trigger_type,omitempty"` + // Whether or not use INPUT_PULLUP mode for GPIO pin + // Only applicable if the board uses pull-up resistors on the pin + UsePullup bool `protobuf:"varint,8,opt,name=use_pullup,json=usePullup,proto3" json:"use_pullup,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_DetectionSensorConfig) Reset() { + *x = ModuleConfig_DetectionSensorConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_DetectionSensorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_DetectionSensorConfig) ProtoMessage() {} + +func (x *ModuleConfig_DetectionSensorConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_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 ModuleConfig_DetectionSensorConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_DetectionSensorConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 4} +} + +func (x *ModuleConfig_DetectionSensorConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_DetectionSensorConfig) GetMinimumBroadcastSecs() uint32 { + if x != nil { + return x.MinimumBroadcastSecs + } + return 0 +} + +func (x *ModuleConfig_DetectionSensorConfig) GetStateBroadcastSecs() uint32 { + if x != nil { + return x.StateBroadcastSecs + } + return 0 +} + +func (x *ModuleConfig_DetectionSensorConfig) GetSendBell() bool { + if x != nil { + return x.SendBell + } + return false +} + +func (x *ModuleConfig_DetectionSensorConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ModuleConfig_DetectionSensorConfig) GetMonitorPin() uint32 { + if x != nil { + return x.MonitorPin + } + return 0 +} + +func (x *ModuleConfig_DetectionSensorConfig) GetDetectionTriggerType() ModuleConfig_DetectionSensorConfig_TriggerType { + if x != nil { + return x.DetectionTriggerType + } + return ModuleConfig_DetectionSensorConfig_LOGIC_LOW +} + +func (x *ModuleConfig_DetectionSensorConfig) GetUsePullup() bool { + if x != nil { + return x.UsePullup + } + return false +} + +// Audio Config for codec2 voice +type ModuleConfig_AudioConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Whether Audio is enabled + Codec2Enabled bool `protobuf:"varint,1,opt,name=codec2_enabled,json=codec2Enabled,proto3" json:"codec2_enabled,omitempty"` + // PTT Pin + PttPin uint32 `protobuf:"varint,2,opt,name=ptt_pin,json=pttPin,proto3" json:"ptt_pin,omitempty"` + // The audio sample rate to use for codec2 + Bitrate ModuleConfig_AudioConfig_Audio_Baud `protobuf:"varint,3,opt,name=bitrate,proto3,enum=meshtastic.ModuleConfig_AudioConfig_Audio_Baud" json:"bitrate,omitempty"` + // I2S Word Select + I2SWs uint32 `protobuf:"varint,4,opt,name=i2s_ws,json=i2sWs,proto3" json:"i2s_ws,omitempty"` + // I2S Data IN + I2SSd uint32 `protobuf:"varint,5,opt,name=i2s_sd,json=i2sSd,proto3" json:"i2s_sd,omitempty"` + // I2S Data OUT + I2SDin uint32 `protobuf:"varint,6,opt,name=i2s_din,json=i2sDin,proto3" json:"i2s_din,omitempty"` + // I2S Clock + I2SSck uint32 `protobuf:"varint,7,opt,name=i2s_sck,json=i2sSck,proto3" json:"i2s_sck,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_AudioConfig) Reset() { + *x = ModuleConfig_AudioConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_AudioConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_AudioConfig) ProtoMessage() {} + +func (x *ModuleConfig_AudioConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[7] + 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 ModuleConfig_AudioConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_AudioConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 5} +} + +func (x *ModuleConfig_AudioConfig) GetCodec2Enabled() bool { + if x != nil { + return x.Codec2Enabled + } + return false +} + +func (x *ModuleConfig_AudioConfig) GetPttPin() uint32 { + if x != nil { + return x.PttPin + } + return 0 +} + +func (x *ModuleConfig_AudioConfig) GetBitrate() ModuleConfig_AudioConfig_Audio_Baud { + if x != nil { + return x.Bitrate + } + return ModuleConfig_AudioConfig_CODEC2_DEFAULT +} + +func (x *ModuleConfig_AudioConfig) GetI2SWs() uint32 { + if x != nil { + return x.I2SWs + } + return 0 +} + +func (x *ModuleConfig_AudioConfig) GetI2SSd() uint32 { + if x != nil { + return x.I2SSd + } + return 0 +} + +func (x *ModuleConfig_AudioConfig) GetI2SDin() uint32 { + if x != nil { + return x.I2SDin + } + return 0 +} + +func (x *ModuleConfig_AudioConfig) GetI2SSck() uint32 { + if x != nil { + return x.I2SSck + } + return 0 +} + +// Config for the Paxcounter Module +type ModuleConfig_PaxcounterConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable the Paxcounter Module + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + PaxcounterUpdateInterval uint32 `protobuf:"varint,2,opt,name=paxcounter_update_interval,json=paxcounterUpdateInterval,proto3" json:"paxcounter_update_interval,omitempty"` + // WiFi RSSI threshold. Defaults to -80 + WifiThreshold int32 `protobuf:"varint,3,opt,name=wifi_threshold,json=wifiThreshold,proto3" json:"wifi_threshold,omitempty"` + // BLE RSSI threshold. Defaults to -80 + BleThreshold int32 `protobuf:"varint,4,opt,name=ble_threshold,json=bleThreshold,proto3" json:"ble_threshold,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_PaxcounterConfig) Reset() { + *x = ModuleConfig_PaxcounterConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_PaxcounterConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_PaxcounterConfig) ProtoMessage() {} + +func (x *ModuleConfig_PaxcounterConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[8] + 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 ModuleConfig_PaxcounterConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_PaxcounterConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 6} +} + +func (x *ModuleConfig_PaxcounterConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_PaxcounterConfig) GetPaxcounterUpdateInterval() uint32 { + if x != nil { + return x.PaxcounterUpdateInterval + } + return 0 +} + +func (x *ModuleConfig_PaxcounterConfig) GetWifiThreshold() int32 { + if x != nil { + return x.WifiThreshold + } + return 0 +} + +func (x *ModuleConfig_PaxcounterConfig) GetBleThreshold() int32 { + if x != nil { + return x.BleThreshold + } + return 0 +} + +// Serial Config +type ModuleConfig_SerialConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Preferences for the SerialModule + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // TODO: REPLACE + Echo bool `protobuf:"varint,2,opt,name=echo,proto3" json:"echo,omitempty"` + // RX pin (should match Arduino gpio pin number) + Rxd uint32 `protobuf:"varint,3,opt,name=rxd,proto3" json:"rxd,omitempty"` + // TX pin (should match Arduino gpio pin number) + Txd uint32 `protobuf:"varint,4,opt,name=txd,proto3" json:"txd,omitempty"` + // Serial baud rate + Baud ModuleConfig_SerialConfig_Serial_Baud `protobuf:"varint,5,opt,name=baud,proto3,enum=meshtastic.ModuleConfig_SerialConfig_Serial_Baud" json:"baud,omitempty"` + // TODO: REPLACE + Timeout uint32 `protobuf:"varint,6,opt,name=timeout,proto3" json:"timeout,omitempty"` + // Mode for serial module operation + Mode ModuleConfig_SerialConfig_Serial_Mode `protobuf:"varint,7,opt,name=mode,proto3,enum=meshtastic.ModuleConfig_SerialConfig_Serial_Mode" json:"mode,omitempty"` + // Overrides the platform's defacto Serial port instance to use with Serial module config settings + // This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes + // Existing logging over the Serial Console will still be present + OverrideConsoleSerialPort bool `protobuf:"varint,8,opt,name=override_console_serial_port,json=overrideConsoleSerialPort,proto3" json:"override_console_serial_port,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_SerialConfig) Reset() { + *x = ModuleConfig_SerialConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_SerialConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_SerialConfig) ProtoMessage() {} + +func (x *ModuleConfig_SerialConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[9] + 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 ModuleConfig_SerialConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_SerialConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 7} +} + +func (x *ModuleConfig_SerialConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_SerialConfig) GetEcho() bool { + if x != nil { + return x.Echo + } + return false +} + +func (x *ModuleConfig_SerialConfig) GetRxd() uint32 { + if x != nil { + return x.Rxd + } + return 0 +} + +func (x *ModuleConfig_SerialConfig) GetTxd() uint32 { + if x != nil { + return x.Txd + } + return 0 +} + +func (x *ModuleConfig_SerialConfig) GetBaud() ModuleConfig_SerialConfig_Serial_Baud { + if x != nil { + return x.Baud + } + return ModuleConfig_SerialConfig_BAUD_DEFAULT +} + +func (x *ModuleConfig_SerialConfig) GetTimeout() uint32 { + if x != nil { + return x.Timeout + } + return 0 +} + +func (x *ModuleConfig_SerialConfig) GetMode() ModuleConfig_SerialConfig_Serial_Mode { + if x != nil { + return x.Mode + } + return ModuleConfig_SerialConfig_DEFAULT +} + +func (x *ModuleConfig_SerialConfig) GetOverrideConsoleSerialPort() bool { + if x != nil { + return x.OverrideConsoleSerialPort + } + return false +} + +// External Notifications Config +type ModuleConfig_ExternalNotificationConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable the ExternalNotificationModule + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // When using in On/Off mode, keep the output on for this many + // milliseconds. Default 1000ms (1 second). + OutputMs uint32 `protobuf:"varint,2,opt,name=output_ms,json=outputMs,proto3" json:"output_ms,omitempty"` + // Define the output pin GPIO setting Defaults to + // EXT_NOTIFY_OUT if set for the board. + // In standalone devices this pin should drive the LED to match the UI. + Output uint32 `protobuf:"varint,3,opt,name=output,proto3" json:"output,omitempty"` + // Optional: Define a secondary output pin for a vibra motor + // This is used in standalone devices to match the UI. + OutputVibra uint32 `protobuf:"varint,8,opt,name=output_vibra,json=outputVibra,proto3" json:"output_vibra,omitempty"` + // Optional: Define a tertiary output pin for an active buzzer + // This is used in standalone devices to to match the UI. + OutputBuzzer uint32 `protobuf:"varint,9,opt,name=output_buzzer,json=outputBuzzer,proto3" json:"output_buzzer,omitempty"` + // IF this is true, the 'output' Pin will be pulled active high, false + // means active low. + Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` + // True: Alert when a text message arrives (output) + AlertMessage bool `protobuf:"varint,5,opt,name=alert_message,json=alertMessage,proto3" json:"alert_message,omitempty"` + // True: Alert when a text message arrives (output_vibra) + AlertMessageVibra bool `protobuf:"varint,10,opt,name=alert_message_vibra,json=alertMessageVibra,proto3" json:"alert_message_vibra,omitempty"` + // True: Alert when a text message arrives (output_buzzer) + AlertMessageBuzzer bool `protobuf:"varint,11,opt,name=alert_message_buzzer,json=alertMessageBuzzer,proto3" json:"alert_message_buzzer,omitempty"` + // True: Alert when the bell character is received (output) + AlertBell bool `protobuf:"varint,6,opt,name=alert_bell,json=alertBell,proto3" json:"alert_bell,omitempty"` + // True: Alert when the bell character is received (output_vibra) + AlertBellVibra bool `protobuf:"varint,12,opt,name=alert_bell_vibra,json=alertBellVibra,proto3" json:"alert_bell_vibra,omitempty"` + // True: Alert when the bell character is received (output_buzzer) + AlertBellBuzzer bool `protobuf:"varint,13,opt,name=alert_bell_buzzer,json=alertBellBuzzer,proto3" json:"alert_bell_buzzer,omitempty"` + // use a PWM output instead of a simple on/off output. This will ignore + // the 'output', 'output_ms' and 'active' settings and use the + // device.buzzer_gpio instead. + UsePwm bool `protobuf:"varint,7,opt,name=use_pwm,json=usePwm,proto3" json:"use_pwm,omitempty"` + // The notification will toggle with 'output_ms' for this time of seconds. + // Default is 0 which means don't repeat at all. 60 would mean blink + // and/or beep for 60 seconds + NagTimeout uint32 `protobuf:"varint,14,opt,name=nag_timeout,json=nagTimeout,proto3" json:"nag_timeout,omitempty"` + // When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer + // T-Watch S3 and T-Deck for example have this capability + UseI2SAsBuzzer bool `protobuf:"varint,15,opt,name=use_i2s_as_buzzer,json=useI2sAsBuzzer,proto3" json:"use_i2s_as_buzzer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_ExternalNotificationConfig) Reset() { + *x = ModuleConfig_ExternalNotificationConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_ExternalNotificationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_ExternalNotificationConfig) ProtoMessage() {} + +func (x *ModuleConfig_ExternalNotificationConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[10] + 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 ModuleConfig_ExternalNotificationConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_ExternalNotificationConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 8} +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetOutputMs() uint32 { + if x != nil { + return x.OutputMs + } + return 0 +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetOutput() uint32 { + if x != nil { + return x.Output + } + return 0 +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetOutputVibra() uint32 { + if x != nil { + return x.OutputVibra + } + return 0 +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetOutputBuzzer() uint32 { + if x != nil { + return x.OutputBuzzer + } + return 0 +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertMessage() bool { + if x != nil { + return x.AlertMessage + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertMessageVibra() bool { + if x != nil { + return x.AlertMessageVibra + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertMessageBuzzer() bool { + if x != nil { + return x.AlertMessageBuzzer + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertBell() bool { + if x != nil { + return x.AlertBell + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertBellVibra() bool { + if x != nil { + return x.AlertBellVibra + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetAlertBellBuzzer() bool { + if x != nil { + return x.AlertBellBuzzer + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetUsePwm() bool { + if x != nil { + return x.UsePwm + } + return false +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetNagTimeout() uint32 { + if x != nil { + return x.NagTimeout + } + return 0 +} + +func (x *ModuleConfig_ExternalNotificationConfig) GetUseI2SAsBuzzer() bool { + if x != nil { + return x.UseI2SAsBuzzer + } + return false +} + +// Store and Forward Module Config +type ModuleConfig_StoreForwardConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable the Store and Forward Module + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // TODO: REPLACE + Heartbeat bool `protobuf:"varint,2,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"` + // TODO: REPLACE + Records uint32 `protobuf:"varint,3,opt,name=records,proto3" json:"records,omitempty"` + // TODO: REPLACE + HistoryReturnMax uint32 `protobuf:"varint,4,opt,name=history_return_max,json=historyReturnMax,proto3" json:"history_return_max,omitempty"` + // TODO: REPLACE + HistoryReturnWindow uint32 `protobuf:"varint,5,opt,name=history_return_window,json=historyReturnWindow,proto3" json:"history_return_window,omitempty"` + // Set to true to let this node act as a server that stores received messages and resends them upon request. + IsServer bool `protobuf:"varint,6,opt,name=is_server,json=isServer,proto3" json:"is_server,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_StoreForwardConfig) Reset() { + *x = ModuleConfig_StoreForwardConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_StoreForwardConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_StoreForwardConfig) ProtoMessage() {} + +func (x *ModuleConfig_StoreForwardConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[11] + 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 ModuleConfig_StoreForwardConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_StoreForwardConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 9} +} + +func (x *ModuleConfig_StoreForwardConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_StoreForwardConfig) GetHeartbeat() bool { + if x != nil { + return x.Heartbeat + } + return false +} + +func (x *ModuleConfig_StoreForwardConfig) GetRecords() uint32 { + if x != nil { + return x.Records + } + return 0 +} + +func (x *ModuleConfig_StoreForwardConfig) GetHistoryReturnMax() uint32 { + if x != nil { + return x.HistoryReturnMax + } + return 0 +} + +func (x *ModuleConfig_StoreForwardConfig) GetHistoryReturnWindow() uint32 { + if x != nil { + return x.HistoryReturnWindow + } + return 0 +} + +func (x *ModuleConfig_StoreForwardConfig) GetIsServer() bool { + if x != nil { + return x.IsServer + } + return false +} + +// Preferences for the RangeTestModule +type ModuleConfig_RangeTestConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable the Range Test Module + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Send out range test messages from this node + Sender uint32 `protobuf:"varint,2,opt,name=sender,proto3" json:"sender,omitempty"` + // Bool value indicating that this node should save a RangeTest.csv file. + // ESP32 Only + Save bool `protobuf:"varint,3,opt,name=save,proto3" json:"save,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_RangeTestConfig) Reset() { + *x = ModuleConfig_RangeTestConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_RangeTestConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_RangeTestConfig) ProtoMessage() {} + +func (x *ModuleConfig_RangeTestConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[12] + 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 ModuleConfig_RangeTestConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_RangeTestConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 10} +} + +func (x *ModuleConfig_RangeTestConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_RangeTestConfig) GetSender() uint32 { + if x != nil { + return x.Sender + } + return 0 +} + +func (x *ModuleConfig_RangeTestConfig) GetSave() bool { + if x != nil { + return x.Save + } + return false +} + +// Configuration for both device and environment metrics +type ModuleConfig_TelemetryConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Interval in seconds of how often we should try to send our + // device metrics to the mesh + DeviceUpdateInterval uint32 `protobuf:"varint,1,opt,name=device_update_interval,json=deviceUpdateInterval,proto3" json:"device_update_interval,omitempty"` + EnvironmentUpdateInterval uint32 `protobuf:"varint,2,opt,name=environment_update_interval,json=environmentUpdateInterval,proto3" json:"environment_update_interval,omitempty"` + // Preferences for the Telemetry Module (Environment) + // Enable/Disable the telemetry measurement module measurement collection + EnvironmentMeasurementEnabled bool `protobuf:"varint,3,opt,name=environment_measurement_enabled,json=environmentMeasurementEnabled,proto3" json:"environment_measurement_enabled,omitempty"` + // Enable/Disable the telemetry measurement module on-device display + EnvironmentScreenEnabled bool `protobuf:"varint,4,opt,name=environment_screen_enabled,json=environmentScreenEnabled,proto3" json:"environment_screen_enabled,omitempty"` + // We'll always read the sensor in Celsius, but sometimes we might want to + // display the results in Fahrenheit as a "user preference". + EnvironmentDisplayFahrenheit bool `protobuf:"varint,5,opt,name=environment_display_fahrenheit,json=environmentDisplayFahrenheit,proto3" json:"environment_display_fahrenheit,omitempty"` + // Enable/Disable the air quality metrics + AirQualityEnabled bool `protobuf:"varint,6,opt,name=air_quality_enabled,json=airQualityEnabled,proto3" json:"air_quality_enabled,omitempty"` + // Interval in seconds of how often we should try to send our + // air quality metrics to the mesh + AirQualityInterval uint32 `protobuf:"varint,7,opt,name=air_quality_interval,json=airQualityInterval,proto3" json:"air_quality_interval,omitempty"` + // Enable/disable Power metrics + PowerMeasurementEnabled bool `protobuf:"varint,8,opt,name=power_measurement_enabled,json=powerMeasurementEnabled,proto3" json:"power_measurement_enabled,omitempty"` + // Interval in seconds of how often we should try to send our + // power metrics to the mesh + PowerUpdateInterval uint32 `protobuf:"varint,9,opt,name=power_update_interval,json=powerUpdateInterval,proto3" json:"power_update_interval,omitempty"` + // Enable/Disable the power measurement module on-device display + PowerScreenEnabled bool `protobuf:"varint,10,opt,name=power_screen_enabled,json=powerScreenEnabled,proto3" json:"power_screen_enabled,omitempty"` + // Preferences for the (Health) Telemetry Module + // Enable/Disable the telemetry measurement module measurement collection + HealthMeasurementEnabled bool `protobuf:"varint,11,opt,name=health_measurement_enabled,json=healthMeasurementEnabled,proto3" json:"health_measurement_enabled,omitempty"` + // Interval in seconds of how often we should try to send our + // health metrics to the mesh + HealthUpdateInterval uint32 `protobuf:"varint,12,opt,name=health_update_interval,json=healthUpdateInterval,proto3" json:"health_update_interval,omitempty"` + // Enable/Disable the health telemetry module on-device display + HealthScreenEnabled bool `protobuf:"varint,13,opt,name=health_screen_enabled,json=healthScreenEnabled,proto3" json:"health_screen_enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_TelemetryConfig) Reset() { + *x = ModuleConfig_TelemetryConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_TelemetryConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_TelemetryConfig) ProtoMessage() {} + +func (x *ModuleConfig_TelemetryConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[13] + 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 ModuleConfig_TelemetryConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_TelemetryConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 11} +} + +func (x *ModuleConfig_TelemetryConfig) GetDeviceUpdateInterval() uint32 { + if x != nil { + return x.DeviceUpdateInterval + } + return 0 +} + +func (x *ModuleConfig_TelemetryConfig) GetEnvironmentUpdateInterval() uint32 { + if x != nil { + return x.EnvironmentUpdateInterval + } + return 0 +} + +func (x *ModuleConfig_TelemetryConfig) GetEnvironmentMeasurementEnabled() bool { + if x != nil { + return x.EnvironmentMeasurementEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetEnvironmentScreenEnabled() bool { + if x != nil { + return x.EnvironmentScreenEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetEnvironmentDisplayFahrenheit() bool { + if x != nil { + return x.EnvironmentDisplayFahrenheit + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetAirQualityEnabled() bool { + if x != nil { + return x.AirQualityEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetAirQualityInterval() uint32 { + if x != nil { + return x.AirQualityInterval + } + return 0 +} + +func (x *ModuleConfig_TelemetryConfig) GetPowerMeasurementEnabled() bool { + if x != nil { + return x.PowerMeasurementEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetPowerUpdateInterval() uint32 { + if x != nil { + return x.PowerUpdateInterval + } + return 0 +} + +func (x *ModuleConfig_TelemetryConfig) GetPowerScreenEnabled() bool { + if x != nil { + return x.PowerScreenEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetHealthMeasurementEnabled() bool { + if x != nil { + return x.HealthMeasurementEnabled + } + return false +} + +func (x *ModuleConfig_TelemetryConfig) GetHealthUpdateInterval() uint32 { + if x != nil { + return x.HealthUpdateInterval + } + return 0 +} + +func (x *ModuleConfig_TelemetryConfig) GetHealthScreenEnabled() bool { + if x != nil { + return x.HealthScreenEnabled + } + return false +} + +// Canned Messages Module Config +type ModuleConfig_CannedMessageConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. + Rotary1Enabled bool `protobuf:"varint,1,opt,name=rotary1_enabled,json=rotary1Enabled,proto3" json:"rotary1_enabled,omitempty"` + // GPIO pin for rotary encoder A port. + InputbrokerPinA uint32 `protobuf:"varint,2,opt,name=inputbroker_pin_a,json=inputbrokerPinA,proto3" json:"inputbroker_pin_a,omitempty"` + // GPIO pin for rotary encoder B port. + InputbrokerPinB uint32 `protobuf:"varint,3,opt,name=inputbroker_pin_b,json=inputbrokerPinB,proto3" json:"inputbroker_pin_b,omitempty"` + // GPIO pin for rotary encoder Press port. + InputbrokerPinPress uint32 `protobuf:"varint,4,opt,name=inputbroker_pin_press,json=inputbrokerPinPress,proto3" json:"inputbroker_pin_press,omitempty"` + // Generate input event on CW of this kind. + InputbrokerEventCw ModuleConfig_CannedMessageConfig_InputEventChar `protobuf:"varint,5,opt,name=inputbroker_event_cw,json=inputbrokerEventCw,proto3,enum=meshtastic.ModuleConfig_CannedMessageConfig_InputEventChar" json:"inputbroker_event_cw,omitempty"` + // Generate input event on CCW of this kind. + InputbrokerEventCcw ModuleConfig_CannedMessageConfig_InputEventChar `protobuf:"varint,6,opt,name=inputbroker_event_ccw,json=inputbrokerEventCcw,proto3,enum=meshtastic.ModuleConfig_CannedMessageConfig_InputEventChar" json:"inputbroker_event_ccw,omitempty"` + // Generate input event on Press of this kind. + InputbrokerEventPress ModuleConfig_CannedMessageConfig_InputEventChar `protobuf:"varint,7,opt,name=inputbroker_event_press,json=inputbrokerEventPress,proto3,enum=meshtastic.ModuleConfig_CannedMessageConfig_InputEventChar" json:"inputbroker_event_press,omitempty"` + // Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. + Updown1Enabled bool `protobuf:"varint,8,opt,name=updown1_enabled,json=updown1Enabled,proto3" json:"updown1_enabled,omitempty"` + // Enable/disable CannedMessageModule. + Enabled bool `protobuf:"varint,9,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Input event origin accepted by the canned message module. + // Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any" + AllowInputSource string `protobuf:"bytes,10,opt,name=allow_input_source,json=allowInputSource,proto3" json:"allow_input_source,omitempty"` + // CannedMessageModule also sends a bell character with the messages. + // ExternalNotificationModule can benefit from this feature. + SendBell bool `protobuf:"varint,11,opt,name=send_bell,json=sendBell,proto3" json:"send_bell,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_CannedMessageConfig) Reset() { + *x = ModuleConfig_CannedMessageConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_CannedMessageConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_CannedMessageConfig) ProtoMessage() {} + +func (x *ModuleConfig_CannedMessageConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[14] + 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 ModuleConfig_CannedMessageConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_CannedMessageConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 12} +} + +func (x *ModuleConfig_CannedMessageConfig) GetRotary1Enabled() bool { + if x != nil { + return x.Rotary1Enabled + } + return false +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerPinA() uint32 { + if x != nil { + return x.InputbrokerPinA + } + return 0 +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerPinB() uint32 { + if x != nil { + return x.InputbrokerPinB + } + return 0 +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerPinPress() uint32 { + if x != nil { + return x.InputbrokerPinPress + } + return 0 +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerEventCw() ModuleConfig_CannedMessageConfig_InputEventChar { + if x != nil { + return x.InputbrokerEventCw + } + return ModuleConfig_CannedMessageConfig_NONE +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerEventCcw() ModuleConfig_CannedMessageConfig_InputEventChar { + if x != nil { + return x.InputbrokerEventCcw + } + return ModuleConfig_CannedMessageConfig_NONE +} + +func (x *ModuleConfig_CannedMessageConfig) GetInputbrokerEventPress() ModuleConfig_CannedMessageConfig_InputEventChar { + if x != nil { + return x.InputbrokerEventPress + } + return ModuleConfig_CannedMessageConfig_NONE +} + +func (x *ModuleConfig_CannedMessageConfig) GetUpdown1Enabled() bool { + if x != nil { + return x.Updown1Enabled + } + return false +} + +func (x *ModuleConfig_CannedMessageConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *ModuleConfig_CannedMessageConfig) GetAllowInputSource() string { + if x != nil { + return x.AllowInputSource + } + return "" +} + +func (x *ModuleConfig_CannedMessageConfig) GetSendBell() bool { + if x != nil { + return x.SendBell + } + return false +} + +// Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. +// Initially created for the RAK14001 RGB LED module. +type ModuleConfig_AmbientLightingConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sets LED to on or off. + LedState bool `protobuf:"varint,1,opt,name=led_state,json=ledState,proto3" json:"led_state,omitempty"` + // Sets the current for the LED output. Default is 10. + Current uint32 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"` + // Sets the red LED level. Values are 0-255. + Red uint32 `protobuf:"varint,3,opt,name=red,proto3" json:"red,omitempty"` + // Sets the green LED level. Values are 0-255. + Green uint32 `protobuf:"varint,4,opt,name=green,proto3" json:"green,omitempty"` + // Sets the blue LED level. Values are 0-255. + Blue uint32 `protobuf:"varint,5,opt,name=blue,proto3" json:"blue,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ModuleConfig_AmbientLightingConfig) Reset() { + *x = ModuleConfig_AmbientLightingConfig{} + mi := &file_meshtastic_module_config_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ModuleConfig_AmbientLightingConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfig_AmbientLightingConfig) ProtoMessage() {} + +func (x *ModuleConfig_AmbientLightingConfig) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_module_config_proto_msgTypes[15] + 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 ModuleConfig_AmbientLightingConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig_AmbientLightingConfig) Descriptor() ([]byte, []int) { + return file_meshtastic_module_config_proto_rawDescGZIP(), []int{0, 13} +} + +func (x *ModuleConfig_AmbientLightingConfig) GetLedState() bool { + if x != nil { + return x.LedState + } + return false +} + +func (x *ModuleConfig_AmbientLightingConfig) GetCurrent() uint32 { + if x != nil { + return x.Current + } + return 0 +} + +func (x *ModuleConfig_AmbientLightingConfig) GetRed() uint32 { + if x != nil { + return x.Red + } + return 0 +} + +func (x *ModuleConfig_AmbientLightingConfig) GetGreen() uint32 { + if x != nil { + return x.Green + } + return 0 +} + +func (x *ModuleConfig_AmbientLightingConfig) GetBlue() uint32 { + if x != nil { + return x.Blue + } + return 0 +} + +var File_meshtastic_module_config_proto protoreflect.FileDescriptor + +const file_meshtastic_module_config_proto_rawDesc = "" + + "\n" + + "\x1emeshtastic/module_config.proto\x12\n" + + "meshtastic\"\xf11\n" + + "\fModuleConfig\x129\n" + + "\x04mqtt\x18\x01 \x01(\v2#.meshtastic.ModuleConfig.MQTTConfigH\x00R\x04mqtt\x12?\n" + + "\x06serial\x18\x02 \x01(\v2%.meshtastic.ModuleConfig.SerialConfigH\x00R\x06serial\x12j\n" + + "\x15external_notification\x18\x03 \x01(\v23.meshtastic.ModuleConfig.ExternalNotificationConfigH\x00R\x14externalNotification\x12R\n" + + "\rstore_forward\x18\x04 \x01(\v2+.meshtastic.ModuleConfig.StoreForwardConfigH\x00R\fstoreForward\x12I\n" + + "\n" + + "range_test\x18\x05 \x01(\v2(.meshtastic.ModuleConfig.RangeTestConfigH\x00R\trangeTest\x12H\n" + + "\ttelemetry\x18\x06 \x01(\v2(.meshtastic.ModuleConfig.TelemetryConfigH\x00R\ttelemetry\x12U\n" + + "\x0ecanned_message\x18\a \x01(\v2,.meshtastic.ModuleConfig.CannedMessageConfigH\x00R\rcannedMessage\x12<\n" + + "\x05audio\x18\b \x01(\v2$.meshtastic.ModuleConfig.AudioConfigH\x00R\x05audio\x12X\n" + + "\x0fremote_hardware\x18\t \x01(\v2-.meshtastic.ModuleConfig.RemoteHardwareConfigH\x00R\x0eremoteHardware\x12R\n" + + "\rneighbor_info\x18\n" + + " \x01(\v2+.meshtastic.ModuleConfig.NeighborInfoConfigH\x00R\fneighborInfo\x12[\n" + + "\x10ambient_lighting\x18\v \x01(\v2..meshtastic.ModuleConfig.AmbientLightingConfigH\x00R\x0fambientLighting\x12[\n" + + "\x10detection_sensor\x18\f \x01(\v2..meshtastic.ModuleConfig.DetectionSensorConfigH\x00R\x0fdetectionSensor\x12K\n" + + "\n" + + "paxcounter\x18\r \x01(\v2).meshtastic.ModuleConfig.PaxcounterConfigH\x00R\n" + + "paxcounter\x1a\xc6\x03\n" + + "\n" + + "MQTTConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x18\n" + + "\aaddress\x18\x02 \x01(\tR\aaddress\x12\x1a\n" + + "\busername\x18\x03 \x01(\tR\busername\x12\x1a\n" + + "\bpassword\x18\x04 \x01(\tR\bpassword\x12-\n" + + "\x12encryption_enabled\x18\x05 \x01(\bR\x11encryptionEnabled\x12!\n" + + "\fjson_enabled\x18\x06 \x01(\bR\vjsonEnabled\x12\x1f\n" + + "\vtls_enabled\x18\a \x01(\bR\n" + + "tlsEnabled\x12\x12\n" + + "\x04root\x18\b \x01(\tR\x04root\x125\n" + + "\x17proxy_to_client_enabled\x18\t \x01(\bR\x14proxyToClientEnabled\x122\n" + + "\x15map_reporting_enabled\x18\n" + + " \x01(\bR\x13mapReportingEnabled\x12Z\n" + + "\x13map_report_settings\x18\v \x01(\v2*.meshtastic.ModuleConfig.MapReportSettingsR\x11mapReportSettings\x1av\n" + + "\x11MapReportSettings\x122\n" + + "\x15publish_interval_secs\x18\x01 \x01(\rR\x13publishIntervalSecs\x12-\n" + + "\x12position_precision\x18\x02 \x01(\rR\x11positionPrecision\x1a\xb3\x01\n" + + "\x14RemoteHardwareConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12;\n" + + "\x1aallow_undefined_pin_access\x18\x02 \x01(\bR\x17allowUndefinedPinAccess\x12D\n" + + "\x0eavailable_pins\x18\x03 \x03(\v2\x1d.meshtastic.RemoteHardwarePinR\ravailablePins\x1a\x85\x01\n" + + "\x12NeighborInfoConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12'\n" + + "\x0fupdate_interval\x18\x02 \x01(\rR\x0eupdateInterval\x12,\n" + + "\x12transmit_over_lora\x18\x03 \x01(\bR\x10transmitOverLora\x1a\x87\x04\n" + + "\x15DetectionSensorConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x124\n" + + "\x16minimum_broadcast_secs\x18\x02 \x01(\rR\x14minimumBroadcastSecs\x120\n" + + "\x14state_broadcast_secs\x18\x03 \x01(\rR\x12stateBroadcastSecs\x12\x1b\n" + + "\tsend_bell\x18\x04 \x01(\bR\bsendBell\x12\x12\n" + + "\x04name\x18\x05 \x01(\tR\x04name\x12\x1f\n" + + "\vmonitor_pin\x18\x06 \x01(\rR\n" + + "monitorPin\x12p\n" + + "\x16detection_trigger_type\x18\a \x01(\x0e2:.meshtastic.ModuleConfig.DetectionSensorConfig.TriggerTypeR\x14detectionTriggerType\x12\x1d\n" + + "\n" + + "use_pullup\x18\b \x01(\bR\tusePullup\"\x88\x01\n" + + "\vTriggerType\x12\r\n" + + "\tLOGIC_LOW\x10\x00\x12\x0e\n" + + "\n" + + "LOGIC_HIGH\x10\x01\x12\x10\n" + + "\fFALLING_EDGE\x10\x02\x12\x0f\n" + + "\vRISING_EDGE\x10\x03\x12\x1a\n" + + "\x16EITHER_EDGE_ACTIVE_LOW\x10\x04\x12\x1b\n" + + "\x17EITHER_EDGE_ACTIVE_HIGH\x10\x05\x1a\xa2\x03\n" + + "\vAudioConfig\x12%\n" + + "\x0ecodec2_enabled\x18\x01 \x01(\bR\rcodec2Enabled\x12\x17\n" + + "\aptt_pin\x18\x02 \x01(\rR\x06pttPin\x12I\n" + + "\abitrate\x18\x03 \x01(\x0e2/.meshtastic.ModuleConfig.AudioConfig.Audio_BaudR\abitrate\x12\x15\n" + + "\x06i2s_ws\x18\x04 \x01(\rR\x05i2sWs\x12\x15\n" + + "\x06i2s_sd\x18\x05 \x01(\rR\x05i2sSd\x12\x17\n" + + "\ai2s_din\x18\x06 \x01(\rR\x06i2sDin\x12\x17\n" + + "\ai2s_sck\x18\a \x01(\rR\x06i2sSck\"\xa7\x01\n" + + "\n" + + "Audio_Baud\x12\x12\n" + + "\x0eCODEC2_DEFAULT\x10\x00\x12\x0f\n" + + "\vCODEC2_3200\x10\x01\x12\x0f\n" + + "\vCODEC2_2400\x10\x02\x12\x0f\n" + + "\vCODEC2_1600\x10\x03\x12\x0f\n" + + "\vCODEC2_1400\x10\x04\x12\x0f\n" + + "\vCODEC2_1300\x10\x05\x12\x0f\n" + + "\vCODEC2_1200\x10\x06\x12\x0e\n" + + "\n" + + "CODEC2_700\x10\a\x12\x0f\n" + + "\vCODEC2_700B\x10\b\x1a\xb6\x01\n" + + "\x10PaxcounterConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12<\n" + + "\x1apaxcounter_update_interval\x18\x02 \x01(\rR\x18paxcounterUpdateInterval\x12%\n" + + "\x0ewifi_threshold\x18\x03 \x01(\x05R\rwifiThreshold\x12#\n" + + "\rble_threshold\x18\x04 \x01(\x05R\fbleThreshold\x1a\xb7\x05\n" + + "\fSerialConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x12\n" + + "\x04echo\x18\x02 \x01(\bR\x04echo\x12\x10\n" + + "\x03rxd\x18\x03 \x01(\rR\x03rxd\x12\x10\n" + + "\x03txd\x18\x04 \x01(\rR\x03txd\x12E\n" + + "\x04baud\x18\x05 \x01(\x0e21.meshtastic.ModuleConfig.SerialConfig.Serial_BaudR\x04baud\x12\x18\n" + + "\atimeout\x18\x06 \x01(\rR\atimeout\x12E\n" + + "\x04mode\x18\a \x01(\x0e21.meshtastic.ModuleConfig.SerialConfig.Serial_ModeR\x04mode\x12?\n" + + "\x1coverride_console_serial_port\x18\b \x01(\bR\x19overrideConsoleSerialPort\"\x8a\x02\n" + + "\vSerial_Baud\x12\x10\n" + + "\fBAUD_DEFAULT\x10\x00\x12\f\n" + + "\bBAUD_110\x10\x01\x12\f\n" + + "\bBAUD_300\x10\x02\x12\f\n" + + "\bBAUD_600\x10\x03\x12\r\n" + + "\tBAUD_1200\x10\x04\x12\r\n" + + "\tBAUD_2400\x10\x05\x12\r\n" + + "\tBAUD_4800\x10\x06\x12\r\n" + + "\tBAUD_9600\x10\a\x12\x0e\n" + + "\n" + + "BAUD_19200\x10\b\x12\x0e\n" + + "\n" + + "BAUD_38400\x10\t\x12\x0e\n" + + "\n" + + "BAUD_57600\x10\n" + + "\x12\x0f\n" + + "\vBAUD_115200\x10\v\x12\x0f\n" + + "\vBAUD_230400\x10\f\x12\x0f\n" + + "\vBAUD_460800\x10\r\x12\x0f\n" + + "\vBAUD_576000\x10\x0e\x12\x0f\n" + + "\vBAUD_921600\x10\x0f\"_\n" + + "\vSerial_Mode\x12\v\n" + + "\aDEFAULT\x10\x00\x12\n" + + "\n" + + "\x06SIMPLE\x10\x01\x12\t\n" + + "\x05PROTO\x10\x02\x12\v\n" + + "\aTEXTMSG\x10\x03\x12\b\n" + + "\x04NMEA\x10\x04\x12\v\n" + + "\aCALTOPO\x10\x05\x12\b\n" + + "\x04WS85\x10\x06\x1a\xac\x04\n" + + "\x1aExternalNotificationConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1b\n" + + "\toutput_ms\x18\x02 \x01(\rR\boutputMs\x12\x16\n" + + "\x06output\x18\x03 \x01(\rR\x06output\x12!\n" + + "\foutput_vibra\x18\b \x01(\rR\voutputVibra\x12#\n" + + "\routput_buzzer\x18\t \x01(\rR\foutputBuzzer\x12\x16\n" + + "\x06active\x18\x04 \x01(\bR\x06active\x12#\n" + + "\ralert_message\x18\x05 \x01(\bR\falertMessage\x12.\n" + + "\x13alert_message_vibra\x18\n" + + " \x01(\bR\x11alertMessageVibra\x120\n" + + "\x14alert_message_buzzer\x18\v \x01(\bR\x12alertMessageBuzzer\x12\x1d\n" + + "\n" + + "alert_bell\x18\x06 \x01(\bR\talertBell\x12(\n" + + "\x10alert_bell_vibra\x18\f \x01(\bR\x0ealertBellVibra\x12*\n" + + "\x11alert_bell_buzzer\x18\r \x01(\bR\x0falertBellBuzzer\x12\x17\n" + + "\ause_pwm\x18\a \x01(\bR\x06usePwm\x12\x1f\n" + + "\vnag_timeout\x18\x0e \x01(\rR\n" + + "nagTimeout\x12)\n" + + "\x11use_i2s_as_buzzer\x18\x0f \x01(\bR\x0euseI2sAsBuzzer\x1a\xe5\x01\n" + + "\x12StoreForwardConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1c\n" + + "\theartbeat\x18\x02 \x01(\bR\theartbeat\x12\x18\n" + + "\arecords\x18\x03 \x01(\rR\arecords\x12,\n" + + "\x12history_return_max\x18\x04 \x01(\rR\x10historyReturnMax\x122\n" + + "\x15history_return_window\x18\x05 \x01(\rR\x13historyReturnWindow\x12\x1b\n" + + "\tis_server\x18\x06 \x01(\bR\bisServer\x1aW\n" + + "\x0fRangeTestConfig\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x16\n" + + "\x06sender\x18\x02 \x01(\rR\x06sender\x12\x12\n" + + "\x04save\x18\x03 \x01(\bR\x04save\x1a\xff\x05\n" + + "\x0fTelemetryConfig\x124\n" + + "\x16device_update_interval\x18\x01 \x01(\rR\x14deviceUpdateInterval\x12>\n" + + "\x1benvironment_update_interval\x18\x02 \x01(\rR\x19environmentUpdateInterval\x12F\n" + + "\x1fenvironment_measurement_enabled\x18\x03 \x01(\bR\x1denvironmentMeasurementEnabled\x12<\n" + + "\x1aenvironment_screen_enabled\x18\x04 \x01(\bR\x18environmentScreenEnabled\x12D\n" + + "\x1eenvironment_display_fahrenheit\x18\x05 \x01(\bR\x1cenvironmentDisplayFahrenheit\x12.\n" + + "\x13air_quality_enabled\x18\x06 \x01(\bR\x11airQualityEnabled\x120\n" + + "\x14air_quality_interval\x18\a \x01(\rR\x12airQualityInterval\x12:\n" + + "\x19power_measurement_enabled\x18\b \x01(\bR\x17powerMeasurementEnabled\x122\n" + + "\x15power_update_interval\x18\t \x01(\rR\x13powerUpdateInterval\x120\n" + + "\x14power_screen_enabled\x18\n" + + " \x01(\bR\x12powerScreenEnabled\x12<\n" + + "\x1ahealth_measurement_enabled\x18\v \x01(\bR\x18healthMeasurementEnabled\x124\n" + + "\x16health_update_interval\x18\f \x01(\rR\x14healthUpdateInterval\x122\n" + + "\x15health_screen_enabled\x18\r \x01(\bR\x13healthScreenEnabled\x1a\x92\x06\n" + + "\x13CannedMessageConfig\x12'\n" + + "\x0frotary1_enabled\x18\x01 \x01(\bR\x0erotary1Enabled\x12*\n" + + "\x11inputbroker_pin_a\x18\x02 \x01(\rR\x0finputbrokerPinA\x12*\n" + + "\x11inputbroker_pin_b\x18\x03 \x01(\rR\x0finputbrokerPinB\x122\n" + + "\x15inputbroker_pin_press\x18\x04 \x01(\rR\x13inputbrokerPinPress\x12m\n" + + "\x14inputbroker_event_cw\x18\x05 \x01(\x0e2;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventCharR\x12inputbrokerEventCw\x12o\n" + + "\x15inputbroker_event_ccw\x18\x06 \x01(\x0e2;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventCharR\x13inputbrokerEventCcw\x12s\n" + + "\x17inputbroker_event_press\x18\a \x01(\x0e2;.meshtastic.ModuleConfig.CannedMessageConfig.InputEventCharR\x15inputbrokerEventPress\x12'\n" + + "\x0fupdown1_enabled\x18\b \x01(\bR\x0eupdown1Enabled\x12\x18\n" + + "\aenabled\x18\t \x01(\bR\aenabled\x12,\n" + + "\x12allow_input_source\x18\n" + + " \x01(\tR\x10allowInputSource\x12\x1b\n" + + "\tsend_bell\x18\v \x01(\bR\bsendBell\"c\n" + + "\x0eInputEventChar\x12\b\n" + + "\x04NONE\x10\x00\x12\x06\n" + + "\x02UP\x10\x11\x12\b\n" + + "\x04DOWN\x10\x12\x12\b\n" + + "\x04LEFT\x10\x13\x12\t\n" + + "\x05RIGHT\x10\x14\x12\n" + + "\n" + + "\x06SELECT\x10\n" + + "\x12\b\n" + + "\x04BACK\x10\x1b\x12\n" + + "\n" + + "\x06CANCEL\x10\x18\x1a\x8a\x01\n" + + "\x15AmbientLightingConfig\x12\x1b\n" + + "\tled_state\x18\x01 \x01(\bR\bledState\x12\x18\n" + + "\acurrent\x18\x02 \x01(\rR\acurrent\x12\x10\n" + + "\x03red\x18\x03 \x01(\rR\x03red\x12\x14\n" + + "\x05green\x18\x04 \x01(\rR\x05green\x12\x12\n" + + "\x04blue\x18\x05 \x01(\rR\x04blueB\x11\n" + + "\x0fpayload_variant\"y\n" + + "\x11RemoteHardwarePin\x12\x19\n" + + "\bgpio_pin\x18\x01 \x01(\rR\agpioPin\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x125\n" + + "\x04type\x18\x03 \x01(\x0e2!.meshtastic.RemoteHardwarePinTypeR\x04type*I\n" + + "\x15RemoteHardwarePinType\x12\v\n" + + "\aUNKNOWN\x10\x00\x12\x10\n" + + "\fDIGITAL_READ\x10\x01\x12\x11\n" + + "\rDIGITAL_WRITE\x10\x02Bg\n" + + "\x13com.geeksville.meshB\x12ModuleConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_module_config_proto_rawDescOnce sync.Once + file_meshtastic_module_config_proto_rawDescData []byte +) + +func file_meshtastic_module_config_proto_rawDescGZIP() []byte { + file_meshtastic_module_config_proto_rawDescOnce.Do(func() { + file_meshtastic_module_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_module_config_proto_rawDesc), len(file_meshtastic_module_config_proto_rawDesc))) + }) + return file_meshtastic_module_config_proto_rawDescData +} + +var file_meshtastic_module_config_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_meshtastic_module_config_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_meshtastic_module_config_proto_goTypes = []any{ + (RemoteHardwarePinType)(0), // 0: meshtastic.RemoteHardwarePinType + (ModuleConfig_DetectionSensorConfig_TriggerType)(0), // 1: meshtastic.ModuleConfig.DetectionSensorConfig.TriggerType + (ModuleConfig_AudioConfig_Audio_Baud)(0), // 2: meshtastic.ModuleConfig.AudioConfig.Audio_Baud + (ModuleConfig_SerialConfig_Serial_Baud)(0), // 3: meshtastic.ModuleConfig.SerialConfig.Serial_Baud + (ModuleConfig_SerialConfig_Serial_Mode)(0), // 4: meshtastic.ModuleConfig.SerialConfig.Serial_Mode + (ModuleConfig_CannedMessageConfig_InputEventChar)(0), // 5: meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar + (*ModuleConfig)(nil), // 6: meshtastic.ModuleConfig + (*RemoteHardwarePin)(nil), // 7: meshtastic.RemoteHardwarePin + (*ModuleConfig_MQTTConfig)(nil), // 8: meshtastic.ModuleConfig.MQTTConfig + (*ModuleConfig_MapReportSettings)(nil), // 9: meshtastic.ModuleConfig.MapReportSettings + (*ModuleConfig_RemoteHardwareConfig)(nil), // 10: meshtastic.ModuleConfig.RemoteHardwareConfig + (*ModuleConfig_NeighborInfoConfig)(nil), // 11: meshtastic.ModuleConfig.NeighborInfoConfig + (*ModuleConfig_DetectionSensorConfig)(nil), // 12: meshtastic.ModuleConfig.DetectionSensorConfig + (*ModuleConfig_AudioConfig)(nil), // 13: meshtastic.ModuleConfig.AudioConfig + (*ModuleConfig_PaxcounterConfig)(nil), // 14: meshtastic.ModuleConfig.PaxcounterConfig + (*ModuleConfig_SerialConfig)(nil), // 15: meshtastic.ModuleConfig.SerialConfig + (*ModuleConfig_ExternalNotificationConfig)(nil), // 16: meshtastic.ModuleConfig.ExternalNotificationConfig + (*ModuleConfig_StoreForwardConfig)(nil), // 17: meshtastic.ModuleConfig.StoreForwardConfig + (*ModuleConfig_RangeTestConfig)(nil), // 18: meshtastic.ModuleConfig.RangeTestConfig + (*ModuleConfig_TelemetryConfig)(nil), // 19: meshtastic.ModuleConfig.TelemetryConfig + (*ModuleConfig_CannedMessageConfig)(nil), // 20: meshtastic.ModuleConfig.CannedMessageConfig + (*ModuleConfig_AmbientLightingConfig)(nil), // 21: meshtastic.ModuleConfig.AmbientLightingConfig +} +var file_meshtastic_module_config_proto_depIdxs = []int32{ + 8, // 0: meshtastic.ModuleConfig.mqtt:type_name -> meshtastic.ModuleConfig.MQTTConfig + 15, // 1: meshtastic.ModuleConfig.serial:type_name -> meshtastic.ModuleConfig.SerialConfig + 16, // 2: meshtastic.ModuleConfig.external_notification:type_name -> meshtastic.ModuleConfig.ExternalNotificationConfig + 17, // 3: meshtastic.ModuleConfig.store_forward:type_name -> meshtastic.ModuleConfig.StoreForwardConfig + 18, // 4: meshtastic.ModuleConfig.range_test:type_name -> meshtastic.ModuleConfig.RangeTestConfig + 19, // 5: meshtastic.ModuleConfig.telemetry:type_name -> meshtastic.ModuleConfig.TelemetryConfig + 20, // 6: meshtastic.ModuleConfig.canned_message:type_name -> meshtastic.ModuleConfig.CannedMessageConfig + 13, // 7: meshtastic.ModuleConfig.audio:type_name -> meshtastic.ModuleConfig.AudioConfig + 10, // 8: meshtastic.ModuleConfig.remote_hardware:type_name -> meshtastic.ModuleConfig.RemoteHardwareConfig + 11, // 9: meshtastic.ModuleConfig.neighbor_info:type_name -> meshtastic.ModuleConfig.NeighborInfoConfig + 21, // 10: meshtastic.ModuleConfig.ambient_lighting:type_name -> meshtastic.ModuleConfig.AmbientLightingConfig + 12, // 11: meshtastic.ModuleConfig.detection_sensor:type_name -> meshtastic.ModuleConfig.DetectionSensorConfig + 14, // 12: meshtastic.ModuleConfig.paxcounter:type_name -> meshtastic.ModuleConfig.PaxcounterConfig + 0, // 13: meshtastic.RemoteHardwarePin.type:type_name -> meshtastic.RemoteHardwarePinType + 9, // 14: meshtastic.ModuleConfig.MQTTConfig.map_report_settings:type_name -> meshtastic.ModuleConfig.MapReportSettings + 7, // 15: meshtastic.ModuleConfig.RemoteHardwareConfig.available_pins:type_name -> meshtastic.RemoteHardwarePin + 1, // 16: meshtastic.ModuleConfig.DetectionSensorConfig.detection_trigger_type:type_name -> meshtastic.ModuleConfig.DetectionSensorConfig.TriggerType + 2, // 17: meshtastic.ModuleConfig.AudioConfig.bitrate:type_name -> meshtastic.ModuleConfig.AudioConfig.Audio_Baud + 3, // 18: meshtastic.ModuleConfig.SerialConfig.baud:type_name -> meshtastic.ModuleConfig.SerialConfig.Serial_Baud + 4, // 19: meshtastic.ModuleConfig.SerialConfig.mode:type_name -> meshtastic.ModuleConfig.SerialConfig.Serial_Mode + 5, // 20: meshtastic.ModuleConfig.CannedMessageConfig.inputbroker_event_cw:type_name -> meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar + 5, // 21: meshtastic.ModuleConfig.CannedMessageConfig.inputbroker_event_ccw:type_name -> meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar + 5, // 22: meshtastic.ModuleConfig.CannedMessageConfig.inputbroker_event_press:type_name -> meshtastic.ModuleConfig.CannedMessageConfig.InputEventChar + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name +} + +func init() { file_meshtastic_module_config_proto_init() } +func file_meshtastic_module_config_proto_init() { + if File_meshtastic_module_config_proto != nil { + return + } + file_meshtastic_module_config_proto_msgTypes[0].OneofWrappers = []any{ + (*ModuleConfig_Mqtt)(nil), + (*ModuleConfig_Serial)(nil), + (*ModuleConfig_ExternalNotification)(nil), + (*ModuleConfig_StoreForward)(nil), + (*ModuleConfig_RangeTest)(nil), + (*ModuleConfig_Telemetry)(nil), + (*ModuleConfig_CannedMessage)(nil), + (*ModuleConfig_Audio)(nil), + (*ModuleConfig_RemoteHardware)(nil), + (*ModuleConfig_NeighborInfo)(nil), + (*ModuleConfig_AmbientLighting)(nil), + (*ModuleConfig_DetectionSensor)(nil), + (*ModuleConfig_Paxcounter)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_module_config_proto_rawDesc), len(file_meshtastic_module_config_proto_rawDesc)), + NumEnums: 6, + NumMessages: 16, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_module_config_proto_goTypes, + DependencyIndexes: file_meshtastic_module_config_proto_depIdxs, + EnumInfos: file_meshtastic_module_config_proto_enumTypes, + MessageInfos: file_meshtastic_module_config_proto_msgTypes, + }.Build() + File_meshtastic_module_config_proto = out.File + file_meshtastic_module_config_proto_goTypes = nil + file_meshtastic_module_config_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/mqtt.pb.go b/proto/generated/meshtastic/mqtt.pb.go new file mode 100644 index 0000000..42103a6 --- /dev/null +++ b/proto/generated/meshtastic/mqtt.pb.go @@ -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 generated + +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\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_mqtt_proto_rawDescOnce sync.Once + file_meshtastic_mqtt_proto_rawDescData []byte +) + +func file_meshtastic_mqtt_proto_rawDescGZIP() []byte { + file_meshtastic_mqtt_proto_rawDescOnce.Do(func() { + file_meshtastic_mqtt_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_mqtt_proto_rawDesc), len(file_meshtastic_mqtt_proto_rawDesc))) + }) + return file_meshtastic_mqtt_proto_rawDescData +} + +var file_meshtastic_mqtt_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_meshtastic_mqtt_proto_goTypes = []any{ + (*ServiceEnvelope)(nil), // 0: meshtastic.ServiceEnvelope + (*MapReport)(nil), // 1: meshtastic.MapReport + (*MeshPacket)(nil), // 2: meshtastic.MeshPacket + (Config_DeviceConfig_Role)(0), // 3: meshtastic.Config.DeviceConfig.Role + (HardwareModel)(0), // 4: meshtastic.HardwareModel + (Config_LoRaConfig_RegionCode)(0), // 5: meshtastic.Config.LoRaConfig.RegionCode + (Config_LoRaConfig_ModemPreset)(0), // 6: meshtastic.Config.LoRaConfig.ModemPreset +} +var file_meshtastic_mqtt_proto_depIdxs = []int32{ + 2, // 0: meshtastic.ServiceEnvelope.packet:type_name -> meshtastic.MeshPacket + 3, // 1: meshtastic.MapReport.role:type_name -> meshtastic.Config.DeviceConfig.Role + 4, // 2: meshtastic.MapReport.hw_model:type_name -> meshtastic.HardwareModel + 5, // 3: meshtastic.MapReport.region:type_name -> meshtastic.Config.LoRaConfig.RegionCode + 6, // 4: meshtastic.MapReport.modem_preset:type_name -> meshtastic.Config.LoRaConfig.ModemPreset + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_meshtastic_mqtt_proto_init() } +func file_meshtastic_mqtt_proto_init() { + if File_meshtastic_mqtt_proto != nil { + return + } + file_meshtastic_config_proto_init() + file_meshtastic_mesh_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_mqtt_proto_rawDesc), len(file_meshtastic_mqtt_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_mqtt_proto_goTypes, + DependencyIndexes: file_meshtastic_mqtt_proto_depIdxs, + MessageInfos: file_meshtastic_mqtt_proto_msgTypes, + }.Build() + File_meshtastic_mqtt_proto = out.File + file_meshtastic_mqtt_proto_goTypes = nil + file_meshtastic_mqtt_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/paxcount.pb.go b/proto/generated/meshtastic/paxcount.pb.go new file mode 100644 index 0000000..4cfb585 --- /dev/null +++ b/proto/generated/meshtastic/paxcount.pb.go @@ -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 generated + +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\x06uptimeBc\n" + + "\x13com.geeksville.meshB\x0ePaxcountProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/portnums.pb.go b/proto/generated/meshtastic/portnums.pb.go new file mode 100644 index 0000000..7cf4372 --- /dev/null +++ b/proto/generated/meshtastic/portnums.pb.go @@ -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 generated + +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\x03B]\n" + + "\x13com.geeksville.meshB\bPortnumsZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/powermon.pb.go b/proto/generated/meshtastic/powermon.pb.go new file mode 100644 index 0000000..0d87400 --- /dev/null +++ b/proto/generated/meshtastic/powermon.pb.go @@ -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 generated + +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\x10qBc\n" + + "\x13com.geeksville.meshB\x0ePowerMonProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/remote_hardware.pb.go b/proto/generated/meshtastic/remote_hardware.pb.go new file mode 100644 index 0000000..fb0691d --- /dev/null +++ b/proto/generated/meshtastic/remote_hardware.pb.go @@ -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 generated + +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\x05Bc\n" + + "\x13com.geeksville.meshB\x0eRemoteHardwareZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/rtttl.pb.go b/proto/generated/meshtastic/rtttl.pb.go new file mode 100644 index 0000000..a5446e8 --- /dev/null +++ b/proto/generated/meshtastic/rtttl.pb.go @@ -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 generated + +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\bringtoneBf\n" + + "\x13com.geeksville.meshB\x11RTTTLConfigProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/storeforward.pb.go b/proto/generated/meshtastic/storeforward.pb.go new file mode 100644 index 0000000..7adf89f --- /dev/null +++ b/proto/generated/meshtastic/storeforward.pb.go @@ -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 generated + +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" + + "\avariantBj\n" + + "\x13com.geeksville.meshB\x15StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/meshtastic/telemetry.pb.go b/proto/generated/meshtastic/telemetry.pb.go new file mode 100644 index 0000000..d4d3d3a --- /dev/null +++ b/proto/generated/meshtastic/telemetry.pb.go @@ -0,0 +1,1486 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v5.29.3 +// source: meshtastic/telemetry.proto + +package generated + +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) +) + +// Supported I2C Sensors for telemetry in Meshtastic +type TelemetrySensorType int32 + +const ( + // No external telemetry sensor explicitly set + TelemetrySensorType_SENSOR_UNSET TelemetrySensorType = 0 + // High accuracy temperature, pressure, humidity + TelemetrySensorType_BME280 TelemetrySensorType = 1 + // High accuracy temperature, pressure, humidity, and air resistance + TelemetrySensorType_BME680 TelemetrySensorType = 2 + // Very high accuracy temperature + TelemetrySensorType_MCP9808 TelemetrySensorType = 3 + // Moderate accuracy current and voltage + TelemetrySensorType_INA260 TelemetrySensorType = 4 + // Moderate accuracy current and voltage + TelemetrySensorType_INA219 TelemetrySensorType = 5 + // High accuracy temperature and pressure + TelemetrySensorType_BMP280 TelemetrySensorType = 6 + // High accuracy temperature and humidity + TelemetrySensorType_SHTC3 TelemetrySensorType = 7 + // High accuracy pressure + TelemetrySensorType_LPS22 TelemetrySensorType = 8 + // 3-Axis magnetic sensor + TelemetrySensorType_QMC6310 TelemetrySensorType = 9 + // 6-Axis inertial measurement sensor + TelemetrySensorType_QMI8658 TelemetrySensorType = 10 + // 3-Axis magnetic sensor + TelemetrySensorType_QMC5883L TelemetrySensorType = 11 + // High accuracy temperature and humidity + TelemetrySensorType_SHT31 TelemetrySensorType = 12 + // PM2.5 air quality sensor + TelemetrySensorType_PMSA003I TelemetrySensorType = 13 + // INA3221 3 Channel Voltage / Current Sensor + TelemetrySensorType_INA3221 TelemetrySensorType = 14 + // BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) + TelemetrySensorType_BMP085 TelemetrySensorType = 15 + // RCWL-9620 Doppler Radar Distance Sensor, used for water level detection + TelemetrySensorType_RCWL9620 TelemetrySensorType = 16 + // Sensirion High accuracy temperature and humidity + TelemetrySensorType_SHT4X TelemetrySensorType = 17 + // VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + TelemetrySensorType_VEML7700 TelemetrySensorType = 18 + // MLX90632 non-contact IR temperature sensor. + TelemetrySensorType_MLX90632 TelemetrySensorType = 19 + // TI OPT3001 Ambient Light Sensor + TelemetrySensorType_OPT3001 TelemetrySensorType = 20 + // Lite On LTR-390UV-01 UV Light Sensor + TelemetrySensorType_LTR390UV TelemetrySensorType = 21 + // AMS TSL25911FN RGB Light Sensor + TelemetrySensorType_TSL25911FN TelemetrySensorType = 22 + // AHT10 Integrated temperature and humidity sensor + TelemetrySensorType_AHT10 TelemetrySensorType = 23 + // DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) + TelemetrySensorType_DFROBOT_LARK TelemetrySensorType = 24 + // NAU7802 Scale Chip or compatible + TelemetrySensorType_NAU7802 TelemetrySensorType = 25 + // BMP3XX High accuracy temperature and pressure + TelemetrySensorType_BMP3XX TelemetrySensorType = 26 + // ICM-20948 9-Axis digital motion processor + TelemetrySensorType_ICM20948 TelemetrySensorType = 27 + // MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) + TelemetrySensorType_MAX17048 TelemetrySensorType = 28 + // Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor + TelemetrySensorType_CUSTOM_SENSOR TelemetrySensorType = 29 + // MAX30102 Pulse Oximeter and Heart-Rate Sensor + TelemetrySensorType_MAX30102 TelemetrySensorType = 30 + // MLX90614 non-contact IR temperature sensor + TelemetrySensorType_MLX90614 TelemetrySensorType = 31 + // SCD40/SCD41 CO2, humidity, temperature sensor + TelemetrySensorType_SCD4X TelemetrySensorType = 32 + // ClimateGuard RadSens, radiation, Geiger-Muller Tube + TelemetrySensorType_RADSENS TelemetrySensorType = 33 + // High accuracy current and voltage + TelemetrySensorType_INA226 TelemetrySensorType = 34 + // DFRobot Gravity tipping bucket rain gauge + TelemetrySensorType_DFROBOT_RAIN TelemetrySensorType = 35 + // Infineon DPS310 High accuracy pressure and temperature + TelemetrySensorType_DPS310 TelemetrySensorType = 36 + // RAKWireless RAK12035 Soil Moisture Sensor Module + TelemetrySensorType_RAK12035 TelemetrySensorType = 37 +) + +// Enum value maps for TelemetrySensorType. +var ( + TelemetrySensorType_name = map[int32]string{ + 0: "SENSOR_UNSET", + 1: "BME280", + 2: "BME680", + 3: "MCP9808", + 4: "INA260", + 5: "INA219", + 6: "BMP280", + 7: "SHTC3", + 8: "LPS22", + 9: "QMC6310", + 10: "QMI8658", + 11: "QMC5883L", + 12: "SHT31", + 13: "PMSA003I", + 14: "INA3221", + 15: "BMP085", + 16: "RCWL9620", + 17: "SHT4X", + 18: "VEML7700", + 19: "MLX90632", + 20: "OPT3001", + 21: "LTR390UV", + 22: "TSL25911FN", + 23: "AHT10", + 24: "DFROBOT_LARK", + 25: "NAU7802", + 26: "BMP3XX", + 27: "ICM20948", + 28: "MAX17048", + 29: "CUSTOM_SENSOR", + 30: "MAX30102", + 31: "MLX90614", + 32: "SCD4X", + 33: "RADSENS", + 34: "INA226", + 35: "DFROBOT_RAIN", + 36: "DPS310", + 37: "RAK12035", + } + TelemetrySensorType_value = map[string]int32{ + "SENSOR_UNSET": 0, + "BME280": 1, + "BME680": 2, + "MCP9808": 3, + "INA260": 4, + "INA219": 5, + "BMP280": 6, + "SHTC3": 7, + "LPS22": 8, + "QMC6310": 9, + "QMI8658": 10, + "QMC5883L": 11, + "SHT31": 12, + "PMSA003I": 13, + "INA3221": 14, + "BMP085": 15, + "RCWL9620": 16, + "SHT4X": 17, + "VEML7700": 18, + "MLX90632": 19, + "OPT3001": 20, + "LTR390UV": 21, + "TSL25911FN": 22, + "AHT10": 23, + "DFROBOT_LARK": 24, + "NAU7802": 25, + "BMP3XX": 26, + "ICM20948": 27, + "MAX17048": 28, + "CUSTOM_SENSOR": 29, + "MAX30102": 30, + "MLX90614": 31, + "SCD4X": 32, + "RADSENS": 33, + "INA226": 34, + "DFROBOT_RAIN": 35, + "DPS310": 36, + "RAK12035": 37, + } +) + +func (x TelemetrySensorType) Enum() *TelemetrySensorType { + p := new(TelemetrySensorType) + *p = x + return p +} + +func (x TelemetrySensorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TelemetrySensorType) Descriptor() protoreflect.EnumDescriptor { + return file_meshtastic_telemetry_proto_enumTypes[0].Descriptor() +} + +func (TelemetrySensorType) Type() protoreflect.EnumType { + return &file_meshtastic_telemetry_proto_enumTypes[0] +} + +func (x TelemetrySensorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TelemetrySensorType.Descriptor instead. +func (TelemetrySensorType) EnumDescriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{0} +} + +// Key native device metrics such as battery level +type DeviceMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // 0-100 (>100 means powered) + BatteryLevel *uint32 `protobuf:"varint,1,opt,name=battery_level,json=batteryLevel,proto3,oneof" json:"battery_level,omitempty"` + // Voltage measured + Voltage *float32 `protobuf:"fixed32,2,opt,name=voltage,proto3,oneof" json:"voltage,omitempty"` + // Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + ChannelUtilization *float32 `protobuf:"fixed32,3,opt,name=channel_utilization,json=channelUtilization,proto3,oneof" json:"channel_utilization,omitempty"` + // Percent of airtime for transmission used within the last hour. + AirUtilTx *float32 `protobuf:"fixed32,4,opt,name=air_util_tx,json=airUtilTx,proto3,oneof" json:"air_util_tx,omitempty"` + // How long the device has been running since the last reboot (in seconds) + UptimeSeconds *uint32 `protobuf:"varint,5,opt,name=uptime_seconds,json=uptimeSeconds,proto3,oneof" json:"uptime_seconds,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeviceMetrics) Reset() { + *x = DeviceMetrics{} + mi := &file_meshtastic_telemetry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeviceMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeviceMetrics) ProtoMessage() {} + +func (x *DeviceMetrics) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 DeviceMetrics.ProtoReflect.Descriptor instead. +func (*DeviceMetrics) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{0} +} + +func (x *DeviceMetrics) GetBatteryLevel() uint32 { + if x != nil && x.BatteryLevel != nil { + return *x.BatteryLevel + } + return 0 +} + +func (x *DeviceMetrics) GetVoltage() float32 { + if x != nil && x.Voltage != nil { + return *x.Voltage + } + return 0 +} + +func (x *DeviceMetrics) GetChannelUtilization() float32 { + if x != nil && x.ChannelUtilization != nil { + return *x.ChannelUtilization + } + return 0 +} + +func (x *DeviceMetrics) GetAirUtilTx() float32 { + if x != nil && x.AirUtilTx != nil { + return *x.AirUtilTx + } + return 0 +} + +func (x *DeviceMetrics) GetUptimeSeconds() uint32 { + if x != nil && x.UptimeSeconds != nil { + return *x.UptimeSeconds + } + return 0 +} + +// Weather station or other environmental metrics +type EnvironmentMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Temperature measured + Temperature *float32 `protobuf:"fixed32,1,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"` + // Relative humidity percent measured + RelativeHumidity *float32 `protobuf:"fixed32,2,opt,name=relative_humidity,json=relativeHumidity,proto3,oneof" json:"relative_humidity,omitempty"` + // Barometric pressure in hPA measured + BarometricPressure *float32 `protobuf:"fixed32,3,opt,name=barometric_pressure,json=barometricPressure,proto3,oneof" json:"barometric_pressure,omitempty"` + // Gas resistance in MOhm measured + GasResistance *float32 `protobuf:"fixed32,4,opt,name=gas_resistance,json=gasResistance,proto3,oneof" json:"gas_resistance,omitempty"` + // Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + Voltage *float32 `protobuf:"fixed32,5,opt,name=voltage,proto3,oneof" json:"voltage,omitempty"` + // Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + Current *float32 `protobuf:"fixed32,6,opt,name=current,proto3,oneof" json:"current,omitempty"` + // relative scale IAQ value as measured by Bosch BME680 . value 0-500. + // Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. + Iaq *uint32 `protobuf:"varint,7,opt,name=iaq,proto3,oneof" json:"iaq,omitempty"` + // RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. + Distance *float32 `protobuf:"fixed32,8,opt,name=distance,proto3,oneof" json:"distance,omitempty"` + // VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + Lux *float32 `protobuf:"fixed32,9,opt,name=lux,proto3,oneof" json:"lux,omitempty"` + // VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. + WhiteLux *float32 `protobuf:"fixed32,10,opt,name=white_lux,json=whiteLux,proto3,oneof" json:"white_lux,omitempty"` + // Infrared lux + IrLux *float32 `protobuf:"fixed32,11,opt,name=ir_lux,json=irLux,proto3,oneof" json:"ir_lux,omitempty"` + // Ultraviolet lux + UvLux *float32 `protobuf:"fixed32,12,opt,name=uv_lux,json=uvLux,proto3,oneof" json:"uv_lux,omitempty"` + // Wind direction in degrees + // 0 degrees = North, 90 = East, etc... + WindDirection *uint32 `protobuf:"varint,13,opt,name=wind_direction,json=windDirection,proto3,oneof" json:"wind_direction,omitempty"` + // Wind speed in m/s + WindSpeed *float32 `protobuf:"fixed32,14,opt,name=wind_speed,json=windSpeed,proto3,oneof" json:"wind_speed,omitempty"` + // Weight in KG + Weight *float32 `protobuf:"fixed32,15,opt,name=weight,proto3,oneof" json:"weight,omitempty"` + // Wind gust in m/s + WindGust *float32 `protobuf:"fixed32,16,opt,name=wind_gust,json=windGust,proto3,oneof" json:"wind_gust,omitempty"` + // Wind lull in m/s + WindLull *float32 `protobuf:"fixed32,17,opt,name=wind_lull,json=windLull,proto3,oneof" json:"wind_lull,omitempty"` + // Radiation in µR/h + Radiation *float32 `protobuf:"fixed32,18,opt,name=radiation,proto3,oneof" json:"radiation,omitempty"` + // Rainfall in the last hour in mm + Rainfall_1H *float32 `protobuf:"fixed32,19,opt,name=rainfall_1h,json=rainfall1h,proto3,oneof" json:"rainfall_1h,omitempty"` + // Rainfall in the last 24 hours in mm + Rainfall_24H *float32 `protobuf:"fixed32,20,opt,name=rainfall_24h,json=rainfall24h,proto3,oneof" json:"rainfall_24h,omitempty"` + // Soil moisture measured (% 1-100) + SoilMoisture *uint32 `protobuf:"varint,21,opt,name=soil_moisture,json=soilMoisture,proto3,oneof" json:"soil_moisture,omitempty"` + // Soil temperature measured (*C) + SoilTemperature *float32 `protobuf:"fixed32,22,opt,name=soil_temperature,json=soilTemperature,proto3,oneof" json:"soil_temperature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnvironmentMetrics) Reset() { + *x = EnvironmentMetrics{} + mi := &file_meshtastic_telemetry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnvironmentMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvironmentMetrics) ProtoMessage() {} + +func (x *EnvironmentMetrics) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 EnvironmentMetrics.ProtoReflect.Descriptor instead. +func (*EnvironmentMetrics) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{1} +} + +func (x *EnvironmentMetrics) GetTemperature() float32 { + if x != nil && x.Temperature != nil { + return *x.Temperature + } + return 0 +} + +func (x *EnvironmentMetrics) GetRelativeHumidity() float32 { + if x != nil && x.RelativeHumidity != nil { + return *x.RelativeHumidity + } + return 0 +} + +func (x *EnvironmentMetrics) GetBarometricPressure() float32 { + if x != nil && x.BarometricPressure != nil { + return *x.BarometricPressure + } + return 0 +} + +func (x *EnvironmentMetrics) GetGasResistance() float32 { + if x != nil && x.GasResistance != nil { + return *x.GasResistance + } + return 0 +} + +func (x *EnvironmentMetrics) GetVoltage() float32 { + if x != nil && x.Voltage != nil { + return *x.Voltage + } + return 0 +} + +func (x *EnvironmentMetrics) GetCurrent() float32 { + if x != nil && x.Current != nil { + return *x.Current + } + return 0 +} + +func (x *EnvironmentMetrics) GetIaq() uint32 { + if x != nil && x.Iaq != nil { + return *x.Iaq + } + return 0 +} + +func (x *EnvironmentMetrics) GetDistance() float32 { + if x != nil && x.Distance != nil { + return *x.Distance + } + return 0 +} + +func (x *EnvironmentMetrics) GetLux() float32 { + if x != nil && x.Lux != nil { + return *x.Lux + } + return 0 +} + +func (x *EnvironmentMetrics) GetWhiteLux() float32 { + if x != nil && x.WhiteLux != nil { + return *x.WhiteLux + } + return 0 +} + +func (x *EnvironmentMetrics) GetIrLux() float32 { + if x != nil && x.IrLux != nil { + return *x.IrLux + } + return 0 +} + +func (x *EnvironmentMetrics) GetUvLux() float32 { + if x != nil && x.UvLux != nil { + return *x.UvLux + } + return 0 +} + +func (x *EnvironmentMetrics) GetWindDirection() uint32 { + if x != nil && x.WindDirection != nil { + return *x.WindDirection + } + return 0 +} + +func (x *EnvironmentMetrics) GetWindSpeed() float32 { + if x != nil && x.WindSpeed != nil { + return *x.WindSpeed + } + return 0 +} + +func (x *EnvironmentMetrics) GetWeight() float32 { + if x != nil && x.Weight != nil { + return *x.Weight + } + return 0 +} + +func (x *EnvironmentMetrics) GetWindGust() float32 { + if x != nil && x.WindGust != nil { + return *x.WindGust + } + return 0 +} + +func (x *EnvironmentMetrics) GetWindLull() float32 { + if x != nil && x.WindLull != nil { + return *x.WindLull + } + return 0 +} + +func (x *EnvironmentMetrics) GetRadiation() float32 { + if x != nil && x.Radiation != nil { + return *x.Radiation + } + return 0 +} + +func (x *EnvironmentMetrics) GetRainfall_1H() float32 { + if x != nil && x.Rainfall_1H != nil { + return *x.Rainfall_1H + } + return 0 +} + +func (x *EnvironmentMetrics) GetRainfall_24H() float32 { + if x != nil && x.Rainfall_24H != nil { + return *x.Rainfall_24H + } + return 0 +} + +func (x *EnvironmentMetrics) GetSoilMoisture() uint32 { + if x != nil && x.SoilMoisture != nil { + return *x.SoilMoisture + } + return 0 +} + +func (x *EnvironmentMetrics) GetSoilTemperature() float32 { + if x != nil && x.SoilTemperature != nil { + return *x.SoilTemperature + } + return 0 +} + +// Power Metrics (voltage / current / etc) +type PowerMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Voltage (Ch1) + Ch1Voltage *float32 `protobuf:"fixed32,1,opt,name=ch1_voltage,json=ch1Voltage,proto3,oneof" json:"ch1_voltage,omitempty"` + // Current (Ch1) + Ch1Current *float32 `protobuf:"fixed32,2,opt,name=ch1_current,json=ch1Current,proto3,oneof" json:"ch1_current,omitempty"` + // Voltage (Ch2) + Ch2Voltage *float32 `protobuf:"fixed32,3,opt,name=ch2_voltage,json=ch2Voltage,proto3,oneof" json:"ch2_voltage,omitempty"` + // Current (Ch2) + Ch2Current *float32 `protobuf:"fixed32,4,opt,name=ch2_current,json=ch2Current,proto3,oneof" json:"ch2_current,omitempty"` + // Voltage (Ch3) + Ch3Voltage *float32 `protobuf:"fixed32,5,opt,name=ch3_voltage,json=ch3Voltage,proto3,oneof" json:"ch3_voltage,omitempty"` + // Current (Ch3) + Ch3Current *float32 `protobuf:"fixed32,6,opt,name=ch3_current,json=ch3Current,proto3,oneof" json:"ch3_current,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PowerMetrics) Reset() { + *x = PowerMetrics{} + mi := &file_meshtastic_telemetry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PowerMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PowerMetrics) ProtoMessage() {} + +func (x *PowerMetrics) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 PowerMetrics.ProtoReflect.Descriptor instead. +func (*PowerMetrics) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{2} +} + +func (x *PowerMetrics) GetCh1Voltage() float32 { + if x != nil && x.Ch1Voltage != nil { + return *x.Ch1Voltage + } + return 0 +} + +func (x *PowerMetrics) GetCh1Current() float32 { + if x != nil && x.Ch1Current != nil { + return *x.Ch1Current + } + return 0 +} + +func (x *PowerMetrics) GetCh2Voltage() float32 { + if x != nil && x.Ch2Voltage != nil { + return *x.Ch2Voltage + } + return 0 +} + +func (x *PowerMetrics) GetCh2Current() float32 { + if x != nil && x.Ch2Current != nil { + return *x.Ch2Current + } + return 0 +} + +func (x *PowerMetrics) GetCh3Voltage() float32 { + if x != nil && x.Ch3Voltage != nil { + return *x.Ch3Voltage + } + return 0 +} + +func (x *PowerMetrics) GetCh3Current() float32 { + if x != nil && x.Ch3Current != nil { + return *x.Ch3Current + } + return 0 +} + +// Air quality metrics +type AirQualityMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Concentration Units Standard PM1.0 + Pm10Standard *uint32 `protobuf:"varint,1,opt,name=pm10_standard,json=pm10Standard,proto3,oneof" json:"pm10_standard,omitempty"` + // Concentration Units Standard PM2.5 + Pm25Standard *uint32 `protobuf:"varint,2,opt,name=pm25_standard,json=pm25Standard,proto3,oneof" json:"pm25_standard,omitempty"` + // Concentration Units Standard PM10.0 + Pm100Standard *uint32 `protobuf:"varint,3,opt,name=pm100_standard,json=pm100Standard,proto3,oneof" json:"pm100_standard,omitempty"` + // Concentration Units Environmental PM1.0 + Pm10Environmental *uint32 `protobuf:"varint,4,opt,name=pm10_environmental,json=pm10Environmental,proto3,oneof" json:"pm10_environmental,omitempty"` + // Concentration Units Environmental PM2.5 + Pm25Environmental *uint32 `protobuf:"varint,5,opt,name=pm25_environmental,json=pm25Environmental,proto3,oneof" json:"pm25_environmental,omitempty"` + // Concentration Units Environmental PM10.0 + Pm100Environmental *uint32 `protobuf:"varint,6,opt,name=pm100_environmental,json=pm100Environmental,proto3,oneof" json:"pm100_environmental,omitempty"` + // 0.3um Particle Count + Particles_03Um *uint32 `protobuf:"varint,7,opt,name=particles_03um,json=particles03um,proto3,oneof" json:"particles_03um,omitempty"` + // 0.5um Particle Count + Particles_05Um *uint32 `protobuf:"varint,8,opt,name=particles_05um,json=particles05um,proto3,oneof" json:"particles_05um,omitempty"` + // 1.0um Particle Count + Particles_10Um *uint32 `protobuf:"varint,9,opt,name=particles_10um,json=particles10um,proto3,oneof" json:"particles_10um,omitempty"` + // 2.5um Particle Count + Particles_25Um *uint32 `protobuf:"varint,10,opt,name=particles_25um,json=particles25um,proto3,oneof" json:"particles_25um,omitempty"` + // 5.0um Particle Count + Particles_50Um *uint32 `protobuf:"varint,11,opt,name=particles_50um,json=particles50um,proto3,oneof" json:"particles_50um,omitempty"` + // 10.0um Particle Count + Particles_100Um *uint32 `protobuf:"varint,12,opt,name=particles_100um,json=particles100um,proto3,oneof" json:"particles_100um,omitempty"` + // CO2 concentration in ppm + Co2 *uint32 `protobuf:"varint,13,opt,name=co2,proto3,oneof" json:"co2,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AirQualityMetrics) Reset() { + *x = AirQualityMetrics{} + mi := &file_meshtastic_telemetry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AirQualityMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AirQualityMetrics) ProtoMessage() {} + +func (x *AirQualityMetrics) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 AirQualityMetrics.ProtoReflect.Descriptor instead. +func (*AirQualityMetrics) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{3} +} + +func (x *AirQualityMetrics) GetPm10Standard() uint32 { + if x != nil && x.Pm10Standard != nil { + return *x.Pm10Standard + } + return 0 +} + +func (x *AirQualityMetrics) GetPm25Standard() uint32 { + if x != nil && x.Pm25Standard != nil { + return *x.Pm25Standard + } + return 0 +} + +func (x *AirQualityMetrics) GetPm100Standard() uint32 { + if x != nil && x.Pm100Standard != nil { + return *x.Pm100Standard + } + return 0 +} + +func (x *AirQualityMetrics) GetPm10Environmental() uint32 { + if x != nil && x.Pm10Environmental != nil { + return *x.Pm10Environmental + } + return 0 +} + +func (x *AirQualityMetrics) GetPm25Environmental() uint32 { + if x != nil && x.Pm25Environmental != nil { + return *x.Pm25Environmental + } + return 0 +} + +func (x *AirQualityMetrics) GetPm100Environmental() uint32 { + if x != nil && x.Pm100Environmental != nil { + return *x.Pm100Environmental + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_03Um() uint32 { + if x != nil && x.Particles_03Um != nil { + return *x.Particles_03Um + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_05Um() uint32 { + if x != nil && x.Particles_05Um != nil { + return *x.Particles_05Um + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_10Um() uint32 { + if x != nil && x.Particles_10Um != nil { + return *x.Particles_10Um + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_25Um() uint32 { + if x != nil && x.Particles_25Um != nil { + return *x.Particles_25Um + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_50Um() uint32 { + if x != nil && x.Particles_50Um != nil { + return *x.Particles_50Um + } + return 0 +} + +func (x *AirQualityMetrics) GetParticles_100Um() uint32 { + if x != nil && x.Particles_100Um != nil { + return *x.Particles_100Um + } + return 0 +} + +func (x *AirQualityMetrics) GetCo2() uint32 { + if x != nil && x.Co2 != nil { + return *x.Co2 + } + return 0 +} + +// Local device mesh statistics +type LocalStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + // How long the device has been running since the last reboot (in seconds) + UptimeSeconds uint32 `protobuf:"varint,1,opt,name=uptime_seconds,json=uptimeSeconds,proto3" json:"uptime_seconds,omitempty"` + // Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + ChannelUtilization float32 `protobuf:"fixed32,2,opt,name=channel_utilization,json=channelUtilization,proto3" json:"channel_utilization,omitempty"` + // Percent of airtime for transmission used within the last hour. + AirUtilTx float32 `protobuf:"fixed32,3,opt,name=air_util_tx,json=airUtilTx,proto3" json:"air_util_tx,omitempty"` + // Number of packets sent + NumPacketsTx uint32 `protobuf:"varint,4,opt,name=num_packets_tx,json=numPacketsTx,proto3" json:"num_packets_tx,omitempty"` + // Number of packets received (both good and bad) + NumPacketsRx uint32 `protobuf:"varint,5,opt,name=num_packets_rx,json=numPacketsRx,proto3" json:"num_packets_rx,omitempty"` + // Number of packets received that are malformed or violate the protocol + NumPacketsRxBad uint32 `protobuf:"varint,6,opt,name=num_packets_rx_bad,json=numPacketsRxBad,proto3" json:"num_packets_rx_bad,omitempty"` + // Number of nodes online (in the past 2 hours) + NumOnlineNodes uint32 `protobuf:"varint,7,opt,name=num_online_nodes,json=numOnlineNodes,proto3" json:"num_online_nodes,omitempty"` + // Number of nodes total + NumTotalNodes uint32 `protobuf:"varint,8,opt,name=num_total_nodes,json=numTotalNodes,proto3" json:"num_total_nodes,omitempty"` + // Number of received packets that were duplicates (due to multiple nodes relaying). + // If this number is high, there are nodes in the mesh relaying packets when it's unnecessary, for example due to the ROUTER/REPEATER role. + NumRxDupe uint32 `protobuf:"varint,9,opt,name=num_rx_dupe,json=numRxDupe,proto3" json:"num_rx_dupe,omitempty"` + // Number of packets we transmitted that were a relay for others (not originating from ourselves). + NumTxRelay uint32 `protobuf:"varint,10,opt,name=num_tx_relay,json=numTxRelay,proto3" json:"num_tx_relay,omitempty"` + // Number of times we canceled a packet to be relayed, because someone else did it before us. + // This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. + NumTxRelayCanceled uint32 `protobuf:"varint,11,opt,name=num_tx_relay_canceled,json=numTxRelayCanceled,proto3" json:"num_tx_relay_canceled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LocalStats) Reset() { + *x = LocalStats{} + mi := &file_meshtastic_telemetry_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LocalStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalStats) ProtoMessage() {} + +func (x *LocalStats) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 LocalStats.ProtoReflect.Descriptor instead. +func (*LocalStats) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{4} +} + +func (x *LocalStats) GetUptimeSeconds() uint32 { + if x != nil { + return x.UptimeSeconds + } + return 0 +} + +func (x *LocalStats) GetChannelUtilization() float32 { + if x != nil { + return x.ChannelUtilization + } + return 0 +} + +func (x *LocalStats) GetAirUtilTx() float32 { + if x != nil { + return x.AirUtilTx + } + return 0 +} + +func (x *LocalStats) GetNumPacketsTx() uint32 { + if x != nil { + return x.NumPacketsTx + } + return 0 +} + +func (x *LocalStats) GetNumPacketsRx() uint32 { + if x != nil { + return x.NumPacketsRx + } + return 0 +} + +func (x *LocalStats) GetNumPacketsRxBad() uint32 { + if x != nil { + return x.NumPacketsRxBad + } + return 0 +} + +func (x *LocalStats) GetNumOnlineNodes() uint32 { + if x != nil { + return x.NumOnlineNodes + } + return 0 +} + +func (x *LocalStats) GetNumTotalNodes() uint32 { + if x != nil { + return x.NumTotalNodes + } + return 0 +} + +func (x *LocalStats) GetNumRxDupe() uint32 { + if x != nil { + return x.NumRxDupe + } + return 0 +} + +func (x *LocalStats) GetNumTxRelay() uint32 { + if x != nil { + return x.NumTxRelay + } + return 0 +} + +func (x *LocalStats) GetNumTxRelayCanceled() uint32 { + if x != nil { + return x.NumTxRelayCanceled + } + return 0 +} + +// Health telemetry metrics +type HealthMetrics struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Heart rate (beats per minute) + HeartBpm *uint32 `protobuf:"varint,1,opt,name=heart_bpm,json=heartBpm,proto3,oneof" json:"heart_bpm,omitempty"` + // SpO2 (blood oxygen saturation) level + SpO2 *uint32 `protobuf:"varint,2,opt,name=spO2,proto3,oneof" json:"spO2,omitempty"` + // Body temperature in degrees Celsius + Temperature *float32 `protobuf:"fixed32,3,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HealthMetrics) Reset() { + *x = HealthMetrics{} + mi := &file_meshtastic_telemetry_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HealthMetrics) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HealthMetrics) ProtoMessage() {} + +func (x *HealthMetrics) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 HealthMetrics.ProtoReflect.Descriptor instead. +func (*HealthMetrics) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{5} +} + +func (x *HealthMetrics) GetHeartBpm() uint32 { + if x != nil && x.HeartBpm != nil { + return *x.HeartBpm + } + return 0 +} + +func (x *HealthMetrics) GetSpO2() uint32 { + if x != nil && x.SpO2 != nil { + return *x.SpO2 + } + return 0 +} + +func (x *HealthMetrics) GetTemperature() float32 { + if x != nil && x.Temperature != nil { + return *x.Temperature + } + return 0 +} + +// Types of Measurements the telemetry module is equipped to handle +type Telemetry struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Seconds since 1970 - or 0 for unknown/unset + Time uint32 `protobuf:"fixed32,1,opt,name=time,proto3" json:"time,omitempty"` + // Types that are valid to be assigned to Variant: + // + // *Telemetry_DeviceMetrics + // *Telemetry_EnvironmentMetrics + // *Telemetry_AirQualityMetrics + // *Telemetry_PowerMetrics + // *Telemetry_LocalStats + // *Telemetry_HealthMetrics + Variant isTelemetry_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Telemetry) Reset() { + *x = Telemetry{} + mi := &file_meshtastic_telemetry_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Telemetry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Telemetry) ProtoMessage() {} + +func (x *Telemetry) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_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 Telemetry.ProtoReflect.Descriptor instead. +func (*Telemetry) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{6} +} + +func (x *Telemetry) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *Telemetry) GetVariant() isTelemetry_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Telemetry) GetDeviceMetrics() *DeviceMetrics { + if x != nil { + if x, ok := x.Variant.(*Telemetry_DeviceMetrics); ok { + return x.DeviceMetrics + } + } + return nil +} + +func (x *Telemetry) GetEnvironmentMetrics() *EnvironmentMetrics { + if x != nil { + if x, ok := x.Variant.(*Telemetry_EnvironmentMetrics); ok { + return x.EnvironmentMetrics + } + } + return nil +} + +func (x *Telemetry) GetAirQualityMetrics() *AirQualityMetrics { + if x != nil { + if x, ok := x.Variant.(*Telemetry_AirQualityMetrics); ok { + return x.AirQualityMetrics + } + } + return nil +} + +func (x *Telemetry) GetPowerMetrics() *PowerMetrics { + if x != nil { + if x, ok := x.Variant.(*Telemetry_PowerMetrics); ok { + return x.PowerMetrics + } + } + return nil +} + +func (x *Telemetry) GetLocalStats() *LocalStats { + if x != nil { + if x, ok := x.Variant.(*Telemetry_LocalStats); ok { + return x.LocalStats + } + } + return nil +} + +func (x *Telemetry) GetHealthMetrics() *HealthMetrics { + if x != nil { + if x, ok := x.Variant.(*Telemetry_HealthMetrics); ok { + return x.HealthMetrics + } + } + return nil +} + +type isTelemetry_Variant interface { + isTelemetry_Variant() +} + +type Telemetry_DeviceMetrics struct { + // Key native device metrics such as battery level + DeviceMetrics *DeviceMetrics `protobuf:"bytes,2,opt,name=device_metrics,json=deviceMetrics,proto3,oneof"` +} + +type Telemetry_EnvironmentMetrics struct { + // Weather station or other environmental metrics + EnvironmentMetrics *EnvironmentMetrics `protobuf:"bytes,3,opt,name=environment_metrics,json=environmentMetrics,proto3,oneof"` +} + +type Telemetry_AirQualityMetrics struct { + // Air quality metrics + AirQualityMetrics *AirQualityMetrics `protobuf:"bytes,4,opt,name=air_quality_metrics,json=airQualityMetrics,proto3,oneof"` +} + +type Telemetry_PowerMetrics struct { + // Power Metrics + PowerMetrics *PowerMetrics `protobuf:"bytes,5,opt,name=power_metrics,json=powerMetrics,proto3,oneof"` +} + +type Telemetry_LocalStats struct { + // Local device mesh statistics + LocalStats *LocalStats `protobuf:"bytes,6,opt,name=local_stats,json=localStats,proto3,oneof"` +} + +type Telemetry_HealthMetrics struct { + // Health telemetry metrics + HealthMetrics *HealthMetrics `protobuf:"bytes,7,opt,name=health_metrics,json=healthMetrics,proto3,oneof"` +} + +func (*Telemetry_DeviceMetrics) isTelemetry_Variant() {} + +func (*Telemetry_EnvironmentMetrics) isTelemetry_Variant() {} + +func (*Telemetry_AirQualityMetrics) isTelemetry_Variant() {} + +func (*Telemetry_PowerMetrics) isTelemetry_Variant() {} + +func (*Telemetry_LocalStats) isTelemetry_Variant() {} + +func (*Telemetry_HealthMetrics) isTelemetry_Variant() {} + +// NAU7802 Telemetry configuration, for saving to flash +type Nau7802Config struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The offset setting for the NAU7802 + ZeroOffset int32 `protobuf:"varint,1,opt,name=zeroOffset,proto3" json:"zeroOffset,omitempty"` + // The calibration factor for the NAU7802 + CalibrationFactor float32 `protobuf:"fixed32,2,opt,name=calibrationFactor,proto3" json:"calibrationFactor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Nau7802Config) Reset() { + *x = Nau7802Config{} + mi := &file_meshtastic_telemetry_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Nau7802Config) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Nau7802Config) ProtoMessage() {} + +func (x *Nau7802Config) ProtoReflect() protoreflect.Message { + mi := &file_meshtastic_telemetry_proto_msgTypes[7] + 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 Nau7802Config.ProtoReflect.Descriptor instead. +func (*Nau7802Config) Descriptor() ([]byte, []int) { + return file_meshtastic_telemetry_proto_rawDescGZIP(), []int{7} +} + +func (x *Nau7802Config) GetZeroOffset() int32 { + if x != nil { + return x.ZeroOffset + } + return 0 +} + +func (x *Nau7802Config) GetCalibrationFactor() float32 { + if x != nil { + return x.CalibrationFactor + } + return 0 +} + +var File_meshtastic_telemetry_proto protoreflect.FileDescriptor + +const file_meshtastic_telemetry_proto_rawDesc = "" + + "\n" + + "\x1ameshtastic/telemetry.proto\x12\n" + + "meshtastic\"\xb8\x02\n" + + "\rDeviceMetrics\x12(\n" + + "\rbattery_level\x18\x01 \x01(\rH\x00R\fbatteryLevel\x88\x01\x01\x12\x1d\n" + + "\avoltage\x18\x02 \x01(\x02H\x01R\avoltage\x88\x01\x01\x124\n" + + "\x13channel_utilization\x18\x03 \x01(\x02H\x02R\x12channelUtilization\x88\x01\x01\x12#\n" + + "\vair_util_tx\x18\x04 \x01(\x02H\x03R\tairUtilTx\x88\x01\x01\x12*\n" + + "\x0euptime_seconds\x18\x05 \x01(\rH\x04R\ruptimeSeconds\x88\x01\x01B\x10\n" + + "\x0e_battery_levelB\n" + + "\n" + + "\b_voltageB\x16\n" + + "\x14_channel_utilizationB\x0e\n" + + "\f_air_util_txB\x11\n" + + "\x0f_uptime_seconds\"\xfb\b\n" + + "\x12EnvironmentMetrics\x12%\n" + + "\vtemperature\x18\x01 \x01(\x02H\x00R\vtemperature\x88\x01\x01\x120\n" + + "\x11relative_humidity\x18\x02 \x01(\x02H\x01R\x10relativeHumidity\x88\x01\x01\x124\n" + + "\x13barometric_pressure\x18\x03 \x01(\x02H\x02R\x12barometricPressure\x88\x01\x01\x12*\n" + + "\x0egas_resistance\x18\x04 \x01(\x02H\x03R\rgasResistance\x88\x01\x01\x12\x1d\n" + + "\avoltage\x18\x05 \x01(\x02H\x04R\avoltage\x88\x01\x01\x12\x1d\n" + + "\acurrent\x18\x06 \x01(\x02H\x05R\acurrent\x88\x01\x01\x12\x15\n" + + "\x03iaq\x18\a \x01(\rH\x06R\x03iaq\x88\x01\x01\x12\x1f\n" + + "\bdistance\x18\b \x01(\x02H\aR\bdistance\x88\x01\x01\x12\x15\n" + + "\x03lux\x18\t \x01(\x02H\bR\x03lux\x88\x01\x01\x12 \n" + + "\twhite_lux\x18\n" + + " \x01(\x02H\tR\bwhiteLux\x88\x01\x01\x12\x1a\n" + + "\x06ir_lux\x18\v \x01(\x02H\n" + + "R\x05irLux\x88\x01\x01\x12\x1a\n" + + "\x06uv_lux\x18\f \x01(\x02H\vR\x05uvLux\x88\x01\x01\x12*\n" + + "\x0ewind_direction\x18\r \x01(\rH\fR\rwindDirection\x88\x01\x01\x12\"\n" + + "\n" + + "wind_speed\x18\x0e \x01(\x02H\rR\twindSpeed\x88\x01\x01\x12\x1b\n" + + "\x06weight\x18\x0f \x01(\x02H\x0eR\x06weight\x88\x01\x01\x12 \n" + + "\twind_gust\x18\x10 \x01(\x02H\x0fR\bwindGust\x88\x01\x01\x12 \n" + + "\twind_lull\x18\x11 \x01(\x02H\x10R\bwindLull\x88\x01\x01\x12!\n" + + "\tradiation\x18\x12 \x01(\x02H\x11R\tradiation\x88\x01\x01\x12$\n" + + "\vrainfall_1h\x18\x13 \x01(\x02H\x12R\n" + + "rainfall1h\x88\x01\x01\x12&\n" + + "\frainfall_24h\x18\x14 \x01(\x02H\x13R\vrainfall24h\x88\x01\x01\x12(\n" + + "\rsoil_moisture\x18\x15 \x01(\rH\x14R\fsoilMoisture\x88\x01\x01\x12.\n" + + "\x10soil_temperature\x18\x16 \x01(\x02H\x15R\x0fsoilTemperature\x88\x01\x01B\x0e\n" + + "\f_temperatureB\x14\n" + + "\x12_relative_humidityB\x16\n" + + "\x14_barometric_pressureB\x11\n" + + "\x0f_gas_resistanceB\n" + + "\n" + + "\b_voltageB\n" + + "\n" + + "\b_currentB\x06\n" + + "\x04_iaqB\v\n" + + "\t_distanceB\x06\n" + + "\x04_luxB\f\n" + + "\n" + + "_white_luxB\t\n" + + "\a_ir_luxB\t\n" + + "\a_uv_luxB\x11\n" + + "\x0f_wind_directionB\r\n" + + "\v_wind_speedB\t\n" + + "\a_weightB\f\n" + + "\n" + + "_wind_gustB\f\n" + + "\n" + + "_wind_lullB\f\n" + + "\n" + + "_radiationB\x0e\n" + + "\f_rainfall_1hB\x0f\n" + + "\r_rainfall_24hB\x10\n" + + "\x0e_soil_moistureB\x13\n" + + "\x11_soil_temperature\"\xd2\x02\n" + + "\fPowerMetrics\x12$\n" + + "\vch1_voltage\x18\x01 \x01(\x02H\x00R\n" + + "ch1Voltage\x88\x01\x01\x12$\n" + + "\vch1_current\x18\x02 \x01(\x02H\x01R\n" + + "ch1Current\x88\x01\x01\x12$\n" + + "\vch2_voltage\x18\x03 \x01(\x02H\x02R\n" + + "ch2Voltage\x88\x01\x01\x12$\n" + + "\vch2_current\x18\x04 \x01(\x02H\x03R\n" + + "ch2Current\x88\x01\x01\x12$\n" + + "\vch3_voltage\x18\x05 \x01(\x02H\x04R\n" + + "ch3Voltage\x88\x01\x01\x12$\n" + + "\vch3_current\x18\x06 \x01(\x02H\x05R\n" + + "ch3Current\x88\x01\x01B\x0e\n" + + "\f_ch1_voltageB\x0e\n" + + "\f_ch1_currentB\x0e\n" + + "\f_ch2_voltageB\x0e\n" + + "\f_ch2_currentB\x0e\n" + + "\f_ch3_voltageB\x0e\n" + + "\f_ch3_current\"\xca\x06\n" + + "\x11AirQualityMetrics\x12(\n" + + "\rpm10_standard\x18\x01 \x01(\rH\x00R\fpm10Standard\x88\x01\x01\x12(\n" + + "\rpm25_standard\x18\x02 \x01(\rH\x01R\fpm25Standard\x88\x01\x01\x12*\n" + + "\x0epm100_standard\x18\x03 \x01(\rH\x02R\rpm100Standard\x88\x01\x01\x122\n" + + "\x12pm10_environmental\x18\x04 \x01(\rH\x03R\x11pm10Environmental\x88\x01\x01\x122\n" + + "\x12pm25_environmental\x18\x05 \x01(\rH\x04R\x11pm25Environmental\x88\x01\x01\x124\n" + + "\x13pm100_environmental\x18\x06 \x01(\rH\x05R\x12pm100Environmental\x88\x01\x01\x12*\n" + + "\x0eparticles_03um\x18\a \x01(\rH\x06R\rparticles03um\x88\x01\x01\x12*\n" + + "\x0eparticles_05um\x18\b \x01(\rH\aR\rparticles05um\x88\x01\x01\x12*\n" + + "\x0eparticles_10um\x18\t \x01(\rH\bR\rparticles10um\x88\x01\x01\x12*\n" + + "\x0eparticles_25um\x18\n" + + " \x01(\rH\tR\rparticles25um\x88\x01\x01\x12*\n" + + "\x0eparticles_50um\x18\v \x01(\rH\n" + + "R\rparticles50um\x88\x01\x01\x12,\n" + + "\x0fparticles_100um\x18\f \x01(\rH\vR\x0eparticles100um\x88\x01\x01\x12\x15\n" + + "\x03co2\x18\r \x01(\rH\fR\x03co2\x88\x01\x01B\x10\n" + + "\x0e_pm10_standardB\x10\n" + + "\x0e_pm25_standardB\x11\n" + + "\x0f_pm100_standardB\x15\n" + + "\x13_pm10_environmentalB\x15\n" + + "\x13_pm25_environmentalB\x16\n" + + "\x14_pm100_environmentalB\x11\n" + + "\x0f_particles_03umB\x11\n" + + "\x0f_particles_05umB\x11\n" + + "\x0f_particles_10umB\x11\n" + + "\x0f_particles_25umB\x11\n" + + "\x0f_particles_50umB\x12\n" + + "\x10_particles_100umB\x06\n" + + "\x04_co2\"\xc4\x03\n" + + "\n" + + "LocalStats\x12%\n" + + "\x0euptime_seconds\x18\x01 \x01(\rR\ruptimeSeconds\x12/\n" + + "\x13channel_utilization\x18\x02 \x01(\x02R\x12channelUtilization\x12\x1e\n" + + "\vair_util_tx\x18\x03 \x01(\x02R\tairUtilTx\x12$\n" + + "\x0enum_packets_tx\x18\x04 \x01(\rR\fnumPacketsTx\x12$\n" + + "\x0enum_packets_rx\x18\x05 \x01(\rR\fnumPacketsRx\x12+\n" + + "\x12num_packets_rx_bad\x18\x06 \x01(\rR\x0fnumPacketsRxBad\x12(\n" + + "\x10num_online_nodes\x18\a \x01(\rR\x0enumOnlineNodes\x12&\n" + + "\x0fnum_total_nodes\x18\b \x01(\rR\rnumTotalNodes\x12\x1e\n" + + "\vnum_rx_dupe\x18\t \x01(\rR\tnumRxDupe\x12 \n" + + "\fnum_tx_relay\x18\n" + + " \x01(\rR\n" + + "numTxRelay\x121\n" + + "\x15num_tx_relay_canceled\x18\v \x01(\rR\x12numTxRelayCanceled\"\x98\x01\n" + + "\rHealthMetrics\x12 \n" + + "\theart_bpm\x18\x01 \x01(\rH\x00R\bheartBpm\x88\x01\x01\x12\x17\n" + + "\x04spO2\x18\x02 \x01(\rH\x01R\x04spO2\x88\x01\x01\x12%\n" + + "\vtemperature\x18\x03 \x01(\x02H\x02R\vtemperature\x88\x01\x01B\f\n" + + "\n" + + "_heart_bpmB\a\n" + + "\x05_spO2B\x0e\n" + + "\f_temperature\"\xd2\x03\n" + + "\tTelemetry\x12\x12\n" + + "\x04time\x18\x01 \x01(\aR\x04time\x12B\n" + + "\x0edevice_metrics\x18\x02 \x01(\v2\x19.meshtastic.DeviceMetricsH\x00R\rdeviceMetrics\x12Q\n" + + "\x13environment_metrics\x18\x03 \x01(\v2\x1e.meshtastic.EnvironmentMetricsH\x00R\x12environmentMetrics\x12O\n" + + "\x13air_quality_metrics\x18\x04 \x01(\v2\x1d.meshtastic.AirQualityMetricsH\x00R\x11airQualityMetrics\x12?\n" + + "\rpower_metrics\x18\x05 \x01(\v2\x18.meshtastic.PowerMetricsH\x00R\fpowerMetrics\x129\n" + + "\vlocal_stats\x18\x06 \x01(\v2\x16.meshtastic.LocalStatsH\x00R\n" + + "localStats\x12B\n" + + "\x0ehealth_metrics\x18\a \x01(\v2\x19.meshtastic.HealthMetricsH\x00R\rhealthMetricsB\t\n" + + "\avariant\"]\n" + + "\rNau7802Config\x12\x1e\n" + + "\n" + + "zeroOffset\x18\x01 \x01(\x05R\n" + + "zeroOffset\x12,\n" + + "\x11calibrationFactor\x18\x02 \x01(\x02R\x11calibrationFactor*\x91\x04\n" + + "\x13TelemetrySensorType\x12\x10\n" + + "\fSENSOR_UNSET\x10\x00\x12\n" + + "\n" + + "\x06BME280\x10\x01\x12\n" + + "\n" + + "\x06BME680\x10\x02\x12\v\n" + + "\aMCP9808\x10\x03\x12\n" + + "\n" + + "\x06INA260\x10\x04\x12\n" + + "\n" + + "\x06INA219\x10\x05\x12\n" + + "\n" + + "\x06BMP280\x10\x06\x12\t\n" + + "\x05SHTC3\x10\a\x12\t\n" + + "\x05LPS22\x10\b\x12\v\n" + + "\aQMC6310\x10\t\x12\v\n" + + "\aQMI8658\x10\n" + + "\x12\f\n" + + "\bQMC5883L\x10\v\x12\t\n" + + "\x05SHT31\x10\f\x12\f\n" + + "\bPMSA003I\x10\r\x12\v\n" + + "\aINA3221\x10\x0e\x12\n" + + "\n" + + "\x06BMP085\x10\x0f\x12\f\n" + + "\bRCWL9620\x10\x10\x12\t\n" + + "\x05SHT4X\x10\x11\x12\f\n" + + "\bVEML7700\x10\x12\x12\f\n" + + "\bMLX90632\x10\x13\x12\v\n" + + "\aOPT3001\x10\x14\x12\f\n" + + "\bLTR390UV\x10\x15\x12\x0e\n" + + "\n" + + "TSL25911FN\x10\x16\x12\t\n" + + "\x05AHT10\x10\x17\x12\x10\n" + + "\fDFROBOT_LARK\x10\x18\x12\v\n" + + "\aNAU7802\x10\x19\x12\n" + + "\n" + + "\x06BMP3XX\x10\x1a\x12\f\n" + + "\bICM20948\x10\x1b\x12\f\n" + + "\bMAX17048\x10\x1c\x12\x11\n" + + "\rCUSTOM_SENSOR\x10\x1d\x12\f\n" + + "\bMAX30102\x10\x1e\x12\f\n" + + "\bMLX90614\x10\x1f\x12\t\n" + + "\x05SCD4X\x10 \x12\v\n" + + "\aRADSENS\x10!\x12\n" + + "\n" + + "\x06INA226\x10\"\x12\x10\n" + + "\fDFROBOT_RAIN\x10#\x12\n" + + "\n" + + "\x06DPS310\x10$\x12\f\n" + + "\bRAK12035\x10%Bd\n" + + "\x13com.geeksville.meshB\x0fTelemetryProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3" + +var ( + file_meshtastic_telemetry_proto_rawDescOnce sync.Once + file_meshtastic_telemetry_proto_rawDescData []byte +) + +func file_meshtastic_telemetry_proto_rawDescGZIP() []byte { + file_meshtastic_telemetry_proto_rawDescOnce.Do(func() { + file_meshtastic_telemetry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_telemetry_proto_rawDesc), len(file_meshtastic_telemetry_proto_rawDesc))) + }) + return file_meshtastic_telemetry_proto_rawDescData +} + +var file_meshtastic_telemetry_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_meshtastic_telemetry_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_meshtastic_telemetry_proto_goTypes = []any{ + (TelemetrySensorType)(0), // 0: meshtastic.TelemetrySensorType + (*DeviceMetrics)(nil), // 1: meshtastic.DeviceMetrics + (*EnvironmentMetrics)(nil), // 2: meshtastic.EnvironmentMetrics + (*PowerMetrics)(nil), // 3: meshtastic.PowerMetrics + (*AirQualityMetrics)(nil), // 4: meshtastic.AirQualityMetrics + (*LocalStats)(nil), // 5: meshtastic.LocalStats + (*HealthMetrics)(nil), // 6: meshtastic.HealthMetrics + (*Telemetry)(nil), // 7: meshtastic.Telemetry + (*Nau7802Config)(nil), // 8: meshtastic.Nau7802Config +} +var file_meshtastic_telemetry_proto_depIdxs = []int32{ + 1, // 0: meshtastic.Telemetry.device_metrics:type_name -> meshtastic.DeviceMetrics + 2, // 1: meshtastic.Telemetry.environment_metrics:type_name -> meshtastic.EnvironmentMetrics + 4, // 2: meshtastic.Telemetry.air_quality_metrics:type_name -> meshtastic.AirQualityMetrics + 3, // 3: meshtastic.Telemetry.power_metrics:type_name -> meshtastic.PowerMetrics + 5, // 4: meshtastic.Telemetry.local_stats:type_name -> meshtastic.LocalStats + 6, // 5: meshtastic.Telemetry.health_metrics:type_name -> meshtastic.HealthMetrics + 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_telemetry_proto_init() } +func file_meshtastic_telemetry_proto_init() { + if File_meshtastic_telemetry_proto != nil { + return + } + file_meshtastic_telemetry_proto_msgTypes[0].OneofWrappers = []any{} + file_meshtastic_telemetry_proto_msgTypes[1].OneofWrappers = []any{} + file_meshtastic_telemetry_proto_msgTypes[2].OneofWrappers = []any{} + file_meshtastic_telemetry_proto_msgTypes[3].OneofWrappers = []any{} + file_meshtastic_telemetry_proto_msgTypes[5].OneofWrappers = []any{} + file_meshtastic_telemetry_proto_msgTypes[6].OneofWrappers = []any{ + (*Telemetry_DeviceMetrics)(nil), + (*Telemetry_EnvironmentMetrics)(nil), + (*Telemetry_AirQualityMetrics)(nil), + (*Telemetry_PowerMetrics)(nil), + (*Telemetry_LocalStats)(nil), + (*Telemetry_HealthMetrics)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_telemetry_proto_rawDesc), len(file_meshtastic_telemetry_proto_rawDesc)), + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_meshtastic_telemetry_proto_goTypes, + DependencyIndexes: file_meshtastic_telemetry_proto_depIdxs, + EnumInfos: file_meshtastic_telemetry_proto_enumTypes, + MessageInfos: file_meshtastic_telemetry_proto_msgTypes, + }.Build() + File_meshtastic_telemetry_proto = out.File + file_meshtastic_telemetry_proto_goTypes = nil + file_meshtastic_telemetry_proto_depIdxs = nil +} diff --git a/proto/generated/meshtastic/xmodem.pb.go b/proto/generated/meshtastic/xmodem.pb.go new file mode 100644 index 0000000..d9781c1 --- /dev/null +++ b/proto/generated/meshtastic/xmodem.pb.go @@ -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 generated + +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\x1aBa\n" + + "\x13com.geeksville.meshB\fXmodemProtosZ\"github.com/meshtastic/go/generated\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 +} diff --git a/proto/generated/nanopb.pb.go b/proto/generated/nanopb.pb.go new file mode 100644 index 0000000..f318d08 --- /dev/null +++ b/proto/generated/nanopb.pb.go @@ -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: nanopb.proto + +package generated + +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_nanopb_proto_enumTypes[0].Descriptor() +} + +func (FieldType) Type() protoreflect.EnumType { + return &file_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_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_nanopb_proto_enumTypes[1].Descriptor() +} + +func (IntSize) Type() protoreflect.EnumType { + return &file_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_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_nanopb_proto_enumTypes[2].Descriptor() +} + +func (TypenameMangling) Type() protoreflect.EnumType { + return &file_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_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_nanopb_proto_enumTypes[3].Descriptor() +} + +func (DescriptorSize) Type() protoreflect.EnumType { + return &file_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_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_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_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_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_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: "nanopb.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*NanoPBOptions)(nil), + Field: 1010, + Name: "nanopb_msgopt", + Tag: "bytes,1010,opt,name=nanopb_msgopt", + Filename: "nanopb.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*NanoPBOptions)(nil), + Field: 1010, + Name: "nanopb_enumopt", + Tag: "bytes,1010,opt,name=nanopb_enumopt", + Filename: "nanopb.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*NanoPBOptions)(nil), + Field: 1010, + Name: "nanopb", + Tag: "bytes,1010,opt,name=nanopb", + Filename: "nanopb.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // optional NanoPBOptions nanopb_fileopt = 1010; + E_NanopbFileopt = &file_nanopb_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional NanoPBOptions nanopb_msgopt = 1010; + E_NanopbMsgopt = &file_nanopb_proto_extTypes[1] +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // optional NanoPBOptions nanopb_enumopt = 1010; + E_NanopbEnumopt = &file_nanopb_proto_extTypes[2] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // optional NanoPBOptions nanopb = 1010; + E_Nanopb = &file_nanopb_proto_extTypes[3] +) + +var File_nanopb_proto protoreflect.FileDescriptor + +const file_nanopb_proto_rawDesc = "" + + "\n" + + "\fnanopb.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\"github.com/meshtastic/go/generated" + +var ( + file_nanopb_proto_rawDescOnce sync.Once + file_nanopb_proto_rawDescData []byte +) + +func file_nanopb_proto_rawDescGZIP() []byte { + file_nanopb_proto_rawDescOnce.Do(func() { + file_nanopb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_nanopb_proto_rawDesc), len(file_nanopb_proto_rawDesc))) + }) + return file_nanopb_proto_rawDescData +} + +var file_nanopb_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_nanopb_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_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_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_nanopb_proto_init() } +func file_nanopb_proto_init() { + if File_nanopb_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_nanopb_proto_rawDesc), len(file_nanopb_proto_rawDesc)), + NumEnums: 4, + NumMessages: 1, + NumExtensions: 4, + NumServices: 0, + }, + GoTypes: file_nanopb_proto_goTypes, + DependencyIndexes: file_nanopb_proto_depIdxs, + EnumInfos: file_nanopb_proto_enumTypes, + MessageInfos: file_nanopb_proto_msgTypes, + ExtensionInfos: file_nanopb_proto_extTypes, + }.Build() + File_nanopb_proto = out.File + file_nanopb_proto_goTypes = nil + file_nanopb_proto_depIdxs = nil +} diff --git a/proto/tmp/admin.proto b/proto/tmp/admin.proto new file mode 100644 index 0000000..f4718c1 --- /dev/null +++ b/proto/tmp/admin.proto @@ -0,0 +1,474 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; +import "meshtastic/connection_status.proto"; +import "meshtastic/mesh.proto"; +import "meshtastic/module_config.proto"; +import "meshtastic/device_ui.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "AdminProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This message is handled by the Admin module and is responsible for all settings/channel read/write operations. + * This message is used to do settings operations to both remote AND local nodes. + * (Prior to 1.2 these operations were done via special ToRadio operations) + */ +message AdminMessage { + + /* + * The node generates this key and sends it with any get_x_response packets. + * The client MUST include the same key with any set_x commands. Key expires after 300 seconds. + * Prevents replay attacks for admin messages. + */ + bytes session_passkey = 101; + + /* + * TODO: REPLACE + */ + enum ConfigType { + /* + * TODO: REPLACE + */ + DEVICE_CONFIG = 0; + + /* + * TODO: REPLACE + */ + POSITION_CONFIG = 1; + + /* + * TODO: REPLACE + */ + POWER_CONFIG = 2; + + /* + * TODO: REPLACE + */ + NETWORK_CONFIG = 3; + + /* + * TODO: REPLACE + */ + DISPLAY_CONFIG = 4; + + /* + * TODO: REPLACE + */ + LORA_CONFIG = 5; + + /* + * TODO: REPLACE + */ + BLUETOOTH_CONFIG = 6; + + /* + * TODO: REPLACE + */ + SECURITY_CONFIG = 7; + + /* + * Session key config + */ + SESSIONKEY_CONFIG = 8; + + /* + * device-ui config + */ + DEVICEUI_CONFIG = 9; + } + + /* + * TODO: REPLACE + */ + enum ModuleConfigType { + /* + * TODO: REPLACE + */ + MQTT_CONFIG = 0; + + /* + * TODO: REPLACE + */ + SERIAL_CONFIG = 1; + + /* + * TODO: REPLACE + */ + EXTNOTIF_CONFIG = 2; + + /* + * TODO: REPLACE + */ + STOREFORWARD_CONFIG = 3; + + /* + * TODO: REPLACE + */ + RANGETEST_CONFIG = 4; + + /* + * TODO: REPLACE + */ + TELEMETRY_CONFIG = 5; + + /* + * TODO: REPLACE + */ + CANNEDMSG_CONFIG = 6; + + /* + * TODO: REPLACE + */ + AUDIO_CONFIG = 7; + + /* + * TODO: REPLACE + */ + REMOTEHARDWARE_CONFIG = 8; + + /* + * TODO: REPLACE + */ + NEIGHBORINFO_CONFIG = 9; + + /* + * TODO: REPLACE + */ + AMBIENTLIGHTING_CONFIG = 10; + + /* + * TODO: REPLACE + */ + DETECTIONSENSOR_CONFIG = 11; + + /* + * TODO: REPLACE + */ + PAXCOUNTER_CONFIG = 12; + } + + enum BackupLocation { + /* + * Backup to the internal flash + */ + FLASH = 0; + + /* + * Backup to the SD card + */ + SD = 1; + } + + /* + * TODO: REPLACE + */ + oneof payload_variant { + /* + * Send the specified channel in the response to this message + * NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) + */ + uint32 get_channel_request = 1; + + /* + * TODO: REPLACE + */ + Channel get_channel_response = 2; + + /* + * Send the current owner data in the response to this message. + */ + bool get_owner_request = 3; + + /* + * TODO: REPLACE + */ + User get_owner_response = 4; + + /* + * Ask for the following config data to be sent + */ + ConfigType get_config_request = 5; + + /* + * Send the current Config in the response to this message. + */ + Config get_config_response = 6; + + /* + * Ask for the following config data to be sent + */ + ModuleConfigType get_module_config_request = 7; + + /* + * Send the current Config in the response to this message. + */ + ModuleConfig get_module_config_response = 8; + + /* + * Get the Canned Message Module messages in the response to this message. + */ + bool get_canned_message_module_messages_request = 10; + + /* + * Get the Canned Message Module messages in the response to this message. + */ + string get_canned_message_module_messages_response = 11; + + /* + * Request the node to send device metadata (firmware, protobuf version, etc) + */ + bool get_device_metadata_request = 12; + + /* + * Device metadata response + */ + DeviceMetadata get_device_metadata_response = 13; + + /* + * Get the Ringtone in the response to this message. + */ + bool get_ringtone_request = 14; + + /* + * Get the Ringtone in the response to this message. + */ + string get_ringtone_response = 15; + + /* + * Request the node to send it's connection status + */ + bool get_device_connection_status_request = 16; + + /* + * Device connection status response + */ + DeviceConnectionStatus get_device_connection_status_response = 17; + + /* + * Setup a node for licensed amateur (ham) radio operation + */ + HamParameters set_ham_mode = 18; + + /* + * Get the mesh's nodes with their available gpio pins for RemoteHardware module use + */ + bool get_node_remote_hardware_pins_request = 19; + + /* + * Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use + */ + NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20; + + /* + * Enter (UF2) DFU mode + * Only implemented on NRF52 currently + */ + bool enter_dfu_mode_request = 21; + + /* + * Delete the file by the specified path from the device + */ + string delete_file_request = 22; + + /* + * Set zero and offset for scale chips + */ + uint32 set_scale = 23; + + /* + * Backup the node's preferences + */ + BackupLocation backup_preferences = 24; + + /* + * Restore the node's preferences + */ + BackupLocation restore_preferences = 25; + + /* + * Remove backups of the node's preferences + */ + BackupLocation remove_backup_preferences = 26; + /* + * Set the owner for this node + */ + User set_owner = 32; + + /* + * Set channels (using the new API). + * A special channel is the "primary channel". + * The other records are secondary channels. + * Note: only one channel can be marked as primary. + * If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. + */ + Channel set_channel = 33; + + /* + * Set the current Config + */ + Config set_config = 34; + + /* + * Set the current Config + */ + ModuleConfig set_module_config = 35; + + /* + * Set the Canned Message Module messages text. + */ + string set_canned_message_module_messages = 36; + + /* + * Set the ringtone for ExternalNotification. + */ + string set_ringtone_message = 37; + + /* + * Remove the node by the specified node-num from the NodeDB on the device + */ + uint32 remove_by_nodenum = 38; + + /* + * Set specified node-num to be favorited on the NodeDB on the device + */ + uint32 set_favorite_node = 39; + + /* + * Set specified node-num to be un-favorited on the NodeDB on the device + */ + uint32 remove_favorite_node = 40; + + /* + * Set fixed position data on the node and then set the position.fixed_position = true + */ + Position set_fixed_position = 41; + + /* + * Clear fixed position coordinates and then set position.fixed_position = false + */ + bool remove_fixed_position = 42; + + /* + * Set time only on the node + * Convenience method to set the time on the node (as Net quality) without any other position data + */ + fixed32 set_time_only = 43; + + /* + * Tell the node to send the stored ui data. + */ + bool get_ui_config_request = 44; + + /* + * Reply stored device ui data. + */ + DeviceUIConfig get_ui_config_response = 45; + + /* + * Tell the node to store UI data persistently. + */ + DeviceUIConfig store_ui_config = 46; + + /* + * Set specified node-num to be ignored on the NodeDB on the device + */ + uint32 set_ignored_node = 47; + + /* + * Set specified node-num to be un-ignored on the NodeDB on the device + */ + uint32 remove_ignored_node = 48; + + /* + * Begins an edit transaction for config, module config, owner, and channel settings changes + * This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings) + */ + bool begin_edit_settings = 64; + + /* + * Commits an open transaction for any edits made to config, module config, owner, and channel settings + */ + bool commit_edit_settings = 65; + + /* + * Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. + */ + int32 factory_reset_device = 94; + + /* + * Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) + * Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth. + */ + int32 reboot_ota_seconds = 95; + + /* + * This message is only supported for the simulator Portduino build. + * If received the simulator will exit successfully. + */ + bool exit_simulator = 96; + + /* + * Tell the node to reboot in this many seconds (or <0 to cancel reboot) + */ + int32 reboot_seconds = 97; + + /* + * Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) + */ + int32 shutdown_seconds = 98; + + /* + * Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved. + */ + int32 factory_reset_config = 99; + + /* + * Tell the node to reset the nodedb. + */ + int32 nodedb_reset = 100; + } +} + +/* + * Parameters for setting up Meshtastic for ameteur radio usage + */ +message HamParameters { + /* + * Amateur radio call sign, eg. KD2ABC + */ + string call_sign = 1; + + /* + * Transmit power in dBm at the LoRA transceiver, not including any amplification + */ + int32 tx_power = 2; + + /* + * The selected frequency of LoRA operation + * Please respect your local laws, regulations, and band plans. + * Ensure your radio is capable of operating of the selected frequency before setting this. + */ + float frequency = 3; + + /* + * Optional short name of user + */ + string short_name = 4; +} + +/* + * Response envelope for node_remote_hardware_pins + */ +message NodeRemoteHardwarePinsResponse { + /* + * Nodes and their respective remote hardware GPIO pins + */ + repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1; +} diff --git a/proto/tmp/apponly.proto b/proto/tmp/apponly.proto new file mode 100644 index 0000000..100833f --- /dev/null +++ b/proto/tmp/apponly.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "AppOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * 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 + */ +message ChannelSet { + /* + * Channel list with settings + */ + repeated ChannelSettings settings = 1; + + /* + * LoRa config + */ + Config.LoRaConfig lora_config = 2; +} diff --git a/proto/tmp/atak.proto b/proto/tmp/atak.proto new file mode 100644 index 0000000..5dc08c9 --- /dev/null +++ b/proto/tmp/atak.proto @@ -0,0 +1,263 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ATAKProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Packets for the official ATAK Plugin + */ +message TAKPacket { + /* + * Are the payloads strings compressed for LoRA transport? + */ + bool is_compressed = 1; + /* + * The contact / callsign for ATAK user + */ + Contact contact = 2; + /* + * The group for ATAK user + */ + Group group = 3; + /* + * The status of the ATAK EUD + */ + Status status = 4; + /* + * The payload of the packet + */ + oneof payload_variant { + /* + * TAK position report + */ + PLI pli = 5; + /* + * ATAK GeoChat message + */ + GeoChat chat = 6; + + /* + * Generic CoT detail XML + * May be compressed / truncated by the sender (EUD) + */ + bytes detail = 7; + } +} + +/* + * ATAK GeoChat message + */ +message GeoChat { + /* + * The text message + */ + string message = 1; + + /* + * Uid recipient of the message + */ + optional string to = 2; + + /* + * Callsign of the recipient for the message + */ + optional string to_callsign = 3; +} + +/* + * ATAK Group + * <__group role='Team Member' name='Cyan'/> + */ +message Group { + /* + * Role of the group member + */ + MemberRole role = 1; + /* + * Team (color) + * Default Cyan + */ + Team team = 2; +} + +enum Team { + /* + * Unspecifed + */ + Unspecifed_Color = 0; + /* + * White + */ + White = 1; + /* + * Yellow + */ + Yellow = 2; + /* + * Orange + */ + Orange = 3; + /* + * Magenta + */ + Magenta = 4; + /* + * Red + */ + Red = 5; + /* + * Maroon + */ + Maroon = 6; + /* + * Purple + */ + Purple = 7; + /* + * Dark Blue + */ + Dark_Blue = 8; + /* + * Blue + */ + Blue = 9; + /* + * Cyan + */ + Cyan = 10; + /* + * Teal + */ + Teal = 11; + /* + * Green + */ + Green = 12; + /* + * Dark Green + */ + Dark_Green = 13; + /* + * Brown + */ + Brown = 14; +} + +/* + * Role of the group member + */ +enum MemberRole { + /* + * Unspecifed + */ + Unspecifed = 0; + /* + * Team Member + */ + TeamMember = 1; + /* + * Team Lead + */ + TeamLead = 2; + /* + * Headquarters + */ + HQ = 3; + /* + * Airsoft enthusiast + */ + Sniper = 4; + /* + * Medic + */ + Medic = 5; + /* + * ForwardObserver + */ + ForwardObserver = 6; + /* + * Radio Telephone Operator + */ + RTO = 7; + /* + * Doggo + */ + K9 = 8; +} + +/* + * ATAK EUD Status + * + */ +message Status { + /* + * Battery level + */ + uint32 battery = 1; +} + +/* + * ATAK Contact + * + */ +message Contact { + /* + * Callsign + */ + string callsign = 1; + + /* + * Device callsign + */ + string device_callsign = 2; + /* + * IP address of endpoint in integer form (0.0.0.0 default) + */ + // fixed32 enpoint_address = 3; + /* + * Port of endpoint (4242 default) + */ + // uint32 endpoint_port = 4; + /* + * Phone represented as integer + * Terrible practice, but we really need the wire savings + */ + // uint32 phone = 4; +} + +/* + * Position Location Information from ATAK + */ +message PLI { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 longitude_i = 2; + + /* + * Altitude (ATAK prefers HAE) + */ + int32 altitude = 3; + + /* + * Speed + */ + uint32 speed = 4; + + /* + * Course in degrees + */ + uint32 course = 5; +} diff --git a/proto/tmp/cannedmessages.proto b/proto/tmp/cannedmessages.proto new file mode 100644 index 0000000..baa5134 --- /dev/null +++ b/proto/tmp/cannedmessages.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "CannedMessageConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Canned message module configuration. + */ +message CannedMessageModuleConfig { + /* + * Predefined messages for canned message module separated by '|' characters. + */ + string messages = 1; +} diff --git a/proto/tmp/channel.proto b/proto/tmp/channel.proto new file mode 100644 index 0000000..16c8c19 --- /dev/null +++ b/proto/tmp/channel.proto @@ -0,0 +1,156 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ChannelProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * 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 + */ +message ChannelSettings { + /* + * Deprecated in favor of LoraConfig.channel_num + */ + uint32 channel_num = 1 [deprecated = true]; + + /* + * 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 + */ + bytes psk = 2; + + /* + * 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 + */ + string name = 3; + + /* + * 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) + */ + fixed32 id = 4; + + /* + * If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe + */ + bool uplink_enabled = 5; + + /* + * If true, messages seen on the internet will be forwarded to the local mesh. + */ + bool downlink_enabled = 6; + + /* + * Per-channel module settings. + */ + ModuleSettings module_settings = 7; +} + +/* + * This message is specifically for modules to store per-channel configuration data. + */ +message ModuleSettings { + /* + * Bits of precision for the location sent in position packets. + */ + uint32 position_precision = 1; + + /* + * Controls whether or not the phone / clients should mute the current channel + * Useful for noisy public channels you don't necessarily want to disable + */ + bool is_client_muted = 2; +} + +/* + * A pair of a channel number, mode and the (sharable) settings for that channel + */ +message Channel { + /* + * 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) + */ + enum Role { + /* + * This channel is not in use right now + */ + DISABLED = 0; + + /* + * This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY + */ + PRIMARY = 1; + + /* + * Secondary channels are only used for encryption/decryption/authentication purposes. + * Their radio settings (freq etc) are ignored, only psk is used. + */ + SECONDARY = 2; + } + + /* + * 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. + */ + int32 index = 1; + + /* + * The new settings, or NULL to disable that channel + */ + ChannelSettings settings = 2; + + /* + * TODO: REPLACE + */ + Role role = 3; +} diff --git a/proto/tmp/clientonly.proto b/proto/tmp/clientonly.proto new file mode 100644 index 0000000..2b919ef --- /dev/null +++ b/proto/tmp/clientonly.proto @@ -0,0 +1,58 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/localonly.proto"; +import "meshtastic/mesh.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ClientOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This abstraction is used to contain any configuration for provisioning a node on any client. + * It is useful for importing and exporting configurations. + */ +message DeviceProfile { + /* + * Long name for the node + */ + optional string long_name = 1; + + /* + * Short name of the node + */ + optional string short_name = 2; + + /* + * The url of the channels from our node + */ + optional string channel_url = 3; + + /* + * The Config of the node + */ + optional LocalConfig config = 4; + + /* + * The ModuleConfig of the node + */ + optional LocalModuleConfig module_config = 5; + + /* + * Fixed position data + */ + optional Position fixed_position = 6; + + /* + * Ringtone for ExternalNotification + */ + optional string ringtone = 7; + + /* + * Predefined messages for CannedMessage + */ + optional string canned_messages = 8; +} diff --git a/proto/tmp/config.proto b/proto/tmp/config.proto new file mode 100644 index 0000000..0e51cdd --- /dev/null +++ b/proto/tmp/config.proto @@ -0,0 +1,1147 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/device_ui.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message Config { + /* + * Configuration + */ + message DeviceConfig { + /* + * Defines the device's role on the Mesh network + */ + enum Role { + /* + * Description: App connected or stand alone messaging device. + * Technical Details: Default Role + */ + CLIENT = 0; + /* + * Description: Device that does not forward packets from other devices. + */ + CLIENT_MUTE = 1; + + /* + * Description: Infrastructure node for extending network coverage by relaying messages. Visible in Nodes list. + * Technical Details: Mesh packets will prefer to be routed over this node. This node will not be used by client apps. + * The wifi radio and the oled screen will be put to sleep. + * This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. + */ + ROUTER = 2; + + /* + * Description: Combination of both ROUTER and CLIENT. Not for mobile devices. + * Deprecated in v2.3.15 because improper usage is impacting public meshes: Use ROUTER or CLIENT instead. + */ + + ROUTER_CLIENT = 3 [deprecated = true]; + + /* + * Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list. + * Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry + * or any other packet type. They will simply rebroadcast any mesh packets on the same frequency, channel num, spread factor, and coding rate. + */ + REPEATER = 4; + + /* + * Description: Broadcasts GPS position packets as priority. + * Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send position, and then sleep for position.position_broadcast_secs seconds. + */ + TRACKER = 5; + + /* + * Description: Broadcasts telemetry packets as priority. + * Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default. + * When used in conjunction with power.is_power_saving = true, nodes will wake up, + * send environment telemetry, and then sleep for telemetry.environment_update_interval seconds. + */ + SENSOR = 6; + + /* + * Description: Optimized for ATAK system communication and reduces routine broadcasts. + * Technical Details: Used for nodes dedicated for connection to an ATAK EUD. + * Turns off many of the routine broadcasts to favor CoT packet stream + * from the Meshtastic ATAK plugin -> IMeshService -> Node + */ + TAK = 7; + + /* + * Description: Device that only broadcasts as needed for stealth or power savings. + * Technical Details: Used for nodes that "only speak when spoken to" + * Turns all of the routine broadcasts but allows for ad-hoc communication + * Still rebroadcasts, but with local only rebroadcast mode (known meshes only) + * Can be used for clandestine operation or to dramatically reduce airtime / power consumption + */ + CLIENT_HIDDEN = 8; + + /* + * Description: Broadcasts location as message to default channel regularly for to assist with device recovery. + * Technical Details: Used to automatically send a text message to the mesh + * with the current position of the device on a frequent interval: + * "I'm lost! Position: lat / long" + */ + LOST_AND_FOUND = 9; + + /* + * Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts. + * Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream + * and automatic TAK PLI (position location information) broadcasts. + * Uses position module configuration to determine TAK PLI broadcast interval. + */ + TAK_TRACKER = 10; + + /* + * Description: Will always rebroadcast packets, but will do so after all other modes. + * Technical Details: Used for router nodes that are intended to provide additional coverage + * in areas not already covered by other routers, or to bridge around problematic terrain, + * but should not be given priority over other routers in order to avoid unnecessaraily + * consuming hops. + */ + ROUTER_LATE = 11; + } + + /* + * Defines the device's behavior for how messages are rebroadcast + */ + enum RebroadcastMode { + /* + * Default behavior. + * Rebroadcast any observed message, if it was on our private channel or from another mesh with the same lora params. + */ + ALL = 0; + + /* + * Same as behavior as ALL but skips packet decoding and simply rebroadcasts them. + * Only available in Repeater role. Setting this on any other roles will result in ALL behavior. + */ + ALL_SKIP_DECODING = 1; + + /* + * Ignores observed messages from foreign meshes that are open or those which it cannot decrypt. + * Only rebroadcasts message on the nodes local primary / secondary channels. + */ + LOCAL_ONLY = 2; + + /* + * Ignores observed messages from foreign meshes like LOCAL_ONLY, + * but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB) + */ + KNOWN_ONLY = 3; + + /* + * Only permitted for SENSOR, TRACKER and TAK_TRACKER roles, this will inhibit all rebroadcasts, not unlike CLIENT_MUTE role. + */ + NONE = 4; + + /* + * Ignores packets from non-standard portnums such as: TAK, RangeTest, PaxCounter, etc. + * Only rebroadcasts packets with standard portnums: NodeInfo, Text, Position, Telemetry, and Routing. + */ + CORE_PORTNUMS_ONLY = 5; + } + + /* + * Sets the role of node + */ + Role role = 1; + + /* + * Disabling this will disable the SerialConsole by not initilizing the StreamAPI + * Moved to SecurityConfig + */ + bool serial_enabled = 2[deprecated = true]; + + /* + * For boards without a hard wired button, this is the pin number that will be used + * Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. + */ + uint32 button_gpio = 4; + + /* + * For boards without a PWM buzzer, this is the pin number that will be used + * Defaults to PIN_BUZZER if defined. + */ + uint32 buzzer_gpio = 5; + + /* + * Sets the role of node + */ + RebroadcastMode rebroadcast_mode = 6; + + /* + * Send our nodeinfo this often + * Defaults to 900 Seconds (15 minutes) + */ + uint32 node_info_broadcast_secs = 7; + + /* + * Treat double tap interrupt on supported accelerometers as a button press if set to true + */ + bool double_tap_as_button_press = 8; + + /* + * If true, device is considered to be "managed" by a mesh administrator + * Clients should then limit available configuration and administrative options inside the user interface + * Moved to SecurityConfig + */ + bool is_managed = 9[deprecated = true]; + + /* + * Disables the triple-press of user button to enable or disable GPS + */ + bool disable_triple_click = 10; + + /* + * POSIX Timezone definition string from https://github.com/nayarsystems/posix_tz_db/blob/master/zones.csv. + */ + string tzdef = 11; + + /* + * If true, disable the default blinking LED (LED_PIN) behavior on the device + */ + bool led_heartbeat_disabled = 12; + } + + /* + * Position Config + */ + message PositionConfig { + /* + * Bit field of boolean configuration options, indicating which optional + * fields to include when assembling POSITION messages. + * Longitude, latitude, altitude, speed, heading, and DOP + * are always included (also time if GPS-synced) + * NOTE: the more fields are included, the larger the message will be - + * leading to longer airtime and a higher risk of packet loss + */ + enum PositionFlags { + /* + * Required for compilation + */ + UNSET = 0x0000; + + /* + * Include an altitude value (if available) + */ + ALTITUDE = 0x0001; + + /* + * Altitude value is MSL + */ + ALTITUDE_MSL = 0x0002; + + /* + * Include geoidal separation + */ + GEOIDAL_SEPARATION = 0x0004; + + /* + * Include the DOP value ; PDOP used by default, see below + */ + DOP = 0x0008; + + /* + * If POS_DOP set, send separate HDOP / VDOP values instead of PDOP + */ + HVDOP = 0x0010; + + /* + * Include number of "satellites in view" + */ + SATINVIEW = 0x0020; + + /* + * Include a sequence number incremented per packet + */ + SEQ_NO = 0x0040; + + /* + * Include positional timestamp (from GPS solution) + */ + TIMESTAMP = 0x0080; + + /* + * Include positional heading + * Intended for use with vehicle not walking speeds + * walking speeds are likely to be error prone like the compass + */ + HEADING = 0x0100; + + /* + * Include positional speed + * Intended for use with vehicle not walking speeds + * walking speeds are likely to be error prone like the compass + */ + SPEED = 0x0200; + } + + enum GpsMode { + /* + * GPS is present but disabled + */ + DISABLED = 0; + + /* + * GPS is present and enabled + */ + ENABLED = 1; + + /* + * GPS is not present on the device + */ + NOT_PRESENT = 2; + } + + /* + * We should send our position this often (but only if it has changed significantly) + * Defaults to 15 minutes + */ + uint32 position_broadcast_secs = 1; + + /* + * Adaptive position braoadcast, which is now the default. + */ + bool position_broadcast_smart_enabled = 2; + + /* + * If set, this node is at a fixed position. + * We will generate GPS position updates at the regular interval, but use whatever the last lat/lon/alt we have for the node. + * The lat/lon/alt can be set by an internal GPS or with the help of the app. + */ + bool fixed_position = 3; + + /* + * Is GPS enabled for this node? + */ + bool gps_enabled = 4 [deprecated = true]; + + /* + * How often should we try to get GPS position (in seconds) + * or zero for the default of once every 30 seconds + * or a very large value (maxint) to update only once at boot. + */ + uint32 gps_update_interval = 5; + + /* + * Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time + */ + uint32 gps_attempt_time = 6 [deprecated = true]; + + /* + * Bit field of boolean configuration options for POSITION messages + * (bitwise OR of PositionFlags) + */ + uint32 position_flags = 7; + + /* + * (Re)define GPS_RX_PIN for your board. + */ + uint32 rx_gpio = 8; + + /* + * (Re)define GPS_TX_PIN for your board. + */ + uint32 tx_gpio = 9; + + /* + * The minimum distance in meters traveled (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_distance = 10; + + /* + * The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled + */ + uint32 broadcast_smart_minimum_interval_secs = 11; + + /* + * (Re)define PIN_GPS_EN for your board. + */ + uint32 gps_en_gpio = 12; + + /* + * Set where GPS is enabled, disabled, or not present + */ + GpsMode gps_mode = 13; + } + + /* + * Power Config\ + * See [Power Config](/docs/settings/config/power) for additional power config details. + */ + message PowerConfig { + /* + * Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio. + * Don't use this setting if you want to use your device with the phone apps or are using a device without a user button. + * Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles + */ + bool is_power_saving = 1; + + /* + * Description: If non-zero, the device will fully power off this many seconds after external power is removed. + */ + uint32 on_battery_shutdown_after_secs = 2; + + /* + * Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k) + * Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation. + * https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override + * Should be set to floating point value between 2 and 6 + */ + float adc_multiplier_override = 3; + + /* + * Description: The number of seconds for to wait before turning off BLE in No Bluetooth states + * Technical Details: ESP32 Only 0 for default of 1 minute + */ + uint32 wait_bluetooth_secs = 4; + + /* + * Super Deep Sleep Seconds + * While in Light Sleep if mesh_sds_timeout_secs is exceeded we will lower into super deep sleep + * for this value (default 1 year) or a button press + * 0 for default of one year + */ + uint32 sds_secs = 6; + + /* + * Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on + * Technical Details: ESP32 Only 0 for default of 300 + */ + uint32 ls_secs = 7; + + /* + * Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value + * Technical Details: ESP32 Only 0 for default of 10 seconds + */ + uint32 min_wake_secs = 8; + + /* + * I2C address of INA_2XX to use for reading device battery voltage + */ + uint32 device_battery_ina_address = 9; + + /* + * If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled. + * Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. + */ + uint64 powermon_enables = 32; + } + + /* + * Network Config + */ + message NetworkConfig { + enum AddressMode { + /* + * obtain ip address via DHCP + */ + DHCP = 0; + + /* + * use static ip address + */ + STATIC = 1; + } + + message IpV4Config { + /* + * Static IP address + */ + fixed32 ip = 1; + + /* + * Static gateway address + */ + fixed32 gateway = 2; + + /* + * Static subnet mask + */ + fixed32 subnet = 3; + + /* + * Static DNS server address + */ + fixed32 dns = 4; + } + + /* + * Enable WiFi (disables Bluetooth) + */ + bool wifi_enabled = 1; + + /* + * If set, this node will try to join the specified wifi network and + * acquire an address via DHCP + */ + string wifi_ssid = 3; + + /* + * If set, will be use to authenticate to the named wifi + */ + string wifi_psk = 4; + + /* + * NTP server to use if WiFi is conneced, defaults to `meshtastic.pool.ntp.org` + */ + string ntp_server = 5; + + /* + * Enable Ethernet + */ + bool eth_enabled = 6; + + /* + * acquire an address via DHCP or assign static + */ + AddressMode address_mode = 7; + + /* + * struct to keep static address + */ + IpV4Config ipv4_config = 8; + + /* + * rsyslog Server and Port + */ + string rsyslog_server = 9; + + /* + * Flags for enabling/disabling network protocols + */ + uint32 enabled_protocols = 10; + + /* + * Available flags auxiliary network protocols + */ + enum ProtocolFlags { + /* + * Do not broadcast packets over any network protocol + */ + NO_BROADCAST = 0x0000; + + /* + * Enable broadcasting packets via UDP over the local network + */ + UDP_BROADCAST = 0x0001; + } + } + + /* + * Display Config + */ + message DisplayConfig { + /* + * How the GPS coordinates are displayed on the OLED screen. + */ + enum GpsCoordinateFormat { + /* + * GPS coordinates are displayed in the normal decimal degrees format: + * DD.DDDDDD DDD.DDDDDD + */ + DEC = 0; + + /* + * GPS coordinates are displayed in the degrees minutes seconds format: + * DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant + */ + DMS = 1; + + /* + * Universal Transverse Mercator format: + * ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing + */ + UTM = 2; + + /* + * Military Grid Reference System format: + * ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square, + * E is easting, N is northing + */ + MGRS = 3; + + /* + * Open Location Code (aka Plus Codes). + */ + OLC = 4; + + /* + * Ordnance Survey Grid Reference (the National Grid System of the UK). + * Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square, + * E is the easting, N is the northing + */ + OSGR = 5; + } + + /* + * Unit display preference + */ + enum DisplayUnits { + /* + * Metric (Default) + */ + METRIC = 0; + + /* + * Imperial + */ + IMPERIAL = 1; + } + + /* + * Override OLED outo detect with this if it fails. + */ + enum OledType { + /* + * Default / Autodetect + */ + OLED_AUTO = 0; + + /* + * Default / Autodetect + */ + OLED_SSD1306 = 1; + + /* + * Default / Autodetect + */ + OLED_SH1106 = 2; + + /* + * Can not be auto detected but set by proto. Used for 128x128 screens + */ + OLED_SH1107 = 3; + + /* + * Can not be auto detected but set by proto. Used for 128x64 screens + */ + OLED_SH1107_128_64 = 4; + } + + /* + * Number of seconds the screen stays on after pressing the user button or receiving a message + * 0 for default of one minute MAXUINT for always on + */ + uint32 screen_on_secs = 1; + + /* + * How the GPS coordinates are formatted on the OLED screen. + */ + GpsCoordinateFormat gps_format = 2; + + /* + * Automatically toggles to the next page on the screen like a carousel, based the specified interval in seconds. + * Potentially useful for devices without user buttons. + */ + uint32 auto_screen_carousel_secs = 3; + + /* + * If this is set, the displayed compass will always point north. if unset, the old behaviour + * (top of display is heading direction) is used. + */ + bool compass_north_top = 4; + + /* + * Flip screen vertically, for cases that mount the screen upside down + */ + bool flip_screen = 5; + + /* + * Perferred display units + */ + DisplayUnits units = 6; + + /* + * Override auto-detect in screen + */ + OledType oled = 7; + + enum DisplayMode { + /* + * Default. The old style for the 128x64 OLED screen + */ + DEFAULT = 0; + + /* + * Rearrange display elements to cater for bicolor OLED displays + */ + TWOCOLOR = 1; + + /* + * Same as TwoColor, but with inverted top bar. Not so good for Epaper displays + */ + INVERTED = 2; + + /* + * TFT Full Color Displays (not implemented yet) + */ + COLOR = 3; + } + /* + * Display Mode + */ + DisplayMode displaymode = 8; + + /* + * Print first line in pseudo-bold? FALSE is original style, TRUE is bold + */ + bool heading_bold = 9; + + /* + * Should we wake the screen up on accelerometer detected motion or tap + */ + bool wake_on_tap_or_motion = 10; + + enum CompassOrientation { + /* + * The compass and the display are in the same orientation. + */ + DEGREES_0 = 0; + + /* + * Rotate the compass by 90 degrees. + */ + DEGREES_90 = 1; + + /* + * Rotate the compass by 180 degrees. + */ + DEGREES_180 = 2; + + /* + * Rotate the compass by 270 degrees. + */ + DEGREES_270 = 3; + + /* + * Don't rotate the compass, but invert the result. + */ + DEGREES_0_INVERTED = 4; + + /* + * Rotate the compass by 90 degrees and invert. + */ + DEGREES_90_INVERTED = 5; + + /* + * Rotate the compass by 180 degrees and invert. + */ + DEGREES_180_INVERTED = 6; + + /* + * Rotate the compass by 270 degrees and invert. + */ + DEGREES_270_INVERTED = 7; + } + + /* + * Indicates how to rotate or invert the compass output to accurate display on the display. + */ + CompassOrientation compass_orientation = 11; + + /* + * If false (default), the device will display the time in 24-hour format on screen. + * If true, the device will display the time in 12-hour format on screen. + */ + bool use_12h_clock = 12; + } + + /* + * Lora Config + */ + message LoRaConfig { + enum RegionCode { + /* + * Region is not set + */ + UNSET = 0; + + /* + * United States + */ + US = 1; + + /* + * European Union 433mhz + */ + EU_433 = 2; + + /* + * European Union 868mhz + */ + EU_868 = 3; + + /* + * China + */ + CN = 4; + + /* + * Japan + */ + JP = 5; + + /* + * Australia / New Zealand + */ + ANZ = 6; + + /* + * Korea + */ + KR = 7; + + /* + * Taiwan + */ + TW = 8; + + /* + * Russia + */ + RU = 9; + + /* + * India + */ + IN = 10; + + /* + * New Zealand 865mhz + */ + NZ_865 = 11; + + /* + * Thailand + */ + TH = 12; + + /* + * WLAN Band + */ + LORA_24 = 13; + + /* + * Ukraine 433mhz + */ + UA_433 = 14; + + /* + * Ukraine 868mhz + */ + UA_868 = 15; + + /* + * Malaysia 433mhz + */ + MY_433 = 16; + + /* + * Malaysia 919mhz + */ + MY_919 = 17; + + /* + * Singapore 923mhz + */ + SG_923 = 18; + + /* + * Philippines 433mhz + */ + PH_433 = 19; + + /* + * Philippines 868mhz + */ + PH_868 = 20; + + /* + * Philippines 915mhz + */ + PH_915 = 21; + } + + /* + * Standard predefined channel settings + * Note: these mappings must match ModemPreset Choice in the device code. + */ + enum ModemPreset { + /* + * Long Range - Fast + */ + LONG_FAST = 0; + + /* + * Long Range - Slow + */ + LONG_SLOW = 1; + + /* + * Very Long Range - Slow + * Deprecated in 2.5: Works only with txco and is unusably slow + */ + VERY_LONG_SLOW = 2 [deprecated = true]; + + /* + * Medium Range - Slow + */ + MEDIUM_SLOW = 3; + + /* + * Medium Range - Fast + */ + MEDIUM_FAST = 4; + + /* + * Short Range - Slow + */ + SHORT_SLOW = 5; + + /* + * Short Range - Fast + */ + SHORT_FAST = 6; + + /* + * Long Range - Moderately Fast + */ + LONG_MODERATE = 7; + + /* + * Short Range - Turbo + * This is the fastest preset and the only one with 500kHz bandwidth. + * It is not legal to use in all regions due to this wider bandwidth. + */ + SHORT_TURBO = 8; + } + + /* + * When enabled, the `modem_preset` fields will be adhered to, else the `bandwidth`/`spread_factor`/`coding_rate` + * will be taked from their respective manually defined fields + */ + bool use_preset = 1; + + /* + * Either modem_config or bandwidth/spreading/coding will be specified - NOT BOTH. + * As a heuristic: If bandwidth is specified, do not use modem_config. + * Because protobufs take ZERO space when the value is zero this works out nicely. + * This value is replaced by bandwidth/spread_factor/coding_rate. + * If you'd like to experiment with other options add them to MeshRadio.cpp in the device code. + */ + ModemPreset modem_preset = 2; + + /* + * Bandwidth in MHz + * Certain bandwidth numbers are 'special' and will be converted to the + * appropriate floating point value: 31 -> 31.25MHz + */ + uint32 bandwidth = 3; + + /* + * A number from 7 to 12. + * Indicates number of chirps per symbol as 1< 7 results in the default + */ + uint32 hop_limit = 8; + + /* + * Disable TX from the LoRa radio. Useful for hot-swapping antennas and other tests. + * Defaults to false + */ + bool tx_enabled = 9; + + /* + * If zero, then use default max legal continuous power (ie. something that won't + * burn out the radio hardware) + * In most cases you should use zero here. + * Units are in dBm. + */ + int32 tx_power = 10; + + /* + * This controls the actual hardware frequency the radio transmits on. + * Most users should never need to be exposed to this field/concept. + * A channel number between 1 and NUM_CHANNELS (whatever the max is in the current region). + * If ZERO then the rule is "use the old channel name hash based + * algorithm to derive the channel number") + * If using the hash algorithm the channel number will be: hash(channel_name) % + * NUM_CHANNELS (Where num channels depends on the regulatory region). + */ + uint32 channel_num = 11; + + /* + * If true, duty cycle limits will be exceeded and thus you're possibly not following + * the local regulations if you're not a HAM. + * Has no effect if the duty cycle of the used region is 100%. + */ + bool override_duty_cycle = 12; + + /* + * If true, sets RX boosted gain mode on SX126X based radios + */ + bool sx126x_rx_boosted_gain = 13; + + /* + * This parameter is for advanced users and licensed HAM radio operators. + * Ignore Channel Calculation and use this frequency instead. The frequency_offset + * will still be applied. This will allow you to use out-of-band frequencies. + * Please respect your local laws and regulations. If you are a HAM, make sure you + * enable HAM mode and turn off encryption. + */ + float override_frequency = 14; + + /* + * If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. + */ + bool pa_fan_disabled = 15; + + /* + * For testing it is useful sometimes to force a node to never listen to + * particular other nodes (simulating radio out of range). All nodenums listed + * in ignore_incoming will have packets they send dropped on receive (by router.cpp) + */ + repeated uint32 ignore_incoming = 103; + + /* + * If true, the device will not process any packets received via LoRa that passed via MQTT anywhere on the path towards it. + */ + bool ignore_mqtt = 104; + + /* + * Sets the ok_to_mqtt bit on outgoing packets + */ + bool config_ok_to_mqtt = 105; + } + + message BluetoothConfig { + enum PairingMode { + /* + * Device generates a random PIN that will be shown on the screen of the device for pairing + */ + RANDOM_PIN = 0; + + /* + * Device requires a specified fixed PIN for pairing + */ + FIXED_PIN = 1; + + /* + * Device requires no PIN for pairing + */ + NO_PIN = 2; + } + + /* + * Enable Bluetooth on the device + */ + bool enabled = 1; + + /* + * Determines the pairing strategy for the device + */ + PairingMode mode = 2; + + /* + * Specified PIN for PairingMode.FixedPin + */ + uint32 fixed_pin = 3; + } + + message SecurityConfig { + + /* + * The public key of the user's device. + * Sent out to other nodes on the mesh to allow them to compute a shared secret key. + */ + bytes public_key = 1; + + /* + * The private key of the device. + * Used to create a shared key with a remote device. + */ + bytes private_key = 2; + + /* + * The public key authorized to send admin messages to this node. + */ + repeated bytes admin_key = 3; + + /* + * If true, device is considered to be "managed" by a mesh administrator via admin messages + * Device is managed by a mesh administrator. + */ + bool is_managed = 4; + + /* + * Serial Console over the Stream API." + */ + bool serial_enabled = 5; + + /* + * By default we turn off logging as soon as an API client connects (to keep shared serial link quiet). + * Output live debug logging over serial or bluetooth is set to true. + */ + bool debug_log_api_enabled = 6; + + /* + * Allow incoming device control over the insecure legacy admin channel. + */ + bool admin_channel_enabled = 8; + } + + /* + * Blank config request, strictly for getting the session key + */ + message SessionkeyConfig {} + + /* + * Payload Variant + */ + oneof payload_variant { + DeviceConfig device = 1; + PositionConfig position = 2; + PowerConfig power = 3; + NetworkConfig network = 4; + DisplayConfig display = 5; + LoRaConfig lora = 6; + BluetoothConfig bluetooth = 7; + SecurityConfig security = 8; + SessionkeyConfig sessionkey = 9; + DeviceUIConfig device_ui = 10; + } +} diff --git a/proto/tmp/connection_status.proto b/proto/tmp/connection_status.proto new file mode 100644 index 0000000..7551596 --- /dev/null +++ b/proto/tmp/connection_status.proto @@ -0,0 +1,120 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ConnStatusProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message DeviceConnectionStatus { + /* + * WiFi Status + */ + optional WifiConnectionStatus wifi = 1; + /* + * WiFi Status + */ + optional EthernetConnectionStatus ethernet = 2; + + /* + * Bluetooth Status + */ + optional BluetoothConnectionStatus bluetooth = 3; + + /* + * Serial Status + */ + optional SerialConnectionStatus serial = 4; +} + +/* + * WiFi connection status + */ +message WifiConnectionStatus { + /* + * Connection status + */ + NetworkConnectionStatus status = 1; + + /* + * WiFi access point SSID + */ + string ssid = 2; + + /* + * RSSI of wireless connection + */ + int32 rssi = 3; +} + +/* + * Ethernet connection status + */ +message EthernetConnectionStatus { + /* + * Connection status + */ + NetworkConnectionStatus status = 1; +} + +/* + * Ethernet or WiFi connection status + */ +message NetworkConnectionStatus { + /* + * IP address of device + */ + fixed32 ip_address = 1; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 2; + + /* + * Whether the device has an active connection to an MQTT broker or not + */ + bool is_mqtt_connected = 3; + + /* + * Whether the device is actively remote syslogging or not + */ + bool is_syslog_connected = 4; +} + +/* + * Bluetooth connection status + */ +message BluetoothConnectionStatus { + /* + * The pairing PIN for bluetooth + */ + uint32 pin = 1; + + /* + * RSSI of bluetooth connection + */ + int32 rssi = 2; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 3; +} + +/* + * Serial connection status + */ +message SerialConnectionStatus { + /* + * Serial baud rate + */ + uint32 baud = 1; + + /* + * Whether the device has an active connection or not + */ + bool is_connected = 2; +} diff --git a/proto/tmp/device_ui.proto b/proto/tmp/device_ui.proto new file mode 100644 index 0000000..138f5e8 --- /dev/null +++ b/proto/tmp/device_ui.proto @@ -0,0 +1,290 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "DeviceUIProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Protobuf structures for device-ui persistency + */ + +message DeviceUIConfig { + /* + * A version integer used to invalidate saved files when we make incompatible changes. + */ + uint32 version = 1; + + /* + * TFT display brightness 1..255 + */ + uint32 screen_brightness = 2; + + /* + * Screen timeout 0..900 + */ + uint32 screen_timeout = 3; + + /* + * Screen/Settings lock enabled + */ + bool screen_lock = 4; + bool settings_lock = 5; + uint32 pin_code = 6; + + /* + * Color theme + */ + Theme theme = 7; + + /* + * Audible message, banner and ring tone + */ + bool alert_enabled = 8; + bool banner_enabled = 9; + uint32 ring_tone_id = 10; + + /* + * Localization + */ + Language language = 11; + + /* + * Node list filter + */ + NodeFilter node_filter = 12; + + /* + * Node list highlightening + */ + NodeHighlight node_highlight = 13; + + /* + * 8 integers for screen calibration data + */ + bytes calibration_data = 14; + + /* + * Map related data + */ + Map map_data = 15; +} + + +message NodeFilter { + /* + * Filter unknown nodes + */ + bool unknown_switch = 1; + + /* + * Filter offline nodes + */ + bool offline_switch = 2; + + /* + * Filter nodes w/o public key + */ + bool public_key_switch = 3; + + /* + * Filter based on hops away + */ + int32 hops_away = 4; + + /* + * Filter nodes w/o position + */ + bool position_switch = 5; + + /* + * Filter nodes by matching name string + */ + string node_name = 6; + + /* + * Filter based on channel + */ + int32 channel = 7; + +} + +message NodeHighlight { + /* + * Hightlight nodes w/ active chat + */ + bool chat_switch = 1; + + /* + * Highlight nodes w/ position + */ + bool position_switch = 2; + + /* + * Highlight nodes w/ telemetry data + */ + bool telemetry_switch = 3; + + /* + * Highlight nodes w/ iaq data + */ + bool iaq_switch = 4; + + /* + * Highlight nodes by matching name string + */ + string node_name = 5; + +} + +message GeoPoint { + /* + * Zoom level + */ + int32 zoom = 1; + + /* + * Coordinate: latitude + */ + int32 latitude = 2; + + /* + * Coordinate: longitude + */ + int32 longitude = 3; +} + +message Map { + /* + * Home coordinates + */ + GeoPoint home = 1; + + /* + * Map tile style + */ + string style = 2; + + /* + * Map scroll follows GPS + */ + bool follow_gps = 3; +} + +enum Theme { + /* + * Dark + */ + DARK = 0; + /* + * Light + */ + LIGHT = 1; + /* + * Red + */ + RED = 2; +} + +/* + * Localization + */ +enum Language { + /* + * English + */ + ENGLISH = 0; + + /* + * French + */ + FRENCH = 1; + + /* + * German + */ + GERMAN = 2; + + /* + * Italian + */ + ITALIAN = 3; + + /* + * Portuguese + */ + PORTUGUESE = 4; + + /* + * Spanish + */ + SPANISH = 5; + + /* + * Swedish + */ + SWEDISH = 6; + + /* + * Finnish + */ + FINNISH = 7; + + /* + * Polish + */ + POLISH = 8; + + /* + * Turkish + */ + TURKISH = 9; + + /* + * Serbian + */ + SERBIAN = 10; + + /* + * Russian + */ + RUSSIAN = 11; + + /* + * Dutch + */ + DUTCH = 12; + + /* + * Greek + */ + GREEK = 13; + + /* + * Norwegian + */ + NORWEGIAN = 14; + + /* + * Slovenian + */ + SLOVENIAN = 15; + + /* + * Ukrainian + */ + UKRAINIAN = 16; + + /* + * Simplified Chinese (experimental) + */ + SIMPLIFIED_CHINESE = 30; + + /* + * Traditional Chinese (experimental) + */ + TRADITIONAL_CHINESE = 31; + } diff --git a/proto/tmp/deviceonly.proto b/proto/tmp/deviceonly.proto new file mode 100644 index 0000000..ea6ef25 --- /dev/null +++ b/proto/tmp/deviceonly.proto @@ -0,0 +1,291 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/mesh.proto"; +import "meshtastic/telemetry.proto"; +import "meshtastic/config.proto"; +import "meshtastic/localonly.proto"; +import "nanopb.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "DeviceOnly"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; +option (nanopb_fileopt).include = ""; + + +/* + * Position with static location information only for NodeDBLite + */ +message PositionLite { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + sfixed32 latitude_i = 1; + + /* + * TODO: REPLACE + */ + sfixed32 longitude_i = 2; + + /* + * In meters above MSL (but see issue #359) + */ + int32 altitude = 3; + + /* + * 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 + */ + fixed32 time = 4; + + /* + * TODO: REPLACE + */ + Position.LocSource location_source = 5; +} + +message UserLite { + /* + * This is the addr of the radio. + */ + bytes macaddr = 1 [deprecated = true]; + + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 2; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 3; + + /* + * 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. + */ + HardwareModel hw_model = 4; + + /* + * 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. + */ + bool is_licensed = 5; + + /* + * Indicates that the user's role in the mesh + */ + Config.DeviceConfig.Role role = 6; + + /* + * 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. + */ + bytes public_key = 7; +} + +message NodeInfoLite { + /* + * The node number + */ + uint32 num = 1; + + /* + * The user info for this node + */ + UserLite user = 2; + + /* + * 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. + */ + PositionLite position = 3; + + /* + * 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 + */ + float snr = 4; + + /* + * Set to indicate the last time we received a packet from this node + */ + fixed32 last_heard = 5; + /* + * The latest device metrics for the node. + */ + DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if direct neighbor) + */ + optional uint32 hops_away = 9; + + /* + * True if node is in our favorites list + * Persists between NodeDB internal clean ups + */ + bool is_favorite = 10; + + /* + * True if node is in our ignored list + * Persists between NodeDB internal clean ups + */ + bool is_ignored = 11; + + /* + * Last byte of the node number of the node that should be used as the next hop to reach this node. + */ + uint32 next_hop = 12; +} + +/* + * 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 + */ +message DeviceState { + /* + * Read only settings/info about this node + */ + MyNodeInfo my_node = 2; + + /* + * My owner info + */ + User owner = 3; + + /* + * Received packets saved for delivery to the phone + */ + repeated MeshPacket receive_queue = 5; + + /* + * 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. + */ + uint32 version = 8; + + /* + * We keep the last received text message (only) stored in the device flash, + * so we can show it on the screen. + * Might be null + */ + MeshPacket rx_text_message = 7; + + /* + * Used only during development. + * Indicates developer is testing and changes should never be saved to flash. + * Deprecated in 2.3.1 + */ + bool no_save = 9 [deprecated = true]; + + /* + * Previously used to manage GPS factory resets. + * Deprecated in 2.5.23 + */ + bool did_gps_reset = 11 [deprecated = true]; + + /* + * We keep the last received waypoint stored in the device flash, + * so we can show it on the screen. + * Might be null + */ + MeshPacket rx_waypoint = 12; + + /* + * The mesh's nodes with their available gpio pins for RemoteHardware module + */ + repeated NodeRemoteHardwarePin node_remote_hardware_pins = 13; +} + +message NodeDatabase { + /* + * 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. + */ + uint32 version = 1; + + /* + * New lite version of NodeDB to decrease memory footprint + */ + repeated NodeInfoLite nodes = 2 [(nanopb).callback_datatype = "std::vector"]; +} + +/* + * The on-disk saved channels + */ +message ChannelFile { + /* + * The channels our node knows about + */ + repeated Channel channels = 1; + + /* + * 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. + */ + uint32 version = 2; +} + +/* + * The on-disk backup of the node's preferences + */ + message BackupPreferences { + /* + * The version of the backup + */ + uint32 version = 1; + + /* + * The timestamp of the backup (if node has time) + */ + fixed32 timestamp = 2; + + /* + * The node's configuration + */ + LocalConfig config = 3; + + /* + * The node's module configuration + */ + LocalModuleConfig module_config = 4; + + /* + * The node's channels + */ + ChannelFile channels = 5; + + /* + * The node's user (owner) information + */ + User owner = 6; +} diff --git a/proto/tmp/interdevice.proto b/proto/tmp/interdevice.proto new file mode 100644 index 0000000..54e950f --- /dev/null +++ b/proto/tmp/interdevice.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "InterdeviceProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +// encapsulate up to 1k of NMEA string data + +enum MessageType { + ACK = 0; + COLLECT_INTERVAL = 160; // in ms + BEEP_ON = 161; // duration ms + BEEP_OFF = 162; // cancel prematurely + SHUTDOWN = 163; + POWER_ON = 164; + SCD41_TEMP = 176; + SCD41_HUMIDITY = 177; + SCD41_CO2 = 178; + AHT20_TEMP = 179; + AHT20_HUMIDITY = 180; + TVOC_INDEX = 181; +} + +message SensorData { + // The message type + MessageType type = 1; + // The sensor data, either as a float or an uint32 + oneof data { + float float_value = 2; + uint32 uint32_value = 3; + } +} + +message InterdeviceMessage { + // The message data + oneof data { + string nmea = 1; + SensorData sensor = 2; + } +} diff --git a/proto/tmp/localonly.proto b/proto/tmp/localonly.proto new file mode 100644 index 0000000..bcb2796 --- /dev/null +++ b/proto/tmp/localonly.proto @@ -0,0 +1,140 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/config.proto"; +import "meshtastic/module_config.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "LocalOnlyProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Protobuf structures common to apponly.proto and deviceonly.proto + * This is never sent over the wire, only for local use + */ + +message LocalConfig { + /* + * The part of the config that is specific to the Device + */ + Config.DeviceConfig device = 1; + + /* + * The part of the config that is specific to the GPS Position + */ + Config.PositionConfig position = 2; + + /* + * The part of the config that is specific to the Power settings + */ + Config.PowerConfig power = 3; + + /* + * The part of the config that is specific to the Wifi Settings + */ + Config.NetworkConfig network = 4; + + /* + * The part of the config that is specific to the Display + */ + Config.DisplayConfig display = 5; + + /* + * The part of the config that is specific to the Lora Radio + */ + Config.LoRaConfig lora = 6; + + /* + * The part of the config that is specific to the Bluetooth settings + */ + Config.BluetoothConfig bluetooth = 7; + + /* + * 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. + */ + uint32 version = 8; + + /* + * The part of the config that is specific to Security settings + */ + Config.SecurityConfig security = 9; +} + +message LocalModuleConfig { + /* + * The part of the config that is specific to the MQTT module + */ + ModuleConfig.MQTTConfig mqtt = 1; + + /* + * The part of the config that is specific to the Serial module + */ + ModuleConfig.SerialConfig serial = 2; + + /* + * The part of the config that is specific to the ExternalNotification module + */ + ModuleConfig.ExternalNotificationConfig external_notification = 3; + + /* + * The part of the config that is specific to the Store & Forward module + */ + ModuleConfig.StoreForwardConfig store_forward = 4; + + /* + * The part of the config that is specific to the RangeTest module + */ + ModuleConfig.RangeTestConfig range_test = 5; + + /* + * The part of the config that is specific to the Telemetry module + */ + ModuleConfig.TelemetryConfig telemetry = 6; + + /* + * The part of the config that is specific to the Canned Message module + */ + ModuleConfig.CannedMessageConfig canned_message = 7; + + /* + * The part of the config that is specific to the Audio module + */ + ModuleConfig.AudioConfig audio = 9; + + /* + * The part of the config that is specific to the Remote Hardware module + */ + ModuleConfig.RemoteHardwareConfig remote_hardware = 10; + + /* + * The part of the config that is specific to the Neighbor Info module + */ + ModuleConfig.NeighborInfoConfig neighbor_info = 11; + + /* + * The part of the config that is specific to the Ambient Lighting module + */ + ModuleConfig.AmbientLightingConfig ambient_lighting = 12; + + /* + * The part of the config that is specific to the Detection Sensor module + */ + ModuleConfig.DetectionSensorConfig detection_sensor = 13; + + /* + * Paxcounter Config + */ + ModuleConfig.PaxcounterConfig paxcounter = 14; + + /* + * 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. + */ + uint32 version = 8; +} diff --git a/proto/tmp/mesh.proto b/proto/tmp/mesh.proto new file mode 100644 index 0000000..2af5d98 --- /dev/null +++ b/proto/tmp/mesh.proto @@ -0,0 +1,2151 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/channel.proto"; +import "meshtastic/config.proto"; +import "meshtastic/module_config.proto"; +import "meshtastic/portnums.proto"; +import "meshtastic/telemetry.proto"; +import "meshtastic/xmodem.proto"; +import "meshtastic/device_ui.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "MeshProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * A GPS Position + */ +message Position { + /* + * The new preferred location encoding, multiply by 1e-7 to get degrees + * in floating point + */ + optional sfixed32 latitude_i = 1; + + /* + * TODO: REPLACE + */ + optional sfixed32 longitude_i = 2; + + /* + * In meters above MSL (but see issue #359) + */ + optional int32 altitude = 3; + + /* + * 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 time if it is sent over + * the mesh (because there are devices on the mesh without GPS or RTC). + * seconds since 1970 + */ + fixed32 time = 4; + + /* + * How the location was acquired: manual, onboard GPS, external (EUD) GPS + */ + enum LocSource { + /* + * TODO: REPLACE + */ + LOC_UNSET = 0; + + /* + * TODO: REPLACE + */ + LOC_MANUAL = 1; + + /* + * TODO: REPLACE + */ + LOC_INTERNAL = 2; + + /* + * TODO: REPLACE + */ + LOC_EXTERNAL = 3; + } + + /* + * TODO: REPLACE + */ + LocSource location_source = 5; + + /* + * How the altitude was acquired: manual, GPS int/ext, etc + * Default: same as location_source if present + */ + enum AltSource { + /* + * TODO: REPLACE + */ + ALT_UNSET = 0; + + /* + * TODO: REPLACE + */ + ALT_MANUAL = 1; + + /* + * TODO: REPLACE + */ + ALT_INTERNAL = 2; + + /* + * TODO: REPLACE + */ + ALT_EXTERNAL = 3; + + /* + * TODO: REPLACE + */ + ALT_BAROMETRIC = 4; + } + + /* + * TODO: REPLACE + */ + AltSource altitude_source = 6; + + /* + * Positional timestamp (actual timestamp of GPS solution) in integer epoch seconds + */ + fixed32 timestamp = 7; + + /* + * Pos. timestamp milliseconds adjustment (rarely available or required) + */ + int32 timestamp_millis_adjust = 8; + + /* + * HAE altitude in meters - can be used instead of MSL altitude + */ + optional sint32 altitude_hae = 9; + + /* + * Geoidal separation in meters + */ + optional sint32 altitude_geoidal_separation = 10; + + /* + * Horizontal, Vertical and Position Dilution of Precision, in 1/100 units + * - PDOP is sufficient for most cases + * - for higher precision scenarios, HDOP and VDOP can be used instead, + * in which case PDOP becomes redundant (PDOP=sqrt(HDOP^2 + VDOP^2)) + * TODO: REMOVE/INTEGRATE + */ + uint32 PDOP = 11; + + /* + * TODO: REPLACE + */ + uint32 HDOP = 12; + + /* + * TODO: REPLACE + */ + uint32 VDOP = 13; + + /* + * GPS accuracy (a hardware specific constant) in mm + * multiplied with DOP to calculate positional accuracy + * Default: "'bout three meters-ish" :) + */ + uint32 gps_accuracy = 14; + + /* + * Ground speed in m/s and True North TRACK in 1/100 degrees + * Clarification of terms: + * - "track" is the direction of motion (measured in horizontal plane) + * - "heading" is where the fuselage points (measured in horizontal plane) + * - "yaw" indicates a relative rotation about the vertical axis + * TODO: REMOVE/INTEGRATE + */ + optional uint32 ground_speed = 15; + + /* + * TODO: REPLACE + */ + optional uint32 ground_track = 16; + + /* + * GPS fix quality (from NMEA GxGGA statement or similar) + */ + uint32 fix_quality = 17; + + /* + * GPS fix type 2D/3D (from NMEA GxGSA statement) + */ + uint32 fix_type = 18; + + /* + * GPS "Satellites in View" number + */ + uint32 sats_in_view = 19; + + /* + * Sensor ID - in case multiple positioning sensors are being used + */ + uint32 sensor_id = 20; + + /* + * Estimated/expected time (in seconds) until next update: + * - if we update at fixed intervals of X seconds, use X + * - if we update at dynamic intervals (based on relative movement etc), + * but "AT LEAST every Y seconds", use Y + */ + uint32 next_update = 21; + + /* + * A sequence number, incremented with each Position message to help + * detect lost updates if needed + */ + uint32 seq_number = 22; + + /* + * Indicates the bits of precision set by the sending node + */ + uint32 precision_bits = 23; +} + +/* + * Note: these enum names must EXACTLY match the string used in the device + * bin/build-all.sh script. + * Because they will be used to find firmware filenames in the android app for OTA updates. + * To match the old style filenames, _ is converted to -, p is converted to . + */ +enum HardwareModel { + /* + * TODO: REPLACE + */ + UNSET = 0; + + /* + * TODO: REPLACE + */ + TLORA_V2 = 1; + + /* + * TODO: REPLACE + */ + TLORA_V1 = 2; + + /* + * TODO: REPLACE + */ + TLORA_V2_1_1P6 = 3; + + /* + * TODO: REPLACE + */ + TBEAM = 4; + + /* + * The original heltec WiFi_Lora_32_V2, which had battery voltage sensing hooked to GPIO 13 + * (see HELTEC_V2 for the new version). + */ + HELTEC_V2_0 = 5; + + /* + * TODO: REPLACE + */ + TBEAM_V0P7 = 6; + + /* + * TODO: REPLACE + */ + T_ECHO = 7; + + /* + * TODO: REPLACE + */ + TLORA_V1_1P3 = 8; + + /* + * TODO: REPLACE + */ + RAK4631 = 9; + + /* + * The new version of the heltec WiFi_Lora_32_V2 board that has battery sensing hooked to GPIO 37. + * Sadly they did not update anything on the silkscreen to identify this board + */ + HELTEC_V2_1 = 10; + + /* + * Ancient heltec WiFi_Lora_32 board + */ + HELTEC_V1 = 11; + + /* + * New T-BEAM with ESP32-S3 CPU + */ + LILYGO_TBEAM_S3_CORE = 12; + + /* + * RAK WisBlock ESP32 core: https://docs.rakwireless.com/Product-Categories/WisBlock/RAK11200/Overview/ + */ + RAK11200 = 13; + + /* + * B&Q Consulting Nano Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:nano + */ + NANO_G1 = 14; + + /* + * TODO: REPLACE + */ + TLORA_V2_1_1P8 = 15; + + /* + * TODO: REPLACE + */ + TLORA_T3_S3 = 16; + + /* + * B&Q Consulting Nano G1 Explorer: https://wiki.uniteng.com/en/meshtastic/nano-g1-explorer + */ + NANO_G1_EXPLORER = 17; + + /* + * B&Q Consulting Nano G2 Ultra: https://wiki.uniteng.com/en/meshtastic/nano-g2-ultra + */ + NANO_G2_ULTRA = 18; + + /* + * LoRAType device: https://loratype.org/ + */ + LORA_TYPE = 19; + + /* + * wiphone https://www.wiphone.io/ + */ + WIPHONE = 20; + + /* + * WIO Tracker WM1110 family from Seeed Studio. Includes wio-1110-tracker and wio-1110-sdk + */ + WIO_WM1110 = 21; + + /* + * RAK2560 Solar base station based on RAK4630 + */ + RAK2560 = 22; + + /* + * Heltec HRU-3601: https://heltec.org/project/hru-3601/ + */ + HELTEC_HRU_3601 = 23; + + /* + * Heltec Wireless Bridge + */ + HELTEC_WIRELESS_BRIDGE = 24; + + /* + * B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station + */ + STATION_G1 = 25; + + /* + * RAK11310 (RP2040 + SX1262) + */ + RAK11310 = 26; + + /* + * Makerfabs SenseLoRA Receiver (RP2040 + RFM96) + */ + SENSELORA_RP2040 = 27; + + /* + * Makerfabs SenseLoRA Industrial Monitor (ESP32-S3 + RFM96) + */ + SENSELORA_S3 = 28; + + /* + * Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone + */ + CANARYONE = 29; + + /* + * Waveshare RP2040 LoRa - https://www.waveshare.com/rp2040-lora.htm + */ + RP2040_LORA = 30; + + /* + * B&Q Consulting Station G2: https://wiki.uniteng.com/en/meshtastic/station-g2 + */ + STATION_G2 = 31; + + /* + * --------------------------------------------------------------------------- + * Less common/prototype boards listed here (needs one more byte over the air) + * --------------------------------------------------------------------------- + */ + LORA_RELAY_V1 = 32; + + /* + * TODO: REPLACE + */ + NRF52840DK = 33; + + /* + * TODO: REPLACE + */ + PPR = 34; + + /* + * TODO: REPLACE + */ + GENIEBLOCKS = 35; + + /* + * TODO: REPLACE + */ + NRF52_UNKNOWN = 36; + + /* + * TODO: REPLACE + */ + PORTDUINO = 37; + + /* + * The simulator built into the android app + */ + ANDROID_SIM = 38; + + /* + * Custom DIY device based on @NanoVHF schematics: https://github.com/NanoVHF/Meshtastic-DIY/tree/main/Schematics + */ + DIY_V1 = 39; + + /* + * nRF52840 Dongle : https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle/ + */ + NRF52840_PCA10059 = 40; + + /* + * Custom Disaster Radio esp32 v3 device https://github.com/sudomesh/disaster-radio/tree/master/hardware/board_esp32_v3 + */ + DR_DEV = 41; + + /* + * M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ + */ + M5STACK = 42; + + /* + * New Heltec LoRA32 with ESP32-S3 CPU + */ + HELTEC_V3 = 43; + + /* + * New Heltec Wireless Stick Lite with ESP32-S3 CPU + */ + HELTEC_WSL_V3 = 44; + + /* + * New BETAFPV ELRS Micro TX Module 2.4G with ESP32 CPU + */ + BETAFPV_2400_TX = 45; + + /* + * BetaFPV ExpressLRS "Nano" TX Module 900MHz with ESP32 CPU + */ + BETAFPV_900_NANO_TX = 46; + + /* + * Raspberry Pi Pico (W) with Waveshare SX1262 LoRa Node Module + */ + RPI_PICO = 47; + + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Newer V1.1, version is written on the PCB near the display. + */ + HELTEC_WIRELESS_TRACKER = 48; + + /* + * Heltec Wireless Paper with ESP32-S3 CPU and E-Ink display + */ + HELTEC_WIRELESS_PAPER = 49; + + /* + * LilyGo T-Deck with ESP32-S3 CPU, Keyboard and IPS display + */ + T_DECK = 50; + + /* + * LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display + */ + T_WATCH_S3 = 51; + + /* + * Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display + */ + PICOMPUTER_S3 = 52; + + /* + * Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa + */ + HELTEC_HT62 = 53; + + /* + * EBYTE SPI LoRa module and ESP32-S3 + */ + EBYTE_ESP32_S3 = 54; + + /* + * Waveshare ESP32-S3-PICO with PICO LoRa HAT and 2.9inch e-Ink + */ + ESP32_S3_PICO = 55; + + /* + * CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom + * Lora module can be swapped out for a Heltec RA-62 which is "almost" pin compatible + * with one cut and one jumper Meshtastic works + */ + CHATTER_2 = 56; + + /* + * Heltec Wireless Paper, With ESP32-S3 CPU and E-Ink display + * Older "V1.0" Variant, has no "version sticker" + * E-Ink model is DEPG0213BNS800 + * Tab on the screen protector is RED + * Flex connector marking is FPC-7528B + */ + HELTEC_WIRELESS_PAPER_V1_0 = 57; + + /* + * Heltec Wireless Tracker with ESP32-S3 CPU, built-in GPS, and TFT + * Older "V1.0" Variant + */ + HELTEC_WIRELESS_TRACKER_V1_0 = 58; + + /* + * unPhone with ESP32-S3, TFT touchscreen, LSM6DS3TR-C accelerometer and gyroscope + */ + UNPHONE = 59; + + /* + * Teledatics TD-LORAC NRF52840 based M.2 LoRA module + * Compatible with the TD-WRLS development board + */ + TD_LORAC = 60; + + /* + * CDEBYTE EoRa-S3 board using their own MM modules, clone of LILYGO T3S3 + */ + CDEBYTE_EORA_S3 = 61; + + /* + * TWC_MESH_V4 + * Adafruit NRF52840 feather express with SX1262, SSD1306 OLED and NEO6M GPS + */ + TWC_MESH_V4 = 62; + + /* + * NRF52_PROMICRO_DIY + * Promicro NRF52840 with SX1262/LLCC68, SSD1306 OLED and NEO6M GPS + */ + NRF52_PROMICRO_DIY = 63; + + /* + * RadioMaster 900 Bandit Nano, https://www.radiomasterrc.com/products/bandit-nano-expresslrs-rf-module + * ESP32-D0WDQ6 With SX1276/SKY66122, SSD1306 OLED and No GPS + */ + RADIOMASTER_900_BANDIT_NANO = 64; + + /* + * Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors + */ + HELTEC_CAPSULE_SENSOR_V3 = 65; + + /* + * Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display + */ + HELTEC_VISION_MASTER_T190 = 66; + + /* + * Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display + */ + HELTEC_VISION_MASTER_E213 = 67; + + /* + * Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display + */ + HELTEC_VISION_MASTER_E290 = 68; + + /* + * Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design, + * specifically adapted for the Meshtatic project + */ + HELTEC_MESH_NODE_T114 = 69; + + /* + * Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor + */ + SENSECAP_INDICATOR = 70; + + /* + * Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. + */ + TRACKER_T1000_E = 71; + + /* + * RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) + */ + RAK3172 = 72; + + /* + * Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. + */ + WIO_E5 = 73; + + /* + * RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module + * SSD1306 OLED and No GPS + */ + RADIOMASTER_900_BANDIT = 74; + + /* + * Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. + */ + ME25LS01_4Y10TD = 75; + + /* + * RP2040_FEATHER_RFM95 + * Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED + * https://www.adafruit.com/product/5714 + * https://www.adafruit.com/product/326 + * https://www.adafruit.com/product/938 + * ^^^ short A0 to switch to I2C address 0x3C + * + */ + RP2040_FEATHER_RFM95 = 76; + + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ + M5STACK_COREBASIC = 77; + M5STACK_CORE2 = 78; + + /* Pico2 with Waveshare Hat, same as Pico */ + RPI_PICO2 = 79; + + /* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, CoreS3, Paper) https://m5stack.com/ */ + M5STACK_CORES3 = 80; + + /* Seeed XIAO S3 DK*/ + SEEED_XIAO_S3 = 81; + + /* + * Nordic nRF52840+Semtech SX1262 LoRa BLE Combo Module. nRF52840+SX1262 MS24SF1 + */ + MS24SF1 = 82; + + /* + * Lilygo TLora-C6 with the new ESP32-C6 MCU + */ + TLORA_C6 = 83; + + /* + * WisMesh Tap + * RAK-4631 w/ TFT in injection modled case + */ + WISMESH_TAP = 84; + + /* + * Similar to PORTDUINO but used by Routastic devices, this is not any + * particular device and does not run Meshtastic's code but supports + * the same frame format. + * Runs on linux, see https://github.com/Jorropo/routastic + */ + ROUTASTIC = 85; + + /* + * Mesh-Tab, esp32 based + * https://github.com/valzzu/Mesh-Tab + */ + MESH_TAB = 86; + + /* + * MeshLink board developed by LoraItalia. NRF52840, eByte E22900M22S (Will also come with other frequencies), 25w MPPT solar charger (5v,12v,18v selectable), support for gps, buzzer, oled or e-ink display, 10 gpios, hardware watchdog + * https://www.loraitalia.it + */ + MESHLINK = 87; + + /* + * Seeed XIAO nRF52840 + Wio SX1262 kit + */ + XIAO_NRF52_KIT = 88; + + /* + * Elecrow ThinkNode M1 & M2 + * https://www.elecrow.com/wiki/ThinkNode-M1_Transceiver_Device(Meshtastic)_Power_By_nRF52840.html + * https://www.elecrow.com/wiki/ThinkNode-M2_Transceiver_Device(Meshtastic)_Power_By_NRF52840.html (this actually uses ESP32-S3) + */ + THINKNODE_M1 = 89; + THINKNODE_M2 = 90; + + /* + * Lilygo T-ETH-Elite + */ + T_ETH_ELITE = 91; + + /* + * Heltec HRI-3621 industrial probe + */ + HELTEC_SENSOR_HUB = 92; + + /* + * Reserved Fried Chicken ID for future use + */ + RESERVED_FRIED_CHICKEN = 93; + + /* + * Heltec Magnetic Power Bank with Meshtastic compatible + */ + HELTEC_MESH_POCKET = 94; + + /* + * Seeed Solar Node + */ + SEEED_SOLAR_NODE = 95; + + /* + * NomadStar Meteor Pro https://nomadstar.ch/ + */ + NOMADSTAR_METEOR_PRO = 96; + + /* + * Elecrow CrowPanel Advance models, ESP32-S3 and TFT with SX1262 radio plugin + */ + CROWPANEL = 97; + + /* + * ------------------------------------------------------------------------------------------------------------------------------------------ + * Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits. + * ------------------------------------------------------------------------------------------------------------------------------------------ + */ + PRIVATE_HW = 255; +} + +/* + * Broadcast when a newly powered mesh node wants to find a node num it can use + * Sent from the phone over bluetooth to set the user id for the owner of this node. + * Also sent from nodes to each other when a new node signs on (so all clients can have this info) + * The algorithm is as follows: + * when a node starts up, it broadcasts their user and the normal flow is for all + * other nodes to reply with their User as well (so the new node can build its nodedb) + * If a node ever receives a User (not just the first broadcast) message where + * the sender node number equals our node number, that indicates a collision has + * occurred and the following steps should happen: + * If the receiving node (that was already in the mesh)'s macaddr is LOWER than the + * new User who just tried to sign in: it gets to keep its nodenum. + * We send a broadcast message of OUR User (we use a broadcast so that the other node can + * receive our message, considering we have the same id - it also serves to let + * observers correct their nodedb) - this case is rare so it should be okay. + * If any node receives a User where the macaddr is GTE than their local macaddr, + * they have been vetoed and should pick a new random nodenum (filtering against + * whatever it knows about the nodedb) and rebroadcast their User. + * A few nodenums are reserved and will never be requested: + * 0xff - broadcast + * 0 through 3 - for future use + */ +message User { + /* + * A globally unique ID string for this user. + * In the case of Signal that would mean +16504442323, for the default macaddr derived id it would be !<8 hexidecimal bytes>. + * Note: app developers are encouraged to also use the following standard + * node IDs "^all" (for broadcast), "^local" (for the locally connected node) + */ + string id = 1; + + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 2; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 3; + + /* + * Deprecated in Meshtastic 2.1.x + * This is the addr of the radio. + * Not populated by the phone, but added by the esp32 when broadcasting + */ + bytes macaddr = 4 [deprecated = true]; + + /* + * 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. + */ + HardwareModel hw_model = 5; + + /* + * 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. + */ + bool is_licensed = 6; + + /* + * Indicates that the user's role in the mesh + */ + Config.DeviceConfig.Role role = 7; + + /* + * 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. + */ + bytes public_key = 8; +} + +/* + * A message used in a traceroute + */ +message RouteDiscovery { + /* + * The list of nodenums this packet has visited so far to the destination. + */ + repeated fixed32 route = 1; + + /* + * The list of SNRs (in dB, scaled by 4) in the route towards the destination. + */ + repeated int32 snr_towards = 2; + + /* + * The list of nodenums the packet has visited on the way back from the destination. + */ + repeated fixed32 route_back = 3; + + /* + * The list of SNRs (in dB, scaled by 4) in the route back from the destination. + */ + repeated int32 snr_back = 4; +} + +/* + * A Routing control Data packet handled by the routing module + */ +message Routing { + /* + * A failure in delivering a message (usually used for routing control messages, but might be provided in addition to ack.fail_id to provide + * details on the type of failure). + */ + enum Error { + /* + * This message is not a failure + */ + NONE = 0; + + /* + * Our node doesn't have a route to the requested destination anymore. + */ + NO_ROUTE = 1; + + /* + * We received a nak while trying to forward on your behalf + */ + GOT_NAK = 2; + + /* + * TODO: REPLACE + */ + TIMEOUT = 3; + + /* + * No suitable interface could be found for delivering this packet + */ + NO_INTERFACE = 4; + + /* + * We reached the max retransmission count (typically for naive flood routing) + */ + MAX_RETRANSMIT = 5; + + /* + * No suitable channel was found for sending this packet (i.e. was requested channel index disabled?) + */ + NO_CHANNEL = 6; + + /* + * The packet was too big for sending (exceeds interface MTU after encoding) + */ + TOO_LARGE = 7; + + /* + * The request had want_response set, the request reached the destination node, but no service on that node wants to send a response + * (possibly due to bad channel permissions) + */ + NO_RESPONSE = 8; + + /* + * Cannot send currently because duty cycle regulations will be violated. + */ + DUTY_CYCLE_LIMIT = 9; + + /* + * The application layer service on the remote node received your request, but considered your request somehow invalid + */ + BAD_REQUEST = 32; + + /* + * The application layer service on the remote node received your request, but considered your request not authorized + * (i.e you did not send the request on the required bound channel) + */ + NOT_AUTHORIZED = 33; + + /* + * The client specified a PKI transport, but the node was unable to send the packet using PKI (and did not send the message at all) + */ + PKI_FAILED = 34; + + /* + * The receiving node does not have a Public Key to decode with + */ + PKI_UNKNOWN_PUBKEY = 35; + + /* + * Admin packet otherwise checks out, but uses a bogus or expired session key + */ + ADMIN_BAD_SESSION_KEY = 36; + + /* + * Admin packet sent using PKC, but not from a public key on the admin key list + */ + ADMIN_PUBLIC_KEY_UNAUTHORIZED = 37; + } + + oneof variant { + /* + * A route request going from the requester + */ + RouteDiscovery route_request = 1; + + /* + * A route reply + */ + RouteDiscovery route_reply = 2; + + /* + * A failure in delivering a message (usually used for routing control messages, but might be provided + * in addition to ack.fail_id to provide details on the type of failure). + */ + Error error_reason = 3; + } +} + +/* + * (Formerly called SubPacket) + * The payload portion fo a packet, this is the actual bytes that are sent + * inside a radio packet (because from/to are broken out by the comms library) + */ +message Data { + /* + * Formerly named typ and of type Type + */ + PortNum portnum = 1; + + /* + * TODO: REPLACE + */ + bytes payload = 2; + + /* + * Not normally used, but for testing a sender can request that recipient + * responds in kind (i.e. if it received a position, it should unicast back it's position). + * Note: that if you set this on a broadcast you will receive many replies. + */ + bool want_response = 3; + + /* + * The address of the destination node. + * This field is is filled in by the mesh radio device software, application + * layer software should never need it. + * RouteDiscovery messages _must_ populate this. + * Other message types might need to if they are doing multihop routing. + */ + fixed32 dest = 4; + + /* + * The address of the original sender for this message. + * This field should _only_ be populated for reliable multihop packets (to keep + * packets small). + */ + fixed32 source = 5; + + /* + * Only used in routing or response messages. + * Indicates the original message ID that this message is reporting failure on. (formerly called original_id) + */ + fixed32 request_id = 6; + + /* + * If set, this message is intened to be a reply to a previously sent message with the defined id. + */ + fixed32 reply_id = 7; + + /* + * Defaults to false. If true, then what is in the payload should be treated as an emoji like giving + * a message a heart or poop emoji. + */ + fixed32 emoji = 8; + + /* + * Bitfield for extra flags. First use is to indicate that user approves the packet being uploaded to MQTT. + */ + optional uint32 bitfield = 9; +} + +/* + * Waypoint message, used to share arbitrary locations across the mesh + */ +message Waypoint { + /* + * Id of the waypoint + */ + uint32 id = 1; + + /* + * latitude_i + */ + optional sfixed32 latitude_i = 2; + + /* + * longitude_i + */ + optional sfixed32 longitude_i = 3; + + /* + * Time the waypoint is to expire (epoch) + */ + uint32 expire = 4; + + /* + * If greater than zero, treat the value as a nodenum only allowing them to update the waypoint. + * If zero, the waypoint is open to be edited by any member of the mesh. + */ + uint32 locked_to = 5; + + /* + * Name of the waypoint - max 30 chars + */ + string name = 6; + + /* + * Description of the waypoint - max 100 chars + */ + string description = 7; + + /* + * Designator icon for the waypoint in the form of a unicode emoji + */ + fixed32 icon = 8; +} + +/* + * This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server + */ +message MqttClientProxyMessage { + /* + * The MQTT topic this message will be sent /received on + */ + string topic = 1; + + /* + * The actual service envelope payload or text for mqtt pub / sub + */ + oneof payload_variant { + /* + * Bytes + */ + bytes data = 2; + + /* + * Text + */ + string text = 3; + } + + /* + * Whether the message should be retained (or not) + */ + bool retained = 4; +} + +/* + * A packet envelope sent/received over the mesh + * only payload_variant is sent in the payload portion of the LORA packet. + * The other fields are either not sent at all, or sent in the special 16 byte LORA header. + */ +message MeshPacket { + /* + * The priority of this message for sending. + * Higher priorities are sent first (when managing the transmit queue). + * This field is never sent over the air, it is only used internally inside of a local device node. + * API clients (either on the local node or connected directly to the node) + * can set this parameter if necessary. + * (values must be <= 127 to keep protobuf field to one byte in size. + * Detailed background on this field: + * I noticed a funny side effect of lora being so slow: Usually when making + * a protocol there isn’t much need to use message priority to change the order + * of transmission (because interfaces are fairly fast). + * But for lora where packets can take a few seconds each, it is very important + * to make sure that critical packets are sent ASAP. + * In the case of meshtastic that means we want to send protocol acks as soon as possible + * (to prevent unneeded retransmissions), we want routing messages to be sent next, + * then messages marked as reliable and finally 'background' packets like periodic position updates. + * So I bit the bullet and implemented a new (internal - not sent over the air) + * field in MeshPacket called 'priority'. + * And the transmission queue in the router object is now a priority queue. + */ + enum Priority { + /* + * Treated as Priority.DEFAULT + */ + UNSET = 0; + + /* + * TODO: REPLACE + */ + MIN = 1; + + /* + * Background position updates are sent with very low priority - + * if the link is super congested they might not go out at all + */ + BACKGROUND = 10; + + /* + * This priority is used for most messages that don't have a priority set + */ + DEFAULT = 64; + + /* + * If priority is unset but the message is marked as want_ack, + * assume it is important and use a slightly higher priority + */ + RELIABLE = 70; + + /* + * If priority is unset but the packet is a response to a request, we want it to get there relatively quickly. + * Furthermore, responses stop relaying packets directed to a node early. + */ + RESPONSE = 80; + + /* + * Higher priority for specific message types (portnums) to distinguish between other reliable packets. + */ + HIGH = 100; + + /* + * Higher priority alert message used for critical alerts which take priority over other reliable packets. + */ + ALERT = 110; + + /* + * Ack/naks are sent with very high priority to ensure that retransmission + * stops as soon as possible + */ + ACK = 120; + + /* + * TODO: REPLACE + */ + MAX = 127; + } + + /* + * Identify if this is a delayed packet + */ + enum Delayed { + /* + * If unset, the message is being sent in real time. + */ + NO_DELAY = 0; + + /* + * The message is delayed and was originally a broadcast + */ + DELAYED_BROADCAST = 1; + + /* + * The message is delayed and was originally a direct message + */ + DELAYED_DIRECT = 2; + } + + /* + * The sending node number. + * Note: Our crypto implementation uses this field as well. + * See [crypto](/docs/overview/encryption) for details. + */ + fixed32 from = 1; + + /* + * The (immediate) destination for this packet + */ + fixed32 to = 2; + + /* + * (Usually) If set, this indicates the index in the secondary_channels table that this packet was sent/received on. + * If unset, packet was on the primary channel. + * A particular node might know only a subset of channels in use on the mesh. + * Therefore channel_index is inherently a local concept and meaningless to send between nodes. + * Very briefly, while sending and receiving deep inside the device Router code, this field instead + * contains the 'channel hash' instead of the index. + * This 'trick' is only used while the payload_variant is an 'encrypted'. + */ + uint32 channel = 3; + + /* + * Internally to the mesh radios we will route SubPackets encrypted per [this](docs/developers/firmware/encryption). + * However, when a particular node has the correct + * key to decode a particular packet, it will decode the payload into a SubPacket protobuf structure. + * Software outside of the device nodes will never encounter a packet where + * "decoded" is not populated (i.e. any encryption/decryption happens before reaching the applications) + * The numeric IDs for these fields were selected to keep backwards compatibility with old applications. + */ + + oneof payload_variant { + /* + * TODO: REPLACE + */ + Data decoded = 4; + + /* + * TODO: REPLACE + */ + bytes encrypted = 5; + } + + /* + * A unique ID for this packet. + * Always 0 for no-ack packets or non broadcast packets (and therefore take zero bytes of space). + * Otherwise a unique ID for this packet, useful for flooding algorithms. + * ID only needs to be unique on a _per sender_ basis, and it only + * needs to be unique for a few minutes (long enough to last for the length of + * any ACK or the completion of a mesh broadcast flood). + * Note: Our crypto implementation uses this id as well. + * See [crypto](/docs/overview/encryption) for details. + */ + fixed32 id = 6; + + /* + * The time this message was received by the esp32 (secs since 1970). + * Note: this field is _never_ sent on the radio link itself (to save space) Times + * are typically not sent over the mesh, but they will be added to any Packet + * (chain of SubPacket) sent to the phone (so the phone can know exact time of reception) + */ + fixed32 rx_time = 7; + + /* + * *Never* sent over the radio links. + * Set during reception to indicate the SNR of this packet. + * Used to collect statistics on current link quality. + */ + float rx_snr = 8; + + /* + * If unset treated as zero (no forwarding, send to direct neighbor nodes only) + * if 1, allow hopping through one node, etc... + * For our usecase real world topologies probably have a max of about 3. + * This field is normally placed into a few of bits in the header. + */ + uint32 hop_limit = 9; + + /* + * This packet is being sent as a reliable message, we would prefer it to arrive at the destination. + * We would like to receive a ack packet in response. + * Broadcasts messages treat this flag specially: Since acks for broadcasts would + * rapidly flood the channel, the normal ack behavior is suppressed. + * Instead, the original sender listens to see if at least one node is rebroadcasting this packet (because naive flooding algorithm). + * If it hears that the odds (given typical LoRa topologies) the odds are very high that every node should eventually receive the message. + * So FloodingRouter.cpp generates an implicit ack which is delivered to the original sender. + * If after some time we don't hear anyone rebroadcast our packet, we will timeout and retransmit, using the regular resend logic. + * Note: This flag is normally sent in a flag bit in the header when sent over the wire + */ + bool want_ack = 10; + + /* + * The priority of this message for sending. + * See MeshPacket.Priority description for more details. + */ + Priority priority = 11; + + /* + * rssi of received packet. Only sent to phone for dispay purposes. + */ + int32 rx_rssi = 12; + + /* + * Describe if this message is delayed + */ + Delayed delayed = 13 [deprecated = true]; + + /* + * Describes whether this packet passed via MQTT somewhere along the path it currently took. + */ + bool via_mqtt = 14; + + /* + * Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header. + * When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled. + */ + uint32 hop_start = 15; + + /* + * Records the public key the packet was encrypted with, if applicable. + */ + bytes public_key = 16; + + /* + * Indicates whether the packet was en/decrypted using PKI + */ + bool pki_encrypted = 17; + + /* + * Last byte of the node number of the node that should be used as the next hop in routing. + * Set by the firmware internally, clients are not supposed to set this. + */ + uint32 next_hop = 18; + + /* + * Last byte of the node number of the node that will relay/relayed this packet. + * Set by the firmware internally, clients are not supposed to set this. + */ + uint32 relay_node = 19; + + /* + * *Never* sent over the radio links. + * Timestamp after which this packet may be sent. + * Set by the firmware internally, clients are not supposed to set this. + */ + uint32 tx_after = 20; +} + +/* + * Shared constants between device and phone + */ +enum Constants { + /* + * First enum must be zero, and we are just using this enum to + * pass int constants between two very different environments + */ + ZERO = 0; + + /* + * From mesh.options + * note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is + * outside of this envelope + */ + DATA_PAYLOAD_LEN = 233; +} + +/* + * The bluetooth to device link: + * Old BTLE protocol docs from TODO, merge in above and make real docs... + * use protocol buffers, and NanoPB + * messages from device to phone: + * POSITION_UPDATE (..., time) + * TEXT_RECEIVED(from, text, time) + * OPAQUE_RECEIVED(from, payload, time) (for signal messages or other applications) + * messages from phone to device: + * SET_MYID(id, human readable long, human readable short) (send down the unique ID + * string used for this node, a human readable string shown for that id, and a very + * short human readable string suitable for oled screen) SEND_OPAQUE(dest, payload) + * (for signal messages or other applications) SEND_TEXT(dest, text) Get all + * nodes() (returns list of nodes, with full info, last time seen, loc, battery + * level etc) SET_CONFIG (switches device to a new set of radio params and + * preshared key, drops all existing nodes, force our node to rejoin this new group) + * Full information about a node on the mesh + */ +message NodeInfo { + /* + * The node number + */ + uint32 num = 1; + + /* + * The user info for this node + */ + User user = 2; + + /* + * 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 position = 3; + + /* + * 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 + */ + float snr = 4; + + /* + * TODO: REMOVE/INTEGRATE + * Returns the last measured frequency error. + * The LoRa receiver estimates the frequency offset between the receiver + * center frequency and that of the received LoRa signal. This function + * returns the estimates offset (in Hz) of the last received message. + * Caution: this measurement is not absolute, but is measured relative to the + * local receiver's oscillator. Apparent errors may be due to the + * transmitter, the receiver or both. \return The estimated center frequency + * offset in Hz of the last received message. + * int32 frequency_error = 6; + * enum RouteState { + * Invalid = 0; + * Discovering = 1; + * Valid = 2; + * } + * Not needed? + * RouteState route = 4; + */ + + /* + * TODO: REMOVE/INTEGRATE + * Not currently used (till full DSR deployment?) Our current preferred node node for routing - might be the same as num if + * we are direct neighbor or zero if we don't yet know a route to this node. + * fixed32 next_hop = 5; + */ + + /* + * Set to indicate the last time we received a packet from this node + */ + fixed32 last_heard = 5; + /* + * The latest device metrics for the node. + */ + DeviceMetrics device_metrics = 6; + + /* + * local channel index we heard that node on. Only populated if its not the default channel. + */ + uint32 channel = 7; + + /* + * True if we witnessed the node over MQTT instead of LoRA transport + */ + bool via_mqtt = 8; + + /* + * Number of hops away from us this node is (0 if direct neighbor) + */ + optional uint32 hops_away = 9; + + /* + * True if node is in our favorites list + * Persists between NodeDB internal clean ups + */ + bool is_favorite = 10; + + /* + * True if node is in our ignored list + * Persists between NodeDB internal clean ups + */ + bool is_ignored = 11; +} + +/* + * Error codes for critical errors + * The device might report these fault codes on the screen. + * If you encounter a fault code, please post on the meshtastic.discourse.group + * and we'll try to help. + */ +enum CriticalErrorCode { + /* + * TODO: REPLACE + */ + NONE = 0; + + /* + * A software bug was detected while trying to send lora + */ + TX_WATCHDOG = 1; + + /* + * A software bug was detected on entry to sleep + */ + SLEEP_ENTER_WAIT = 2; + + /* + * No Lora radio hardware could be found + */ + NO_RADIO = 3; + + /* + * Not normally used + */ + UNSPECIFIED = 4; + + /* + * We failed while configuring a UBlox GPS + */ + UBLOX_UNIT_FAILED = 5; + + /* + * This board was expected to have a power management chip and it is missing or broken + */ + NO_AXP192 = 6; + + /* + * The channel tried to set a radio setting which is not supported by this chipset, + * radio comms settings are now undefined. + */ + INVALID_RADIO_SETTING = 7; + + /* + * Radio transmit hardware failure. We sent data to the radio chip, but it didn't + * reply with an interrupt. + */ + TRANSMIT_FAILED = 8; + + /* + * We detected that the main CPU voltage dropped below the minimum acceptable value + */ + BROWNOUT = 9; + + /* Selftest of SX1262 radio chip failed */ + SX1262_FAILURE = 10; + + /* + * A (likely software but possibly hardware) failure was detected while trying to send packets. + * If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug + */ + RADIO_SPI_BUG = 11; + + /* + * Corruption was detected on the flash filesystem but we were able to repair things. + * If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. + */ + FLASH_CORRUPTION_RECOVERABLE = 12; + + /* + * Corruption was detected on the flash filesystem but we were unable to repair things. + * NOTE: Your node will probably need to be reconfigured the next time it reboots (it will lose the region code etc...) + * If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. + */ + FLASH_CORRUPTION_UNRECOVERABLE = 13; +} + +/* + * Unique local debugging info for this node + * Note: we don't include position or the user info, because that will come in the + * Sent to the phone in response to WantNodes. + */ +message MyNodeInfo { + /* + * Tells the phone what our node number is, default starting value is + * lowbyte of macaddr, but it will be fixed if that is already in use + */ + uint32 my_node_num = 1; + + /* + * The total number of reboots this node has ever encountered + * (well - since the last time we discarded preferences) + */ + uint32 reboot_count = 8; + + /* + * The minimum app version that can talk to this device. + * Phone/PC apps should compare this to their build number and if too low tell the user they must update their app + */ + uint32 min_app_version = 11; + + /* + * Unique hardware identifier for this device + */ + bytes device_id = 12; + + /* + * The PlatformIO environment used to build this firmware + */ + string pio_env = 13; +} + +/* + * Debug output from the device. + * To minimize the size of records inside the device code, if a time/source/level is not set + * on the message it is assumed to be a continuation of the previously sent message. + * This allows the device code to use fixed maxlen 64 byte strings for messages, + * and then extend as needed by emitting multiple records. + */ +message LogRecord { + /* + * Log levels, chosen to match python logging conventions. + */ + enum Level { + /* + * Log levels, chosen to match python logging conventions. + */ + UNSET = 0; + + /* + * Log levels, chosen to match python logging conventions. + */ + CRITICAL = 50; + + /* + * Log levels, chosen to match python logging conventions. + */ + ERROR = 40; + + /* + * Log levels, chosen to match python logging conventions. + */ + WARNING = 30; + + /* + * Log levels, chosen to match python logging conventions. + */ + INFO = 20; + + /* + * Log levels, chosen to match python logging conventions. + */ + DEBUG = 10; + + /* + * Log levels, chosen to match python logging conventions. + */ + TRACE = 5; + } + + /* + * Log levels, chosen to match python logging conventions. + */ + string message = 1; + + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 2; + + /* + * Usually based on thread name - if known + */ + string source = 3; + + /* + * Not yet set + */ + Level level = 4; +} + +message QueueStatus { + /* Last attempt to queue status, ErrorCode */ + int32 res = 1; + + /* Free entries in the outgoing queue */ + uint32 free = 2; + + /* Maximum entries in the outgoing queue */ + uint32 maxlen = 3; + + /* What was mesh packet id that generated this response? */ + uint32 mesh_packet_id = 4; +} + +/* + * Packets from the radio to the phone will appear on the fromRadio characteristic. + * It will support READ and NOTIFY. When a new packet arrives the device will BLE notify? + * It will sit in that descriptor until consumed by the phone, + * at which point the next item in the FIFO will be populated. + */ +message FromRadio { + /* + * The packet id, used to allow the phone to request missing read packets from the FIFO, + * see our bluetooth docs + */ + uint32 id = 1; + + /* + * Log levels, chosen to match python logging conventions. + */ + oneof payload_variant { + /* + * Log levels, chosen to match python logging conventions. + */ + MeshPacket packet = 2; + + /* + * Tells the phone what our node number is, can be -1 if we've not yet joined a mesh. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + MyNodeInfo my_info = 3; + + /* + * One packet is sent for each node in the on radio DB + * starts over with the first node in our DB + */ + NodeInfo node_info = 4; + + /* + * Include a part of the config (was: RadioConfig radio) + */ + Config config = 5; + + /* + * Set to send debug console output over our protobuf stream + */ + LogRecord log_record = 6; + + /* + * Sent as true once the device has finished sending all of the responses to want_config + * recipient should check if this ID matches our original request nonce, if + * not, it means your config responses haven't started yet. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + uint32 config_complete_id = 7; + + /* + * Sent to tell clients the radio has just rebooted. + * Set to true if present. + * Not used on all transports, currently just used for the serial console. + * NOTE: This ID must not change - to keep (minimal) compatibility with <1.2 version of android apps. + */ + bool rebooted = 8; + + /* + * Include module config + */ + ModuleConfig moduleConfig = 9; + + /* + * One packet is sent for each channel + */ + Channel channel = 10; + + /* + * Queue status info + */ + QueueStatus queueStatus = 11; + + /* + * File Transfer Chunk + */ + XModem xmodemPacket = 12; + + /* + * Device metadata message + */ + DeviceMetadata metadata = 13; + + /* + * MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) + */ + MqttClientProxyMessage mqttClientProxyMessage = 14; + + /* + * File system manifest messages + */ + FileInfo fileInfo = 15; + + /* + * Notification message to the client + */ + ClientNotification clientNotification = 16; + + /* + * Persistent data for device-ui + */ + DeviceUIConfig deviceuiConfig = 17; + } +} + +/* + * A notification message from the device to the client + * To be used for important messages that should to be displayed to the user + * in the form of push notifications or validation messages when saving + * invalid configuration. + */ +message ClientNotification { + /* + * The id of the packet we're notifying in response to + */ + optional uint32 reply_id = 1; + + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 2; + + /* + * The level type of notification + */ + LogRecord.Level level = 3; + /* + * The message body of the notification + */ + string message = 4; +} + +/* + * Individual File info for the device + */ +message FileInfo { + /* + * The fully qualified path of the file + */ + string file_name = 1; + + /* + * The size of the file in bytes + */ + uint32 size_bytes = 2; +} + +/* + * Packets/commands to the radio will be written (reliably) to the toRadio characteristic. + * Once the write completes the phone can assume it is handled. + */ +message ToRadio { + /* + * Log levels, chosen to match python logging conventions. + */ + oneof payload_variant { + /* + * Send this packet on the mesh + */ + MeshPacket packet = 1; + + /* + * Phone wants radio to send full node db to the phone, This is + * typically the first packet sent to the radio when the phone gets a + * bluetooth connection. The radio will respond by sending back a + * MyNodeInfo, a owner, a radio config and a series of + * FromRadio.node_infos, and config_complete + * the integer you write into this field will be reported back in the + * config_complete_id response this allows clients to never be confused by + * a stale old partially sent config. + */ + uint32 want_config_id = 3; + + /* + * Tell API server we are disconnecting now. + * This is useful for serial links where there is no hardware/protocol based notification that the client has dropped the link. + * (Sending this message is optional for clients) + */ + bool disconnect = 4; + + /* + * File Transfer Chunk + */ + + XModem xmodemPacket = 5; + + /* + * MQTT Client Proxy Message (for client / phone subscribed to MQTT sending to device) + */ + MqttClientProxyMessage mqttClientProxyMessage = 6; + + /* + * Heartbeat message (used to keep the device connection awake on serial) + */ + Heartbeat heartbeat = 7; + } +} + +/* + * Compressed message payload + */ +message Compressed { + /* + * PortNum to determine the how to handle the compressed payload. + */ + PortNum portnum = 1; + + /* + * Compressed data. + */ + bytes data = 2; +} + +/* + * Full info on edges for a single node + */ +message NeighborInfo { + /* + * The node ID of the node sending info on its neighbors + */ + uint32 node_id = 1; + /* + * Field to pass neighbor info for the next sending cycle + */ + uint32 last_sent_by_id = 2; + + /* + * Broadcast interval of the represented node (in seconds) + */ + uint32 node_broadcast_interval_secs = 3; + /* + * The list of out edges from this node + */ + repeated Neighbor neighbors = 4; +} + +/* + * A single edge in the mesh + */ +message Neighbor { + /* + * Node ID of neighbor + */ + uint32 node_id = 1; + + /* + * SNR of last heard message + */ + float snr = 2; + + /* + * Reception time (in secs since 1970) of last message that was last sent by this ID. + * Note: this is for local storage only and will not be sent out over the mesh. + */ + fixed32 last_rx_time = 3; + + /* + * Broadcast interval of this neighbor (in seconds). + * Note: this is for local storage only and will not be sent out over the mesh. + */ + uint32 node_broadcast_interval_secs = 4; +} + +/* + * Device metadata response + */ +message DeviceMetadata { + /* + * Device firmware version string + */ + string firmware_version = 1; + + /* + * Device state version + */ + uint32 device_state_version = 2; + + /* + * Indicates whether the device can shutdown CPU natively or via power management chip + */ + bool canShutdown = 3; + + /* + * Indicates that the device has native wifi capability + */ + bool hasWifi = 4; + + /* + * Indicates that the device has native bluetooth capability + */ + bool hasBluetooth = 5; + + /* + * Indicates that the device has an ethernet peripheral + */ + bool hasEthernet = 6; + + /* + * Indicates that the device's role in the mesh + */ + Config.DeviceConfig.Role role = 7; + + /* + * Indicates the device's current enabled position flags + */ + uint32 position_flags = 8; + + /* + * Device hardware model + */ + HardwareModel hw_model = 9; + + /* + * Has Remote Hardware enabled + */ + bool hasRemoteHardware = 10; + + /* + * Has PKC capabilities + */ + bool hasPKC = 11; + + /* + * Bit field of boolean for excluded modules + * (bitwise OR of ExcludedModules) + */ + uint32 excluded_modules = 12; +} + +/* + * Enum for modules excluded from a device's configuration. + * Each value represents a ModuleConfigType that can be toggled as excluded + * by setting its corresponding bit in the `excluded_modules` bitmask field. + */ +enum ExcludedModules { + /* + * Default value of 0 indicates no modules are excluded. + */ + EXCLUDED_NONE = 0x0000; + + /* + * MQTT module + */ + MQTT_CONFIG = 0x0001; + + /* + * Serial module + */ + SERIAL_CONFIG = 0x0002; + + /* + * External Notification module + */ + EXTNOTIF_CONFIG = 0x0004; + + /* + * Store and Forward module + */ + STOREFORWARD_CONFIG = 0x0008; + + /* + * Range Test module + */ + RANGETEST_CONFIG = 0x0010; + + /* + * Telemetry module + */ + TELEMETRY_CONFIG = 0x0020; + + /* + * Canned Message module + */ + CANNEDMSG_CONFIG = 0x0040; + + /* + * Audio module + */ + AUDIO_CONFIG = 0x0080; + + /* + * Remote Hardware module + */ + REMOTEHARDWARE_CONFIG = 0x0100; + + /* + * Neighbor Info module + */ + NEIGHBORINFO_CONFIG = 0x0200; + + /* + * Ambient Lighting module + */ + AMBIENTLIGHTING_CONFIG = 0x0400; + + /* + * Detection Sensor module + */ + DETECTIONSENSOR_CONFIG = 0x0800; + + /* + * Paxcounter module + */ + PAXCOUNTER_CONFIG = 0x1000; + + /* + * Bluetooth config (not technically a module, but used to indicate bluetooth capabilities) + */ + BLUETOOTH_CONFIG = 0x2000; + + /* + * Network config (not technically a module, but used to indicate network capabilities) + */ + NETWORK_CONFIG = 0x4000; +} + +/* + * A heartbeat message is sent to the node from the client to keep the connection alive. + * This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. + */ +message Heartbeat {} + +/* + * RemoteHardwarePins associated with a node + */ +message NodeRemoteHardwarePin { + /* + * The node_num exposing the available gpio pin + */ + uint32 node_num = 1; + + /* + * The the available gpio pin for usage with RemoteHardware module + */ + RemoteHardwarePin pin = 2; +} + +message ChunkedPayload { + /* + * The ID of the entire payload + */ + uint32 payload_id = 1; + + /* + * The total number of chunks in the payload + */ + uint32 chunk_count = 2; + + /* + * The current chunk index in the total + */ + uint32 chunk_index = 3; + + /* + * The binary data of the current chunk + */ + bytes payload_chunk = 4; +} + +/* + * Wrapper message for broken repeated oneof support + */ +message resend_chunks { + repeated uint32 chunks = 1; +} + +/* + * Responses to a ChunkedPayload request + */ +message ChunkedPayloadResponse { + /* + * The ID of the entire payload + */ + uint32 payload_id = 1; + + oneof payload_variant { + /* + * Request to transfer chunked payload + */ + bool request_transfer = 2; + + /* + * Accept the transfer chunked payload + */ + bool accept_transfer = 3; + /* + * Request missing indexes in the chunked payload + */ + resend_chunks resend_chunks = 4; + } +} diff --git a/proto/tmp/module_config.proto b/proto/tmp/module_config.proto new file mode 100644 index 0000000..4f18d5f --- /dev/null +++ b/proto/tmp/module_config.proto @@ -0,0 +1,849 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "ModuleConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Module Config + */ +message ModuleConfig { + /* + * MQTT Client Config + */ + message MQTTConfig { + /* + * If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as + * is_uplink_enabled or is_downlink_enabled. + */ + bool enabled = 1; + + /* + * The server to use for our MQTT global message gateway feature. + * If not set, the default server will be used + */ + string address = 2; + + /* + * MQTT username to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default username + */ + string username = 3; + + /* + * MQTT password to use (most useful for a custom MQTT server). + * If using a custom server, this will be honoured even if empty. + * If using the default server, this will only be honoured if set, otherwise the device will use the default password + */ + string password = 4; + + /* + * Whether to send encrypted or decrypted packets to MQTT. + * This parameter is only honoured if you also set server + * (the default official mqtt.meshtastic.org server can handle encrypted packets) + * Decrypted packets may be useful for external systems that want to consume meshtastic packets + */ + bool encryption_enabled = 5; + + /* + * Whether to send / consume json packets on MQTT + */ + bool json_enabled = 6; + + /* + * If true, we attempt to establish a secure connection using TLS + */ + bool tls_enabled = 7; + + /* + * The root topic to use for MQTT messages. Default is "msh". + * This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs + */ + string root = 8; + + /* + * If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection + */ + bool proxy_to_client_enabled = 9; + + /* + * If true, we will periodically report unencrypted information about our node to a map via MQTT + */ + bool map_reporting_enabled = 10; + + /* + * Settings for reporting information about our node to a map via MQTT + */ + MapReportSettings map_report_settings = 11; + } + + /* + * Settings for reporting unencrypted information about our node to a map via MQTT + */ + message MapReportSettings { + /* + * How often we should report our info to the map (in seconds) + */ + uint32 publish_interval_secs = 1; + + /* + * Bits of precision for the location sent (default of 32 is full precision). + */ + uint32 position_precision = 2; + } + + /* + * RemoteHardwareModule Config + */ + message RemoteHardwareConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Whether the Module allows consumers to read / write to pins not defined in available_pins + */ + bool allow_undefined_pin_access = 2; + + /* + * Exposes the available pins to the mesh for reading and writing + */ + repeated RemoteHardwarePin available_pins = 3; + } + + /* + * NeighborInfoModule Config + */ + message NeighborInfoConfig { + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * Neighbor Info (minimum is 14400, i.e., 4 hours) + */ + uint32 update_interval = 2; + + /* + * Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa. + * Note that this is not available on a channel with default key and name. + */ + bool transmit_over_lora = 3; + } + + /* + * Detection Sensor Module Config + */ + message DetectionSensorConfig { + + enum TriggerType { + // Event is triggered if pin is low + LOGIC_LOW = 0; + // Event is triggered if pin is high + LOGIC_HIGH = 1; + // Event is triggered when pin goes high to low + FALLING_EDGE = 2; + // Event is triggered when pin goes low to high + RISING_EDGE = 3; + // Event is triggered on every pin state change, low is considered to be + // "active" + EITHER_EDGE_ACTIVE_LOW = 4; + // Event is triggered on every pin state change, high is considered to be + // "active" + EITHER_EDGE_ACTIVE_HIGH = 5; + } + /* + * Whether the Module is enabled + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we can send a message to the mesh when a + * trigger event is detected + */ + uint32 minimum_broadcast_secs = 2; + + /* + * Interval in seconds of how often we should send a message to the mesh + * with the current state regardless of trigger events When set to 0, only + * trigger events will be broadcasted Works as a sort of status heartbeat + * for peace of mind + */ + uint32 state_broadcast_secs = 3; + + /* + * Send ASCII bell with alert message + * Useful for triggering ext. notification on bell + */ + bool send_bell = 4; + + /* + * Friendly name used to format message sent to mesh + * Example: A name "Motion" would result in a message "Motion detected" + * Maximum length of 20 characters + */ + string name = 5; + + /* + * GPIO pin to monitor for state changes + */ + uint32 monitor_pin = 6; + + /* + * The type of trigger event to be used + */ + TriggerType detection_trigger_type = 7; + + /* + * Whether or not use INPUT_PULLUP mode for GPIO pin + * Only applicable if the board uses pull-up resistors on the pin + */ + bool use_pullup = 8; + } + + /* + * Audio Config for codec2 voice + */ + message AudioConfig { + /* + * Baudrate for codec2 voice + */ + enum Audio_Baud { + CODEC2_DEFAULT = 0; + CODEC2_3200 = 1; + CODEC2_2400 = 2; + CODEC2_1600 = 3; + CODEC2_1400 = 4; + CODEC2_1300 = 5; + CODEC2_1200 = 6; + CODEC2_700 = 7; + CODEC2_700B = 8; + } + + /* + * Whether Audio is enabled + */ + bool codec2_enabled = 1; + + /* + * PTT Pin + */ + uint32 ptt_pin = 2; + + /* + * The audio sample rate to use for codec2 + */ + Audio_Baud bitrate = 3; + + /* + * I2S Word Select + */ + uint32 i2s_ws = 4; + + /* + * I2S Data IN + */ + uint32 i2s_sd = 5; + + /* + * I2S Data OUT + */ + uint32 i2s_din = 6; + + /* + * I2S Clock + */ + uint32 i2s_sck = 7; + } + + /* + * Config for the Paxcounter Module + */ + message PaxcounterConfig { + /* + * Enable the Paxcounter Module + */ + bool enabled = 1; + + /* + * Interval in seconds of how often we should try to send our + * metrics to the mesh + */ + + uint32 paxcounter_update_interval = 2; + + /* + * WiFi RSSI threshold. Defaults to -80 + */ + int32 wifi_threshold = 3; + + /* + * BLE RSSI threshold. Defaults to -80 + */ + int32 ble_threshold = 4; + + } + + /* + * Serial Config + */ + message SerialConfig { + /* + * TODO: REPLACE + */ + enum Serial_Baud { + BAUD_DEFAULT = 0; + BAUD_110 = 1; + BAUD_300 = 2; + BAUD_600 = 3; + BAUD_1200 = 4; + BAUD_2400 = 5; + BAUD_4800 = 6; + BAUD_9600 = 7; + BAUD_19200 = 8; + BAUD_38400 = 9; + BAUD_57600 = 10; + BAUD_115200 = 11; + BAUD_230400 = 12; + BAUD_460800 = 13; + BAUD_576000 = 14; + BAUD_921600 = 15; + } + + /* + * TODO: REPLACE + */ + enum Serial_Mode { + DEFAULT = 0; + SIMPLE = 1; + PROTO = 2; + TEXTMSG = 3; + NMEA = 4; + // NMEA messages specifically tailored for CalTopo + CALTOPO = 5; + // Ecowitt WS85 weather station + WS85 = 6; + } + + /* + * Preferences for the SerialModule + */ + bool enabled = 1; + + /* + * TODO: REPLACE + */ + bool echo = 2; + + /* + * RX pin (should match Arduino gpio pin number) + */ + uint32 rxd = 3; + + /* + * TX pin (should match Arduino gpio pin number) + */ + uint32 txd = 4; + + /* + * Serial baud rate + */ + Serial_Baud baud = 5; + + /* + * TODO: REPLACE + */ + uint32 timeout = 6; + + /* + * Mode for serial module operation + */ + Serial_Mode mode = 7; + + /* + * Overrides the platform's defacto Serial port instance to use with Serial module config settings + * This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes + * Existing logging over the Serial Console will still be present + */ + bool override_console_serial_port = 8; + } + + /* + * External Notifications Config + */ + message ExternalNotificationConfig { + /* + * Enable the ExternalNotificationModule + */ + bool enabled = 1; + + /* + * When using in On/Off mode, keep the output on for this many + * milliseconds. Default 1000ms (1 second). + */ + uint32 output_ms = 2; + + /* + * Define the output pin GPIO setting Defaults to + * EXT_NOTIFY_OUT if set for the board. + * In standalone devices this pin should drive the LED to match the UI. + */ + uint32 output = 3; + + /* + * Optional: Define a secondary output pin for a vibra motor + * This is used in standalone devices to match the UI. + */ + uint32 output_vibra = 8; + + /* + * Optional: Define a tertiary output pin for an active buzzer + * This is used in standalone devices to to match the UI. + */ + uint32 output_buzzer = 9; + + /* + * IF this is true, the 'output' Pin will be pulled active high, false + * means active low. + */ + bool active = 4; + + /* + * True: Alert when a text message arrives (output) + */ + bool alert_message = 5; + + /* + * True: Alert when a text message arrives (output_vibra) + */ + bool alert_message_vibra = 10; + + /* + * True: Alert when a text message arrives (output_buzzer) + */ + bool alert_message_buzzer = 11; + + /* + * True: Alert when the bell character is received (output) + */ + bool alert_bell = 6; + + /* + * True: Alert when the bell character is received (output_vibra) + */ + bool alert_bell_vibra = 12; + + /* + * True: Alert when the bell character is received (output_buzzer) + */ + bool alert_bell_buzzer = 13; + + /* + * use a PWM output instead of a simple on/off output. This will ignore + * the 'output', 'output_ms' and 'active' settings and use the + * device.buzzer_gpio instead. + */ + bool use_pwm = 7; + + /* + * The notification will toggle with 'output_ms' for this time of seconds. + * Default is 0 which means don't repeat at all. 60 would mean blink + * and/or beep for 60 seconds + */ + uint32 nag_timeout = 14; + + /* + * When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer + * T-Watch S3 and T-Deck for example have this capability + */ + bool use_i2s_as_buzzer = 15; + } + + /* + * Store and Forward Module Config + */ + message StoreForwardConfig { + /* + * Enable the Store and Forward Module + */ + bool enabled = 1; + + /* + * TODO: REPLACE + */ + bool heartbeat = 2; + + /* + * TODO: REPLACE + */ + uint32 records = 3; + + /* + * TODO: REPLACE + */ + uint32 history_return_max = 4; + + /* + * TODO: REPLACE + */ + uint32 history_return_window = 5; + + /* + * Set to true to let this node act as a server that stores received messages and resends them upon request. + */ + bool is_server = 6; + } + + /* + * Preferences for the RangeTestModule + */ + message RangeTestConfig { + /* + * Enable the Range Test Module + */ + bool enabled = 1; + + /* + * Send out range test messages from this node + */ + uint32 sender = 2; + + /* + * Bool value indicating that this node should save a RangeTest.csv file. + * ESP32 Only + */ + bool save = 3; + } + + /* + * Configuration for both device and environment metrics + */ + message TelemetryConfig { + /* + * Interval in seconds of how often we should try to send our + * device metrics to the mesh + */ + uint32 device_update_interval = 1; + + /* + * Interval in seconds of how often we should try to send our + * environment measurements to the mesh + */ + + uint32 environment_update_interval = 2; + + /* + * Preferences for the Telemetry Module (Environment) + * Enable/Disable the telemetry measurement module measurement collection + */ + bool environment_measurement_enabled = 3; + + /* + * Enable/Disable the telemetry measurement module on-device display + */ + bool environment_screen_enabled = 4; + + /* + * We'll always read the sensor in Celsius, but sometimes we might want to + * display the results in Fahrenheit as a "user preference". + */ + bool environment_display_fahrenheit = 5; + + /* + * Enable/Disable the air quality metrics + */ + bool air_quality_enabled = 6; + + /* + * Interval in seconds of how often we should try to send our + * air quality metrics to the mesh + */ + uint32 air_quality_interval = 7; + + /* + * Enable/disable Power metrics + */ + bool power_measurement_enabled = 8; + + /* + * Interval in seconds of how often we should try to send our + * power metrics to the mesh + */ + uint32 power_update_interval = 9; + + /* + * Enable/Disable the power measurement module on-device display + */ + bool power_screen_enabled = 10; + + /* + * Preferences for the (Health) Telemetry Module + * Enable/Disable the telemetry measurement module measurement collection + */ + bool health_measurement_enabled = 11; + + /* + * Interval in seconds of how often we should try to send our + * health metrics to the mesh + */ + uint32 health_update_interval = 12; + + /* + * Enable/Disable the health telemetry module on-device display + */ + bool health_screen_enabled = 13; + } + + /* + * Canned Messages Module Config + */ + message CannedMessageConfig { + /* + * TODO: REPLACE + */ + enum InputEventChar { + /* + * TODO: REPLACE + */ + NONE = 0; + + /* + * TODO: REPLACE + */ + UP = 17; + + /* + * TODO: REPLACE + */ + DOWN = 18; + + /* + * TODO: REPLACE + */ + LEFT = 19; + + /* + * TODO: REPLACE + */ + RIGHT = 20; + + /* + * '\n' + */ + SELECT = 10; + + /* + * TODO: REPLACE + */ + BACK = 27; + + /* + * TODO: REPLACE + */ + CANCEL = 24; + } + + /* + * Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. + */ + bool rotary1_enabled = 1; + + /* + * GPIO pin for rotary encoder A port. + */ + uint32 inputbroker_pin_a = 2; + + /* + * GPIO pin for rotary encoder B port. + */ + uint32 inputbroker_pin_b = 3; + + /* + * GPIO pin for rotary encoder Press port. + */ + uint32 inputbroker_pin_press = 4; + + /* + * Generate input event on CW of this kind. + */ + InputEventChar inputbroker_event_cw = 5; + + /* + * Generate input event on CCW of this kind. + */ + InputEventChar inputbroker_event_ccw = 6; + + /* + * Generate input event on Press of this kind. + */ + InputEventChar inputbroker_event_press = 7; + + /* + * Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. + */ + bool updown1_enabled = 8; + + /* + * Enable/disable CannedMessageModule. + */ + bool enabled = 9; + + /* + * Input event origin accepted by the canned message module. + * Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any" + */ + string allow_input_source = 10; + + /* + * CannedMessageModule also sends a bell character with the messages. + * ExternalNotificationModule can benefit from this feature. + */ + bool send_bell = 11; + } + + /* + Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels. + Initially created for the RAK14001 RGB LED module. + */ + message AmbientLightingConfig { + /* + * Sets LED to on or off. + */ + bool led_state = 1; + + /* + * Sets the current for the LED output. Default is 10. + */ + uint32 current = 2; + + /* + * Sets the red LED level. Values are 0-255. + */ + uint32 red = 3; + + /* + * Sets the green LED level. Values are 0-255. + */ + uint32 green = 4; + + /* + * Sets the blue LED level. Values are 0-255. + */ + uint32 blue = 5; + } + + /* + * TODO: REPLACE + */ + oneof payload_variant { + /* + * TODO: REPLACE + */ + MQTTConfig mqtt = 1; + + /* + * TODO: REPLACE + */ + SerialConfig serial = 2; + + /* + * TODO: REPLACE + */ + ExternalNotificationConfig external_notification = 3; + + /* + * TODO: REPLACE + */ + StoreForwardConfig store_forward = 4; + + /* + * TODO: REPLACE + */ + RangeTestConfig range_test = 5; + + /* + * TODO: REPLACE + */ + TelemetryConfig telemetry = 6; + + /* + * TODO: REPLACE + */ + CannedMessageConfig canned_message = 7; + + /* + * TODO: REPLACE + */ + AudioConfig audio = 8; + + /* + * TODO: REPLACE + */ + RemoteHardwareConfig remote_hardware = 9; + + /* + * TODO: REPLACE + */ + NeighborInfoConfig neighbor_info = 10; + + /* + * TODO: REPLACE + */ + AmbientLightingConfig ambient_lighting = 11; + + /* + * TODO: REPLACE + */ + DetectionSensorConfig detection_sensor = 12; + + /* + * TODO: REPLACE + */ + PaxcounterConfig paxcounter = 13; + } +} + +/* + * A GPIO pin definition for remote hardware module + */ +message RemoteHardwarePin { + /* + * GPIO Pin number (must match Arduino) + */ + uint32 gpio_pin = 1; + + /* + * Name for the GPIO pin (i.e. Front gate, mailbox, etc) + */ + string name = 2; + + /* + * Type of GPIO access available to consumers on the mesh + */ + RemoteHardwarePinType type = 3; +} + +enum RemoteHardwarePinType { + /* + * Unset/unused + */ + UNKNOWN = 0; + + /* + * GPIO pin can be read (if it is high / low) + */ + DIGITAL_READ = 1; + + /* + * GPIO pin can be written to (high / low) + */ + DIGITAL_WRITE = 2; +} diff --git a/proto/tmp/mqtt.proto b/proto/tmp/mqtt.proto new file mode 100644 index 0000000..2dbc820 --- /dev/null +++ b/proto/tmp/mqtt.proto @@ -0,0 +1,106 @@ +syntax = "proto3"; + +package meshtastic; + +import "meshtastic/config.proto"; +import "meshtastic/mesh.proto"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "MQTTProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * This message wraps a MeshPacket with extra metadata about the sender and how it arrived. + */ +message ServiceEnvelope { + /* + * The (probably encrypted) packet + */ + MeshPacket packet = 1; + + /* + * The global channel ID it was sent on + */ + string channel_id = 2; + + /* + * 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 + */ + string gateway_id = 3; +} + +/* + * Information about a node intended to be reported unencrypted to a map using MQTT. + */ +message MapReport { + /* + * A full name for this user, i.e. "Kevin Hester" + */ + string long_name = 1; + + /* + * A VERY short name, ideally two characters. + * Suitable for a tiny OLED screen + */ + string short_name = 2; + + /* + * Role of the node that applies specific settings for a particular use-case + */ + Config.DeviceConfig.Role role = 3; + + /* + * Hardware model of the node, i.e. T-Beam, Heltec V3, etc... + */ + HardwareModel hw_model = 4; + + /* + * Device firmware version string + */ + string firmware_version = 5; + + /* + * The region code for the radio (US, CN, EU433, etc...) + */ + Config.LoRaConfig.RegionCode region = 6; + + /* + * Modem preset used by the radio (LongFast, MediumSlow, etc...) + */ + Config.LoRaConfig.ModemPreset modem_preset = 7; + + /* + * 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. + */ + bool has_default_channel = 8; + + /* + * Latitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 latitude_i = 9; + + /* + * Longitude: multiply by 1e-7 to get degrees in floating point + */ + sfixed32 longitude_i = 10; + + /* + * Altitude in meters above MSL + */ + int32 altitude = 11; + + /* + * Indicates the bits of precision for latitude and longitude set by the sending node + */ + uint32 position_precision = 12; + + /* + * Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) + */ + uint32 num_online_local_nodes = 13; +} diff --git a/proto/tmp/nanopb.proto b/proto/tmp/nanopb.proto new file mode 100644 index 0000000..1c107c1 --- /dev/null +++ b/proto/tmp/nanopb.proto @@ -0,0 +1,185 @@ +// 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. + +syntax = "proto2"; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/meshtastic/go/generated"; +option java_package = "fi.kapsi.koti.jpa.nanopb"; + +enum FieldType { + FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. + FT_CALLBACK = 1; // Always generate a callback field. + FT_POINTER = 4; // Always generate a dynamically allocated field. + FT_STATIC = 2; // Generate a static field or raise an exception if not possible. + FT_IGNORE = 3; // Ignore the field completely. + FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead +} + +enum IntSize { + IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto + IS_8 = 8; + IS_16 = 16; + IS_32 = 32; + IS_64 = 64; +} + +enum TypenameMangling { + M_NONE = 0; // Default, no typename mangling + M_STRIP_PACKAGE = 1; // Strip current package name + M_FLATTEN = 2; // Only use last path component + M_PACKAGE_INITIALS = 3; // Replace the package name by the initials +} + +enum DescriptorSize { + DS_AUTO = 0; // Select minimal size based on field type + DS_1 = 1; // 1 word; up to 15 byte fields, no arrays + DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays + DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays + DS_8 = 8; // 8 words; up to 2^32-1 entry arrays +} + +// 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. +message NanoPBOptions { + // Allocated size for 'bytes' and 'string' fields. + // For string fields, this should include the space for null terminator. + optional int32 max_size = 1; + + // Maximum length for 'string' fields. Setting this is equivalent + // to setting max_size to a value of length+1. + optional int32 max_length = 14; + + // Allocated number of entries in arrays ('repeated' fields) + optional int32 max_count = 2; + + // Size of integer fields. Can save some memory if you don't need + // full 32 bits for the value. + optional IntSize int_size = 7 [default = IS_DEFAULT]; + + // Force type of field (callback or static allocation) + optional FieldType type = 3 [default = FT_DEFAULT]; + + // Use long names for enums, i.e. EnumName_EnumValue. + optional bool long_names = 4 [default = true]; + + // Add 'packed' attribute to generated structs. + // Note: this cannot be used on CPUs that break on unaligned + // accesses to variables. + optional bool packed_struct = 5 [default = false]; + + // Add 'packed' attribute to generated enums. + optional bool packed_enum = 10 [default = false]; + + // Skip this message + optional bool skip_message = 6 [default = false]; + + // Generate oneof fields as normal optional fields instead of union. + optional bool no_unions = 8 [default = false]; + + // integer type tag for a message + optional uint32 msgid = 9; + + // decode oneof as anonymous union + optional bool anonymous_oneof = 11 [default = false]; + + // Proto3 singular field does not generate a "has_" flag + optional bool proto3 = 12 [default = false]; + + // Force proto3 messages to have no "has_" flag. + // This was default behavior until nanopb-0.4.0. + optional bool proto3_singular_msgs = 21 [default = false]; + + // Generate an enum->string mapping function (can take up lots of space). + optional bool enum_to_string = 13 [default = false]; + + // Generate bytes arrays with fixed length + optional bool fixed_length = 15 [default = false]; + + // Generate repeated field with fixed count + optional bool fixed_count = 16 [default = false]; + + // Generate message-level callback that is called before decoding submessages. + // This can be used to set callback fields for submsgs inside oneofs. + optional bool submsg_callback = 22 [default = false]; + + // Shorten or remove package names from type names. + // This option applies only on the file level. + optional TypenameMangling mangle_names = 17 [default = M_NONE]; + + // Data type for storage associated with callback fields. + optional string callback_datatype = 18 [default = "pb_callback_t"]; + + // 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. + optional string callback_function = 19 [default = "pb_default_field_callback"]; + + // 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. + optional DescriptorSize descriptorsize = 20 [default = DS_AUTO]; + + // Set default value for has_ fields. + optional bool default_has = 23 [default = false]; + + // Extra files to include in generated `.pb.h` + repeated string include = 24; + + // Automatic includes to exclude from generated `.pb.h` + // Same as nanopb_generator.py command line flag -x. + repeated string exclude = 26; + + // Package name that applies only for nanopb. + optional string package = 25; + + // Override type of the field in generated C code. Only to be used with related field types + optional google.protobuf.FieldDescriptorProto.Type type_override = 27; + + // 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. + optional bool sort_by_tag = 28 [default = true]; + + // 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. + optional FieldType fallback_type = 29 [default = FT_CALLBACK]; +} + +// Extensions to protoc 'Descriptor' type in order to define options +// inside a .proto file. +// +// Protocol Buffers extension number registry +// -------------------------------- +// Project: Nanopb +// Contact: Petteri Aimonen +// Web site: http://kapsi.fi/~jpa/nanopb +// Extensions: 1010 (all types) +// -------------------------------- + +extend google.protobuf.FileOptions { + optional NanoPBOptions nanopb_fileopt = 1010; +} + +extend google.protobuf.MessageOptions { + optional NanoPBOptions nanopb_msgopt = 1010; +} + +extend google.protobuf.EnumOptions { + optional NanoPBOptions nanopb_enumopt = 1010; +} + +extend google.protobuf.FieldOptions { + optional NanoPBOptions nanopb = 1010; +} diff --git a/proto/tmp/paxcount.proto b/proto/tmp/paxcount.proto new file mode 100644 index 0000000..47b2639 --- /dev/null +++ b/proto/tmp/paxcount.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "PaxcountProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message Paxcount { + /* + * seen Wifi devices + */ + uint32 wifi = 1; + + /* + * Seen BLE devices + */ + uint32 ble = 2; + + /* + * Uptime in seconds + */ + uint32 uptime = 3; +} diff --git a/proto/tmp/portnums.proto b/proto/tmp/portnums.proto new file mode 100644 index 0000000..76df5db --- /dev/null +++ b/proto/tmp/portnums.proto @@ -0,0 +1,232 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "Portnums"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * 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. + */ +enum PortNum { + /* + * 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 + */ + UNKNOWN_APP = 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 (?) + */ + TEXT_MESSAGE_APP = 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 + */ + REMOTE_HARDWARE_APP = 2; + + /* + * The built-in position messaging app. + * Payload is a Position message. + * ENCODING: Protobuf + */ + POSITION_APP = 3; + + /* + * The built-in user info app. + * Payload is a User message. + * ENCODING: Protobuf + */ + NODEINFO_APP = 4; + + /* + * Protocol control packets for mesh protocol use. + * Payload is a Routing message. + * ENCODING: Protobuf + */ + ROUTING_APP = 5; + + /* + * Admin control packets. + * Payload is a AdminMessage message. + * ENCODING: Protobuf + */ + ADMIN_APP = 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. + */ + TEXT_MESSAGE_COMPRESSED_APP = 7; + + /* + * Waypoint payloads. + * Payload is a Waypoint message. + * ENCODING: Protobuf + */ + WAYPOINT_APP = 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. + */ + AUDIO_APP = 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 + */ + DETECTION_SENSOR_APP = 10; + + /* + * Same as Text Message but used for critical alerts. + */ + ALERT_APP = 11; + + /* + * Provides a 'ping' service that replies to any packet it receives. + * Also serves as a small example module. + * ENCODING: ASCII Plaintext + */ + REPLY_APP = 32; + + /* + * Used for the python IP tunnel feature + * ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on. + */ + IP_TUNNEL_APP = 33; + + /* + * Paxcounter lib included in the firmware + * ENCODING: protobuf + */ + PAXCOUNTER_APP = 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 + */ + SERIAL_APP = 64; + + /* + * STORE_FORWARD_APP (Work in Progress) + * Maintained by Jm Casler (MC Hamster) : jm@casler.org + * ENCODING: Protobuf + */ + STORE_FORWARD_APP = 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 + */ + RANGE_TEST_APP = 66; + + /* + * Provides a format to send and receive telemetry data from the Meshtastic network. + * Maintained by Charles Crossan (crossan007) : crossan007@gmail.com + * ENCODING: Protobuf + */ + TELEMETRY_APP = 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 + */ + ZPS_APP = 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 (?) + */ + SIMULATOR_APP = 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 + */ + TRACEROUTE_APP = 70; + + /* + * Aggregates edge info for the network by sending out a list of each node's neighbors + * ENCODING: Protobuf + */ + NEIGHBORINFO_APP = 71; + + /* + * ATAK Plugin + * Portnum for payloads from the official Meshtastic ATAK plugin + */ + ATAK_PLUGIN = 72; + + /* + * Provides unencrypted information about a node for consumption by a map via MQTT + */ + MAP_REPORT_APP = 73; + + /* + * PowerStress based monitoring support (for automated power consumption testing) + */ + POWERSTRESS_APP = 74; + + /* + * Reticulum Network Stack Tunnel App + * ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface + */ + RETICULUM_TUNNEL_APP = 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)) + */ + PRIVATE_APP = 256; + + /* + * ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder + * ENCODING: libcotshrink + */ + ATAK_FORWARDER = 257; + + /* + * Currently we limit port nums to no higher than this value + */ + MAX = 511; +} diff --git a/proto/tmp/powermon.proto b/proto/tmp/powermon.proto new file mode 100644 index 0000000..dbb89b9 --- /dev/null +++ b/proto/tmp/powermon.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "PowerMonProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +package meshtastic; + +/* 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) +*/ +message PowerMon { + /* 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. + */ + enum State { + None = 0; + + CPU_DeepSleep = 0x01; + CPU_LightSleep = 0x02; + + /* + 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) + */ + Vext1_On = 0x04; + + Lora_RXOn = 0x08; + Lora_TXOn = 0x10; + Lora_RXActive = 0x20; + BT_On = 0x40; + LED_On = 0x80; + + Screen_On = 0x100; + Screen_Drawing = 0x200; + Wifi_On = 0x400; + + /* + GPS is actively trying to find our location + See GPSPowerState for more details + */ + GPS_Active = 0x800; + } +} + + +/* + * PowerStress testing support via the C++ PowerStress module + */ +message PowerStressMessage { + /* + * 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 + */ + enum Opcode { + /* + * Unset/unused + */ + UNSET = 0; + + PRINT_INFO = 1; // Print board version slog and send an ack that we are alive and ready to process commands + FORCE_QUIET = 2; // Try to turn off all automatic processing of packets, screen, sleeping, etc (to make it easier to measure in isolation) + END_QUIET = 3; // Stop powerstress processing - probably by just rebooting the board + + SCREEN_ON = 16; // Turn the screen on + SCREEN_OFF = 17; // Turn the screen off + + CPU_IDLE = 32; // Let the CPU run but we assume mostly idling for num_seconds + CPU_DEEPSLEEP = 33; // Force deep sleep for FIXME seconds + CPU_FULLON = 34; // Spin the CPU as fast as possible for num_seconds + + LED_ON = 48; // Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes) + LED_OFF = 49; // Force the LED off for num_seconds + + LORA_OFF = 64; // Completely turn off the LORA radio for num_seconds + LORA_TX = 65; // Send Lora packets for num_seconds + LORA_RX = 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) + + BT_OFF = 80; // Turn off the BT radio for num_seconds + BT_ON = 81; // Turn on the BT radio for num_seconds + + WIFI_OFF = 96; // Turn off the WIFI radio for num_seconds + WIFI_ON = 97; // Turn on the WIFI radio for num_seconds + + GPS_OFF = 112; // Turn off the GPS radio for num_seconds + GPS_ON = 113; // Turn on the GPS radio for num_seconds + } + + /* + * What type of HardwareMessage is this? + */ + Opcode cmd = 1; + + float num_seconds = 2; +} diff --git a/proto/tmp/remote_hardware.proto b/proto/tmp/remote_hardware.proto new file mode 100644 index 0000000..ba4a693 --- /dev/null +++ b/proto/tmp/remote_hardware.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "RemoteHardware"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * 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?) + */ +message HardwareMessage { + /* + * TODO: REPLACE + */ + enum Type { + /* + * Unset/unused + */ + UNSET = 0; + + /* + * Set gpio gpios based on gpio_mask/gpio_value + */ + WRITE_GPIOS = 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. + */ + WATCH_GPIOS = 2; + + /* + * The gpios listed in gpio_mask have changed, the new values are listed in gpio_value + */ + GPIOS_CHANGED = 3; + + /* + * Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated + */ + READ_GPIOS = 4; + + /* + * A reply to READ_GPIOS. gpio_mask and gpio_value will be populated + */ + READ_GPIOS_REPLY = 5; + } + + /* + * What type of HardwareMessage is this? + */ + Type type = 1; + + /* + * What gpios are we changing. Not used for all MessageTypes, see MessageType for details + */ + uint64 gpio_mask = 2; + + /* + * 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 + */ + uint64 gpio_value = 3; +} diff --git a/proto/tmp/rtttl.proto b/proto/tmp/rtttl.proto new file mode 100644 index 0000000..11c8b92 --- /dev/null +++ b/proto/tmp/rtttl.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "RTTTLConfigProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Canned message module configuration. + */ +message RTTTLConfig { + /* + * Ringtone for PWM Buzzer in RTTTL Format. + */ + string ringtone = 1; +} diff --git a/proto/tmp/storeforward.proto b/proto/tmp/storeforward.proto new file mode 100644 index 0000000..651eae5 --- /dev/null +++ b/proto/tmp/storeforward.proto @@ -0,0 +1,218 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "StoreAndForwardProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * TODO: REPLACE + */ +message StoreAndForward { + /* + * 001 - 063 = From Router + * 064 - 127 = From Client + */ + enum RequestResponse { + /* + * Unset/unused + */ + UNSET = 0; + + /* + * Router is an in error state. + */ + ROUTER_ERROR = 1; + + /* + * Router heartbeat + */ + ROUTER_HEARTBEAT = 2; + + /* + * Router has requested the client respond. This can work as a + * "are you there" message. + */ + ROUTER_PING = 3; + + /* + * The response to a "Ping" + */ + ROUTER_PONG = 4; + + /* + * Router is currently busy. Please try again later. + */ + ROUTER_BUSY = 5; + + /* + * Router is responding to a request for history. + */ + ROUTER_HISTORY = 6; + + /* + * Router is responding to a request for stats. + */ + ROUTER_STATS = 7; + + /* + * Router sends a text message from its history that was a direct message. + */ + ROUTER_TEXT_DIRECT = 8; + + /* + * Router sends a text message from its history that was a broadcast. + */ + ROUTER_TEXT_BROADCAST = 9; + + /* + * Client is an in error state. + */ + CLIENT_ERROR = 64; + + /* + * Client has requested a replay from the router. + */ + CLIENT_HISTORY = 65; + + /* + * Client has requested stats from the router. + */ + CLIENT_STATS = 66; + + /* + * Client has requested the router respond. This can work as a + * "are you there" message. + */ + CLIENT_PING = 67; + + /* + * The response to a "Ping" + */ + CLIENT_PONG = 68; + + /* + * Client has requested that the router abort processing the client's request + */ + CLIENT_ABORT = 106; + } + + /* + * TODO: REPLACE + */ + message Statistics { + /* + * Number of messages we have ever seen + */ + uint32 messages_total = 1; + + /* + * Number of messages we have currently saved our history. + */ + uint32 messages_saved = 2; + + /* + * Maximum number of messages we will save + */ + uint32 messages_max = 3; + + /* + * Router uptime in seconds + */ + uint32 up_time = 4; + + /* + * Number of times any client sent a request to the S&F. + */ + uint32 requests = 5; + + /* + * Number of times the history was requested. + */ + uint32 requests_history = 6; + + /* + * Is the heartbeat enabled on the server? + */ + bool heartbeat = 7; + + /* + * Maximum number of messages the server will return. + */ + uint32 return_max = 8; + + /* + * Maximum history window in minutes the server will return messages from. + */ + uint32 return_window = 9; + } + + /* + * TODO: REPLACE + */ + message History { + /* + * Number of that will be sent to the client + */ + uint32 history_messages = 1; + + /* + * The window of messages that was used to filter the history client requested + */ + uint32 window = 2; + + /* + * 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. + */ + uint32 last_request = 3; + } + + /* + * TODO: REPLACE + */ + message Heartbeat { + /* + * Period in seconds that the heartbeat is sent out that will be sent to the client + */ + uint32 period = 1; + + /* + * If set, this is not the primary Store & Forward router on the mesh + */ + uint32 secondary = 2; + } + + /* + * TODO: REPLACE + */ + RequestResponse rr = 1; + + /* + * TODO: REPLACE + */ + oneof variant { + /* + * TODO: REPLACE + */ + Statistics stats = 2; + + /* + * TODO: REPLACE + */ + History history = 3; + + /* + * TODO: REPLACE + */ + Heartbeat heartbeat = 4; + + /* + * Text from history message. + */ + bytes text = 5; + } +} diff --git a/proto/tmp/telemetry.proto b/proto/tmp/telemetry.proto new file mode 100644 index 0000000..3ca7d07 --- /dev/null +++ b/proto/tmp/telemetry.proto @@ -0,0 +1,593 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "TelemetryProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +/* + * Key native device metrics such as battery level + */ +message DeviceMetrics { + /* + * 0-100 (>100 means powered) + */ + optional uint32 battery_level = 1; + + /* + * Voltage measured + */ + optional float voltage = 2; + + /* + * Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + */ + optional float channel_utilization = 3; + + /* + * Percent of airtime for transmission used within the last hour. + */ + optional float air_util_tx = 4; + + /* + * How long the device has been running since the last reboot (in seconds) + */ + optional uint32 uptime_seconds = 5; +} + +/* + * Weather station or other environmental metrics + */ +message EnvironmentMetrics { + /* + * Temperature measured + */ + optional float temperature = 1; + + /* + * Relative humidity percent measured + */ + optional float relative_humidity = 2; + + /* + * Barometric pressure in hPA measured + */ + optional float barometric_pressure = 3; + + /* + * Gas resistance in MOhm measured + */ + optional float gas_resistance = 4; + + /* + * Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + */ + optional float voltage = 5; + + /* + * Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) + */ + optional float current = 6; + + /* + * relative scale IAQ value as measured by Bosch BME680 . value 0-500. + * Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. + */ + optional uint32 iaq = 7; + + /* + * RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. + */ + optional float distance = 8; + + /* + * VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + */ + optional float lux = 9; + + /* + * VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. + */ + optional float white_lux = 10; + + /* + * Infrared lux + */ + optional float ir_lux = 11; + + /* + * Ultraviolet lux + */ + optional float uv_lux = 12; + + /* + * Wind direction in degrees + * 0 degrees = North, 90 = East, etc... + */ + optional uint32 wind_direction = 13; + + /* + * Wind speed in m/s + */ + optional float wind_speed = 14; + + /* + * Weight in KG + */ + optional float weight = 15; + + /* + * Wind gust in m/s + */ + optional float wind_gust = 16; + + /* + * Wind lull in m/s + */ + optional float wind_lull = 17; + + /* + * Radiation in µR/h + */ + optional float radiation = 18; + + /* + * Rainfall in the last hour in mm + */ + optional float rainfall_1h = 19; + + /* + * Rainfall in the last 24 hours in mm + */ + optional float rainfall_24h = 20; + + /* + * Soil moisture measured (% 1-100) + */ + optional uint32 soil_moisture = 21; + + /* + * Soil temperature measured (*C) + */ + optional float soil_temperature = 22; +} + +/* + * Power Metrics (voltage / current / etc) + */ +message PowerMetrics { + /* + * Voltage (Ch1) + */ + optional float ch1_voltage = 1; + + /* + * Current (Ch1) + */ + optional float ch1_current = 2; + + /* + * Voltage (Ch2) + */ + optional float ch2_voltage = 3; + + /* + * Current (Ch2) + */ + optional float ch2_current = 4; + + /* + * Voltage (Ch3) + */ + optional float ch3_voltage = 5; + + /* + * Current (Ch3) + */ + optional float ch3_current = 6; +} + +/* + * Air quality metrics + */ +message AirQualityMetrics { + /* + * Concentration Units Standard PM1.0 + */ + optional uint32 pm10_standard = 1; + + /* + * Concentration Units Standard PM2.5 + */ + optional uint32 pm25_standard = 2; + + /* + * Concentration Units Standard PM10.0 + */ + optional uint32 pm100_standard = 3; + + /* + * Concentration Units Environmental PM1.0 + */ + optional uint32 pm10_environmental = 4; + + /* + * Concentration Units Environmental PM2.5 + */ + optional uint32 pm25_environmental = 5; + + /* + * Concentration Units Environmental PM10.0 + */ + optional uint32 pm100_environmental = 6; + + /* + * 0.3um Particle Count + */ + optional uint32 particles_03um = 7; + + /* + * 0.5um Particle Count + */ + optional uint32 particles_05um = 8; + + /* + * 1.0um Particle Count + */ + optional uint32 particles_10um = 9; + + /* + * 2.5um Particle Count + */ + optional uint32 particles_25um = 10; + + /* + * 5.0um Particle Count + */ + optional uint32 particles_50um = 11; + + /* + * 10.0um Particle Count + */ + optional uint32 particles_100um = 12; + + /* + * CO2 concentration in ppm + */ + optional uint32 co2 = 13; +} + +/* + * Local device mesh statistics + */ +message LocalStats { + /* + * How long the device has been running since the last reboot (in seconds) + */ + uint32 uptime_seconds = 1; + /* + * Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). + */ + float channel_utilization = 2; + /* + * Percent of airtime for transmission used within the last hour. + */ + float air_util_tx = 3; + + /* + * Number of packets sent + */ + uint32 num_packets_tx = 4; + + /* + * Number of packets received (both good and bad) + */ + uint32 num_packets_rx = 5; + + /* + * Number of packets received that are malformed or violate the protocol + */ + uint32 num_packets_rx_bad = 6; + + /* + * Number of nodes online (in the past 2 hours) + */ + uint32 num_online_nodes = 7; + + /* + * Number of nodes total + */ + uint32 num_total_nodes = 8; + + /* + * Number of received packets that were duplicates (due to multiple nodes relaying). + * If this number is high, there are nodes in the mesh relaying packets when it's unnecessary, for example due to the ROUTER/REPEATER role. + */ + uint32 num_rx_dupe = 9; + + /* + * Number of packets we transmitted that were a relay for others (not originating from ourselves). + */ + uint32 num_tx_relay = 10; + + /* + * Number of times we canceled a packet to be relayed, because someone else did it before us. + * This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. + */ + uint32 num_tx_relay_canceled = 11; +} + +/* + * Health telemetry metrics + */ + message HealthMetrics { + /* + * Heart rate (beats per minute) + */ + optional uint32 heart_bpm = 1; + + /* + * SpO2 (blood oxygen saturation) level + */ + optional uint32 spO2 = 2; + + /* + * Body temperature in degrees Celsius + */ + optional float temperature = 3; +} + +/* + * Types of Measurements the telemetry module is equipped to handle + */ +message Telemetry { + /* + * Seconds since 1970 - or 0 for unknown/unset + */ + fixed32 time = 1; + + oneof variant { + /* + * Key native device metrics such as battery level + */ + DeviceMetrics device_metrics = 2; + + /* + * Weather station or other environmental metrics + */ + EnvironmentMetrics environment_metrics = 3; + + /* + * Air quality metrics + */ + AirQualityMetrics air_quality_metrics = 4; + + /* + * Power Metrics + */ + PowerMetrics power_metrics = 5; + + /* + * Local device mesh statistics + */ + LocalStats local_stats = 6; + + /* + * Health telemetry metrics + */ + HealthMetrics health_metrics = 7; + } +} + +/* + * Supported I2C Sensors for telemetry in Meshtastic + */ +enum TelemetrySensorType { + /* + * No external telemetry sensor explicitly set + */ + SENSOR_UNSET = 0; + + /* + * High accuracy temperature, pressure, humidity + */ + BME280 = 1; + + /* + * High accuracy temperature, pressure, humidity, and air resistance + */ + BME680 = 2; + + /* + * Very high accuracy temperature + */ + MCP9808 = 3; + + /* + * Moderate accuracy current and voltage + */ + INA260 = 4; + + /* + * Moderate accuracy current and voltage + */ + INA219 = 5; + + /* + * High accuracy temperature and pressure + */ + BMP280 = 6; + + /* + * High accuracy temperature and humidity + */ + SHTC3 = 7; + + /* + * High accuracy pressure + */ + LPS22 = 8; + + /* + * 3-Axis magnetic sensor + */ + QMC6310 = 9; + + /* + * 6-Axis inertial measurement sensor + */ + QMI8658 = 10; + + /* + * 3-Axis magnetic sensor + */ + QMC5883L = 11; + + /* + * High accuracy temperature and humidity + */ + SHT31 = 12; + + /* + * PM2.5 air quality sensor + */ + PMSA003I = 13; + + /* + * INA3221 3 Channel Voltage / Current Sensor + */ + INA3221 = 14; + + /* + * BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) + */ + BMP085 = 15; + + /* + * RCWL-9620 Doppler Radar Distance Sensor, used for water level detection + */ + RCWL9620 = 16; + + /* + * Sensirion High accuracy temperature and humidity + */ + SHT4X = 17; + + /* + * VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. + */ + VEML7700 = 18; + + /* + * MLX90632 non-contact IR temperature sensor. + */ + MLX90632 = 19; + + /* + * TI OPT3001 Ambient Light Sensor + */ + OPT3001 = 20; + + /* + * Lite On LTR-390UV-01 UV Light Sensor + */ + LTR390UV = 21; + + /* + * AMS TSL25911FN RGB Light Sensor + */ + TSL25911FN = 22; + + /* + * AHT10 Integrated temperature and humidity sensor + */ + AHT10 = 23; + + /* + * DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) + */ + DFROBOT_LARK = 24; + + /* + * NAU7802 Scale Chip or compatible + */ + NAU7802 = 25; + + /* + * BMP3XX High accuracy temperature and pressure + */ + BMP3XX = 26; + + /* + * ICM-20948 9-Axis digital motion processor + */ + ICM20948 = 27; + + /* + * MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) + */ + MAX17048 = 28; + + /* + * Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor + */ + CUSTOM_SENSOR = 29; + + /* + * MAX30102 Pulse Oximeter and Heart-Rate Sensor + */ + MAX30102 = 30; + + /* + * MLX90614 non-contact IR temperature sensor + */ + MLX90614 = 31; + + /* + * SCD40/SCD41 CO2, humidity, temperature sensor + */ + SCD4X = 32; + + /* + * ClimateGuard RadSens, radiation, Geiger-Muller Tube + */ + RADSENS = 33; + + /* + * High accuracy current and voltage + */ + INA226 = 34; + + /* + * DFRobot Gravity tipping bucket rain gauge + */ + DFROBOT_RAIN = 35; + + /* + * Infineon DPS310 High accuracy pressure and temperature + */ + DPS310 = 36; + + /* + * RAKWireless RAK12035 Soil Moisture Sensor Module + */ + RAK12035 = 37; +} + +/* + * NAU7802 Telemetry configuration, for saving to flash + */ +message Nau7802Config { + /* + * The offset setting for the NAU7802 + */ + int32 zeroOffset = 1; + + /* + * The calibration factor for the NAU7802 + */ + float calibrationFactor = 2; +} diff --git a/proto/tmp/xmodem.proto b/proto/tmp/xmodem.proto new file mode 100644 index 0000000..732780a --- /dev/null +++ b/proto/tmp/xmodem.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package meshtastic; + +option csharp_namespace = "Meshtastic.Protobufs"; +option go_package = "github.com/meshtastic/go/generated"; +option java_outer_classname = "XmodemProtos"; +option java_package = "com.geeksville.mesh"; +option swift_prefix = ""; + +message XModem { + enum Control { + NUL = 0; + SOH = 1; + STX = 2; + EOT = 4; + ACK = 6; + NAK = 21; + CAN = 24; + CTRLZ = 26; + } + + Control control = 1; + uint32 seq = 2; + uint32 crc16 = 3; + bytes buffer = 4; +}