2021-02-25 12:36:37 +00:00
|
|
|
/* Automatically generated nanopb header */
|
2022-12-21 12:55:50 +00:00
|
|
|
/* Generated by nanopb-0.4.7 */
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
#ifndef PB_ADMIN_PB_H_INCLUDED
|
|
|
|
#define PB_ADMIN_PB_H_INCLUDED
|
|
|
|
#include <pb.h>
|
2021-12-02 16:19:25 +00:00
|
|
|
#include "channel.pb.h"
|
2022-05-02 00:24:28 +00:00
|
|
|
#include "config.pb.h"
|
2022-08-08 12:19:04 +00:00
|
|
|
#include "device_metadata.pb.h"
|
2021-12-09 19:47:42 +00:00
|
|
|
#include "mesh.pb.h"
|
2022-05-02 12:00:24 +00:00
|
|
|
#include "module_config.pb.h"
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
|
|
#endif
|
|
|
|
|
2022-05-01 02:39:48 +00:00
|
|
|
/* Enum definitions */
|
2022-12-21 12:55:50 +00:00
|
|
|
/* TODO: REPLACE */
|
|
|
|
typedef enum _AdminMessage_ConfigType {
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_DEVICE_CONFIG = 0,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_POSITION_CONFIG = 1,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_POWER_CONFIG = 2,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_NETWORK_CONFIG = 3,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_DISPLAY_CONFIG = 4,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_LORA_CONFIG = 5,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6
|
2022-05-01 06:12:48 +00:00
|
|
|
} AdminMessage_ConfigType;
|
2022-05-01 02:39:48 +00:00
|
|
|
|
2022-12-21 12:55:50 +00:00
|
|
|
/* TODO: REPLACE */
|
|
|
|
typedef enum _AdminMessage_ModuleConfigType {
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_MQTT_CONFIG = 0,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_SERIAL_CONFIG = 1,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_EXTNOTIF_CONFIG = 2,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_STOREFORWARD_CONFIG = 3,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_RANGETEST_CONFIG = 4,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_TELEMETRY_CONFIG = 5,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG = 6,
|
|
|
|
/* TODO: REPLACE */
|
2022-12-29 13:18:33 +00:00
|
|
|
AdminMessage_ModuleConfigType_AUDIO_CONFIG = 7,
|
|
|
|
/* TODO: REPLACE */
|
|
|
|
AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG = 8
|
2022-05-02 12:00:24 +00:00
|
|
|
} AdminMessage_ModuleConfigType;
|
|
|
|
|
2021-02-25 12:36:37 +00:00
|
|
|
/* Struct definitions */
|
2022-03-26 14:48:35 +00:00
|
|
|
/* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
|
|
|
|
This message is used to do settings operations to both remote AND local nodes.
|
|
|
|
(Prior to 1.2 these operations were done via special ToRadio operations) */
|
2022-12-21 12:55:50 +00:00
|
|
|
typedef struct _AdminMessage {
|
2022-09-09 09:19:18 +00:00
|
|
|
pb_size_t which_payload_variant;
|
2021-02-25 12:36:37 +00:00
|
|
|
union {
|
2022-06-17 13:37:52 +00:00
|
|
|
/* 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) */
|
2021-02-26 07:34:00 +00:00
|
|
|
uint32_t get_channel_request;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* TODO: REPLACE */
|
2021-02-26 07:34:00 +00:00
|
|
|
Channel get_channel_response;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Send the current owner data in the response to this message. */
|
2021-12-09 19:47:42 +00:00
|
|
|
bool get_owner_request;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* TODO: REPLACE */
|
2021-12-09 19:47:42 +00:00
|
|
|
User get_owner_response;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Ask for the following config data to be sent */
|
2022-05-01 06:12:48 +00:00
|
|
|
AdminMessage_ConfigType get_config_request;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Send the current Config in the response to this message. */
|
2022-05-01 06:12:48 +00:00
|
|
|
Config get_config_response;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Ask for the following config data to be sent */
|
2022-05-02 12:00:24 +00:00
|
|
|
AdminMessage_ModuleConfigType get_module_config_request;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Send the current Config in the response to this message. */
|
2022-05-02 12:00:24 +00:00
|
|
|
ModuleConfig get_module_config_response;
|
2022-09-09 09:19:18 +00:00
|
|
|
/* Get the Canned Message Module messages in the response to this message. */
|
|
|
|
bool get_canned_message_module_messages_request;
|
|
|
|
/* Get the Canned Message Module messages in the response to this message. */
|
|
|
|
char get_canned_message_module_messages_response[201];
|
|
|
|
/* Request the node to send device metadata (firmware, protobuf version, etc) */
|
2022-10-09 08:55:33 +00:00
|
|
|
bool get_device_metadata_request;
|
2022-09-09 09:19:18 +00:00
|
|
|
/* Device metadata response */
|
|
|
|
DeviceMetadata get_device_metadata_response;
|
2022-12-29 13:18:33 +00:00
|
|
|
/* Get the Ringtone in the response to this message. */
|
|
|
|
bool get_ringtone_request;
|
|
|
|
/* Get the Ringtone in the response to this message. */
|
|
|
|
char get_ringtone_response[231];
|
2022-09-09 09:19:18 +00:00
|
|
|
/* Set the owner for this node */
|
|
|
|
User set_owner;
|
|
|
|
/* 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;
|
|
|
|
/* Set the current Config */
|
|
|
|
Config set_config;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Set the current Config */
|
2022-05-02 12:00:24 +00:00
|
|
|
ModuleConfig set_module_config;
|
2022-09-09 09:19:18 +00:00
|
|
|
/* Set the Canned Message Module messages text. */
|
|
|
|
char set_canned_message_module_messages[201];
|
2022-12-29 13:18:33 +00:00
|
|
|
/* Set the ringtone for ExternalNotification. */
|
|
|
|
char set_ringtone_message[231];
|
2022-11-21 01:50:45 +00:00
|
|
|
/* 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;
|
|
|
|
/* Commits an open transaction for any edits made to config, module config, owner, and channel settings */
|
|
|
|
bool commit_edit_settings;
|
2022-06-17 13:37:52 +00: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. */
|
2021-03-11 05:02:00 +00:00
|
|
|
bool confirm_set_channel;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* TODO: REPLACE */
|
2021-03-11 05:02:00 +00:00
|
|
|
bool confirm_set_radio;
|
2022-10-09 08:55:33 +00: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_t reboot_ota_seconds;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* This message is only supported for the simulator porduino build.
|
|
|
|
If received the simulator will exit successfully. */
|
2021-03-18 11:09:31 +00:00
|
|
|
bool exit_simulator;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Tell the node to reboot in this many seconds (or <0 to cancel reboot) */
|
2021-03-30 00:33:37 +00:00
|
|
|
int32_t reboot_seconds;
|
2022-06-17 13:37:52 +00:00
|
|
|
/* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) */
|
2022-01-21 03:43:15 +00:00
|
|
|
int32_t shutdown_seconds;
|
2022-09-09 09:19:18 +00:00
|
|
|
/* Tell the node to factory reset, all device settings will be returned to factory defaults. */
|
|
|
|
int32_t factory_reset;
|
2022-09-12 12:39:41 +00:00
|
|
|
/* Tell the node to reset the nodedb. */
|
|
|
|
int32_t nodedb_reset;
|
2022-06-17 13:37:52 +00:00
|
|
|
};
|
2021-02-25 12:36:37 +00:00
|
|
|
} AdminMessage;
|
|
|
|
|
|
|
|
|
2022-12-21 12:55:50 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-05-01 02:39:48 +00:00
|
|
|
/* Helper constants for enums */
|
2022-05-02 12:00:24 +00:00
|
|
|
#define _AdminMessage_ConfigType_MIN AdminMessage_ConfigType_DEVICE_CONFIG
|
2022-08-16 02:06:55 +00:00
|
|
|
#define _AdminMessage_ConfigType_MAX AdminMessage_ConfigType_BLUETOOTH_CONFIG
|
|
|
|
#define _AdminMessage_ConfigType_ARRAYSIZE ((AdminMessage_ConfigType)(AdminMessage_ConfigType_BLUETOOTH_CONFIG+1))
|
2022-05-02 12:00:24 +00:00
|
|
|
|
|
|
|
#define _AdminMessage_ModuleConfigType_MIN AdminMessage_ModuleConfigType_MQTT_CONFIG
|
2022-12-29 13:18:33 +00:00
|
|
|
#define _AdminMessage_ModuleConfigType_MAX AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG
|
|
|
|
#define _AdminMessage_ModuleConfigType_ARRAYSIZE ((AdminMessage_ModuleConfigType)(AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG+1))
|
2022-05-01 02:39:48 +00:00
|
|
|
|
2022-12-21 12:55:50 +00:00
|
|
|
#define AdminMessage_payload_variant_get_config_request_ENUMTYPE AdminMessage_ConfigType
|
|
|
|
#define AdminMessage_payload_variant_get_module_config_request_ENUMTYPE AdminMessage_ModuleConfigType
|
2022-05-01 02:39:48 +00:00
|
|
|
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
/* Initializer values for message structs */
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_init_default {0, {0}}
|
|
|
|
#define AdminMessage_init_zero {0, {0}}
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_get_channel_request_tag 1
|
|
|
|
#define AdminMessage_get_channel_response_tag 2
|
|
|
|
#define AdminMessage_get_owner_request_tag 3
|
|
|
|
#define AdminMessage_get_owner_response_tag 4
|
|
|
|
#define AdminMessage_get_config_request_tag 5
|
|
|
|
#define AdminMessage_get_config_response_tag 6
|
|
|
|
#define AdminMessage_get_module_config_request_tag 7
|
|
|
|
#define AdminMessage_get_module_config_response_tag 8
|
|
|
|
#define AdminMessage_get_canned_message_module_messages_request_tag 10
|
|
|
|
#define AdminMessage_get_canned_message_module_messages_response_tag 11
|
|
|
|
#define AdminMessage_get_device_metadata_request_tag 12
|
|
|
|
#define AdminMessage_get_device_metadata_response_tag 13
|
2022-12-29 13:18:33 +00:00
|
|
|
#define AdminMessage_get_ringtone_request_tag 14
|
|
|
|
#define AdminMessage_get_ringtone_response_tag 15
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_set_owner_tag 32
|
|
|
|
#define AdminMessage_set_channel_tag 33
|
|
|
|
#define AdminMessage_set_config_tag 34
|
|
|
|
#define AdminMessage_set_module_config_tag 35
|
|
|
|
#define AdminMessage_set_canned_message_module_messages_tag 36
|
2022-12-29 13:18:33 +00:00
|
|
|
#define AdminMessage_set_ringtone_message_tag 37
|
2022-11-21 01:50:45 +00:00
|
|
|
#define AdminMessage_begin_edit_settings_tag 64
|
|
|
|
#define AdminMessage_commit_edit_settings_tag 65
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_confirm_set_channel_tag 66
|
|
|
|
#define AdminMessage_confirm_set_radio_tag 67
|
2022-10-09 08:55:33 +00:00
|
|
|
#define AdminMessage_reboot_ota_seconds_tag 95
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_exit_simulator_tag 96
|
|
|
|
#define AdminMessage_reboot_seconds_tag 97
|
|
|
|
#define AdminMessage_shutdown_seconds_tag 98
|
|
|
|
#define AdminMessage_factory_reset_tag 99
|
2022-09-12 12:39:41 +00:00
|
|
|
#define AdminMessage_nodedb_reset_tag 100
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
|
|
#define AdminMessage_FIELDLIST(X, a) \
|
2022-09-09 09:19:18 +00:00
|
|
|
X(a, STATIC, ONEOF, UINT32, (payload_variant,get_channel_request,get_channel_request), 1) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_channel_response,get_channel_response), 2) \
|
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_owner_request,get_owner_request), 3) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_owner_response,get_owner_response), 4) \
|
|
|
|
X(a, STATIC, ONEOF, UENUM, (payload_variant,get_config_request,get_config_request), 5) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_config_response,get_config_response), 6) \
|
|
|
|
X(a, STATIC, ONEOF, UENUM, (payload_variant,get_module_config_request,get_module_config_request), 7) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_module_config_response,get_module_config_response), 8) \
|
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_canned_message_module_messages_request,get_canned_message_module_messages_request), 10) \
|
|
|
|
X(a, STATIC, ONEOF, STRING, (payload_variant,get_canned_message_module_messages_response,get_canned_message_module_messages_response), 11) \
|
2022-10-09 08:55:33 +00:00
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_device_metadata_request,get_device_metadata_request), 12) \
|
2022-09-09 09:19:18 +00:00
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_device_metadata_response,get_device_metadata_response), 13) \
|
2022-12-29 13:18:33 +00:00
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_ringtone_request,get_ringtone_request), 14) \
|
|
|
|
X(a, STATIC, ONEOF, STRING, (payload_variant,get_ringtone_response,get_ringtone_response), 15) \
|
2022-09-09 09:19:18 +00:00
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_owner,set_owner), 32) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_channel,set_channel), 33) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_config,set_config), 34) \
|
|
|
|
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_module_config,set_module_config), 35) \
|
|
|
|
X(a, STATIC, ONEOF, STRING, (payload_variant,set_canned_message_module_messages,set_canned_message_module_messages), 36) \
|
2022-12-29 13:18:33 +00:00
|
|
|
X(a, STATIC, ONEOF, STRING, (payload_variant,set_ringtone_message,set_ringtone_message), 37) \
|
2022-11-21 01:50:45 +00:00
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,begin_edit_settings,begin_edit_settings), 64) \
|
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,commit_edit_settings,commit_edit_settings), 65) \
|
2022-09-09 09:19:18 +00:00
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,confirm_set_channel,confirm_set_channel), 66) \
|
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,confirm_set_radio,confirm_set_radio), 67) \
|
2022-10-09 08:55:33 +00:00
|
|
|
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_ota_seconds,reboot_ota_seconds), 95) \
|
2022-09-09 09:19:18 +00:00
|
|
|
X(a, STATIC, ONEOF, BOOL, (payload_variant,exit_simulator,exit_simulator), 96) \
|
|
|
|
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_seconds,reboot_seconds), 97) \
|
|
|
|
X(a, STATIC, ONEOF, INT32, (payload_variant,shutdown_seconds,shutdown_seconds), 98) \
|
2022-09-12 12:39:41 +00:00
|
|
|
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset,factory_reset), 99) \
|
|
|
|
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100)
|
2021-02-25 12:36:37 +00:00
|
|
|
#define AdminMessage_CALLBACK NULL
|
|
|
|
#define AdminMessage_DEFAULT NULL
|
2022-09-09 09:19:18 +00:00
|
|
|
#define AdminMessage_payload_variant_get_channel_response_MSGTYPE Channel
|
|
|
|
#define AdminMessage_payload_variant_get_owner_response_MSGTYPE User
|
|
|
|
#define AdminMessage_payload_variant_get_config_response_MSGTYPE Config
|
|
|
|
#define AdminMessage_payload_variant_get_module_config_response_MSGTYPE ModuleConfig
|
|
|
|
#define AdminMessage_payload_variant_get_device_metadata_response_MSGTYPE DeviceMetadata
|
|
|
|
#define AdminMessage_payload_variant_set_owner_MSGTYPE User
|
|
|
|
#define AdminMessage_payload_variant_set_channel_MSGTYPE Channel
|
|
|
|
#define AdminMessage_payload_variant_set_config_MSGTYPE Config
|
|
|
|
#define AdminMessage_payload_variant_set_module_config_MSGTYPE ModuleConfig
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
extern const pb_msgdesc_t AdminMessage_msg;
|
|
|
|
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
|
|
#define AdminMessage_fields &AdminMessage_msg
|
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
2022-12-29 13:18:33 +00:00
|
|
|
#define AdminMessage_size 234
|
2021-02-25 12:36:37 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|