kopia lustrzana https://github.com/meshtastic/protobufs
Porównaj commity
5 Commity
cfcf6f1120
...
6656754f74
Autor | SHA1 | Data |
---|---|---|
Garth Vander Houwen | 6656754f74 | |
Sacha Weatherstone | e6b4c590e7 | |
Sacha Weatherstone | 2982d3017b | |
Garth Vander Houwen | cd9dddb199 | |
Garth Vander Houwen | c183973317 |
|
@ -17,11 +17,11 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Buf
|
||||
uses: bufbuild/buf-setup-action@v1.26.1
|
||||
uses: bufbuild/buf-setup-action@v1.30.0
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
|
||||
- name: Push to schema registry
|
||||
uses: bufbuild/buf-push-action@v1.1.1
|
||||
uses: bufbuild/buf-push-action@v1.2.0
|
||||
with:
|
||||
buf_token: ${{ secrets.BUF_TOKEN }}
|
||||
|
|
|
@ -50,7 +50,7 @@ jobs:
|
|||
echo "NEW_VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1.13.0
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: Meshtastic Protobufs ${{ steps.version.outputs.NEW_VERSION }}
|
||||
tag: ${{ steps.version.outputs.NEW_VERSION }}
|
||||
|
@ -58,7 +58,7 @@ jobs:
|
|||
token: ${{ github.token }}
|
||||
|
||||
- name: Setup Buf
|
||||
uses: bufbuild/buf-setup-action@v1.26.1
|
||||
uses: bufbuild/buf-setup-action@v1.30.0
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Buf
|
||||
uses: bufbuild/buf-setup-action@v1.26.1
|
||||
uses: bufbuild/buf-setup-action@v1.30.0
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
|
||||
|
|
|
@ -13,15 +13,15 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Buf
|
||||
uses: bufbuild/buf-setup-action@v1.26.1
|
||||
uses: bufbuild/buf-setup-action@v1.30.0
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
|
||||
- name: Lint
|
||||
uses: bufbuild/buf-lint-action@v1.0.3
|
||||
uses: bufbuild/buf-lint-action@v1.1.1
|
||||
|
||||
- name: Push to schema registry
|
||||
uses: bufbuild/buf-push-action@v1.1.1
|
||||
uses: bufbuild/buf-push-action@v1.2.0
|
||||
with:
|
||||
buf_token: ${{ secrets.BUF_TOKEN }}
|
||||
draft: ${{ github.ref_name != 'master'}}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
*out
|
||||
*logs
|
||||
*actions
|
||||
*notifications
|
||||
*tools
|
||||
plugins
|
||||
user_trunk.yaml
|
||||
user.yaml
|
|
@ -1,10 +0,0 @@
|
|||
# Autoformatter friendly markdownlint config (all formatting rules disabled)
|
||||
default: true
|
||||
blank_lines: false
|
||||
bullet: false
|
||||
html: false
|
||||
indentation: false
|
||||
line_length: false
|
||||
spaces: false
|
||||
url: false
|
||||
whitespace: false
|
|
@ -1,10 +0,0 @@
|
|||
rules:
|
||||
quoted-strings:
|
||||
required: only-when-needed
|
||||
extra-allowed: ["{|}"]
|
||||
empty-values:
|
||||
forbid-in-block-mappings: true
|
||||
forbid-in-flow-mappings: true
|
||||
key-duplicates: {}
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
|
@ -1,33 +0,0 @@
|
|||
version: 0.1
|
||||
cli:
|
||||
version: 1.16.2
|
||||
plugins:
|
||||
sources:
|
||||
- id: trunk
|
||||
ref: v1.2.5
|
||||
uri: https://github.com/trunk-io/plugins
|
||||
lint:
|
||||
enabled:
|
||||
- checkov@2.4.9
|
||||
- trivy@0.45.1
|
||||
- trufflehog@3.57.0
|
||||
- yamllint@1.32.0
|
||||
- buf-lint@1.26.1
|
||||
- buf-breaking@1.26.1
|
||||
- actionlint@1.6.26
|
||||
- markdownlint@0.37.0
|
||||
- prettier@3.0.3
|
||||
- gitleaks@8.18.0
|
||||
- git-diff-check
|
||||
runtimes:
|
||||
enabled:
|
||||
- python@3.10.8
|
||||
- go@1.21.0
|
||||
- node@18.12.1
|
||||
actions:
|
||||
disabled:
|
||||
- trunk-announce
|
||||
- trunk-check-pre-push
|
||||
- trunk-fmt-pre-commit
|
||||
enabled:
|
||||
- trunk-upgrade-available
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"recommendations": ["trunk.io", "pbkit.vscode-pbkit", "bufbuild.vscode-buf"]
|
||||
"recommendations": ["pbkit.vscode-pbkit", "bufbuild.vscode-buf"]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "trunk.io"
|
||||
"editor.defaultFormatter": "pbkit.vscode-pbkit"
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ message AdminMessage {
|
|||
* Remove the node by the specified node-num from the NodeDB on the device
|
||||
*/
|
||||
uint32 remove_by_nodenum = 38;
|
||||
|
||||
|
||||
/*
|
||||
* Set specified node-num to be favorited on the NodeDB on the device
|
||||
*/
|
||||
|
@ -296,7 +296,7 @@ message AdminMessage {
|
|||
Position set_fixed_position = 41;
|
||||
|
||||
/*
|
||||
* Clear fixed position coordinates and then set position.fixed_position = false
|
||||
* Clear fixed position coordinates and then set position.fixed_position = false
|
||||
*/
|
||||
bool remove_fixed_position = 42;
|
||||
|
||||
|
|
|
@ -7,11 +7,11 @@ option go_package = "github.com/meshtastic/go/generated";
|
|||
option java_outer_classname = "ATAKProtos";
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option swift_prefix = "";
|
||||
|
||||
/*
|
||||
* Packets for the official ATAK Plugin
|
||||
* Packets for the official ATAK Plugin
|
||||
*/
|
||||
message TAKPacket
|
||||
{
|
||||
message TAKPacket {
|
||||
/*
|
||||
* Are the payloads strings compressed for LoRA transport?
|
||||
*/
|
||||
|
@ -189,6 +189,7 @@ message Status {
|
|||
*/
|
||||
uint32 battery = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* ATAK Contact
|
||||
* <contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/>
|
||||
|
@ -247,5 +248,5 @@ message PLI {
|
|||
/*
|
||||
* Course in degrees
|
||||
*/
|
||||
uint32 course = 5;
|
||||
uint32 course = 5;
|
||||
}
|
||||
|
|
|
@ -85,16 +85,16 @@ message ChannelSettings {
|
|||
/*
|
||||
* Per-channel module settings.
|
||||
*/
|
||||
ModuleSettings module_settings = 7;
|
||||
ModuleSettings module_settings = 7;
|
||||
}
|
||||
|
||||
/*
|
||||
* This message is specifically for modules to store per-channel configuration data.
|
||||
*/
|
||||
message ModuleSettings {
|
||||
/*
|
||||
* Bits of precision for the location sent in position packets.
|
||||
*/
|
||||
/*
|
||||
* Bits of precision for the location sent in position packets.
|
||||
*/
|
||||
uint32 position_precision = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ message Config {
|
|||
/*
|
||||
* Description: Broadcasts GPS position packets as priority.
|
||||
* Technical Details: Position Mesh packets will be prioritized higher and sent more frequently by default.
|
||||
* When used in conjunction with power.is_power_saving = true, nodes will wake up,
|
||||
* When used in conjunction with power.is_power_saving = true, nodes will wake up,
|
||||
* send position, and then sleep for position.position_broadcast_secs seconds.
|
||||
*/
|
||||
TRACKER = 5;
|
||||
|
@ -58,7 +58,7 @@ message Config {
|
|||
/*
|
||||
* Description: Broadcasts telemetry packets as priority.
|
||||
* Technical Details: Telemetry Mesh packets will be prioritized higher and sent more frequently by default.
|
||||
* When used in conjunction with power.is_power_saving = true, nodes will wake up,
|
||||
* When used in conjunction with power.is_power_saving = true, nodes will wake up,
|
||||
* send environment telemetry, and then sleep for telemetry.environment_update_interval seconds.
|
||||
*/
|
||||
SENSOR = 6;
|
||||
|
@ -76,18 +76,18 @@ message Config {
|
|||
* Technical Details: Used for nodes that "only speak when spoken to"
|
||||
* Turns all of the routine broadcasts but allows for ad-hoc communication
|
||||
* Still rebroadcasts, but with local only rebroadcast mode (known meshes only)
|
||||
* Can be used for clandestine operation or to dramatically reduce airtime / power consumption
|
||||
* Can be used for clandestine operation or to dramatically reduce airtime / power consumption
|
||||
*/
|
||||
CLIENT_HIDDEN = 8;
|
||||
|
||||
/*
|
||||
* Description: Broadcasts location as message to default channel regularly for to assist with device recovery.
|
||||
* Technical Details: Used to automatically send a text message to the mesh
|
||||
* Technical Details: Used to automatically send a text message to the mesh
|
||||
* with the current position of the device on a frequent interval:
|
||||
* "I'm lost! Position: lat / long"
|
||||
*/
|
||||
LOST_AND_FOUND = 9;
|
||||
|
||||
|
||||
/*
|
||||
* Description: Enables automatic TAK PLI broadcasts and reduces routine broadcasts.
|
||||
* Technical Details: Turns off many of the routine broadcasts to favor ATAK CoT packet stream
|
||||
|
@ -118,7 +118,7 @@ message Config {
|
|||
* Only rebroadcasts message on the nodes local primary / secondary channels.
|
||||
*/
|
||||
LOCAL_ONLY = 2;
|
||||
|
||||
|
||||
/*
|
||||
* Ignores observed messages from foreign meshes like LOCAL_ONLY,
|
||||
* but takes it step further by also ignoring messages from nodenums not in the node's known list (NodeDB)
|
||||
|
@ -257,18 +257,18 @@ message Config {
|
|||
|
||||
enum GpsMode {
|
||||
/*
|
||||
* GPS is present but disabled
|
||||
*/
|
||||
* GPS is present but disabled
|
||||
*/
|
||||
DISABLED = 0;
|
||||
|
||||
/*
|
||||
* GPS is present and enabled
|
||||
*/
|
||||
* GPS is present and enabled
|
||||
*/
|
||||
ENABLED = 1;
|
||||
|
||||
/*
|
||||
* GPS is not present on the device
|
||||
*/
|
||||
* GPS is not present on the device
|
||||
*/
|
||||
NOT_PRESENT = 2;
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ message Config {
|
|||
/*
|
||||
* Is GPS enabled for this node?
|
||||
*/
|
||||
bool gps_enabled = 4[deprecated = true];
|
||||
bool gps_enabled = 4 [deprecated = true];
|
||||
|
||||
/*
|
||||
* How often should we try to get GPS position (in seconds)
|
||||
|
@ -305,7 +305,7 @@ message Config {
|
|||
/*
|
||||
* Deprecated in favor of using smart / regular broadcast intervals as implicit attempt time
|
||||
*/
|
||||
uint32 gps_attempt_time = 6 [deprecated = true];
|
||||
uint32 gps_attempt_time = 6 [deprecated = true];
|
||||
|
||||
/*
|
||||
* Bit field of boolean configuration options for POSITION messages
|
||||
|
@ -350,30 +350,28 @@ message Config {
|
|||
*/
|
||||
message PowerConfig {
|
||||
/*
|
||||
* If set, we are powered from a low-current source (i.e. solar), so even if it looks like we have power flowing in
|
||||
* we should try to minimize power consumption as much as possible.
|
||||
* YOU DO NOT NEED TO SET THIS IF YOU'VE set is_router (it is implied in that case).
|
||||
* Advanced Option
|
||||
* Description: Will sleep everything as much as possible, for the tracker and sensor role this will also include the lora radio.
|
||||
* Don't use this setting if you want to use your device with the phone apps or are using a device without a user button.
|
||||
* Technical Details: Works for ESP32 devices and NRF52 devices in the Sensor or Tracker roles
|
||||
*/
|
||||
bool is_power_saving = 1;
|
||||
|
||||
/*
|
||||
* If non-zero, the device will fully power off this many seconds after external power is removed.
|
||||
* Description: If non-zero, the device will fully power off this many seconds after external power is removed.
|
||||
*/
|
||||
uint32 on_battery_shutdown_after_secs = 2;
|
||||
|
||||
/*
|
||||
* Ratio of voltage divider for battery pin eg. 3.20 (R1=100k, R2=220k)
|
||||
* Overrides the ADC_MULTIPLIER defined in variant for battery voltage calculation.
|
||||
* Should be set to floating point value between 2 and 4
|
||||
* Fixes issues on Heltec v2
|
||||
* https://meshtastic.org/docs/configuration/radio/power/#adc-multiplier-override
|
||||
* Should be set to floating point value between 2 and 6
|
||||
*/
|
||||
float adc_multiplier_override = 3;
|
||||
|
||||
/*
|
||||
* Wait Bluetooth Seconds
|
||||
* The number of seconds for to wait before turning off BLE in No Bluetooth states
|
||||
* 0 for default of 1 minute
|
||||
* Description: The number of seconds for to wait before turning off BLE in No Bluetooth states
|
||||
* Technical Details: ESP32 Only 0 for default of 1 minute
|
||||
*/
|
||||
uint32 wait_bluetooth_secs = 4;
|
||||
|
||||
|
@ -386,17 +384,14 @@ message Config {
|
|||
uint32 sds_secs = 6;
|
||||
|
||||
/*
|
||||
* Light Sleep Seconds
|
||||
* In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on
|
||||
* ESP32 Only
|
||||
* 0 for default of 300
|
||||
* Description: In light sleep the CPU is suspended, LoRa radio is on, BLE is off an GPS is on
|
||||
* Technical Details: ESP32 Only 0 for default of 300
|
||||
*/
|
||||
uint32 ls_secs = 7;
|
||||
|
||||
/*
|
||||
* Minimum Wake Seconds
|
||||
* While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value
|
||||
* 0 for default of 10 seconds
|
||||
* Description: While in light sleep when we receive packets on the LoRa radio we will wake and handle them and stay awake in no BLE mode for this value
|
||||
* Technical Details: ESP32 Only 0 for default of 10 seconds
|
||||
*/
|
||||
uint32 min_wake_secs = 8;
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ package meshtastic;
|
|||
import "meshtastic/channel.proto";
|
||||
import "meshtastic/localonly.proto";
|
||||
import "meshtastic/mesh.proto";
|
||||
import "meshtastic/telemetry.proto";
|
||||
import "meshtastic/module_config.proto";
|
||||
import "meshtastic/telemetry.proto";
|
||||
import "nanopb.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
|
@ -80,7 +80,7 @@ message DeviceState {
|
|||
/*
|
||||
* New lite version of NodeDB to decrease memory footprint
|
||||
*/
|
||||
repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype="std::vector<meshtastic_NodeInfoLite>"];
|
||||
repeated NodeInfoLite node_db_lite = 14 [(nanopb).callback_datatype = "std::vector<meshtastic_NodeInfoLite>"];
|
||||
}
|
||||
|
||||
message NodeInfoLite {
|
||||
|
|
|
@ -114,7 +114,7 @@ message LocalModuleConfig {
|
|||
/*
|
||||
* The part of the config that is specific to the Ambient Lighting module
|
||||
*/
|
||||
ModuleConfig.AmbientLightingConfig ambient_lighting = 12;
|
||||
ModuleConfig.AmbientLightingConfig ambient_lighting = 12;
|
||||
|
||||
/*
|
||||
* The part of the config that is specific to the Detection Sensor module
|
||||
|
@ -132,4 +132,4 @@ message LocalModuleConfig {
|
|||
* NodeDB.cpp in the device code.
|
||||
*/
|
||||
uint32 version = 8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -340,8 +340,8 @@ enum HardwareModel {
|
|||
SENSELORA_S3 = 28;
|
||||
|
||||
/*
|
||||
* Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone
|
||||
*/
|
||||
* Canary Radio Company - CanaryOne: https://canaryradio.io/products/canaryone
|
||||
*/
|
||||
CANARYONE = 29;
|
||||
|
||||
/*
|
||||
|
@ -456,13 +456,13 @@ enum HardwareModel {
|
|||
* LilyGo T-Watch S3 with ESP32-S3 CPU and IPS display
|
||||
*/
|
||||
T_WATCH_S3 = 51;
|
||||
|
||||
|
||||
/*
|
||||
* Bobricius Picomputer with ESP32-S3 CPU, Keyboard and IPS display
|
||||
*/
|
||||
PICOMPUTER_S3 = 52;
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* Heltec HT-CT62 with ESP32-C3 CPU and SX1262 LoRa
|
||||
*/
|
||||
HELTEC_HT62 = 53;
|
||||
|
@ -481,7 +481,7 @@ enum HardwareModel {
|
|||
* CircuitMess Chatter 2 LLCC68 Lora Module and ESP32 Wroom
|
||||
* Lora module can be swapped out for a Heltec RA-62 which is "almost" pin compatible
|
||||
* with one cut and one jumper Meshtastic works
|
||||
*/
|
||||
*/
|
||||
CHATTER_2 = 56;
|
||||
|
||||
/*
|
||||
|
@ -498,7 +498,7 @@ enum HardwareModel {
|
|||
* Older "V1.0" Variant
|
||||
*/
|
||||
HELTEC_WIRELESS_TRACKER_V1_0 = 58;
|
||||
|
||||
|
||||
/*
|
||||
* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
* Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||
|
@ -784,7 +784,7 @@ message Waypoint {
|
|||
/*
|
||||
* This message will be proxied over the PhoneAPI for the client to deliver to the MQTT server
|
||||
*/
|
||||
message MqttClientProxyMessage {
|
||||
message MqttClientProxyMessage {
|
||||
/*
|
||||
* The MQTT topic this message will be sent /received on
|
||||
*/
|
||||
|
@ -1010,10 +1010,10 @@ message MeshPacket {
|
|||
*/
|
||||
bool via_mqtt = 14;
|
||||
|
||||
/*
|
||||
* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
|
||||
/*
|
||||
* Hop limit with which the original packet started. Sent via LoRa using three bits in the unencrypted header.
|
||||
* When receiving a packet, the difference between hop_start and hop_limit gives how many hops it traveled.
|
||||
*/
|
||||
*/
|
||||
uint32 hop_start = 15;
|
||||
}
|
||||
|
||||
|
@ -1126,7 +1126,7 @@ message NodeInfo {
|
|||
* Number of hops away from us this node is (0 if adjacent)
|
||||
*/
|
||||
uint32 hops_away = 9;
|
||||
|
||||
|
||||
/*
|
||||
* True if node is in our favorites list
|
||||
* Persists between NodeDB internal clean ups
|
||||
|
@ -1507,9 +1507,9 @@ message Neighbor {
|
|||
float snr = 2;
|
||||
|
||||
/*
|
||||
* Reception time (in secs since 1970) of last message that was last sent by this ID.
|
||||
* Note: this is for local storage only and will not be sent out over the mesh.
|
||||
*/
|
||||
* Reception time (in secs since 1970) of last message that was last sent by this ID.
|
||||
* Note: this is for local storage only and will not be sent out over the mesh.
|
||||
*/
|
||||
fixed32 last_rx_time = 3;
|
||||
|
||||
/*
|
||||
|
@ -1574,13 +1574,11 @@ message DeviceMetadata {
|
|||
bool hasRemoteHardware = 10;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* A heartbeat message is sent to the node from the client to keep the connection alive.
|
||||
* This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI.
|
||||
*/
|
||||
message Heartbeat {
|
||||
|
||||
}
|
||||
message Heartbeat {}
|
||||
|
||||
/*
|
||||
* RemoteHardwarePins associated with a node
|
||||
|
|
|
@ -125,7 +125,7 @@ message ModuleConfig {
|
|||
* Whether the Module is enabled
|
||||
*/
|
||||
bool enabled = 1;
|
||||
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we should try to send our
|
||||
* Neighbor Info to the mesh
|
||||
|
@ -136,7 +136,7 @@ message ModuleConfig {
|
|||
/*
|
||||
* Detection Sensor Module Config
|
||||
*/
|
||||
message DetectionSensorConfig {
|
||||
message DetectionSensorConfig {
|
||||
/*
|
||||
* Whether the Module is enabled
|
||||
*/
|
||||
|
@ -542,15 +542,6 @@ message ModuleConfig {
|
|||
* air quality metrics to the mesh
|
||||
*/
|
||||
bool power_screen_enabled = 10;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -661,11 +652,10 @@ message ModuleConfig {
|
|||
}
|
||||
|
||||
/*
|
||||
Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels.
|
||||
Initially created for the RAK14001 RGB LED module.
|
||||
Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels.
|
||||
Initially created for the RAK14001 RGB LED module.
|
||||
*/
|
||||
message AmbientLightingConfig {
|
||||
|
||||
/*
|
||||
* Sets LED to on or off.
|
||||
*/
|
||||
|
@ -798,4 +788,4 @@ enum RemoteHardwarePinType {
|
|||
* GPIO pin can be written to (high / low)
|
||||
*/
|
||||
DIGITAL_WRITE = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ syntax = "proto3";
|
|||
|
||||
package meshtastic;
|
||||
|
||||
import "meshtastic/mesh.proto";
|
||||
import "meshtastic/config.proto";
|
||||
import "meshtastic/mesh.proto";
|
||||
|
||||
option csharp_namespace = "Meshtastic.Protobufs";
|
||||
option go_package = "github.com/meshtastic/go/generated";
|
||||
|
@ -49,8 +49,8 @@ message MapReport {
|
|||
string short_name = 2;
|
||||
|
||||
/*
|
||||
* Role of the node that applies specific settings for a particular use-case
|
||||
*/
|
||||
* Role of the node that applies specific settings for a particular use-case
|
||||
*/
|
||||
Config.DeviceConfig.Role role = 3;
|
||||
|
||||
/*
|
||||
|
@ -64,19 +64,19 @@ message MapReport {
|
|||
string firmware_version = 5;
|
||||
|
||||
/*
|
||||
* The region code for the radio (US, CN, EU433, etc...)
|
||||
*/
|
||||
* The region code for the radio (US, CN, EU433, etc...)
|
||||
*/
|
||||
Config.LoRaConfig.RegionCode region = 6;
|
||||
|
||||
/*
|
||||
* Modem preset used by the radio (LongFast, MediumSlow, etc...)
|
||||
*/
|
||||
* Modem preset used by the radio (LongFast, MediumSlow, etc...)
|
||||
*/
|
||||
Config.LoRaConfig.ModemPreset modem_preset = 7;
|
||||
|
||||
/*
|
||||
* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
|
||||
* and it uses the default frequency slot given the region and modem preset.
|
||||
*/
|
||||
* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
|
||||
* and it uses the default frequency slot given the region and modem preset.
|
||||
*/
|
||||
bool has_default_channel = 8;
|
||||
|
||||
/*
|
||||
|
@ -103,4 +103,4 @@ message MapReport {
|
|||
* Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT)
|
||||
*/
|
||||
uint32 num_online_local_nodes = 13;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ enum PortNum {
|
|||
* ENCODING: Protobuf
|
||||
*/
|
||||
NEIGHBORINFO_APP = 71;
|
||||
|
||||
|
||||
/*
|
||||
* ATAK Plugin
|
||||
* Portnum for payloads from the official Meshtastic ATAK plugin
|
||||
|
@ -213,4 +213,4 @@ enum PortNum {
|
|||
* Currently we limit port nums to no higher than this value
|
||||
*/
|
||||
MAX = 511;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,4 +215,4 @@ message StoreAndForward {
|
|||
*/
|
||||
bytes text = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ message Telemetry {
|
|||
AirQualityMetrics air_quality_metrics = 4;
|
||||
|
||||
/*
|
||||
* Power Metrics
|
||||
* Power Metrics
|
||||
*/
|
||||
PowerMetrics power_metrics = 5;
|
||||
}
|
||||
|
@ -283,5 +283,4 @@ enum TelemetrySensorType {
|
|||
* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280)
|
||||
*/
|
||||
BMP085 = 15;
|
||||
|
||||
}
|
||||
|
|
71
nanopb.proto
71
nanopb.proto
|
@ -6,40 +6,41 @@
|
|||
// for memory-limited environments.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option java_package = "fi.kapsi.koti.jpa.nanopb";
|
||||
|
||||
enum FieldType {
|
||||
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
|
||||
FT_CALLBACK = 1; // Always generate a callback field.
|
||||
FT_POINTER = 4; // Always generate a dynamically allocated field.
|
||||
FT_STATIC = 2; // Generate a static field or raise an exception if not possible.
|
||||
FT_IGNORE = 3; // Ignore the field completely.
|
||||
FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead
|
||||
FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible.
|
||||
FT_CALLBACK = 1; // Always generate a callback field.
|
||||
FT_POINTER = 4; // Always generate a dynamically allocated field.
|
||||
FT_STATIC = 2; // Generate a static field or raise an exception if not possible.
|
||||
FT_IGNORE = 3; // Ignore the field completely.
|
||||
FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead
|
||||
}
|
||||
|
||||
enum IntSize {
|
||||
IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
|
||||
IS_8 = 8;
|
||||
IS_16 = 16;
|
||||
IS_32 = 32;
|
||||
IS_64 = 64;
|
||||
IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto
|
||||
IS_8 = 8;
|
||||
IS_16 = 16;
|
||||
IS_32 = 32;
|
||||
IS_64 = 64;
|
||||
}
|
||||
|
||||
enum TypenameMangling {
|
||||
M_NONE = 0; // Default, no typename mangling
|
||||
M_STRIP_PACKAGE = 1; // Strip current package name
|
||||
M_FLATTEN = 2; // Only use last path component
|
||||
M_PACKAGE_INITIALS = 3; // Replace the package name by the initials
|
||||
M_NONE = 0; // Default, no typename mangling
|
||||
M_STRIP_PACKAGE = 1; // Strip current package name
|
||||
M_FLATTEN = 2; // Only use last path component
|
||||
M_PACKAGE_INITIALS = 3; // Replace the package name by the initials
|
||||
}
|
||||
|
||||
enum DescriptorSize {
|
||||
DS_AUTO = 0; // Select minimal size based on field type
|
||||
DS_1 = 1; // 1 word; up to 15 byte fields, no arrays
|
||||
DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays
|
||||
DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays
|
||||
DS_8 = 8; // 8 words; up to 2^32-1 entry arrays
|
||||
DS_AUTO = 0; // Select minimal size based on field type
|
||||
DS_1 = 1; // 1 word; up to 15 byte fields, no arrays
|
||||
DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays
|
||||
DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays
|
||||
DS_8 = 8; // 8 words; up to 2^32-1 entry arrays
|
||||
}
|
||||
|
||||
// This is the inner options message, which basically defines options for
|
||||
|
@ -49,32 +50,32 @@ message NanoPBOptions {
|
|||
// Allocated size for 'bytes' and 'string' fields.
|
||||
// For string fields, this should include the space for null terminator.
|
||||
optional int32 max_size = 1;
|
||||
|
||||
|
||||
// Maximum length for 'string' fields. Setting this is equivalent
|
||||
// to setting max_size to a value of length+1.
|
||||
optional int32 max_length = 14;
|
||||
|
||||
|
||||
// Allocated number of entries in arrays ('repeated' fields)
|
||||
optional int32 max_count = 2;
|
||||
|
||||
|
||||
// Size of integer fields. Can save some memory if you don't need
|
||||
// full 32 bits for the value.
|
||||
optional IntSize int_size = 7 [default = IS_DEFAULT];
|
||||
|
||||
// Force type of field (callback or static allocation)
|
||||
optional FieldType type = 3 [default = FT_DEFAULT];
|
||||
|
||||
|
||||
// Use long names for enums, i.e. EnumName_EnumValue.
|
||||
optional bool long_names = 4 [default = true];
|
||||
|
||||
|
||||
// Add 'packed' attribute to generated structs.
|
||||
// Note: this cannot be used on CPUs that break on unaligned
|
||||
// accesses to variables.
|
||||
optional bool packed_struct = 5 [default = false];
|
||||
|
||||
|
||||
// Add 'packed' attribute to generated enums.
|
||||
optional bool packed_enum = 10 [default = false];
|
||||
|
||||
|
||||
// Skip this message
|
||||
optional bool skip_message = 6 [default = false];
|
||||
|
||||
|
@ -89,7 +90,7 @@ message NanoPBOptions {
|
|||
|
||||
// Proto3 singular field does not generate a "has_" flag
|
||||
optional bool proto3 = 12 [default = false];
|
||||
|
||||
|
||||
// Force proto3 messages to have no "has_" flag.
|
||||
// This was default behavior until nanopb-0.4.0.
|
||||
optional bool proto3_singular_msgs = 21 [default = false];
|
||||
|
@ -139,7 +140,7 @@ message NanoPBOptions {
|
|||
|
||||
// Package name that applies only for nanopb.
|
||||
optional string package = 25;
|
||||
|
||||
|
||||
// Override type of the field in generated C code. Only to be used with related field types
|
||||
optional google.protobuf.FieldDescriptorProto.Type type_override = 27;
|
||||
|
||||
|
@ -152,7 +153,7 @@ message NanoPBOptions {
|
|||
// A field that can become a static member of a c struct (e.g. int, bool, etc)
|
||||
// will be a a static field.
|
||||
// Fields with dynamic length are converted to either a pointer or a callback.
|
||||
optional FieldType fallback_type = 29 [default = FT_CALLBACK];
|
||||
optional FieldType fallback_type = 29 [default = FT_CALLBACK];
|
||||
}
|
||||
|
||||
// Extensions to protoc 'Descriptor' type in order to define options
|
||||
|
@ -167,19 +168,17 @@ message NanoPBOptions {
|
|||
// --------------------------------
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
optional NanoPBOptions nanopb_fileopt = 1010;
|
||||
optional NanoPBOptions nanopb_fileopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.MessageOptions {
|
||||
optional NanoPBOptions nanopb_msgopt = 1010;
|
||||
optional NanoPBOptions nanopb_msgopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.EnumOptions {
|
||||
optional NanoPBOptions nanopb_enumopt = 1010;
|
||||
optional NanoPBOptions nanopb_enumopt = 1010;
|
||||
}
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
optional NanoPBOptions nanopb = 1010;
|
||||
optional NanoPBOptions nanopb = 1010;
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue