protobufs/admin.proto

261 lines
5.8 KiB
Protocol Buffer
Raw Normal View History

2021-02-25 20:35:51 +08:00
syntax = "proto3";
option java_package = "com.geeksville.mesh";
option optimize_for = LITE_RUNTIME;
2022-10-19 17:03:17 +10:00
option go_package = "github.com/meshtastic/go/generated";
2021-02-25 20:35:51 +08:00
import "channel.proto";
2022-05-02 10:19:54 +10:00
import "config.proto";
2022-08-07 19:46:52 -05:00
import "device_metadata.proto";
import "mesh.proto";
import "module_config.proto";
2021-02-25 20:35:51 +08:00
2021-02-27 13:43:36 +08:00
option java_outer_classname = "AdminProtos";
2021-03-07 19:28:48 +11:00
/*
* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
2021-04-20 19:08:28 +10:00
* This message is used to do settings operations to both remote AND local nodes.
2021-03-07 19:28:48 +11:00
* (Prior to 1.2 these operations were done via special ToRadio operations)
*/
2021-02-25 20:35:51 +08:00
message AdminMessage {
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-01 14:41:22 +10:00
enum ConfigType {
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-02 14:03:57 +10:00
DEVICE_CONFIG = 0;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-07 17:48:51 +10:00
POSITION_CONFIG = 1;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-02 14:03:57 +10:00
POWER_CONFIG = 2;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
NETWORK_CONFIG = 3;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-02 14:03:57 +10:00
DISPLAY_CONFIG = 4;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
2022-05-02 14:03:57 +10:00
LORA_CONFIG = 5;
2022-08-15 18:32:32 -05:00
/*
* TODO: REPLACE
*/
BLUETOOTH_CONFIG = 6;
}
/*
* TODO: REPLACE
*/
enum ModuleConfigType {
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
MQTT_CONFIG = 0;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
SERIAL_CONFIG = 1;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
EXTNOTIF_CONFIG = 2;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
STOREFORWARD_CONFIG = 3;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
RANGETEST_CONFIG = 4;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
TELEMETRY_CONFIG = 5;
2022-05-01 12:38:23 +10:00
/*
* TODO: REPLACE
*/
CANNEDMSG_CONFIG = 6;
/*
* TODO: REPLACE
*/
AUDIO_CONFIG = 7;
2022-05-02 21:19:48 +10:00
}
2022-05-01 12:38:23 +10:00
2022-02-21 18:48:42 +11:00
/*
* TODO: REPLACE
*/
oneof payload_variant {
/*
2022-09-07 11:43:54 +09:30
* Send the specified channel in the response to this message
* NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
*/
2022-09-07 11:43:54 +09:30
uint32 get_channel_request = 1;
/*
2022-09-07 11:43:54 +09:30
* TODO: REPLACE
*/
Channel get_channel_response = 2;
/*
* Send the current owner data in the response to this message.
*/
bool get_owner_request = 3;
/*
* TODO: REPLACE
*/
User get_owner_response = 4;
/*
* Ask for the following config data to be sent
*/
ConfigType get_config_request = 5;
/*
* Send the current Config in the response to this message.
*/
Config get_config_response = 6;
/*
2022-09-07 11:43:54 +09:30
* Ask for the following config data to be sent
*/
2022-09-07 11:43:54 +09:30
ModuleConfigType get_module_config_request = 7;
2022-02-21 18:48:42 +11:00
/*
2022-09-07 11:43:54 +09:30
* Send the current Config in the response to this message.
2022-02-21 18:48:42 +11:00
*/
2022-09-07 11:43:54 +09:30
ModuleConfig get_module_config_response = 8;
2021-03-11 11:11:45 +08:00
2022-02-21 18:48:42 +11:00
/*
2022-09-07 11:43:54 +09:30
* Get the Canned Message Module messages in the response to this message.
2022-02-21 18:48:42 +11:00
*/
2022-09-07 11:43:54 +09:30
bool get_canned_message_module_messages_request = 10;
2022-05-01 12:38:23 +10:00
/*
2022-09-07 11:43:54 +09:30
* Get the Canned Message Module messages in the response to this message.
2022-05-01 12:38:23 +10:00
*/
2022-09-07 11:43:54 +09:30
string get_canned_message_module_messages_response = 11;
2022-05-01 14:41:22 +10:00
/*
2022-09-07 11:43:54 +09:30
* Request the node to send device metadata (firmware, protobuf version, etc)
2022-05-01 14:41:22 +10:00
*/
2022-10-09 16:56:01 +10:30
bool get_device_metadata_request = 12;
2022-05-01 12:38:23 +10:00
2022-05-02 08:29:10 +10:00
/*
2022-09-07 11:43:54 +09:30
* Device metadata response
*/
DeviceMetadata get_device_metadata_response = 13;
2022-05-02 08:29:10 +10:00
2022-05-02 08:38:22 +10:00
/*
2022-09-07 11:43:54 +09:30
* Set the owner for this node
2022-05-02 08:38:22 +10:00
*/
2022-09-07 11:43:54 +09:30
User set_owner = 32;
/*
2022-09-07 11:43:54 +09:30
* Set channels (using the new API).
* A special channel is the "primary channel".
* The other records are secondary channels.
* Note: only one channel can be marked as primary.
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
*/
Channel set_channel = 33;
/*
2022-09-07 11:43:54 +09:30
* Set the current Config
*/
2022-09-07 11:43:54 +09:30
Config set_config = 34;
/*
* Set the current Config
*/
2022-09-07 11:43:54 +09:30
ModuleConfig set_module_config = 35;
/*
* Set the Canned Message Module messages text.
*/
string set_canned_message_module_messages = 36;
/*
* Begins an edit transaction for config, module config, owner, and channel settings changes
* This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
*/
bool begin_edit_settings = 65;
2022-08-08 09:34:17 +10:00
/*
* Commits an open transaction for any edits made to config, module config, owner, and channel settings
2022-08-08 09:34:17 +10:00
*/
bool commit_edit_settings = 64;
2022-08-08 09:34:17 +10:00
/*
* Setting channels/radio config remotely carries the risk that you might send an invalid config and the radio never talks to your mesh again.
* Therefore if setting either of these properties remotely, you must send a confirm_xxx message within 10 minutes.
* If you fail to do so, the radio will assume loss of comms and revert your changes.
* These messages are optional when changing the local node.
*/
2022-09-07 11:43:54 +09:30
bool confirm_set_channel = 66;
2022-02-21 18:48:42 +11:00
/*
* TODO: REPLACE
*/
2022-09-07 11:43:54 +09:30
bool confirm_set_radio = 67;
2021-03-18 19:08:37 +08:00
2022-10-07 22:10:51 +02:00
/*
* Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot)
* Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.
*/
int32 reboot_ota_seconds = 95;
/*
* This message is only supported for the simulator porduino build.
* If received the simulator will exit successfully.
*/
2022-09-07 11:43:54 +09:30
bool exit_simulator = 96;
2021-03-27 10:04:22 +08:00
/*
* Tell the node to reboot in this many seconds (or <0 to cancel reboot)
*/
2022-09-07 11:43:54 +09:30
int32 reboot_seconds = 97;
2022-01-18 17:39:38 -08:00
2022-01-20 18:43:16 -06:00
/*
* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown)
*/
2022-09-07 11:43:54 +09:30
int32 shutdown_seconds = 98;
2022-08-07 19:43:46 -05:00
/*
2022-09-07 11:43:54 +09:30
* Tell the node to factory reset, all device settings will be returned to factory defaults.
2022-08-07 19:43:46 -05:00
*/
2022-09-07 11:43:54 +09:30
int32 factory_reset = 99;
2022-09-12 00:08:19 +10:00
/*
* Tell the node to reset the nodedb.
*/
int32 nodedb_reset = 100;
}
2022-02-21 18:48:42 +11:00
}