Initial commit
just reads messages from meshtastic and logs them to stdout
This commit is contained in:
commit
749e722a5c
56 changed files with 29622 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
matrix-meshtastic-bridge.json
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "meshtastic/protobufs-src"]
|
||||
path = meshtastic/protobufs-src
|
||||
url = https://github.com/meshtastic/protobufs.git
|
22
cmd/matrix-bridge-meshtastic/main.go
Normal file
22
cmd/matrix-bridge-meshtastic/main.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.janky.solutions/finn/matrix-meshtastic-bridge-go/config"
|
||||
"git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if err := run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func run() error {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
if err := config.Load(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return meshtastic.Receive()
|
||||
}
|
39
config/config.go
Normal file
39
config/config.go
Normal file
|
@ -0,0 +1,39 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Meshtastic Meshtastic
|
||||
}
|
||||
|
||||
type Meshtastic struct {
|
||||
Address string
|
||||
}
|
||||
|
||||
var C Config
|
||||
|
||||
func Load() error {
|
||||
return load("matrix-meshtastic-bridge.json")
|
||||
}
|
||||
|
||||
func load(filename string) error {
|
||||
logrus.WithField("file", filename).Info("reading config file")
|
||||
|
||||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
err = json.NewDecoder(f).Decode(&C)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
10
go.mod
Normal file
10
go.mod
Normal file
|
@ -0,0 +1,10 @@
|
|||
module git.janky.solutions/finn/matrix-meshtastic-bridge-go
|
||||
|
||||
go 1.22.7
|
||||
|
||||
require (
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
google.golang.org/protobuf v1.35.1
|
||||
)
|
||||
|
||||
require golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
|
21
go.sum
Normal file
21
go.sum
Normal file
|
@ -0,0 +1,21 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
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.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
|
||||
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
5
matrix-meshtastic-bridge.sample.json
Normal file
5
matrix-meshtastic-bridge.sample.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"meshtastic": {
|
||||
"address": "meshtastic.local"
|
||||
}
|
||||
}
|
12
meshtastic/build-protos.sh
Executable file
12
meshtastic/build-protos.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
set -exuo pipefail
|
||||
|
||||
for src in protobufs-src/meshtastic/*.proto protobufs-src/nanopb.proto; do
|
||||
dest="protobufs/$(basename "${src}")"
|
||||
cp -v "${src}" "${dest}"
|
||||
sed -i 's#option go_package =.*#option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";#' "${dest}"
|
||||
sed -i 's#import "meshtastic/#import "protobufs/#' "${dest}"
|
||||
sed -i 's#import "nanopb.proto#import "protobufs/nanopb.proto#' "${dest}"
|
||||
done
|
||||
|
||||
protoc --go_out=. --go_opt=paths=source_relative --go_opt=Mprotobufs/nanopb.proto=git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs protobufs/*
|
69
meshtastic/meshtastic.go
Normal file
69
meshtastic/meshtastic.go
Normal file
|
@ -0,0 +1,69 @@
|
|||
package meshtastic
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"git.janky.solutions/finn/matrix-meshtastic-bridge-go/config"
|
||||
"git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
var shutdownRequested = false
|
||||
|
||||
func Receive() error {
|
||||
for !shutdownRequested {
|
||||
fromRadio, err := getFromRadio()
|
||||
if err != nil {
|
||||
logrus.WithError(err).Error("error communicating with radio")
|
||||
}
|
||||
|
||||
if fromRadio != nil && fromRadio.PayloadVariant != nil {
|
||||
logrus.Debugf("fromRadio: %+v", fromRadio)
|
||||
}
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func getFromRadio() (*protobufs.FromRadio, error) {
|
||||
u := url.URL{
|
||||
Scheme: "http",
|
||||
Host: config.C.Meshtastic.Address,
|
||||
Path: "/api/v1/fromradio",
|
||||
}
|
||||
req, err := http.NewRequest(http.MethodGet, u.String(), nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error building request to radio: %v", err)
|
||||
}
|
||||
req.Header.Add("Accept", "application/x-protobuf")
|
||||
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error making request to radio: %v", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("unexpected %s from radio", resp.Status)
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error reading response from radio: %v", err)
|
||||
}
|
||||
|
||||
fromRadio := protobufs.FromRadio{}
|
||||
err = proto.Unmarshal(body, &fromRadio)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error parsing response from radio: %v", err)
|
||||
}
|
||||
|
||||
return &fromRadio, nil
|
||||
}
|
1
meshtastic/protobufs-src
Submodule
1
meshtastic/protobufs-src
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0fed5c7709d2cec043a0f6daefa86ff11de0b946
|
1529
meshtastic/protobufs/admin.pb.go
Normal file
1529
meshtastic/protobufs/admin.pb.go
Normal file
File diff suppressed because it is too large
Load diff
438
meshtastic/protobufs/admin.proto
Normal file
438
meshtastic/protobufs/admin.proto
Normal file
|
@ -0,0 +1,438 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/channel.proto";
|
||||
import "protobufs/config.proto";
|
||||
import "protobufs/connection_status.proto";
|
||||
import "protobufs/mesh.proto";
|
||||
import "protobufs/module_config.proto";
|
||||
import "protobufs/device_ui.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
181
meshtastic/protobufs/apponly.pb.go
Normal file
181
meshtastic/protobufs/apponly.pb.go
Normal file
|
@ -0,0 +1,181 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/apponly.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *ChannelSet) Reset() {
|
||||
*x = ChannelSet{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_apponly_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChannelSet.ProtoReflect.Descriptor instead.
|
||||
func (*ChannelSet) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_apponly_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_apponly_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x6f,
|
||||
0x6e, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x1a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73,
|
||||
0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x6c, 0x53, 0x65, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x74, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e,
|
||||
0x0a, 0x0b, 0x6c, 0x6f, 0x72, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x52, 0x61, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x0a, 0x6c, 0x6f, 0x72, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x89,
|
||||
0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c,
|
||||
0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0d, 0x41, 0x70, 0x70, 0x4f, 0x6e, 0x6c, 0x79, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79,
|
||||
0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f,
|
||||
0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73,
|
||||
0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_apponly_proto_rawDescOnce sync.Once
|
||||
file_protobufs_apponly_proto_rawDescData = file_protobufs_apponly_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_apponly_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_apponly_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_apponly_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_apponly_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_apponly_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_apponly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_apponly_proto_goTypes = []interface{}{
|
||||
(*ChannelSet)(nil), // 0: meshtastic.ChannelSet
|
||||
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
|
||||
(*Config_LoRaConfig)(nil), // 2: meshtastic.Config.LoRaConfig
|
||||
}
|
||||
var file_protobufs_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_protobufs_apponly_proto_init() }
|
||||
func file_protobufs_apponly_proto_init() {
|
||||
if File_protobufs_apponly_proto != nil {
|
||||
return
|
||||
}
|
||||
file_protobufs_channel_proto_init()
|
||||
file_protobufs_config_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_apponly_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChannelSet); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_apponly_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_apponly_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_apponly_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_apponly_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_apponly_proto = out.File
|
||||
file_protobufs_apponly_proto_rawDesc = nil
|
||||
file_protobufs_apponly_proto_goTypes = nil
|
||||
file_protobufs_apponly_proto_depIdxs = nil
|
||||
}
|
31
meshtastic/protobufs/apponly.proto
Normal file
31
meshtastic/protobufs/apponly.proto
Normal file
|
@ -0,0 +1,31 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/channel.proto";
|
||||
import "protobufs/config.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
890
meshtastic/protobufs/atak.pb.go
Normal file
890
meshtastic/protobufs/atak.pb.go
Normal file
|
@ -0,0 +1,890 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/atak.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type 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_protobufs_atak_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Team) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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_protobufs_atak_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (MemberRole) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_atak_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// Packets for the official ATAK Plugin
|
||||
type TAKPacket struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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 assignable to PayloadVariant:
|
||||
//
|
||||
// *TAKPacket_Pli
|
||||
// *TAKPacket_Chat
|
||||
// *TAKPacket_Detail
|
||||
PayloadVariant isTAKPacket_PayloadVariant `protobuf_oneof:"payload_variant"`
|
||||
}
|
||||
|
||||
func (x *TAKPacket) Reset() {
|
||||
*x = TAKPacket{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TAKPacket.ProtoReflect.Descriptor instead.
|
||||
func (*TAKPacket) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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 (m *TAKPacket) GetPayloadVariant() isTAKPacket_PayloadVariant {
|
||||
if m != nil {
|
||||
return m.PayloadVariant
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TAKPacket) GetPli() *PLI {
|
||||
if x, ok := x.GetPayloadVariant().(*TAKPacket_Pli); ok {
|
||||
return x.Pli
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TAKPacket) GetChat() *GeoChat {
|
||||
if x, ok := x.GetPayloadVariant().(*TAKPacket_Chat); ok {
|
||||
return x.Chat
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TAKPacket) GetDetail() []byte {
|
||||
if x, ok := x.GetPayloadVariant().(*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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *GeoChat) Reset() {
|
||||
*x = GeoChat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GeoChat.ProtoReflect.Descriptor instead.
|
||||
func (*GeoChat) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *Group) Reset() {
|
||||
*x = Group{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Group.ProtoReflect.Descriptor instead.
|
||||
func (*Group) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_atak_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Group) GetRole() MemberRole {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return MemberRole_Unspecifed
|
||||
}
|
||||
|
||||
func (x *Group) GetTeam() Team {
|
||||
if x != nil {
|
||||
return x.Team
|
||||
}
|
||||
return Team_Unspecifed_Color
|
||||
}
|
||||
|
||||
// ATAK EUD Status
|
||||
// <status battery='100' />
|
||||
type Status struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Battery level
|
||||
Battery uint32 `protobuf:"varint,1,opt,name=battery,proto3" json:"battery,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Status) Reset() {
|
||||
*x = Status{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Status.ProtoReflect.Descriptor instead.
|
||||
func (*Status) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_atak_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Status) GetBattery() uint32 {
|
||||
if x != nil {
|
||||
return x.Battery
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// ATAK Contact
|
||||
// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
|
||||
type Contact struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *Contact) Reset() {
|
||||
*x = Contact{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Contact.ProtoReflect.Descriptor instead.
|
||||
func (*Contact) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *PLI) Reset() {
|
||||
*x = PLI{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_atak_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PLI.ProtoReflect.Descriptor instead.
|
||||
func (*PLI) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_atak_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_atak_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x61, 0x74, 0x61, 0x6b,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x22, 0xb1, 0x02, 0x0a, 0x09, 0x54, 0x41, 0x4b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x12, 0x23, 0x0a, 0x0d, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x72,
|
||||
0x65, 0x73, 0x73, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x63, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x03, 0x70, 0x6c, 0x69,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2e, 0x50, 0x4c, 0x49, 0x48, 0x00, 0x52, 0x03, 0x70, 0x6c, 0x69, 0x12, 0x29,
|
||||
0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x47, 0x65, 0x6f, 0x43, 0x68, 0x61,
|
||||
0x74, 0x48, 0x00, 0x52, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x42, 0x11, 0x0a, 0x0f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x76,
|
||||
0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x22, 0x75, 0x0a, 0x07, 0x47, 0x65, 0x6f, 0x43, 0x68, 0x61,
|
||||
0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x74,
|
||||
0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x74, 0x6f, 0x88, 0x01, 0x01,
|
||||
0x12, 0x24, 0x0a, 0x0b, 0x74, 0x6f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0a, 0x74, 0x6f, 0x43, 0x61, 0x6c, 0x6c, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x88, 0x01, 0x01, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x74, 0x6f, 0x42, 0x0e, 0x0a,
|
||||
0x0c, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x59, 0x0a,
|
||||
0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2a, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f,
|
||||
0x6c, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x54, 0x65,
|
||||
0x61, 0x6d, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0x22, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x22, 0x4e, 0x0a, 0x07,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x61,
|
||||
0x6c, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x8f, 0x01, 0x0a,
|
||||
0x03, 0x50, 0x4c, 0x49, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x5f, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x09, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x49, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x5f, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74,
|
||||
0x75, 0x64, 0x65, 0x49, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x2a, 0xc0,
|
||||
0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x6e, 0x73, 0x70, 0x65,
|
||||
0x63, 0x69, 0x66, 0x65, 0x64, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x57, 0x68, 0x69, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x59, 0x65, 0x6c, 0x6c,
|
||||
0x6f, 0x77, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x10, 0x03,
|
||||
0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x61, 0x10, 0x04, 0x12, 0x07, 0x0a,
|
||||
0x03, 0x52, 0x65, 0x64, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x61, 0x72, 0x6f, 0x6f, 0x6e,
|
||||
0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x75, 0x72, 0x70, 0x6c, 0x65, 0x10, 0x07, 0x12, 0x0d,
|
||||
0x0a, 0x09, 0x44, 0x61, 0x72, 0x6b, 0x5f, 0x42, 0x6c, 0x75, 0x65, 0x10, 0x08, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x42, 0x6c, 0x75, 0x65, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x79, 0x61, 0x6e, 0x10,
|
||||
0x0a, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6c, 0x10, 0x0b, 0x12, 0x09, 0x0a, 0x05, 0x47,
|
||||
0x72, 0x65, 0x65, 0x6e, 0x10, 0x0c, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x61, 0x72, 0x6b, 0x5f, 0x47,
|
||||
0x72, 0x65, 0x65, 0x6e, 0x10, 0x0d, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x72, 0x6f, 0x77, 0x6e, 0x10,
|
||||
0x0e, 0x2a, 0x7f, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x65, 0x64, 0x10, 0x00, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x54, 0x65, 0x61, 0x6d, 0x4c, 0x65, 0x61, 0x64, 0x10, 0x02, 0x12, 0x06, 0x0a,
|
||||
0x02, 0x48, 0x51, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x6e, 0x69, 0x70, 0x65, 0x72, 0x10,
|
||||
0x04, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x65, 0x64, 0x69, 0x63, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f,
|
||||
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x10,
|
||||
0x06, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x54, 0x4f, 0x10, 0x07, 0x12, 0x06, 0x0a, 0x02, 0x4b, 0x39,
|
||||
0x10, 0x08, 0x42, 0x86, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73,
|
||||
0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0a, 0x41, 0x54, 0x41, 0x4b,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b,
|
||||
0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e,
|
||||
0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_atak_proto_rawDescOnce sync.Once
|
||||
file_protobufs_atak_proto_rawDescData = file_protobufs_atak_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_atak_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_atak_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_atak_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_atak_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_atak_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_atak_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_protobufs_atak_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_protobufs_atak_proto_goTypes = []interface{}{
|
||||
(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_protobufs_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_protobufs_atak_proto_init() }
|
||||
func file_protobufs_atak_proto_init() {
|
||||
if File_protobufs_atak_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_atak_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TAKPacket); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GeoChat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Group); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Status); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Contact); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PLI); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
(*TAKPacket_Pli)(nil),
|
||||
(*TAKPacket_Chat)(nil),
|
||||
(*TAKPacket_Detail)(nil),
|
||||
}
|
||||
file_protobufs_atak_proto_msgTypes[1].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_atak_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_atak_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_atak_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_atak_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_atak_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_atak_proto = out.File
|
||||
file_protobufs_atak_proto_rawDesc = nil
|
||||
file_protobufs_atak_proto_goTypes = nil
|
||||
file_protobufs_atak_proto_depIdxs = nil
|
||||
}
|
263
meshtastic/protobufs/atak.proto
Normal file
263
meshtastic/protobufs/atak.proto
Normal file
|
@ -0,0 +1,263 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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
|
||||
* <status battery='100' />
|
||||
*/
|
||||
message Status {
|
||||
/*
|
||||
* Battery level
|
||||
*/
|
||||
uint32 battery = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* ATAK Contact
|
||||
* <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
|
||||
*/
|
||||
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;
|
||||
}
|
155
meshtastic/protobufs/cannedmessages.pb.go
Normal file
155
meshtastic/protobufs/cannedmessages.pb.go
Normal file
|
@ -0,0 +1,155 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/cannedmessages.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Canned message module configuration.
|
||||
type CannedMessageModuleConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Predefined messages for canned message module separated by '|' characters.
|
||||
Messages string `protobuf:"bytes,1,opt,name=messages,proto3" json:"messages,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CannedMessageModuleConfig) Reset() {
|
||||
*x = CannedMessageModuleConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_cannedmessages_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CannedMessageModuleConfig.ProtoReflect.Descriptor instead.
|
||||
func (*CannedMessageModuleConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_cannedmessages_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *CannedMessageModuleConfig) GetMessages() string {
|
||||
if x != nil {
|
||||
return x.Messages
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_protobufs_cannedmessages_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_cannedmessages_proto_rawDesc = []byte{
|
||||
0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x64, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0x37, 0x0a, 0x19,
|
||||
0x43, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x42, 0x95, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65,
|
||||
0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x19, 0x43,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61,
|
||||
0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69,
|
||||
0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_cannedmessages_proto_rawDescOnce sync.Once
|
||||
file_protobufs_cannedmessages_proto_rawDescData = file_protobufs_cannedmessages_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_cannedmessages_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_cannedmessages_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_cannedmessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_cannedmessages_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_cannedmessages_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_cannedmessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_cannedmessages_proto_goTypes = []interface{}{
|
||||
(*CannedMessageModuleConfig)(nil), // 0: meshtastic.CannedMessageModuleConfig
|
||||
}
|
||||
var file_protobufs_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_protobufs_cannedmessages_proto_init() }
|
||||
func file_protobufs_cannedmessages_proto_init() {
|
||||
if File_protobufs_cannedmessages_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_cannedmessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CannedMessageModuleConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_cannedmessages_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_cannedmessages_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_cannedmessages_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_cannedmessages_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_cannedmessages_proto = out.File
|
||||
file_protobufs_cannedmessages_proto_rawDesc = nil
|
||||
file_protobufs_cannedmessages_proto_goTypes = nil
|
||||
file_protobufs_cannedmessages_proto_depIdxs = nil
|
||||
}
|
19
meshtastic/protobufs/cannedmessages.proto
Normal file
19
meshtastic/protobufs/cannedmessages.proto
Normal file
|
@ -0,0 +1,19 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
504
meshtastic/protobufs/channel.pb.go
Normal file
504
meshtastic/protobufs/channel.pb.go
Normal file
|
@ -0,0 +1,504 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/channel.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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_protobufs_channel_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Channel_Role) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Deprecated in favor of LoraConfig.channel_num
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
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"`
|
||||
}
|
||||
|
||||
func (x *ChannelSettings) Reset() {
|
||||
*x = ChannelSettings{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_channel_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChannelSettings.ProtoReflect.Descriptor instead.
|
||||
func (*ChannelSettings) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_channel_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *ModuleSettings) Reset() {
|
||||
*x = ModuleSettings{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_channel_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ModuleSettings.ProtoReflect.Descriptor instead.
|
||||
func (*ModuleSettings) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *Channel) Reset() {
|
||||
*x = Channel{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_channel_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Channel.ProtoReflect.Descriptor instead.
|
||||
func (*Channel) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_channel_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_channel_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0x83, 0x02, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65,
|
||||
0x6c, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0b, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02,
|
||||
0x18, 0x01, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x75, 0x6d, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x70, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x70, 0x73, 0x6b,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x07,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x65,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x75, 0x70,
|
||||
0x6c, 0x69, 0x6e, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x64,
|
||||
0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x45,
|
||||
0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x0e, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x67, 0x0a, 0x0e, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2d, 0x0a,
|
||||
0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f,
|
||||
0x69, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d,
|
||||
0x75, 0x74, 0x65, 0x64, 0x22, 0xb8, 0x01, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x65, 0x74,
|
||||
0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
|
||||
0x2c, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e,
|
||||
0x65, 0x6c, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x30, 0x0a,
|
||||
0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45,
|
||||
0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x01,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x41, 0x52, 0x59, 0x10, 0x02, 0x42,
|
||||
0x89, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c,
|
||||
0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b,
|
||||
0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e,
|
||||
0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_channel_proto_rawDescOnce sync.Once
|
||||
file_protobufs_channel_proto_rawDescData = file_protobufs_channel_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_channel_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_channel_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_channel_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_channel_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_channel_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_channel_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_protobufs_channel_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_protobufs_channel_proto_goTypes = []interface{}{
|
||||
(Channel_Role)(0), // 0: meshtastic.Channel.Role
|
||||
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
|
||||
(*ModuleSettings)(nil), // 2: meshtastic.ModuleSettings
|
||||
(*Channel)(nil), // 3: meshtastic.Channel
|
||||
}
|
||||
var file_protobufs_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_protobufs_channel_proto_init() }
|
||||
func file_protobufs_channel_proto_init() {
|
||||
if File_protobufs_channel_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_channel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChannelSettings); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_channel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ModuleSettings); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_channel_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Channel); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_channel_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_channel_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_channel_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_channel_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_channel_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_channel_proto = out.File
|
||||
file_protobufs_channel_proto_rawDesc = nil
|
||||
file_protobufs_channel_proto_goTypes = nil
|
||||
file_protobufs_channel_proto_depIdxs = nil
|
||||
}
|
156
meshtastic/protobufs/channel.proto
Normal file
156
meshtastic/protobufs/channel.proto
Normal file
|
@ -0,0 +1,156 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
259
meshtastic/protobufs/clientonly.pb.go
Normal file
259
meshtastic/protobufs/clientonly.pb.go
Normal file
|
@ -0,0 +1,259 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/clientonly.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *DeviceProfile) Reset() {
|
||||
*x = DeviceProfile{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_clientonly_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceProfile.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceProfile) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_clientonly_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_clientonly_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65,
|
||||
0x6e, 0x74, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x1a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x04, 0x0a, 0x0d, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x09, 0x6c,
|
||||
0x6f, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
|
||||
0x52, 0x08, 0x6c, 0x6f, 0x6e, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x22, 0x0a,
|
||||
0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x48, 0x01, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01,
|
||||
0x01, 0x12, 0x24, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x75, 0x72, 0x6c,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65,
|
||||
0x6c, 0x55, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x48, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0x47, 0x0a,
|
||||
0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x48, 0x04, 0x52, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x48, 0x05, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x50, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x74, 0x6f, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x08, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x09, 0x48, 0x07, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x5f, 0x75, 0x72, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
|
||||
0x10, 0x0a, 0x0e, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e,
|
||||
0x65, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x42, 0x8c, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65,
|
||||
0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x10, 0x43,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a,
|
||||
0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78,
|
||||
0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64,
|
||||
0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_clientonly_proto_rawDescOnce sync.Once
|
||||
file_protobufs_clientonly_proto_rawDescData = file_protobufs_clientonly_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_clientonly_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_clientonly_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_clientonly_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_clientonly_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_clientonly_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_clientonly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_clientonly_proto_goTypes = []interface{}{
|
||||
(*DeviceProfile)(nil), // 0: meshtastic.DeviceProfile
|
||||
(*LocalConfig)(nil), // 1: meshtastic.LocalConfig
|
||||
(*LocalModuleConfig)(nil), // 2: meshtastic.LocalModuleConfig
|
||||
(*Position)(nil), // 3: meshtastic.Position
|
||||
}
|
||||
var file_protobufs_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_protobufs_clientonly_proto_init() }
|
||||
func file_protobufs_clientonly_proto_init() {
|
||||
if File_protobufs_clientonly_proto != nil {
|
||||
return
|
||||
}
|
||||
file_protobufs_localonly_proto_init()
|
||||
file_protobufs_mesh_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_clientonly_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceProfile); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_protobufs_clientonly_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_clientonly_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_clientonly_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_clientonly_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_clientonly_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_clientonly_proto = out.File
|
||||
file_protobufs_clientonly_proto_rawDesc = nil
|
||||
file_protobufs_clientonly_proto_goTypes = nil
|
||||
file_protobufs_clientonly_proto_depIdxs = nil
|
||||
}
|
58
meshtastic/protobufs/clientonly.proto
Normal file
58
meshtastic/protobufs/clientonly.proto
Normal file
|
@ -0,0 +1,58 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/localonly.proto";
|
||||
import "protobufs/mesh.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
3013
meshtastic/protobufs/config.pb.go
Normal file
3013
meshtastic/protobufs/config.pb.go
Normal file
File diff suppressed because it is too large
Load diff
1098
meshtastic/protobufs/config.proto
Normal file
1098
meshtastic/protobufs/config.proto
Normal file
File diff suppressed because it is too large
Load diff
624
meshtastic/protobufs/connection_status.pb.go
Normal file
624
meshtastic/protobufs/connection_status.pb.go
Normal file
|
@ -0,0 +1,624 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/connection_status.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type DeviceConnectionStatus struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *DeviceConnectionStatus) Reset() {
|
||||
*x = DeviceConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *WifiConnectionStatus) Reset() {
|
||||
*x = WifiConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use WifiConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*WifiConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Connection status
|
||||
Status *NetworkConnectionStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *EthernetConnectionStatus) Reset() {
|
||||
*x = EthernetConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use EthernetConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*EthernetConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *NetworkConnectionStatus) Reset() {
|
||||
*x = NetworkConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NetworkConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*NetworkConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *BluetoothConnectionStatus) Reset() {
|
||||
*x = BluetoothConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use BluetoothConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*BluetoothConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *SerialConnectionStatus) Reset() {
|
||||
*x = SerialConnectionStatus{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_connection_status_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SerialConnectionStatus.ProtoReflect.Descriptor instead.
|
||||
func (*SerialConnectionStatus) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_connection_status_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_connection_status_proto_rawDesc = []byte{
|
||||
0x0a, 0x21, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x6e,
|
||||
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22,
|
||||
0xd4, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x77, 0x69,
|
||||
0x66, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x57, 0x69, 0x66, 0x69, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x04, 0x77, 0x69,
|
||||
0x66, 0x69, 0x88, 0x01, 0x01, 0x12, 0x45, 0x0a, 0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x01, 0x52,
|
||||
0x08, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, 0x48, 0x0a, 0x09,
|
||||
0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x42, 0x6c, 0x75,
|
||||
0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x02, 0x52, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f,
|
||||
0x6f, 0x74, 0x68, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x03, 0x52, 0x06, 0x73, 0x65,
|
||||
0x72, 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x77, 0x69, 0x66, 0x69,
|
||||
0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x42, 0x0c, 0x0a,
|
||||
0x0a, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x42, 0x09, 0x0a, 0x07, 0x5f,
|
||||
0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0x7b, 0x0a, 0x14, 0x57, 0x69, 0x66, 0x69, 0x43, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b,
|
||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4e, 0x65, 0x74, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73,
|
||||
0x73, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x73, 0x69, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x72, 0x73, 0x73, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72,
|
||||
0x73, 0x73, 0x69, 0x22, 0x57, 0x0a, 0x18, 0x45, 0x74, 0x68, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x43,
|
||||
0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x3b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x23, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4e, 0x65, 0x74,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb7, 0x01, 0x0a,
|
||||
0x17, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x09, 0x69, 0x70,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x63, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69,
|
||||
0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x73,
|
||||
0x5f, 0x6d, 0x71, 0x74, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x4d, 0x71, 0x74, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x73,
|
||||
0x6c, 0x6f, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x53, 0x79, 0x73, 0x6c, 0x6f, 0x67, 0x43, 0x6f, 0x6e,
|
||||
0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x19, 0x42, 0x6c, 0x75, 0x65, 0x74, 0x6f,
|
||||
0x6f, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x73, 0x73, 0x69, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x73, 0x73, 0x69, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f,
|
||||
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x4f, 0x0a, 0x16,
|
||||
0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x61, 0x75, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x62, 0x61, 0x75, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73,
|
||||
0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x42, 0x8c, 0x01,
|
||||
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e,
|
||||
0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e,
|
||||
0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_connection_status_proto_rawDescOnce sync.Once
|
||||
file_protobufs_connection_status_proto_rawDescData = file_protobufs_connection_status_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_connection_status_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_connection_status_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_connection_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_connection_status_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_connection_status_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_connection_status_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_protobufs_connection_status_proto_goTypes = []interface{}{
|
||||
(*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_protobufs_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_protobufs_connection_status_proto_init() }
|
||||
func file_protobufs_connection_status_proto_init() {
|
||||
if File_protobufs_connection_status_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_connection_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WifiConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EthernetConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NetworkConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BluetoothConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SerialConnectionStatus); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_protobufs_connection_status_proto_msgTypes[0].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_connection_status_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_connection_status_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_connection_status_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_connection_status_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_connection_status_proto = out.File
|
||||
file_protobufs_connection_status_proto_rawDesc = nil
|
||||
file_protobufs_connection_status_proto_goTypes = nil
|
||||
file_protobufs_connection_status_proto_depIdxs = nil
|
||||
}
|
120
meshtastic/protobufs/connection_status.proto
Normal file
120
meshtastic/protobufs/connection_status.proto
Normal file
|
@ -0,0 +1,120 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
619
meshtastic/protobufs/device_ui.pb.go
Normal file
619
meshtastic/protobufs/device_ui.pb.go
Normal file
|
@ -0,0 +1,619 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/device_ui.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type 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_protobufs_device_ui_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Theme) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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
|
||||
)
|
||||
|
||||
// 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",
|
||||
}
|
||||
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,
|
||||
}
|
||||
)
|
||||
|
||||
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_protobufs_device_ui_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (Language) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_device_ui_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type DeviceUIConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// TFT display brightness 1..255
|
||||
ScreenBrightness uint32 `protobuf:"varint,1,opt,name=screen_brightness,json=screenBrightness,proto3" json:"screen_brightness,omitempty"`
|
||||
// Screen timeout 0..900
|
||||
ScreenTimeout uint32 `protobuf:"varint,2,opt,name=screen_timeout,json=screenTimeout,proto3" json:"screen_timeout,omitempty"`
|
||||
// Screen lock enabled
|
||||
ScreenLock bool `protobuf:"varint,3,opt,name=screen_lock,json=screenLock,proto3" json:"screen_lock,omitempty"`
|
||||
// Color theme
|
||||
Theme Theme `protobuf:"varint,4,opt,name=theme,proto3,enum=meshtastic.Theme" json:"theme,omitempty"`
|
||||
// Audible message alert enabled
|
||||
AlertEnabled bool `protobuf:"varint,5,opt,name=alert_enabled,json=alertEnabled,proto3" json:"alert_enabled,omitempty"`
|
||||
// Localization
|
||||
Language Language `protobuf:"varint,6,opt,name=language,proto3,enum=meshtastic.Language" json:"language,omitempty"`
|
||||
// Node list filter
|
||||
NodeFilter *NodeFilter `protobuf:"bytes,7,opt,name=node_filter,json=nodeFilter,proto3" json:"node_filter,omitempty"`
|
||||
// Node list highlightening
|
||||
NodeHighlight *NodeHighlight `protobuf:"bytes,8,opt,name=node_highlight,json=nodeHighlight,proto3" json:"node_highlight,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeviceUIConfig) Reset() {
|
||||
*x = DeviceUIConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_device_ui_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceUIConfig.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceUIConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_device_ui_proto_rawDescGZIP(), []int{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) 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) 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
|
||||
}
|
||||
|
||||
type NodeFilter struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *NodeFilter) Reset() {
|
||||
*x = NodeFilter{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_device_ui_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NodeFilter.ProtoReflect.Descriptor instead.
|
||||
func (*NodeFilter) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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 ""
|
||||
}
|
||||
|
||||
type NodeHighlight struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *NodeHighlight) Reset() {
|
||||
*x = NodeHighlight{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_device_ui_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NodeHighlight.ProtoReflect.Descriptor instead.
|
||||
func (*NodeHighlight) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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 ""
|
||||
}
|
||||
|
||||
var File_protobufs_device_ui_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_device_ui_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x5f, 0x75, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0x80, 0x03, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x55, 0x49, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x63,
|
||||
0x72, 0x65, 0x65, 0x6e, 0x5f, 0x62, 0x72, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x42, 0x72, 0x69,
|
||||
0x67, 0x68, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x72, 0x65, 0x65,
|
||||
0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0d, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x1f,
|
||||
0x0a, 0x0b, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x12,
|
||||
0x27, 0x0a, 0x05, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x54, 0x68, 0x65, 0x6d,
|
||||
0x65, 0x52, 0x05, 0x74, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x6c, 0x65, 0x72,
|
||||
0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0c, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x30, 0x0a,
|
||||
0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x14, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4c, 0x61, 0x6e,
|
||||
0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12,
|
||||
0x37, 0x0a, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65,
|
||||
0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4e, 0x6f,
|
||||
0x64, 0x65, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x52, 0x0d, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x48, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x22, 0xe9, 0x01, 0x0a, 0x0a, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x6b,
|
||||
0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x0d, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
|
||||
0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x77, 0x69, 0x74,
|
||||
0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e,
|
||||
0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, 0x69,
|
||||
0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x53, 0x77, 0x69,
|
||||
0x74, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x70, 0x73, 0x5f, 0x61, 0x77, 0x61, 0x79,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x73, 0x41, 0x77, 0x61, 0x79,
|
||||
0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x77, 0x69,
|
||||
0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f,
|
||||
0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x48,
|
||||
0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x74,
|
||||
0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63,
|
||||
0x68, 0x61, 0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x77, 0x69, 0x74,
|
||||
0x63, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x5f,
|
||||
0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x74, 0x65,
|
||||
0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x0a,
|
||||
0x0a, 0x69, 0x61, 0x71, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x69, 0x61, 0x71, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x1b, 0x0a, 0x09,
|
||||
0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0x25, 0x0a, 0x05, 0x54, 0x68, 0x65,
|
||||
0x6d, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x52, 0x4b, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
|
||||
0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x52, 0x45, 0x44, 0x10, 0x02,
|
||||
0x2a, 0x8c, 0x01, 0x0a, 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x0b, 0x0a,
|
||||
0x07, 0x45, 0x4e, 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52,
|
||||
0x45, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x45, 0x52, 0x4d, 0x41, 0x4e,
|
||||
0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x54, 0x41, 0x4c, 0x49, 0x41, 0x4e, 0x10, 0x03, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x50, 0x4f, 0x52, 0x54, 0x55, 0x47, 0x55, 0x45, 0x53, 0x45, 0x10, 0x04, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x53, 0x50, 0x41, 0x4e, 0x49, 0x53, 0x48, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x53, 0x57, 0x45, 0x44, 0x49, 0x53, 0x48, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x49, 0x4e,
|
||||
0x4e, 0x49, 0x53, 0x48, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x4f, 0x4c, 0x49, 0x53, 0x48,
|
||||
0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x55, 0x52, 0x4b, 0x49, 0x53, 0x48, 0x10, 0x09, 0x42,
|
||||
0x8a, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c,
|
||||
0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x55,
|
||||
0x49, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e,
|
||||
0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e,
|
||||
0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_device_ui_proto_rawDescOnce sync.Once
|
||||
file_protobufs_device_ui_proto_rawDescData = file_protobufs_device_ui_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_device_ui_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_device_ui_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_device_ui_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_device_ui_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_device_ui_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_device_ui_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_protobufs_device_ui_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_protobufs_device_ui_proto_goTypes = []interface{}{
|
||||
(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
|
||||
}
|
||||
var file_protobufs_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
|
||||
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_protobufs_device_ui_proto_init() }
|
||||
func file_protobufs_device_ui_proto_init() {
|
||||
if File_protobufs_device_ui_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_device_ui_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceUIConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_device_ui_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NodeFilter); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_device_ui_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NodeHighlight); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_device_ui_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_device_ui_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_device_ui_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_device_ui_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_device_ui_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_device_ui_proto = out.File
|
||||
file_protobufs_device_ui_proto_rawDesc = nil
|
||||
file_protobufs_device_ui_proto_goTypes = nil
|
||||
file_protobufs_device_ui_proto_depIdxs = nil
|
||||
}
|
188
meshtastic/protobufs/device_ui.proto
Normal file
188
meshtastic/protobufs/device_ui.proto
Normal file
|
@ -0,0 +1,188 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
option java_outer_classname = "DeviceUIProtos";
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option swift_prefix = "";
|
||||
|
||||
/*
|
||||
* Protobuf structures for device-ui persistency
|
||||
*/
|
||||
|
||||
message DeviceUIConfig {
|
||||
/*
|
||||
* TFT display brightness 1..255
|
||||
*/
|
||||
uint32 screen_brightness = 1;
|
||||
|
||||
/*
|
||||
* Screen timeout 0..900
|
||||
*/
|
||||
uint32 screen_timeout = 2;
|
||||
|
||||
/*
|
||||
* Screen lock enabled
|
||||
*/
|
||||
bool screen_lock = 3;
|
||||
|
||||
/*
|
||||
* Color theme
|
||||
*/
|
||||
Theme theme = 4;
|
||||
|
||||
/*
|
||||
* Audible message alert enabled
|
||||
*/
|
||||
bool alert_enabled = 5;
|
||||
|
||||
/*
|
||||
* Localization
|
||||
*/
|
||||
Language language = 6;
|
||||
|
||||
/*
|
||||
* Node list filter
|
||||
*/
|
||||
NodeFilter node_filter = 7;
|
||||
|
||||
/*
|
||||
* Node list highlightening
|
||||
*/
|
||||
NodeHighlight node_highlight = 8;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
825
meshtastic/protobufs/deviceonly.pb.go
Normal file
825
meshtastic/protobufs/deviceonly.pb.go
Normal file
|
@ -0,0 +1,825 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/deviceonly.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Position with static location information only for NodeDBLite
|
||||
type PositionLite struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *PositionLite) Reset() {
|
||||
*x = PositionLite{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_deviceonly_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PositionLite.ProtoReflect.Descriptor instead.
|
||||
func (*PositionLite) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// This is the addr of the radio.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
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"`
|
||||
}
|
||||
|
||||
func (x *UserLite) Reset() {
|
||||
*x = UserLite{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_deviceonly_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UserLite.ProtoReflect.Descriptor instead.
|
||||
func (*UserLite) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_deviceonly_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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 adjacent)
|
||||
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"`
|
||||
}
|
||||
|
||||
func (x *NodeInfoLite) Reset() {
|
||||
*x = NodeInfoLite{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_deviceonly_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NodeInfoLite.ProtoReflect.Descriptor instead.
|
||||
func (*NodeInfoLite) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
}
|
||||
|
||||
// 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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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: Do not use.
|
||||
NoSave bool `protobuf:"varint,9,opt,name=no_save,json=noSave,proto3" json:"no_save,omitempty"`
|
||||
// Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset.
|
||||
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"`
|
||||
// New lite version of NodeDB to decrease memory footprint
|
||||
NodeDbLite []*NodeInfoLite `protobuf:"bytes,14,rep,name=node_db_lite,json=nodeDbLite,proto3" json:"node_db_lite,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeviceState) Reset() {
|
||||
*x = DeviceState{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_deviceonly_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeviceState.ProtoReflect.Descriptor instead.
|
||||
func (*DeviceState) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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: Do not use.
|
||||
func (x *DeviceState) GetNoSave() bool {
|
||||
if x != nil {
|
||||
return x.NoSave
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
func (x *DeviceState) GetNodeDbLite() []*NodeInfoLite {
|
||||
if x != nil {
|
||||
return x.NodeDbLite
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// The on-disk saved channels
|
||||
type ChannelFile struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *ChannelFile) Reset() {
|
||||
*x = ChannelFile{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_deviceonly_proto_msgTypes[4]
|
||||
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_protobufs_deviceonly_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ChannelFile.ProtoReflect.Descriptor instead.
|
||||
func (*ChannelFile) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_deviceonly_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
var File_protobufs_deviceonly_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_deviceonly_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x1a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x73, 0x2f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x73, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x22, 0xc7, 0x01, 0x0a, 0x0c, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c,
|
||||
0x69, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x5f,
|
||||
0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x09, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64,
|
||||
0x65, 0x49, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x5f,
|
||||
0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x49, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x07, 0x52, 0x04, 0x74,
|
||||
0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0e, 0x6c, 0x6f,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x94, 0x02, 0x0a,
|
||||
0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x61, 0x63,
|
||||
0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07,
|
||||
0x6d, 0x61, 0x63, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x5f,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61,
|
||||
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x68, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x52, 0x07, 0x68, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f,
|
||||
0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
|
||||
0x69, 0x73, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x04, 0x72, 0x6f,
|
||||
0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04,
|
||||
0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
|
||||
0x4b, 0x65, 0x79, 0x22, 0xf9, 0x02, 0x0a, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x4c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x74, 0x65, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72,
|
||||
0x12, 0x34, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x74, 0x65, 0x52, 0x08, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x6e, 0x72, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x02, 0x52, 0x03, 0x73, 0x6e, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x73, 0x74,
|
||||
0x5f, 0x68, 0x65, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x07, 0x52, 0x09, 0x6c, 0x61,
|
||||
0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x19, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x0d, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61,
|
||||
0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x6e, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x69, 0x61, 0x5f, 0x6d, 0x71, 0x74, 0x74, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x61, 0x4d, 0x71, 0x74, 0x74, 0x12, 0x20,
|
||||
0x0a, 0x09, 0x68, 0x6f, 0x70, 0x73, 0x5f, 0x61, 0x77, 0x61, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x70, 0x73, 0x41, 0x77, 0x61, 0x79, 0x88, 0x01, 0x01,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x18,
|
||||
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x61, 0x76, 0x6f, 0x72, 0x69, 0x74,
|
||||
0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x5f, 0x61, 0x77, 0x61, 0x79, 0x22,
|
||||
0xbd, 0x04, 0x0a, 0x0b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
|
||||
0x2f, 0x0a, 0x07, 0x6d, 0x79, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x79,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x79, 0x4e, 0x6f, 0x64, 0x65,
|
||||
0x12, 0x26, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x10, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x55, 0x73, 0x65,
|
||||
0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x63, 0x65,
|
||||
0x69, 0x76, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x65, 0x73,
|
||||
0x68, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x3e, 0x0a, 0x0f, 0x72, 0x78, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x52, 0x0d, 0x72, 0x78, 0x54, 0x65, 0x78, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||
0x1b, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x73, 0x61, 0x76, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
|
||||
0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6e, 0x6f, 0x53, 0x61, 0x76, 0x65, 0x12, 0x22, 0x0a, 0x0d,
|
||||
0x64, 0x69, 0x64, 0x5f, 0x67, 0x70, 0x73, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x69, 0x64, 0x47, 0x70, 0x73, 0x52, 0x65, 0x73, 0x65, 0x74,
|
||||
0x12, 0x37, 0x0a, 0x0b, 0x72, 0x78, 0x5f, 0x77, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18,
|
||||
0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0a, 0x72,
|
||||
0x78, 0x57, 0x61, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5c, 0x0a, 0x19, 0x6e, 0x6f, 0x64,
|
||||
0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72,
|
||||
0x65, 0x5f, 0x70, 0x69, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x74, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x50, 0x69, 0x6e, 0x52,
|
||||
0x16, 0x6e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77,
|
||||
0x61, 0x72, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x12, 0x66, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x5f,
|
||||
0x64, 0x62, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x74, 0x65, 0x42, 0x2a, 0x92, 0x3f, 0x27, 0x92, 0x01, 0x24, 0x73,
|
||||
0x74, 0x64, 0x3a, 0x3a, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3c, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69,
|
||||
0x74, 0x65, 0x3e, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x44, 0x62, 0x4c, 0x69, 0x74, 0x65, 0x22,
|
||||
0x58, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x2f,
|
||||
0x0a, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x13, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x68,
|
||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x08, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x94, 0x01, 0x0a, 0x13, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x42, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x5a, 0x49, 0x67,
|
||||
0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
|
||||
0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba,
|
||||
0x02, 0x00, 0x92, 0x3f, 0x0b, 0xc2, 0x01, 0x08, 0x3c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x3e,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_deviceonly_proto_rawDescOnce sync.Once
|
||||
file_protobufs_deviceonly_proto_rawDescData = file_protobufs_deviceonly_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_deviceonly_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_deviceonly_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_deviceonly_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_deviceonly_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_deviceonly_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_deviceonly_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_protobufs_deviceonly_proto_goTypes = []interface{}{
|
||||
(*PositionLite)(nil), // 0: meshtastic.PositionLite
|
||||
(*UserLite)(nil), // 1: meshtastic.UserLite
|
||||
(*NodeInfoLite)(nil), // 2: meshtastic.NodeInfoLite
|
||||
(*DeviceState)(nil), // 3: meshtastic.DeviceState
|
||||
(*ChannelFile)(nil), // 4: meshtastic.ChannelFile
|
||||
(Position_LocSource)(0), // 5: meshtastic.Position.LocSource
|
||||
(HardwareModel)(0), // 6: meshtastic.HardwareModel
|
||||
(Config_DeviceConfig_Role)(0), // 7: meshtastic.Config.DeviceConfig.Role
|
||||
(*DeviceMetrics)(nil), // 8: meshtastic.DeviceMetrics
|
||||
(*MyNodeInfo)(nil), // 9: meshtastic.MyNodeInfo
|
||||
(*User)(nil), // 10: meshtastic.User
|
||||
(*MeshPacket)(nil), // 11: meshtastic.MeshPacket
|
||||
(*NodeRemoteHardwarePin)(nil), // 12: meshtastic.NodeRemoteHardwarePin
|
||||
(*Channel)(nil), // 13: meshtastic.Channel
|
||||
}
|
||||
var file_protobufs_deviceonly_proto_depIdxs = []int32{
|
||||
5, // 0: meshtastic.PositionLite.location_source:type_name -> meshtastic.Position.LocSource
|
||||
6, // 1: meshtastic.UserLite.hw_model:type_name -> meshtastic.HardwareModel
|
||||
7, // 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
|
||||
8, // 5: meshtastic.NodeInfoLite.device_metrics:type_name -> meshtastic.DeviceMetrics
|
||||
9, // 6: meshtastic.DeviceState.my_node:type_name -> meshtastic.MyNodeInfo
|
||||
10, // 7: meshtastic.DeviceState.owner:type_name -> meshtastic.User
|
||||
11, // 8: meshtastic.DeviceState.receive_queue:type_name -> meshtastic.MeshPacket
|
||||
11, // 9: meshtastic.DeviceState.rx_text_message:type_name -> meshtastic.MeshPacket
|
||||
11, // 10: meshtastic.DeviceState.rx_waypoint:type_name -> meshtastic.MeshPacket
|
||||
12, // 11: meshtastic.DeviceState.node_remote_hardware_pins:type_name -> meshtastic.NodeRemoteHardwarePin
|
||||
2, // 12: meshtastic.DeviceState.node_db_lite:type_name -> meshtastic.NodeInfoLite
|
||||
13, // 13: meshtastic.ChannelFile.channels:type_name -> meshtastic.Channel
|
||||
14, // [14:14] is the sub-list for method output_type
|
||||
14, // [14:14] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_protobufs_deviceonly_proto_init() }
|
||||
func file_protobufs_deviceonly_proto_init() {
|
||||
if File_protobufs_deviceonly_proto != nil {
|
||||
return
|
||||
}
|
||||
file_protobufs_channel_proto_init()
|
||||
file_protobufs_mesh_proto_init()
|
||||
file_protobufs_telemetry_proto_init()
|
||||
file_protobufs_config_proto_init()
|
||||
file_protobufs_nanopb_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_deviceonly_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PositionLite); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_deviceonly_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserLite); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_deviceonly_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NodeInfoLite); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_deviceonly_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceState); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_deviceonly_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChannelFile); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_protobufs_deviceonly_proto_msgTypes[2].OneofWrappers = []interface{}{}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_deviceonly_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_deviceonly_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_deviceonly_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_deviceonly_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_deviceonly_proto = out.File
|
||||
file_protobufs_deviceonly_proto_rawDesc = nil
|
||||
file_protobufs_deviceonly_proto_goTypes = nil
|
||||
file_protobufs_deviceonly_proto_depIdxs = nil
|
||||
}
|
234
meshtastic/protobufs/deviceonly.proto
Normal file
234
meshtastic/protobufs/deviceonly.proto
Normal file
|
@ -0,0 +1,234 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/channel.proto";
|
||||
import "protobufs/mesh.proto";
|
||||
import "protobufs/telemetry.proto";
|
||||
import "protobufs/config.proto";
|
||||
import "protobufs/nanopb.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
option java_outer_classname = "DeviceOnly";
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option swift_prefix = "";
|
||||
option (nanopb_fileopt).include = "<vector>";
|
||||
|
||||
|
||||
/*
|
||||
* 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 adjacent)
|
||||
*/
|
||||
optional uint32 hops_away = 9;
|
||||
|
||||
/*
|
||||
* True if node is in our favorites list
|
||||
* Persists between NodeDB internal clean ups
|
||||
*/
|
||||
bool is_favorite = 10;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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];
|
||||
|
||||
/*
|
||||
* Some GPS receivers seem to have bogus settings from the factory, so we always do one factory reset.
|
||||
*/
|
||||
bool did_gps_reset = 11;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/*
|
||||
* New lite version of NodeDB to decrease memory footprint
|
||||
*/
|
||||
repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
550
meshtastic/protobufs/localonly.pb.go
Normal file
550
meshtastic/protobufs/localonly.pb.go
Normal file
|
@ -0,0 +1,550 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/localonly.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type LocalConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *LocalConfig) Reset() {
|
||||
*x = LocalConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_localonly_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LocalConfig.ProtoReflect.Descriptor instead.
|
||||
func (*LocalConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *LocalModuleConfig) Reset() {
|
||||
*x = LocalModuleConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_localonly_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use LocalModuleConfig.ProtoReflect.Descriptor instead.
|
||||
func (*LocalModuleConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_localonly_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_localonly_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x61,
|
||||
0x6c, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
|
||||
0x1d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81,
|
||||
0x04, 0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37,
|
||||
0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
|
||||
0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x07,
|
||||
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
|
||||
0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x3a, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x70,
|
||||
0x6c, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x69,
|
||||
0x73, 0x70, 0x6c, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x64, 0x69, 0x73,
|
||||
0x70, 0x6c, 0x61, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x6c, 0x6f, 0x72, 0x61, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x52, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x52, 0x04, 0x6c, 0x6f, 0x72, 0x61, 0x12, 0x40, 0x0a, 0x09, 0x62, 0x6c, 0x75, 0x65, 0x74,
|
||||
0x6f, 0x6f, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x42,
|
||||
0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09,
|
||||
0x62, 0x6c, 0x75, 0x65, 0x74, 0x6f, 0x6f, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18,
|
||||
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69,
|
||||
0x74, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
|
||||
0x74, 0x79, 0x22, 0xae, 0x08, 0x0a, 0x11, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x71, 0x74, 0x74,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x2e, 0x4d, 0x51, 0x54, 0x54, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x04, 0x6d, 0x71, 0x74,
|
||||
0x74, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x65, 0x72, 0x69,
|
||||
0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c,
|
||||
0x12, 0x68, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x74,
|
||||
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x33, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e,
|
||||
0x61, 0x6c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x52, 0x14, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4e, 0x6f,
|
||||
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, 0x0d, 0x73, 0x74,
|
||||
0x6f, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x47, 0x0a, 0x0a,
|
||||
0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x28, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65,
|
||||
0x54, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x72, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x54, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74,
|
||||
0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x2e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x53, 0x0a,
|
||||
0x0e, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
|
||||
0x43, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d,
|
||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x75, 0x64, 0x69,
|
||||
0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x12, 0x56,
|
||||
0x0a, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72,
|
||||
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x48, 0x61,
|
||||
0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62,
|
||||
0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6e, 0x65, 0x69, 0x67,
|
||||
0x68, 0x62, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x59, 0x0a, 0x10, 0x61, 0x6d, 0x62, 0x69,
|
||||
0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x6d, 0x62,
|
||||
0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x0f, 0x61, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x67, 0x68, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x12, 0x59, 0x0a, 0x10, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x64,
|
||||
0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x12, 0x49,
|
||||
0x0a, 0x0a, 0x70, 0x61, 0x78, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e,
|
||||
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x50, 0x61, 0x78,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x70,
|
||||
0x61, 0x78, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x8b, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b,
|
||||
0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0f, 0x4c, 0x6f, 0x63,
|
||||
0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69,
|
||||
0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d,
|
||||
0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02,
|
||||
0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_localonly_proto_rawDescOnce sync.Once
|
||||
file_protobufs_localonly_proto_rawDescData = file_protobufs_localonly_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_localonly_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_localonly_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_localonly_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_localonly_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_localonly_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_localonly_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_protobufs_localonly_proto_goTypes = []interface{}{
|
||||
(*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_protobufs_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_protobufs_localonly_proto_init() }
|
||||
func file_protobufs_localonly_proto_init() {
|
||||
if File_protobufs_localonly_proto != nil {
|
||||
return
|
||||
}
|
||||
file_protobufs_config_proto_init()
|
||||
file_protobufs_module_config_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_localonly_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LocalConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_localonly_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LocalModuleConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_localonly_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_localonly_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_localonly_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_localonly_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_localonly_proto = out.File
|
||||
file_protobufs_localonly_proto_rawDesc = nil
|
||||
file_protobufs_localonly_proto_goTypes = nil
|
||||
file_protobufs_localonly_proto_depIdxs = nil
|
||||
}
|
140
meshtastic/protobufs/localonly.proto
Normal file
140
meshtastic/protobufs/localonly.proto
Normal file
|
@ -0,0 +1,140 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/config.proto";
|
||||
import "protobufs/module_config.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
5014
meshtastic/protobufs/mesh.pb.go
Normal file
5014
meshtastic/protobufs/mesh.pb.go
Normal file
File diff suppressed because it is too large
Load diff
1949
meshtastic/protobufs/mesh.proto
Normal file
1949
meshtastic/protobufs/mesh.proto
Normal file
File diff suppressed because it is too large
Load diff
2964
meshtastic/protobufs/module_config.pb.go
Normal file
2964
meshtastic/protobufs/module_config.pb.go
Normal file
File diff suppressed because it is too large
Load diff
843
meshtastic/protobufs/module_config.proto
Normal file
843
meshtastic/protobufs/module_config.proto
Normal file
|
@ -0,0 +1,843 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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 to the mesh
|
||||
*/
|
||||
uint32 update_interval = 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
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;
|
||||
}
|
403
meshtastic/protobufs/mqtt.pb.go
Normal file
403
meshtastic/protobufs/mqtt.pb.go
Normal file
|
@ -0,0 +1,403 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/mqtt.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
type ServiceEnvelope struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *ServiceEnvelope) Reset() {
|
||||
*x = ServiceEnvelope{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_mqtt_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ServiceEnvelope.ProtoReflect.Descriptor instead.
|
||||
func (*ServiceEnvelope) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *MapReport) Reset() {
|
||||
*x = MapReport{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_mqtt_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use MapReport.ProtoReflect.Descriptor instead.
|
||||
func (*MapReport) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_mqtt_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_mqtt_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6d, 0x71, 0x74, 0x74,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x1a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x63, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x7f, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x76, 0x65, 0x6c,
|
||||
0x6f, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x4d, 0x65, 0x73, 0x68, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x70, 0x61, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c,
|
||||
0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49,
|
||||
0x64, 0x22, 0xe2, 0x04, 0x0a, 0x09, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12,
|
||||
0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x6e, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
|
||||
0x73, 0x68, 0x6f, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x04, 0x72,
|
||||
0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
|
||||
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x08, 0x68, 0x77, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4d, 0x6f, 0x64,
|
||||
0x65, 0x6c, 0x52, 0x07, 0x68, 0x77, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x66,
|
||||
0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x52, 0x61, 0x43,
|
||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65,
|
||||
0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6d, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29,
|
||||
0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x52, 0x61, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4d, 0x6f,
|
||||
0x64, 0x65, 0x6d, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x65, 0x6d,
|
||||
0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x68, 0x61, 0x73, 0x5f, 0x64, 0x65,
|
||||
0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x08, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x11, 0x68, 0x61, 0x73, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43,
|
||||
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x5f, 0x69, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x09, 0x6c, 0x61, 0x74, 0x69,
|
||||
0x74, 0x75, 0x64, 0x65, 0x49, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x5f, 0x69, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x0a, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x69, 0x74, 0x75, 0x64, 0x65, 0x49, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75,
|
||||
0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70,
|
||||
0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x33, 0x0a, 0x16, 0x6e, 0x75, 0x6d, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x5f,
|
||||
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x13, 0x6e, 0x75, 0x6d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4c, 0x6f, 0x63, 0x61,
|
||||
0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x42, 0x86, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
|
||||
0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0a,
|
||||
0x4d, 0x51, 0x54, 0x54, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e,
|
||||
0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f,
|
||||
0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74,
|
||||
0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_mqtt_proto_rawDescOnce sync.Once
|
||||
file_protobufs_mqtt_proto_rawDescData = file_protobufs_mqtt_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_mqtt_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_mqtt_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_mqtt_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_mqtt_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_mqtt_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_mqtt_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_protobufs_mqtt_proto_goTypes = []interface{}{
|
||||
(*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_protobufs_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_protobufs_mqtt_proto_init() }
|
||||
func file_protobufs_mqtt_proto_init() {
|
||||
if File_protobufs_mqtt_proto != nil {
|
||||
return
|
||||
}
|
||||
file_protobufs_config_proto_init()
|
||||
file_protobufs_mesh_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_mqtt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ServiceEnvelope); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_mqtt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MapReport); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_mqtt_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_mqtt_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_mqtt_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_mqtt_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_mqtt_proto = out.File
|
||||
file_protobufs_mqtt_proto_rawDesc = nil
|
||||
file_protobufs_mqtt_proto_goTypes = nil
|
||||
file_protobufs_mqtt_proto_depIdxs = nil
|
||||
}
|
106
meshtastic/protobufs/mqtt.proto
Normal file
106
meshtastic/protobufs/mqtt.proto
Normal file
|
@ -0,0 +1,106 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
import "protobufs/config.proto";
|
||||
import "protobufs/mesh.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
919
meshtastic/protobufs/nanopb.pb.go
Normal file
919
meshtastic/protobufs/nanopb.pb.go
Normal file
|
@ -0,0 +1,919 @@
|
|||
// 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.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/nanopb.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
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_protobufs_nanopb_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (FieldType) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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_protobufs_nanopb_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (IntSize) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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_protobufs_nanopb_proto_enumTypes[2].Descriptor()
|
||||
}
|
||||
|
||||
func (TypenameMangling) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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_protobufs_nanopb_proto_enumTypes[3].Descriptor()
|
||||
}
|
||||
|
||||
func (DescriptorSize) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
// 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{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_nanopb_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use NanoPBOptions.ProtoReflect.Descriptor instead.
|
||||
func (*NanoPBOptions) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_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: "protobufs/nanopb.proto",
|
||||
},
|
||||
{
|
||||
ExtendedType: (*descriptorpb.MessageOptions)(nil),
|
||||
ExtensionType: (*NanoPBOptions)(nil),
|
||||
Field: 1010,
|
||||
Name: "nanopb_msgopt",
|
||||
Tag: "bytes,1010,opt,name=nanopb_msgopt",
|
||||
Filename: "protobufs/nanopb.proto",
|
||||
},
|
||||
{
|
||||
ExtendedType: (*descriptorpb.EnumOptions)(nil),
|
||||
ExtensionType: (*NanoPBOptions)(nil),
|
||||
Field: 1010,
|
||||
Name: "nanopb_enumopt",
|
||||
Tag: "bytes,1010,opt,name=nanopb_enumopt",
|
||||
Filename: "protobufs/nanopb.proto",
|
||||
},
|
||||
{
|
||||
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||
ExtensionType: (*NanoPBOptions)(nil),
|
||||
Field: 1010,
|
||||
Name: "nanopb",
|
||||
Tag: "bytes,1010,opt,name=nanopb",
|
||||
Filename: "protobufs/nanopb.proto",
|
||||
},
|
||||
}
|
||||
|
||||
// Extension fields to descriptorpb.FileOptions.
|
||||
var (
|
||||
// optional NanoPBOptions nanopb_fileopt = 1010;
|
||||
E_NanopbFileopt = &file_protobufs_nanopb_proto_extTypes[0]
|
||||
)
|
||||
|
||||
// Extension fields to descriptorpb.MessageOptions.
|
||||
var (
|
||||
// optional NanoPBOptions nanopb_msgopt = 1010;
|
||||
E_NanopbMsgopt = &file_protobufs_nanopb_proto_extTypes[1]
|
||||
)
|
||||
|
||||
// Extension fields to descriptorpb.EnumOptions.
|
||||
var (
|
||||
// optional NanoPBOptions nanopb_enumopt = 1010;
|
||||
E_NanopbEnumopt = &file_protobufs_nanopb_proto_extTypes[2]
|
||||
)
|
||||
|
||||
// Extension fields to descriptorpb.FieldOptions.
|
||||
var (
|
||||
// optional NanoPBOptions nanopb = 1010;
|
||||
E_Nanopb = &file_protobufs_nanopb_proto_extTypes[3]
|
||||
)
|
||||
|
||||
var File_protobufs_nanopb_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_nanopb_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x6e, 0x61, 0x6e, 0x6f,
|
||||
0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x86, 0x0a, 0x0a, 0x0d, 0x4e,
|
||||
0x61, 0x6e, 0x6f, 0x50, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08,
|
||||
0x6d, 0x61, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||
0x6d, 0x61, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c,
|
||||
0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78,
|
||||
0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x49, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x3a,
|
||||
0x0a, 0x49, 0x53, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x52, 0x07, 0x69, 0x6e, 0x74,
|
||||
0x53, 0x69, 0x7a, 0x65, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0a,
|
||||
0x46, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||
0x12, 0x23, 0x0a, 0x0a, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f,
|
||||
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61,
|
||||
0x6c, 0x73, 0x65, 0x52, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63,
|
||||
0x74, 0x12, 0x26, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x75, 0x6d,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x70,
|
||||
0x61, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0c, 0x73, 0x6b, 0x69,
|
||||
0x70, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a,
|
||||
0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x73, 0x6b, 0x69, 0x70, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x08, 0x6e,
|
||||
0x6f, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x69, 0x64,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x69, 0x64, 0x12, 0x2e, 0x0a,
|
||||
0x0f, 0x61, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
|
||||
0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x61,
|
||||
0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x0a,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x12, 0x37, 0x0a, 0x14,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x5f,
|
||||
0x6d, 0x73, 0x67, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73,
|
||||
0x65, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x53, 0x69, 0x6e, 0x67, 0x75, 0x6c, 0x61,
|
||||
0x72, 0x4d, 0x73, 0x67, 0x73, 0x12, 0x2b, 0x0a, 0x0e, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x6f,
|
||||
0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x52, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x6f, 0x53, 0x74, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x12, 0x28, 0x0a, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x6e, 0x67,
|
||||
0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52,
|
||||
0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x26, 0x0a, 0x0b,
|
||||
0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28,
|
||||
0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x43,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6d, 0x73, 0x67, 0x5f, 0x63,
|
||||
0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x6c,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x12, 0x3c, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x54, 0x79, 0x70,
|
||||
0x65, 0x6e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x6e, 0x67, 0x6c, 0x69, 0x6e, 0x67, 0x3a, 0x06, 0x4d,
|
||||
0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x52, 0x0b, 0x6d, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x12, 0x3a, 0x0a, 0x11, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64,
|
||||
0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x0d, 0x70,
|
||||
0x62, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x52, 0x10, 0x63, 0x61,
|
||||
0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, 0x46,
|
||||
0x0a, 0x11, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x3a, 0x19, 0x70, 0x62, 0x5f, 0x64, 0x65,
|
||||
0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x61, 0x6c, 0x6c,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x46, 0x75,
|
||||
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x6f, 0x72, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f,
|
||||
0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x3a,
|
||||
0x07, 0x44, 0x53, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x52, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
|
||||
0x70, 0x74, 0x6f, 0x72, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x26, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x61, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x18, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x07, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78,
|
||||
0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x63,
|
||||
0x6c, 0x75, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18,
|
||||
0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x4f,
|
||||
0x0a, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x18,
|
||||
0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73,
|
||||
0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70,
|
||||
0x65, 0x52, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12,
|
||||
0x24, 0x0a, 0x0b, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x1c,
|
||||
0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74,
|
||||
0x42, 0x79, 0x54, 0x61, 0x67, 0x12, 0x3c, 0x0a, 0x0d, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x46,
|
||||
0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x0b, 0x46, 0x54, 0x5f, 0x43, 0x41, 0x4c,
|
||||
0x4c, 0x42, 0x41, 0x43, 0x4b, 0x52, 0x0c, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x54,
|
||||
0x79, 0x70, 0x65, 0x2a, 0x69, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x54, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10,
|
||||
0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x54, 0x5f, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x10,
|
||||
0x04, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x03, 0x12,
|
||||
0x0d, 0x0a, 0x09, 0x46, 0x54, 0x5f, 0x49, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x05, 0x2a, 0x44,
|
||||
0x0a, 0x07, 0x49, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x53, 0x5f,
|
||||
0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x53, 0x5f,
|
||||
0x38, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x53, 0x5f, 0x31, 0x36, 0x10, 0x10, 0x12, 0x09,
|
||||
0x0a, 0x05, 0x49, 0x53, 0x5f, 0x33, 0x32, 0x10, 0x20, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x53, 0x5f,
|
||||
0x36, 0x34, 0x10, 0x40, 0x2a, 0x5a, 0x0a, 0x10, 0x54, 0x79, 0x70, 0x65, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x4d, 0x61, 0x6e, 0x67, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x5f, 0x4e, 0x4f,
|
||||
0x4e, 0x45, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x50, 0x5f,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x5f, 0x46,
|
||||
0x4c, 0x41, 0x54, 0x54, 0x45, 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x4d, 0x5f, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x53, 0x10, 0x03,
|
||||
0x2a, 0x45, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x69,
|
||||
0x7a, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x53, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12,
|
||||
0x08, 0x0a, 0x04, 0x44, 0x53, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x53, 0x5f,
|
||||
0x32, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x53, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x44, 0x53, 0x5f, 0x38, 0x10, 0x08, 0x3a, 0x54, 0x0a, 0x0e, 0x6e, 0x61, 0x6e, 0x6f, 0x70,
|
||||
0x62, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x6f, 0x70, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf2, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e,
|
||||
0x2e, 0x4e, 0x61, 0x6e, 0x6f, 0x50, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d,
|
||||
0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x6f, 0x70, 0x74, 0x3a, 0x55, 0x0a,
|
||||
0x0d, 0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62, 0x5f, 0x6d, 0x73, 0x67, 0x6f, 0x70, 0x74, 0x12, 0x1f,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||
0xf2, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4e, 0x61, 0x6e, 0x6f, 0x50, 0x42, 0x4f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62, 0x4d, 0x73,
|
||||
0x67, 0x6f, 0x70, 0x74, 0x3a, 0x54, 0x0a, 0x0e, 0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62, 0x5f, 0x65,
|
||||
0x6e, 0x75, 0x6d, 0x6f, 0x70, 0x74, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0xf2, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4e, 0x61,
|
||||
0x6e, 0x6f, 0x50, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x6e, 0x61, 0x6e,
|
||||
0x6f, 0x70, 0x62, 0x45, 0x6e, 0x75, 0x6d, 0x6f, 0x70, 0x74, 0x3a, 0x46, 0x0a, 0x06, 0x6e, 0x61,
|
||||
0x6e, 0x6f, 0x70, 0x62, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0xf2, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x4e, 0x61, 0x6e,
|
||||
0x6f, 0x50, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x6e, 0x61, 0x6e, 0x6f,
|
||||
0x70, 0x62, 0x42, 0x1a, 0x0a, 0x18, 0x66, 0x69, 0x2e, 0x6b, 0x61, 0x70, 0x73, 0x69, 0x2e, 0x6b,
|
||||
0x6f, 0x74, 0x69, 0x2e, 0x6a, 0x70, 0x61, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x70, 0x62,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_nanopb_proto_rawDescOnce sync.Once
|
||||
file_protobufs_nanopb_proto_rawDescData = file_protobufs_nanopb_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_nanopb_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_nanopb_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_nanopb_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_nanopb_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_nanopb_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_nanopb_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
||||
var file_protobufs_nanopb_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_nanopb_proto_goTypes = []interface{}{
|
||||
(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_protobufs_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_protobufs_nanopb_proto_init() }
|
||||
func file_protobufs_nanopb_proto_init() {
|
||||
if File_protobufs_nanopb_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_nanopb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*NanoPBOptions); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_nanopb_proto_rawDesc,
|
||||
NumEnums: 4,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 4,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_nanopb_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_nanopb_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_nanopb_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_nanopb_proto_msgTypes,
|
||||
ExtensionInfos: file_protobufs_nanopb_proto_extTypes,
|
||||
}.Build()
|
||||
File_protobufs_nanopb_proto = out.File
|
||||
file_protobufs_nanopb_proto_rawDesc = nil
|
||||
file_protobufs_nanopb_proto_goTypes = nil
|
||||
file_protobufs_nanopb_proto_depIdxs = nil
|
||||
}
|
184
meshtastic/protobufs/nanopb.proto
Normal file
184
meshtastic/protobufs/nanopb.proto
Normal file
|
@ -0,0 +1,184 @@
|
|||
// 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 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 <jpa@kapsi.fi>
|
||||
// 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;
|
||||
}
|
173
meshtastic/protobufs/paxcount.pb.go
Normal file
173
meshtastic/protobufs/paxcount.pb.go
Normal file
|
@ -0,0 +1,173 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/paxcount.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// TODO: REPLACE
|
||||
type Paxcount struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *Paxcount) Reset() {
|
||||
*x = Paxcount{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_paxcount_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Paxcount.ProtoReflect.Descriptor instead.
|
||||
func (*Paxcount) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_paxcount_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_paxcount_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x70, 0x61, 0x78, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0x48, 0x0a, 0x08, 0x50, 0x61, 0x78, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x69, 0x66, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x04, 0x77, 0x69, 0x66, 0x69, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x52, 0x03, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x42, 0x8a, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69,
|
||||
0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0e, 0x50, 0x61, 0x78, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61,
|
||||
0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69,
|
||||
0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_paxcount_proto_rawDescOnce sync.Once
|
||||
file_protobufs_paxcount_proto_rawDescData = file_protobufs_paxcount_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_paxcount_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_paxcount_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_paxcount_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_paxcount_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_paxcount_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_paxcount_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_paxcount_proto_goTypes = []interface{}{
|
||||
(*Paxcount)(nil), // 0: meshtastic.Paxcount
|
||||
}
|
||||
var file_protobufs_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_protobufs_paxcount_proto_init() }
|
||||
func file_protobufs_paxcount_proto_init() {
|
||||
if File_protobufs_paxcount_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_paxcount_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Paxcount); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_paxcount_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_paxcount_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_paxcount_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_paxcount_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_paxcount_proto = out.File
|
||||
file_protobufs_paxcount_proto_rawDesc = nil
|
||||
file_protobufs_paxcount_proto_goTypes = nil
|
||||
file_protobufs_paxcount_proto_depIdxs = nil
|
||||
}
|
29
meshtastic/protobufs/paxcount.proto
Normal file
29
meshtastic/protobufs/paxcount.proto
Normal file
|
@ -0,0 +1,29 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
341
meshtastic/protobufs/portnums.pb.go
Normal file
341
meshtastic/protobufs/portnums.pb.go
Normal file
|
@ -0,0 +1,341 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/portnums.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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
|
||||
// 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
|
||||
// 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",
|
||||
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",
|
||||
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,
|
||||
"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,
|
||||
"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_protobufs_portnums_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (PortNum) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_portnums_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_protobufs_portnums_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_portnums_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2a, 0xa2, 0x04, 0x0a, 0x07, 0x50, 0x6f, 0x72, 0x74, 0x4e,
|
||||
0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x41, 0x50,
|
||||
0x50, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53,
|
||||
0x41, 0x47, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x4d,
|
||||
0x4f, 0x54, 0x45, 0x5f, 0x48, 0x41, 0x52, 0x44, 0x57, 0x41, 0x52, 0x45, 0x5f, 0x41, 0x50, 0x50,
|
||||
0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41,
|
||||
0x50, 0x50, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x44, 0x45, 0x49, 0x4e, 0x46, 0x4f,
|
||||
0x5f, 0x41, 0x50, 0x50, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, 0x49, 0x4e,
|
||||
0x47, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x05, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x44, 0x4d, 0x49, 0x4e,
|
||||
0x5f, 0x41, 0x50, 0x50, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x4d,
|
||||
0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45,
|
||||
0x44, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x57, 0x41, 0x59, 0x50, 0x4f,
|
||||
0x49, 0x4e, 0x54, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x44,
|
||||
0x49, 0x4f, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, 0x54, 0x45,
|
||||
0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x45, 0x4e, 0x53, 0x4f, 0x52, 0x5f, 0x41, 0x50, 0x50,
|
||||
0x10, 0x0a, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x5f, 0x41, 0x50, 0x50, 0x10,
|
||||
0x20, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x50, 0x5f, 0x54, 0x55, 0x4e, 0x4e, 0x45, 0x4c, 0x5f, 0x41,
|
||||
0x50, 0x50, 0x10, 0x21, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x58, 0x43, 0x4f, 0x55, 0x4e, 0x54,
|
||||
0x45, 0x52, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x22, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x52, 0x49,
|
||||
0x41, 0x4c, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x40, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x4f, 0x52,
|
||||
0x45, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x41, 0x12,
|
||||
0x12, 0x0a, 0x0e, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x50,
|
||||
0x50, 0x10, 0x42, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x45, 0x4c, 0x45, 0x4d, 0x45, 0x54, 0x52, 0x59,
|
||||
0x5f, 0x41, 0x50, 0x50, 0x10, 0x43, 0x12, 0x0b, 0x0a, 0x07, 0x5a, 0x50, 0x53, 0x5f, 0x41, 0x50,
|
||||
0x50, 0x10, 0x44, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x49, 0x4d, 0x55, 0x4c, 0x41, 0x54, 0x4f, 0x52,
|
||||
0x5f, 0x41, 0x50, 0x50, 0x10, 0x45, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x52, 0x41, 0x43, 0x45, 0x52,
|
||||
0x4f, 0x55, 0x54, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x46, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x45,
|
||||
0x49, 0x47, 0x48, 0x42, 0x4f, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x47,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x54, 0x41, 0x4b, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10,
|
||||
0x48, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x41, 0x50, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x52, 0x54, 0x5f,
|
||||
0x41, 0x50, 0x50, 0x10, 0x49, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x53, 0x54,
|
||||
0x52, 0x45, 0x53, 0x53, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x4a, 0x12, 0x10, 0x0a, 0x0b, 0x50, 0x52,
|
||||
0x49, 0x56, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x10, 0x80, 0x02, 0x12, 0x13, 0x0a, 0x0e,
|
||||
0x41, 0x54, 0x41, 0x4b, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x45, 0x52, 0x10, 0x81,
|
||||
0x02, 0x12, 0x08, 0x0a, 0x03, 0x4d, 0x41, 0x58, 0x10, 0xff, 0x03, 0x42, 0x84, 0x01, 0x0a, 0x13,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x42, 0x08, 0x50, 0x6f, 0x72, 0x74, 0x6e, 0x75, 0x6d, 0x73, 0x5a, 0x49, 0x67,
|
||||
0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65,
|
||||
0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba,
|
||||
0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_portnums_proto_rawDescOnce sync.Once
|
||||
file_protobufs_portnums_proto_rawDescData = file_protobufs_portnums_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_portnums_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_portnums_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_portnums_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_portnums_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_portnums_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_portnums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_protobufs_portnums_proto_goTypes = []interface{}{
|
||||
(PortNum)(0), // 0: meshtastic.PortNum
|
||||
}
|
||||
var file_protobufs_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_protobufs_portnums_proto_init() }
|
||||
func file_protobufs_portnums_proto_init() {
|
||||
if File_protobufs_portnums_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_portnums_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_portnums_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_portnums_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_portnums_proto_enumTypes,
|
||||
}.Build()
|
||||
File_protobufs_portnums_proto = out.File
|
||||
file_protobufs_portnums_proto_rawDesc = nil
|
||||
file_protobufs_portnums_proto_goTypes = nil
|
||||
file_protobufs_portnums_proto_depIdxs = nil
|
||||
}
|
221
meshtastic/protobufs/portnums.proto
Normal file
221
meshtastic/protobufs/portnums.proto
Normal file
|
@ -0,0 +1,221 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
451
meshtastic/protobufs/powermon.pb.go
Normal file
451
meshtastic/protobufs/powermon.pb.go
Normal file
|
@ -0,0 +1,451 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/powermon.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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_protobufs_powermon_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (PowerMon_State) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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_protobufs_powermon_proto_enumTypes[1].Descriptor()
|
||||
}
|
||||
|
||||
func (PowerStressMessage_Opcode) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *PowerMon) Reset() {
|
||||
*x = PowerMon{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_powermon_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PowerMon.ProtoReflect.Descriptor instead.
|
||||
func (*PowerMon) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_powermon_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// PowerStress testing support via the C++ PowerStress module
|
||||
type PowerStressMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *PowerStressMessage) Reset() {
|
||||
*x = PowerStressMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_powermon_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use PowerStressMessage.ProtoReflect.Descriptor instead.
|
||||
func (*PowerStressMessage) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_powermon_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_powermon_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x70, 0x6f, 0x77, 0x65,
|
||||
0x72, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68,
|
||||
0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0xe0, 0x01, 0x0a, 0x08, 0x50, 0x6f, 0x77, 0x65, 0x72,
|
||||
0x4d, 0x6f, 0x6e, 0x22, 0xd3, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x50, 0x55, 0x5f, 0x44,
|
||||
0x65, 0x65, 0x70, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x50,
|
||||
0x55, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x6c, 0x65, 0x65, 0x70, 0x10, 0x02, 0x12, 0x0c,
|
||||
0x0a, 0x08, 0x56, 0x65, 0x78, 0x74, 0x31, 0x5f, 0x4f, 0x6e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09,
|
||||
0x4c, 0x6f, 0x72, 0x61, 0x5f, 0x52, 0x58, 0x4f, 0x6e, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x4c,
|
||||
0x6f, 0x72, 0x61, 0x5f, 0x54, 0x58, 0x4f, 0x6e, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x6f,
|
||||
0x72, 0x61, 0x5f, 0x52, 0x58, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x20, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x42, 0x54, 0x5f, 0x4f, 0x6e, 0x10, 0x40, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x45, 0x44, 0x5f,
|
||||
0x4f, 0x6e, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f,
|
||||
0x4f, 0x6e, 0x10, 0x80, 0x02, 0x12, 0x13, 0x0a, 0x0e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f,
|
||||
0x44, 0x72, 0x61, 0x77, 0x69, 0x6e, 0x67, 0x10, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x07, 0x57, 0x69,
|
||||
0x66, 0x69, 0x5f, 0x4f, 0x6e, 0x10, 0x80, 0x08, 0x12, 0x0f, 0x0a, 0x0a, 0x47, 0x50, 0x53, 0x5f,
|
||||
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x80, 0x10, 0x22, 0x90, 0x03, 0x0a, 0x12, 0x50, 0x6f,
|
||||
0x77, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x12, 0x37, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72,
|
||||
0x53, 0x74, 0x72, 0x65, 0x73, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4f, 0x70,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d,
|
||||
0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a,
|
||||
0x6e, 0x75, 0x6d, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x9f, 0x02, 0x0a, 0x06, 0x4f,
|
||||
0x70, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x49, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x43, 0x45, 0x5f, 0x51, 0x55, 0x49, 0x45, 0x54, 0x10,
|
||||
0x02, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x44, 0x5f, 0x51, 0x55, 0x49, 0x45, 0x54, 0x10, 0x03,
|
||||
0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x52, 0x45, 0x45, 0x4e, 0x5f, 0x4f, 0x4e, 0x10, 0x10, 0x12,
|
||||
0x0e, 0x0a, 0x0a, 0x53, 0x43, 0x52, 0x45, 0x45, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x11, 0x12,
|
||||
0x0c, 0x0a, 0x08, 0x43, 0x50, 0x55, 0x5f, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x20, 0x12, 0x11, 0x0a,
|
||||
0x0d, 0x43, 0x50, 0x55, 0x5f, 0x44, 0x45, 0x45, 0x50, 0x53, 0x4c, 0x45, 0x45, 0x50, 0x10, 0x21,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x50, 0x55, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x4f, 0x4e, 0x10, 0x22,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x10, 0x30, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x31, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x52,
|
||||
0x41, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x40, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x52, 0x41, 0x5f,
|
||||
0x54, 0x58, 0x10, 0x41, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x52, 0x41, 0x5f, 0x52, 0x58, 0x10,
|
||||
0x42, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x54, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x50, 0x12, 0x09, 0x0a,
|
||||
0x05, 0x42, 0x54, 0x5f, 0x4f, 0x4e, 0x10, 0x51, 0x12, 0x0c, 0x0a, 0x08, 0x57, 0x49, 0x46, 0x49,
|
||||
0x5f, 0x4f, 0x46, 0x46, 0x10, 0x60, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x49, 0x46, 0x49, 0x5f, 0x4f,
|
||||
0x4e, 0x10, 0x61, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x50, 0x53, 0x5f, 0x4f, 0x46, 0x46, 0x10, 0x70,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x47, 0x50, 0x53, 0x5f, 0x4f, 0x4e, 0x10, 0x71, 0x42, 0x8a, 0x01, 0x0a,
|
||||
0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x42, 0x0e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e,
|
||||
0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d,
|
||||
0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa,
|
||||
0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_powermon_proto_rawDescOnce sync.Once
|
||||
file_protobufs_powermon_proto_rawDescData = file_protobufs_powermon_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_powermon_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_powermon_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_powermon_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_powermon_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_powermon_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_powermon_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_protobufs_powermon_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_protobufs_powermon_proto_goTypes = []interface{}{
|
||||
(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_protobufs_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_protobufs_powermon_proto_init() }
|
||||
func file_protobufs_powermon_proto_init() {
|
||||
if File_protobufs_powermon_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_powermon_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PowerMon); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_powermon_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PowerStressMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_powermon_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_powermon_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_powermon_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_powermon_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_powermon_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_powermon_proto = out.File
|
||||
file_protobufs_powermon_proto_rawDesc = nil
|
||||
file_protobufs_powermon_proto_goTypes = nil
|
||||
file_protobufs_powermon_proto_depIdxs = nil
|
||||
}
|
104
meshtastic/protobufs/powermon.proto
Normal file
104
meshtastic/protobufs/powermon.proto
Normal file
|
@ -0,0 +1,104 @@
|
|||
syntax = "proto3";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
264
meshtastic/protobufs/remote_hardware.pb.go
Normal file
264
meshtastic/protobufs/remote_hardware.pb.go
Normal file
|
@ -0,0 +1,264 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/remote_hardware.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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_protobufs_remote_hardware_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (HardwareMessage_Type) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *HardwareMessage) Reset() {
|
||||
*x = HardwareMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_remote_hardware_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use HardwareMessage.ProtoReflect.Descriptor instead.
|
||||
func (*HardwareMessage) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_remote_hardware_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_remote_hardware_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x72, 0x65, 0x6d, 0x6f,
|
||||
0x74, 0x65, 0x5f, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0xf1, 0x01,
|
||||
0x0a, 0x0f, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x12, 0x34, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x20, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x48, 0x61, 0x72,
|
||||
0x64, 0x77, 0x61, 0x72, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70,
|
||||
0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x70, 0x69, 0x6f, 0x5f,
|
||||
0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x70, 0x69, 0x6f,
|
||||
0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x70, 0x69, 0x6f, 0x5f, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x70, 0x69, 0x6f, 0x56, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x22, 0x6c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55,
|
||||
0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f,
|
||||
0x47, 0x50, 0x49, 0x4f, 0x53, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x41, 0x54, 0x43, 0x48,
|
||||
0x5f, 0x47, 0x50, 0x49, 0x4f, 0x53, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x50, 0x49, 0x4f,
|
||||
0x53, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x52,
|
||||
0x45, 0x41, 0x44, 0x5f, 0x47, 0x50, 0x49, 0x4f, 0x53, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x52,
|
||||
0x45, 0x41, 0x44, 0x5f, 0x47, 0x50, 0x49, 0x4f, 0x53, 0x5f, 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10,
|
||||
0x05, 0x42, 0x8a, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76,
|
||||
0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x74,
|
||||
0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a,
|
||||
0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66,
|
||||
0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_remote_hardware_proto_rawDescOnce sync.Once
|
||||
file_protobufs_remote_hardware_proto_rawDescData = file_protobufs_remote_hardware_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_remote_hardware_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_remote_hardware_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_remote_hardware_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_remote_hardware_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_remote_hardware_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_remote_hardware_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_protobufs_remote_hardware_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_remote_hardware_proto_goTypes = []interface{}{
|
||||
(HardwareMessage_Type)(0), // 0: meshtastic.HardwareMessage.Type
|
||||
(*HardwareMessage)(nil), // 1: meshtastic.HardwareMessage
|
||||
}
|
||||
var file_protobufs_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_protobufs_remote_hardware_proto_init() }
|
||||
func file_protobufs_remote_hardware_proto_init() {
|
||||
if File_protobufs_remote_hardware_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_remote_hardware_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*HardwareMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_remote_hardware_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_remote_hardware_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_remote_hardware_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_remote_hardware_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_remote_hardware_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_remote_hardware_proto = out.File
|
||||
file_protobufs_remote_hardware_proto_rawDesc = nil
|
||||
file_protobufs_remote_hardware_proto_goTypes = nil
|
||||
file_protobufs_remote_hardware_proto_depIdxs = nil
|
||||
}
|
75
meshtastic/protobufs/remote_hardware.proto
Normal file
75
meshtastic/protobufs/remote_hardware.proto
Normal file
|
@ -0,0 +1,75 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
153
meshtastic/protobufs/rtttl.pb.go
Normal file
153
meshtastic/protobufs/rtttl.pb.go
Normal file
|
@ -0,0 +1,153 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/rtttl.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Canned message module configuration.
|
||||
type RTTTLConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Ringtone for PWM Buzzer in RTTTL Format.
|
||||
Ringtone string `protobuf:"bytes,1,opt,name=ringtone,proto3" json:"ringtone,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RTTTLConfig) Reset() {
|
||||
*x = RTTTLConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_rtttl_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RTTTLConfig.ProtoReflect.Descriptor instead.
|
||||
func (*RTTTLConfig) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_rtttl_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *RTTTLConfig) GetRingtone() string {
|
||||
if x != nil {
|
||||
return x.Ringtone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_protobufs_rtttl_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_rtttl_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x72, 0x74, 0x74, 0x74,
|
||||
0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73,
|
||||
0x74, 0x69, 0x63, 0x22, 0x29, 0x0a, 0x0b, 0x52, 0x54, 0x54, 0x54, 0x4c, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x65, 0x42, 0x8d,
|
||||
0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c,
|
||||
0x65, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x42, 0x11, 0x52, 0x54, 0x54, 0x54, 0x4c, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a,
|
||||
0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66,
|
||||
0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74,
|
||||
0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_rtttl_proto_rawDescOnce sync.Once
|
||||
file_protobufs_rtttl_proto_rawDescData = file_protobufs_rtttl_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_rtttl_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_rtttl_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_rtttl_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_rtttl_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_rtttl_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_rtttl_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_rtttl_proto_goTypes = []interface{}{
|
||||
(*RTTTLConfig)(nil), // 0: meshtastic.RTTTLConfig
|
||||
}
|
||||
var file_protobufs_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_protobufs_rtttl_proto_init() }
|
||||
func file_protobufs_rtttl_proto_init() {
|
||||
if File_protobufs_rtttl_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_rtttl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RTTTLConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_rtttl_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_rtttl_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_rtttl_proto_depIdxs,
|
||||
MessageInfos: file_protobufs_rtttl_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_rtttl_proto = out.File
|
||||
file_protobufs_rtttl_proto_rawDesc = nil
|
||||
file_protobufs_rtttl_proto_goTypes = nil
|
||||
file_protobufs_rtttl_proto_depIdxs = nil
|
||||
}
|
19
meshtastic/protobufs/rtttl.proto
Normal file
19
meshtastic/protobufs/rtttl.proto
Normal file
|
@ -0,0 +1,19 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
705
meshtastic/protobufs/storeforward.pb.go
Normal file
705
meshtastic/protobufs/storeforward.pb.go
Normal file
|
@ -0,0 +1,705 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/storeforward.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 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_protobufs_storeforward_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (StoreAndForward_RequestResponse) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_storeforward_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
// TODO: REPLACE
|
||||
type StoreAndForward struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// TODO: REPLACE
|
||||
Rr StoreAndForward_RequestResponse `protobuf:"varint,1,opt,name=rr,proto3,enum=meshtastic.StoreAndForward_RequestResponse" json:"rr,omitempty"`
|
||||
// TODO: REPLACE
|
||||
//
|
||||
// Types that are assignable to Variant:
|
||||
//
|
||||
// *StoreAndForward_Stats
|
||||
// *StoreAndForward_History_
|
||||
// *StoreAndForward_Heartbeat_
|
||||
// *StoreAndForward_Text
|
||||
Variant isStoreAndForward_Variant `protobuf_oneof:"variant"`
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) Reset() {
|
||||
*x = StoreAndForward{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_storeforward_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StoreAndForward.ProtoReflect.Descriptor instead.
|
||||
func (*StoreAndForward) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_storeforward_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) GetRr() StoreAndForward_RequestResponse {
|
||||
if x != nil {
|
||||
return x.Rr
|
||||
}
|
||||
return StoreAndForward_UNSET
|
||||
}
|
||||
|
||||
func (m *StoreAndForward) GetVariant() isStoreAndForward_Variant {
|
||||
if m != nil {
|
||||
return m.Variant
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) GetStats() *StoreAndForward_Statistics {
|
||||
if x, ok := x.GetVariant().(*StoreAndForward_Stats); ok {
|
||||
return x.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) GetHistory() *StoreAndForward_History {
|
||||
if x, ok := x.GetVariant().(*StoreAndForward_History_); ok {
|
||||
return x.History
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) GetHeartbeat() *StoreAndForward_Heartbeat {
|
||||
if x, ok := x.GetVariant().(*StoreAndForward_Heartbeat_); ok {
|
||||
return x.Heartbeat
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *StoreAndForward) GetText() []byte {
|
||||
if x, ok := x.GetVariant().(*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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *StoreAndForward_Statistics) Reset() {
|
||||
*x = StoreAndForward_Statistics{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_storeforward_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StoreAndForward_Statistics.ProtoReflect.Descriptor instead.
|
||||
func (*StoreAndForward_Statistics) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *StoreAndForward_History) Reset() {
|
||||
*x = StoreAndForward_History{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_storeforward_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StoreAndForward_History.ProtoReflect.Descriptor instead.
|
||||
func (*StoreAndForward_History) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
func (x *StoreAndForward_Heartbeat) Reset() {
|
||||
*x = StoreAndForward_Heartbeat{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_storeforward_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use StoreAndForward_Heartbeat.ProtoReflect.Descriptor instead.
|
||||
func (*StoreAndForward_Heartbeat) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_storeforward_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_storeforward_proto_rawDesc = []byte{
|
||||
0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a,
|
||||
0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x22, 0xec, 0x08, 0x0a, 0x0f, 0x53,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x3b,
|
||||
0x0a, 0x02, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x6e, 0x64,
|
||||
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x02, 0x72, 0x72, 0x12, 0x3e, 0x0a, 0x05, 0x73,
|
||||
0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x6e, 0x64,
|
||||
0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
|
||||
0x63, 0x73, 0x48, 0x00, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x68,
|
||||
0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41,
|
||||
0x6e, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x48, 0x00, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x09,
|
||||
0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x74, 0x6f,
|
||||
0x72, 0x65, 0x41, 0x6e, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x2e, 0x48, 0x65, 0x61,
|
||||
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x48, 0x00, 0x52, 0x09, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62,
|
||||
0x65, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x1a, 0xbf, 0x02, 0x0a, 0x0a, 0x53, 0x74,
|
||||
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12,
|
||||
0x25, 0x0a, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x61, 0x76, 0x65,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x73, 0x53, 0x61, 0x76, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||
0x65, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x4d, 0x61, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x70, 0x5f,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x70, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x29,
|
||||
0x0a, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f,
|
||||
0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x61,
|
||||
0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x68, 0x65,
|
||||
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x4d, 0x61, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x5f, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x1a, 0x6f, 0x0a, 0x07, 0x48,
|
||||
0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x29, 0x0a, 0x10, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x79, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x0f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x61, 0x73,
|
||||
0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x0b, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x0a, 0x09,
|
||||
0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f,
|
||||
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x22,
|
||||
0xbc, 0x02, 0x0a, 0x0f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x10,
|
||||
0x0a, 0x0c, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01,
|
||||
0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x48, 0x45, 0x41, 0x52, 0x54,
|
||||
0x42, 0x45, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52,
|
||||
0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, 0x45,
|
||||
0x52, 0x5f, 0x50, 0x4f, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54,
|
||||
0x45, 0x52, 0x5f, 0x42, 0x55, 0x53, 0x59, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x4f, 0x55,
|
||||
0x54, 0x45, 0x52, 0x5f, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x06, 0x12, 0x10, 0x0a,
|
||||
0x0c, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x10, 0x07, 0x12,
|
||||
0x16, 0x0a, 0x12, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x44,
|
||||
0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x4f, 0x55, 0x54, 0x45,
|
||||
0x52, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54,
|
||||
0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x45, 0x52, 0x52,
|
||||
0x4f, 0x52, 0x10, 0x40, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x48,
|
||||
0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x41, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x49, 0x45,
|
||||
0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x53, 0x10, 0x42, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x4c,
|
||||
0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x43, 0x12, 0x0f, 0x0a, 0x0b, 0x43,
|
||||
0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x4f, 0x4e, 0x47, 0x10, 0x44, 0x12, 0x10, 0x0a, 0x0c,
|
||||
0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x42, 0x4f, 0x52, 0x54, 0x10, 0x6a, 0x42, 0x09,
|
||||
0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x42, 0x91, 0x01, 0x0a, 0x13, 0x63, 0x6f,
|
||||
0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73,
|
||||
0x68, 0x42, 0x15, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x41, 0x6e, 0x64, 0x46, 0x6f, 0x72, 0x77, 0x61,
|
||||
0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61,
|
||||
0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69,
|
||||
0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d,
|
||||
0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63,
|
||||
0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_storeforward_proto_rawDescOnce sync.Once
|
||||
file_protobufs_storeforward_proto_rawDescData = file_protobufs_storeforward_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_storeforward_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_storeforward_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_storeforward_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_storeforward_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_storeforward_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_storeforward_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_protobufs_storeforward_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_protobufs_storeforward_proto_goTypes = []interface{}{
|
||||
(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_protobufs_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_protobufs_storeforward_proto_init() }
|
||||
func file_protobufs_storeforward_proto_init() {
|
||||
if File_protobufs_storeforward_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_storeforward_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StoreAndForward); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_storeforward_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StoreAndForward_Statistics); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_storeforward_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StoreAndForward_History); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_protobufs_storeforward_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StoreAndForward_Heartbeat); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_protobufs_storeforward_proto_msgTypes[0].OneofWrappers = []interface{}{
|
||||
(*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: file_protobufs_storeforward_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_storeforward_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_storeforward_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_storeforward_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_storeforward_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_storeforward_proto = out.File
|
||||
file_protobufs_storeforward_proto_rawDesc = nil
|
||||
file_protobufs_storeforward_proto_goTypes = nil
|
||||
file_protobufs_storeforward_proto_depIdxs = nil
|
||||
}
|
218
meshtastic/protobufs/storeforward.proto
Normal file
218
meshtastic/protobufs/storeforward.proto
Normal file
|
@ -0,0 +1,218 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
||||
}
|
1587
meshtastic/protobufs/telemetry.pb.go
Normal file
1587
meshtastic/protobufs/telemetry.pb.go
Normal file
File diff suppressed because it is too large
Load diff
543
meshtastic/protobufs/telemetry.proto
Normal file
543
meshtastic/protobufs/telemetry.proto
Normal file
|
@ -0,0 +1,543 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
/*
|
||||
* 10.0um Particle Count
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
253
meshtastic/protobufs/xmodem.pb.go
Normal file
253
meshtastic/protobufs/xmodem.pb.go
Normal file
|
@ -0,0 +1,253 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v3.21.12
|
||||
// source: protobufs/xmodem.proto
|
||||
|
||||
package protobufs
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type 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_protobufs_xmodem_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (XModem_Control) Type() protoreflect.EnumType {
|
||||
return &file_protobufs_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_protobufs_xmodem_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type XModem struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
func (x *XModem) Reset() {
|
||||
*x = XModem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_protobufs_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_protobufs_xmodem_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use XModem.ProtoReflect.Descriptor instead.
|
||||
func (*XModem) Descriptor() ([]byte, []int) {
|
||||
return file_protobufs_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_protobufs_xmodem_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_protobufs_xmodem_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0x2f, 0x78, 0x6d, 0x6f, 0x64,
|
||||
0x65, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61,
|
||||
0x73, 0x74, 0x69, 0x63, 0x22, 0xd3, 0x01, 0x0a, 0x06, 0x58, 0x4d, 0x6f, 0x64, 0x65, 0x6d, 0x12,
|
||||
0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
|
||||
0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x58, 0x4d,
|
||||
0x6f, 0x64, 0x65, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x72, 0x63, 0x31, 0x36,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x72, 0x63, 0x31, 0x36, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x62,
|
||||
0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0x53, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x12, 0x07, 0x0a, 0x03, 0x4e, 0x55, 0x4c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x4f, 0x48,
|
||||
0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x54, 0x58, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45,
|
||||
0x4f, 0x54, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x43, 0x4b, 0x10, 0x06, 0x12, 0x07, 0x0a,
|
||||
0x03, 0x4e, 0x41, 0x4b, 0x10, 0x15, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x41, 0x4e, 0x10, 0x18, 0x12,
|
||||
0x09, 0x0a, 0x05, 0x43, 0x54, 0x52, 0x4c, 0x5a, 0x10, 0x1a, 0x42, 0x88, 0x01, 0x0a, 0x13, 0x63,
|
||||
0x6f, 0x6d, 0x2e, 0x67, 0x65, 0x65, 0x6b, 0x73, 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x2e, 0x6d, 0x65,
|
||||
0x73, 0x68, 0x42, 0x0c, 0x58, 0x6d, 0x6f, 0x64, 0x65, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73,
|
||||
0x5a, 0x49, 0x67, 0x69, 0x74, 0x2e, 0x6a, 0x61, 0x6e, 0x6b, 0x79, 0x2e, 0x73, 0x6f, 0x6c, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x6e, 0x2f, 0x6d, 0x61, 0x74, 0x72, 0x69,
|
||||
0x78, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2d, 0x62, 0x72, 0x69,
|
||||
0x64, 0x67, 0x65, 0x2d, 0x67, 0x6f, 0x2f, 0x6d, 0x65, 0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69,
|
||||
0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x73, 0xaa, 0x02, 0x14, 0x4d, 0x65,
|
||||
0x73, 0x68, 0x74, 0x61, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x73, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_protobufs_xmodem_proto_rawDescOnce sync.Once
|
||||
file_protobufs_xmodem_proto_rawDescData = file_protobufs_xmodem_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_protobufs_xmodem_proto_rawDescGZIP() []byte {
|
||||
file_protobufs_xmodem_proto_rawDescOnce.Do(func() {
|
||||
file_protobufs_xmodem_proto_rawDescData = protoimpl.X.CompressGZIP(file_protobufs_xmodem_proto_rawDescData)
|
||||
})
|
||||
return file_protobufs_xmodem_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_protobufs_xmodem_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_protobufs_xmodem_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_protobufs_xmodem_proto_goTypes = []interface{}{
|
||||
(XModem_Control)(0), // 0: meshtastic.XModem.Control
|
||||
(*XModem)(nil), // 1: meshtastic.XModem
|
||||
}
|
||||
var file_protobufs_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_protobufs_xmodem_proto_init() }
|
||||
func file_protobufs_xmodem_proto_init() {
|
||||
if File_protobufs_xmodem_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_protobufs_xmodem_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*XModem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_protobufs_xmodem_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_protobufs_xmodem_proto_goTypes,
|
||||
DependencyIndexes: file_protobufs_xmodem_proto_depIdxs,
|
||||
EnumInfos: file_protobufs_xmodem_proto_enumTypes,
|
||||
MessageInfos: file_protobufs_xmodem_proto_msgTypes,
|
||||
}.Build()
|
||||
File_protobufs_xmodem_proto = out.File
|
||||
file_protobufs_xmodem_proto_rawDesc = nil
|
||||
file_protobufs_xmodem_proto_goTypes = nil
|
||||
file_protobufs_xmodem_proto_depIdxs = nil
|
||||
}
|
27
meshtastic/protobufs/xmodem.proto
Normal file
27
meshtastic/protobufs/xmodem.proto
Normal file
|
@ -0,0 +1,27 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package meshtastic;
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "git.janky.solutions/finn/matrix-meshtastic-bridge-go/meshtastic/protobufs";
|
||||
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;
|
||||
}
|
Loading…
Add table
Reference in a new issue