create localonly protos common to app and device

pull/156/head
andrekir 2022-05-30 10:35:01 -03:00
rodzic e7791c33fd
commit aa3c10b58f
3 zmienionych plików z 92 dodań i 74 usunięć

Wyświetl plik

@ -4,6 +4,7 @@ option java_package = "com.geeksville.mesh";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto"; option go_package = "github.com/meshtastic/gomeshproto";
import "config.proto";
import "channel.proto"; import "channel.proto";
option java_outer_classname = "AppOnlyProtos"; option java_outer_classname = "AppOnlyProtos";
@ -18,7 +19,12 @@ option java_outer_classname = "AppOnlyProtos";
message ChannelSet { message ChannelSet {
/* /*
* TODO: REPLACE * Channel list with settings
*/ */
repeated ChannelSettings settings = 1; repeated ChannelSettings settings = 1;
/*
* LoRa config
*/
Config.LoRaConfig lora_config = 2;
} }

Wyświetl plik

@ -5,13 +5,10 @@ option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto"; option go_package = "github.com/meshtastic/gomeshproto";
import "channel.proto"; import "channel.proto";
import "config.proto";
import "mesh.proto"; import "mesh.proto";
import "module_config.proto";
option java_outer_classname = "DeviceOnly"; option java_outer_classname = "DeviceOnly";
/* /*
* This message is never sent over the wire, but it is used for serializing DB * This message is never sent over the wire, but it is used for serializing DB
* state to flash in the device code * state to flash in the device code
@ -136,72 +133,3 @@ message OEMStore {
*/ */
string oem_text = 5; string oem_text = 5;
} }
message LocalConfig {
/*
* TODO: REPLACE
*/
Config.DeviceConfig device = 1;
/*
* TODO: REPLACE
*/
Config.PositionConfig position = 2;
/*
* TODO: REPLACE
*/
Config.PowerConfig power = 3;
/*
* TODO: REPLACE
*/
Config.WiFiConfig wifi = 4;
/*
* TODO: REPLACE
*/
Config.DisplayConfig display = 5;
/*
* TODO: REPLACE
*/
Config.LoRaConfig lora = 6;
}
message LocalModuleConfig {
/*
* TODO: REPLACE
*/
ModuleConfig.MQTTConfig mqtt = 1;
/*
* TODO: REPLACE
*/
ModuleConfig.SerialConfig serial = 2;
/*
* TODO: REPLACE
*/
ModuleConfig.ExternalNotificationConfig external_notification = 3;
/*
* TODO: REPLACE
*/
ModuleConfig.StoreForwardConfig store_forward = 4;
/*
* TODO: REPLACE
*/
ModuleConfig.RangeTestConfig range_test = 5;
/*
* TODO: REPLACE
*/
ModuleConfig.TelemetryConfig telemetry = 6;
/*
* TODO: REPLACE
*/
ModuleConfig.CannedMessageConfig canned_message = 7;
}

84
localonly.proto 100644
Wyświetl plik

@ -0,0 +1,84 @@
syntax = "proto3";
option java_package = "com.geeksville.mesh";
option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto";
import "config.proto";
import "module_config.proto";
option java_outer_classname = "LocalOnlyProtos";
/*
* Protobuf structures common to apponly.proto and deviceonly.proto
* This is never sent over the wire, only for local use
*/
message LocalConfig {
/*
* TODO: REPLACE
*/
Config.DeviceConfig device = 1;
/*
* TODO: REPLACE
*/
Config.PositionConfig position = 2;
/*
* TODO: REPLACE
*/
Config.PowerConfig power = 3;
/*
* TODO: REPLACE
*/
Config.WiFiConfig wifi = 4;
/*
* TODO: REPLACE
*/
Config.DisplayConfig display = 5;
/*
* TODO: REPLACE
*/
Config.LoRaConfig lora = 6;
}
message LocalModuleConfig {
/*
* TODO: REPLACE
*/
ModuleConfig.MQTTConfig mqtt = 1;
/*
* TODO: REPLACE
*/
ModuleConfig.SerialConfig serial = 2;
/*
* TODO: REPLACE
*/
ModuleConfig.ExternalNotificationConfig external_notification = 3;
/*
* TODO: REPLACE
*/
ModuleConfig.StoreForwardConfig store_forward = 4;
/*
* TODO: REPLACE
*/
ModuleConfig.RangeTestConfig range_test = 5;
/*
* TODO: REPLACE
*/
ModuleConfig.TelemetryConfig telemetry = 6;
/*
* TODO: REPLACE
*/
ModuleConfig.CannedMessageConfig canned_message = 7;
}