firmware/src/mesh/generated/admin.pb.h

240 lines
13 KiB
C
Raw Normal View History

2021-02-25 12:36:37 +00:00
/* Automatically generated nanopb header */
2022-06-17 13:37:52 +00:00
/* Generated by nanopb-0.4.6 */
2021-02-25 12:36:37 +00:00
#ifndef PB_ADMIN_PB_H_INCLUDED
#define PB_ADMIN_PB_H_INCLUDED
#include <pb.h>
#include "channel.pb.h"
2022-05-02 00:24:28 +00:00
#include "config.pb.h"
#include "device_metadata.pb.h"
#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-05-01 06:12:48 +00:00
typedef enum _AdminMessage_ConfigType {
2022-05-02 12:00:24 +00:00
AdminMessage_ConfigType_DEVICE_CONFIG = 0,
2022-05-07 10:31:21 +00:00
AdminMessage_ConfigType_POSITION_CONFIG = 1,
2022-05-02 12:00:24 +00:00
AdminMessage_ConfigType_POWER_CONFIG = 2,
AdminMessage_ConfigType_WIFI_CONFIG = 3,
AdminMessage_ConfigType_DISPLAY_CONFIG = 4,
AdminMessage_ConfigType_LORA_CONFIG = 5
2022-05-01 06:12:48 +00:00
} AdminMessage_ConfigType;
2022-05-01 02:39:48 +00:00
2022-05-02 12:00:24 +00:00
typedef enum _AdminMessage_ModuleConfigType {
AdminMessage_ModuleConfigType_MQTT_CONFIG = 0,
AdminMessage_ModuleConfigType_SERIAL_CONFIG = 1,
AdminMessage_ModuleConfigType_EXTNOTIF_CONFIG = 2,
AdminMessage_ModuleConfigType_STOREFORWARD_CONFIG = 3,
AdminMessage_ModuleConfigType_RANGETEST_CONFIG = 4,
AdminMessage_ModuleConfigType_TELEMETRY_CONFIG = 5,
AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG = 6
} AdminMessage_ModuleConfigType;
2021-02-25 12:36:37 +00:00
/* Struct definitions */
/* 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) */
typedef struct _AdminMessage {
2021-02-25 12:36:37 +00:00
pb_size_t which_variant;
union {
2022-06-17 13:37:52 +00:00
/* Set the owner for this node */
2021-02-25 12:36:37 +00:00
User set_owner;
2022-06-17 13:37:52 +00:00
/* 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. */
2021-02-25 12:36:37 +00:00
Channel set_channel;
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. */
bool get_owner_request;
2022-06-17 13:37:52 +00:00
/* TODO: REPLACE */
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
/* Set the current Config */
2022-05-01 22:35:31 +00:00
Config set_config;
2022-06-17 13:37:52 +00:00
/* 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 */
2022-05-01 22:53:44 +00:00
bool confirm_set_config;
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-06-17 13:37:52 +00:00
/* Set the current Config */
2022-05-02 12:00:24 +00:00
ModuleConfig set_module_config;
2022-06-17 13:37:52 +00:00
/* 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 */
2022-05-02 12:00:24 +00:00
bool confirm_set_module_config;
/* Send all channels in the response to this message */
bool get_all_channel_request;
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-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) */
int32_t reboot_seconds;
2022-06-17 13:37:52 +00:00
/* Get the Canned Message Module message part1 in the response to this message. */
bool get_canned_message_module_part1_request;
2022-06-17 13:37:52 +00:00
/* TODO: REPLACE */
char get_canned_message_module_part1_response[201];
2022-06-17 13:37:52 +00:00
/* Get the Canned Message Module message part2 in the response to this message. */
bool get_canned_message_module_part2_request;
2022-06-17 13:37:52 +00:00
/* TODO: REPLACE */
char get_canned_message_module_part2_response[201];
2022-06-17 13:37:52 +00:00
/* Get the Canned Message Module message part3 in the response to this message. */
bool get_canned_message_module_part3_request;
2022-06-17 13:37:52 +00:00
/* TODO: REPLACE */
char get_canned_message_module_part3_response[201];
2022-06-17 13:37:52 +00:00
/* Get the Canned Message Module message part4 in the response to this message. */
bool get_canned_message_module_part4_request;
2022-06-17 13:37:52 +00:00
/* TODO: REPLACE */
char get_canned_message_module_part4_response[201];
2022-06-17 13:37:52 +00:00
/* Set the canned message module part 1 text. */
char set_canned_message_module_part1[201];
2022-06-17 13:37:52 +00:00
/* Set the canned message module part 2 text. */
char set_canned_message_module_part2[201];
2022-06-17 13:37:52 +00:00
/* Set the canned message module part 3 text. */
char set_canned_message_module_part3[201];
2022-06-17 13:37:52 +00:00
/* Set the canned message module part 4 text. */
char set_canned_message_module_part4[201];
2022-06-17 13:37:52 +00:00
/* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) */
int32_t shutdown_seconds;
/* Request the node to send device metadata (firmware, protobuf version, etc) */
uint32_t get_device_metadata_request;
/* Device metadata response */
DeviceMetadata get_device_metadata_response;
2022-06-17 13:37:52 +00:00
};
2021-02-25 12:36:37 +00:00
} AdminMessage;
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
#define _AdminMessage_ConfigType_MAX AdminMessage_ConfigType_LORA_CONFIG
#define _AdminMessage_ConfigType_ARRAYSIZE ((AdminMessage_ConfigType)(AdminMessage_ConfigType_LORA_CONFIG+1))
#define _AdminMessage_ModuleConfigType_MIN AdminMessage_ModuleConfigType_MQTT_CONFIG
#define _AdminMessage_ModuleConfigType_MAX AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG
#define _AdminMessage_ModuleConfigType_ARRAYSIZE ((AdminMessage_ModuleConfigType)(AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG+1))
2022-05-01 02:39:48 +00:00
2021-02-25 12:36:37 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
2022-05-07 10:31:21 +00:00
#define AdminMessage_init_default {0, {User_init_default}}
#define AdminMessage_init_zero {0, {User_init_zero}}
2021-02-25 12:36:37 +00:00
/* Field tags (for use in manual encoding/decoding) */
#define AdminMessage_set_owner_tag 2
#define AdminMessage_set_channel_tag 3
2021-02-26 07:34:00 +00:00
#define AdminMessage_get_channel_request_tag 6
#define AdminMessage_get_channel_response_tag 7
#define AdminMessage_get_owner_request_tag 8
#define AdminMessage_get_owner_response_tag 9
2022-05-01 02:39:48 +00:00
#define AdminMessage_get_config_request_tag 10
2022-05-01 06:12:48 +00:00
#define AdminMessage_get_config_response_tag 11
2022-05-01 22:35:31 +00:00
#define AdminMessage_set_config_tag 12
2022-05-01 22:53:44 +00:00
#define AdminMessage_confirm_set_config_tag 13
2022-05-02 12:00:24 +00:00
#define AdminMessage_get_module_config_request_tag 14
#define AdminMessage_get_module_config_response_tag 15
#define AdminMessage_set_module_config_tag 16
#define AdminMessage_confirm_set_module_config_tag 17
#define AdminMessage_get_all_channel_request_tag 18
2021-03-11 05:02:00 +00:00
#define AdminMessage_confirm_set_channel_tag 32
#define AdminMessage_confirm_set_radio_tag 33
2021-03-18 11:09:31 +00:00
#define AdminMessage_exit_simulator_tag 34
#define AdminMessage_reboot_seconds_tag 35
#define AdminMessage_get_canned_message_module_part1_request_tag 36
#define AdminMessage_get_canned_message_module_part1_response_tag 37
#define AdminMessage_get_canned_message_module_part2_request_tag 38
#define AdminMessage_get_canned_message_module_part2_response_tag 39
#define AdminMessage_get_canned_message_module_part3_request_tag 40
#define AdminMessage_get_canned_message_module_part3_response_tag 41
#define AdminMessage_get_canned_message_module_part4_request_tag 42
#define AdminMessage_get_canned_message_module_part4_response_tag 43
#define AdminMessage_set_canned_message_module_part1_tag 44
#define AdminMessage_set_canned_message_module_part2_tag 45
#define AdminMessage_set_canned_message_module_part3_tag 46
#define AdminMessage_set_canned_message_module_part4_tag 47
#define AdminMessage_shutdown_seconds_tag 51
#define AdminMessage_get_device_metadata_request_tag 52
#define AdminMessage_get_device_metadata_response_tag 53
2021-02-25 12:36:37 +00:00
/* Struct field encoding specification for nanopb */
#define AdminMessage_FIELDLIST(X, a) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_owner,set_owner), 2) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_channel,set_channel), 3) \
2021-02-26 07:34:00 +00:00
X(a, STATIC, ONEOF, UINT32, (variant,get_channel_request,get_channel_request), 6) \
2021-03-11 05:02:00 +00:00
X(a, STATIC, ONEOF, MESSAGE, (variant,get_channel_response,get_channel_response), 7) \
X(a, STATIC, ONEOF, BOOL, (variant,get_owner_request,get_owner_request), 8) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_owner_response,get_owner_response), 9) \
2022-05-01 02:39:48 +00:00
X(a, STATIC, ONEOF, UENUM, (variant,get_config_request,get_config_request), 10) \
2022-05-01 06:12:48 +00:00
X(a, STATIC, ONEOF, MESSAGE, (variant,get_config_response,get_config_response), 11) \
2022-05-01 22:35:31 +00:00
X(a, STATIC, ONEOF, MESSAGE, (variant,set_config,set_config), 12) \
2022-05-01 22:53:44 +00:00
X(a, STATIC, ONEOF, BOOL, (variant,confirm_set_config,confirm_set_config), 13) \
2022-05-02 12:00:24 +00:00
X(a, STATIC, ONEOF, UENUM, (variant,get_module_config_request,get_module_config_request), 14) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_module_config_response,get_module_config_response), 15) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_module_config,set_module_config), 16) \
X(a, STATIC, ONEOF, BOOL, (variant,confirm_set_module_config,confirm_set_module_config), 17) \
X(a, STATIC, ONEOF, BOOL, (variant,get_all_channel_request,get_all_channel_request), 18) \
2021-03-11 05:02:00 +00:00
X(a, STATIC, ONEOF, BOOL, (variant,confirm_set_channel,confirm_set_channel), 32) \
2021-03-18 11:09:31 +00:00
X(a, STATIC, ONEOF, BOOL, (variant,confirm_set_radio,confirm_set_radio), 33) \
X(a, STATIC, ONEOF, BOOL, (variant,exit_simulator,exit_simulator), 34) \
X(a, STATIC, ONEOF, INT32, (variant,reboot_seconds,reboot_seconds), 35) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_module_part1_request,get_canned_message_module_part1_request), 36) \
X(a, STATIC, ONEOF, STRING, (variant,get_canned_message_module_part1_response,get_canned_message_module_part1_response), 37) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_module_part2_request,get_canned_message_module_part2_request), 38) \
X(a, STATIC, ONEOF, STRING, (variant,get_canned_message_module_part2_response,get_canned_message_module_part2_response), 39) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_module_part3_request,get_canned_message_module_part3_request), 40) \
X(a, STATIC, ONEOF, STRING, (variant,get_canned_message_module_part3_response,get_canned_message_module_part3_response), 41) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_module_part4_request,get_canned_message_module_part4_request), 42) \
X(a, STATIC, ONEOF, STRING, (variant,get_canned_message_module_part4_response,get_canned_message_module_part4_response), 43) \
X(a, STATIC, ONEOF, STRING, (variant,set_canned_message_module_part1,set_canned_message_module_part1), 44) \
X(a, STATIC, ONEOF, STRING, (variant,set_canned_message_module_part2,set_canned_message_module_part2), 45) \
X(a, STATIC, ONEOF, STRING, (variant,set_canned_message_module_part3,set_canned_message_module_part3), 46) \
X(a, STATIC, ONEOF, STRING, (variant,set_canned_message_module_part4,set_canned_message_module_part4), 47) \
X(a, STATIC, ONEOF, INT32, (variant,shutdown_seconds,shutdown_seconds), 51) \
X(a, STATIC, ONEOF, UINT32, (variant,get_device_metadata_request,get_device_metadata_request), 52) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_device_metadata_response,get_device_metadata_response), 53)
2021-02-25 12:36:37 +00:00
#define AdminMessage_CALLBACK NULL
#define AdminMessage_DEFAULT NULL
#define AdminMessage_variant_set_owner_MSGTYPE User
#define AdminMessage_variant_set_channel_MSGTYPE Channel
2021-02-26 07:34:00 +00:00
#define AdminMessage_variant_get_channel_response_MSGTYPE Channel
#define AdminMessage_variant_get_owner_response_MSGTYPE User
2022-05-01 06:12:48 +00:00
#define AdminMessage_variant_get_config_response_MSGTYPE Config
2022-05-01 22:35:31 +00:00
#define AdminMessage_variant_set_config_MSGTYPE Config
2022-05-02 12:00:24 +00:00
#define AdminMessage_variant_get_module_config_response_MSGTYPE ModuleConfig
#define AdminMessage_variant_set_module_config_MSGTYPE ModuleConfig
#define AdminMessage_variant_get_device_metadata_response_MSGTYPE DeviceMetadata
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-05-07 10:31:21 +00:00
#define AdminMessage_size 204
2021-02-25 12:36:37 +00:00
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif