kopia lustrzana https://github.com/meshtastic/protobufs
Update config - seperate device and modules
rodzic
059412d9ff
commit
4504ceadac
97
admin.proto
97
admin.proto
|
@ -7,6 +7,7 @@ option go_package = "github.com/meshtastic/gomeshproto";
|
|||
import "channel.proto";
|
||||
import "config.proto";
|
||||
import "mesh.proto";
|
||||
import "module_config.proto";
|
||||
import "radioconfig.proto";
|
||||
|
||||
option java_outer_classname = "AdminProtos";
|
||||
|
@ -52,43 +53,49 @@ message AdminMessage {
|
|||
* TODO: REPLACE
|
||||
*/
|
||||
LORA_CONFIG = 5;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_MQTT_CONFIG = 6;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_SERIAL_CONFIG = 7;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_EXTNOTIF_CONFIG = 8;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_STOREFORWARD_CONFIG = 9;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_RANGETEST_CONFIG = 10;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_TELEMETRY_CONFIG = 11;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MODULE_CANNEDMSG_CONFIG = 12;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
enum ModuleConfigType {
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MQTT_CONFIG = 0;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
SERIAL_CONFIG = 1;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
EXTNOTIF_CONFIG = 2;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
STOREFORWARD_CONFIG = 3;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
RANGETEST_CONFIG = 4;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
TELEMETRY_CONFIG = 5;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
CANNEDMSG_CONFIG = 6;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
|
@ -163,6 +170,26 @@ message AdminMessage {
|
|||
* Sent immediatly after a config change has been sent to ensure comms, if this is not recieved, the config will be reverted after 10 mins
|
||||
*/
|
||||
bool confirm_set_config = 13;
|
||||
|
||||
/*
|
||||
* Ask for the following config data to be sent
|
||||
*/
|
||||
ModuleConfigType get_module_config_request = 14;
|
||||
|
||||
/*
|
||||
* Send the current Config in the response to this message.
|
||||
*/
|
||||
ModuleConfig get_module_config_response = 15;
|
||||
|
||||
/*
|
||||
* Set the current Config
|
||||
*/
|
||||
ModuleConfig set_module_config = 16;
|
||||
|
||||
/*
|
||||
* Sent immediatly after a config change has been sent to ensure comms, if this is not recieved, the config will be reverted after 10 mins
|
||||
*/
|
||||
bool confirm_set_module_config = 17;
|
||||
|
||||
/*
|
||||
* Setting channels/radio config remotely carries the risk that you might send an invalid config and the radio never talks to your mesh again.
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
syntax = "proto3";
|
||||
import "telemetry.proto";
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option java_outer_classname = "ModuleConfigProtos";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
option go_package = "github.com/meshtastic/gomeshproto";
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message ModuleConfig {
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message MQTTConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message SerialConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message ExternalNotificationConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message StoreForwardConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message RangeTestConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Configuration for both device and environment metrics
|
||||
*/
|
||||
message TelemetryConfig {
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we should try to send our
|
||||
* device measurements to the mesh
|
||||
*/
|
||||
uint32 device_update_interval = 1;
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we should try to send our
|
||||
* environment measurements to the mesh
|
||||
*/
|
||||
|
||||
uint32 environment_update_interval = 2;
|
||||
|
||||
/*
|
||||
* Preferences for the Telemetry Module (Environment)
|
||||
* Enable/Disable the telemetry measurement module measurement collection
|
||||
*/
|
||||
bool environment_measurement_enabled = 3;
|
||||
|
||||
/*
|
||||
* Enable/Disable the telemetry measurement module on-device display
|
||||
*/
|
||||
bool environment_screen_enabled = 4;
|
||||
|
||||
/*
|
||||
* Sometimes sensor reads can fail.
|
||||
* If this happens, we will retry a configurable number of attempts,
|
||||
* each attempt will be delayed by the minimum required refresh rate for that sensor
|
||||
*/
|
||||
uint32 environment_read_error_count_threshold = 5;
|
||||
|
||||
/*
|
||||
* Sometimes we can end up with more than read_error_count_threshold failures.
|
||||
* In this case, we will stop trying to read from the sensor for a while.
|
||||
* Wait this long until trying to read from the sensor again
|
||||
*/
|
||||
uint32 environment_recovery_interval = 6;
|
||||
|
||||
/*
|
||||
* We'll always read the sensor in Celsius, but sometimes we might want to
|
||||
* display the results in Fahrenheit as a "user preference".
|
||||
*/
|
||||
bool environment_display_fahrenheit = 7;
|
||||
|
||||
/*
|
||||
* Specify the sensor type
|
||||
*/
|
||||
TelemetrySensorType environment_sensor_type = 8;
|
||||
|
||||
/*
|
||||
* Specify the peferred GPIO Pin for sensor readings
|
||||
*/
|
||||
uint32 environment_sensor_pin = 9;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
message CannedMessageConfig {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
oneof payloadVariant {
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
MQTTConfig mqtt_config = 1;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
SerialConfig serial_config = 2;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
ExternalNotificationConfig external_notification_config = 3;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
StoreForwardConfig store_forward_config = 4;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
RangeTestConfig range_test_config = 5;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
TelemetryConfig telemetry_config = 6;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
CannedMessageConfig canned_message_config = 7;
|
||||
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue