[create-pull-request] automated change

This commit is contained in:
thebentern
2023-01-18 16:19:47 +00:00
committed by GitHub
parent 36b3bf2211
commit 80f259cc6c
33 changed files with 1628 additions and 1628 deletions

View File

@@ -19,18 +19,18 @@
cross band routing as needed.
If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
(but any number of SECONDARY channels can't be sent received on that common frequency) */
typedef enum _meshtastic_Channel_Role {
typedef enum _Channel_Role {
/* This channel is not in use right now */
meshtastic_Channel_Role_DISABLED = 0,
Channel_Role_DISABLED = 0,
/* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY */
meshtastic_Channel_Role_PRIMARY = 1,
Channel_Role_PRIMARY = 1,
/* Secondary channels are only used for encryption/decryption/authentication purposes.
Their radio settings (freq etc) are ignored, only psk is used. */
meshtastic_Channel_Role_SECONDARY = 2
} meshtastic_Channel_Role;
Channel_Role_SECONDARY = 2
} Channel_Role;
/* Struct definitions */
typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;
typedef PB_BYTES_ARRAY_T(32) ChannelSettings_psk_t;
/* Full settings (center freq, spread factor, pre-shared secret key etc...)
needed to configure a radio for speaking on a particular channel This
information can be encoded as a QRcode/url so that other users can configure
@@ -50,7 +50,7 @@ typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;
FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
FIXME: explain how apps use channels for security.
explain how remote settings and remote gpio are managed as an example */
typedef struct _meshtastic_ChannelSettings {
typedef struct _ChannelSettings {
/* Deprecated in favor of LoraConfig.channel_num */
uint32_t channel_num;
/* A simple pre-shared key for now for crypto.
@@ -63,7 +63,7 @@ typedef struct _meshtastic_ChannelSettings {
`1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0xbf}
`2` through 10 = The default channel key, except with 1 through 9 added to the last byte.
Shown to user as simple1 through 10 */
meshtastic_ChannelSettings_psk_t psk;
ChannelSettings_psk_t psk;
/* A SHORT name that will be packed into the URL.
Less than 12 bytes.
Something for end users to call the channel
@@ -89,20 +89,20 @@ typedef struct _meshtastic_ChannelSettings {
bool uplink_enabled;
/* If true, messages seen on the internet will be forwarded to the local mesh. */
bool downlink_enabled;
} meshtastic_ChannelSettings;
} ChannelSettings;
/* A pair of a channel number, mode and the (sharable) settings for that channel */
typedef struct _meshtastic_Channel {
typedef struct _Channel {
/* The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)
(Someday - not currently implemented) An index of -1 could be used to mean "set by name",
in which case the target node will find and set the channel by settings.name. */
int8_t index;
/* The new settings, or NULL to disable that channel */
bool has_settings;
meshtastic_ChannelSettings settings;
ChannelSettings settings;
/* TODO: REPLACE */
meshtastic_Channel_Role role;
} meshtastic_Channel;
Channel_Role role;
} Channel;
#ifdef __cplusplus
@@ -110,60 +110,60 @@ extern "C" {
#endif
/* Helper constants for enums */
#define _meshtastic_Channel_Role_MIN meshtastic_Channel_Role_DISABLED
#define _meshtastic_Channel_Role_MAX meshtastic_Channel_Role_SECONDARY
#define _meshtastic_Channel_Role_ARRAYSIZE ((meshtastic_Channel_Role)(meshtastic_Channel_Role_SECONDARY+1))
#define _Channel_Role_MIN Channel_Role_DISABLED
#define _Channel_Role_MAX Channel_Role_SECONDARY
#define _Channel_Role_ARRAYSIZE ((Channel_Role)(Channel_Role_SECONDARY+1))
#define meshtastic_Channel_role_ENUMTYPE meshtastic_Channel_Role
#define Channel_role_ENUMTYPE Channel_Role
/* Initializer values for message structs */
#define meshtastic_ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0}
#define meshtastic_Channel_init_default {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN}
#define meshtastic_ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0}
#define meshtastic_Channel_init_zero {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN}
#define ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0}
#define Channel_init_default {0, false, ChannelSettings_init_default, _Channel_Role_MIN}
#define ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0}
#define Channel_init_zero {0, false, ChannelSettings_init_zero, _Channel_Role_MIN}
/* Field tags (for use in manual encoding/decoding) */
#define meshtastic_ChannelSettings_channel_num_tag 1
#define meshtastic_ChannelSettings_psk_tag 2
#define meshtastic_ChannelSettings_name_tag 3
#define meshtastic_ChannelSettings_id_tag 4
#define meshtastic_ChannelSettings_uplink_enabled_tag 5
#define meshtastic_ChannelSettings_downlink_enabled_tag 6
#define meshtastic_Channel_index_tag 1
#define meshtastic_Channel_settings_tag 2
#define meshtastic_Channel_role_tag 3
#define ChannelSettings_channel_num_tag 1
#define ChannelSettings_psk_tag 2
#define ChannelSettings_name_tag 3
#define ChannelSettings_id_tag 4
#define ChannelSettings_uplink_enabled_tag 5
#define ChannelSettings_downlink_enabled_tag 6
#define Channel_index_tag 1
#define Channel_settings_tag 2
#define Channel_role_tag 3
/* Struct field encoding specification for nanopb */
#define meshtastic_ChannelSettings_FIELDLIST(X, a) \
#define ChannelSettings_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UINT32, channel_num, 1) \
X(a, STATIC, SINGULAR, BYTES, psk, 2) \
X(a, STATIC, SINGULAR, STRING, name, 3) \
X(a, STATIC, SINGULAR, FIXED32, id, 4) \
X(a, STATIC, SINGULAR, BOOL, uplink_enabled, 5) \
X(a, STATIC, SINGULAR, BOOL, downlink_enabled, 6)
#define meshtastic_ChannelSettings_CALLBACK NULL
#define meshtastic_ChannelSettings_DEFAULT NULL
#define ChannelSettings_CALLBACK NULL
#define ChannelSettings_DEFAULT NULL
#define meshtastic_Channel_FIELDLIST(X, a) \
#define Channel_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, INT32, index, 1) \
X(a, STATIC, OPTIONAL, MESSAGE, settings, 2) \
X(a, STATIC, SINGULAR, UENUM, role, 3)
#define meshtastic_Channel_CALLBACK NULL
#define meshtastic_Channel_DEFAULT NULL
#define meshtastic_Channel_settings_MSGTYPE meshtastic_ChannelSettings
#define Channel_CALLBACK NULL
#define Channel_DEFAULT NULL
#define Channel_settings_MSGTYPE ChannelSettings
extern const pb_msgdesc_t meshtastic_ChannelSettings_msg;
extern const pb_msgdesc_t meshtastic_Channel_msg;
extern const pb_msgdesc_t ChannelSettings_msg;
extern const pb_msgdesc_t Channel_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define meshtastic_ChannelSettings_fields &meshtastic_ChannelSettings_msg
#define meshtastic_Channel_fields &meshtastic_Channel_msg
#define ChannelSettings_fields &ChannelSettings_msg
#define Channel_fields &Channel_msg
/* Maximum encoded size of messages (where known) */
#define meshtastic_ChannelSettings_size 62
#define meshtastic_Channel_size 77
#define ChannelSettings_size 62
#define Channel_size 77
#ifdef __cplusplus
} /* extern "C" */