[create-pull-request] automated change

This commit is contained in:
caveman99
2022-12-27 12:53:56 +00:00
committed by GitHub
parent f6ee6265e6
commit b808ffa9ab
31 changed files with 1255 additions and 773 deletions

View File

@@ -1,5 +1,5 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.6 */
/* Generated by nanopb-0.4.7 */
#ifndef PB_CHANNEL_PB_H_INCLUDED
#define PB_CHANNEL_PB_H_INCLUDED
@@ -10,10 +10,23 @@
#endif
/* Enum definitions */
typedef enum _Channel_Role {
Channel_Role_DISABLED = 0,
Channel_Role_PRIMARY = 1,
Channel_Role_SECONDARY = 2
/* How this channel is being used (or not).
Note: this field is an enum to give us options for the future.
In particular, someday we might make a 'SCANNING' option.
SCANNING channels could have different frequencies and the radio would
occasionally check that freq to see if anything is being transmitted.
For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
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 _Channel_Role {
/* This channel is not in use right now */
Channel_Role_DISABLED = 0,
/* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY */
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. */
Channel_Role_SECONDARY = 2
} Channel_Role;
/* Struct definitions */
@@ -37,7 +50,7 @@ typedef PB_BYTES_ARRAY_T(32) 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 _ChannelSettings {
typedef struct _ChannelSettings {
/* Deprecated in favor of LoraConfig.channel_num */
uint32_t channel_num;
/* A simple pre-shared key for now for crypto.
@@ -79,7 +92,7 @@ typedef struct _ChannelSettings {
} ChannelSettings;
/* A pair of a channel number, mode and the (sharable) settings for that channel */
typedef struct _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. */
@@ -92,15 +105,18 @@ typedef struct _Channel {
} Channel;
#ifdef __cplusplus
extern "C" {
#endif
/* Helper constants for enums */
#define _Channel_Role_MIN Channel_Role_DISABLED
#define _Channel_Role_MAX Channel_Role_SECONDARY
#define _Channel_Role_ARRAYSIZE ((Channel_Role)(Channel_Role_SECONDARY+1))
#ifdef __cplusplus
extern "C" {
#endif
#define Channel_role_ENUMTYPE Channel_Role
/* Initializer values for message structs */
#define ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0}