meshtastic: support
Some checks failed
Run tests / test (1.25) (push) Failing after 1m1s
Run tests / test (stable) (push) Failing after 1m0s

This commit is contained in:
2026-03-06 09:24:56 +01:00
parent e6bda98b92
commit e2b69d92fd
39 changed files with 26113 additions and 1 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.pdf filter=lfs diff=lfs merge=lfs -text

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "protocol/meshtastic/internal/pbgen/upstream"]
path = protocol/meshtastic/internal/pbgen/upstream
url = https://github.com/meshtastic/protobufs.git

3
go.mod
View File

@@ -1,12 +1,13 @@
module git.maze.io/go/ham module git.maze.io/go/ham
go 1.25.6 go 1.26
require ( require (
filippo.io/edwards25519 v1.1.0 filippo.io/edwards25519 v1.1.0
github.com/golang-jwt/jwt/v5 v5.3.1 github.com/golang-jwt/jwt/v5 v5.3.1
github.com/sirupsen/logrus v1.8.1 github.com/sirupsen/logrus v1.8.1
golang.org/x/crypto v0.48.0 golang.org/x/crypto v0.48.0
google.golang.org/protobuf v1.36.11
) )
require ( require (

4
go.sum
View File

@@ -5,6 +5,8 @@ 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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY= github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
@@ -18,6 +20,8 @@ golang.org/x/crypto v0.48.0/go.mod h1:r0kV5h3qnFPlQnBSrULhlsRfryS2pmewsg+XfMgkVo
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=

View File

@@ -60,6 +60,10 @@ func (dev *Node) Info() *radio.Info {
return dev.driver.Info() return dev.driver.Info()
} }
func (dev *Node) Stats() map[string]any {
return dev.driver.Stats()
}
func (dev *Node) Trace(path []byte) (snr []float64, err error) { func (dev *Node) Trace(path []byte) (snr []float64, err error) {
if tracer, ok := dev.driver.(nodeTracer); ok { if tracer, ok := dev.driver.(nodeTracer); ok {
return tracer.Trace(path) return tracer.Trace(path)
@@ -74,6 +78,7 @@ type nodeDriver interface {
Setup() error Setup() error
Packets() <-chan *Packet Packets() <-chan *Packet
Stats() map[string]any
} }
type nodeTracer interface { type nodeTracer interface {

View File

@@ -47,6 +47,7 @@ type companionDriver struct {
info companionInfo info companionInfo
traceTag uint32 traceTag uint32
traceAuthCode uint32 traceAuthCode uint32
stats map[string]any
} }
type companionDriverWaiting struct { type companionDriverWaiting struct {
@@ -208,6 +209,10 @@ func (drv *companionDriver) Info() *radio.Info {
} }
} }
func (drv *companionDriver) Stats() map[string]any {
return drv.stats
}
func (drv *companionDriver) Trace(path []byte) (snr []float64, err error) { func (drv *companionDriver) Trace(path []byte) (snr []float64, err error) {
var ( var (
args = make([]byte, 4+4+1+len(path)) args = make([]byte, 4+4+1+len(path))

View File

@@ -23,6 +23,7 @@ type repeaterDriver struct {
lastFrame []byte lastFrame []byte
lastFrameAt time.Time lastFrameAt time.Time
info repeaterInfo info repeaterInfo
stats map[string]any
err error err error
} }
@@ -102,6 +103,7 @@ func newRepeaterDriver(conn io.ReadWriteCloser, hasSNR bool) *repeaterDriver {
conn: conn, conn: conn,
waiting: make(chan *repeaterDriverWaiting, 16), waiting: make(chan *repeaterDriverWaiting, 16),
hasSNR: hasSNR, hasSNR: hasSNR,
stats: make(map[string]any),
} }
} }
@@ -114,6 +116,7 @@ func (drv *repeaterDriver) Setup() (err error) {
if err = drv.queryDeviceInfo(); err != nil { if err = drv.queryDeviceInfo(); err != nil {
return err return err
} }
go drv.pollStats()
return drv.err return drv.err
} }
@@ -176,6 +179,10 @@ func (drv *repeaterDriver) RawPackets() <-chan *protocol.Packet {
return drv.rawPackets return drv.rawPackets
} }
func (drv *repeaterDriver) Stats() map[string]any {
return drv.stats
}
func (drv *repeaterDriver) queryDeviceInfo() (err error) { func (drv *repeaterDriver) queryDeviceInfo() (err error) {
if drv.info.FirmwareVersion, err = drv.writeCommand("ver"); err != nil { if drv.info.FirmwareVersion, err = drv.writeCommand("ver"); err != nil {
return return
@@ -404,6 +411,73 @@ func (drv *repeaterDriver) poll() {
} }
} }
func (drv *repeaterDriver) pollStats() {
ticker := time.NewTicker(time.Minute)
defer ticker.Stop()
for {
neighbors, err := drv.getNeighbors()
if err != nil {
Logger.Warnf("meshcore: failed to get neighbors: %v", err)
} else {
drv.stats["neighbors"] = neighbors
}
response, err := drv.writeCommand("stats")
if err != nil {
Logger.Warnf("meshcore: failed to get stats: %v", err)
return
}
stats := make(map[string]any)
for _, line := range strings.Split(response, "\n") {
parts := strings.SplitN(line, "=", 2)
if len(parts) != 2 {
continue
}
key := parts[0]
value := parts[1]
if i, err := strconv.Atoi(value); err == nil {
stats[key] = i
} else if f, err := strconv.ParseFloat(value, 64); err == nil {
stats[key] = f
} else {
stats[key] = value
}
}
drv.stats = stats
<-ticker.C
}
}
func (drv *repeaterDriver) getNeighbors() (neighbors map[string]float64, err error) {
// "neighbors" command returns a list of neighbors, one per line, in the format: "78CCC5A3:470:47\n"
var response string
if response, err = drv.writeCommand("neighbors"); err != nil {
return
}
Logger.Tracef("meshcore: neighbors response: %q", response)
neighbors = make(map[string]float64)
for _, line := range strings.Split(response, "\n") {
parts := strings.SplitN(line, ":", 3)
if len(parts) != 3 {
continue
}
var (
prefix = parts[0]
snr float64
)
if snr, err = strconv.ParseFloat(parts[2], 64); err != nil {
return
}
neighbors[prefix] = snr
}
return
}
func (drv *repeaterDriver) parsePacket(line string) (time.Time, string, error) { func (drv *repeaterDriver) parsePacket(line string) (time.Time, string, error) {
// "11:08:38 - 15/5/2024 U: TX, len=124 (type=4, route=D, payload_len=122)" // "11:08:38 - 15/5/2024 U: TX, len=124 (type=4, route=D, payload_len=122)"
if len(line) < 22 { if len(line) < 22 {

View File

@@ -0,0 +1,46 @@
# Meshtastic Protocol Buffers Generation
This internal package manages the generation of Go types from the [official Meshtastic protocol buffer definitions](https://github.com/meshtastic/protobufs).
## Upstream Source
The protobuf definitions are included as a git submodule at:
```
protocol/meshtastic/internal/pbgen/upstream
```
Tracked repository: `https://github.com/meshtastic/protobufs.git`
## Generating Go Code
To regenerate the Go protobuf types after updating the submodule:
```bash
# Update the submodule to latest (optional)
git submodule update --remote protocol/meshtastic/internal/pbgen/upstream
# Regenerate Go code
go generate ./protocol/meshtastic/internal/pbgen
```
### Requirements
- `protoc` (Protocol Buffers compiler)
- `protoc-gen-go` (install via `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`)
## Generated Package
Generated Go types are placed in:
```
protocol/meshtastic/pb/
```
Import path:
```go
import meshtasticpb "git.maze.io/go/ham/protocol/meshtastic/pb"
```
All Meshtastic protocol buffer messages (Position, User, Data, etc.) are available from this package.

View File

@@ -0,0 +1,5 @@
package protobufs
//go:generate sh ./generate.sh
const _ = 0

View File

@@ -0,0 +1,75 @@
#!/usr/bin/env sh
set -eu
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
UPSTREAM_DIR="$SCRIPT_DIR/upstream"
OUT_DIR="$SCRIPT_DIR/../../pb"
MODULE_IMPORT="git.maze.io/go/ham/protocol/meshtastic/pb"
if ! command -v protoc >/dev/null 2>&1; then
echo "error: protoc not found in PATH" >&2
exit 1
fi
GOBIN_DIR="$(go env GOPATH 2>/dev/null)/bin"
if [ -n "$GOBIN_DIR" ] && [ -d "$GOBIN_DIR" ]; then
PATH="$GOBIN_DIR:$PATH"
export PATH
fi
if ! command -v protoc-gen-go >/dev/null 2>&1; then
echo "error: protoc-gen-go not found in PATH" >&2
exit 1
fi
if [ ! -d "$UPSTREAM_DIR/meshtastic" ]; then
echo "error: upstream proto directory not found: $UPSTREAM_DIR/meshtastic" >&2
exit 1
fi
PROTO_FILES=$(find "$UPSTREAM_DIR" -type f -name '*.proto' | LC_ALL=C sort)
if [ -z "$PROTO_FILES" ]; then
echo "error: no proto files found in $UPSTREAM_DIR" >&2
exit 1
fi
M_OPTS=""
for file in $PROTO_FILES; do
rel="${file#$UPSTREAM_DIR/}"
M_OPTS="$M_OPTS --go_opt=M$rel=$MODULE_IMPORT"
done
rm -rf "$OUT_DIR"/*.pb.go
mkdir -p "$OUT_DIR"
# shellcheck disable=SC2086
protoc \
-I "$UPSTREAM_DIR" \
--go_out="$OUT_DIR" \
--go_opt=paths=source_relative \
$M_OPTS \
$(printf '%s ' $PROTO_FILES)
# Flatten meshtastic/ subdirectory into pb/ root
if [ -d "$OUT_DIR/meshtastic" ]; then
mv "$OUT_DIR/meshtastic"/*.pb.go "$OUT_DIR/"
rmdir "$OUT_DIR/meshtastic"
fi
# Fix package name from 'generated' to 'pb'
for pbfile in "$OUT_DIR"/*.pb.go; do
if [ -f "$pbfile" ]; then
sed -i.bak 's/^package generated$/package pb/' "$pbfile"
rm -f "$pbfile.bak"
fi
done
# Convert JSON tags from snake_case to camelCase
# This converts json:"field_name,omitempty" to json:"fieldName,omitempty"
for pbfile in "$OUT_DIR"/*.pb.go; do
if [ -f "$pbfile" ]; then
perl -i -pe 's/json:"([a-z0-9_]+)((?:,[^"]*)?)"/my ($f, $r) = ($1, $2); $f =~ s#_([a-z0-9])#uc($1)#ge; "json:\"$f$r\""/gex' "$pbfile"
fi
done

173
protocol/meshtastic/node.go Normal file
View File

@@ -0,0 +1,173 @@
package meshtastic
import (
"crypto/rand"
"encoding/binary"
"fmt"
"math"
"math/big"
"strconv"
"strings"
)
type NodeID uint32
const (
// BroadcastNodeID is the special NodeID used when broadcasting a packet to a channel.
BroadcastNodeID NodeID = math.MaxUint32
// BroadcastNodeIDNoLora is a special broadcast address that excludes LoRa transmission.
// Used for MQTT-only broadcasts. This is ^all with the NO_LORA flag (0x40) cleared.
BroadcastNodeIDNoLora NodeID = math.MaxUint32 ^ 0x40
// ReservedNodeIDThreshold is the threshold at which NodeIDs are considered reserved. Random NodeIDs should not
// be generated below this threshold.
// Source: https://github.com/meshtastic/firmware/blob/d1ea58975755e146457a8345065e4ca357555275/src/mesh/NodeDB.cpp#L461
reservedNodeIDThreshold NodeID = 4
)
// ParseNodeID parses a NodeID from various string formats:
// - "!abcd1234" (Meshtastic format with ! prefix)
// - "0xabcd1234" (hex with 0x prefix)
// - "abcd1234" (plain hex)
// - "12345678" (decimal)
func ParseNodeID(s string) (NodeID, error) {
s = strings.TrimSpace(s)
if s == "" {
return 0, fmt.Errorf("empty node ID string")
}
// Handle !prefix format
if strings.HasPrefix(s, "!") {
s = s[1:]
n, err := strconv.ParseUint(s, 16, 32)
if err != nil {
return 0, fmt.Errorf("invalid node ID %q: %w", s, err)
}
return NodeID(n), nil
}
// Handle 0x prefix
if strings.HasPrefix(s, "0x") || strings.HasPrefix(s, "0X") {
n, err := strconv.ParseUint(s[2:], 16, 32)
if err != nil {
return 0, fmt.Errorf("invalid node ID %q: %w", s, err)
}
return NodeID(n), nil
}
// Try hex first if it looks like hex (contains a-f)
sLower := strings.ToLower(s)
if strings.ContainsAny(sLower, "abcdef") {
n, err := strconv.ParseUint(s, 16, 32)
if err != nil {
return 0, fmt.Errorf("invalid node ID %q: %w", s, err)
}
return NodeID(n), nil
}
// Try decimal
n, err := strconv.ParseUint(s, 10, 32)
if err != nil {
// Fall back to hex for 8-char strings
if len(s) == 8 {
n, err = strconv.ParseUint(s, 16, 32)
if err != nil {
return 0, fmt.Errorf("invalid node ID %q: %w", s, err)
}
return NodeID(n), nil
}
return 0, fmt.Errorf("invalid node ID %q: %w", s, err)
}
return NodeID(n), nil
}
// Uint32 returns the underlying uint32 value of the NodeID.
func (n NodeID) Uint32() uint32 {
return uint32(n)
}
// String converts the NodeID to a hex formatted string.
// This is typically how NodeIDs are displayed in Meshtastic UIs.
func (n NodeID) String() string {
return fmt.Sprintf("!%08x", uint32(n))
}
// Bytes converts the NodeID to a byte slice
func (n NodeID) Bytes() []byte {
bytes := make([]byte, 4) // uint32 is 4 bytes
binary.BigEndian.PutUint32(bytes, n.Uint32())
return bytes
}
// DefaultLongName returns the default long node name based on the NodeID.
// Source: https://github.com/meshtastic/firmware/blob/d1ea58975755e146457a8345065e4ca357555275/src/mesh/NodeDB.cpp#L382
func (n NodeID) DefaultLongName() string {
bytes := make([]byte, 4) // uint32 is 4 bytes
binary.BigEndian.PutUint32(bytes, n.Uint32())
return fmt.Sprintf("Meshtastic %04x", bytes[2:])
}
// DefaultShortName returns the default short node name based on the NodeID.
// Last two bytes of the NodeID represented in hex.
// Source: https://github.com/meshtastic/firmware/blob/d1ea58975755e146457a8345065e4ca357555275/src/mesh/NodeDB.cpp#L382
func (n NodeID) DefaultShortName() string {
bytes := make([]byte, 4) // uint32 is 4 bytes
binary.BigEndian.PutUint32(bytes, n.Uint32())
return fmt.Sprintf("%04x", bytes[2:])
}
// UnmarshalText implements encoding.TextUnmarshaler for use with config parsers like Viper.
func (n *NodeID) UnmarshalText(text []byte) error {
parsed, err := ParseNodeID(string(text))
if err != nil {
return err
}
*n = parsed
return nil
}
// MarshalText implements encoding.TextMarshaler.
func (n NodeID) MarshalText() ([]byte, error) {
return []byte(n.String()), nil
}
// IsReservedID returns true if this is a reserved or broadcast NodeID.
func (n NodeID) IsReservedID() bool {
return n < reservedNodeIDThreshold || n >= BroadcastNodeIDNoLora
}
// IsBroadcast returns true if this is any form of broadcast address.
func (n NodeID) IsBroadcast() bool {
return n == BroadcastNodeID || n == BroadcastNodeIDNoLora
}
// ToMacAddress returns a MAC address string derived from the NodeID.
// This creates a locally administered unicast MAC address.
func (n NodeID) ToMacAddress() string {
bytes := n.Bytes()
// Use 0x02 as the first octet (locally administered, unicast)
// Then 0x00 as padding, followed by the 4 bytes of the NodeID
return fmt.Sprintf("02:00:%02x:%02x:%02x:%02x", bytes[0], bytes[1], bytes[2], bytes[3])
}
// RandomNodeID returns a randomised NodeID.
// It's recommended to call this the first time a node is started and persist the result.
//
// Hardware meshtastic nodes first try a NodeID of the last four bytes of the BLE MAC address. If that ID is already in
// use or invalid, a random NodeID is generated.
// Source: https://github.com/meshtastic/firmware/blob/d1ea58975755e146457a8345065e4ca357555275/src/mesh/NodeDB.cpp#L466
func RandomNodeID() (NodeID, error) {
// Generates a random uint32 between reservedNodeIDThreshold and math.MaxUint32
randomInt, err := rand.Int(
rand.Reader,
big.NewInt(
int64(math.MaxUint32-reservedNodeIDThreshold.Uint32()),
),
)
if err != nil {
return NodeID(0), fmt.Errorf("reading entropy: %w", err)
}
r := uint32(randomInt.Uint64()) + reservedNodeIDThreshold.Uint32()
return NodeID(r), nil
}

View File

@@ -0,0 +1,159 @@
package meshtastic
import (
"encoding/binary"
"encoding/json"
"errors"
meshtasticpb "git.maze.io/go/ham/protocol/meshtastic/pb"
"google.golang.org/protobuf/proto"
)
const (
minPacketSize = 4 + 4 + 4 + 1 + 1 + 1 + 1
maxPayloadSize = 237
)
var (
// ErrInvalidPacket signals the source buffer does not contain a valid packet.
ErrInvalidPacket = errors.New("meshtastic: invalid packet")
)
type Packet struct {
Destination NodeID `json:"destination"`
Source NodeID `json:"source"`
ID uint32 `json:"id"`
Flags uint8 `json:"flags"`
ChannelHash uint8 `json:"channelHash"`
NextHop uint8 `json:"nextHop"`
RelayNode uint8 `json:"relayNode"`
PayloadLength int `json:"-"`
Payload [maxPayloadSize]byte `json:"-"`
Data *meshtasticpb.Data `json:"data,omitempty"`
DecodedPayload proto.Message `json:"decodedPayload,omitempty"`
TextPayload string `json:"textPayload,omitempty"`
}
func (packet *Packet) Decode(data []byte) error {
if len(data) < minPacketSize {
return ErrInvalidPacket
}
if len(data[16:]) > maxPayloadSize {
return ErrInvalidPacket
}
packet.Source = parseNodeID(data[0:])
packet.Destination = parseNodeID(data[4:])
packet.ID = binary.LittleEndian.Uint32(data[8:])
packet.Flags = data[12]
packet.ChannelHash = data[13]
packet.NextHop = data[14]
packet.RelayNode = data[15]
packet.PayloadLength = len(data[16:])
copy(packet.Payload[:], data[16:])
packet.Data = nil
packet.DecodedPayload = nil
packet.TextPayload = ""
packet.decodePayloadProtobufs()
return nil
}
func (packet *Packet) PayloadBytes() []byte {
return packet.Payload[:packet.PayloadLength]
}
func (packet *Packet) HopLimit() int {
return 7
}
func parseNodeID(data []byte) NodeID {
return NodeID(binary.LittleEndian.Uint32(data))
}
func (packet *Packet) decodePayloadProtobufs() {
if packet.PayloadLength == 0 {
return
}
decodedData := &meshtasticpb.Data{}
if err := proto.Unmarshal(packet.PayloadBytes(), decodedData); err != nil {
return
}
packet.Data = decodedData
decodedPayload, textPayload := decodeDataPayload(decodedData.GetPortnum(), decodedData.GetPayload())
packet.DecodedPayload = decodedPayload
packet.TextPayload = textPayload
}
func decodeDataPayload(portNum meshtasticpb.PortNum, payload []byte) (proto.Message, string) {
if len(payload) == 0 {
return nil, ""
}
textPortNum := map[meshtasticpb.PortNum]struct{}{
meshtasticpb.PortNum_TEXT_MESSAGE_APP: {},
meshtasticpb.PortNum_ALERT_APP: {},
meshtasticpb.PortNum_DETECTION_SENSOR_APP: {},
meshtasticpb.PortNum_REPLY_APP: {},
meshtasticpb.PortNum_RANGE_TEST_APP: {},
meshtasticpb.PortNum_TEXT_MESSAGE_COMPRESSED_APP: {},
}
if _, ok := textPortNum[portNum]; ok {
return nil, string(payload)
}
var message proto.Message
switch portNum {
case meshtasticpb.PortNum_REMOTE_HARDWARE_APP:
message = &meshtasticpb.HardwareMessage{}
case meshtasticpb.PortNum_POSITION_APP:
message = &meshtasticpb.Position{}
case meshtasticpb.PortNum_NODEINFO_APP:
message = &meshtasticpb.User{}
case meshtasticpb.PortNum_ROUTING_APP:
message = &meshtasticpb.Routing{}
case meshtasticpb.PortNum_ADMIN_APP:
message = &meshtasticpb.AdminMessage{}
case meshtasticpb.PortNum_WAYPOINT_APP:
message = &meshtasticpb.Waypoint{}
case meshtasticpb.PortNum_KEY_VERIFICATION_APP:
message = &meshtasticpb.KeyVerification{}
case meshtasticpb.PortNum_PAXCOUNTER_APP:
message = &meshtasticpb.Paxcount{}
case meshtasticpb.PortNum_STORE_FORWARD_PLUSPLUS_APP:
message = &meshtasticpb.StoreForwardPlusPlus{}
case meshtasticpb.PortNum_STORE_FORWARD_APP:
message = &meshtasticpb.StoreAndForward{}
case meshtasticpb.PortNum_TELEMETRY_APP:
message = &meshtasticpb.Telemetry{}
case meshtasticpb.PortNum_TRACEROUTE_APP:
message = &meshtasticpb.RouteDiscovery{}
case meshtasticpb.PortNum_NEIGHBORINFO_APP:
message = &meshtasticpb.NeighborInfo{}
case meshtasticpb.PortNum_NODE_STATUS_APP:
message = &meshtasticpb.StatusMessage{}
default:
return nil, ""
}
if err := proto.Unmarshal(payload, message); err != nil {
return nil, ""
}
return message, ""
}
// MarshalJSON implements custom JSON marshaling for Packet.
func (packet *Packet) MarshalJSON() ([]byte, error) {
type Alias Packet
return json.Marshal(&struct {
*Alias
Raw []byte `json:"raw"`
}{
Alias: (*Alias)(packet),
Raw: packet.PayloadBytes(),
})
}

View File

@@ -0,0 +1,591 @@
package meshtastic
import (
"encoding/binary"
"encoding/json"
"testing"
meshtasticpb "git.maze.io/go/ham/protocol/meshtastic/pb"
"google.golang.org/protobuf/proto"
)
func TestPacketDecodeTextPayload(t *testing.T) {
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_TEXT_MESSAGE_APP,
Payload: []byte("hello mesh"),
}
encodedData, err := proto.Marshal(dataMsg)
if err != nil {
t.Fatalf("marshaling data protobuf: %v", err)
}
rawPacket := make([]byte, 16+len(encodedData))
binary.LittleEndian.PutUint32(rawPacket[0:], 0x01020304)
binary.LittleEndian.PutUint32(rawPacket[4:], 0x05060708)
binary.LittleEndian.PutUint32(rawPacket[8:], 0x090a0b0c)
rawPacket[12] = 0x01
rawPacket[13] = 0x02
rawPacket[14] = 0x03
rawPacket[15] = 0x04
copy(rawPacket[16:], encodedData)
var packet Packet
if err := packet.Decode(rawPacket); err != nil {
t.Fatalf("decoding packet: %v", err)
}
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_TEXT_MESSAGE_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
if packet.TextPayload != "hello mesh" {
t.Fatalf("unexpected text payload: got %q", packet.TextPayload)
}
if packet.DecodedPayload != nil {
t.Fatalf("expected no decoded protobuf payload for text app, got %T", packet.DecodedPayload)
}
}
func TestPacketDecodeRejectsOversizedPayload(t *testing.T) {
rawPacket := make([]byte, 16+maxPayloadSize+1)
var packet Packet
err := packet.Decode(rawPacket)
if err != ErrInvalidPacket {
t.Fatalf("expected ErrInvalidPacket, got %v", err)
}
}
func TestPacketJSONSerialization(t *testing.T) {
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_TEXT_MESSAGE_APP,
Payload: []byte("test message"),
}
encodedData, err := proto.Marshal(dataMsg)
if err != nil {
t.Fatalf("marshaling data protobuf: %v", err)
}
rawPacket := make([]byte, 16+len(encodedData))
binary.LittleEndian.PutUint32(rawPacket[0:], 0x12345678) // source
binary.LittleEndian.PutUint32(rawPacket[4:], 0xabcdef01) // destination
binary.LittleEndian.PutUint32(rawPacket[8:], 0x99887766) // id
rawPacket[12] = 0x11 // flags
rawPacket[13] = 0x22 // channelHash
rawPacket[14] = 0x33 // nextHop
rawPacket[15] = 0x44 // relayNode
copy(rawPacket[16:], encodedData)
var packet Packet
if err := packet.Decode(rawPacket); err != nil {
t.Fatalf("decoding packet: %v", err)
}
jsonBytes, err := json.Marshal(&packet)
if err != nil {
t.Fatalf("marshaling to JSON: %v", err)
}
var decoded map[string]interface{}
if err := json.Unmarshal(jsonBytes, &decoded); err != nil {
t.Fatalf("unmarshaling JSON: %v", err)
}
// Check camelCase field names
if _, ok := decoded["destination"]; !ok {
t.Error("missing 'destination' field")
}
if _, ok := decoded["source"]; !ok {
t.Error("missing 'source' field")
}
if _, ok := decoded["channelHash"]; !ok {
t.Error("missing 'channelHash' field")
}
if _, ok := decoded["nextHop"]; !ok {
t.Error("missing 'nextHop' field")
}
if _, ok := decoded["relayNode"]; !ok {
t.Error("missing 'relayNode' field")
}
// Check raw payload field
if _, ok := decoded["raw"]; !ok {
t.Error("missing 'raw' field")
}
// Check text payload
if textPayload, ok := decoded["textPayload"].(string); !ok || textPayload != "test message" {
t.Errorf("expected textPayload='test message', got %v", decoded["textPayload"])
}
// Verify PayloadLength and Payload are not in JSON
if _, ok := decoded["PayloadLength"]; ok {
t.Error("PayloadLength should not be in JSON output")
}
if _, ok := decoded["Payload"]; ok {
t.Error("Payload should not be in JSON output")
}
}
func TestProtobufMessagesCamelCaseJSON(t *testing.T) {
// Test that protobuf messages serialize with camelCase JSON tags
pos := &meshtasticpb.Position{
LatitudeI: proto.Int32(379208045),
LongitudeI: proto.Int32(-1223928905),
Altitude: proto.Int32(120),
Time: 1234567890,
}
jsonBytes, err := json.Marshal(pos)
if err != nil {
t.Fatalf("marshaling Position to JSON: %v", err)
}
var decoded map[string]interface{}
if err := json.Unmarshal(jsonBytes, &decoded); err != nil {
t.Fatalf("unmarshaling JSON: %v", err)
}
// Check camelCase field names (not snake_case)
if _, ok := decoded["latitudeI"]; !ok {
t.Error("missing camelCase 'latitudeI' field")
}
if _, ok := decoded["longitudeI"]; !ok {
t.Error("missing camelCase 'longitudeI' field")
}
if _, ok := decoded["altitude"]; !ok {
t.Error("missing 'altitude' field")
}
// Check that snake_case fields are NOT present
if _, ok := decoded["latitude_i"]; ok {
t.Error("found snake_case 'latitude_i' field, expected camelCase 'latitudeI'")
}
if _, ok := decoded["longitude_i"]; ok {
t.Error("found snake_case 'longitude_i' field, expected camelCase 'longitudeI'")
}
// Test User message with underscored fields
user := &meshtasticpb.User{
LongName: "Test User",
ShortName: "TU",
HwModel: meshtasticpb.HardwareModel_TBEAM,
}
jsonBytes, err = json.Marshal(user)
if err != nil {
t.Fatalf("marshaling User to JSON: %v", err)
}
decoded = make(map[string]interface{})
if err := json.Unmarshal(jsonBytes, &decoded); err != nil {
t.Fatalf("unmarshaling JSON: %v", err)
}
// Check camelCase field names
if _, ok := decoded["longName"]; !ok {
t.Error("missing camelCase 'longName' field")
}
if _, ok := decoded["shortName"]; !ok {
t.Error("missing camelCase 'shortName' field")
}
if _, ok := decoded["hwModel"]; !ok {
t.Error("missing camelCase 'hwModel' field")
}
// Check that snake_case fields are NOT present
if _, ok := decoded["long_name"]; ok {
t.Error("found snake_case 'long_name' field, expected camelCase 'longName'")
}
if _, ok := decoded["short_name"]; ok {
t.Error("found snake_case 'short_name' field, expected camelCase 'shortName'")
}
if _, ok := decoded["hw_model"]; ok {
t.Error("found snake_case 'hw_model' field, expected camelCase 'hwModel'")
}
}
// Test POSITION_APP portnum decoding
func TestPacketDecodePositionApp(t *testing.T) {
pos := &meshtasticpb.Position{
LatitudeI: proto.Int32(379208045),
LongitudeI: proto.Int32(-1223928905),
Altitude: proto.Int32(120),
Time: 1234567890,
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_POSITION_APP,
Payload: encodeProto(t, pos),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_POSITION_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedPos, ok := packet.DecodedPayload.(*meshtasticpb.Position)
if !ok {
t.Fatalf("expected *Position, got %T", packet.DecodedPayload)
}
if decodedPos.GetLatitudeI() != 379208045 {
t.Errorf("unexpected latitude: got %d", decodedPos.GetLatitudeI())
}
if decodedPos.GetLongitudeI() != -1223928905 {
t.Errorf("unexpected longitude: got %d", decodedPos.GetLongitudeI())
}
if decodedPos.GetAltitude() != 120 {
t.Errorf("unexpected altitude: got %d", decodedPos.GetAltitude())
}
}
// Test NODEINFO_APP portnum decoding
func TestPacketDecodeNodeInfoApp(t *testing.T) {
user := &meshtasticpb.User{
LongName: "Mesh Node",
ShortName: "MN",
HwModel: meshtasticpb.HardwareModel_TBEAM,
IsLicensed: true,
Macaddr: []byte{0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff},
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_NODEINFO_APP,
Payload: encodeProto(t, user),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_NODEINFO_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedUser, ok := packet.DecodedPayload.(*meshtasticpb.User)
if !ok {
t.Fatalf("expected *User, got %T", packet.DecodedPayload)
}
if decodedUser.GetLongName() != "Mesh Node" {
t.Errorf("unexpected long name: got %s", decodedUser.GetLongName())
}
if decodedUser.GetShortName() != "MN" {
t.Errorf("unexpected short name: got %s", decodedUser.GetShortName())
}
if decodedUser.GetHwModel() != meshtasticpb.HardwareModel_TBEAM {
t.Errorf("unexpected hardware model: got %v", decodedUser.GetHwModel())
}
}
// Test TELEMETRY_APP portnum decoding
func TestPacketDecodeTelemetryApp(t *testing.T) {
batteryLevel := uint32(85)
voltage := float32(12.5)
channelUtil := float32(45.3)
airUtilTx := float32(15.2)
telemetry := &meshtasticpb.Telemetry{
Time: 1234567890,
Variant: &meshtasticpb.Telemetry_DeviceMetrics_{
DeviceMetrics: &meshtasticpb.DeviceMetrics{
BatteryLevel: &batteryLevel,
Voltage: &voltage,
ChannelUtilization: &channelUtil,
AirUtilTx: &airUtilTx,
},
},
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_TELEMETRY_APP,
Payload: encodeProto(t, telemetry),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_TELEMETRY_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedTelem, ok := packet.DecodedPayload.(*meshtasticpb.Telemetry)
if !ok {
t.Fatalf("expected *Telemetry, got %T", packet.DecodedPayload)
}
if decodedTelem.GetTime() != 1234567890 {
t.Errorf("unexpected time: got %d", decodedTelem.GetTime())
}
deviceMetrics := decodedTelem.GetDeviceMetrics()
if deviceMetrics == nil {
t.Fatal("expected DeviceMetrics to be set")
}
if deviceMetrics.GetBatteryLevel() != 85 {
t.Errorf("unexpected battery level: got %d", deviceMetrics.GetBatteryLevel())
}
}
// Test ROUTING_APP portnum decoding
func TestPacketDecodeRoutingApp(t *testing.T) {
routing := &meshtasticpb.Routing{
Variant: &meshtasticpb.Routing_RouteReply_{
RouteReply: &meshtasticpb.Routing_RouteReply{},
},
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_ROUTING_APP,
Payload: encodeProto(t, routing),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_ROUTING_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedRouting, ok := packet.DecodedPayload.(*meshtasticpb.Routing)
if !ok {
t.Fatalf("expected *Routing, got %T", packet.DecodedPayload)
}
if decodedRouting.GetRouteReply() == nil {
t.Fatal("expected RouteReply to be set")
}
}
// Test ADMIN_APP portnum decoding
func TestPacketDecodeAdminApp(t *testing.T) {
// AdminMessage has a sessionPasskey field
admin := &meshtasticpb.AdminMessage{
SessionPasskey: []byte{0x01, 0x02, 0x03, 0x04},
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_ADMIN_APP,
Payload: encodeProto(t, admin),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_ADMIN_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedAdmin, ok := packet.DecodedPayload.(*meshtasticpb.AdminMessage)
if !ok {
t.Fatalf("expected *AdminMessage, got %T", packet.DecodedPayload)
}
if len(decodedAdmin.GetSessionPasskey()) != 4 {
t.Errorf("unexpected session passkey length: got %d", len(decodedAdmin.GetSessionPasskey()))
}
}
// Test WAYPOINT_APP portnum decoding
func TestPacketDecodeWaypointApp(t *testing.T) {
latI := int32(379208045)
lonI := int32(-1223928905)
waypoint := &meshtasticpb.Waypoint{
Id: 1001,
Name: "Home Sweet Home",
Description: "My house",
LatitudeI: &latI,
LongitudeI: &lonI,
Expire: 1234567890,
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_WAYPOINT_APP,
Payload: encodeProto(t, waypoint),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_WAYPOINT_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedWaypoint, ok := packet.DecodedPayload.(*meshtasticpb.Waypoint)
if !ok {
t.Fatalf("expected *Waypoint, got %T", packet.DecodedPayload)
}
if decodedWaypoint.GetName() != "Home Sweet Home" {
t.Errorf("unexpected waypoint name: got %s", decodedWaypoint.GetName())
}
if decodedWaypoint.GetId() != 1001 {
t.Errorf("unexpected waypoint id: got %d", decodedWaypoint.GetId())
}
}
// Test NEIGHBORINFO_APP portnum decoding
func TestPacketDecodeNeighborInfoApp(t *testing.T) {
neighborInfo := &meshtasticpb.NeighborInfo{
NodeId: 12345,
NodeBroadcastIntervalSecs: 60,
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_NEIGHBORINFO_APP,
Payload: encodeProto(t, neighborInfo),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_NEIGHBORINFO_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedNeighbor, ok := packet.DecodedPayload.(*meshtasticpb.NeighborInfo)
if !ok {
t.Fatalf("expected *NeighborInfo, got %T", packet.DecodedPayload)
}
if decodedNeighbor.GetNodeId() != 12345 {
t.Errorf("unexpected node id: got %d", decodedNeighbor.GetNodeId())
}
}
// Test NODE_STATUS_APP portnum decoding
func TestPacketDecodeNodeStatusApp(t *testing.T) {
statusMsg := &meshtasticpb.StatusMessage{
Status: "Device online",
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_NODE_STATUS_APP,
Payload: encodeProto(t, statusMsg),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_NODE_STATUS_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedStatus, ok := packet.DecodedPayload.(*meshtasticpb.StatusMessage)
if !ok {
t.Fatalf("expected *StatusMessage, got %T", packet.DecodedPayload)
}
if decodedStatus.GetStatus() != "Device online" {
t.Errorf("unexpected status: got %s", decodedStatus.GetStatus())
}
}
// Test REMOTE_HARDWARE_APP portnum decoding
func TestPacketDecodeRemoteHardwareApp(t *testing.T) {
hwMsg := &meshtasticpb.HardwareMessage{
Type: meshtasticpb.HardwareMessage_READ_GPIOS,
GpioMask: 0xFF,
}
dataMsg := &meshtasticpb.Data{
Portnum: meshtasticpb.PortNum_REMOTE_HARDWARE_APP,
Payload: encodeProto(t, hwMsg),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != meshtasticpb.PortNum_REMOTE_HARDWARE_APP {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
decodedHw, ok := packet.DecodedPayload.(*meshtasticpb.HardwareMessage)
if !ok {
t.Fatalf("expected *HardwareMessage, got %T", packet.DecodedPayload)
}
if decodedHw.GetType() != meshtasticpb.HardwareMessage_READ_GPIOS {
t.Errorf("unexpected hardware message type: got %v", decodedHw.GetType())
}
}
// Test text payload portnums
func TestPacketDecodeTextPayloads(t *testing.T) {
textPortNums := map[meshtasticpb.PortNum]string{
meshtasticpb.PortNum_TEXT_MESSAGE_APP: "text message app",
meshtasticpb.PortNum_ALERT_APP: "alert message",
meshtasticpb.PortNum_DETECTION_SENSOR_APP: "detection sensor",
meshtasticpb.PortNum_REPLY_APP: "reply message",
meshtasticpb.PortNum_RANGE_TEST_APP: "range test message",
}
for portNum, expectedText := range textPortNums {
t.Run(portNum.String(), func(t *testing.T) {
dataMsg := &meshtasticpb.Data{
Portnum: portNum,
Payload: []byte(expectedText),
}
packet := decodeTestPacket(t, dataMsg)
if packet.Data == nil {
t.Fatal("expected Data protobuf to be decoded")
}
if packet.Data.GetPortnum() != portNum {
t.Fatalf("unexpected portnum: got %v", packet.Data.GetPortnum())
}
if packet.TextPayload != expectedText {
t.Errorf("unexpected text payload: got %q, want %q", packet.TextPayload, expectedText)
}
if packet.DecodedPayload != nil {
t.Errorf("expected no decoded payload for text portnum, got %T", packet.DecodedPayload)
}
})
}
}
// Helper function to encode a proto.Message
func encodeProto(t *testing.T, msg proto.Message) []byte {
encoded, err := proto.Marshal(msg)
if err != nil {
t.Fatalf("marshaling protobuf: %v", err)
}
return encoded
}
// Helper function to create and decode a test packet
func decodeTestPacket(t *testing.T, dataMsg *meshtasticpb.Data) *Packet {
encodedData := encodeProto(t, dataMsg)
rawPacket := make([]byte, 16+len(encodedData))
binary.LittleEndian.PutUint32(rawPacket[0:], 0x12345678) // source
binary.LittleEndian.PutUint32(rawPacket[4:], 0xabcdef01) // destination
binary.LittleEndian.PutUint32(rawPacket[8:], 0x99887766) // id
rawPacket[12] = 0x11 // flags
rawPacket[13] = 0x22 // channelHash
rawPacket[14] = 0x33 // nextHop
rawPacket[15] = 0x44 // relayNode
copy(rawPacket[16:], encodedData)
var packet Packet
if err := packet.Decode(rawPacket); err != nil {
t.Fatalf("decoding packet: %v", err)
}
return &packet
}

File diff suppressed because it is too large Load Diff

View File

View File

@@ -0,0 +1,148 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/apponly.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is the most compact possible representation for a set of channels.
// It includes only one PRIMARY channel (which must be first) and
// any SECONDARY channels.
// No DISABLED channels are included.
// This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
type ChannelSet struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Channel list with settings
Settings []*ChannelSettings `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
// LoRa config
LoraConfig *Config_LoRaConfig `protobuf:"bytes,2,opt,name=lora_config,json=loraConfig,proto3" json:"loraConfig,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelSet) Reset() {
*x = ChannelSet{}
mi := &file_meshtastic_apponly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelSet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelSet) ProtoMessage() {}
func (x *ChannelSet) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_apponly_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelSet.ProtoReflect.Descriptor instead.
func (*ChannelSet) Descriptor() ([]byte, []int) {
return file_meshtastic_apponly_proto_rawDescGZIP(), []int{0}
}
func (x *ChannelSet) GetSettings() []*ChannelSettings {
if x != nil {
return x.Settings
}
return nil
}
func (x *ChannelSet) GetLoraConfig() *Config_LoRaConfig {
if x != nil {
return x.LoraConfig
}
return nil
}
var File_meshtastic_apponly_proto protoreflect.FileDescriptor
const file_meshtastic_apponly_proto_rawDesc = "" +
"\n" +
"\x18meshtastic/apponly.proto\x12\n" +
"meshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\"\x85\x01\n" +
"\n" +
"ChannelSet\x127\n" +
"\bsettings\x18\x01 \x03(\v2\x1b.meshtastic.ChannelSettingsR\bsettings\x12>\n" +
"\vlora_config\x18\x02 \x01(\v2\x1d.meshtastic.Config.LoRaConfigR\n" +
"loraConfigBc\n" +
"\x14org.meshtastic.protoB\rAppOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_apponly_proto_rawDescOnce sync.Once
file_meshtastic_apponly_proto_rawDescData []byte
)
func file_meshtastic_apponly_proto_rawDescGZIP() []byte {
file_meshtastic_apponly_proto_rawDescOnce.Do(func() {
file_meshtastic_apponly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_apponly_proto_rawDesc), len(file_meshtastic_apponly_proto_rawDesc)))
})
return file_meshtastic_apponly_proto_rawDescData
}
var file_meshtastic_apponly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_apponly_proto_goTypes = []any{
(*ChannelSet)(nil), // 0: meshtastic.ChannelSet
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
(*Config_LoRaConfig)(nil), // 2: meshtastic.Config.LoRaConfig
}
var file_meshtastic_apponly_proto_depIdxs = []int32{
1, // 0: meshtastic.ChannelSet.settings:type_name -> meshtastic.ChannelSettings
2, // 1: meshtastic.ChannelSet.lora_config:type_name -> meshtastic.Config.LoRaConfig
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_meshtastic_apponly_proto_init() }
func file_meshtastic_apponly_proto_init() {
if File_meshtastic_apponly_proto != nil {
return
}
file_meshtastic_channel_proto_init()
file_meshtastic_config_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_apponly_proto_rawDesc), len(file_meshtastic_apponly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_apponly_proto_goTypes,
DependencyIndexes: file_meshtastic_apponly_proto_depIdxs,
MessageInfos: file_meshtastic_apponly_proto_msgTypes,
}.Build()
File_meshtastic_apponly_proto = out.File
file_meshtastic_apponly_proto_goTypes = nil
file_meshtastic_apponly_proto_depIdxs = nil
}

View File

@@ -0,0 +1,797 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/atak.proto
// trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH)
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Team int32
const (
// Unspecifed
Team_Unspecifed_Color Team = 0
// White
Team_White Team = 1
// Yellow
Team_Yellow Team = 2
// Orange
Team_Orange Team = 3
// Magenta
Team_Magenta Team = 4
// Red
Team_Red Team = 5
// Maroon
Team_Maroon Team = 6
// Purple
Team_Purple Team = 7
// Dark Blue
Team_Dark_Blue Team = 8
// Blue
Team_Blue Team = 9
// Cyan
Team_Cyan Team = 10
// Teal
Team_Teal Team = 11
// Green
Team_Green Team = 12
// Dark Green
Team_Dark_Green Team = 13
// Brown
Team_Brown Team = 14
)
// Enum value maps for Team.
var (
Team_name = map[int32]string{
0: "Unspecifed_Color",
1: "White",
2: "Yellow",
3: "Orange",
4: "Magenta",
5: "Red",
6: "Maroon",
7: "Purple",
8: "Dark_Blue",
9: "Blue",
10: "Cyan",
11: "Teal",
12: "Green",
13: "Dark_Green",
14: "Brown",
}
Team_value = map[string]int32{
"Unspecifed_Color": 0,
"White": 1,
"Yellow": 2,
"Orange": 3,
"Magenta": 4,
"Red": 5,
"Maroon": 6,
"Purple": 7,
"Dark_Blue": 8,
"Blue": 9,
"Cyan": 10,
"Teal": 11,
"Green": 12,
"Dark_Green": 13,
"Brown": 14,
}
)
func (x Team) Enum() *Team {
p := new(Team)
*p = x
return p
}
func (x Team) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Team) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_atak_proto_enumTypes[0].Descriptor()
}
func (Team) Type() protoreflect.EnumType {
return &file_meshtastic_atak_proto_enumTypes[0]
}
func (x Team) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Team.Descriptor instead.
func (Team) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{0}
}
// Role of the group member
type MemberRole int32
const (
// Unspecifed
MemberRole_Unspecifed MemberRole = 0
// Team Member
MemberRole_TeamMember MemberRole = 1
// Team Lead
MemberRole_TeamLead MemberRole = 2
// Headquarters
MemberRole_HQ MemberRole = 3
// Airsoft enthusiast
MemberRole_Sniper MemberRole = 4
// Medic
MemberRole_Medic MemberRole = 5
// ForwardObserver
MemberRole_ForwardObserver MemberRole = 6
// Radio Telephone Operator
MemberRole_RTO MemberRole = 7
// Doggo
MemberRole_K9 MemberRole = 8
)
// Enum value maps for MemberRole.
var (
MemberRole_name = map[int32]string{
0: "Unspecifed",
1: "TeamMember",
2: "TeamLead",
3: "HQ",
4: "Sniper",
5: "Medic",
6: "ForwardObserver",
7: "RTO",
8: "K9",
}
MemberRole_value = map[string]int32{
"Unspecifed": 0,
"TeamMember": 1,
"TeamLead": 2,
"HQ": 3,
"Sniper": 4,
"Medic": 5,
"ForwardObserver": 6,
"RTO": 7,
"K9": 8,
}
)
func (x MemberRole) Enum() *MemberRole {
p := new(MemberRole)
*p = x
return p
}
func (x MemberRole) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MemberRole) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_atak_proto_enumTypes[1].Descriptor()
}
func (MemberRole) Type() protoreflect.EnumType {
return &file_meshtastic_atak_proto_enumTypes[1]
}
func (x MemberRole) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MemberRole.Descriptor instead.
func (MemberRole) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{1}
}
// Packets for the official ATAK Plugin
type TAKPacket struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Are the payloads strings compressed for LoRA transport?
IsCompressed bool `protobuf:"varint,1,opt,name=is_compressed,json=isCompressed,proto3" json:"isCompressed,omitempty"`
// The contact / callsign for ATAK user
Contact *Contact `protobuf:"bytes,2,opt,name=contact,proto3" json:"contact,omitempty"`
// The group for ATAK user
Group *Group `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`
// The status of the ATAK EUD
Status *Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
// The payload of the packet
//
// Types that are valid to be assigned to PayloadVariant:
//
// *TAKPacket_Pli
// *TAKPacket_Chat
// *TAKPacket_Detail
PayloadVariant isTAKPacket_PayloadVariant `protobuf_oneof:"payload_variant"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TAKPacket) Reset() {
*x = TAKPacket{}
mi := &file_meshtastic_atak_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TAKPacket) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TAKPacket) ProtoMessage() {}
func (x *TAKPacket) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TAKPacket.ProtoReflect.Descriptor instead.
func (*TAKPacket) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{0}
}
func (x *TAKPacket) GetIsCompressed() bool {
if x != nil {
return x.IsCompressed
}
return false
}
func (x *TAKPacket) GetContact() *Contact {
if x != nil {
return x.Contact
}
return nil
}
func (x *TAKPacket) GetGroup() *Group {
if x != nil {
return x.Group
}
return nil
}
func (x *TAKPacket) GetStatus() *Status {
if x != nil {
return x.Status
}
return nil
}
func (x *TAKPacket) GetPayloadVariant() isTAKPacket_PayloadVariant {
if x != nil {
return x.PayloadVariant
}
return nil
}
func (x *TAKPacket) GetPli() *PLI {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Pli); ok {
return x.Pli
}
}
return nil
}
func (x *TAKPacket) GetChat() *GeoChat {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Chat); ok {
return x.Chat
}
}
return nil
}
func (x *TAKPacket) GetDetail() []byte {
if x != nil {
if x, ok := x.PayloadVariant.(*TAKPacket_Detail); ok {
return x.Detail
}
}
return nil
}
type isTAKPacket_PayloadVariant interface {
isTAKPacket_PayloadVariant()
}
type TAKPacket_Pli struct {
// TAK position report
Pli *PLI `protobuf:"bytes,5,opt,name=pli,proto3,oneof"`
}
type TAKPacket_Chat struct {
// ATAK GeoChat message
Chat *GeoChat `protobuf:"bytes,6,opt,name=chat,proto3,oneof"`
}
type TAKPacket_Detail struct {
// Generic CoT detail XML
// May be compressed / truncated by the sender (EUD)
Detail []byte `protobuf:"bytes,7,opt,name=detail,proto3,oneof"`
}
func (*TAKPacket_Pli) isTAKPacket_PayloadVariant() {}
func (*TAKPacket_Chat) isTAKPacket_PayloadVariant() {}
func (*TAKPacket_Detail) isTAKPacket_PayloadVariant() {}
// ATAK GeoChat message
type GeoChat struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The text message
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// Uid recipient of the message
To *string `protobuf:"bytes,2,opt,name=to,proto3,oneof" json:"to,omitempty"`
// Callsign of the recipient for the message
ToCallsign *string `protobuf:"bytes,3,opt,name=to_callsign,json=toCallsign,proto3,oneof" json:"toCallsign,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GeoChat) Reset() {
*x = GeoChat{}
mi := &file_meshtastic_atak_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GeoChat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GeoChat) ProtoMessage() {}
func (x *GeoChat) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GeoChat.ProtoReflect.Descriptor instead.
func (*GeoChat) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{1}
}
func (x *GeoChat) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *GeoChat) GetTo() string {
if x != nil && x.To != nil {
return *x.To
}
return ""
}
func (x *GeoChat) GetToCallsign() string {
if x != nil && x.ToCallsign != nil {
return *x.ToCallsign
}
return ""
}
// ATAK Group
// <__group role='Team Member' name='Cyan'/>
type Group struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Role of the group member
Role MemberRole `protobuf:"varint,1,opt,name=role,proto3,enum=meshtastic.MemberRole" json:"role,omitempty"`
// Team (color)
// Default Cyan
Team Team `protobuf:"varint,2,opt,name=team,proto3,enum=meshtastic.Team" json:"team,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Group) Reset() {
*x = Group{}
mi := &file_meshtastic_atak_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Group) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Group) ProtoMessage() {}
func (x *Group) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Group.ProtoReflect.Descriptor instead.
func (*Group) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{2}
}
func (x *Group) GetRole() MemberRole {
if x != nil {
return x.Role
}
return MemberRole_Unspecifed
}
func (x *Group) GetTeam() Team {
if x != nil {
return x.Team
}
return Team_Unspecifed_Color
}
// ATAK EUD Status
// <status battery='100' />
type Status struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Battery level
Battery uint32 `protobuf:"varint,1,opt,name=battery,proto3" json:"battery,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Status) Reset() {
*x = Status{}
mi := &file_meshtastic_atak_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Status) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Status) ProtoMessage() {}
func (x *Status) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Status.ProtoReflect.Descriptor instead.
func (*Status) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{3}
}
func (x *Status) GetBattery() uint32 {
if x != nil {
return x.Battery
}
return 0
}
// ATAK Contact
// <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
type Contact struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Callsign
Callsign string `protobuf:"bytes,1,opt,name=callsign,proto3" json:"callsign,omitempty"`
// Device callsign
DeviceCallsign string `protobuf:"bytes,2,opt,name=device_callsign,json=deviceCallsign,proto3" json:"deviceCallsign,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Contact) Reset() {
*x = Contact{}
mi := &file_meshtastic_atak_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Contact) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Contact) ProtoMessage() {}
func (x *Contact) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Contact.ProtoReflect.Descriptor instead.
func (*Contact) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{4}
}
func (x *Contact) GetCallsign() string {
if x != nil {
return x.Callsign
}
return ""
}
func (x *Contact) GetDeviceCallsign() string {
if x != nil {
return x.DeviceCallsign
}
return ""
}
// Position Location Information from ATAK
type PLI struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The new preferred location encoding, multiply by 1e-7 to get degrees
// in floating point
LatitudeI int32 `protobuf:"fixed32,1,opt,name=latitude_i,json=latitudeI,proto3" json:"latitudeI,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:"longitudeI,omitempty"`
// Altitude (ATAK prefers HAE)
Altitude int32 `protobuf:"varint,3,opt,name=altitude,proto3" json:"altitude,omitempty"`
// Speed
Speed uint32 `protobuf:"varint,4,opt,name=speed,proto3" json:"speed,omitempty"`
// Course in degrees
Course uint32 `protobuf:"varint,5,opt,name=course,proto3" json:"course,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PLI) Reset() {
*x = PLI{}
mi := &file_meshtastic_atak_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PLI) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PLI) ProtoMessage() {}
func (x *PLI) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_atak_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PLI.ProtoReflect.Descriptor instead.
func (*PLI) Descriptor() ([]byte, []int) {
return file_meshtastic_atak_proto_rawDescGZIP(), []int{5}
}
func (x *PLI) GetLatitudeI() int32 {
if x != nil {
return x.LatitudeI
}
return 0
}
func (x *PLI) GetLongitudeI() int32 {
if x != nil {
return x.LongitudeI
}
return 0
}
func (x *PLI) GetAltitude() int32 {
if x != nil {
return x.Altitude
}
return 0
}
func (x *PLI) GetSpeed() uint32 {
if x != nil {
return x.Speed
}
return 0
}
func (x *PLI) GetCourse() uint32 {
if x != nil {
return x.Course
}
return 0
}
var File_meshtastic_atak_proto protoreflect.FileDescriptor
const file_meshtastic_atak_proto_rawDesc = "" +
"\n" +
"\x15meshtastic/atak.proto\x12\n" +
"meshtastic\"\xb1\x02\n" +
"\tTAKPacket\x12#\n" +
"\ris_compressed\x18\x01 \x01(\bR\fisCompressed\x12-\n" +
"\acontact\x18\x02 \x01(\v2\x13.meshtastic.ContactR\acontact\x12'\n" +
"\x05group\x18\x03 \x01(\v2\x11.meshtastic.GroupR\x05group\x12*\n" +
"\x06status\x18\x04 \x01(\v2\x12.meshtastic.StatusR\x06status\x12#\n" +
"\x03pli\x18\x05 \x01(\v2\x0f.meshtastic.PLIH\x00R\x03pli\x12)\n" +
"\x04chat\x18\x06 \x01(\v2\x13.meshtastic.GeoChatH\x00R\x04chat\x12\x18\n" +
"\x06detail\x18\a \x01(\fH\x00R\x06detailB\x11\n" +
"\x0fpayload_variant\"u\n" +
"\aGeoChat\x12\x18\n" +
"\amessage\x18\x01 \x01(\tR\amessage\x12\x13\n" +
"\x02to\x18\x02 \x01(\tH\x00R\x02to\x88\x01\x01\x12$\n" +
"\vto_callsign\x18\x03 \x01(\tH\x01R\n" +
"toCallsign\x88\x01\x01B\x05\n" +
"\x03_toB\x0e\n" +
"\f_to_callsign\"Y\n" +
"\x05Group\x12*\n" +
"\x04role\x18\x01 \x01(\x0e2\x16.meshtastic.MemberRoleR\x04role\x12$\n" +
"\x04team\x18\x02 \x01(\x0e2\x10.meshtastic.TeamR\x04team\"\"\n" +
"\x06Status\x12\x18\n" +
"\abattery\x18\x01 \x01(\rR\abattery\"N\n" +
"\aContact\x12\x1a\n" +
"\bcallsign\x18\x01 \x01(\tR\bcallsign\x12'\n" +
"\x0fdevice_callsign\x18\x02 \x01(\tR\x0edeviceCallsign\"\x8f\x01\n" +
"\x03PLI\x12\x1d\n" +
"\n" +
"latitude_i\x18\x01 \x01(\x0fR\tlatitudeI\x12\x1f\n" +
"\vlongitude_i\x18\x02 \x01(\x0fR\n" +
"longitudeI\x12\x1a\n" +
"\baltitude\x18\x03 \x01(\x05R\baltitude\x12\x14\n" +
"\x05speed\x18\x04 \x01(\rR\x05speed\x12\x16\n" +
"\x06course\x18\x05 \x01(\rR\x06course*\xc0\x01\n" +
"\x04Team\x12\x14\n" +
"\x10Unspecifed_Color\x10\x00\x12\t\n" +
"\x05White\x10\x01\x12\n" +
"\n" +
"\x06Yellow\x10\x02\x12\n" +
"\n" +
"\x06Orange\x10\x03\x12\v\n" +
"\aMagenta\x10\x04\x12\a\n" +
"\x03Red\x10\x05\x12\n" +
"\n" +
"\x06Maroon\x10\x06\x12\n" +
"\n" +
"\x06Purple\x10\a\x12\r\n" +
"\tDark_Blue\x10\b\x12\b\n" +
"\x04Blue\x10\t\x12\b\n" +
"\x04Cyan\x10\n" +
"\x12\b\n" +
"\x04Teal\x10\v\x12\t\n" +
"\x05Green\x10\f\x12\x0e\n" +
"\n" +
"Dark_Green\x10\r\x12\t\n" +
"\x05Brown\x10\x0e*\x7f\n" +
"\n" +
"MemberRole\x12\x0e\n" +
"\n" +
"Unspecifed\x10\x00\x12\x0e\n" +
"\n" +
"TeamMember\x10\x01\x12\f\n" +
"\bTeamLead\x10\x02\x12\x06\n" +
"\x02HQ\x10\x03\x12\n" +
"\n" +
"\x06Sniper\x10\x04\x12\t\n" +
"\x05Medic\x10\x05\x12\x13\n" +
"\x0fForwardObserver\x10\x06\x12\a\n" +
"\x03RTO\x10\a\x12\x06\n" +
"\x02K9\x10\bB`\n" +
"\x14org.meshtastic.protoB\n" +
"ATAKProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_atak_proto_rawDescOnce sync.Once
file_meshtastic_atak_proto_rawDescData []byte
)
func file_meshtastic_atak_proto_rawDescGZIP() []byte {
file_meshtastic_atak_proto_rawDescOnce.Do(func() {
file_meshtastic_atak_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_atak_proto_rawDesc), len(file_meshtastic_atak_proto_rawDesc)))
})
return file_meshtastic_atak_proto_rawDescData
}
var file_meshtastic_atak_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_meshtastic_atak_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_meshtastic_atak_proto_goTypes = []any{
(Team)(0), // 0: meshtastic.Team
(MemberRole)(0), // 1: meshtastic.MemberRole
(*TAKPacket)(nil), // 2: meshtastic.TAKPacket
(*GeoChat)(nil), // 3: meshtastic.GeoChat
(*Group)(nil), // 4: meshtastic.Group
(*Status)(nil), // 5: meshtastic.Status
(*Contact)(nil), // 6: meshtastic.Contact
(*PLI)(nil), // 7: meshtastic.PLI
}
var file_meshtastic_atak_proto_depIdxs = []int32{
6, // 0: meshtastic.TAKPacket.contact:type_name -> meshtastic.Contact
4, // 1: meshtastic.TAKPacket.group:type_name -> meshtastic.Group
5, // 2: meshtastic.TAKPacket.status:type_name -> meshtastic.Status
7, // 3: meshtastic.TAKPacket.pli:type_name -> meshtastic.PLI
3, // 4: meshtastic.TAKPacket.chat:type_name -> meshtastic.GeoChat
1, // 5: meshtastic.Group.role:type_name -> meshtastic.MemberRole
0, // 6: meshtastic.Group.team:type_name -> meshtastic.Team
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_meshtastic_atak_proto_init() }
func file_meshtastic_atak_proto_init() {
if File_meshtastic_atak_proto != nil {
return
}
file_meshtastic_atak_proto_msgTypes[0].OneofWrappers = []any{
(*TAKPacket_Pli)(nil),
(*TAKPacket_Chat)(nil),
(*TAKPacket_Detail)(nil),
}
file_meshtastic_atak_proto_msgTypes[1].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_atak_proto_rawDesc), len(file_meshtastic_atak_proto_rawDesc)),
NumEnums: 2,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_atak_proto_goTypes,
DependencyIndexes: file_meshtastic_atak_proto_depIdxs,
EnumInfos: file_meshtastic_atak_proto_enumTypes,
MessageInfos: file_meshtastic_atak_proto_msgTypes,
}.Build()
File_meshtastic_atak_proto = out.File
file_meshtastic_atak_proto_goTypes = nil
file_meshtastic_atak_proto_depIdxs = nil
}

View File

@@ -0,0 +1,126 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/cannedmessages.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Canned message module configuration.
type CannedMessageModuleConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Predefined messages for canned message module separated by '|' characters.
Messages string `protobuf:"bytes,1,opt,name=messages,proto3" json:"messages,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CannedMessageModuleConfig) Reset() {
*x = CannedMessageModuleConfig{}
mi := &file_meshtastic_cannedmessages_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CannedMessageModuleConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CannedMessageModuleConfig) ProtoMessage() {}
func (x *CannedMessageModuleConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_cannedmessages_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CannedMessageModuleConfig.ProtoReflect.Descriptor instead.
func (*CannedMessageModuleConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_cannedmessages_proto_rawDescGZIP(), []int{0}
}
func (x *CannedMessageModuleConfig) GetMessages() string {
if x != nil {
return x.Messages
}
return ""
}
var File_meshtastic_cannedmessages_proto protoreflect.FileDescriptor
const file_meshtastic_cannedmessages_proto_rawDesc = "" +
"\n" +
"\x1fmeshtastic/cannedmessages.proto\x12\n" +
"meshtastic\"7\n" +
"\x19CannedMessageModuleConfig\x12\x1a\n" +
"\bmessages\x18\x01 \x01(\tR\bmessagesBo\n" +
"\x14org.meshtastic.protoB\x19CannedMessageConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_cannedmessages_proto_rawDescOnce sync.Once
file_meshtastic_cannedmessages_proto_rawDescData []byte
)
func file_meshtastic_cannedmessages_proto_rawDescGZIP() []byte {
file_meshtastic_cannedmessages_proto_rawDescOnce.Do(func() {
file_meshtastic_cannedmessages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_cannedmessages_proto_rawDesc), len(file_meshtastic_cannedmessages_proto_rawDesc)))
})
return file_meshtastic_cannedmessages_proto_rawDescData
}
var file_meshtastic_cannedmessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_cannedmessages_proto_goTypes = []any{
(*CannedMessageModuleConfig)(nil), // 0: meshtastic.CannedMessageModuleConfig
}
var file_meshtastic_cannedmessages_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_meshtastic_cannedmessages_proto_init() }
func file_meshtastic_cannedmessages_proto_init() {
if File_meshtastic_cannedmessages_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_cannedmessages_proto_rawDesc), len(file_meshtastic_cannedmessages_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_cannedmessages_proto_goTypes,
DependencyIndexes: file_meshtastic_cannedmessages_proto_depIdxs,
MessageInfos: file_meshtastic_cannedmessages_proto_msgTypes,
}.Build()
File_meshtastic_cannedmessages_proto = out.File
file_meshtastic_cannedmessages_proto_goTypes = nil
file_meshtastic_cannedmessages_proto_depIdxs = nil
}

View File

@@ -0,0 +1,435 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/channel.proto
// trunk-ignore(buf-lint/PACKAGE_DIRECTORY_MATCH)
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// How this channel is being used (or not).
// Note: this field is an enum to give us options for the future.
// In particular, someday we might make a 'SCANNING' option.
// SCANNING channels could have different frequencies and the radio would
// occasionally check that freq to see if anything is being transmitted.
// For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
// cross band routing as needed.
// If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
// (but any number of SECONDARY channels can't be sent received on that common frequency)
type Channel_Role int32
const (
// This channel is not in use right now
Channel_DISABLED Channel_Role = 0
// This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY
Channel_PRIMARY Channel_Role = 1
// Secondary channels are only used for encryption/decryption/authentication purposes.
// Their radio settings (freq etc) are ignored, only psk is used.
Channel_SECONDARY Channel_Role = 2
)
// Enum value maps for Channel_Role.
var (
Channel_Role_name = map[int32]string{
0: "DISABLED",
1: "PRIMARY",
2: "SECONDARY",
}
Channel_Role_value = map[string]int32{
"DISABLED": 0,
"PRIMARY": 1,
"SECONDARY": 2,
}
)
func (x Channel_Role) Enum() *Channel_Role {
p := new(Channel_Role)
*p = x
return p
}
func (x Channel_Role) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Channel_Role) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_channel_proto_enumTypes[0].Descriptor()
}
func (Channel_Role) Type() protoreflect.EnumType {
return &file_meshtastic_channel_proto_enumTypes[0]
}
func (x Channel_Role) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Channel_Role.Descriptor instead.
func (Channel_Role) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{2, 0}
}
// This information can be encoded as a QRcode/url so that other users can configure
// their radio to join the same channel.
// A note about how channel names are shown to users: channelname-X
// poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).
// Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
// channel - so that if the user changes anything about the channel (which does
// force a new PSK) this letter will also change. Thus preventing user confusion if
// two friends try to type in a channel name of "BobsChan" and then can't talk
// because their PSKs will be different.
// The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26"
// This also allows the option of someday if people have the PSK off (zero), the
// users COULD type in a channel name and be able to talk.
// FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
// FIXME: explain how apps use channels for security.
// explain how remote settings and remote gpio are managed as an example
type ChannelSettings struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Deprecated in favor of LoraConfig.channel_num
//
// Deprecated: Marked as deprecated in meshtastic/channel.proto.
ChannelNum uint32 `protobuf:"varint,1,opt,name=channel_num,json=channelNum,proto3" json:"channelNum,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:"uplinkEnabled,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:"downlinkEnabled,omitempty"`
// Per-channel module settings.
ModuleSettings *ModuleSettings `protobuf:"bytes,7,opt,name=module_settings,json=moduleSettings,proto3" json:"moduleSettings,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelSettings) Reset() {
*x = ChannelSettings{}
mi := &file_meshtastic_channel_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelSettings) ProtoMessage() {}
func (x *ChannelSettings) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelSettings.ProtoReflect.Descriptor instead.
func (*ChannelSettings) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{0}
}
// Deprecated: Marked as deprecated in meshtastic/channel.proto.
func (x *ChannelSettings) GetChannelNum() uint32 {
if x != nil {
return x.ChannelNum
}
return 0
}
func (x *ChannelSettings) GetPsk() []byte {
if x != nil {
return x.Psk
}
return nil
}
func (x *ChannelSettings) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ChannelSettings) GetId() uint32 {
if x != nil {
return x.Id
}
return 0
}
func (x *ChannelSettings) GetUplinkEnabled() bool {
if x != nil {
return x.UplinkEnabled
}
return false
}
func (x *ChannelSettings) GetDownlinkEnabled() bool {
if x != nil {
return x.DownlinkEnabled
}
return false
}
func (x *ChannelSettings) GetModuleSettings() *ModuleSettings {
if x != nil {
return x.ModuleSettings
}
return nil
}
// This message is specifically for modules to store per-channel configuration data.
type ModuleSettings struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Bits of precision for the location sent in position packets.
PositionPrecision uint32 `protobuf:"varint,1,opt,name=position_precision,json=positionPrecision,proto3" json:"positionPrecision,omitempty"`
// Controls whether or not the client / device should mute the current channel
// Useful for noisy public channels you don't necessarily want to disable
IsMuted bool `protobuf:"varint,2,opt,name=is_muted,json=isMuted,proto3" json:"isMuted,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ModuleSettings) Reset() {
*x = ModuleSettings{}
mi := &file_meshtastic_channel_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ModuleSettings) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ModuleSettings) ProtoMessage() {}
func (x *ModuleSettings) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ModuleSettings.ProtoReflect.Descriptor instead.
func (*ModuleSettings) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{1}
}
func (x *ModuleSettings) GetPositionPrecision() uint32 {
if x != nil {
return x.PositionPrecision
}
return 0
}
func (x *ModuleSettings) GetIsMuted() bool {
if x != nil {
return x.IsMuted
}
return false
}
// A pair of a channel number, mode and the (sharable) settings for that channel
type Channel struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)
// (Someday - not currently implemented) An index of -1 could be used to mean "set by name",
// in which case the target node will find and set the channel by settings.name.
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
// The new settings, or NULL to disable that channel
Settings *ChannelSettings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
// TODO: REPLACE
Role Channel_Role `protobuf:"varint,3,opt,name=role,proto3,enum=meshtastic.Channel_Role" json:"role,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Channel) Reset() {
*x = Channel{}
mi := &file_meshtastic_channel_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Channel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Channel) ProtoMessage() {}
func (x *Channel) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_channel_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Channel.ProtoReflect.Descriptor instead.
func (*Channel) Descriptor() ([]byte, []int) {
return file_meshtastic_channel_proto_rawDescGZIP(), []int{2}
}
func (x *Channel) GetIndex() int32 {
if x != nil {
return x.Index
}
return 0
}
func (x *Channel) GetSettings() *ChannelSettings {
if x != nil {
return x.Settings
}
return nil
}
func (x *Channel) GetRole() Channel_Role {
if x != nil {
return x.Role
}
return Channel_DISABLED
}
var File_meshtastic_channel_proto protoreflect.FileDescriptor
const file_meshtastic_channel_proto_rawDesc = "" +
"\n" +
"\x18meshtastic/channel.proto\x12\n" +
"meshtastic\"\x83\x02\n" +
"\x0fChannelSettings\x12#\n" +
"\vchannel_num\x18\x01 \x01(\rB\x02\x18\x01R\n" +
"channelNum\x12\x10\n" +
"\x03psk\x18\x02 \x01(\fR\x03psk\x12\x12\n" +
"\x04name\x18\x03 \x01(\tR\x04name\x12\x0e\n" +
"\x02id\x18\x04 \x01(\aR\x02id\x12%\n" +
"\x0euplink_enabled\x18\x05 \x01(\bR\ruplinkEnabled\x12)\n" +
"\x10downlink_enabled\x18\x06 \x01(\bR\x0fdownlinkEnabled\x12C\n" +
"\x0fmodule_settings\x18\a \x01(\v2\x1a.meshtastic.ModuleSettingsR\x0emoduleSettings\"Z\n" +
"\x0eModuleSettings\x12-\n" +
"\x12position_precision\x18\x01 \x01(\rR\x11positionPrecision\x12\x19\n" +
"\bis_muted\x18\x02 \x01(\bR\aisMuted\"\xb8\x01\n" +
"\aChannel\x12\x14\n" +
"\x05index\x18\x01 \x01(\x05R\x05index\x127\n" +
"\bsettings\x18\x02 \x01(\v2\x1b.meshtastic.ChannelSettingsR\bsettings\x12,\n" +
"\x04role\x18\x03 \x01(\x0e2\x18.meshtastic.Channel.RoleR\x04role\"0\n" +
"\x04Role\x12\f\n" +
"\bDISABLED\x10\x00\x12\v\n" +
"\aPRIMARY\x10\x01\x12\r\n" +
"\tSECONDARY\x10\x02Bc\n" +
"\x14org.meshtastic.protoB\rChannelProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_channel_proto_rawDescOnce sync.Once
file_meshtastic_channel_proto_rawDescData []byte
)
func file_meshtastic_channel_proto_rawDescGZIP() []byte {
file_meshtastic_channel_proto_rawDescOnce.Do(func() {
file_meshtastic_channel_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_channel_proto_rawDesc), len(file_meshtastic_channel_proto_rawDesc)))
})
return file_meshtastic_channel_proto_rawDescData
}
var file_meshtastic_channel_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_channel_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_meshtastic_channel_proto_goTypes = []any{
(Channel_Role)(0), // 0: meshtastic.Channel.Role
(*ChannelSettings)(nil), // 1: meshtastic.ChannelSettings
(*ModuleSettings)(nil), // 2: meshtastic.ModuleSettings
(*Channel)(nil), // 3: meshtastic.Channel
}
var file_meshtastic_channel_proto_depIdxs = []int32{
2, // 0: meshtastic.ChannelSettings.module_settings:type_name -> meshtastic.ModuleSettings
1, // 1: meshtastic.Channel.settings:type_name -> meshtastic.ChannelSettings
0, // 2: meshtastic.Channel.role:type_name -> meshtastic.Channel.Role
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_meshtastic_channel_proto_init() }
func file_meshtastic_channel_proto_init() {
if File_meshtastic_channel_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_channel_proto_rawDesc), len(file_meshtastic_channel_proto_rawDesc)),
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_channel_proto_goTypes,
DependencyIndexes: file_meshtastic_channel_proto_depIdxs,
EnumInfos: file_meshtastic_channel_proto_enumTypes,
MessageInfos: file_meshtastic_channel_proto_msgTypes,
}.Build()
File_meshtastic_channel_proto = out.File
file_meshtastic_channel_proto_goTypes = nil
file_meshtastic_channel_proto_depIdxs = nil
}

View File

@@ -0,0 +1,217 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/clientonly.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This abstraction is used to contain any configuration for provisioning a node on any client.
// It is useful for importing and exporting configurations.
type DeviceProfile struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Long name for the node
LongName *string `protobuf:"bytes,1,opt,name=long_name,json=longName,proto3,oneof" json:"longName,omitempty"`
// Short name of the node
ShortName *string `protobuf:"bytes,2,opt,name=short_name,json=shortName,proto3,oneof" json:"shortName,omitempty"`
// The url of the channels from our node
ChannelUrl *string `protobuf:"bytes,3,opt,name=channel_url,json=channelUrl,proto3,oneof" json:"channelUrl,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:"moduleConfig,omitempty"`
// Fixed position data
FixedPosition *Position `protobuf:"bytes,6,opt,name=fixed_position,json=fixedPosition,proto3,oneof" json:"fixedPosition,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:"cannedMessages,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceProfile) Reset() {
*x = DeviceProfile{}
mi := &file_meshtastic_clientonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceProfile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceProfile) ProtoMessage() {}
func (x *DeviceProfile) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_clientonly_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceProfile.ProtoReflect.Descriptor instead.
func (*DeviceProfile) Descriptor() ([]byte, []int) {
return file_meshtastic_clientonly_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceProfile) GetLongName() string {
if x != nil && x.LongName != nil {
return *x.LongName
}
return ""
}
func (x *DeviceProfile) GetShortName() string {
if x != nil && x.ShortName != nil {
return *x.ShortName
}
return ""
}
func (x *DeviceProfile) GetChannelUrl() string {
if x != nil && x.ChannelUrl != nil {
return *x.ChannelUrl
}
return ""
}
func (x *DeviceProfile) GetConfig() *LocalConfig {
if x != nil {
return x.Config
}
return nil
}
func (x *DeviceProfile) GetModuleConfig() *LocalModuleConfig {
if x != nil {
return x.ModuleConfig
}
return nil
}
func (x *DeviceProfile) GetFixedPosition() *Position {
if x != nil {
return x.FixedPosition
}
return nil
}
func (x *DeviceProfile) GetRingtone() string {
if x != nil && x.Ringtone != nil {
return *x.Ringtone
}
return ""
}
func (x *DeviceProfile) GetCannedMessages() string {
if x != nil && x.CannedMessages != nil {
return *x.CannedMessages
}
return ""
}
var File_meshtastic_clientonly_proto protoreflect.FileDescriptor
const file_meshtastic_clientonly_proto_rawDesc = "" +
"\n" +
"\x1bmeshtastic/clientonly.proto\x12\n" +
"meshtastic\x1a\x1ameshtastic/localonly.proto\x1a\x15meshtastic/mesh.proto\"\x89\x04\n" +
"\rDeviceProfile\x12 \n" +
"\tlong_name\x18\x01 \x01(\tH\x00R\blongName\x88\x01\x01\x12\"\n" +
"\n" +
"short_name\x18\x02 \x01(\tH\x01R\tshortName\x88\x01\x01\x12$\n" +
"\vchannel_url\x18\x03 \x01(\tH\x02R\n" +
"channelUrl\x88\x01\x01\x124\n" +
"\x06config\x18\x04 \x01(\v2\x17.meshtastic.LocalConfigH\x03R\x06config\x88\x01\x01\x12G\n" +
"\rmodule_config\x18\x05 \x01(\v2\x1d.meshtastic.LocalModuleConfigH\x04R\fmoduleConfig\x88\x01\x01\x12@\n" +
"\x0efixed_position\x18\x06 \x01(\v2\x14.meshtastic.PositionH\x05R\rfixedPosition\x88\x01\x01\x12\x1f\n" +
"\bringtone\x18\a \x01(\tH\x06R\bringtone\x88\x01\x01\x12,\n" +
"\x0fcanned_messages\x18\b \x01(\tH\aR\x0ecannedMessages\x88\x01\x01B\f\n" +
"\n" +
"_long_nameB\r\n" +
"\v_short_nameB\x0e\n" +
"\f_channel_urlB\t\n" +
"\a_configB\x10\n" +
"\x0e_module_configB\x11\n" +
"\x0f_fixed_positionB\v\n" +
"\t_ringtoneB\x12\n" +
"\x10_canned_messagesBf\n" +
"\x14org.meshtastic.protoB\x10ClientOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_clientonly_proto_rawDescOnce sync.Once
file_meshtastic_clientonly_proto_rawDescData []byte
)
func file_meshtastic_clientonly_proto_rawDescGZIP() []byte {
file_meshtastic_clientonly_proto_rawDescOnce.Do(func() {
file_meshtastic_clientonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_clientonly_proto_rawDesc), len(file_meshtastic_clientonly_proto_rawDesc)))
})
return file_meshtastic_clientonly_proto_rawDescData
}
var file_meshtastic_clientonly_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_clientonly_proto_goTypes = []any{
(*DeviceProfile)(nil), // 0: meshtastic.DeviceProfile
(*LocalConfig)(nil), // 1: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 2: meshtastic.LocalModuleConfig
(*Position)(nil), // 3: meshtastic.Position
}
var file_meshtastic_clientonly_proto_depIdxs = []int32{
1, // 0: meshtastic.DeviceProfile.config:type_name -> meshtastic.LocalConfig
2, // 1: meshtastic.DeviceProfile.module_config:type_name -> meshtastic.LocalModuleConfig
3, // 2: meshtastic.DeviceProfile.fixed_position:type_name -> meshtastic.Position
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_meshtastic_clientonly_proto_init() }
func file_meshtastic_clientonly_proto_init() {
if File_meshtastic_clientonly_proto != nil {
return
}
file_meshtastic_localonly_proto_init()
file_meshtastic_mesh_proto_init()
file_meshtastic_clientonly_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_clientonly_proto_rawDesc), len(file_meshtastic_clientonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_clientonly_proto_goTypes,
DependencyIndexes: file_meshtastic_clientonly_proto_depIdxs,
MessageInfos: file_meshtastic_clientonly_proto_msgTypes,
}.Build()
File_meshtastic_clientonly_proto = out.File
file_meshtastic_clientonly_proto_goTypes = nil
file_meshtastic_clientonly_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,493 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/connection_status.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DeviceConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// WiFi Status
Wifi *WifiConnectionStatus `protobuf:"bytes,1,opt,name=wifi,proto3,oneof" json:"wifi,omitempty"`
// WiFi Status
Ethernet *EthernetConnectionStatus `protobuf:"bytes,2,opt,name=ethernet,proto3,oneof" json:"ethernet,omitempty"`
// Bluetooth Status
Bluetooth *BluetoothConnectionStatus `protobuf:"bytes,3,opt,name=bluetooth,proto3,oneof" json:"bluetooth,omitempty"`
// Serial Status
Serial *SerialConnectionStatus `protobuf:"bytes,4,opt,name=serial,proto3,oneof" json:"serial,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceConnectionStatus) Reset() {
*x = DeviceConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceConnectionStatus) ProtoMessage() {}
func (x *DeviceConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceConnectionStatus.ProtoReflect.Descriptor instead.
func (*DeviceConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{0}
}
func (x *DeviceConnectionStatus) GetWifi() *WifiConnectionStatus {
if x != nil {
return x.Wifi
}
return nil
}
func (x *DeviceConnectionStatus) GetEthernet() *EthernetConnectionStatus {
if x != nil {
return x.Ethernet
}
return nil
}
func (x *DeviceConnectionStatus) GetBluetooth() *BluetoothConnectionStatus {
if x != nil {
return x.Bluetooth
}
return nil
}
func (x *DeviceConnectionStatus) GetSerial() *SerialConnectionStatus {
if x != nil {
return x.Serial
}
return nil
}
// WiFi connection status
type WifiConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Connection status
Status *NetworkConnectionStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// WiFi access point SSID
Ssid string `protobuf:"bytes,2,opt,name=ssid,proto3" json:"ssid,omitempty"`
// RSSI of wireless connection
Rssi int32 `protobuf:"varint,3,opt,name=rssi,proto3" json:"rssi,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WifiConnectionStatus) Reset() {
*x = WifiConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WifiConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WifiConnectionStatus) ProtoMessage() {}
func (x *WifiConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WifiConnectionStatus.ProtoReflect.Descriptor instead.
func (*WifiConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{1}
}
func (x *WifiConnectionStatus) GetStatus() *NetworkConnectionStatus {
if x != nil {
return x.Status
}
return nil
}
func (x *WifiConnectionStatus) GetSsid() string {
if x != nil {
return x.Ssid
}
return ""
}
func (x *WifiConnectionStatus) GetRssi() int32 {
if x != nil {
return x.Rssi
}
return 0
}
// Ethernet connection status
type EthernetConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Connection status
Status *NetworkConnectionStatus `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *EthernetConnectionStatus) Reset() {
*x = EthernetConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *EthernetConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EthernetConnectionStatus) ProtoMessage() {}
func (x *EthernetConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EthernetConnectionStatus.ProtoReflect.Descriptor instead.
func (*EthernetConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{2}
}
func (x *EthernetConnectionStatus) GetStatus() *NetworkConnectionStatus {
if x != nil {
return x.Status
}
return nil
}
// Ethernet or WiFi connection status
type NetworkConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// IP address of device
IpAddress uint32 `protobuf:"fixed32,1,opt,name=ip_address,json=ipAddress,proto3" json:"ipAddress,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,2,opt,name=is_connected,json=isConnected,proto3" json:"isConnected,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:"isMqttConnected,omitempty"`
// Whether the device is actively remote syslogging or not
IsSyslogConnected bool `protobuf:"varint,4,opt,name=is_syslog_connected,json=isSyslogConnected,proto3" json:"isSyslogConnected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NetworkConnectionStatus) Reset() {
*x = NetworkConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NetworkConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NetworkConnectionStatus) ProtoMessage() {}
func (x *NetworkConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NetworkConnectionStatus.ProtoReflect.Descriptor instead.
func (*NetworkConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{3}
}
func (x *NetworkConnectionStatus) GetIpAddress() uint32 {
if x != nil {
return x.IpAddress
}
return 0
}
func (x *NetworkConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
func (x *NetworkConnectionStatus) GetIsMqttConnected() bool {
if x != nil {
return x.IsMqttConnected
}
return false
}
func (x *NetworkConnectionStatus) GetIsSyslogConnected() bool {
if x != nil {
return x.IsSyslogConnected
}
return false
}
// Bluetooth connection status
type BluetoothConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The pairing PIN for bluetooth
Pin uint32 `protobuf:"varint,1,opt,name=pin,proto3" json:"pin,omitempty"`
// RSSI of bluetooth connection
Rssi int32 `protobuf:"varint,2,opt,name=rssi,proto3" json:"rssi,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,3,opt,name=is_connected,json=isConnected,proto3" json:"isConnected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BluetoothConnectionStatus) Reset() {
*x = BluetoothConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BluetoothConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BluetoothConnectionStatus) ProtoMessage() {}
func (x *BluetoothConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BluetoothConnectionStatus.ProtoReflect.Descriptor instead.
func (*BluetoothConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{4}
}
func (x *BluetoothConnectionStatus) GetPin() uint32 {
if x != nil {
return x.Pin
}
return 0
}
func (x *BluetoothConnectionStatus) GetRssi() int32 {
if x != nil {
return x.Rssi
}
return 0
}
func (x *BluetoothConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
// Serial connection status
type SerialConnectionStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Serial baud rate
Baud uint32 `protobuf:"varint,1,opt,name=baud,proto3" json:"baud,omitempty"`
// Whether the device has an active connection or not
IsConnected bool `protobuf:"varint,2,opt,name=is_connected,json=isConnected,proto3" json:"isConnected,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SerialConnectionStatus) Reset() {
*x = SerialConnectionStatus{}
mi := &file_meshtastic_connection_status_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SerialConnectionStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SerialConnectionStatus) ProtoMessage() {}
func (x *SerialConnectionStatus) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_connection_status_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SerialConnectionStatus.ProtoReflect.Descriptor instead.
func (*SerialConnectionStatus) Descriptor() ([]byte, []int) {
return file_meshtastic_connection_status_proto_rawDescGZIP(), []int{5}
}
func (x *SerialConnectionStatus) GetBaud() uint32 {
if x != nil {
return x.Baud
}
return 0
}
func (x *SerialConnectionStatus) GetIsConnected() bool {
if x != nil {
return x.IsConnected
}
return false
}
var File_meshtastic_connection_status_proto protoreflect.FileDescriptor
const file_meshtastic_connection_status_proto_rawDesc = "" +
"\n" +
"\"meshtastic/connection_status.proto\x12\n" +
"meshtastic\"\xd4\x02\n" +
"\x16DeviceConnectionStatus\x129\n" +
"\x04wifi\x18\x01 \x01(\v2 .meshtastic.WifiConnectionStatusH\x00R\x04wifi\x88\x01\x01\x12E\n" +
"\bethernet\x18\x02 \x01(\v2$.meshtastic.EthernetConnectionStatusH\x01R\bethernet\x88\x01\x01\x12H\n" +
"\tbluetooth\x18\x03 \x01(\v2%.meshtastic.BluetoothConnectionStatusH\x02R\tbluetooth\x88\x01\x01\x12?\n" +
"\x06serial\x18\x04 \x01(\v2\".meshtastic.SerialConnectionStatusH\x03R\x06serial\x88\x01\x01B\a\n" +
"\x05_wifiB\v\n" +
"\t_ethernetB\f\n" +
"\n" +
"_bluetoothB\t\n" +
"\a_serial\"{\n" +
"\x14WifiConnectionStatus\x12;\n" +
"\x06status\x18\x01 \x01(\v2#.meshtastic.NetworkConnectionStatusR\x06status\x12\x12\n" +
"\x04ssid\x18\x02 \x01(\tR\x04ssid\x12\x12\n" +
"\x04rssi\x18\x03 \x01(\x05R\x04rssi\"W\n" +
"\x18EthernetConnectionStatus\x12;\n" +
"\x06status\x18\x01 \x01(\v2#.meshtastic.NetworkConnectionStatusR\x06status\"\xb7\x01\n" +
"\x17NetworkConnectionStatus\x12\x1d\n" +
"\n" +
"ip_address\x18\x01 \x01(\aR\tipAddress\x12!\n" +
"\fis_connected\x18\x02 \x01(\bR\visConnected\x12*\n" +
"\x11is_mqtt_connected\x18\x03 \x01(\bR\x0fisMqttConnected\x12.\n" +
"\x13is_syslog_connected\x18\x04 \x01(\bR\x11isSyslogConnected\"d\n" +
"\x19BluetoothConnectionStatus\x12\x10\n" +
"\x03pin\x18\x01 \x01(\rR\x03pin\x12\x12\n" +
"\x04rssi\x18\x02 \x01(\x05R\x04rssi\x12!\n" +
"\fis_connected\x18\x03 \x01(\bR\visConnected\"O\n" +
"\x16SerialConnectionStatus\x12\x12\n" +
"\x04baud\x18\x01 \x01(\rR\x04baud\x12!\n" +
"\fis_connected\x18\x02 \x01(\bR\visConnectedBf\n" +
"\x14org.meshtastic.protoB\x10ConnStatusProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_connection_status_proto_rawDescOnce sync.Once
file_meshtastic_connection_status_proto_rawDescData []byte
)
func file_meshtastic_connection_status_proto_rawDescGZIP() []byte {
file_meshtastic_connection_status_proto_rawDescOnce.Do(func() {
file_meshtastic_connection_status_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_connection_status_proto_rawDesc), len(file_meshtastic_connection_status_proto_rawDesc)))
})
return file_meshtastic_connection_status_proto_rawDescData
}
var file_meshtastic_connection_status_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_meshtastic_connection_status_proto_goTypes = []any{
(*DeviceConnectionStatus)(nil), // 0: meshtastic.DeviceConnectionStatus
(*WifiConnectionStatus)(nil), // 1: meshtastic.WifiConnectionStatus
(*EthernetConnectionStatus)(nil), // 2: meshtastic.EthernetConnectionStatus
(*NetworkConnectionStatus)(nil), // 3: meshtastic.NetworkConnectionStatus
(*BluetoothConnectionStatus)(nil), // 4: meshtastic.BluetoothConnectionStatus
(*SerialConnectionStatus)(nil), // 5: meshtastic.SerialConnectionStatus
}
var file_meshtastic_connection_status_proto_depIdxs = []int32{
1, // 0: meshtastic.DeviceConnectionStatus.wifi:type_name -> meshtastic.WifiConnectionStatus
2, // 1: meshtastic.DeviceConnectionStatus.ethernet:type_name -> meshtastic.EthernetConnectionStatus
4, // 2: meshtastic.DeviceConnectionStatus.bluetooth:type_name -> meshtastic.BluetoothConnectionStatus
5, // 3: meshtastic.DeviceConnectionStatus.serial:type_name -> meshtastic.SerialConnectionStatus
3, // 4: meshtastic.WifiConnectionStatus.status:type_name -> meshtastic.NetworkConnectionStatus
3, // 5: meshtastic.EthernetConnectionStatus.status:type_name -> meshtastic.NetworkConnectionStatus
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_meshtastic_connection_status_proto_init() }
func file_meshtastic_connection_status_proto_init() {
if File_meshtastic_connection_status_proto != nil {
return
}
file_meshtastic_connection_status_proto_msgTypes[0].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_connection_status_proto_rawDesc), len(file_meshtastic_connection_status_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_connection_status_proto_goTypes,
DependencyIndexes: file_meshtastic_connection_status_proto_depIdxs,
MessageInfos: file_meshtastic_connection_status_proto_msgTypes,
}.Build()
File_meshtastic_connection_status_proto = out.File
file_meshtastic_connection_status_proto_goTypes = nil
file_meshtastic_connection_status_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,892 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/deviceonly.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Position with static location information only for NodeDBLite
type PositionLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The new preferred location encoding, multiply by 1e-7 to get degrees
// in floating point
LatitudeI int32 `protobuf:"fixed32,1,opt,name=latitude_i,json=latitudeI,proto3" json:"latitudeI,omitempty"`
// TODO: REPLACE
LongitudeI int32 `protobuf:"fixed32,2,opt,name=longitude_i,json=longitudeI,proto3" json:"longitudeI,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:"locationSource,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PositionLite) Reset() {
*x = PositionLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PositionLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PositionLite) ProtoMessage() {}
func (x *PositionLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PositionLite.ProtoReflect.Descriptor instead.
func (*PositionLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{0}
}
func (x *PositionLite) GetLatitudeI() int32 {
if x != nil {
return x.LatitudeI
}
return 0
}
func (x *PositionLite) GetLongitudeI() int32 {
if x != nil {
return x.LongitudeI
}
return 0
}
func (x *PositionLite) GetAltitude() int32 {
if x != nil {
return x.Altitude
}
return 0
}
func (x *PositionLite) GetTime() uint32 {
if x != nil {
return x.Time
}
return 0
}
func (x *PositionLite) GetLocationSource() Position_LocSource {
if x != nil {
return x.LocationSource
}
return Position_LOC_UNSET
}
type UserLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// This is the addr of the radio.
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
Macaddr []byte `protobuf:"bytes,1,opt,name=macaddr,proto3" json:"macaddr,omitempty"`
// A full name for this user, i.e. "Kevin Hester"
LongName string `protobuf:"bytes,2,opt,name=long_name,json=longName,proto3" json:"longName,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:"shortName,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:"hwModel,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:"isLicensed,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:"publicKey,omitempty"`
// Whether or not the node can be messaged
IsUnmessagable *bool `protobuf:"varint,9,opt,name=is_unmessagable,json=isUnmessagable,proto3,oneof" json:"isUnmessagable,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UserLite) Reset() {
*x = UserLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UserLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserLite) ProtoMessage() {}
func (x *UserLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UserLite.ProtoReflect.Descriptor instead.
func (*UserLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{1}
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *UserLite) GetMacaddr() []byte {
if x != nil {
return x.Macaddr
}
return nil
}
func (x *UserLite) GetLongName() string {
if x != nil {
return x.LongName
}
return ""
}
func (x *UserLite) GetShortName() string {
if x != nil {
return x.ShortName
}
return ""
}
func (x *UserLite) GetHwModel() HardwareModel {
if x != nil {
return x.HwModel
}
return HardwareModel_UNSET
}
func (x *UserLite) GetIsLicensed() bool {
if x != nil {
return x.IsLicensed
}
return false
}
func (x *UserLite) GetRole() Config_DeviceConfig_Role {
if x != nil {
return x.Role
}
return Config_DeviceConfig_CLIENT
}
func (x *UserLite) GetPublicKey() []byte {
if x != nil {
return x.PublicKey
}
return nil
}
func (x *UserLite) GetIsUnmessagable() bool {
if x != nil && x.IsUnmessagable != nil {
return *x.IsUnmessagable
}
return false
}
type NodeInfoLite struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The node number
Num uint32 `protobuf:"varint,1,opt,name=num,proto3" json:"num,omitempty"`
// The user info for this node
User *UserLite `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
// Position.time now indicates the last time we received a POSITION from that node.
Position *PositionLite `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"`
// Returns the Signal-to-noise ratio (SNR) of the last received message,
// as measured by the receiver. Return SNR of the last received message in dB
Snr float32 `protobuf:"fixed32,4,opt,name=snr,proto3" json:"snr,omitempty"`
// Set to indicate the last time we received a packet from this node
LastHeard uint32 `protobuf:"fixed32,5,opt,name=last_heard,json=lastHeard,proto3" json:"lastHeard,omitempty"`
// The latest device metrics for the node.
DeviceMetrics *DeviceMetrics `protobuf:"bytes,6,opt,name=device_metrics,json=deviceMetrics,proto3" json:"deviceMetrics,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:"viaMqtt,omitempty"`
// Number of hops away from us this node is (0 if direct neighbor)
HopsAway *uint32 `protobuf:"varint,9,opt,name=hops_away,json=hopsAway,proto3,oneof" json:"hopsAway,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:"isFavorite,omitempty"`
// True if node is in our ignored list
// Persists between NodeDB internal clean ups
IsIgnored bool `protobuf:"varint,11,opt,name=is_ignored,json=isIgnored,proto3" json:"isIgnored,omitempty"`
// Last byte of the node number of the node that should be used as the next hop to reach this node.
NextHop uint32 `protobuf:"varint,12,opt,name=next_hop,json=nextHop,proto3" json:"nextHop,omitempty"`
// Bitfield for storing booleans.
// LSB 0 is_key_manually_verified
// LSB 1 is_muted
Bitfield uint32 `protobuf:"varint,13,opt,name=bitfield,proto3" json:"bitfield,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeInfoLite) Reset() {
*x = NodeInfoLite{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeInfoLite) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeInfoLite) ProtoMessage() {}
func (x *NodeInfoLite) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeInfoLite.ProtoReflect.Descriptor instead.
func (*NodeInfoLite) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{2}
}
func (x *NodeInfoLite) GetNum() uint32 {
if x != nil {
return x.Num
}
return 0
}
func (x *NodeInfoLite) GetUser() *UserLite {
if x != nil {
return x.User
}
return nil
}
func (x *NodeInfoLite) GetPosition() *PositionLite {
if x != nil {
return x.Position
}
return nil
}
func (x *NodeInfoLite) GetSnr() float32 {
if x != nil {
return x.Snr
}
return 0
}
func (x *NodeInfoLite) GetLastHeard() uint32 {
if x != nil {
return x.LastHeard
}
return 0
}
func (x *NodeInfoLite) GetDeviceMetrics() *DeviceMetrics {
if x != nil {
return x.DeviceMetrics
}
return nil
}
func (x *NodeInfoLite) GetChannel() uint32 {
if x != nil {
return x.Channel
}
return 0
}
func (x *NodeInfoLite) GetViaMqtt() bool {
if x != nil {
return x.ViaMqtt
}
return false
}
func (x *NodeInfoLite) GetHopsAway() uint32 {
if x != nil && x.HopsAway != nil {
return *x.HopsAway
}
return 0
}
func (x *NodeInfoLite) GetIsFavorite() bool {
if x != nil {
return x.IsFavorite
}
return false
}
func (x *NodeInfoLite) GetIsIgnored() bool {
if x != nil {
return x.IsIgnored
}
return false
}
func (x *NodeInfoLite) GetNextHop() uint32 {
if x != nil {
return x.NextHop
}
return 0
}
func (x *NodeInfoLite) GetBitfield() uint32 {
if x != nil {
return x.Bitfield
}
return 0
}
// This message is never sent over the wire, but it is used for serializing DB
// state to flash in the device code
// FIXME, since we write this each time we enter deep sleep (and have infinite
// flash) it would be better to use some sort of append only data structure for
// the receive queue and use the preferences store for the other stuff
type DeviceState struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Read only settings/info about this node
MyNode *MyNodeInfo `protobuf:"bytes,2,opt,name=my_node,json=myNode,proto3" json:"myNode,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:"receiveQueue,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:"rxTextMessage,omitempty"`
// Used only during development.
// Indicates developer is testing and changes should never be saved to flash.
// Deprecated in 2.3.1
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
NoSave bool `protobuf:"varint,9,opt,name=no_save,json=noSave,proto3" json:"noSave,omitempty"`
// Previously used to manage GPS factory resets.
// Deprecated in 2.5.23
//
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
DidGpsReset bool `protobuf:"varint,11,opt,name=did_gps_reset,json=didGpsReset,proto3" json:"didGpsReset,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:"rxWaypoint,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:"nodeRemoteHardwarePins,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeviceState) Reset() {
*x = DeviceState{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeviceState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeviceState) ProtoMessage() {}
func (x *DeviceState) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeviceState.ProtoReflect.Descriptor instead.
func (*DeviceState) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{3}
}
func (x *DeviceState) GetMyNode() *MyNodeInfo {
if x != nil {
return x.MyNode
}
return nil
}
func (x *DeviceState) GetOwner() *User {
if x != nil {
return x.Owner
}
return nil
}
func (x *DeviceState) GetReceiveQueue() []*MeshPacket {
if x != nil {
return x.ReceiveQueue
}
return nil
}
func (x *DeviceState) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *DeviceState) GetRxTextMessage() *MeshPacket {
if x != nil {
return x.RxTextMessage
}
return nil
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *DeviceState) GetNoSave() bool {
if x != nil {
return x.NoSave
}
return false
}
// Deprecated: Marked as deprecated in meshtastic/deviceonly.proto.
func (x *DeviceState) GetDidGpsReset() bool {
if x != nil {
return x.DidGpsReset
}
return false
}
func (x *DeviceState) GetRxWaypoint() *MeshPacket {
if x != nil {
return x.RxWaypoint
}
return nil
}
func (x *DeviceState) GetNodeRemoteHardwarePins() []*NodeRemoteHardwarePin {
if x != nil {
return x.NodeRemoteHardwarePins
}
return nil
}
type NodeDatabase struct {
state protoimpl.MessageState `protogen:"open.v1"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// New lite version of NodeDB to decrease memory footprint
Nodes []*NodeInfoLite `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *NodeDatabase) Reset() {
*x = NodeDatabase{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NodeDatabase) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeDatabase) ProtoMessage() {}
func (x *NodeDatabase) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeDatabase.ProtoReflect.Descriptor instead.
func (*NodeDatabase) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{4}
}
func (x *NodeDatabase) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *NodeDatabase) GetNodes() []*NodeInfoLite {
if x != nil {
return x.Nodes
}
return nil
}
// The on-disk saved channels
type ChannelFile struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The channels our node knows about
Channels []*Channel `protobuf:"bytes,1,rep,name=channels,proto3" json:"channels,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ChannelFile) Reset() {
*x = ChannelFile{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ChannelFile) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChannelFile) ProtoMessage() {}
func (x *ChannelFile) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChannelFile.ProtoReflect.Descriptor instead.
func (*ChannelFile) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{5}
}
func (x *ChannelFile) GetChannels() []*Channel {
if x != nil {
return x.Channels
}
return nil
}
func (x *ChannelFile) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
// The on-disk backup of the node's preferences
type BackupPreferences struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The version of the backup
Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
// The timestamp of the backup (if node has time)
Timestamp uint32 `protobuf:"fixed32,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The node's configuration
Config *LocalConfig `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
// The node's module configuration
ModuleConfig *LocalModuleConfig `protobuf:"bytes,4,opt,name=module_config,json=moduleConfig,proto3" json:"moduleConfig,omitempty"`
// The node's channels
Channels *ChannelFile `protobuf:"bytes,5,opt,name=channels,proto3" json:"channels,omitempty"`
// The node's user (owner) information
Owner *User `protobuf:"bytes,6,opt,name=owner,proto3" json:"owner,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *BackupPreferences) Reset() {
*x = BackupPreferences{}
mi := &file_meshtastic_deviceonly_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *BackupPreferences) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupPreferences) ProtoMessage() {}
func (x *BackupPreferences) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_deviceonly_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BackupPreferences.ProtoReflect.Descriptor instead.
func (*BackupPreferences) Descriptor() ([]byte, []int) {
return file_meshtastic_deviceonly_proto_rawDescGZIP(), []int{6}
}
func (x *BackupPreferences) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *BackupPreferences) GetTimestamp() uint32 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *BackupPreferences) GetConfig() *LocalConfig {
if x != nil {
return x.Config
}
return nil
}
func (x *BackupPreferences) GetModuleConfig() *LocalModuleConfig {
if x != nil {
return x.ModuleConfig
}
return nil
}
func (x *BackupPreferences) GetChannels() *ChannelFile {
if x != nil {
return x.Channels
}
return nil
}
func (x *BackupPreferences) GetOwner() *User {
if x != nil {
return x.Owner
}
return nil
}
var File_meshtastic_deviceonly_proto protoreflect.FileDescriptor
const file_meshtastic_deviceonly_proto_rawDesc = "" +
"\n" +
"\x1bmeshtastic/deviceonly.proto\x12\n" +
"meshtastic\x1a\x18meshtastic/channel.proto\x1a\x17meshtastic/config.proto\x1a\x1ameshtastic/localonly.proto\x1a\x15meshtastic/mesh.proto\x1a\x1ameshtastic/telemetry.proto\x1a\fnanopb.proto\"\xc7\x01\n" +
"\fPositionLite\x12\x1d\n" +
"\n" +
"latitude_i\x18\x01 \x01(\x0fR\tlatitudeI\x12\x1f\n" +
"\vlongitude_i\x18\x02 \x01(\x0fR\n" +
"longitudeI\x12\x1a\n" +
"\baltitude\x18\x03 \x01(\x05R\baltitude\x12\x12\n" +
"\x04time\x18\x04 \x01(\aR\x04time\x12G\n" +
"\x0flocation_source\x18\x05 \x01(\x0e2\x1e.meshtastic.Position.LocSourceR\x0elocationSource\"\xd6\x02\n" +
"\bUserLite\x12\x1c\n" +
"\amacaddr\x18\x01 \x01(\fB\x02\x18\x01R\amacaddr\x12\x1b\n" +
"\tlong_name\x18\x02 \x01(\tR\blongName\x12\x1d\n" +
"\n" +
"short_name\x18\x03 \x01(\tR\tshortName\x124\n" +
"\bhw_model\x18\x04 \x01(\x0e2\x19.meshtastic.HardwareModelR\ahwModel\x12\x1f\n" +
"\vis_licensed\x18\x05 \x01(\bR\n" +
"isLicensed\x128\n" +
"\x04role\x18\x06 \x01(\x0e2$.meshtastic.Config.DeviceConfig.RoleR\x04role\x12\x1d\n" +
"\n" +
"public_key\x18\a \x01(\fR\tpublicKey\x12,\n" +
"\x0fis_unmessagable\x18\t \x01(\bH\x00R\x0eisUnmessagable\x88\x01\x01B\x12\n" +
"\x10_is_unmessagable\"\xcf\x03\n" +
"\fNodeInfoLite\x12\x10\n" +
"\x03num\x18\x01 \x01(\rR\x03num\x12(\n" +
"\x04user\x18\x02 \x01(\v2\x14.meshtastic.UserLiteR\x04user\x124\n" +
"\bposition\x18\x03 \x01(\v2\x18.meshtastic.PositionLiteR\bposition\x12\x10\n" +
"\x03snr\x18\x04 \x01(\x02R\x03snr\x12\x1d\n" +
"\n" +
"last_heard\x18\x05 \x01(\aR\tlastHeard\x12@\n" +
"\x0edevice_metrics\x18\x06 \x01(\v2\x19.meshtastic.DeviceMetricsR\rdeviceMetrics\x12\x18\n" +
"\achannel\x18\a \x01(\rR\achannel\x12\x19\n" +
"\bvia_mqtt\x18\b \x01(\bR\aviaMqtt\x12 \n" +
"\thops_away\x18\t \x01(\rH\x00R\bhopsAway\x88\x01\x01\x12\x1f\n" +
"\vis_favorite\x18\n" +
" \x01(\bR\n" +
"isFavorite\x12\x1d\n" +
"\n" +
"is_ignored\x18\v \x01(\bR\tisIgnored\x12\x19\n" +
"\bnext_hop\x18\f \x01(\rR\anextHop\x12\x1a\n" +
"\bbitfield\x18\r \x01(\rR\bbitfieldB\f\n" +
"\n" +
"_hops_away\"\xd9\x03\n" +
"\vDeviceState\x12/\n" +
"\amy_node\x18\x02 \x01(\v2\x16.meshtastic.MyNodeInfoR\x06myNode\x12&\n" +
"\x05owner\x18\x03 \x01(\v2\x10.meshtastic.UserR\x05owner\x12;\n" +
"\rreceive_queue\x18\x05 \x03(\v2\x16.meshtastic.MeshPacketR\freceiveQueue\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversion\x12>\n" +
"\x0frx_text_message\x18\a \x01(\v2\x16.meshtastic.MeshPacketR\rrxTextMessage\x12\x1b\n" +
"\ano_save\x18\t \x01(\bB\x02\x18\x01R\x06noSave\x12&\n" +
"\rdid_gps_reset\x18\v \x01(\bB\x02\x18\x01R\vdidGpsReset\x127\n" +
"\vrx_waypoint\x18\f \x01(\v2\x16.meshtastic.MeshPacketR\n" +
"rxWaypoint\x12\\\n" +
"\x19node_remote_hardware_pins\x18\r \x03(\v2!.meshtastic.NodeRemoteHardwarePinR\x16nodeRemoteHardwarePins\"\x84\x01\n" +
"\fNodeDatabase\x12\x18\n" +
"\aversion\x18\x01 \x01(\rR\aversion\x12Z\n" +
"\x05nodes\x18\x02 \x03(\v2\x18.meshtastic.NodeInfoLiteB*\x92?'\x92\x01$std::vector<meshtastic_NodeInfoLite>R\x05nodes\"X\n" +
"\vChannelFile\x12/\n" +
"\bchannels\x18\x01 \x03(\v2\x13.meshtastic.ChannelR\bchannels\x12\x18\n" +
"\aversion\x18\x02 \x01(\rR\aversion\"\x9d\x02\n" +
"\x11BackupPreferences\x12\x18\n" +
"\aversion\x18\x01 \x01(\rR\aversion\x12\x1c\n" +
"\ttimestamp\x18\x02 \x01(\aR\ttimestamp\x12/\n" +
"\x06config\x18\x03 \x01(\v2\x17.meshtastic.LocalConfigR\x06config\x12B\n" +
"\rmodule_config\x18\x04 \x01(\v2\x1d.meshtastic.LocalModuleConfigR\fmoduleConfig\x123\n" +
"\bchannels\x18\x05 \x01(\v2\x17.meshtastic.ChannelFileR\bchannels\x12&\n" +
"\x05owner\x18\x06 \x01(\v2\x10.meshtastic.UserR\x05ownerBn\x92?\v\xc2\x01\b<vector>\n" +
"\x14org.meshtastic.protoB\n" +
"DeviceOnlyZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_deviceonly_proto_rawDescOnce sync.Once
file_meshtastic_deviceonly_proto_rawDescData []byte
)
func file_meshtastic_deviceonly_proto_rawDescGZIP() []byte {
file_meshtastic_deviceonly_proto_rawDescOnce.Do(func() {
file_meshtastic_deviceonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_deviceonly_proto_rawDesc), len(file_meshtastic_deviceonly_proto_rawDesc)))
})
return file_meshtastic_deviceonly_proto_rawDescData
}
var file_meshtastic_deviceonly_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_meshtastic_deviceonly_proto_goTypes = []any{
(*PositionLite)(nil), // 0: meshtastic.PositionLite
(*UserLite)(nil), // 1: meshtastic.UserLite
(*NodeInfoLite)(nil), // 2: meshtastic.NodeInfoLite
(*DeviceState)(nil), // 3: meshtastic.DeviceState
(*NodeDatabase)(nil), // 4: meshtastic.NodeDatabase
(*ChannelFile)(nil), // 5: meshtastic.ChannelFile
(*BackupPreferences)(nil), // 6: meshtastic.BackupPreferences
(Position_LocSource)(0), // 7: meshtastic.Position.LocSource
(HardwareModel)(0), // 8: meshtastic.HardwareModel
(Config_DeviceConfig_Role)(0), // 9: meshtastic.Config.DeviceConfig.Role
(*DeviceMetrics)(nil), // 10: meshtastic.DeviceMetrics
(*MyNodeInfo)(nil), // 11: meshtastic.MyNodeInfo
(*User)(nil), // 12: meshtastic.User
(*MeshPacket)(nil), // 13: meshtastic.MeshPacket
(*NodeRemoteHardwarePin)(nil), // 14: meshtastic.NodeRemoteHardwarePin
(*Channel)(nil), // 15: meshtastic.Channel
(*LocalConfig)(nil), // 16: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 17: meshtastic.LocalModuleConfig
}
var file_meshtastic_deviceonly_proto_depIdxs = []int32{
7, // 0: meshtastic.PositionLite.location_source:type_name -> meshtastic.Position.LocSource
8, // 1: meshtastic.UserLite.hw_model:type_name -> meshtastic.HardwareModel
9, // 2: meshtastic.UserLite.role:type_name -> meshtastic.Config.DeviceConfig.Role
1, // 3: meshtastic.NodeInfoLite.user:type_name -> meshtastic.UserLite
0, // 4: meshtastic.NodeInfoLite.position:type_name -> meshtastic.PositionLite
10, // 5: meshtastic.NodeInfoLite.device_metrics:type_name -> meshtastic.DeviceMetrics
11, // 6: meshtastic.DeviceState.my_node:type_name -> meshtastic.MyNodeInfo
12, // 7: meshtastic.DeviceState.owner:type_name -> meshtastic.User
13, // 8: meshtastic.DeviceState.receive_queue:type_name -> meshtastic.MeshPacket
13, // 9: meshtastic.DeviceState.rx_text_message:type_name -> meshtastic.MeshPacket
13, // 10: meshtastic.DeviceState.rx_waypoint:type_name -> meshtastic.MeshPacket
14, // 11: meshtastic.DeviceState.node_remote_hardware_pins:type_name -> meshtastic.NodeRemoteHardwarePin
2, // 12: meshtastic.NodeDatabase.nodes:type_name -> meshtastic.NodeInfoLite
15, // 13: meshtastic.ChannelFile.channels:type_name -> meshtastic.Channel
16, // 14: meshtastic.BackupPreferences.config:type_name -> meshtastic.LocalConfig
17, // 15: meshtastic.BackupPreferences.module_config:type_name -> meshtastic.LocalModuleConfig
5, // 16: meshtastic.BackupPreferences.channels:type_name -> meshtastic.ChannelFile
12, // 17: meshtastic.BackupPreferences.owner:type_name -> meshtastic.User
18, // [18:18] is the sub-list for method output_type
18, // [18:18] is the sub-list for method input_type
18, // [18:18] is the sub-list for extension type_name
18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
}
func init() { file_meshtastic_deviceonly_proto_init() }
func file_meshtastic_deviceonly_proto_init() {
if File_meshtastic_deviceonly_proto != nil {
return
}
file_meshtastic_channel_proto_init()
file_meshtastic_config_proto_init()
file_meshtastic_localonly_proto_init()
file_meshtastic_mesh_proto_init()
file_meshtastic_telemetry_proto_init()
file_nanopb_proto_init()
file_meshtastic_deviceonly_proto_msgTypes[1].OneofWrappers = []any{}
file_meshtastic_deviceonly_proto_msgTypes[2].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_deviceonly_proto_rawDesc), len(file_meshtastic_deviceonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_deviceonly_proto_goTypes,
DependencyIndexes: file_meshtastic_deviceonly_proto_depIdxs,
MessageInfos: file_meshtastic_deviceonly_proto_msgTypes,
}.Build()
File_meshtastic_deviceonly_proto = out.File
file_meshtastic_deviceonly_proto_goTypes = nil
file_meshtastic_deviceonly_proto_depIdxs = nil
}

View File

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

View File

@@ -0,0 +1,472 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/localonly.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type LocalConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The part of the config that is specific to the Device
Device *Config_DeviceConfig `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
// The part of the config that is specific to the GPS Position
Position *Config_PositionConfig `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"`
// The part of the config that is specific to the Power settings
Power *Config_PowerConfig `protobuf:"bytes,3,opt,name=power,proto3" json:"power,omitempty"`
// The part of the config that is specific to the Wifi Settings
Network *Config_NetworkConfig `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
// The part of the config that is specific to the Display
Display *Config_DisplayConfig `protobuf:"bytes,5,opt,name=display,proto3" json:"display,omitempty"`
// The part of the config that is specific to the Lora Radio
Lora *Config_LoRaConfig `protobuf:"bytes,6,opt,name=lora,proto3" json:"lora,omitempty"`
// The part of the config that is specific to the Bluetooth settings
Bluetooth *Config_BluetoothConfig `protobuf:"bytes,7,opt,name=bluetooth,proto3" json:"bluetooth,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"`
// The part of the config that is specific to Security settings
Security *Config_SecurityConfig `protobuf:"bytes,9,opt,name=security,proto3" json:"security,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LocalConfig) Reset() {
*x = LocalConfig{}
mi := &file_meshtastic_localonly_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LocalConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalConfig) ProtoMessage() {}
func (x *LocalConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_localonly_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LocalConfig.ProtoReflect.Descriptor instead.
func (*LocalConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_localonly_proto_rawDescGZIP(), []int{0}
}
func (x *LocalConfig) GetDevice() *Config_DeviceConfig {
if x != nil {
return x.Device
}
return nil
}
func (x *LocalConfig) GetPosition() *Config_PositionConfig {
if x != nil {
return x.Position
}
return nil
}
func (x *LocalConfig) GetPower() *Config_PowerConfig {
if x != nil {
return x.Power
}
return nil
}
func (x *LocalConfig) GetNetwork() *Config_NetworkConfig {
if x != nil {
return x.Network
}
return nil
}
func (x *LocalConfig) GetDisplay() *Config_DisplayConfig {
if x != nil {
return x.Display
}
return nil
}
func (x *LocalConfig) GetLora() *Config_LoRaConfig {
if x != nil {
return x.Lora
}
return nil
}
func (x *LocalConfig) GetBluetooth() *Config_BluetoothConfig {
if x != nil {
return x.Bluetooth
}
return nil
}
func (x *LocalConfig) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
func (x *LocalConfig) GetSecurity() *Config_SecurityConfig {
if x != nil {
return x.Security
}
return nil
}
type LocalModuleConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// The part of the config that is specific to the MQTT module
Mqtt *ModuleConfig_MQTTConfig `protobuf:"bytes,1,opt,name=mqtt,proto3" json:"mqtt,omitempty"`
// The part of the config that is specific to the Serial module
Serial *ModuleConfig_SerialConfig `protobuf:"bytes,2,opt,name=serial,proto3" json:"serial,omitempty"`
// The part of the config that is specific to the ExternalNotification module
ExternalNotification *ModuleConfig_ExternalNotificationConfig `protobuf:"bytes,3,opt,name=external_notification,json=externalNotification,proto3" json:"externalNotification,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:"storeForward,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:"rangeTest,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:"cannedMessage,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:"remoteHardware,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:"neighborInfo,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:"ambientLighting,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:"detectionSensor,omitempty"`
// Paxcounter Config
Paxcounter *ModuleConfig_PaxcounterConfig `protobuf:"bytes,14,opt,name=paxcounter,proto3" json:"paxcounter,omitempty"`
// StatusMessage Config
Statusmessage *ModuleConfig_StatusMessageConfig `protobuf:"bytes,15,opt,name=statusmessage,proto3" json:"statusmessage,omitempty"`
// The part of the config that is specific to the Traffic Management module
TrafficManagement *ModuleConfig_TrafficManagementConfig `protobuf:"bytes,16,opt,name=traffic_management,json=trafficManagement,proto3" json:"trafficManagement,omitempty"`
// TAK Config
Tak *ModuleConfig_TAKConfig `protobuf:"bytes,17,opt,name=tak,proto3" json:"tak,omitempty"`
// A version integer used to invalidate old save files when we make
// incompatible changes This integer is set at build time and is private to
// NodeDB.cpp in the device code.
Version uint32 `protobuf:"varint,8,opt,name=version,proto3" json:"version,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LocalModuleConfig) Reset() {
*x = LocalModuleConfig{}
mi := &file_meshtastic_localonly_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LocalModuleConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LocalModuleConfig) ProtoMessage() {}
func (x *LocalModuleConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_localonly_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LocalModuleConfig.ProtoReflect.Descriptor instead.
func (*LocalModuleConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_localonly_proto_rawDescGZIP(), []int{1}
}
func (x *LocalModuleConfig) GetMqtt() *ModuleConfig_MQTTConfig {
if x != nil {
return x.Mqtt
}
return nil
}
func (x *LocalModuleConfig) GetSerial() *ModuleConfig_SerialConfig {
if x != nil {
return x.Serial
}
return nil
}
func (x *LocalModuleConfig) GetExternalNotification() *ModuleConfig_ExternalNotificationConfig {
if x != nil {
return x.ExternalNotification
}
return nil
}
func (x *LocalModuleConfig) GetStoreForward() *ModuleConfig_StoreForwardConfig {
if x != nil {
return x.StoreForward
}
return nil
}
func (x *LocalModuleConfig) GetRangeTest() *ModuleConfig_RangeTestConfig {
if x != nil {
return x.RangeTest
}
return nil
}
func (x *LocalModuleConfig) GetTelemetry() *ModuleConfig_TelemetryConfig {
if x != nil {
return x.Telemetry
}
return nil
}
func (x *LocalModuleConfig) GetCannedMessage() *ModuleConfig_CannedMessageConfig {
if x != nil {
return x.CannedMessage
}
return nil
}
func (x *LocalModuleConfig) GetAudio() *ModuleConfig_AudioConfig {
if x != nil {
return x.Audio
}
return nil
}
func (x *LocalModuleConfig) GetRemoteHardware() *ModuleConfig_RemoteHardwareConfig {
if x != nil {
return x.RemoteHardware
}
return nil
}
func (x *LocalModuleConfig) GetNeighborInfo() *ModuleConfig_NeighborInfoConfig {
if x != nil {
return x.NeighborInfo
}
return nil
}
func (x *LocalModuleConfig) GetAmbientLighting() *ModuleConfig_AmbientLightingConfig {
if x != nil {
return x.AmbientLighting
}
return nil
}
func (x *LocalModuleConfig) GetDetectionSensor() *ModuleConfig_DetectionSensorConfig {
if x != nil {
return x.DetectionSensor
}
return nil
}
func (x *LocalModuleConfig) GetPaxcounter() *ModuleConfig_PaxcounterConfig {
if x != nil {
return x.Paxcounter
}
return nil
}
func (x *LocalModuleConfig) GetStatusmessage() *ModuleConfig_StatusMessageConfig {
if x != nil {
return x.Statusmessage
}
return nil
}
func (x *LocalModuleConfig) GetTrafficManagement() *ModuleConfig_TrafficManagementConfig {
if x != nil {
return x.TrafficManagement
}
return nil
}
func (x *LocalModuleConfig) GetTak() *ModuleConfig_TAKConfig {
if x != nil {
return x.Tak
}
return nil
}
func (x *LocalModuleConfig) GetVersion() uint32 {
if x != nil {
return x.Version
}
return 0
}
var File_meshtastic_localonly_proto protoreflect.FileDescriptor
const file_meshtastic_localonly_proto_rawDesc = "" +
"\n" +
"\x1ameshtastic/localonly.proto\x12\n" +
"meshtastic\x1a\x17meshtastic/config.proto\x1a\x1emeshtastic/module_config.proto\"\x81\x04\n" +
"\vLocalConfig\x127\n" +
"\x06device\x18\x01 \x01(\v2\x1f.meshtastic.Config.DeviceConfigR\x06device\x12=\n" +
"\bposition\x18\x02 \x01(\v2!.meshtastic.Config.PositionConfigR\bposition\x124\n" +
"\x05power\x18\x03 \x01(\v2\x1e.meshtastic.Config.PowerConfigR\x05power\x12:\n" +
"\anetwork\x18\x04 \x01(\v2 .meshtastic.Config.NetworkConfigR\anetwork\x12:\n" +
"\adisplay\x18\x05 \x01(\v2 .meshtastic.Config.DisplayConfigR\adisplay\x121\n" +
"\x04lora\x18\x06 \x01(\v2\x1d.meshtastic.Config.LoRaConfigR\x04lora\x12@\n" +
"\tbluetooth\x18\a \x01(\v2\".meshtastic.Config.BluetoothConfigR\tbluetooth\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversion\x12=\n" +
"\bsecurity\x18\t \x01(\v2!.meshtastic.Config.SecurityConfigR\bsecurity\"\x99\n" +
"\n" +
"\x11LocalModuleConfig\x127\n" +
"\x04mqtt\x18\x01 \x01(\v2#.meshtastic.ModuleConfig.MQTTConfigR\x04mqtt\x12=\n" +
"\x06serial\x18\x02 \x01(\v2%.meshtastic.ModuleConfig.SerialConfigR\x06serial\x12h\n" +
"\x15external_notification\x18\x03 \x01(\v23.meshtastic.ModuleConfig.ExternalNotificationConfigR\x14externalNotification\x12P\n" +
"\rstore_forward\x18\x04 \x01(\v2+.meshtastic.ModuleConfig.StoreForwardConfigR\fstoreForward\x12G\n" +
"\n" +
"range_test\x18\x05 \x01(\v2(.meshtastic.ModuleConfig.RangeTestConfigR\trangeTest\x12F\n" +
"\ttelemetry\x18\x06 \x01(\v2(.meshtastic.ModuleConfig.TelemetryConfigR\ttelemetry\x12S\n" +
"\x0ecanned_message\x18\a \x01(\v2,.meshtastic.ModuleConfig.CannedMessageConfigR\rcannedMessage\x12:\n" +
"\x05audio\x18\t \x01(\v2$.meshtastic.ModuleConfig.AudioConfigR\x05audio\x12V\n" +
"\x0fremote_hardware\x18\n" +
" \x01(\v2-.meshtastic.ModuleConfig.RemoteHardwareConfigR\x0eremoteHardware\x12P\n" +
"\rneighbor_info\x18\v \x01(\v2+.meshtastic.ModuleConfig.NeighborInfoConfigR\fneighborInfo\x12Y\n" +
"\x10ambient_lighting\x18\f \x01(\v2..meshtastic.ModuleConfig.AmbientLightingConfigR\x0fambientLighting\x12Y\n" +
"\x10detection_sensor\x18\r \x01(\v2..meshtastic.ModuleConfig.DetectionSensorConfigR\x0fdetectionSensor\x12I\n" +
"\n" +
"paxcounter\x18\x0e \x01(\v2).meshtastic.ModuleConfig.PaxcounterConfigR\n" +
"paxcounter\x12R\n" +
"\rstatusmessage\x18\x0f \x01(\v2,.meshtastic.ModuleConfig.StatusMessageConfigR\rstatusmessage\x12_\n" +
"\x12traffic_management\x18\x10 \x01(\v20.meshtastic.ModuleConfig.TrafficManagementConfigR\x11trafficManagement\x124\n" +
"\x03tak\x18\x11 \x01(\v2\".meshtastic.ModuleConfig.TAKConfigR\x03tak\x12\x18\n" +
"\aversion\x18\b \x01(\rR\aversionBe\n" +
"\x14org.meshtastic.protoB\x0fLocalOnlyProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_localonly_proto_rawDescOnce sync.Once
file_meshtastic_localonly_proto_rawDescData []byte
)
func file_meshtastic_localonly_proto_rawDescGZIP() []byte {
file_meshtastic_localonly_proto_rawDescOnce.Do(func() {
file_meshtastic_localonly_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_localonly_proto_rawDesc), len(file_meshtastic_localonly_proto_rawDesc)))
})
return file_meshtastic_localonly_proto_rawDescData
}
var file_meshtastic_localonly_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_meshtastic_localonly_proto_goTypes = []any{
(*LocalConfig)(nil), // 0: meshtastic.LocalConfig
(*LocalModuleConfig)(nil), // 1: meshtastic.LocalModuleConfig
(*Config_DeviceConfig)(nil), // 2: meshtastic.Config.DeviceConfig
(*Config_PositionConfig)(nil), // 3: meshtastic.Config.PositionConfig
(*Config_PowerConfig)(nil), // 4: meshtastic.Config.PowerConfig
(*Config_NetworkConfig)(nil), // 5: meshtastic.Config.NetworkConfig
(*Config_DisplayConfig)(nil), // 6: meshtastic.Config.DisplayConfig
(*Config_LoRaConfig)(nil), // 7: meshtastic.Config.LoRaConfig
(*Config_BluetoothConfig)(nil), // 8: meshtastic.Config.BluetoothConfig
(*Config_SecurityConfig)(nil), // 9: meshtastic.Config.SecurityConfig
(*ModuleConfig_MQTTConfig)(nil), // 10: meshtastic.ModuleConfig.MQTTConfig
(*ModuleConfig_SerialConfig)(nil), // 11: meshtastic.ModuleConfig.SerialConfig
(*ModuleConfig_ExternalNotificationConfig)(nil), // 12: meshtastic.ModuleConfig.ExternalNotificationConfig
(*ModuleConfig_StoreForwardConfig)(nil), // 13: meshtastic.ModuleConfig.StoreForwardConfig
(*ModuleConfig_RangeTestConfig)(nil), // 14: meshtastic.ModuleConfig.RangeTestConfig
(*ModuleConfig_TelemetryConfig)(nil), // 15: meshtastic.ModuleConfig.TelemetryConfig
(*ModuleConfig_CannedMessageConfig)(nil), // 16: meshtastic.ModuleConfig.CannedMessageConfig
(*ModuleConfig_AudioConfig)(nil), // 17: meshtastic.ModuleConfig.AudioConfig
(*ModuleConfig_RemoteHardwareConfig)(nil), // 18: meshtastic.ModuleConfig.RemoteHardwareConfig
(*ModuleConfig_NeighborInfoConfig)(nil), // 19: meshtastic.ModuleConfig.NeighborInfoConfig
(*ModuleConfig_AmbientLightingConfig)(nil), // 20: meshtastic.ModuleConfig.AmbientLightingConfig
(*ModuleConfig_DetectionSensorConfig)(nil), // 21: meshtastic.ModuleConfig.DetectionSensorConfig
(*ModuleConfig_PaxcounterConfig)(nil), // 22: meshtastic.ModuleConfig.PaxcounterConfig
(*ModuleConfig_StatusMessageConfig)(nil), // 23: meshtastic.ModuleConfig.StatusMessageConfig
(*ModuleConfig_TrafficManagementConfig)(nil), // 24: meshtastic.ModuleConfig.TrafficManagementConfig
(*ModuleConfig_TAKConfig)(nil), // 25: meshtastic.ModuleConfig.TAKConfig
}
var file_meshtastic_localonly_proto_depIdxs = []int32{
2, // 0: meshtastic.LocalConfig.device:type_name -> meshtastic.Config.DeviceConfig
3, // 1: meshtastic.LocalConfig.position:type_name -> meshtastic.Config.PositionConfig
4, // 2: meshtastic.LocalConfig.power:type_name -> meshtastic.Config.PowerConfig
5, // 3: meshtastic.LocalConfig.network:type_name -> meshtastic.Config.NetworkConfig
6, // 4: meshtastic.LocalConfig.display:type_name -> meshtastic.Config.DisplayConfig
7, // 5: meshtastic.LocalConfig.lora:type_name -> meshtastic.Config.LoRaConfig
8, // 6: meshtastic.LocalConfig.bluetooth:type_name -> meshtastic.Config.BluetoothConfig
9, // 7: meshtastic.LocalConfig.security:type_name -> meshtastic.Config.SecurityConfig
10, // 8: meshtastic.LocalModuleConfig.mqtt:type_name -> meshtastic.ModuleConfig.MQTTConfig
11, // 9: meshtastic.LocalModuleConfig.serial:type_name -> meshtastic.ModuleConfig.SerialConfig
12, // 10: meshtastic.LocalModuleConfig.external_notification:type_name -> meshtastic.ModuleConfig.ExternalNotificationConfig
13, // 11: meshtastic.LocalModuleConfig.store_forward:type_name -> meshtastic.ModuleConfig.StoreForwardConfig
14, // 12: meshtastic.LocalModuleConfig.range_test:type_name -> meshtastic.ModuleConfig.RangeTestConfig
15, // 13: meshtastic.LocalModuleConfig.telemetry:type_name -> meshtastic.ModuleConfig.TelemetryConfig
16, // 14: meshtastic.LocalModuleConfig.canned_message:type_name -> meshtastic.ModuleConfig.CannedMessageConfig
17, // 15: meshtastic.LocalModuleConfig.audio:type_name -> meshtastic.ModuleConfig.AudioConfig
18, // 16: meshtastic.LocalModuleConfig.remote_hardware:type_name -> meshtastic.ModuleConfig.RemoteHardwareConfig
19, // 17: meshtastic.LocalModuleConfig.neighbor_info:type_name -> meshtastic.ModuleConfig.NeighborInfoConfig
20, // 18: meshtastic.LocalModuleConfig.ambient_lighting:type_name -> meshtastic.ModuleConfig.AmbientLightingConfig
21, // 19: meshtastic.LocalModuleConfig.detection_sensor:type_name -> meshtastic.ModuleConfig.DetectionSensorConfig
22, // 20: meshtastic.LocalModuleConfig.paxcounter:type_name -> meshtastic.ModuleConfig.PaxcounterConfig
23, // 21: meshtastic.LocalModuleConfig.statusmessage:type_name -> meshtastic.ModuleConfig.StatusMessageConfig
24, // 22: meshtastic.LocalModuleConfig.traffic_management:type_name -> meshtastic.ModuleConfig.TrafficManagementConfig
25, // 23: meshtastic.LocalModuleConfig.tak:type_name -> meshtastic.ModuleConfig.TAKConfig
24, // [24:24] is the sub-list for method output_type
24, // [24:24] is the sub-list for method input_type
24, // [24:24] is the sub-list for extension type_name
24, // [24:24] is the sub-list for extension extendee
0, // [0:24] is the sub-list for field type_name
}
func init() { file_meshtastic_localonly_proto_init() }
func file_meshtastic_localonly_proto_init() {
if File_meshtastic_localonly_proto != nil {
return
}
file_meshtastic_config_proto_init()
file_meshtastic_module_config_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_localonly_proto_rawDesc), len(file_meshtastic_localonly_proto_rawDesc)),
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_localonly_proto_goTypes,
DependencyIndexes: file_meshtastic_localonly_proto_depIdxs,
MessageInfos: file_meshtastic_localonly_proto_msgTypes,
}.Build()
File_meshtastic_localonly_proto = out.File
file_meshtastic_localonly_proto_goTypes = nil
file_meshtastic_localonly_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -0,0 +1,849 @@
// Custom options for defining:
// - Maximum size of string/bytes
// - Maximum number of elements in array
//
// These are used by nanopb to generate statically allocable structures
// for memory-limited environments.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: nanopb.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type FieldType int32
const (
FieldType_FT_DEFAULT FieldType = 0 // Automatically decide field type, generate static field if possible.
FieldType_FT_CALLBACK FieldType = 1 // Always generate a callback field.
FieldType_FT_POINTER FieldType = 4 // Always generate a dynamically allocated field.
FieldType_FT_STATIC FieldType = 2 // Generate a static field or raise an exception if not possible.
FieldType_FT_IGNORE FieldType = 3 // Ignore the field completely.
FieldType_FT_INLINE FieldType = 5 // Legacy option, use the separate 'fixed_length' option instead
)
// Enum value maps for FieldType.
var (
FieldType_name = map[int32]string{
0: "FT_DEFAULT",
1: "FT_CALLBACK",
4: "FT_POINTER",
2: "FT_STATIC",
3: "FT_IGNORE",
5: "FT_INLINE",
}
FieldType_value = map[string]int32{
"FT_DEFAULT": 0,
"FT_CALLBACK": 1,
"FT_POINTER": 4,
"FT_STATIC": 2,
"FT_IGNORE": 3,
"FT_INLINE": 5,
}
)
func (x FieldType) Enum() *FieldType {
p := new(FieldType)
*p = x
return p
}
func (x FieldType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (FieldType) Descriptor() protoreflect.EnumDescriptor {
return file_nanopb_proto_enumTypes[0].Descriptor()
}
func (FieldType) Type() protoreflect.EnumType {
return &file_nanopb_proto_enumTypes[0]
}
func (x FieldType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *FieldType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = FieldType(num)
return nil
}
// Deprecated: Use FieldType.Descriptor instead.
func (FieldType) EnumDescriptor() ([]byte, []int) {
return file_nanopb_proto_rawDescGZIP(), []int{0}
}
type IntSize int32
const (
IntSize_IS_DEFAULT IntSize = 0 // Default, 32/64bit based on type in .proto
IntSize_IS_8 IntSize = 8
IntSize_IS_16 IntSize = 16
IntSize_IS_32 IntSize = 32
IntSize_IS_64 IntSize = 64
)
// Enum value maps for IntSize.
var (
IntSize_name = map[int32]string{
0: "IS_DEFAULT",
8: "IS_8",
16: "IS_16",
32: "IS_32",
64: "IS_64",
}
IntSize_value = map[string]int32{
"IS_DEFAULT": 0,
"IS_8": 8,
"IS_16": 16,
"IS_32": 32,
"IS_64": 64,
}
)
func (x IntSize) Enum() *IntSize {
p := new(IntSize)
*p = x
return p
}
func (x IntSize) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IntSize) Descriptor() protoreflect.EnumDescriptor {
return file_nanopb_proto_enumTypes[1].Descriptor()
}
func (IntSize) Type() protoreflect.EnumType {
return &file_nanopb_proto_enumTypes[1]
}
func (x IntSize) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *IntSize) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = IntSize(num)
return nil
}
// Deprecated: Use IntSize.Descriptor instead.
func (IntSize) EnumDescriptor() ([]byte, []int) {
return file_nanopb_proto_rawDescGZIP(), []int{1}
}
type TypenameMangling int32
const (
TypenameMangling_M_NONE TypenameMangling = 0 // Default, no typename mangling
TypenameMangling_M_STRIP_PACKAGE TypenameMangling = 1 // Strip current package name
TypenameMangling_M_FLATTEN TypenameMangling = 2 // Only use last path component
TypenameMangling_M_PACKAGE_INITIALS TypenameMangling = 3 // Replace the package name by the initials
)
// Enum value maps for TypenameMangling.
var (
TypenameMangling_name = map[int32]string{
0: "M_NONE",
1: "M_STRIP_PACKAGE",
2: "M_FLATTEN",
3: "M_PACKAGE_INITIALS",
}
TypenameMangling_value = map[string]int32{
"M_NONE": 0,
"M_STRIP_PACKAGE": 1,
"M_FLATTEN": 2,
"M_PACKAGE_INITIALS": 3,
}
)
func (x TypenameMangling) Enum() *TypenameMangling {
p := new(TypenameMangling)
*p = x
return p
}
func (x TypenameMangling) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (TypenameMangling) Descriptor() protoreflect.EnumDescriptor {
return file_nanopb_proto_enumTypes[2].Descriptor()
}
func (TypenameMangling) Type() protoreflect.EnumType {
return &file_nanopb_proto_enumTypes[2]
}
func (x TypenameMangling) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *TypenameMangling) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = TypenameMangling(num)
return nil
}
// Deprecated: Use TypenameMangling.Descriptor instead.
func (TypenameMangling) EnumDescriptor() ([]byte, []int) {
return file_nanopb_proto_rawDescGZIP(), []int{2}
}
type DescriptorSize int32
const (
DescriptorSize_DS_AUTO DescriptorSize = 0 // Select minimal size based on field type
DescriptorSize_DS_1 DescriptorSize = 1 // 1 word; up to 15 byte fields, no arrays
DescriptorSize_DS_2 DescriptorSize = 2 // 2 words; up to 4095 byte fields, 4095 entry arrays
DescriptorSize_DS_4 DescriptorSize = 4 // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays
DescriptorSize_DS_8 DescriptorSize = 8 // 8 words; up to 2^32-1 entry arrays
)
// Enum value maps for DescriptorSize.
var (
DescriptorSize_name = map[int32]string{
0: "DS_AUTO",
1: "DS_1",
2: "DS_2",
4: "DS_4",
8: "DS_8",
}
DescriptorSize_value = map[string]int32{
"DS_AUTO": 0,
"DS_1": 1,
"DS_2": 2,
"DS_4": 4,
"DS_8": 8,
}
)
func (x DescriptorSize) Enum() *DescriptorSize {
p := new(DescriptorSize)
*p = x
return p
}
func (x DescriptorSize) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (DescriptorSize) Descriptor() protoreflect.EnumDescriptor {
return file_nanopb_proto_enumTypes[3].Descriptor()
}
func (DescriptorSize) Type() protoreflect.EnumType {
return &file_nanopb_proto_enumTypes[3]
}
func (x DescriptorSize) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Do not use.
func (x *DescriptorSize) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
if err != nil {
return err
}
*x = DescriptorSize(num)
return nil
}
// Deprecated: Use DescriptorSize.Descriptor instead.
func (DescriptorSize) EnumDescriptor() ([]byte, []int) {
return file_nanopb_proto_rawDescGZIP(), []int{3}
}
// This is the inner options message, which basically defines options for
// a field. When it is used in message or file scope, it applies to all
// fields.
type NanoPBOptions struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Allocated size for 'bytes' and 'string' fields.
// For string fields, this should include the space for null terminator.
MaxSize *int32 `protobuf:"varint,1,opt,name=max_size,json=maxSize" json:"maxSize,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:"maxLength,omitempty"`
// Allocated number of entries in arrays ('repeated' fields)
MaxCount *int32 `protobuf:"varint,2,opt,name=max_count,json=maxCount" json:"maxCount,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:"intSize,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:"longNames,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:"packedStruct,omitempty"`
// Add 'packed' attribute to generated enums.
PackedEnum *bool `protobuf:"varint,10,opt,name=packed_enum,json=packedEnum,def=0" json:"packedEnum,omitempty"`
// Skip this message
SkipMessage *bool `protobuf:"varint,6,opt,name=skip_message,json=skipMessage,def=0" json:"skipMessage,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:"noUnions,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:"anonymousOneof,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:"proto3SingularMsgs,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:"enumToString,omitempty"`
// Generate bytes arrays with fixed length
FixedLength *bool `protobuf:"varint,15,opt,name=fixed_length,json=fixedLength,def=0" json:"fixedLength,omitempty"`
// Generate repeated field with fixed count
FixedCount *bool `protobuf:"varint,16,opt,name=fixed_count,json=fixedCount,def=0" json:"fixedCount,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:"submsgCallback,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:"mangleNames,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:"callbackDatatype,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:"callbackFunction,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:"defaultHas,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:"typeOverride,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:"sortByTag,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:"fallbackType,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
// Default values for NanoPBOptions fields.
const (
Default_NanoPBOptions_IntSize = IntSize_IS_DEFAULT
Default_NanoPBOptions_Type = FieldType_FT_DEFAULT
Default_NanoPBOptions_LongNames = bool(true)
Default_NanoPBOptions_PackedStruct = bool(false)
Default_NanoPBOptions_PackedEnum = bool(false)
Default_NanoPBOptions_SkipMessage = bool(false)
Default_NanoPBOptions_NoUnions = bool(false)
Default_NanoPBOptions_AnonymousOneof = bool(false)
Default_NanoPBOptions_Proto3 = bool(false)
Default_NanoPBOptions_Proto3SingularMsgs = bool(false)
Default_NanoPBOptions_EnumToString = bool(false)
Default_NanoPBOptions_FixedLength = bool(false)
Default_NanoPBOptions_FixedCount = bool(false)
Default_NanoPBOptions_SubmsgCallback = bool(false)
Default_NanoPBOptions_MangleNames = TypenameMangling_M_NONE
Default_NanoPBOptions_CallbackDatatype = string("pb_callback_t")
Default_NanoPBOptions_CallbackFunction = string("pb_default_field_callback")
Default_NanoPBOptions_Descriptorsize = DescriptorSize_DS_AUTO
Default_NanoPBOptions_DefaultHas = bool(false)
Default_NanoPBOptions_SortByTag = bool(true)
Default_NanoPBOptions_FallbackType = FieldType_FT_CALLBACK
)
func (x *NanoPBOptions) Reset() {
*x = NanoPBOptions{}
mi := &file_nanopb_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *NanoPBOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NanoPBOptions) ProtoMessage() {}
func (x *NanoPBOptions) ProtoReflect() protoreflect.Message {
mi := &file_nanopb_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NanoPBOptions.ProtoReflect.Descriptor instead.
func (*NanoPBOptions) Descriptor() ([]byte, []int) {
return file_nanopb_proto_rawDescGZIP(), []int{0}
}
func (x *NanoPBOptions) GetMaxSize() int32 {
if x != nil && x.MaxSize != nil {
return *x.MaxSize
}
return 0
}
func (x *NanoPBOptions) GetMaxLength() int32 {
if x != nil && x.MaxLength != nil {
return *x.MaxLength
}
return 0
}
func (x *NanoPBOptions) GetMaxCount() int32 {
if x != nil && x.MaxCount != nil {
return *x.MaxCount
}
return 0
}
func (x *NanoPBOptions) GetIntSize() IntSize {
if x != nil && x.IntSize != nil {
return *x.IntSize
}
return Default_NanoPBOptions_IntSize
}
func (x *NanoPBOptions) GetType() FieldType {
if x != nil && x.Type != nil {
return *x.Type
}
return Default_NanoPBOptions_Type
}
func (x *NanoPBOptions) GetLongNames() bool {
if x != nil && x.LongNames != nil {
return *x.LongNames
}
return Default_NanoPBOptions_LongNames
}
func (x *NanoPBOptions) GetPackedStruct() bool {
if x != nil && x.PackedStruct != nil {
return *x.PackedStruct
}
return Default_NanoPBOptions_PackedStruct
}
func (x *NanoPBOptions) GetPackedEnum() bool {
if x != nil && x.PackedEnum != nil {
return *x.PackedEnum
}
return Default_NanoPBOptions_PackedEnum
}
func (x *NanoPBOptions) GetSkipMessage() bool {
if x != nil && x.SkipMessage != nil {
return *x.SkipMessage
}
return Default_NanoPBOptions_SkipMessage
}
func (x *NanoPBOptions) GetNoUnions() bool {
if x != nil && x.NoUnions != nil {
return *x.NoUnions
}
return Default_NanoPBOptions_NoUnions
}
func (x *NanoPBOptions) GetMsgid() uint32 {
if x != nil && x.Msgid != nil {
return *x.Msgid
}
return 0
}
func (x *NanoPBOptions) GetAnonymousOneof() bool {
if x != nil && x.AnonymousOneof != nil {
return *x.AnonymousOneof
}
return Default_NanoPBOptions_AnonymousOneof
}
func (x *NanoPBOptions) GetProto3() bool {
if x != nil && x.Proto3 != nil {
return *x.Proto3
}
return Default_NanoPBOptions_Proto3
}
func (x *NanoPBOptions) GetProto3SingularMsgs() bool {
if x != nil && x.Proto3SingularMsgs != nil {
return *x.Proto3SingularMsgs
}
return Default_NanoPBOptions_Proto3SingularMsgs
}
func (x *NanoPBOptions) GetEnumToString() bool {
if x != nil && x.EnumToString != nil {
return *x.EnumToString
}
return Default_NanoPBOptions_EnumToString
}
func (x *NanoPBOptions) GetFixedLength() bool {
if x != nil && x.FixedLength != nil {
return *x.FixedLength
}
return Default_NanoPBOptions_FixedLength
}
func (x *NanoPBOptions) GetFixedCount() bool {
if x != nil && x.FixedCount != nil {
return *x.FixedCount
}
return Default_NanoPBOptions_FixedCount
}
func (x *NanoPBOptions) GetSubmsgCallback() bool {
if x != nil && x.SubmsgCallback != nil {
return *x.SubmsgCallback
}
return Default_NanoPBOptions_SubmsgCallback
}
func (x *NanoPBOptions) GetMangleNames() TypenameMangling {
if x != nil && x.MangleNames != nil {
return *x.MangleNames
}
return Default_NanoPBOptions_MangleNames
}
func (x *NanoPBOptions) GetCallbackDatatype() string {
if x != nil && x.CallbackDatatype != nil {
return *x.CallbackDatatype
}
return Default_NanoPBOptions_CallbackDatatype
}
func (x *NanoPBOptions) GetCallbackFunction() string {
if x != nil && x.CallbackFunction != nil {
return *x.CallbackFunction
}
return Default_NanoPBOptions_CallbackFunction
}
func (x *NanoPBOptions) GetDescriptorsize() DescriptorSize {
if x != nil && x.Descriptorsize != nil {
return *x.Descriptorsize
}
return Default_NanoPBOptions_Descriptorsize
}
func (x *NanoPBOptions) GetDefaultHas() bool {
if x != nil && x.DefaultHas != nil {
return *x.DefaultHas
}
return Default_NanoPBOptions_DefaultHas
}
func (x *NanoPBOptions) GetInclude() []string {
if x != nil {
return x.Include
}
return nil
}
func (x *NanoPBOptions) GetExclude() []string {
if x != nil {
return x.Exclude
}
return nil
}
func (x *NanoPBOptions) GetPackage() string {
if x != nil && x.Package != nil {
return *x.Package
}
return ""
}
func (x *NanoPBOptions) GetTypeOverride() descriptorpb.FieldDescriptorProto_Type {
if x != nil && x.TypeOverride != nil {
return *x.TypeOverride
}
return descriptorpb.FieldDescriptorProto_Type(1)
}
func (x *NanoPBOptions) GetSortByTag() bool {
if x != nil && x.SortByTag != nil {
return *x.SortByTag
}
return Default_NanoPBOptions_SortByTag
}
func (x *NanoPBOptions) GetFallbackType() FieldType {
if x != nil && x.FallbackType != nil {
return *x.FallbackType
}
return Default_NanoPBOptions_FallbackType
}
var file_nanopb_proto_extTypes = []protoimpl.ExtensionInfo{
{
ExtendedType: (*descriptorpb.FileOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_fileopt",
Tag: "bytes,1010,opt,name=nanopb_fileopt",
Filename: "nanopb.proto",
},
{
ExtendedType: (*descriptorpb.MessageOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_msgopt",
Tag: "bytes,1010,opt,name=nanopb_msgopt",
Filename: "nanopb.proto",
},
{
ExtendedType: (*descriptorpb.EnumOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb_enumopt",
Tag: "bytes,1010,opt,name=nanopb_enumopt",
Filename: "nanopb.proto",
},
{
ExtendedType: (*descriptorpb.FieldOptions)(nil),
ExtensionType: (*NanoPBOptions)(nil),
Field: 1010,
Name: "nanopb",
Tag: "bytes,1010,opt,name=nanopb",
Filename: "nanopb.proto",
},
}
// Extension fields to descriptorpb.FileOptions.
var (
// optional NanoPBOptions nanopb_fileopt = 1010;
E_NanopbFileopt = &file_nanopb_proto_extTypes[0]
)
// Extension fields to descriptorpb.MessageOptions.
var (
// optional NanoPBOptions nanopb_msgopt = 1010;
E_NanopbMsgopt = &file_nanopb_proto_extTypes[1]
)
// Extension fields to descriptorpb.EnumOptions.
var (
// optional NanoPBOptions nanopb_enumopt = 1010;
E_NanopbEnumopt = &file_nanopb_proto_extTypes[2]
)
// Extension fields to descriptorpb.FieldOptions.
var (
// optional NanoPBOptions nanopb = 1010;
E_Nanopb = &file_nanopb_proto_extTypes[3]
)
var File_nanopb_proto protoreflect.FileDescriptor
const file_nanopb_proto_rawDesc = "" +
"\n" +
"\fnanopb.proto\x1a google/protobuf/descriptor.proto\"\x86\n" +
"\n" +
"\rNanoPBOptions\x12\x19\n" +
"\bmax_size\x18\x01 \x01(\x05R\amaxSize\x12\x1d\n" +
"\n" +
"max_length\x18\x0e \x01(\x05R\tmaxLength\x12\x1b\n" +
"\tmax_count\x18\x02 \x01(\x05R\bmaxCount\x12/\n" +
"\bint_size\x18\a \x01(\x0e2\b.IntSize:\n" +
"IS_DEFAULTR\aintSize\x12*\n" +
"\x04type\x18\x03 \x01(\x0e2\n" +
".FieldType:\n" +
"FT_DEFAULTR\x04type\x12#\n" +
"\n" +
"long_names\x18\x04 \x01(\b:\x04trueR\tlongNames\x12*\n" +
"\rpacked_struct\x18\x05 \x01(\b:\x05falseR\fpackedStruct\x12&\n" +
"\vpacked_enum\x18\n" +
" \x01(\b:\x05falseR\n" +
"packedEnum\x12(\n" +
"\fskip_message\x18\x06 \x01(\b:\x05falseR\vskipMessage\x12\"\n" +
"\tno_unions\x18\b \x01(\b:\x05falseR\bnoUnions\x12\x14\n" +
"\x05msgid\x18\t \x01(\rR\x05msgid\x12.\n" +
"\x0fanonymous_oneof\x18\v \x01(\b:\x05falseR\x0eanonymousOneof\x12\x1d\n" +
"\x06proto3\x18\f \x01(\b:\x05falseR\x06proto3\x127\n" +
"\x14proto3_singular_msgs\x18\x15 \x01(\b:\x05falseR\x12proto3SingularMsgs\x12+\n" +
"\x0eenum_to_string\x18\r \x01(\b:\x05falseR\fenumToString\x12(\n" +
"\ffixed_length\x18\x0f \x01(\b:\x05falseR\vfixedLength\x12&\n" +
"\vfixed_count\x18\x10 \x01(\b:\x05falseR\n" +
"fixedCount\x12.\n" +
"\x0fsubmsg_callback\x18\x16 \x01(\b:\x05falseR\x0esubmsgCallback\x12<\n" +
"\fmangle_names\x18\x11 \x01(\x0e2\x11.TypenameMangling:\x06M_NONER\vmangleNames\x12:\n" +
"\x11callback_datatype\x18\x12 \x01(\t:\rpb_callback_tR\x10callbackDatatype\x12F\n" +
"\x11callback_function\x18\x13 \x01(\t:\x19pb_default_field_callbackR\x10callbackFunction\x12@\n" +
"\x0edescriptorsize\x18\x14 \x01(\x0e2\x0f.DescriptorSize:\aDS_AUTOR\x0edescriptorsize\x12&\n" +
"\vdefault_has\x18\x17 \x01(\b:\x05falseR\n" +
"defaultHas\x12\x18\n" +
"\ainclude\x18\x18 \x03(\tR\ainclude\x12\x18\n" +
"\aexclude\x18\x1a \x03(\tR\aexclude\x12\x18\n" +
"\apackage\x18\x19 \x01(\tR\apackage\x12O\n" +
"\rtype_override\x18\x1b \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\ftypeOverride\x12$\n" +
"\vsort_by_tag\x18\x1c \x01(\b:\x04trueR\tsortByTag\x12<\n" +
"\rfallback_type\x18\x1d \x01(\x0e2\n" +
".FieldType:\vFT_CALLBACKR\ffallbackType*i\n" +
"\tFieldType\x12\x0e\n" +
"\n" +
"FT_DEFAULT\x10\x00\x12\x0f\n" +
"\vFT_CALLBACK\x10\x01\x12\x0e\n" +
"\n" +
"FT_POINTER\x10\x04\x12\r\n" +
"\tFT_STATIC\x10\x02\x12\r\n" +
"\tFT_IGNORE\x10\x03\x12\r\n" +
"\tFT_INLINE\x10\x05*D\n" +
"\aIntSize\x12\x0e\n" +
"\n" +
"IS_DEFAULT\x10\x00\x12\b\n" +
"\x04IS_8\x10\b\x12\t\n" +
"\x05IS_16\x10\x10\x12\t\n" +
"\x05IS_32\x10 \x12\t\n" +
"\x05IS_64\x10@*Z\n" +
"\x10TypenameMangling\x12\n" +
"\n" +
"\x06M_NONE\x10\x00\x12\x13\n" +
"\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n" +
"\tM_FLATTEN\x10\x02\x12\x16\n" +
"\x12M_PACKAGE_INITIALS\x10\x03*E\n" +
"\x0eDescriptorSize\x12\v\n" +
"\aDS_AUTO\x10\x00\x12\b\n" +
"\x04DS_1\x10\x01\x12\b\n" +
"\x04DS_2\x10\x02\x12\b\n" +
"\x04DS_4\x10\x04\x12\b\n" +
"\x04DS_8\x10\b:T\n" +
"\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\rnanopbFileopt:U\n" +
"\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\fnanopbMsgopt:T\n" +
"\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\rnanopbEnumopt:F\n" +
"\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\a \x01(\v2\x0e.NanoPBOptionsR\x06nanopbB>\n" +
"\x18fi.kapsi.koti.jpa.nanopbZ\"github.com/meshtastic/go/generated"
var (
file_nanopb_proto_rawDescOnce sync.Once
file_nanopb_proto_rawDescData []byte
)
func file_nanopb_proto_rawDescGZIP() []byte {
file_nanopb_proto_rawDescOnce.Do(func() {
file_nanopb_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_nanopb_proto_rawDesc), len(file_nanopb_proto_rawDesc)))
})
return file_nanopb_proto_rawDescData
}
var file_nanopb_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
var file_nanopb_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_nanopb_proto_goTypes = []any{
(FieldType)(0), // 0: FieldType
(IntSize)(0), // 1: IntSize
(TypenameMangling)(0), // 2: TypenameMangling
(DescriptorSize)(0), // 3: DescriptorSize
(*NanoPBOptions)(nil), // 4: NanoPBOptions
(descriptorpb.FieldDescriptorProto_Type)(0), // 5: google.protobuf.FieldDescriptorProto.Type
(*descriptorpb.FileOptions)(nil), // 6: google.protobuf.FileOptions
(*descriptorpb.MessageOptions)(nil), // 7: google.protobuf.MessageOptions
(*descriptorpb.EnumOptions)(nil), // 8: google.protobuf.EnumOptions
(*descriptorpb.FieldOptions)(nil), // 9: google.protobuf.FieldOptions
}
var file_nanopb_proto_depIdxs = []int32{
1, // 0: NanoPBOptions.int_size:type_name -> IntSize
0, // 1: NanoPBOptions.type:type_name -> FieldType
2, // 2: NanoPBOptions.mangle_names:type_name -> TypenameMangling
3, // 3: NanoPBOptions.descriptorsize:type_name -> DescriptorSize
5, // 4: NanoPBOptions.type_override:type_name -> google.protobuf.FieldDescriptorProto.Type
0, // 5: NanoPBOptions.fallback_type:type_name -> FieldType
6, // 6: nanopb_fileopt:extendee -> google.protobuf.FileOptions
7, // 7: nanopb_msgopt:extendee -> google.protobuf.MessageOptions
8, // 8: nanopb_enumopt:extendee -> google.protobuf.EnumOptions
9, // 9: nanopb:extendee -> google.protobuf.FieldOptions
4, // 10: nanopb_fileopt:type_name -> NanoPBOptions
4, // 11: nanopb_msgopt:type_name -> NanoPBOptions
4, // 12: nanopb_enumopt:type_name -> NanoPBOptions
4, // 13: nanopb:type_name -> NanoPBOptions
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
10, // [10:14] is the sub-list for extension type_name
6, // [6:10] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_nanopb_proto_init() }
func file_nanopb_proto_init() {
if File_nanopb_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_nanopb_proto_rawDesc), len(file_nanopb_proto_rawDesc)),
NumEnums: 4,
NumMessages: 1,
NumExtensions: 4,
NumServices: 0,
},
GoTypes: file_nanopb_proto_goTypes,
DependencyIndexes: file_nanopb_proto_depIdxs,
EnumInfos: file_nanopb_proto_enumTypes,
MessageInfos: file_nanopb_proto_msgTypes,
ExtensionInfos: file_nanopb_proto_extTypes,
}.Build()
File_nanopb_proto = out.File
file_nanopb_proto_goTypes = nil
file_nanopb_proto_depIdxs = nil
}

View File

@@ -0,0 +1,146 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/paxcount.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TODO: REPLACE
type Paxcount struct {
state protoimpl.MessageState `protogen:"open.v1"`
// seen Wifi devices
Wifi uint32 `protobuf:"varint,1,opt,name=wifi,proto3" json:"wifi,omitempty"`
// Seen BLE devices
Ble uint32 `protobuf:"varint,2,opt,name=ble,proto3" json:"ble,omitempty"`
// Uptime in seconds
Uptime uint32 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Paxcount) Reset() {
*x = Paxcount{}
mi := &file_meshtastic_paxcount_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Paxcount) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Paxcount) ProtoMessage() {}
func (x *Paxcount) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_paxcount_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Paxcount.ProtoReflect.Descriptor instead.
func (*Paxcount) Descriptor() ([]byte, []int) {
return file_meshtastic_paxcount_proto_rawDescGZIP(), []int{0}
}
func (x *Paxcount) GetWifi() uint32 {
if x != nil {
return x.Wifi
}
return 0
}
func (x *Paxcount) GetBle() uint32 {
if x != nil {
return x.Ble
}
return 0
}
func (x *Paxcount) GetUptime() uint32 {
if x != nil {
return x.Uptime
}
return 0
}
var File_meshtastic_paxcount_proto protoreflect.FileDescriptor
const file_meshtastic_paxcount_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/paxcount.proto\x12\n" +
"meshtastic\"H\n" +
"\bPaxcount\x12\x12\n" +
"\x04wifi\x18\x01 \x01(\rR\x04wifi\x12\x10\n" +
"\x03ble\x18\x02 \x01(\rR\x03ble\x12\x16\n" +
"\x06uptime\x18\x03 \x01(\rR\x06uptimeBd\n" +
"\x14org.meshtastic.protoB\x0ePaxcountProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_paxcount_proto_rawDescOnce sync.Once
file_meshtastic_paxcount_proto_rawDescData []byte
)
func file_meshtastic_paxcount_proto_rawDescGZIP() []byte {
file_meshtastic_paxcount_proto_rawDescOnce.Do(func() {
file_meshtastic_paxcount_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_paxcount_proto_rawDesc), len(file_meshtastic_paxcount_proto_rawDesc)))
})
return file_meshtastic_paxcount_proto_rawDescData
}
var file_meshtastic_paxcount_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_paxcount_proto_goTypes = []any{
(*Paxcount)(nil), // 0: meshtastic.Paxcount
}
var file_meshtastic_paxcount_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_meshtastic_paxcount_proto_init() }
func file_meshtastic_paxcount_proto_init() {
if File_meshtastic_paxcount_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_paxcount_proto_rawDesc), len(file_meshtastic_paxcount_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_paxcount_proto_goTypes,
DependencyIndexes: file_meshtastic_paxcount_proto_depIdxs,
MessageInfos: file_meshtastic_paxcount_proto_msgTypes,
}.Build()
File_meshtastic_paxcount_proto = out.File
file_meshtastic_paxcount_proto_goTypes = nil
file_meshtastic_paxcount_proto_depIdxs = nil
}

View File

@@ -0,0 +1,374 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/portnums.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a
// unique 'portnum' for their application.
// If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
// master table.
// PortNums should be assigned in the following range:
// 0-63 Core Meshtastic use, do not use for third party apps
// 64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application
// 256-511 Use one of these portnums for your private applications that you don't want to register publically
// All other values are reserved.
// Note: This was formerly a Type enum named 'typ' with the same id #
// We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
// This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically.
type PortNum int32
const (
// Deprecated: do not use in new code (formerly called OPAQUE)
// A message sent from a device outside of the mesh, in a form the mesh does not understand
// NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
// ENCODING: binary undefined
PortNum_UNKNOWN_APP PortNum = 0
// A simple UTF-8 text message, which even the little micros in the mesh
// can understand and show on their screen eventually in some circumstances
// even signal might send messages in this form (see below)
// ENCODING: UTF-8 Plaintext (?)
PortNum_TEXT_MESSAGE_APP PortNum = 1
// Reserved for built-in GPIO/example app.
// See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
// ENCODING: Protobuf
PortNum_REMOTE_HARDWARE_APP PortNum = 2
// The built-in position messaging app.
// Payload is a Position message.
// ENCODING: Protobuf
PortNum_POSITION_APP PortNum = 3
// The built-in user info app.
// Payload is a User message.
// ENCODING: Protobuf
PortNum_NODEINFO_APP PortNum = 4
// Protocol control packets for mesh protocol use.
// Payload is a Routing message.
// ENCODING: Protobuf
PortNum_ROUTING_APP PortNum = 5
// Admin control packets.
// Payload is a AdminMessage message.
// ENCODING: Protobuf
PortNum_ADMIN_APP PortNum = 6
// Compressed TEXT_MESSAGE payloads.
// ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression
// NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed
// payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress
// any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP.
PortNum_TEXT_MESSAGE_COMPRESSED_APP PortNum = 7
// Waypoint payloads.
// Payload is a Waypoint message.
// ENCODING: Protobuf
PortNum_WAYPOINT_APP PortNum = 8
// Audio Payloads.
// Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now
// ENCODING: codec2 audio frames
// NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate.
// This marker comes from the 'moduleConfig.audio.bitrate' enum minus one.
PortNum_AUDIO_APP PortNum = 9
// Same as Text Message but originating from Detection Sensor Module.
// NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9
PortNum_DETECTION_SENSOR_APP PortNum = 10
// Same as Text Message but used for critical alerts.
PortNum_ALERT_APP PortNum = 11
// Module/port for handling key verification requests.
PortNum_KEY_VERIFICATION_APP PortNum = 12
// 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
// Store and Forward++ module included in the firmware
// ENCODING: protobuf
// This module is specifically for Native Linux nodes, and provides a Git-style
// chain of messages.
PortNum_STORE_FORWARD_PLUSPLUS_APP PortNum = 35
// Node Status module
// ENCODING: protobuf
// This module allows setting an extra string of status for a node.
// Broadcasts on change and on a timer, possibly once a day.
PortNum_NODE_STATUS_APP PortNum = 36
// 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
// LoraWAN Payload Transport
// ENCODING: compact binary LoRaWAN uplink (10-byte RF metadata + PHY payload) - see LoRaWANBridgeModule
PortNum_LORAWAN_BRIDGE PortNum = 75
// Reticulum Network Stack Tunnel App
// ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface
PortNum_RETICULUM_TUNNEL_APP PortNum = 76
// App for transporting Cayenne Low Power Payload, popular for LoRaWAN sensor nodes. Offers ability to send
// arbitrary telemetry over meshtastic that is not covered by telemetry.proto
// ENCODING: CayenneLLP
PortNum_CAYENNE_APP PortNum = 77
// Private applications should use portnums >= 256.
// To simplify initial development and testing you can use "PRIVATE_APP"
// in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh))
PortNum_PRIVATE_APP PortNum = 256
// ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
// ENCODING: libcotshrink
PortNum_ATAK_FORWARDER PortNum = 257
// Currently we limit port nums to no higher than this value
PortNum_MAX PortNum = 511
)
// Enum value maps for PortNum.
var (
PortNum_name = map[int32]string{
0: "UNKNOWN_APP",
1: "TEXT_MESSAGE_APP",
2: "REMOTE_HARDWARE_APP",
3: "POSITION_APP",
4: "NODEINFO_APP",
5: "ROUTING_APP",
6: "ADMIN_APP",
7: "TEXT_MESSAGE_COMPRESSED_APP",
8: "WAYPOINT_APP",
9: "AUDIO_APP",
10: "DETECTION_SENSOR_APP",
11: "ALERT_APP",
12: "KEY_VERIFICATION_APP",
32: "REPLY_APP",
33: "IP_TUNNEL_APP",
34: "PAXCOUNTER_APP",
35: "STORE_FORWARD_PLUSPLUS_APP",
36: "NODE_STATUS_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",
75: "LORAWAN_BRIDGE",
76: "RETICULUM_TUNNEL_APP",
77: "CAYENNE_APP",
256: "PRIVATE_APP",
257: "ATAK_FORWARDER",
511: "MAX",
}
PortNum_value = map[string]int32{
"UNKNOWN_APP": 0,
"TEXT_MESSAGE_APP": 1,
"REMOTE_HARDWARE_APP": 2,
"POSITION_APP": 3,
"NODEINFO_APP": 4,
"ROUTING_APP": 5,
"ADMIN_APP": 6,
"TEXT_MESSAGE_COMPRESSED_APP": 7,
"WAYPOINT_APP": 8,
"AUDIO_APP": 9,
"DETECTION_SENSOR_APP": 10,
"ALERT_APP": 11,
"KEY_VERIFICATION_APP": 12,
"REPLY_APP": 32,
"IP_TUNNEL_APP": 33,
"PAXCOUNTER_APP": 34,
"STORE_FORWARD_PLUSPLUS_APP": 35,
"NODE_STATUS_APP": 36,
"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,
"LORAWAN_BRIDGE": 75,
"RETICULUM_TUNNEL_APP": 76,
"CAYENNE_APP": 77,
"PRIVATE_APP": 256,
"ATAK_FORWARDER": 257,
"MAX": 511,
}
)
func (x PortNum) Enum() *PortNum {
p := new(PortNum)
*p = x
return p
}
func (x PortNum) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PortNum) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_portnums_proto_enumTypes[0].Descriptor()
}
func (PortNum) Type() protoreflect.EnumType {
return &file_meshtastic_portnums_proto_enumTypes[0]
}
func (x PortNum) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PortNum.Descriptor instead.
func (PortNum) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_portnums_proto_rawDescGZIP(), []int{0}
}
var File_meshtastic_portnums_proto protoreflect.FileDescriptor
const file_meshtastic_portnums_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/portnums.proto\x12\n" +
"meshtastic*\xbf\x05\n" +
"\aPortNum\x12\x0f\n" +
"\vUNKNOWN_APP\x10\x00\x12\x14\n" +
"\x10TEXT_MESSAGE_APP\x10\x01\x12\x17\n" +
"\x13REMOTE_HARDWARE_APP\x10\x02\x12\x10\n" +
"\fPOSITION_APP\x10\x03\x12\x10\n" +
"\fNODEINFO_APP\x10\x04\x12\x0f\n" +
"\vROUTING_APP\x10\x05\x12\r\n" +
"\tADMIN_APP\x10\x06\x12\x1f\n" +
"\x1bTEXT_MESSAGE_COMPRESSED_APP\x10\a\x12\x10\n" +
"\fWAYPOINT_APP\x10\b\x12\r\n" +
"\tAUDIO_APP\x10\t\x12\x18\n" +
"\x14DETECTION_SENSOR_APP\x10\n" +
"\x12\r\n" +
"\tALERT_APP\x10\v\x12\x18\n" +
"\x14KEY_VERIFICATION_APP\x10\f\x12\r\n" +
"\tREPLY_APP\x10 \x12\x11\n" +
"\rIP_TUNNEL_APP\x10!\x12\x12\n" +
"\x0ePAXCOUNTER_APP\x10\"\x12\x1e\n" +
"\x1aSTORE_FORWARD_PLUSPLUS_APP\x10#\x12\x13\n" +
"\x0fNODE_STATUS_APP\x10$\x12\x0e\n" +
"\n" +
"SERIAL_APP\x10@\x12\x15\n" +
"\x11STORE_FORWARD_APP\x10A\x12\x12\n" +
"\x0eRANGE_TEST_APP\x10B\x12\x11\n" +
"\rTELEMETRY_APP\x10C\x12\v\n" +
"\aZPS_APP\x10D\x12\x11\n" +
"\rSIMULATOR_APP\x10E\x12\x12\n" +
"\x0eTRACEROUTE_APP\x10F\x12\x14\n" +
"\x10NEIGHBORINFO_APP\x10G\x12\x0f\n" +
"\vATAK_PLUGIN\x10H\x12\x12\n" +
"\x0eMAP_REPORT_APP\x10I\x12\x13\n" +
"\x0fPOWERSTRESS_APP\x10J\x12\x12\n" +
"\x0eLORAWAN_BRIDGE\x10K\x12\x18\n" +
"\x14RETICULUM_TUNNEL_APP\x10L\x12\x0f\n" +
"\vCAYENNE_APP\x10M\x12\x10\n" +
"\vPRIVATE_APP\x10\x80\x02\x12\x13\n" +
"\x0eATAK_FORWARDER\x10\x81\x02\x12\b\n" +
"\x03MAX\x10\xff\x03B^\n" +
"\x14org.meshtastic.protoB\bPortnumsZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_portnums_proto_rawDescOnce sync.Once
file_meshtastic_portnums_proto_rawDescData []byte
)
func file_meshtastic_portnums_proto_rawDescGZIP() []byte {
file_meshtastic_portnums_proto_rawDescOnce.Do(func() {
file_meshtastic_portnums_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_portnums_proto_rawDesc), len(file_meshtastic_portnums_proto_rawDesc)))
})
return file_meshtastic_portnums_proto_rawDescData
}
var file_meshtastic_portnums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_portnums_proto_goTypes = []any{
(PortNum)(0), // 0: meshtastic.PortNum
}
var file_meshtastic_portnums_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_meshtastic_portnums_proto_init() }
func file_meshtastic_portnums_proto_init() {
if File_meshtastic_portnums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_portnums_proto_rawDesc), len(file_meshtastic_portnums_proto_rawDesc)),
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_portnums_proto_goTypes,
DependencyIndexes: file_meshtastic_portnums_proto_depIdxs,
EnumInfos: file_meshtastic_portnums_proto_enumTypes,
}.Build()
File_meshtastic_portnums_proto = out.File
file_meshtastic_portnums_proto_goTypes = nil
file_meshtastic_portnums_proto_depIdxs = nil
}

View File

@@ -0,0 +1,418 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/powermon.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Any significant power changing event in meshtastic should be tagged with a powermon state transition.
// If you are making new meshtastic features feel free to add new entries at the end of this definition.
type PowerMon_State int32
const (
PowerMon_None PowerMon_State = 0
PowerMon_CPU_DeepSleep PowerMon_State = 1
PowerMon_CPU_LightSleep PowerMon_State = 2
// The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only
// occasionally. In cases where that rail has multiple devices on it we usually want to have logging on
// the state of that rail as an independent record.
// For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.
//
// The log messages will be short and complete (see PowerMon.Event in the protobufs for details).
// something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states.
// (We use a bitmask for states so that if a log message gets lost it won't be fatal)
PowerMon_Vext1_On PowerMon_State = 4
PowerMon_Lora_RXOn PowerMon_State = 8
PowerMon_Lora_TXOn PowerMon_State = 16
PowerMon_Lora_RXActive PowerMon_State = 32
PowerMon_BT_On PowerMon_State = 64
PowerMon_LED_On PowerMon_State = 128
PowerMon_Screen_On PowerMon_State = 256
PowerMon_Screen_Drawing PowerMon_State = 512
PowerMon_Wifi_On PowerMon_State = 1024
// GPS is actively trying to find our location
// See GPSPowerState for more details
PowerMon_GPS_Active PowerMon_State = 2048
)
// Enum value maps for PowerMon_State.
var (
PowerMon_State_name = map[int32]string{
0: "None",
1: "CPU_DeepSleep",
2: "CPU_LightSleep",
4: "Vext1_On",
8: "Lora_RXOn",
16: "Lora_TXOn",
32: "Lora_RXActive",
64: "BT_On",
128: "LED_On",
256: "Screen_On",
512: "Screen_Drawing",
1024: "Wifi_On",
2048: "GPS_Active",
}
PowerMon_State_value = map[string]int32{
"None": 0,
"CPU_DeepSleep": 1,
"CPU_LightSleep": 2,
"Vext1_On": 4,
"Lora_RXOn": 8,
"Lora_TXOn": 16,
"Lora_RXActive": 32,
"BT_On": 64,
"LED_On": 128,
"Screen_On": 256,
"Screen_Drawing": 512,
"Wifi_On": 1024,
"GPS_Active": 2048,
}
)
func (x PowerMon_State) Enum() *PowerMon_State {
p := new(PowerMon_State)
*p = x
return p
}
func (x PowerMon_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PowerMon_State) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_powermon_proto_enumTypes[0].Descriptor()
}
func (PowerMon_State) Type() protoreflect.EnumType {
return &file_meshtastic_powermon_proto_enumTypes[0]
}
func (x PowerMon_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PowerMon_State.Descriptor instead.
func (PowerMon_State) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{0, 0}
}
// What operation would we like the UUT to perform.
// note: senders should probably set want_response in their request packets, so that they can know when the state
// machine has started processing their request
type PowerStressMessage_Opcode int32
const (
// Unset/unused
PowerStressMessage_UNSET PowerStressMessage_Opcode = 0
PowerStressMessage_PRINT_INFO PowerStressMessage_Opcode = 1 // Print board version slog and send an ack that we are alive and ready to process commands
PowerStressMessage_FORCE_QUIET PowerStressMessage_Opcode = 2 // Try to turn off all automatic processing of packets, screen, sleeping, etc (to make it easier to measure in isolation)
PowerStressMessage_END_QUIET PowerStressMessage_Opcode = 3 // Stop powerstress processing - probably by just rebooting the board
PowerStressMessage_SCREEN_ON PowerStressMessage_Opcode = 16 // Turn the screen on
PowerStressMessage_SCREEN_OFF PowerStressMessage_Opcode = 17 // Turn the screen off
PowerStressMessage_CPU_IDLE PowerStressMessage_Opcode = 32 // Let the CPU run but we assume mostly idling for num_seconds
PowerStressMessage_CPU_DEEPSLEEP PowerStressMessage_Opcode = 33 // Force deep sleep for FIXME seconds
PowerStressMessage_CPU_FULLON PowerStressMessage_Opcode = 34 // Spin the CPU as fast as possible for num_seconds
PowerStressMessage_LED_ON PowerStressMessage_Opcode = 48 // Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes)
PowerStressMessage_LED_OFF PowerStressMessage_Opcode = 49 // Force the LED off for num_seconds
PowerStressMessage_LORA_OFF PowerStressMessage_Opcode = 64 // Completely turn off the LORA radio for num_seconds
PowerStressMessage_LORA_TX PowerStressMessage_Opcode = 65 // Send Lora packets for num_seconds
PowerStressMessage_LORA_RX PowerStressMessage_Opcode = 66 // Receive Lora packets for num_seconds (node will be mostly just listening, unless an external agent is helping stress this by sending packets on the current channel)
PowerStressMessage_BT_OFF PowerStressMessage_Opcode = 80 // Turn off the BT radio for num_seconds
PowerStressMessage_BT_ON PowerStressMessage_Opcode = 81 // Turn on the BT radio for num_seconds
PowerStressMessage_WIFI_OFF PowerStressMessage_Opcode = 96 // Turn off the WIFI radio for num_seconds
PowerStressMessage_WIFI_ON PowerStressMessage_Opcode = 97 // Turn on the WIFI radio for num_seconds
PowerStressMessage_GPS_OFF PowerStressMessage_Opcode = 112 // Turn off the GPS radio for num_seconds
PowerStressMessage_GPS_ON PowerStressMessage_Opcode = 113 // Turn on the GPS radio for num_seconds
)
// Enum value maps for PowerStressMessage_Opcode.
var (
PowerStressMessage_Opcode_name = map[int32]string{
0: "UNSET",
1: "PRINT_INFO",
2: "FORCE_QUIET",
3: "END_QUIET",
16: "SCREEN_ON",
17: "SCREEN_OFF",
32: "CPU_IDLE",
33: "CPU_DEEPSLEEP",
34: "CPU_FULLON",
48: "LED_ON",
49: "LED_OFF",
64: "LORA_OFF",
65: "LORA_TX",
66: "LORA_RX",
80: "BT_OFF",
81: "BT_ON",
96: "WIFI_OFF",
97: "WIFI_ON",
112: "GPS_OFF",
113: "GPS_ON",
}
PowerStressMessage_Opcode_value = map[string]int32{
"UNSET": 0,
"PRINT_INFO": 1,
"FORCE_QUIET": 2,
"END_QUIET": 3,
"SCREEN_ON": 16,
"SCREEN_OFF": 17,
"CPU_IDLE": 32,
"CPU_DEEPSLEEP": 33,
"CPU_FULLON": 34,
"LED_ON": 48,
"LED_OFF": 49,
"LORA_OFF": 64,
"LORA_TX": 65,
"LORA_RX": 66,
"BT_OFF": 80,
"BT_ON": 81,
"WIFI_OFF": 96,
"WIFI_ON": 97,
"GPS_OFF": 112,
"GPS_ON": 113,
}
)
func (x PowerStressMessage_Opcode) Enum() *PowerStressMessage_Opcode {
p := new(PowerStressMessage_Opcode)
*p = x
return p
}
func (x PowerStressMessage_Opcode) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PowerStressMessage_Opcode) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_powermon_proto_enumTypes[1].Descriptor()
}
func (PowerStressMessage_Opcode) Type() protoreflect.EnumType {
return &file_meshtastic_powermon_proto_enumTypes[1]
}
func (x PowerStressMessage_Opcode) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PowerStressMessage_Opcode.Descriptor instead.
func (PowerStressMessage_Opcode) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{1, 0}
}
// Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs).
// But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us)
type PowerMon struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PowerMon) Reset() {
*x = PowerMon{}
mi := &file_meshtastic_powermon_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PowerMon) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PowerMon) ProtoMessage() {}
func (x *PowerMon) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_powermon_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PowerMon.ProtoReflect.Descriptor instead.
func (*PowerMon) Descriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{0}
}
// PowerStress testing support via the C++ PowerStress module
type PowerStressMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// What type of HardwareMessage is this?
Cmd PowerStressMessage_Opcode `protobuf:"varint,1,opt,name=cmd,proto3,enum=meshtastic.PowerStressMessage_Opcode" json:"cmd,omitempty"`
NumSeconds float32 `protobuf:"fixed32,2,opt,name=num_seconds,json=numSeconds,proto3" json:"numSeconds,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *PowerStressMessage) Reset() {
*x = PowerStressMessage{}
mi := &file_meshtastic_powermon_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *PowerStressMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PowerStressMessage) ProtoMessage() {}
func (x *PowerStressMessage) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_powermon_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PowerStressMessage.ProtoReflect.Descriptor instead.
func (*PowerStressMessage) Descriptor() ([]byte, []int) {
return file_meshtastic_powermon_proto_rawDescGZIP(), []int{1}
}
func (x *PowerStressMessage) GetCmd() PowerStressMessage_Opcode {
if x != nil {
return x.Cmd
}
return PowerStressMessage_UNSET
}
func (x *PowerStressMessage) GetNumSeconds() float32 {
if x != nil {
return x.NumSeconds
}
return 0
}
var File_meshtastic_powermon_proto protoreflect.FileDescriptor
const file_meshtastic_powermon_proto_rawDesc = "" +
"\n" +
"\x19meshtastic/powermon.proto\x12\n" +
"meshtastic\"\xe0\x01\n" +
"\bPowerMon\"\xd3\x01\n" +
"\x05State\x12\b\n" +
"\x04None\x10\x00\x12\x11\n" +
"\rCPU_DeepSleep\x10\x01\x12\x12\n" +
"\x0eCPU_LightSleep\x10\x02\x12\f\n" +
"\bVext1_On\x10\x04\x12\r\n" +
"\tLora_RXOn\x10\b\x12\r\n" +
"\tLora_TXOn\x10\x10\x12\x11\n" +
"\rLora_RXActive\x10 \x12\t\n" +
"\x05BT_On\x10@\x12\v\n" +
"\x06LED_On\x10\x80\x01\x12\x0e\n" +
"\tScreen_On\x10\x80\x02\x12\x13\n" +
"\x0eScreen_Drawing\x10\x80\x04\x12\f\n" +
"\aWifi_On\x10\x80\b\x12\x0f\n" +
"\n" +
"GPS_Active\x10\x80\x10\"\x90\x03\n" +
"\x12PowerStressMessage\x127\n" +
"\x03cmd\x18\x01 \x01(\x0e2%.meshtastic.PowerStressMessage.OpcodeR\x03cmd\x12\x1f\n" +
"\vnum_seconds\x18\x02 \x01(\x02R\n" +
"numSeconds\"\x9f\x02\n" +
"\x06Opcode\x12\t\n" +
"\x05UNSET\x10\x00\x12\x0e\n" +
"\n" +
"PRINT_INFO\x10\x01\x12\x0f\n" +
"\vFORCE_QUIET\x10\x02\x12\r\n" +
"\tEND_QUIET\x10\x03\x12\r\n" +
"\tSCREEN_ON\x10\x10\x12\x0e\n" +
"\n" +
"SCREEN_OFF\x10\x11\x12\f\n" +
"\bCPU_IDLE\x10 \x12\x11\n" +
"\rCPU_DEEPSLEEP\x10!\x12\x0e\n" +
"\n" +
"CPU_FULLON\x10\"\x12\n" +
"\n" +
"\x06LED_ON\x100\x12\v\n" +
"\aLED_OFF\x101\x12\f\n" +
"\bLORA_OFF\x10@\x12\v\n" +
"\aLORA_TX\x10A\x12\v\n" +
"\aLORA_RX\x10B\x12\n" +
"\n" +
"\x06BT_OFF\x10P\x12\t\n" +
"\x05BT_ON\x10Q\x12\f\n" +
"\bWIFI_OFF\x10`\x12\v\n" +
"\aWIFI_ON\x10a\x12\v\n" +
"\aGPS_OFF\x10p\x12\n" +
"\n" +
"\x06GPS_ON\x10qBd\n" +
"\x14org.meshtastic.protoB\x0ePowerMonProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_powermon_proto_rawDescOnce sync.Once
file_meshtastic_powermon_proto_rawDescData []byte
)
func file_meshtastic_powermon_proto_rawDescGZIP() []byte {
file_meshtastic_powermon_proto_rawDescOnce.Do(func() {
file_meshtastic_powermon_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_powermon_proto_rawDesc), len(file_meshtastic_powermon_proto_rawDesc)))
})
return file_meshtastic_powermon_proto_rawDescData
}
var file_meshtastic_powermon_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_meshtastic_powermon_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_meshtastic_powermon_proto_goTypes = []any{
(PowerMon_State)(0), // 0: meshtastic.PowerMon.State
(PowerStressMessage_Opcode)(0), // 1: meshtastic.PowerStressMessage.Opcode
(*PowerMon)(nil), // 2: meshtastic.PowerMon
(*PowerStressMessage)(nil), // 3: meshtastic.PowerStressMessage
}
var file_meshtastic_powermon_proto_depIdxs = []int32{
1, // 0: meshtastic.PowerStressMessage.cmd:type_name -> meshtastic.PowerStressMessage.Opcode
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_powermon_proto_init() }
func file_meshtastic_powermon_proto_init() {
if File_meshtastic_powermon_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_powermon_proto_rawDesc), len(file_meshtastic_powermon_proto_rawDesc)),
NumEnums: 2,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_powermon_proto_goTypes,
DependencyIndexes: file_meshtastic_powermon_proto_depIdxs,
EnumInfos: file_meshtastic_powermon_proto_enumTypes,
MessageInfos: file_meshtastic_powermon_proto_msgTypes,
}.Build()
File_meshtastic_powermon_proto = out.File
file_meshtastic_powermon_proto_goTypes = nil
file_meshtastic_powermon_proto_depIdxs = nil
}

View File

@@ -0,0 +1,235 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/remote_hardware.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// TODO: REPLACE
type HardwareMessage_Type int32
const (
// Unset/unused
HardwareMessage_UNSET HardwareMessage_Type = 0
// Set gpio gpios based on gpio_mask/gpio_value
HardwareMessage_WRITE_GPIOS HardwareMessage_Type = 1
// We are now interested in watching the gpio_mask gpios.
// If the selected gpios change, please broadcast GPIOS_CHANGED.
// Will implicitly change the gpios requested to be INPUT gpios.
HardwareMessage_WATCH_GPIOS HardwareMessage_Type = 2
// The gpios listed in gpio_mask have changed, the new values are listed in gpio_value
HardwareMessage_GPIOS_CHANGED HardwareMessage_Type = 3
// Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated
HardwareMessage_READ_GPIOS HardwareMessage_Type = 4
// A reply to READ_GPIOS. gpio_mask and gpio_value will be populated
HardwareMessage_READ_GPIOS_REPLY HardwareMessage_Type = 5
)
// Enum value maps for HardwareMessage_Type.
var (
HardwareMessage_Type_name = map[int32]string{
0: "UNSET",
1: "WRITE_GPIOS",
2: "WATCH_GPIOS",
3: "GPIOS_CHANGED",
4: "READ_GPIOS",
5: "READ_GPIOS_REPLY",
}
HardwareMessage_Type_value = map[string]int32{
"UNSET": 0,
"WRITE_GPIOS": 1,
"WATCH_GPIOS": 2,
"GPIOS_CHANGED": 3,
"READ_GPIOS": 4,
"READ_GPIOS_REPLY": 5,
}
)
func (x HardwareMessage_Type) Enum() *HardwareMessage_Type {
p := new(HardwareMessage_Type)
*p = x
return p
}
func (x HardwareMessage_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HardwareMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_remote_hardware_proto_enumTypes[0].Descriptor()
}
func (HardwareMessage_Type) Type() protoreflect.EnumType {
return &file_meshtastic_remote_hardware_proto_enumTypes[0]
}
func (x HardwareMessage_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HardwareMessage_Type.Descriptor instead.
func (HardwareMessage_Type) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_remote_hardware_proto_rawDescGZIP(), []int{0, 0}
}
// An example app to show off the module system. This message is used for
// REMOTE_HARDWARE_APP PortNums.
// Also provides easy remote access to any GPIO.
// In the future other remote hardware operations can be added based on user interest
// (i.e. serial output, spi/i2c input/output).
// FIXME - currently this feature is turned on by default which is dangerous
// because no security yet (beyond the channel mechanism).
// It should be off by default and then protected based on some TBD mechanism
// (a special channel once multichannel support is included?)
type HardwareMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// What type of HardwareMessage is this?
Type HardwareMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=meshtastic.HardwareMessage_Type" json:"type,omitempty"`
// What gpios are we changing. Not used for all MessageTypes, see MessageType for details
GpioMask uint64 `protobuf:"varint,2,opt,name=gpio_mask,json=gpioMask,proto3" json:"gpioMask,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:"gpioValue,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *HardwareMessage) Reset() {
*x = HardwareMessage{}
mi := &file_meshtastic_remote_hardware_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *HardwareMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HardwareMessage) ProtoMessage() {}
func (x *HardwareMessage) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_remote_hardware_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HardwareMessage.ProtoReflect.Descriptor instead.
func (*HardwareMessage) Descriptor() ([]byte, []int) {
return file_meshtastic_remote_hardware_proto_rawDescGZIP(), []int{0}
}
func (x *HardwareMessage) GetType() HardwareMessage_Type {
if x != nil {
return x.Type
}
return HardwareMessage_UNSET
}
func (x *HardwareMessage) GetGpioMask() uint64 {
if x != nil {
return x.GpioMask
}
return 0
}
func (x *HardwareMessage) GetGpioValue() uint64 {
if x != nil {
return x.GpioValue
}
return 0
}
var File_meshtastic_remote_hardware_proto protoreflect.FileDescriptor
const file_meshtastic_remote_hardware_proto_rawDesc = "" +
"\n" +
" meshtastic/remote_hardware.proto\x12\n" +
"meshtastic\"\xf1\x01\n" +
"\x0fHardwareMessage\x124\n" +
"\x04type\x18\x01 \x01(\x0e2 .meshtastic.HardwareMessage.TypeR\x04type\x12\x1b\n" +
"\tgpio_mask\x18\x02 \x01(\x04R\bgpioMask\x12\x1d\n" +
"\n" +
"gpio_value\x18\x03 \x01(\x04R\tgpioValue\"l\n" +
"\x04Type\x12\t\n" +
"\x05UNSET\x10\x00\x12\x0f\n" +
"\vWRITE_GPIOS\x10\x01\x12\x0f\n" +
"\vWATCH_GPIOS\x10\x02\x12\x11\n" +
"\rGPIOS_CHANGED\x10\x03\x12\x0e\n" +
"\n" +
"READ_GPIOS\x10\x04\x12\x14\n" +
"\x10READ_GPIOS_REPLY\x10\x05Bd\n" +
"\x14org.meshtastic.protoB\x0eRemoteHardwareZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_remote_hardware_proto_rawDescOnce sync.Once
file_meshtastic_remote_hardware_proto_rawDescData []byte
)
func file_meshtastic_remote_hardware_proto_rawDescGZIP() []byte {
file_meshtastic_remote_hardware_proto_rawDescOnce.Do(func() {
file_meshtastic_remote_hardware_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_remote_hardware_proto_rawDesc), len(file_meshtastic_remote_hardware_proto_rawDesc)))
})
return file_meshtastic_remote_hardware_proto_rawDescData
}
var file_meshtastic_remote_hardware_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_remote_hardware_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_remote_hardware_proto_goTypes = []any{
(HardwareMessage_Type)(0), // 0: meshtastic.HardwareMessage.Type
(*HardwareMessage)(nil), // 1: meshtastic.HardwareMessage
}
var file_meshtastic_remote_hardware_proto_depIdxs = []int32{
0, // 0: meshtastic.HardwareMessage.type:type_name -> meshtastic.HardwareMessage.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_remote_hardware_proto_init() }
func file_meshtastic_remote_hardware_proto_init() {
if File_meshtastic_remote_hardware_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_remote_hardware_proto_rawDesc), len(file_meshtastic_remote_hardware_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_remote_hardware_proto_goTypes,
DependencyIndexes: file_meshtastic_remote_hardware_proto_depIdxs,
EnumInfos: file_meshtastic_remote_hardware_proto_enumTypes,
MessageInfos: file_meshtastic_remote_hardware_proto_msgTypes,
}.Build()
File_meshtastic_remote_hardware_proto = out.File
file_meshtastic_remote_hardware_proto_goTypes = nil
file_meshtastic_remote_hardware_proto_depIdxs = nil
}

View File

@@ -0,0 +1,126 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/rtttl.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Canned message module configuration.
type RTTTLConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Ringtone for PWM Buzzer in RTTTL Format.
Ringtone string `protobuf:"bytes,1,opt,name=ringtone,proto3" json:"ringtone,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *RTTTLConfig) Reset() {
*x = RTTTLConfig{}
mi := &file_meshtastic_rtttl_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *RTTTLConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RTTTLConfig) ProtoMessage() {}
func (x *RTTTLConfig) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_rtttl_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RTTTLConfig.ProtoReflect.Descriptor instead.
func (*RTTTLConfig) Descriptor() ([]byte, []int) {
return file_meshtastic_rtttl_proto_rawDescGZIP(), []int{0}
}
func (x *RTTTLConfig) GetRingtone() string {
if x != nil {
return x.Ringtone
}
return ""
}
var File_meshtastic_rtttl_proto protoreflect.FileDescriptor
const file_meshtastic_rtttl_proto_rawDesc = "" +
"\n" +
"\x16meshtastic/rtttl.proto\x12\n" +
"meshtastic\")\n" +
"\vRTTTLConfig\x12\x1a\n" +
"\bringtone\x18\x01 \x01(\tR\bringtoneBg\n" +
"\x14org.meshtastic.protoB\x11RTTTLConfigProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_rtttl_proto_rawDescOnce sync.Once
file_meshtastic_rtttl_proto_rawDescData []byte
)
func file_meshtastic_rtttl_proto_rawDescGZIP() []byte {
file_meshtastic_rtttl_proto_rawDescOnce.Do(func() {
file_meshtastic_rtttl_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_rtttl_proto_rawDesc), len(file_meshtastic_rtttl_proto_rawDesc)))
})
return file_meshtastic_rtttl_proto_rawDescData
}
var file_meshtastic_rtttl_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_rtttl_proto_goTypes = []any{
(*RTTTLConfig)(nil), // 0: meshtastic.RTTTLConfig
}
var file_meshtastic_rtttl_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_meshtastic_rtttl_proto_init() }
func file_meshtastic_rtttl_proto_init() {
if File_meshtastic_rtttl_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_rtttl_proto_rawDesc), len(file_meshtastic_rtttl_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_rtttl_proto_goTypes,
DependencyIndexes: file_meshtastic_rtttl_proto_depIdxs,
MessageInfos: file_meshtastic_rtttl_proto_msgTypes,
}.Build()
File_meshtastic_rtttl_proto = out.File
file_meshtastic_rtttl_proto_goTypes = nil
file_meshtastic_rtttl_proto_depIdxs = nil
}

View File

@@ -0,0 +1,613 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/storeforward.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 001 - 063 = From Router
// 064 - 127 = From Client
type StoreAndForward_RequestResponse int32
const (
// Unset/unused
StoreAndForward_UNSET StoreAndForward_RequestResponse = 0
// Router is an in error state.
StoreAndForward_ROUTER_ERROR StoreAndForward_RequestResponse = 1
// Router heartbeat
StoreAndForward_ROUTER_HEARTBEAT StoreAndForward_RequestResponse = 2
// Router has requested the client respond. This can work as a
// "are you there" message.
StoreAndForward_ROUTER_PING StoreAndForward_RequestResponse = 3
// The response to a "Ping"
StoreAndForward_ROUTER_PONG StoreAndForward_RequestResponse = 4
// Router is currently busy. Please try again later.
StoreAndForward_ROUTER_BUSY StoreAndForward_RequestResponse = 5
// Router is responding to a request for history.
StoreAndForward_ROUTER_HISTORY StoreAndForward_RequestResponse = 6
// Router is responding to a request for stats.
StoreAndForward_ROUTER_STATS StoreAndForward_RequestResponse = 7
// Router sends a text message from its history that was a direct message.
StoreAndForward_ROUTER_TEXT_DIRECT StoreAndForward_RequestResponse = 8
// Router sends a text message from its history that was a broadcast.
StoreAndForward_ROUTER_TEXT_BROADCAST StoreAndForward_RequestResponse = 9
// Client is an in error state.
StoreAndForward_CLIENT_ERROR StoreAndForward_RequestResponse = 64
// Client has requested a replay from the router.
StoreAndForward_CLIENT_HISTORY StoreAndForward_RequestResponse = 65
// Client has requested stats from the router.
StoreAndForward_CLIENT_STATS StoreAndForward_RequestResponse = 66
// Client has requested the router respond. This can work as a
// "are you there" message.
StoreAndForward_CLIENT_PING StoreAndForward_RequestResponse = 67
// The response to a "Ping"
StoreAndForward_CLIENT_PONG StoreAndForward_RequestResponse = 68
// Client has requested that the router abort processing the client's request
StoreAndForward_CLIENT_ABORT StoreAndForward_RequestResponse = 106
)
// Enum value maps for StoreAndForward_RequestResponse.
var (
StoreAndForward_RequestResponse_name = map[int32]string{
0: "UNSET",
1: "ROUTER_ERROR",
2: "ROUTER_HEARTBEAT",
3: "ROUTER_PING",
4: "ROUTER_PONG",
5: "ROUTER_BUSY",
6: "ROUTER_HISTORY",
7: "ROUTER_STATS",
8: "ROUTER_TEXT_DIRECT",
9: "ROUTER_TEXT_BROADCAST",
64: "CLIENT_ERROR",
65: "CLIENT_HISTORY",
66: "CLIENT_STATS",
67: "CLIENT_PING",
68: "CLIENT_PONG",
106: "CLIENT_ABORT",
}
StoreAndForward_RequestResponse_value = map[string]int32{
"UNSET": 0,
"ROUTER_ERROR": 1,
"ROUTER_HEARTBEAT": 2,
"ROUTER_PING": 3,
"ROUTER_PONG": 4,
"ROUTER_BUSY": 5,
"ROUTER_HISTORY": 6,
"ROUTER_STATS": 7,
"ROUTER_TEXT_DIRECT": 8,
"ROUTER_TEXT_BROADCAST": 9,
"CLIENT_ERROR": 64,
"CLIENT_HISTORY": 65,
"CLIENT_STATS": 66,
"CLIENT_PING": 67,
"CLIENT_PONG": 68,
"CLIENT_ABORT": 106,
}
)
func (x StoreAndForward_RequestResponse) Enum() *StoreAndForward_RequestResponse {
p := new(StoreAndForward_RequestResponse)
*p = x
return p
}
func (x StoreAndForward_RequestResponse) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StoreAndForward_RequestResponse) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_storeforward_proto_enumTypes[0].Descriptor()
}
func (StoreAndForward_RequestResponse) Type() protoreflect.EnumType {
return &file_meshtastic_storeforward_proto_enumTypes[0]
}
func (x StoreAndForward_RequestResponse) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StoreAndForward_RequestResponse.Descriptor instead.
func (StoreAndForward_RequestResponse) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 0}
}
// TODO: REPLACE
type StoreAndForward struct {
state protoimpl.MessageState `protogen:"open.v1"`
// TODO: REPLACE
Rr StoreAndForward_RequestResponse `protobuf:"varint,1,opt,name=rr,proto3,enum=meshtastic.StoreAndForward_RequestResponse" json:"rr,omitempty"`
// TODO: REPLACE
//
// Types that are valid to be assigned to Variant:
//
// *StoreAndForward_Stats
// *StoreAndForward_History_
// *StoreAndForward_Heartbeat_
// *StoreAndForward_Text
Variant isStoreAndForward_Variant `protobuf_oneof:"variant"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward) Reset() {
*x = StoreAndForward{}
mi := &file_meshtastic_storeforward_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward) ProtoMessage() {}
func (x *StoreAndForward) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StoreAndForward.ProtoReflect.Descriptor instead.
func (*StoreAndForward) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0}
}
func (x *StoreAndForward) GetRr() StoreAndForward_RequestResponse {
if x != nil {
return x.Rr
}
return StoreAndForward_UNSET
}
func (x *StoreAndForward) GetVariant() isStoreAndForward_Variant {
if x != nil {
return x.Variant
}
return nil
}
func (x *StoreAndForward) GetStats() *StoreAndForward_Statistics {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Stats); ok {
return x.Stats
}
}
return nil
}
func (x *StoreAndForward) GetHistory() *StoreAndForward_History {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_History_); ok {
return x.History
}
}
return nil
}
func (x *StoreAndForward) GetHeartbeat() *StoreAndForward_Heartbeat {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Heartbeat_); ok {
return x.Heartbeat
}
}
return nil
}
func (x *StoreAndForward) GetText() []byte {
if x != nil {
if x, ok := x.Variant.(*StoreAndForward_Text); ok {
return x.Text
}
}
return nil
}
type isStoreAndForward_Variant interface {
isStoreAndForward_Variant()
}
type StoreAndForward_Stats struct {
// TODO: REPLACE
Stats *StoreAndForward_Statistics `protobuf:"bytes,2,opt,name=stats,proto3,oneof"`
}
type StoreAndForward_History_ struct {
// TODO: REPLACE
History *StoreAndForward_History `protobuf:"bytes,3,opt,name=history,proto3,oneof"`
}
type StoreAndForward_Heartbeat_ struct {
// TODO: REPLACE
Heartbeat *StoreAndForward_Heartbeat `protobuf:"bytes,4,opt,name=heartbeat,proto3,oneof"`
}
type StoreAndForward_Text struct {
// Text from history message.
Text []byte `protobuf:"bytes,5,opt,name=text,proto3,oneof"`
}
func (*StoreAndForward_Stats) isStoreAndForward_Variant() {}
func (*StoreAndForward_History_) isStoreAndForward_Variant() {}
func (*StoreAndForward_Heartbeat_) isStoreAndForward_Variant() {}
func (*StoreAndForward_Text) isStoreAndForward_Variant() {}
// TODO: REPLACE
type StoreAndForward_Statistics struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Number of messages we have ever seen
MessagesTotal uint32 `protobuf:"varint,1,opt,name=messages_total,json=messagesTotal,proto3" json:"messagesTotal,omitempty"`
// Number of messages we have currently saved our history.
MessagesSaved uint32 `protobuf:"varint,2,opt,name=messages_saved,json=messagesSaved,proto3" json:"messagesSaved,omitempty"`
// Maximum number of messages we will save
MessagesMax uint32 `protobuf:"varint,3,opt,name=messages_max,json=messagesMax,proto3" json:"messagesMax,omitempty"`
// Router uptime in seconds
UpTime uint32 `protobuf:"varint,4,opt,name=up_time,json=upTime,proto3" json:"upTime,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:"requestsHistory,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:"returnMax,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:"returnWindow,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_Statistics) Reset() {
*x = StoreAndForward_Statistics{}
mi := &file_meshtastic_storeforward_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_Statistics) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_Statistics) ProtoMessage() {}
func (x *StoreAndForward_Statistics) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StoreAndForward_Statistics.ProtoReflect.Descriptor instead.
func (*StoreAndForward_Statistics) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 0}
}
func (x *StoreAndForward_Statistics) GetMessagesTotal() uint32 {
if x != nil {
return x.MessagesTotal
}
return 0
}
func (x *StoreAndForward_Statistics) GetMessagesSaved() uint32 {
if x != nil {
return x.MessagesSaved
}
return 0
}
func (x *StoreAndForward_Statistics) GetMessagesMax() uint32 {
if x != nil {
return x.MessagesMax
}
return 0
}
func (x *StoreAndForward_Statistics) GetUpTime() uint32 {
if x != nil {
return x.UpTime
}
return 0
}
func (x *StoreAndForward_Statistics) GetRequests() uint32 {
if x != nil {
return x.Requests
}
return 0
}
func (x *StoreAndForward_Statistics) GetRequestsHistory() uint32 {
if x != nil {
return x.RequestsHistory
}
return 0
}
func (x *StoreAndForward_Statistics) GetHeartbeat() bool {
if x != nil {
return x.Heartbeat
}
return false
}
func (x *StoreAndForward_Statistics) GetReturnMax() uint32 {
if x != nil {
return x.ReturnMax
}
return 0
}
func (x *StoreAndForward_Statistics) GetReturnWindow() uint32 {
if x != nil {
return x.ReturnWindow
}
return 0
}
// TODO: REPLACE
type StoreAndForward_History struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Number of that will be sent to the client
HistoryMessages uint32 `protobuf:"varint,1,opt,name=history_messages,json=historyMessages,proto3" json:"historyMessages,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:"lastRequest,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_History) Reset() {
*x = StoreAndForward_History{}
mi := &file_meshtastic_storeforward_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_History) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_History) ProtoMessage() {}
func (x *StoreAndForward_History) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StoreAndForward_History.ProtoReflect.Descriptor instead.
func (*StoreAndForward_History) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 1}
}
func (x *StoreAndForward_History) GetHistoryMessages() uint32 {
if x != nil {
return x.HistoryMessages
}
return 0
}
func (x *StoreAndForward_History) GetWindow() uint32 {
if x != nil {
return x.Window
}
return 0
}
func (x *StoreAndForward_History) GetLastRequest() uint32 {
if x != nil {
return x.LastRequest
}
return 0
}
// TODO: REPLACE
type StoreAndForward_Heartbeat struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Period in seconds that the heartbeat is sent out that will be sent to the client
Period uint32 `protobuf:"varint,1,opt,name=period,proto3" json:"period,omitempty"`
// If set, this is not the primary Store & Forward router on the mesh
Secondary uint32 `protobuf:"varint,2,opt,name=secondary,proto3" json:"secondary,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StoreAndForward_Heartbeat) Reset() {
*x = StoreAndForward_Heartbeat{}
mi := &file_meshtastic_storeforward_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StoreAndForward_Heartbeat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StoreAndForward_Heartbeat) ProtoMessage() {}
func (x *StoreAndForward_Heartbeat) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_storeforward_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StoreAndForward_Heartbeat.ProtoReflect.Descriptor instead.
func (*StoreAndForward_Heartbeat) Descriptor() ([]byte, []int) {
return file_meshtastic_storeforward_proto_rawDescGZIP(), []int{0, 2}
}
func (x *StoreAndForward_Heartbeat) GetPeriod() uint32 {
if x != nil {
return x.Period
}
return 0
}
func (x *StoreAndForward_Heartbeat) GetSecondary() uint32 {
if x != nil {
return x.Secondary
}
return 0
}
var File_meshtastic_storeforward_proto protoreflect.FileDescriptor
const file_meshtastic_storeforward_proto_rawDesc = "" +
"\n" +
"\x1dmeshtastic/storeforward.proto\x12\n" +
"meshtastic\"\xec\b\n" +
"\x0fStoreAndForward\x12;\n" +
"\x02rr\x18\x01 \x01(\x0e2+.meshtastic.StoreAndForward.RequestResponseR\x02rr\x12>\n" +
"\x05stats\x18\x02 \x01(\v2&.meshtastic.StoreAndForward.StatisticsH\x00R\x05stats\x12?\n" +
"\ahistory\x18\x03 \x01(\v2#.meshtastic.StoreAndForward.HistoryH\x00R\ahistory\x12E\n" +
"\theartbeat\x18\x04 \x01(\v2%.meshtastic.StoreAndForward.HeartbeatH\x00R\theartbeat\x12\x14\n" +
"\x04text\x18\x05 \x01(\fH\x00R\x04text\x1a\xbf\x02\n" +
"\n" +
"Statistics\x12%\n" +
"\x0emessages_total\x18\x01 \x01(\rR\rmessagesTotal\x12%\n" +
"\x0emessages_saved\x18\x02 \x01(\rR\rmessagesSaved\x12!\n" +
"\fmessages_max\x18\x03 \x01(\rR\vmessagesMax\x12\x17\n" +
"\aup_time\x18\x04 \x01(\rR\x06upTime\x12\x1a\n" +
"\brequests\x18\x05 \x01(\rR\brequests\x12)\n" +
"\x10requests_history\x18\x06 \x01(\rR\x0frequestsHistory\x12\x1c\n" +
"\theartbeat\x18\a \x01(\bR\theartbeat\x12\x1d\n" +
"\n" +
"return_max\x18\b \x01(\rR\treturnMax\x12#\n" +
"\rreturn_window\x18\t \x01(\rR\freturnWindow\x1ao\n" +
"\aHistory\x12)\n" +
"\x10history_messages\x18\x01 \x01(\rR\x0fhistoryMessages\x12\x16\n" +
"\x06window\x18\x02 \x01(\rR\x06window\x12!\n" +
"\flast_request\x18\x03 \x01(\rR\vlastRequest\x1aA\n" +
"\tHeartbeat\x12\x16\n" +
"\x06period\x18\x01 \x01(\rR\x06period\x12\x1c\n" +
"\tsecondary\x18\x02 \x01(\rR\tsecondary\"\xbc\x02\n" +
"\x0fRequestResponse\x12\t\n" +
"\x05UNSET\x10\x00\x12\x10\n" +
"\fROUTER_ERROR\x10\x01\x12\x14\n" +
"\x10ROUTER_HEARTBEAT\x10\x02\x12\x0f\n" +
"\vROUTER_PING\x10\x03\x12\x0f\n" +
"\vROUTER_PONG\x10\x04\x12\x0f\n" +
"\vROUTER_BUSY\x10\x05\x12\x12\n" +
"\x0eROUTER_HISTORY\x10\x06\x12\x10\n" +
"\fROUTER_STATS\x10\a\x12\x16\n" +
"\x12ROUTER_TEXT_DIRECT\x10\b\x12\x19\n" +
"\x15ROUTER_TEXT_BROADCAST\x10\t\x12\x10\n" +
"\fCLIENT_ERROR\x10@\x12\x12\n" +
"\x0eCLIENT_HISTORY\x10A\x12\x10\n" +
"\fCLIENT_STATS\x10B\x12\x0f\n" +
"\vCLIENT_PING\x10C\x12\x0f\n" +
"\vCLIENT_PONG\x10D\x12\x10\n" +
"\fCLIENT_ABORT\x10jB\t\n" +
"\avariantBk\n" +
"\x14org.meshtastic.protoB\x15StoreAndForwardProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_storeforward_proto_rawDescOnce sync.Once
file_meshtastic_storeforward_proto_rawDescData []byte
)
func file_meshtastic_storeforward_proto_rawDescGZIP() []byte {
file_meshtastic_storeforward_proto_rawDescOnce.Do(func() {
file_meshtastic_storeforward_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_storeforward_proto_rawDesc), len(file_meshtastic_storeforward_proto_rawDesc)))
})
return file_meshtastic_storeforward_proto_rawDescData
}
var file_meshtastic_storeforward_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_storeforward_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_meshtastic_storeforward_proto_goTypes = []any{
(StoreAndForward_RequestResponse)(0), // 0: meshtastic.StoreAndForward.RequestResponse
(*StoreAndForward)(nil), // 1: meshtastic.StoreAndForward
(*StoreAndForward_Statistics)(nil), // 2: meshtastic.StoreAndForward.Statistics
(*StoreAndForward_History)(nil), // 3: meshtastic.StoreAndForward.History
(*StoreAndForward_Heartbeat)(nil), // 4: meshtastic.StoreAndForward.Heartbeat
}
var file_meshtastic_storeforward_proto_depIdxs = []int32{
0, // 0: meshtastic.StoreAndForward.rr:type_name -> meshtastic.StoreAndForward.RequestResponse
2, // 1: meshtastic.StoreAndForward.stats:type_name -> meshtastic.StoreAndForward.Statistics
3, // 2: meshtastic.StoreAndForward.history:type_name -> meshtastic.StoreAndForward.History
4, // 3: meshtastic.StoreAndForward.heartbeat:type_name -> meshtastic.StoreAndForward.Heartbeat
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_meshtastic_storeforward_proto_init() }
func file_meshtastic_storeforward_proto_init() {
if File_meshtastic_storeforward_proto != nil {
return
}
file_meshtastic_storeforward_proto_msgTypes[0].OneofWrappers = []any{
(*StoreAndForward_Stats)(nil),
(*StoreAndForward_History_)(nil),
(*StoreAndForward_Heartbeat_)(nil),
(*StoreAndForward_Text)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_storeforward_proto_rawDesc), len(file_meshtastic_storeforward_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_storeforward_proto_goTypes,
DependencyIndexes: file_meshtastic_storeforward_proto_depIdxs,
EnumInfos: file_meshtastic_storeforward_proto_enumTypes,
MessageInfos: file_meshtastic_storeforward_proto_msgTypes,
}.Build()
File_meshtastic_storeforward_proto = out.File
file_meshtastic_storeforward_proto_goTypes = nil
file_meshtastic_storeforward_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,228 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v6.33.4
// source: meshtastic/xmodem.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type XModem_Control int32
const (
XModem_NUL XModem_Control = 0
XModem_SOH XModem_Control = 1
XModem_STX XModem_Control = 2
XModem_EOT XModem_Control = 4
XModem_ACK XModem_Control = 6
XModem_NAK XModem_Control = 21
XModem_CAN XModem_Control = 24
XModem_CTRLZ XModem_Control = 26
)
// Enum value maps for XModem_Control.
var (
XModem_Control_name = map[int32]string{
0: "NUL",
1: "SOH",
2: "STX",
4: "EOT",
6: "ACK",
21: "NAK",
24: "CAN",
26: "CTRLZ",
}
XModem_Control_value = map[string]int32{
"NUL": 0,
"SOH": 1,
"STX": 2,
"EOT": 4,
"ACK": 6,
"NAK": 21,
"CAN": 24,
"CTRLZ": 26,
}
)
func (x XModem_Control) Enum() *XModem_Control {
p := new(XModem_Control)
*p = x
return p
}
func (x XModem_Control) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (XModem_Control) Descriptor() protoreflect.EnumDescriptor {
return file_meshtastic_xmodem_proto_enumTypes[0].Descriptor()
}
func (XModem_Control) Type() protoreflect.EnumType {
return &file_meshtastic_xmodem_proto_enumTypes[0]
}
func (x XModem_Control) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use XModem_Control.Descriptor instead.
func (XModem_Control) EnumDescriptor() ([]byte, []int) {
return file_meshtastic_xmodem_proto_rawDescGZIP(), []int{0, 0}
}
type XModem struct {
state protoimpl.MessageState `protogen:"open.v1"`
Control XModem_Control `protobuf:"varint,1,opt,name=control,proto3,enum=meshtastic.XModem_Control" json:"control,omitempty"`
Seq uint32 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
Crc16 uint32 `protobuf:"varint,3,opt,name=crc16,proto3" json:"crc16,omitempty"`
Buffer []byte `protobuf:"bytes,4,opt,name=buffer,proto3" json:"buffer,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *XModem) Reset() {
*x = XModem{}
mi := &file_meshtastic_xmodem_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *XModem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*XModem) ProtoMessage() {}
func (x *XModem) ProtoReflect() protoreflect.Message {
mi := &file_meshtastic_xmodem_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use XModem.ProtoReflect.Descriptor instead.
func (*XModem) Descriptor() ([]byte, []int) {
return file_meshtastic_xmodem_proto_rawDescGZIP(), []int{0}
}
func (x *XModem) GetControl() XModem_Control {
if x != nil {
return x.Control
}
return XModem_NUL
}
func (x *XModem) GetSeq() uint32 {
if x != nil {
return x.Seq
}
return 0
}
func (x *XModem) GetCrc16() uint32 {
if x != nil {
return x.Crc16
}
return 0
}
func (x *XModem) GetBuffer() []byte {
if x != nil {
return x.Buffer
}
return nil
}
var File_meshtastic_xmodem_proto protoreflect.FileDescriptor
const file_meshtastic_xmodem_proto_rawDesc = "" +
"\n" +
"\x17meshtastic/xmodem.proto\x12\n" +
"meshtastic\"\xd3\x01\n" +
"\x06XModem\x124\n" +
"\acontrol\x18\x01 \x01(\x0e2\x1a.meshtastic.XModem.ControlR\acontrol\x12\x10\n" +
"\x03seq\x18\x02 \x01(\rR\x03seq\x12\x14\n" +
"\x05crc16\x18\x03 \x01(\rR\x05crc16\x12\x16\n" +
"\x06buffer\x18\x04 \x01(\fR\x06buffer\"S\n" +
"\aControl\x12\a\n" +
"\x03NUL\x10\x00\x12\a\n" +
"\x03SOH\x10\x01\x12\a\n" +
"\x03STX\x10\x02\x12\a\n" +
"\x03EOT\x10\x04\x12\a\n" +
"\x03ACK\x10\x06\x12\a\n" +
"\x03NAK\x10\x15\x12\a\n" +
"\x03CAN\x10\x18\x12\t\n" +
"\x05CTRLZ\x10\x1aBb\n" +
"\x14org.meshtastic.protoB\fXmodemProtosZ\"github.com/meshtastic/go/generated\xaa\x02\x14Meshtastic.Protobufs\xba\x02\x00b\x06proto3"
var (
file_meshtastic_xmodem_proto_rawDescOnce sync.Once
file_meshtastic_xmodem_proto_rawDescData []byte
)
func file_meshtastic_xmodem_proto_rawDescGZIP() []byte {
file_meshtastic_xmodem_proto_rawDescOnce.Do(func() {
file_meshtastic_xmodem_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_meshtastic_xmodem_proto_rawDesc), len(file_meshtastic_xmodem_proto_rawDesc)))
})
return file_meshtastic_xmodem_proto_rawDescData
}
var file_meshtastic_xmodem_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_meshtastic_xmodem_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_meshtastic_xmodem_proto_goTypes = []any{
(XModem_Control)(0), // 0: meshtastic.XModem.Control
(*XModem)(nil), // 1: meshtastic.XModem
}
var file_meshtastic_xmodem_proto_depIdxs = []int32{
0, // 0: meshtastic.XModem.control:type_name -> meshtastic.XModem.Control
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_meshtastic_xmodem_proto_init() }
func file_meshtastic_xmodem_proto_init() {
if File_meshtastic_xmodem_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_meshtastic_xmodem_proto_rawDesc), len(file_meshtastic_xmodem_proto_rawDesc)),
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meshtastic_xmodem_proto_goTypes,
DependencyIndexes: file_meshtastic_xmodem_proto_depIdxs,
EnumInfos: file_meshtastic_xmodem_proto_enumTypes,
MessageInfos: file_meshtastic_xmodem_proto_msgTypes,
}.Build()
File_meshtastic_xmodem_proto = out.File
file_meshtastic_xmodem_proto_goTypes = nil
file_meshtastic_xmodem_proto_depIdxs = nil
}