Admin message shutdown protobufs (#1119)

* Updated protos for admin message shutdown protobufs
pull/1122/head
Ben Meadors 2022-01-20 21:43:15 -06:00 zatwierdzone przez GitHub
rodzic 2230cbbe2a
commit 6d34151590
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 211 dodań i 6 usunięć

2
proto

@ -1 +1 @@
Subproject commit 3d25dfda00bf7a580ab690e3d9a914590ba36746
Subproject commit 62cb78fcbe2563f48b190b67cb6fc19fc463064d

Wyświetl plik

@ -4,6 +4,7 @@
#ifndef PB_ADMIN_PB_H_INCLUDED
#define PB_ADMIN_PB_H_INCLUDED
#include <pb.h>
#include "cannedmessages.pb.h"
#include "channel.pb.h"
#include "mesh.pb.h"
#include "radioconfig.pb.h"
@ -29,6 +30,22 @@ typedef struct _AdminMessage {
bool confirm_set_radio;
bool exit_simulator;
int32_t reboot_seconds;
bool get_canned_message_plugin_part1_request;
CannedMessagePluginMessagePart1 get_canned_message_plugin_part1_response;
bool get_canned_message_plugin_part2_request;
CannedMessagePluginMessagePart2 get_canned_message_plugin_part2_response;
bool get_canned_message_plugin_part3_request;
CannedMessagePluginMessagePart3 get_canned_message_plugin_part3_response;
bool get_canned_message_plugin_part4_request;
CannedMessagePluginMessagePart4 get_canned_message_plugin_part4_response;
bool get_canned_message_plugin_part5_request;
CannedMessagePluginMessagePart5 get_canned_message_plugin_part5_response;
CannedMessagePluginMessagePart1 set_canned_message_plugin_part1;
CannedMessagePluginMessagePart2 set_canned_message_plugin_part2;
CannedMessagePluginMessagePart3 set_canned_message_plugin_part3;
CannedMessagePluginMessagePart4 set_canned_message_plugin_part4;
CannedMessagePluginMessagePart5 set_canned_message_plugin_part5;
int32_t shutdown_seconds;
};
} AdminMessage;
@ -55,6 +72,22 @@ extern "C" {
#define AdminMessage_confirm_set_radio_tag 33
#define AdminMessage_exit_simulator_tag 34
#define AdminMessage_reboot_seconds_tag 35
#define AdminMessage_get_canned_message_plugin_part1_request_tag 36
#define AdminMessage_get_canned_message_plugin_part1_response_tag 37
#define AdminMessage_get_canned_message_plugin_part2_request_tag 38
#define AdminMessage_get_canned_message_plugin_part2_response_tag 39
#define AdminMessage_get_canned_message_plugin_part3_request_tag 40
#define AdminMessage_get_canned_message_plugin_part3_response_tag 41
#define AdminMessage_get_canned_message_plugin_part4_request_tag 42
#define AdminMessage_get_canned_message_plugin_part4_response_tag 43
#define AdminMessage_get_canned_message_plugin_part5_request_tag 44
#define AdminMessage_get_canned_message_plugin_part5_response_tag 45
#define AdminMessage_set_canned_message_plugin_part1_tag 46
#define AdminMessage_set_canned_message_plugin_part2_tag 47
#define AdminMessage_set_canned_message_plugin_part3_tag 48
#define AdminMessage_set_canned_message_plugin_part4_tag 49
#define AdminMessage_set_canned_message_plugin_part5_tag 50
#define AdminMessage_shutdown_seconds_tag 51
/* Struct field encoding specification for nanopb */
#define AdminMessage_FIELDLIST(X, a) \
@ -70,7 +103,23 @@ X(a, STATIC, ONEOF, MESSAGE, (variant,get_owner_response,get_owner_respons
X(a, STATIC, ONEOF, BOOL, (variant,confirm_set_channel,confirm_set_channel), 32) \
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, INT32, (variant,reboot_seconds,reboot_seconds), 35) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_plugin_part1_request,get_canned_message_plugin_part1_request), 36) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_canned_message_plugin_part1_response,get_canned_message_plugin_part1_response), 37) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_plugin_part2_request,get_canned_message_plugin_part2_request), 38) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_canned_message_plugin_part2_response,get_canned_message_plugin_part2_response), 39) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_plugin_part3_request,get_canned_message_plugin_part3_request), 40) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_canned_message_plugin_part3_response,get_canned_message_plugin_part3_response), 41) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_plugin_part4_request,get_canned_message_plugin_part4_request), 42) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_canned_message_plugin_part4_response,get_canned_message_plugin_part4_response), 43) \
X(a, STATIC, ONEOF, BOOL, (variant,get_canned_message_plugin_part5_request,get_canned_message_plugin_part5_request), 44) \
X(a, STATIC, ONEOF, MESSAGE, (variant,get_canned_message_plugin_part5_response,get_canned_message_plugin_part5_response), 45) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_canned_message_plugin_part1,set_canned_message_plugin_part1), 46) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_canned_message_plugin_part2,set_canned_message_plugin_part2), 47) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_canned_message_plugin_part3,set_canned_message_plugin_part3), 48) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_canned_message_plugin_part4,set_canned_message_plugin_part4), 49) \
X(a, STATIC, ONEOF, MESSAGE, (variant,set_canned_message_plugin_part5,set_canned_message_plugin_part5), 50) \
X(a, STATIC, ONEOF, INT32, (variant,shutdown_seconds,shutdown_seconds), 51)
#define AdminMessage_CALLBACK NULL
#define AdminMessage_DEFAULT NULL
#define AdminMessage_variant_set_radio_MSGTYPE RadioConfig
@ -79,6 +128,16 @@ X(a, STATIC, ONEOF, INT32, (variant,reboot_seconds,reboot_seconds), 35)
#define AdminMessage_variant_get_radio_response_MSGTYPE RadioConfig
#define AdminMessage_variant_get_channel_response_MSGTYPE Channel
#define AdminMessage_variant_get_owner_response_MSGTYPE User
#define AdminMessage_variant_get_canned_message_plugin_part1_response_MSGTYPE CannedMessagePluginMessagePart1
#define AdminMessage_variant_get_canned_message_plugin_part2_response_MSGTYPE CannedMessagePluginMessagePart2
#define AdminMessage_variant_get_canned_message_plugin_part3_response_MSGTYPE CannedMessagePluginMessagePart3
#define AdminMessage_variant_get_canned_message_plugin_part4_response_MSGTYPE CannedMessagePluginMessagePart4
#define AdminMessage_variant_get_canned_message_plugin_part5_response_MSGTYPE CannedMessagePluginMessagePart5
#define AdminMessage_variant_set_canned_message_plugin_part1_MSGTYPE CannedMessagePluginMessagePart1
#define AdminMessage_variant_set_canned_message_plugin_part2_MSGTYPE CannedMessagePluginMessagePart2
#define AdminMessage_variant_set_canned_message_plugin_part3_MSGTYPE CannedMessagePluginMessagePart3
#define AdminMessage_variant_set_canned_message_plugin_part4_MSGTYPE CannedMessagePluginMessagePart4
#define AdminMessage_variant_set_canned_message_plugin_part5_MSGTYPE CannedMessagePluginMessagePart5
extern const pb_msgdesc_t AdminMessage_msg;

Wyświetl plik

@ -0,0 +1,24 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.4.4 */
#include "cannedmessages.pb.h"
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
PB_BIND(CannedMessagePluginMessagePart1, CannedMessagePluginMessagePart1, AUTO)
PB_BIND(CannedMessagePluginMessagePart2, CannedMessagePluginMessagePart2, AUTO)
PB_BIND(CannedMessagePluginMessagePart3, CannedMessagePluginMessagePart3, AUTO)
PB_BIND(CannedMessagePluginMessagePart4, CannedMessagePluginMessagePart4, AUTO)
PB_BIND(CannedMessagePluginMessagePart5, CannedMessagePluginMessagePart5, AUTO)

Wyświetl plik

@ -0,0 +1,107 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.4 */
#ifndef PB_CANNEDMESSAGES_PB_H_INCLUDED
#define PB_CANNEDMESSAGES_PB_H_INCLUDED
#include <pb.h>
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _CannedMessagePluginMessagePart1 {
char text[200];
} CannedMessagePluginMessagePart1;
typedef struct _CannedMessagePluginMessagePart2 {
char text[200];
} CannedMessagePluginMessagePart2;
typedef struct _CannedMessagePluginMessagePart3 {
char text[200];
} CannedMessagePluginMessagePart3;
typedef struct _CannedMessagePluginMessagePart4 {
char text[200];
} CannedMessagePluginMessagePart4;
typedef struct _CannedMessagePluginMessagePart5 {
char text[200];
} CannedMessagePluginMessagePart5;
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
#define CannedMessagePluginMessagePart1_init_default {""}
#define CannedMessagePluginMessagePart2_init_default {""}
#define CannedMessagePluginMessagePart3_init_default {""}
#define CannedMessagePluginMessagePart4_init_default {""}
#define CannedMessagePluginMessagePart5_init_default {""}
#define CannedMessagePluginMessagePart1_init_zero {""}
#define CannedMessagePluginMessagePart2_init_zero {""}
#define CannedMessagePluginMessagePart3_init_zero {""}
#define CannedMessagePluginMessagePart4_init_zero {""}
#define CannedMessagePluginMessagePart5_init_zero {""}
/* Field tags (for use in manual encoding/decoding) */
#define CannedMessagePluginMessagePart1_text_tag 1
#define CannedMessagePluginMessagePart2_text_tag 1
#define CannedMessagePluginMessagePart3_text_tag 1
#define CannedMessagePluginMessagePart4_text_tag 1
#define CannedMessagePluginMessagePart5_text_tag 1
/* Struct field encoding specification for nanopb */
#define CannedMessagePluginMessagePart1_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, text, 1)
#define CannedMessagePluginMessagePart1_CALLBACK NULL
#define CannedMessagePluginMessagePart1_DEFAULT NULL
#define CannedMessagePluginMessagePart2_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, text, 1)
#define CannedMessagePluginMessagePart2_CALLBACK NULL
#define CannedMessagePluginMessagePart2_DEFAULT NULL
#define CannedMessagePluginMessagePart3_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, text, 1)
#define CannedMessagePluginMessagePart3_CALLBACK NULL
#define CannedMessagePluginMessagePart3_DEFAULT NULL
#define CannedMessagePluginMessagePart4_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, text, 1)
#define CannedMessagePluginMessagePart4_CALLBACK NULL
#define CannedMessagePluginMessagePart4_DEFAULT NULL
#define CannedMessagePluginMessagePart5_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, STRING, text, 1)
#define CannedMessagePluginMessagePart5_CALLBACK NULL
#define CannedMessagePluginMessagePart5_DEFAULT NULL
extern const pb_msgdesc_t CannedMessagePluginMessagePart1_msg;
extern const pb_msgdesc_t CannedMessagePluginMessagePart2_msg;
extern const pb_msgdesc_t CannedMessagePluginMessagePart3_msg;
extern const pb_msgdesc_t CannedMessagePluginMessagePart4_msg;
extern const pb_msgdesc_t CannedMessagePluginMessagePart5_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define CannedMessagePluginMessagePart1_fields &CannedMessagePluginMessagePart1_msg
#define CannedMessagePluginMessagePart2_fields &CannedMessagePluginMessagePart2_msg
#define CannedMessagePluginMessagePart3_fields &CannedMessagePluginMessagePart3_msg
#define CannedMessagePluginMessagePart4_fields &CannedMessagePluginMessagePart4_msg
#define CannedMessagePluginMessagePart5_fields &CannedMessagePluginMessagePart5_msg
/* Maximum encoded size of messages (where known) */
#define CannedMessagePluginMessagePart1_size 202
#define CannedMessagePluginMessagePart2_size 202
#define CannedMessagePluginMessagePart3_size 202
#define CannedMessagePluginMessagePart4_size 202
#define CannedMessagePluginMessagePart5_size 202
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

Wyświetl plik

@ -43,6 +43,11 @@ typedef struct _DeviceState {
uint32_t version;
bool no_save;
bool did_gps_reset;
char canned_message_plugin_message_part1[200];
char canned_message_plugin_message_part2[200];
char canned_message_plugin_message_part3[200];
char canned_message_plugin_message_part4[200];
char canned_message_plugin_message_part5[200];
} DeviceState;
@ -53,11 +58,11 @@ extern "C" {
/* Initializer values for message structs */
#define LegacyRadioConfig_init_default {false, LegacyRadioConfig_LegacyPreferences_init_default}
#define LegacyRadioConfig_LegacyPreferences_init_default {_RegionCode_MIN}
#define DeviceState_init_default {false, LegacyRadioConfig_init_default, false, MyNodeInfo_init_default, false, User_init_default, 0, {NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default}, 0, {MeshPacket_init_default}, false, MeshPacket_init_default, 0, 0, 0}
#define DeviceState_init_default {false, LegacyRadioConfig_init_default, false, MyNodeInfo_init_default, false, User_init_default, 0, {NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default, NodeInfo_init_default}, 0, {MeshPacket_init_default}, false, MeshPacket_init_default, 0, 0, 0, "", "", "", "", ""}
#define ChannelFile_init_default {0, {Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default, Channel_init_default}}
#define LegacyRadioConfig_init_zero {false, LegacyRadioConfig_LegacyPreferences_init_zero}
#define LegacyRadioConfig_LegacyPreferences_init_zero {_RegionCode_MIN}
#define DeviceState_init_zero {false, LegacyRadioConfig_init_zero, false, MyNodeInfo_init_zero, false, User_init_zero, 0, {NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero}, 0, {MeshPacket_init_zero}, false, MeshPacket_init_zero, 0, 0, 0}
#define DeviceState_init_zero {false, LegacyRadioConfig_init_zero, false, MyNodeInfo_init_zero, false, User_init_zero, 0, {NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero, NodeInfo_init_zero}, 0, {MeshPacket_init_zero}, false, MeshPacket_init_zero, 0, 0, 0, "", "", "", "", ""}
#define ChannelFile_init_zero {0, {Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero, Channel_init_zero}}
/* Field tags (for use in manual encoding/decoding) */
@ -73,6 +78,11 @@ extern "C" {
#define DeviceState_version_tag 8
#define DeviceState_no_save_tag 9
#define DeviceState_did_gps_reset_tag 11
#define DeviceState_canned_message_plugin_message_part1_tag 13
#define DeviceState_canned_message_plugin_message_part2_tag 14
#define DeviceState_canned_message_plugin_message_part3_tag 15
#define DeviceState_canned_message_plugin_message_part4_tag 16
#define DeviceState_canned_message_plugin_message_part5_tag 17
/* Struct field encoding specification for nanopb */
#define LegacyRadioConfig_FIELDLIST(X, a) \
@ -95,7 +105,12 @@ X(a, STATIC, REPEATED, MESSAGE, receive_queue, 5) \
X(a, STATIC, OPTIONAL, MESSAGE, rx_text_message, 7) \
X(a, STATIC, SINGULAR, UINT32, version, 8) \
X(a, STATIC, SINGULAR, BOOL, no_save, 9) \
X(a, STATIC, SINGULAR, BOOL, did_gps_reset, 11)
X(a, STATIC, SINGULAR, BOOL, did_gps_reset, 11) \
X(a, STATIC, SINGULAR, STRING, canned_message_plugin_message_part1, 13) \
X(a, STATIC, SINGULAR, STRING, canned_message_plugin_message_part2, 14) \
X(a, STATIC, SINGULAR, STRING, canned_message_plugin_message_part3, 15) \
X(a, STATIC, SINGULAR, STRING, canned_message_plugin_message_part4, 16) \
X(a, STATIC, SINGULAR, STRING, canned_message_plugin_message_part5, 17)
#define DeviceState_CALLBACK NULL
#define DeviceState_DEFAULT NULL
#define DeviceState_legacyRadio_MSGTYPE LegacyRadioConfig
@ -125,7 +140,7 @@ extern const pb_msgdesc_t ChannelFile_msg;
/* Maximum encoded size of messages (where known) */
#define LegacyRadioConfig_size 4
#define LegacyRadioConfig_LegacyPreferences_size 2
#define DeviceState_size 9973
#define DeviceState_size 10985
#define ChannelFile_size 832
#ifdef __cplusplus