mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-28 20:52:02 +00:00
Merge branch 'master' into NextHopRouter
This commit is contained in:
@@ -30,7 +30,11 @@ typedef enum _meshtastic_AdminMessage_ConfigType {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_LORA_CONFIG = 5,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6
|
||||
meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7,
|
||||
/* */
|
||||
meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8
|
||||
} meshtastic_AdminMessage_ConfigType;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
@@ -85,6 +89,7 @@ typedef struct _meshtastic_NodeRemoteHardwarePinsResponse {
|
||||
meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[16];
|
||||
} meshtastic_NodeRemoteHardwarePinsResponse;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(8) meshtastic_AdminMessage_session_passkey_t;
|
||||
/* 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) */
|
||||
@@ -163,11 +168,16 @@ typedef struct _meshtastic_AdminMessage {
|
||||
meshtastic_Position set_fixed_position;
|
||||
/* Clear fixed position coordinates and then set position.fixed_position = false */
|
||||
bool remove_fixed_position;
|
||||
/* Set time only on the node
|
||||
Convenience method to set the time on the node (as Net quality) without any other position data */
|
||||
uint32_t set_time_only;
|
||||
/* 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;
|
||||
/* Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared. */
|
||||
int32_t factory_reset_device;
|
||||
/* 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;
|
||||
@@ -178,11 +188,15 @@ typedef struct _meshtastic_AdminMessage {
|
||||
int32_t reboot_seconds;
|
||||
/* Tell the node to shutdown in this many seconds (or <0 to cancel shutdown) */
|
||||
int32_t shutdown_seconds;
|
||||
/* Tell the node to factory reset, all device settings will be returned to factory defaults. */
|
||||
int32_t factory_reset;
|
||||
/* Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved. */
|
||||
int32_t factory_reset_config;
|
||||
/* Tell the node to reset the nodedb. */
|
||||
int32_t nodedb_reset;
|
||||
};
|
||||
/* The node generates this key and sends it with any get_x_response packets.
|
||||
The client MUST include the same key with any set_x commands. Key expires after 300 seconds.
|
||||
Prevents replay attacks for admin messages. */
|
||||
meshtastic_AdminMessage_session_passkey_t session_passkey;
|
||||
} meshtastic_AdminMessage;
|
||||
|
||||
|
||||
@@ -192,8 +206,8 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG
|
||||
#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG
|
||||
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG+1))
|
||||
#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG
|
||||
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG+1))
|
||||
|
||||
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
||||
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG
|
||||
@@ -206,10 +220,10 @@ extern "C" {
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_AdminMessage_init_default {0, {0}}
|
||||
#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}}
|
||||
#define meshtastic_HamParameters_init_default {"", 0, 0, ""}
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_default {0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}}
|
||||
#define meshtastic_AdminMessage_init_zero {0, {0}}
|
||||
#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}}
|
||||
#define meshtastic_HamParameters_init_zero {"", 0, 0, ""}
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_init_zero {0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}}
|
||||
|
||||
@@ -252,14 +266,17 @@ extern "C" {
|
||||
#define meshtastic_AdminMessage_remove_favorite_node_tag 40
|
||||
#define meshtastic_AdminMessage_set_fixed_position_tag 41
|
||||
#define meshtastic_AdminMessage_remove_fixed_position_tag 42
|
||||
#define meshtastic_AdminMessage_set_time_only_tag 43
|
||||
#define meshtastic_AdminMessage_begin_edit_settings_tag 64
|
||||
#define meshtastic_AdminMessage_commit_edit_settings_tag 65
|
||||
#define meshtastic_AdminMessage_factory_reset_device_tag 94
|
||||
#define meshtastic_AdminMessage_reboot_ota_seconds_tag 95
|
||||
#define meshtastic_AdminMessage_exit_simulator_tag 96
|
||||
#define meshtastic_AdminMessage_reboot_seconds_tag 97
|
||||
#define meshtastic_AdminMessage_shutdown_seconds_tag 98
|
||||
#define meshtastic_AdminMessage_factory_reset_tag 99
|
||||
#define meshtastic_AdminMessage_factory_reset_config_tag 99
|
||||
#define meshtastic_AdminMessage_nodedb_reset_tag 100
|
||||
#define meshtastic_AdminMessage_session_passkey_tag 101
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_AdminMessage_FIELDLIST(X, a) \
|
||||
@@ -296,14 +313,17 @@ X(a, STATIC, ONEOF, UINT32, (payload_variant,set_favorite_node,set_favori
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_favorite_node,remove_favorite_node), 40) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_fixed_position,set_fixed_position), 41) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,remove_fixed_position,remove_fixed_position), 42) \
|
||||
X(a, STATIC, ONEOF, FIXED32, (payload_variant,set_time_only,set_time_only), 43) \
|
||||
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) \
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_device,factory_reset_device), 94) \
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,reboot_ota_seconds,reboot_ota_seconds), 95) \
|
||||
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) \
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset,factory_reset), 99) \
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100)
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,factory_reset_config,factory_reset_config), 99) \
|
||||
X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset), 100) \
|
||||
X(a, STATIC, SINGULAR, BYTES, session_passkey, 101)
|
||||
#define meshtastic_AdminMessage_CALLBACK NULL
|
||||
#define meshtastic_AdminMessage_DEFAULT NULL
|
||||
#define meshtastic_AdminMessage_payload_variant_get_channel_response_MSGTYPE meshtastic_Channel
|
||||
@@ -345,7 +365,7 @@ extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg;
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size
|
||||
#define meshtastic_AdminMessage_size 500
|
||||
#define meshtastic_AdminMessage_size 511
|
||||
#define meshtastic_HamParameters_size 31
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_size 496
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ extern const pb_msgdesc_t meshtastic_ChannelSet_msg;
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_APPONLY_PB_H_MAX_SIZE meshtastic_ChannelSet_size
|
||||
#define meshtastic_ChannelSet_size 674
|
||||
#define meshtastic_ChannelSet_size 676
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -33,6 +33,12 @@ PB_BIND(meshtastic_Config_LoRaConfig, meshtastic_Config_LoRaConfig, 2)
|
||||
PB_BIND(meshtastic_Config_BluetoothConfig, meshtastic_Config_BluetoothConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_SecurityConfig, meshtastic_Config_SecurityConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_SessionkeyConfig, meshtastic_Config_SessionkeyConfig, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ typedef enum _meshtastic_Config_DeviceConfig_Role {
|
||||
The wifi radio and the oled screen will be put to sleep.
|
||||
This mode may still potentially have higher power usage due to it's preference in message rebroadcasting on the mesh. */
|
||||
meshtastic_Config_DeviceConfig_Role_ROUTER = 2,
|
||||
/* Description: Combination of both ROUTER and CLIENT. Not for mobile devices. */
|
||||
meshtastic_Config_DeviceConfig_Role_ROUTER_CLIENT = 3,
|
||||
/* Description: Infrastructure node for extending network coverage by relaying messages with minimal overhead. Not visible in Nodes list.
|
||||
Technical Details: Mesh packets will simply be rebroadcasted over this node. Nodes configured with this role will not originate NodeInfo, Position, Telemetry
|
||||
@@ -249,7 +248,8 @@ typedef enum _meshtastic_Config_LoRaConfig_ModemPreset {
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST = 0,
|
||||
/* Long Range - Slow */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW = 1,
|
||||
/* Very Long Range - Slow */
|
||||
/* Very Long Range - Slow
|
||||
Deprecated in 2.5: Works only with txco and is unusably slow */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW = 2,
|
||||
/* Medium Range - Slow */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW = 3,
|
||||
@@ -260,7 +260,11 @@ typedef enum _meshtastic_Config_LoRaConfig_ModemPreset {
|
||||
/* Short Range - Fast */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST = 6,
|
||||
/* Long Range - Moderately Fast */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE = 7
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE = 7,
|
||||
/* Short Range - Turbo
|
||||
This is the fastest preset and the only one with 500kHz bandwidth.
|
||||
It is not legal to use in all regions due to this wider bandwidth. */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO = 8
|
||||
} meshtastic_Config_LoRaConfig_ModemPreset;
|
||||
|
||||
typedef enum _meshtastic_Config_BluetoothConfig_PairingMode {
|
||||
@@ -277,11 +281,9 @@ typedef enum _meshtastic_Config_BluetoothConfig_PairingMode {
|
||||
typedef struct _meshtastic_Config_DeviceConfig {
|
||||
/* Sets the role of node */
|
||||
meshtastic_Config_DeviceConfig_Role role;
|
||||
/* Disabling this will disable the SerialConsole by not initilizing the StreamAPI */
|
||||
/* Disabling this will disable the SerialConsole by not initilizing the StreamAPI
|
||||
Moved to SecurityConfig */
|
||||
bool serial_enabled;
|
||||
/* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||
Set this to true to leave the debug log outputting even when API is active. */
|
||||
bool debug_log_enabled;
|
||||
/* For boards without a hard wired button, this is the pin number that will be used
|
||||
Boards that have more than one button can swap the function with this one. defaults to BUTTON_PIN if defined. */
|
||||
uint32_t button_gpio;
|
||||
@@ -296,7 +298,8 @@ typedef struct _meshtastic_Config_DeviceConfig {
|
||||
/* Treat double tap interrupt on supported accelerometers as a button press if set to true */
|
||||
bool double_tap_as_button_press;
|
||||
/* If true, device is considered to be "managed" by a mesh administrator
|
||||
Clients should then limit available configuration and administrative options inside the user interface */
|
||||
Clients should then limit available configuration and administrative options inside the user interface
|
||||
Moved to SecurityConfig */
|
||||
bool is_managed;
|
||||
/* Disables the triple-press of user button to enable or disable GPS */
|
||||
bool disable_triple_click;
|
||||
@@ -372,6 +375,9 @@ typedef struct _meshtastic_Config_PowerConfig {
|
||||
uint32_t min_wake_secs;
|
||||
/* I2C address of INA_2XX to use for reading device battery voltage */
|
||||
uint8_t device_battery_ina_address;
|
||||
/* If non-zero, we want powermon log outputs. With the particular (bitfield) sources enabled.
|
||||
Note: we picked an ID of 32 so that lower more efficient IDs can be used for more frequently used options. */
|
||||
uint64_t powermon_enables;
|
||||
} meshtastic_Config_PowerConfig;
|
||||
|
||||
typedef struct _meshtastic_Config_NetworkConfig_IpV4Config {
|
||||
@@ -497,6 +503,8 @@ typedef struct _meshtastic_Config_LoRaConfig {
|
||||
float override_frequency;
|
||||
/* If the NeighborInfo Module is enabled, use its information for next hop-based routing */
|
||||
bool next_hop_routing;
|
||||
/* If true, disable the build-in PA FAN using pin define in RF95_FAN_EN. */
|
||||
bool pa_fan_disabled;
|
||||
/* For testing it is useful sometimes to force a node to never listen to
|
||||
particular other nodes (simulating radio out of range). All nodenums listed
|
||||
in ignore_incoming will have packets they send dropped on receive (by router.cpp) */
|
||||
@@ -515,6 +523,36 @@ typedef struct _meshtastic_Config_BluetoothConfig {
|
||||
uint32_t fixed_pin;
|
||||
} meshtastic_Config_BluetoothConfig;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_public_key_t;
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_private_key_t;
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_Config_SecurityConfig_admin_key_t;
|
||||
typedef struct _meshtastic_Config_SecurityConfig {
|
||||
/* The public key of the user's device.
|
||||
Sent out to other nodes on the mesh to allow them to compute a shared secret key. */
|
||||
meshtastic_Config_SecurityConfig_public_key_t public_key;
|
||||
/* The private key of the device.
|
||||
Used to create a shared key with a remote device. */
|
||||
meshtastic_Config_SecurityConfig_private_key_t private_key;
|
||||
/* The public key authorized to send admin messages to this node. */
|
||||
pb_size_t admin_key_count;
|
||||
meshtastic_Config_SecurityConfig_admin_key_t admin_key[1];
|
||||
/* If true, device is considered to be "managed" by a mesh administrator via admin messages
|
||||
Device is managed by a mesh administrator. */
|
||||
bool is_managed;
|
||||
/* Serial Console over the Stream API." */
|
||||
bool serial_enabled;
|
||||
/* By default we turn off logging as soon as an API client connects (to keep shared serial link quiet).
|
||||
Output live debug logging over serial or bluetooth is set to true. */
|
||||
bool debug_log_api_enabled;
|
||||
/* Allow incoming device control over the insecure legacy admin channel. */
|
||||
bool admin_channel_enabled;
|
||||
} meshtastic_Config_SecurityConfig;
|
||||
|
||||
/* Blank config request, strictly for getting the session key */
|
||||
typedef struct _meshtastic_Config_SessionkeyConfig {
|
||||
char dummy_field;
|
||||
} meshtastic_Config_SessionkeyConfig;
|
||||
|
||||
typedef struct _meshtastic_Config {
|
||||
pb_size_t which_payload_variant;
|
||||
union {
|
||||
@@ -525,6 +563,8 @@ typedef struct _meshtastic_Config {
|
||||
meshtastic_Config_DisplayConfig display;
|
||||
meshtastic_Config_LoRaConfig lora;
|
||||
meshtastic_Config_BluetoothConfig bluetooth;
|
||||
meshtastic_Config_SecurityConfig security;
|
||||
meshtastic_Config_SessionkeyConfig sessionkey;
|
||||
} payload_variant;
|
||||
} meshtastic_Config;
|
||||
|
||||
@@ -579,8 +619,8 @@ extern "C" {
|
||||
#define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_SG_923+1))
|
||||
|
||||
#define _meshtastic_Config_LoRaConfig_ModemPreset_MIN meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST
|
||||
#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE
|
||||
#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE+1))
|
||||
#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO
|
||||
#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO+1))
|
||||
|
||||
#define _meshtastic_Config_BluetoothConfig_PairingMode_MIN meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN
|
||||
#define _meshtastic_Config_BluetoothConfig_PairingMode_MAX meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN
|
||||
@@ -608,30 +648,35 @@ extern "C" {
|
||||
#define meshtastic_Config_BluetoothConfig_mode_ENUMTYPE meshtastic_Config_BluetoothConfig_PairingMode
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_Config_init_default {0, {meshtastic_Config_DeviceConfig_init_default}}
|
||||
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_DeviceConfig_init_default {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_PositionConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||
#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_PowerConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_default {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_default, ""}
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_Config_DisplayConfig_init_default {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
||||
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||
#define meshtastic_Config_LoRaConfig_init_default {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||
#define meshtastic_Config_BluetoothConfig_init_default {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}
|
||||
#define meshtastic_Config_SecurityConfig_init_default {{0, {0}}, {0, {0}}, 0, {{0, {0}}}, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_SessionkeyConfig_init_default {0}
|
||||
#define meshtastic_Config_init_zero {0, {meshtastic_Config_DeviceConfig_init_zero}}
|
||||
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_DeviceConfig_init_zero {_meshtastic_Config_DeviceConfig_Role_MIN, 0, 0, 0, _meshtastic_Config_DeviceConfig_RebroadcastMode_MIN, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_Config_PositionConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _meshtastic_Config_PositionConfig_GpsMode_MIN}
|
||||
#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_PowerConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_NetworkConfig_init_zero {0, "", "", "", 0, _meshtastic_Config_NetworkConfig_AddressMode_MIN, false, meshtastic_Config_NetworkConfig_IpV4Config_init_zero, ""}
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_Config_DisplayConfig_init_zero {0, _meshtastic_Config_DisplayConfig_GpsCoordinateFormat_MIN, 0, 0, 0, _meshtastic_Config_DisplayConfig_DisplayUnits_MIN, _meshtastic_Config_DisplayConfig_OledType_MIN, _meshtastic_Config_DisplayConfig_DisplayMode_MIN, 0, 0, _meshtastic_Config_DisplayConfig_CompassOrientation_MIN}
|
||||
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||
#define meshtastic_Config_LoRaConfig_init_zero {0, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, _meshtastic_Config_LoRaConfig_RegionCode_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, 0}
|
||||
#define meshtastic_Config_BluetoothConfig_init_zero {0, _meshtastic_Config_BluetoothConfig_PairingMode_MIN, 0}
|
||||
#define meshtastic_Config_SecurityConfig_init_zero {{0, {0}}, {0, {0}}, 0, {{0, {0}}}, 0, 0, 0, 0}
|
||||
#define meshtastic_Config_SessionkeyConfig_init_zero {0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_Config_DeviceConfig_role_tag 1
|
||||
#define meshtastic_Config_DeviceConfig_serial_enabled_tag 2
|
||||
#define meshtastic_Config_DeviceConfig_debug_log_enabled_tag 3
|
||||
#define meshtastic_Config_DeviceConfig_button_gpio_tag 4
|
||||
#define meshtastic_Config_DeviceConfig_buzzer_gpio_tag 5
|
||||
#define meshtastic_Config_DeviceConfig_rebroadcast_mode_tag 6
|
||||
@@ -662,6 +707,7 @@ extern "C" {
|
||||
#define meshtastic_Config_PowerConfig_ls_secs_tag 7
|
||||
#define meshtastic_Config_PowerConfig_min_wake_secs_tag 8
|
||||
#define meshtastic_Config_PowerConfig_device_battery_ina_address_tag 9
|
||||
#define meshtastic_Config_PowerConfig_powermon_enables_tag 32
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_ip_tag 1
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_gateway_tag 2
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_subnet_tag 3
|
||||
@@ -700,11 +746,19 @@ extern "C" {
|
||||
#define meshtastic_Config_LoRaConfig_sx126x_rx_boosted_gain_tag 13
|
||||
#define meshtastic_Config_LoRaConfig_override_frequency_tag 14
|
||||
#define meshtastic_Config_LoRaConfig_next_hop_routing_tag 15
|
||||
#define meshtastic_Config_LoRaConfig_pa_fan_disabled_tag 16
|
||||
#define meshtastic_Config_LoRaConfig_ignore_incoming_tag 103
|
||||
#define meshtastic_Config_LoRaConfig_ignore_mqtt_tag 104
|
||||
#define meshtastic_Config_BluetoothConfig_enabled_tag 1
|
||||
#define meshtastic_Config_BluetoothConfig_mode_tag 2
|
||||
#define meshtastic_Config_BluetoothConfig_fixed_pin_tag 3
|
||||
#define meshtastic_Config_SecurityConfig_public_key_tag 1
|
||||
#define meshtastic_Config_SecurityConfig_private_key_tag 2
|
||||
#define meshtastic_Config_SecurityConfig_admin_key_tag 3
|
||||
#define meshtastic_Config_SecurityConfig_is_managed_tag 4
|
||||
#define meshtastic_Config_SecurityConfig_serial_enabled_tag 5
|
||||
#define meshtastic_Config_SecurityConfig_debug_log_api_enabled_tag 6
|
||||
#define meshtastic_Config_SecurityConfig_admin_channel_enabled_tag 8
|
||||
#define meshtastic_Config_device_tag 1
|
||||
#define meshtastic_Config_position_tag 2
|
||||
#define meshtastic_Config_power_tag 3
|
||||
@@ -712,6 +766,8 @@ extern "C" {
|
||||
#define meshtastic_Config_display_tag 5
|
||||
#define meshtastic_Config_lora_tag 6
|
||||
#define meshtastic_Config_bluetooth_tag 7
|
||||
#define meshtastic_Config_security_tag 8
|
||||
#define meshtastic_Config_sessionkey_tag 9
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_Config_FIELDLIST(X, a) \
|
||||
@@ -721,7 +777,9 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,power,payload_variant.power)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,network,payload_variant.network), 4) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,display,payload_variant.display), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,lora,payload_variant.lora), 6) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bluetooth), 7) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,security,payload_variant.security), 8) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,sessionkey,payload_variant.sessionkey), 9)
|
||||
#define meshtastic_Config_CALLBACK NULL
|
||||
#define meshtastic_Config_DEFAULT NULL
|
||||
#define meshtastic_Config_payload_variant_device_MSGTYPE meshtastic_Config_DeviceConfig
|
||||
@@ -731,11 +789,12 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,bluetooth,payload_variant.bl
|
||||
#define meshtastic_Config_payload_variant_display_MSGTYPE meshtastic_Config_DisplayConfig
|
||||
#define meshtastic_Config_payload_variant_lora_MSGTYPE meshtastic_Config_LoRaConfig
|
||||
#define meshtastic_Config_payload_variant_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig
|
||||
#define meshtastic_Config_payload_variant_security_MSGTYPE meshtastic_Config_SecurityConfig
|
||||
#define meshtastic_Config_payload_variant_sessionkey_MSGTYPE meshtastic_Config_SessionkeyConfig
|
||||
|
||||
#define meshtastic_Config_DeviceConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, serial_enabled, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, debug_log_enabled, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, button_gpio, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, buzzer_gpio, 5) \
|
||||
X(a, STATIC, SINGULAR, UENUM, rebroadcast_mode, 6) \
|
||||
@@ -773,7 +832,8 @@ X(a, STATIC, SINGULAR, UINT32, wait_bluetooth_secs, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, sds_secs, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ls_secs, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, min_wake_secs, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, device_battery_ina_address, 9)
|
||||
X(a, STATIC, SINGULAR, UINT32, device_battery_ina_address, 9) \
|
||||
X(a, STATIC, SINGULAR, UINT64, powermon_enables, 32)
|
||||
#define meshtastic_Config_PowerConfig_CALLBACK NULL
|
||||
#define meshtastic_Config_PowerConfig_DEFAULT NULL
|
||||
|
||||
@@ -829,6 +889,7 @@ X(a, STATIC, SINGULAR, BOOL, override_duty_cycle, 12) \
|
||||
X(a, STATIC, SINGULAR, BOOL, sx126x_rx_boosted_gain, 13) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, override_frequency, 14) \
|
||||
X(a, STATIC, SINGULAR, BOOL, next_hop_routing, 15) \
|
||||
X(a, STATIC, SINGULAR, BOOL, pa_fan_disabled, 16) \
|
||||
X(a, STATIC, REPEATED, UINT32, ignore_incoming, 103) \
|
||||
X(a, STATIC, SINGULAR, BOOL, ignore_mqtt, 104)
|
||||
#define meshtastic_Config_LoRaConfig_CALLBACK NULL
|
||||
@@ -841,6 +902,22 @@ X(a, STATIC, SINGULAR, UINT32, fixed_pin, 3)
|
||||
#define meshtastic_Config_BluetoothConfig_CALLBACK NULL
|
||||
#define meshtastic_Config_BluetoothConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Config_SecurityConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BYTES, public_key, 1) \
|
||||
X(a, STATIC, SINGULAR, BYTES, private_key, 2) \
|
||||
X(a, STATIC, REPEATED, BYTES, admin_key, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_managed, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, serial_enabled, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, debug_log_api_enabled, 6) \
|
||||
X(a, STATIC, SINGULAR, BOOL, admin_channel_enabled, 8)
|
||||
#define meshtastic_Config_SecurityConfig_CALLBACK NULL
|
||||
#define meshtastic_Config_SecurityConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Config_SessionkeyConfig_FIELDLIST(X, a) \
|
||||
|
||||
#define meshtastic_Config_SessionkeyConfig_CALLBACK NULL
|
||||
#define meshtastic_Config_SessionkeyConfig_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_Config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_DeviceConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_PositionConfig_msg;
|
||||
@@ -850,6 +927,8 @@ extern const pb_msgdesc_t meshtastic_Config_NetworkConfig_IpV4Config_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_DisplayConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_LoRaConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_SecurityConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Config_SessionkeyConfig_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_Config_fields &meshtastic_Config_msg
|
||||
@@ -861,18 +940,21 @@ extern const pb_msgdesc_t meshtastic_Config_BluetoothConfig_msg;
|
||||
#define meshtastic_Config_DisplayConfig_fields &meshtastic_Config_DisplayConfig_msg
|
||||
#define meshtastic_Config_LoRaConfig_fields &meshtastic_Config_LoRaConfig_msg
|
||||
#define meshtastic_Config_BluetoothConfig_fields &meshtastic_Config_BluetoothConfig_msg
|
||||
#define meshtastic_Config_SecurityConfig_fields &meshtastic_Config_SecurityConfig_msg
|
||||
#define meshtastic_Config_SessionkeyConfig_fields &meshtastic_Config_SessionkeyConfig_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_CONFIG_PB_H_MAX_SIZE meshtastic_Config_size
|
||||
#define meshtastic_Config_BluetoothConfig_size 10
|
||||
#define meshtastic_Config_DeviceConfig_size 100
|
||||
#define meshtastic_Config_DeviceConfig_size 98
|
||||
#define meshtastic_Config_DisplayConfig_size 30
|
||||
#define meshtastic_Config_LoRaConfig_size 82
|
||||
#define meshtastic_Config_LoRaConfig_size 80
|
||||
#define meshtastic_Config_LoRaConfig_size 84
|
||||
#define meshtastic_Config_NetworkConfig_IpV4Config_size 20
|
||||
#define meshtastic_Config_NetworkConfig_size 196
|
||||
#define meshtastic_Config_PositionConfig_size 62
|
||||
#define meshtastic_Config_PowerConfig_size 40
|
||||
#define meshtastic_Config_PowerConfig_size 52
|
||||
#define meshtastic_Config_SecurityConfig_size 111
|
||||
#define meshtastic_Config_SessionkeyConfig_size 0
|
||||
#define meshtastic_Config_size 199
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
PB_BIND(meshtastic_PositionLite, meshtastic_PositionLite, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_UserLite, meshtastic_UserLite, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeInfoLite, meshtastic_NodeInfoLite, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#include "meshtastic/localonly.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
#include "meshtastic/module_config.pb.h"
|
||||
#include "meshtastic/telemetry.pb.h"
|
||||
#include "meshtastic/config.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
@@ -46,12 +46,37 @@ typedef struct _meshtastic_PositionLite {
|
||||
meshtastic_Position_LocSource location_source;
|
||||
} meshtastic_PositionLite;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_UserLite_public_key_t;
|
||||
typedef struct _meshtastic_UserLite {
|
||||
/* This is the addr of the radio. */
|
||||
pb_byte_t macaddr[6];
|
||||
/* A full name for this user, i.e. "Kevin Hester" */
|
||||
char long_name[40];
|
||||
/* A VERY short name, ideally two characters.
|
||||
Suitable for a tiny OLED screen */
|
||||
char short_name[5];
|
||||
/* TBEAM, HELTEC, etc...
|
||||
Starting in 1.2.11 moved to hw_model enum in the NodeInfo object.
|
||||
Apps will still need the string here for older builds
|
||||
(so OTA update can find the right image), but if the enum is available it will be used instead. */
|
||||
meshtastic_HardwareModel hw_model;
|
||||
/* In some regions Ham radio operators have different bandwidth limitations than others.
|
||||
If this user is a licensed operator, set this flag.
|
||||
Also, "long_name" should be their licence number. */
|
||||
bool is_licensed;
|
||||
/* Indicates that the user's role in the mesh */
|
||||
meshtastic_Config_DeviceConfig_Role role;
|
||||
/* The public key of the user's device.
|
||||
This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */
|
||||
meshtastic_UserLite_public_key_t public_key;
|
||||
} meshtastic_UserLite;
|
||||
|
||||
typedef struct _meshtastic_NodeInfoLite {
|
||||
/* The node number */
|
||||
uint32_t num;
|
||||
/* The user info for this node */
|
||||
bool has_user;
|
||||
meshtastic_User user;
|
||||
meshtastic_UserLite user;
|
||||
/* This position data. Note: before 1.2.14 we would also store the last time we've heard from this node in position.time, that is no longer true.
|
||||
Position.time now indicates the last time we received a POSITION from that node. */
|
||||
bool has_position;
|
||||
@@ -167,6 +192,9 @@ extern "C" {
|
||||
|
||||
#define meshtastic_PositionLite_location_source_ENUMTYPE meshtastic_Position_LocSource
|
||||
|
||||
#define meshtastic_UserLite_hw_model_ENUMTYPE meshtastic_HardwareModel
|
||||
#define meshtastic_UserLite_role_ENUMTYPE meshtastic_Config_DeviceConfig_Role
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -175,12 +203,14 @@ extern "C" {
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||
#define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_User_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_NodeInfoLite_init_default {0, false, meshtastic_UserLite_init_default, false, meshtastic_PositionLite_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 0, 0}
|
||||
#define meshtastic_DeviceState_init_default {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 0, false, meshtastic_MeshPacket_init_default, 0, {meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default, meshtastic_NodeRemoteHardwarePin_init_default}, {0}}
|
||||
#define meshtastic_ChannelFile_init_default {0, {meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default, meshtastic_Channel_init_default}, 0}
|
||||
#define meshtastic_OEMStore_init_default {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default}
|
||||
#define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||
#define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_NodeInfoLite_init_zero {0, false, meshtastic_UserLite_init_zero, false, meshtastic_PositionLite_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 0, 0}
|
||||
#define meshtastic_DeviceState_init_zero {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 0, false, meshtastic_MeshPacket_init_zero, 0, {meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero, meshtastic_NodeRemoteHardwarePin_init_zero}, {0}}
|
||||
#define meshtastic_ChannelFile_init_zero {0, {meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero, meshtastic_Channel_init_zero}, 0}
|
||||
#define meshtastic_OEMStore_init_zero {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero}
|
||||
@@ -191,6 +221,13 @@ extern "C" {
|
||||
#define meshtastic_PositionLite_altitude_tag 3
|
||||
#define meshtastic_PositionLite_time_tag 4
|
||||
#define meshtastic_PositionLite_location_source_tag 5
|
||||
#define meshtastic_UserLite_macaddr_tag 1
|
||||
#define meshtastic_UserLite_long_name_tag 2
|
||||
#define meshtastic_UserLite_short_name_tag 3
|
||||
#define meshtastic_UserLite_hw_model_tag 4
|
||||
#define meshtastic_UserLite_is_licensed_tag 5
|
||||
#define meshtastic_UserLite_role_tag 6
|
||||
#define meshtastic_UserLite_public_key_tag 7
|
||||
#define meshtastic_NodeInfoLite_num_tag 1
|
||||
#define meshtastic_NodeInfoLite_user_tag 2
|
||||
#define meshtastic_NodeInfoLite_position_tag 3
|
||||
@@ -233,6 +270,17 @@ X(a, STATIC, SINGULAR, UENUM, location_source, 5)
|
||||
#define meshtastic_PositionLite_CALLBACK NULL
|
||||
#define meshtastic_PositionLite_DEFAULT NULL
|
||||
|
||||
#define meshtastic_UserLite_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, macaddr, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, long_name, 2) \
|
||||
X(a, STATIC, SINGULAR, STRING, short_name, 3) \
|
||||
X(a, STATIC, SINGULAR, UENUM, hw_model, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_licensed, 5) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 6) \
|
||||
X(a, STATIC, SINGULAR, BYTES, public_key, 7)
|
||||
#define meshtastic_UserLite_CALLBACK NULL
|
||||
#define meshtastic_UserLite_DEFAULT NULL
|
||||
|
||||
#define meshtastic_NodeInfoLite_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \
|
||||
@@ -247,7 +295,7 @@ X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) \
|
||||
X(a, STATIC, SINGULAR, UINT32, next_hop, 11)
|
||||
#define meshtastic_NodeInfoLite_CALLBACK NULL
|
||||
#define meshtastic_NodeInfoLite_DEFAULT NULL
|
||||
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_User
|
||||
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite
|
||||
#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite
|
||||
#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics
|
||||
|
||||
@@ -295,6 +343,7 @@ X(a, STATIC, OPTIONAL, MESSAGE, oem_local_module_config, 8)
|
||||
#define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_PositionLite_msg;
|
||||
extern const pb_msgdesc_t meshtastic_UserLite_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NodeInfoLite_msg;
|
||||
extern const pb_msgdesc_t meshtastic_DeviceState_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ChannelFile_msg;
|
||||
@@ -302,6 +351,7 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_PositionLite_fields &meshtastic_PositionLite_msg
|
||||
#define meshtastic_UserLite_fields &meshtastic_UserLite_msg
|
||||
#define meshtastic_NodeInfoLite_fields &meshtastic_NodeInfoLite_msg
|
||||
#define meshtastic_DeviceState_fields &meshtastic_DeviceState_msg
|
||||
#define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg
|
||||
@@ -312,10 +362,10 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg;
|
||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_OEMStore_size
|
||||
|
||||
#define meshtastic_ChannelFile_size 718
|
||||
#define meshtastic_NodeInfoLite_size 166
|
||||
|
||||
#define meshtastic_OEMStore_size 3370
|
||||
#define meshtastic_NodeInfoLite_size 183
|
||||
#define meshtastic_OEMStore_size 3497
|
||||
#define meshtastic_PositionLite_size 28
|
||||
#define meshtastic_UserLite_size 96
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -38,6 +38,9 @@ typedef struct _meshtastic_LocalConfig {
|
||||
incompatible changes This integer is set at build time and is private to
|
||||
NodeDB.cpp in the device code. */
|
||||
uint32_t version;
|
||||
/* The part of the config that is specific to Security settings */
|
||||
bool has_security;
|
||||
meshtastic_Config_SecurityConfig security;
|
||||
} meshtastic_LocalConfig;
|
||||
|
||||
typedef struct _meshtastic_LocalModuleConfig {
|
||||
@@ -92,9 +95,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_LocalConfig_init_default {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0}
|
||||
#define meshtastic_LocalConfig_init_default {false, meshtastic_Config_DeviceConfig_init_default, false, meshtastic_Config_PositionConfig_init_default, false, meshtastic_Config_PowerConfig_init_default, false, meshtastic_Config_NetworkConfig_init_default, false, meshtastic_Config_DisplayConfig_init_default, false, meshtastic_Config_LoRaConfig_init_default, false, meshtastic_Config_BluetoothConfig_init_default, 0, false, meshtastic_Config_SecurityConfig_init_default}
|
||||
#define meshtastic_LocalModuleConfig_init_default {false, meshtastic_ModuleConfig_MQTTConfig_init_default, false, meshtastic_ModuleConfig_SerialConfig_init_default, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_default, false, meshtastic_ModuleConfig_StoreForwardConfig_init_default, false, meshtastic_ModuleConfig_RangeTestConfig_init_default, false, meshtastic_ModuleConfig_TelemetryConfig_init_default, false, meshtastic_ModuleConfig_CannedMessageConfig_init_default, 0, false, meshtastic_ModuleConfig_AudioConfig_init_default, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_default, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_default, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_default, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_default, false, meshtastic_ModuleConfig_PaxcounterConfig_init_default}
|
||||
#define meshtastic_LocalConfig_init_zero {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0}
|
||||
#define meshtastic_LocalConfig_init_zero {false, meshtastic_Config_DeviceConfig_init_zero, false, meshtastic_Config_PositionConfig_init_zero, false, meshtastic_Config_PowerConfig_init_zero, false, meshtastic_Config_NetworkConfig_init_zero, false, meshtastic_Config_DisplayConfig_init_zero, false, meshtastic_Config_LoRaConfig_init_zero, false, meshtastic_Config_BluetoothConfig_init_zero, 0, false, meshtastic_Config_SecurityConfig_init_zero}
|
||||
#define meshtastic_LocalModuleConfig_init_zero {false, meshtastic_ModuleConfig_MQTTConfig_init_zero, false, meshtastic_ModuleConfig_SerialConfig_init_zero, false, meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero, false, meshtastic_ModuleConfig_StoreForwardConfig_init_zero, false, meshtastic_ModuleConfig_RangeTestConfig_init_zero, false, meshtastic_ModuleConfig_TelemetryConfig_init_zero, false, meshtastic_ModuleConfig_CannedMessageConfig_init_zero, 0, false, meshtastic_ModuleConfig_AudioConfig_init_zero, false, meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero, false, meshtastic_ModuleConfig_NeighborInfoConfig_init_zero, false, meshtastic_ModuleConfig_AmbientLightingConfig_init_zero, false, meshtastic_ModuleConfig_DetectionSensorConfig_init_zero, false, meshtastic_ModuleConfig_PaxcounterConfig_init_zero}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
@@ -106,6 +109,7 @@ extern "C" {
|
||||
#define meshtastic_LocalConfig_lora_tag 6
|
||||
#define meshtastic_LocalConfig_bluetooth_tag 7
|
||||
#define meshtastic_LocalConfig_version_tag 8
|
||||
#define meshtastic_LocalConfig_security_tag 9
|
||||
#define meshtastic_LocalModuleConfig_mqtt_tag 1
|
||||
#define meshtastic_LocalModuleConfig_serial_tag 2
|
||||
#define meshtastic_LocalModuleConfig_external_notification_tag 3
|
||||
@@ -130,7 +134,8 @@ X(a, STATIC, OPTIONAL, MESSAGE, network, 4) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, display, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, lora, 6) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, bluetooth, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 8)
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 8) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, security, 9)
|
||||
#define meshtastic_LocalConfig_CALLBACK NULL
|
||||
#define meshtastic_LocalConfig_DEFAULT NULL
|
||||
#define meshtastic_LocalConfig_device_MSGTYPE meshtastic_Config_DeviceConfig
|
||||
@@ -140,6 +145,7 @@ X(a, STATIC, SINGULAR, UINT32, version, 8)
|
||||
#define meshtastic_LocalConfig_display_MSGTYPE meshtastic_Config_DisplayConfig
|
||||
#define meshtastic_LocalConfig_lora_MSGTYPE meshtastic_Config_LoRaConfig
|
||||
#define meshtastic_LocalConfig_bluetooth_MSGTYPE meshtastic_Config_BluetoothConfig
|
||||
#define meshtastic_LocalConfig_security_MSGTYPE meshtastic_Config_SecurityConfig
|
||||
|
||||
#define meshtastic_LocalModuleConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, mqtt, 1) \
|
||||
@@ -181,8 +187,8 @@ extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalModuleConfig_size
|
||||
#define meshtastic_LocalConfig_size 539
|
||||
#define meshtastic_LocalModuleConfig_size 685
|
||||
#define meshtastic_LocalConfig_size 664
|
||||
#define meshtastic_LocalModuleConfig_size 687
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -30,13 +30,13 @@ PB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2)
|
||||
PB_BIND(meshtastic_MeshPacket, meshtastic_MeshPacket, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, AUTO)
|
||||
PB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_MyNodeInfo, meshtastic_MyNodeInfo, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, AUTO)
|
||||
PB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO)
|
||||
@@ -45,6 +45,12 @@ PB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO)
|
||||
PB_BIND(meshtastic_FromRadio, meshtastic_FromRadio, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ToRadio, meshtastic_ToRadio, 2)
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ typedef enum _meshtastic_HardwareModel {
|
||||
meshtastic_HardwareModel_WIO_WM1110 = 21,
|
||||
/* RAK2560 Solar base station based on RAK4630 */
|
||||
meshtastic_HardwareModel_RAK2560 = 22,
|
||||
/* Heltec HRU-3601: https://heltec.org/project/hru-3601/ */
|
||||
meshtastic_HardwareModel_HELTEC_HRU_3601 = 23,
|
||||
/* B&Q Consulting Station Edition G1: https://uniteng.com/wiki/doku.php?id=meshtastic:station */
|
||||
meshtastic_HardwareModel_STATION_G1 = 25,
|
||||
/* RAK11310 (RP2040 + SX1262) */
|
||||
@@ -165,6 +167,38 @@ typedef enum _meshtastic_HardwareModel {
|
||||
meshtastic_HardwareModel_RADIOMASTER_900_BANDIT_NANO = 64,
|
||||
/* Heltec Capsule Sensor V3 with ESP32-S3 CPU, Portable LoRa device that can replace GNSS modules or sensors */
|
||||
meshtastic_HardwareModel_HELTEC_CAPSULE_SENSOR_V3 = 65,
|
||||
/* Heltec Vision Master T190 with ESP32-S3 CPU, and a 1.90 inch TFT display */
|
||||
meshtastic_HardwareModel_HELTEC_VISION_MASTER_T190 = 66,
|
||||
/* Heltec Vision Master E213 with ESP32-S3 CPU, and a 2.13 inch E-Ink display */
|
||||
meshtastic_HardwareModel_HELTEC_VISION_MASTER_E213 = 67,
|
||||
/* Heltec Vision Master E290 with ESP32-S3 CPU, and a 2.9 inch E-Ink display */
|
||||
meshtastic_HardwareModel_HELTEC_VISION_MASTER_E290 = 68,
|
||||
/* Heltec Mesh Node T114 board with nRF52840 CPU, and a 1.14 inch TFT display, Ultimate low-power design,
|
||||
specifically adapted for the Meshtatic project */
|
||||
meshtastic_HardwareModel_HELTEC_MESH_NODE_T114 = 69,
|
||||
/* Sensecap Indicator from Seeed Studio. ESP32-S3 device with TFT and RP2040 coprocessor */
|
||||
meshtastic_HardwareModel_SENSECAP_INDICATOR = 70,
|
||||
/* Seeed studio T1000-E tracker card. NRF52840 w/ LR1110 radio, GPS, button, buzzer, and sensors. */
|
||||
meshtastic_HardwareModel_TRACKER_T1000_E = 71,
|
||||
/* RAK3172 STM32WLE5 Module (https://store.rakwireless.com/products/wisduo-lpwan-module-rak3172) */
|
||||
meshtastic_HardwareModel_RAK3172 = 72,
|
||||
/* Seeed Studio Wio-E5 (either mini or Dev kit) using STM32WL chip. */
|
||||
meshtastic_HardwareModel_WIO_E5 = 73,
|
||||
/* RadioMaster 900 Bandit, https://www.radiomasterrc.com/products/bandit-expresslrs-rf-module
|
||||
SSD1306 OLED and No GPS */
|
||||
meshtastic_HardwareModel_RADIOMASTER_900_BANDIT = 74,
|
||||
/* Minewsemi ME25LS01 (ME25LE01_V1.0). NRF52840 w/ LR1110 radio, buttons and leds and pins. */
|
||||
meshtastic_HardwareModel_ME25LS01_4Y10TD = 75,
|
||||
/* RP2040_FEATHER_RFM95
|
||||
Adafruit Feather RP2040 with RFM95 LoRa Radio RFM95 with SX1272, SSD1306 OLED
|
||||
https://www.adafruit.com/product/5714
|
||||
https://www.adafruit.com/product/326
|
||||
https://www.adafruit.com/product/938
|
||||
^^^ short A0 to switch to I2C address 0x3C */
|
||||
meshtastic_HardwareModel_RP2040_FEATHER_RFM95 = 76,
|
||||
/* M5 esp32 based MCU modules with enclosure, TFT and LORA Shields. All Variants (Basic, Core, Fire, Core2, Paper) https://m5stack.com/ */
|
||||
meshtastic_HardwareModel_M5STACK_COREBASIC = 77,
|
||||
meshtastic_HardwareModel_M5STACK_CORE2 = 78,
|
||||
/* ------------------------------------------------------------------------------------------------------------------------------------------
|
||||
Reserved ID For developing private Ports. These will show up in live traffic sparsely, so we can use a high number. Keep it within 8 bits.
|
||||
------------------------------------------------------------------------------------------------------------------------------------------ */
|
||||
@@ -213,7 +247,14 @@ typedef enum _meshtastic_CriticalErrorCode {
|
||||
meshtastic_CriticalErrorCode_SX1262_FAILURE = 10,
|
||||
/* A (likely software but possibly hardware) failure was detected while trying to send packets.
|
||||
If this occurs on your board, please post in the forum so that we can ask you to collect some information to allow fixing this bug */
|
||||
meshtastic_CriticalErrorCode_RADIO_SPI_BUG = 11
|
||||
meshtastic_CriticalErrorCode_RADIO_SPI_BUG = 11,
|
||||
/* Corruption was detected on the flash filesystem but we were able to repair things.
|
||||
If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. */
|
||||
meshtastic_CriticalErrorCode_FLASH_CORRUPTION_RECOVERABLE = 12,
|
||||
/* Corruption was detected on the flash filesystem but we were unable to repair things.
|
||||
NOTE: Your node will probably need to be reconfigured the next time it reboots (it will lose the region code etc...)
|
||||
If you see this failure in the field please post in the forum because we are interested in seeing if this is occurring in the field. */
|
||||
meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE = 13
|
||||
} meshtastic_CriticalErrorCode;
|
||||
|
||||
/* How the location was acquired: manual, onboard GPS, external (EUD) GPS */
|
||||
@@ -271,7 +312,11 @@ typedef enum _meshtastic_Routing_Error {
|
||||
meshtastic_Routing_Error_BAD_REQUEST = 32,
|
||||
/* The application layer service on the remote node received your request, but considered your request not authorized
|
||||
(i.e you did not send the request on the required bound channel) */
|
||||
meshtastic_Routing_Error_NOT_AUTHORIZED = 33
|
||||
meshtastic_Routing_Error_NOT_AUTHORIZED = 33,
|
||||
/* The client specified a PKI transport, but the node was unable to send the packet using PKI (and did not send the message at all) */
|
||||
meshtastic_Routing_Error_PKI_FAILED = 34,
|
||||
/* The receiving node does not have a Public Key to decode with */
|
||||
meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY = 35
|
||||
} meshtastic_Routing_Error;
|
||||
|
||||
/* The priority of this message for sending.
|
||||
@@ -305,6 +350,11 @@ typedef enum _meshtastic_MeshPacket_Priority {
|
||||
/* If priority is unset but the message is marked as want_ack,
|
||||
assume it is important and use a slightly higher priority */
|
||||
meshtastic_MeshPacket_Priority_RELIABLE = 70,
|
||||
/* If priority is unset but the packet is a response to a request, we want it to get there relatively quickly.
|
||||
Furthermore, responses stop relaying packets directed to a node early. */
|
||||
meshtastic_MeshPacket_Priority_RESPONSE = 80,
|
||||
/* Higher priority for specific message types (portnums) to distinguish between other reliable packets. */
|
||||
meshtastic_MeshPacket_Priority_HIGH = 100,
|
||||
/* Ack/naks are sent with very high priority to ensure that retransmission
|
||||
stops as soon as possible */
|
||||
meshtastic_MeshPacket_Priority_ACK = 120,
|
||||
@@ -345,10 +395,13 @@ typedef enum _meshtastic_LogRecord_Level {
|
||||
typedef struct _meshtastic_Position {
|
||||
/* The new preferred location encoding, multiply by 1e-7 to get degrees
|
||||
in floating point */
|
||||
bool has_latitude_i;
|
||||
int32_t latitude_i;
|
||||
/* TODO: REPLACE */
|
||||
bool has_longitude_i;
|
||||
int32_t longitude_i;
|
||||
/* In meters above MSL (but see issue #359) */
|
||||
bool has_altitude;
|
||||
int32_t altitude;
|
||||
/* This is usually not sent over the mesh (to save space), but it is sent
|
||||
from the phone so that the local device can set its time if it is sent over
|
||||
@@ -364,8 +417,10 @@ typedef struct _meshtastic_Position {
|
||||
/* Pos. timestamp milliseconds adjustment (rarely available or required) */
|
||||
int32_t timestamp_millis_adjust;
|
||||
/* HAE altitude in meters - can be used instead of MSL altitude */
|
||||
bool has_altitude_hae;
|
||||
int32_t altitude_hae;
|
||||
/* Geoidal separation in meters */
|
||||
bool has_altitude_geoidal_separation;
|
||||
int32_t altitude_geoidal_separation;
|
||||
/* Horizontal, Vertical and Position Dilution of Precision, in 1/100 units
|
||||
- PDOP is sufficient for most cases
|
||||
@@ -387,8 +442,10 @@ typedef struct _meshtastic_Position {
|
||||
- "heading" is where the fuselage points (measured in horizontal plane)
|
||||
- "yaw" indicates a relative rotation about the vertical axis
|
||||
TODO: REMOVE/INTEGRATE */
|
||||
bool has_ground_speed;
|
||||
uint32_t ground_speed;
|
||||
/* TODO: REPLACE */
|
||||
bool has_ground_track;
|
||||
uint32_t ground_track;
|
||||
/* GPS fix quality (from NMEA GxGGA statement or similar) */
|
||||
uint32_t fix_quality;
|
||||
@@ -410,6 +467,7 @@ typedef struct _meshtastic_Position {
|
||||
uint32_t precision_bits;
|
||||
} meshtastic_Position;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_User_public_key_t;
|
||||
/* Broadcast when a newly powered mesh node wants to find a node num it can use
|
||||
Sent from the phone over bluetooth to set the user id for the owner of this node.
|
||||
Also sent from nodes to each other when a new node signs on (so all clients can have this info)
|
||||
@@ -456,13 +514,25 @@ typedef struct _meshtastic_User {
|
||||
bool is_licensed;
|
||||
/* Indicates that the user's role in the mesh */
|
||||
meshtastic_Config_DeviceConfig_Role role;
|
||||
/* The public key of the user's device.
|
||||
This is sent out to other nodes on the mesh to allow them to compute a shared secret key. */
|
||||
meshtastic_User_public_key_t public_key;
|
||||
} meshtastic_User;
|
||||
|
||||
/* A message used in our Dynamic Source Routing protocol (RFC 4728 based) */
|
||||
/* A message used in a traceroute */
|
||||
typedef struct _meshtastic_RouteDiscovery {
|
||||
/* The list of nodenums this packet has visited so far */
|
||||
/* The list of nodenums this packet has visited so far to the destination. */
|
||||
pb_size_t route_count;
|
||||
uint32_t route[8];
|
||||
/* The list of SNRs (in dB, scaled by 4) in the route towards the destination. */
|
||||
pb_size_t snr_towards_count;
|
||||
int8_t snr_towards[8];
|
||||
/* The list of nodenums the packet has visited on the way back from the destination. */
|
||||
pb_size_t route_back_count;
|
||||
uint32_t route_back[8];
|
||||
/* The list of SNRs (in dB, scaled by 4) in the route back from the destination. */
|
||||
pb_size_t snr_back_count;
|
||||
int8_t snr_back[8];
|
||||
} meshtastic_RouteDiscovery;
|
||||
|
||||
/* A Routing control Data packet handled by the routing module */
|
||||
@@ -517,8 +587,10 @@ typedef struct _meshtastic_Waypoint {
|
||||
/* Id of the waypoint */
|
||||
uint32_t id;
|
||||
/* latitude_i */
|
||||
bool has_latitude_i;
|
||||
int32_t latitude_i;
|
||||
/* longitude_i */
|
||||
bool has_longitude_i;
|
||||
int32_t longitude_i;
|
||||
/* Time the waypoint is to expire (epoch) */
|
||||
uint32_t expire;
|
||||
@@ -550,6 +622,7 @@ typedef struct _meshtastic_MqttClientProxyMessage {
|
||||
} meshtastic_MqttClientProxyMessage;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(256) meshtastic_MeshPacket_encrypted_t;
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_MeshPacket_public_key_t;
|
||||
/* A packet envelope sent/received over the mesh
|
||||
only payload_variant is sent in the payload portion of the LORA packet.
|
||||
The other fields are either not sent at all, or sent in the special 16 byte LORA header. */
|
||||
@@ -624,6 +697,10 @@ typedef struct _meshtastic_MeshPacket {
|
||||
uint8_t next_hop;
|
||||
/* Last byte of the node number of the node that will relay/relayed this packet. */
|
||||
uint8_t relay_node;
|
||||
/* Records the public key the packet was encrypted with, if applicable. */
|
||||
meshtastic_MeshPacket_public_key_t public_key;
|
||||
/* Indicates whether the packet was en/decrypted using PKI */
|
||||
bool pki_encrypted;
|
||||
} meshtastic_MeshPacket;
|
||||
|
||||
/* The bluetooth to device link:
|
||||
@@ -693,11 +770,11 @@ typedef struct _meshtastic_MyNodeInfo {
|
||||
and then extend as needed by emitting multiple records. */
|
||||
typedef struct _meshtastic_LogRecord {
|
||||
/* Log levels, chosen to match python logging conventions. */
|
||||
char message[64];
|
||||
char message[384];
|
||||
/* Seconds since 1970 - or 0 for unknown/unset */
|
||||
uint32_t time;
|
||||
/* Usually based on thread name - if known */
|
||||
char source[8];
|
||||
char source[32];
|
||||
/* Not yet set */
|
||||
meshtastic_LogRecord_Level level;
|
||||
} meshtastic_LogRecord;
|
||||
@@ -713,6 +790,30 @@ typedef struct _meshtastic_QueueStatus {
|
||||
uint32_t mesh_packet_id;
|
||||
} meshtastic_QueueStatus;
|
||||
|
||||
/* A notification message from the device to the client
|
||||
To be used for important messages that should to be displayed to the user
|
||||
in the form of push notifications or validation messages when saving
|
||||
invalid configuration. */
|
||||
typedef struct _meshtastic_ClientNotification {
|
||||
/* The id of the packet we're notifying in response to */
|
||||
bool has_reply_id;
|
||||
uint32_t reply_id;
|
||||
/* Seconds since 1970 - or 0 for unknown/unset */
|
||||
uint32_t time;
|
||||
/* The level type of notification */
|
||||
meshtastic_LogRecord_Level level;
|
||||
/* The message body of the notification */
|
||||
char message[400];
|
||||
} meshtastic_ClientNotification;
|
||||
|
||||
/* Individual File info for the device */
|
||||
typedef struct _meshtastic_FileInfo {
|
||||
/* The fully qualified path of the file */
|
||||
char file_name[228];
|
||||
/* The size of the file in bytes */
|
||||
uint32_t size_bytes;
|
||||
} meshtastic_FileInfo;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(237) meshtastic_Compressed_data_t;
|
||||
/* Compressed message payload */
|
||||
typedef struct _meshtastic_Compressed {
|
||||
@@ -817,6 +918,10 @@ typedef struct _meshtastic_FromRadio {
|
||||
meshtastic_DeviceMetadata metadata;
|
||||
/* MQTT Client Proxy Message (device sending to client / phone for publishing to MQTT) */
|
||||
meshtastic_MqttClientProxyMessage mqttClientProxyMessage;
|
||||
/* File system manifest messages */
|
||||
meshtastic_FileInfo fileInfo;
|
||||
/* Notification message to the client */
|
||||
meshtastic_ClientNotification clientNotification;
|
||||
};
|
||||
} meshtastic_FromRadio;
|
||||
|
||||
@@ -910,8 +1015,8 @@ extern "C" {
|
||||
#define _meshtastic_Constants_ARRAYSIZE ((meshtastic_Constants)(meshtastic_Constants_DATA_PAYLOAD_LEN+1))
|
||||
|
||||
#define _meshtastic_CriticalErrorCode_MIN meshtastic_CriticalErrorCode_NONE
|
||||
#define _meshtastic_CriticalErrorCode_MAX meshtastic_CriticalErrorCode_RADIO_SPI_BUG
|
||||
#define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_RADIO_SPI_BUG+1))
|
||||
#define _meshtastic_CriticalErrorCode_MAX meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE
|
||||
#define _meshtastic_CriticalErrorCode_ARRAYSIZE ((meshtastic_CriticalErrorCode)(meshtastic_CriticalErrorCode_FLASH_CORRUPTION_UNRECOVERABLE+1))
|
||||
|
||||
#define _meshtastic_Position_LocSource_MIN meshtastic_Position_LocSource_LOC_UNSET
|
||||
#define _meshtastic_Position_LocSource_MAX meshtastic_Position_LocSource_LOC_EXTERNAL
|
||||
@@ -922,8 +1027,8 @@ extern "C" {
|
||||
#define _meshtastic_Position_AltSource_ARRAYSIZE ((meshtastic_Position_AltSource)(meshtastic_Position_AltSource_ALT_BAROMETRIC+1))
|
||||
|
||||
#define _meshtastic_Routing_Error_MIN meshtastic_Routing_Error_NONE
|
||||
#define _meshtastic_Routing_Error_MAX meshtastic_Routing_Error_NOT_AUTHORIZED
|
||||
#define _meshtastic_Routing_Error_ARRAYSIZE ((meshtastic_Routing_Error)(meshtastic_Routing_Error_NOT_AUTHORIZED+1))
|
||||
#define _meshtastic_Routing_Error_MAX meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY
|
||||
#define _meshtastic_Routing_Error_ARRAYSIZE ((meshtastic_Routing_Error)(meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY+1))
|
||||
|
||||
#define _meshtastic_MeshPacket_Priority_MIN meshtastic_MeshPacket_Priority_UNSET
|
||||
#define _meshtastic_MeshPacket_Priority_MAX meshtastic_MeshPacket_Priority_MAX
|
||||
@@ -959,6 +1064,9 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
#define meshtastic_ClientNotification_level_ENUMTYPE meshtastic_LogRecord_Level
|
||||
|
||||
|
||||
|
||||
#define meshtastic_Compressed_portnum_ENUMTYPE meshtastic_PortNum
|
||||
|
||||
@@ -974,19 +1082,21 @@ extern "C" {
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_Position_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN}
|
||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Position_init_default {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_default {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Routing_init_default {0, {meshtastic_RouteDiscovery_init_default}}
|
||||
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Waypoint_init_default {0, 0, 0, 0, 0, "", "", 0}
|
||||
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
|
||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, 0, 0}
|
||||
#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
||||
#define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, 0, 0}
|
||||
#define meshtastic_MyNodeInfo_init_default {0, 0, 0}
|
||||
#define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||
#define meshtastic_QueueStatus_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_FromRadio_init_default {0, 0, {meshtastic_MeshPacket_init_default}}
|
||||
#define meshtastic_ClientNotification_init_default {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""}
|
||||
#define meshtastic_FileInfo_init_default {"", 0}
|
||||
#define meshtastic_ToRadio_init_default {0, {meshtastic_MeshPacket_init_default}}
|
||||
#define meshtastic_Compressed_init_default {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||
#define meshtastic_NeighborInfo_init_default {0, 0, 0, 0, {meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default, meshtastic_Neighbor_init_default}}
|
||||
@@ -997,19 +1107,21 @@ extern "C" {
|
||||
#define meshtastic_ChunkedPayload_init_default {0, 0, 0, {0, {0}}}
|
||||
#define meshtastic_resend_chunks_init_default {{{NULL}, NULL}}
|
||||
#define meshtastic_ChunkedPayloadResponse_init_default {0, 0, {0}}
|
||||
#define meshtastic_Position_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN}
|
||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Position_init_zero {false, 0, false, 0, false, 0, 0, _meshtastic_Position_LocSource_MIN, _meshtastic_Position_AltSource_MIN, 0, 0, false, 0, false, 0, 0, 0, 0, 0, false, 0, false, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_User_init_zero {"", "", "", {0}, _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}}
|
||||
#define meshtastic_RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0, 0, 0, 0}}
|
||||
#define meshtastic_Routing_init_zero {0, {meshtastic_RouteDiscovery_init_zero}}
|
||||
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Waypoint_init_zero {0, 0, 0, 0, 0, "", "", 0}
|
||||
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
|
||||
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
|
||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, 0, 0}
|
||||
#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0}
|
||||
#define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, 0, 0}
|
||||
#define meshtastic_MyNodeInfo_init_zero {0, 0, 0}
|
||||
#define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN}
|
||||
#define meshtastic_QueueStatus_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_FromRadio_init_zero {0, 0, {meshtastic_MeshPacket_init_zero}}
|
||||
#define meshtastic_ClientNotification_init_zero {false, 0, 0, _meshtastic_LogRecord_Level_MIN, ""}
|
||||
#define meshtastic_FileInfo_init_zero {"", 0}
|
||||
#define meshtastic_ToRadio_init_zero {0, {meshtastic_MeshPacket_init_zero}}
|
||||
#define meshtastic_Compressed_init_zero {_meshtastic_PortNum_MIN, {0, {0}}}
|
||||
#define meshtastic_NeighborInfo_init_zero {0, 0, 0, 0, {meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero, meshtastic_Neighbor_init_zero}}
|
||||
@@ -1052,7 +1164,11 @@ extern "C" {
|
||||
#define meshtastic_User_hw_model_tag 5
|
||||
#define meshtastic_User_is_licensed_tag 6
|
||||
#define meshtastic_User_role_tag 7
|
||||
#define meshtastic_User_public_key_tag 8
|
||||
#define meshtastic_RouteDiscovery_route_tag 1
|
||||
#define meshtastic_RouteDiscovery_snr_towards_tag 2
|
||||
#define meshtastic_RouteDiscovery_route_back_tag 3
|
||||
#define meshtastic_RouteDiscovery_snr_back_tag 4
|
||||
#define meshtastic_Routing_route_request_tag 1
|
||||
#define meshtastic_Routing_route_reply_tag 2
|
||||
#define meshtastic_Routing_error_reason_tag 3
|
||||
@@ -1093,6 +1209,8 @@ extern "C" {
|
||||
#define meshtastic_MeshPacket_hop_start_tag 15
|
||||
#define meshtastic_MeshPacket_next_hop_tag 16
|
||||
#define meshtastic_MeshPacket_relay_node_tag 17
|
||||
#define meshtastic_MeshPacket_public_key_tag 18
|
||||
#define meshtastic_MeshPacket_pki_encrypted_tag 19
|
||||
#define meshtastic_NodeInfo_num_tag 1
|
||||
#define meshtastic_NodeInfo_user_tag 2
|
||||
#define meshtastic_NodeInfo_position_tag 3
|
||||
@@ -1114,6 +1232,12 @@ extern "C" {
|
||||
#define meshtastic_QueueStatus_free_tag 2
|
||||
#define meshtastic_QueueStatus_maxlen_tag 3
|
||||
#define meshtastic_QueueStatus_mesh_packet_id_tag 4
|
||||
#define meshtastic_ClientNotification_reply_id_tag 1
|
||||
#define meshtastic_ClientNotification_time_tag 2
|
||||
#define meshtastic_ClientNotification_level_tag 3
|
||||
#define meshtastic_ClientNotification_message_tag 4
|
||||
#define meshtastic_FileInfo_file_name_tag 1
|
||||
#define meshtastic_FileInfo_size_bytes_tag 2
|
||||
#define meshtastic_Compressed_portnum_tag 1
|
||||
#define meshtastic_Compressed_data_tag 2
|
||||
#define meshtastic_Neighbor_node_id_tag 1
|
||||
@@ -1148,6 +1272,8 @@ extern "C" {
|
||||
#define meshtastic_FromRadio_xmodemPacket_tag 12
|
||||
#define meshtastic_FromRadio_metadata_tag 13
|
||||
#define meshtastic_FromRadio_mqttClientProxyMessage_tag 14
|
||||
#define meshtastic_FromRadio_fileInfo_tag 15
|
||||
#define meshtastic_FromRadio_clientNotification_tag 16
|
||||
#define meshtastic_ToRadio_packet_tag 1
|
||||
#define meshtastic_ToRadio_want_config_id_tag 3
|
||||
#define meshtastic_ToRadio_disconnect_tag 4
|
||||
@@ -1168,22 +1294,22 @@ extern "C" {
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_Position_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 1) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 2) \
|
||||
X(a, STATIC, SINGULAR, INT32, altitude, 3) \
|
||||
X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 1) \
|
||||
X(a, STATIC, OPTIONAL, SFIXED32, longitude_i, 2) \
|
||||
X(a, STATIC, OPTIONAL, INT32, altitude, 3) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, time, 4) \
|
||||
X(a, STATIC, SINGULAR, UENUM, location_source, 5) \
|
||||
X(a, STATIC, SINGULAR, UENUM, altitude_source, 6) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, timestamp, 7) \
|
||||
X(a, STATIC, SINGULAR, INT32, timestamp_millis_adjust, 8) \
|
||||
X(a, STATIC, SINGULAR, SINT32, altitude_hae, 9) \
|
||||
X(a, STATIC, SINGULAR, SINT32, altitude_geoidal_separation, 10) \
|
||||
X(a, STATIC, OPTIONAL, SINT32, altitude_hae, 9) \
|
||||
X(a, STATIC, OPTIONAL, SINT32, altitude_geoidal_separation, 10) \
|
||||
X(a, STATIC, SINGULAR, UINT32, PDOP, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, HDOP, 12) \
|
||||
X(a, STATIC, SINGULAR, UINT32, VDOP, 13) \
|
||||
X(a, STATIC, SINGULAR, UINT32, gps_accuracy, 14) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ground_speed, 15) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ground_track, 16) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, ground_speed, 15) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, ground_track, 16) \
|
||||
X(a, STATIC, SINGULAR, UINT32, fix_quality, 17) \
|
||||
X(a, STATIC, SINGULAR, UINT32, fix_type, 18) \
|
||||
X(a, STATIC, SINGULAR, UINT32, sats_in_view, 19) \
|
||||
@@ -1201,12 +1327,16 @@ X(a, STATIC, SINGULAR, STRING, short_name, 3) \
|
||||
X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, macaddr, 4) \
|
||||
X(a, STATIC, SINGULAR, UENUM, hw_model, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_licensed, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 7)
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 7) \
|
||||
X(a, STATIC, SINGULAR, BYTES, public_key, 8)
|
||||
#define meshtastic_User_CALLBACK NULL
|
||||
#define meshtastic_User_DEFAULT NULL
|
||||
|
||||
#define meshtastic_RouteDiscovery_FIELDLIST(X, a) \
|
||||
X(a, STATIC, REPEATED, FIXED32, route, 1)
|
||||
X(a, STATIC, REPEATED, FIXED32, route, 1) \
|
||||
X(a, STATIC, REPEATED, INT32, snr_towards, 2) \
|
||||
X(a, STATIC, REPEATED, FIXED32, route_back, 3) \
|
||||
X(a, STATIC, REPEATED, INT32, snr_back, 4)
|
||||
#define meshtastic_RouteDiscovery_CALLBACK NULL
|
||||
#define meshtastic_RouteDiscovery_DEFAULT NULL
|
||||
|
||||
@@ -1233,8 +1363,8 @@ X(a, STATIC, SINGULAR, FIXED32, emoji, 8)
|
||||
|
||||
#define meshtastic_Waypoint_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, id, 1) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 2) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 3) \
|
||||
X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 2) \
|
||||
X(a, STATIC, OPTIONAL, SFIXED32, longitude_i, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, expire, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, locked_to, 5) \
|
||||
X(a, STATIC, SINGULAR, STRING, name, 6) \
|
||||
@@ -1269,6 +1399,8 @@ X(a, STATIC, SINGULAR, BOOL, via_mqtt, 14) \
|
||||
X(a, STATIC, SINGULAR, UINT32, hop_start, 15) \
|
||||
X(a, STATIC, SINGULAR, UINT32, next_hop, 16) \
|
||||
X(a, STATIC, SINGULAR, UINT32, relay_node, 17)
|
||||
X(a, STATIC, SINGULAR, BYTES, public_key, 18) \
|
||||
X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 19)
|
||||
#define meshtastic_MeshPacket_CALLBACK NULL
|
||||
#define meshtastic_MeshPacket_DEFAULT NULL
|
||||
#define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data
|
||||
@@ -1327,7 +1459,9 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,channel,channel), 10) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,queueStatus,queueStatus), 11) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,xmodemPacket,xmodemPacket), 12) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,metadata,metadata), 13) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 14)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttClientProxyMessage), 14) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,fileInfo,fileInfo), 15) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,clientNotification,clientNotification), 16)
|
||||
#define meshtastic_FromRadio_CALLBACK NULL
|
||||
#define meshtastic_FromRadio_DEFAULT NULL
|
||||
#define meshtastic_FromRadio_payload_variant_packet_MSGTYPE meshtastic_MeshPacket
|
||||
@@ -1341,6 +1475,22 @@ X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqttClientProxyMessage,mqttC
|
||||
#define meshtastic_FromRadio_payload_variant_xmodemPacket_MSGTYPE meshtastic_XModem
|
||||
#define meshtastic_FromRadio_payload_variant_metadata_MSGTYPE meshtastic_DeviceMetadata
|
||||
#define meshtastic_FromRadio_payload_variant_mqttClientProxyMessage_MSGTYPE meshtastic_MqttClientProxyMessage
|
||||
#define meshtastic_FromRadio_payload_variant_fileInfo_MSGTYPE meshtastic_FileInfo
|
||||
#define meshtastic_FromRadio_payload_variant_clientNotification_MSGTYPE meshtastic_ClientNotification
|
||||
|
||||
#define meshtastic_ClientNotification_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, reply_id, 1) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, time, 2) \
|
||||
X(a, STATIC, SINGULAR, UENUM, level, 3) \
|
||||
X(a, STATIC, SINGULAR, STRING, message, 4)
|
||||
#define meshtastic_ClientNotification_CALLBACK NULL
|
||||
#define meshtastic_ClientNotification_DEFAULT NULL
|
||||
|
||||
#define meshtastic_FileInfo_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, file_name, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, size_bytes, 2)
|
||||
#define meshtastic_FileInfo_CALLBACK NULL
|
||||
#define meshtastic_FileInfo_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ToRadio_FIELDLIST(X, a) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,packet,packet), 1) \
|
||||
@@ -1440,6 +1590,8 @@ extern const pb_msgdesc_t meshtastic_MyNodeInfo_msg;
|
||||
extern const pb_msgdesc_t meshtastic_LogRecord_msg;
|
||||
extern const pb_msgdesc_t meshtastic_QueueStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_FromRadio_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ClientNotification_msg;
|
||||
extern const pb_msgdesc_t meshtastic_FileInfo_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ToRadio_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Compressed_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NeighborInfo_msg;
|
||||
@@ -1465,6 +1617,8 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
||||
#define meshtastic_LogRecord_fields &meshtastic_LogRecord_msg
|
||||
#define meshtastic_QueueStatus_fields &meshtastic_QueueStatus_msg
|
||||
#define meshtastic_FromRadio_fields &meshtastic_FromRadio_msg
|
||||
#define meshtastic_ClientNotification_fields &meshtastic_ClientNotification_msg
|
||||
#define meshtastic_FileInfo_fields &meshtastic_FileInfo_msg
|
||||
#define meshtastic_ToRadio_fields &meshtastic_ToRadio_msg
|
||||
#define meshtastic_Compressed_fields &meshtastic_Compressed_msg
|
||||
#define meshtastic_NeighborInfo_fields &meshtastic_NeighborInfo_msg
|
||||
@@ -1481,25 +1635,27 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
|
||||
/* meshtastic_ChunkedPayloadResponse_size depends on runtime parameters */
|
||||
#define MESHTASTIC_MESHTASTIC_MESH_PB_H_MAX_SIZE meshtastic_FromRadio_size
|
||||
#define meshtastic_ChunkedPayload_size 245
|
||||
#define meshtastic_ClientNotification_size 415
|
||||
#define meshtastic_Compressed_size 243
|
||||
#define meshtastic_Data_size 270
|
||||
#define meshtastic_DeviceMetadata_size 46
|
||||
#define meshtastic_FileInfo_size 236
|
||||
#define meshtastic_FromRadio_size 510
|
||||
#define meshtastic_Heartbeat_size 0
|
||||
#define meshtastic_LogRecord_size 81
|
||||
#define meshtastic_MeshPacket_size 334
|
||||
#define meshtastic_LogRecord_size 426
|
||||
#define meshtastic_MeshPacket_size 364
|
||||
#define meshtastic_MqttClientProxyMessage_size 501
|
||||
#define meshtastic_MyNodeInfo_size 18
|
||||
#define meshtastic_NeighborInfo_size 258
|
||||
#define meshtastic_Neighbor_size 22
|
||||
#define meshtastic_NodeInfo_size 283
|
||||
#define meshtastic_NodeInfo_size 317
|
||||
#define meshtastic_NodeRemoteHardwarePin_size 29
|
||||
#define meshtastic_Position_size 144
|
||||
#define meshtastic_QueueStatus_size 23
|
||||
#define meshtastic_RouteDiscovery_size 40
|
||||
#define meshtastic_Routing_size 42
|
||||
#define meshtastic_RouteDiscovery_size 256
|
||||
#define meshtastic_Routing_size 259
|
||||
#define meshtastic_ToRadio_size 504
|
||||
#define meshtastic_User_size 79
|
||||
#define meshtastic_User_size 113
|
||||
#define meshtastic_Waypoint_size 165
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -60,7 +60,9 @@ typedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Mode {
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_TEXTMSG = 3,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_NMEA = 4,
|
||||
/* NMEA messages specifically tailored for CalTopo */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO = 5
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO = 5,
|
||||
/* Ecowitt WS85 weather station */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85 = 6
|
||||
} meshtastic_ModuleConfig_SerialConfig_Serial_Mode;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
@@ -273,6 +275,8 @@ typedef struct _meshtastic_ModuleConfig_StoreForwardConfig {
|
||||
uint32_t history_return_max;
|
||||
/* TODO: REPLACE */
|
||||
uint32_t history_return_window;
|
||||
/* Set to true to let this node act as a server that stores received messages and resends them upon request. */
|
||||
bool is_server;
|
||||
} meshtastic_ModuleConfig_StoreForwardConfig;
|
||||
|
||||
/* Preferences for the RangeTestModule */
|
||||
@@ -337,7 +341,7 @@ typedef struct _meshtastic_ModuleConfig_CannedMessageConfig {
|
||||
/* Enable/disable CannedMessageModule. */
|
||||
bool enabled;
|
||||
/* Input event origin accepted by the canned message module.
|
||||
Can be e.g. "rotEnc1", "upDownEnc1" or keyword "_any" */
|
||||
Can be e.g. "rotEnc1", "upDownEnc1", "scanAndSelect", "cardkb", "serialkb", or keyword "_any" */
|
||||
char allow_input_source[16];
|
||||
/* CannedMessageModule also sends a bell character with the messages.
|
||||
ExternalNotificationModule can benefit from this feature. */
|
||||
@@ -432,8 +436,8 @@ extern "C" {
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Baud)(meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_CALTOPO+1))
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE
|
||||
#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MAX meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK
|
||||
@@ -474,7 +478,7 @@ extern "C" {
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_SerialConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_init_default {0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_init_default {0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_init_default {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
||||
@@ -490,7 +494,7 @@ extern "C" {
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_SerialConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN, 0, _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_init_zero {0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_init_zero {0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_init_zero {0, 0, 0, 0, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN, 0, 0, "", 0}
|
||||
@@ -560,6 +564,7 @@ extern "C" {
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_records_tag 3
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_history_return_max_tag 4
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_history_return_window_tag 5
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_is_server_tag 6
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_sender_tag 2
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_save_tag 3
|
||||
@@ -743,7 +748,8 @@ X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, heartbeat, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, records, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, history_return_max, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, history_return_window, 5)
|
||||
X(a, STATIC, SINGULAR, UINT32, history_return_window, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_server, 6)
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_DEFAULT NULL
|
||||
|
||||
@@ -848,7 +854,7 @@ extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_size 10
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
||||
#define meshtastic_ModuleConfig_SerialConfig_size 28
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_size 22
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_size 24
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_size 36
|
||||
#define meshtastic_ModuleConfig_size 257
|
||||
#define meshtastic_RemoteHardwarePin_size 21
|
||||
|
||||
@@ -113,7 +113,7 @@ typedef enum _meshtastic_PortNum {
|
||||
ENCODING: Protobuf (?) */
|
||||
meshtastic_PortNum_SIMULATOR_APP = 69,
|
||||
/* Provides a traceroute functionality to show the route a packet towards
|
||||
a certain destination would take on the mesh.
|
||||
a certain destination would take on the mesh. Contains a RouteDiscovery message as payload.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_TRACEROUTE_APP = 70,
|
||||
/* Aggregates edge info for the network by sending out a list of each node's neighbors
|
||||
@@ -124,6 +124,8 @@ typedef enum _meshtastic_PortNum {
|
||||
meshtastic_PortNum_ATAK_PLUGIN = 72,
|
||||
/* Provides unencrypted information about a node for consumption by a map via MQTT */
|
||||
meshtastic_PortNum_MAP_REPORT_APP = 73,
|
||||
/* PowerStress based monitoring support (for automated power consumption testing) */
|
||||
meshtastic_PortNum_POWERSTRESS_APP = 74,
|
||||
/* Private applications should use portnums >= 256.
|
||||
To simplify initial development and testing you can use "PRIVATE_APP"
|
||||
in your code without needing to rebuild protobuf files (via [regen-protos.sh](https://github.com/meshtastic/firmware/blob/master/bin/regen-protos.sh)) */
|
||||
|
||||
17
src/mesh/generated/meshtastic/powermon.pb.cpp
Normal file
17
src/mesh/generated/meshtastic/powermon.pb.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.8 */
|
||||
|
||||
#include "meshtastic/powermon.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_PowerMon, meshtastic_PowerMon, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_PowerStressMessage, meshtastic_PowerStressMessage, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
138
src/mesh/generated/meshtastic/powermon.pb.h
Normal file
138
src/mesh/generated/meshtastic/powermon.pb.h
Normal file
@@ -0,0 +1,138 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.8 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_POWERMON_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Enum definitions */
|
||||
/* Any significant power changing event in meshtastic should be tagged with a powermon state transition.
|
||||
If you are making new meshtastic features feel free to add new entries at the end of this definition. */
|
||||
typedef enum _meshtastic_PowerMon_State {
|
||||
meshtastic_PowerMon_State_None = 0,
|
||||
meshtastic_PowerMon_State_CPU_DeepSleep = 1,
|
||||
meshtastic_PowerMon_State_CPU_LightSleep = 2,
|
||||
/* The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only
|
||||
occasionally. In cases where that rail has multiple devices on it we usually want to have logging on
|
||||
the state of that rail as an independent record.
|
||||
For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.
|
||||
|
||||
The log messages will be short and complete (see PowerMon.Event in the protobufs for details).
|
||||
something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states.
|
||||
(We use a bitmask for states so that if a log message gets lost it won't be fatal) */
|
||||
meshtastic_PowerMon_State_Vext1_On = 4,
|
||||
meshtastic_PowerMon_State_Lora_RXOn = 8,
|
||||
meshtastic_PowerMon_State_Lora_TXOn = 16,
|
||||
meshtastic_PowerMon_State_Lora_RXActive = 32,
|
||||
meshtastic_PowerMon_State_BT_On = 64,
|
||||
meshtastic_PowerMon_State_LED_On = 128,
|
||||
meshtastic_PowerMon_State_Screen_On = 256,
|
||||
meshtastic_PowerMon_State_Screen_Drawing = 512,
|
||||
meshtastic_PowerMon_State_Wifi_On = 1024,
|
||||
/* GPS is actively trying to find our location
|
||||
See GPSPowerState for more details */
|
||||
meshtastic_PowerMon_State_GPS_Active = 2048
|
||||
} meshtastic_PowerMon_State;
|
||||
|
||||
/* What operation would we like the UUT to perform.
|
||||
note: senders should probably set want_response in their request packets, so that they can know when the state
|
||||
machine has started processing their request */
|
||||
typedef enum _meshtastic_PowerStressMessage_Opcode {
|
||||
/* Unset/unused */
|
||||
meshtastic_PowerStressMessage_Opcode_UNSET = 0,
|
||||
meshtastic_PowerStressMessage_Opcode_PRINT_INFO = 1, /* Print board version slog and send an ack that we are alive and ready to process commands */
|
||||
meshtastic_PowerStressMessage_Opcode_FORCE_QUIET = 2, /* Try to turn off all automatic processing of packets, screen, sleeping, etc (to make it easier to measure in isolation) */
|
||||
meshtastic_PowerStressMessage_Opcode_END_QUIET = 3, /* Stop powerstress processing - probably by just rebooting the board */
|
||||
meshtastic_PowerStressMessage_Opcode_SCREEN_ON = 16, /* Turn the screen on */
|
||||
meshtastic_PowerStressMessage_Opcode_SCREEN_OFF = 17, /* Turn the screen off */
|
||||
meshtastic_PowerStressMessage_Opcode_CPU_IDLE = 32, /* Let the CPU run but we assume mostly idling for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_CPU_DEEPSLEEP = 33, /* Force deep sleep for FIXME seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_CPU_FULLON = 34, /* Spin the CPU as fast as possible for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_LED_ON = 48, /* Turn the LED on for num_seconds (and leave it on - for baseline power measurement purposes) */
|
||||
meshtastic_PowerStressMessage_Opcode_LED_OFF = 49, /* Force the LED off for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_LORA_OFF = 64, /* Completely turn off the LORA radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_LORA_TX = 65, /* Send Lora packets for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_LORA_RX = 66, /* Receive Lora packets for num_seconds (node will be mostly just listening, unless an external agent is helping stress this by sending packets on the current channel) */
|
||||
meshtastic_PowerStressMessage_Opcode_BT_OFF = 80, /* Turn off the BT radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_BT_ON = 81, /* Turn on the BT radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_WIFI_OFF = 96, /* Turn off the WIFI radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_WIFI_ON = 97, /* Turn on the WIFI radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_GPS_OFF = 112, /* Turn off the GPS radio for num_seconds */
|
||||
meshtastic_PowerStressMessage_Opcode_GPS_ON = 113 /* Turn on the GPS radio for num_seconds */
|
||||
} meshtastic_PowerStressMessage_Opcode;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Note: There are no 'PowerMon' messages normally in use (PowerMons are sent only as structured logs - slogs).
|
||||
But we wrap our State enum in this message to effectively nest a namespace (without our linter yelling at us) */
|
||||
typedef struct _meshtastic_PowerMon {
|
||||
char dummy_field;
|
||||
} meshtastic_PowerMon;
|
||||
|
||||
/* PowerStress testing support via the C++ PowerStress module */
|
||||
typedef struct _meshtastic_PowerStressMessage {
|
||||
/* What type of HardwareMessage is this? */
|
||||
meshtastic_PowerStressMessage_Opcode cmd;
|
||||
float num_seconds;
|
||||
} meshtastic_PowerStressMessage;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_PowerMon_State_MIN meshtastic_PowerMon_State_None
|
||||
#define _meshtastic_PowerMon_State_MAX meshtastic_PowerMon_State_GPS_Active
|
||||
#define _meshtastic_PowerMon_State_ARRAYSIZE ((meshtastic_PowerMon_State)(meshtastic_PowerMon_State_GPS_Active+1))
|
||||
|
||||
#define _meshtastic_PowerStressMessage_Opcode_MIN meshtastic_PowerStressMessage_Opcode_UNSET
|
||||
#define _meshtastic_PowerStressMessage_Opcode_MAX meshtastic_PowerStressMessage_Opcode_GPS_ON
|
||||
#define _meshtastic_PowerStressMessage_Opcode_ARRAYSIZE ((meshtastic_PowerStressMessage_Opcode)(meshtastic_PowerStressMessage_Opcode_GPS_ON+1))
|
||||
|
||||
|
||||
#define meshtastic_PowerStressMessage_cmd_ENUMTYPE meshtastic_PowerStressMessage_Opcode
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_PowerMon_init_default {0}
|
||||
#define meshtastic_PowerStressMessage_init_default {_meshtastic_PowerStressMessage_Opcode_MIN, 0}
|
||||
#define meshtastic_PowerMon_init_zero {0}
|
||||
#define meshtastic_PowerStressMessage_init_zero {_meshtastic_PowerStressMessage_Opcode_MIN, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_PowerStressMessage_cmd_tag 1
|
||||
#define meshtastic_PowerStressMessage_num_seconds_tag 2
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_PowerMon_FIELDLIST(X, a) \
|
||||
|
||||
#define meshtastic_PowerMon_CALLBACK NULL
|
||||
#define meshtastic_PowerMon_DEFAULT NULL
|
||||
|
||||
#define meshtastic_PowerStressMessage_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, cmd, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, num_seconds, 2)
|
||||
#define meshtastic_PowerStressMessage_CALLBACK NULL
|
||||
#define meshtastic_PowerStressMessage_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_PowerMon_msg;
|
||||
extern const pb_msgdesc_t meshtastic_PowerStressMessage_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_PowerMon_fields &meshtastic_PowerMon_msg
|
||||
#define meshtastic_PowerStressMessage_fields &meshtastic_PowerStressMessage_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_POWERMON_PB_H_MAX_SIZE meshtastic_PowerStressMessage_size
|
||||
#define meshtastic_PowerMon_size 0
|
||||
#define meshtastic_PowerStressMessage_size 7
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -18,6 +18,9 @@ PB_BIND(meshtastic_PowerMetrics, meshtastic_PowerMetrics, AUTO)
|
||||
PB_BIND(meshtastic_AirQualityMetrics, meshtastic_AirQualityMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LocalStats, meshtastic_LocalStats, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Telemetry, meshtastic_Telemetry, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -63,104 +63,176 @@ typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction) */
|
||||
meshtastic_TelemetrySensorType_DFROBOT_LARK = 24,
|
||||
/* NAU7802 Scale Chip or compatible */
|
||||
meshtastic_TelemetrySensorType_NAU7802 = 25
|
||||
meshtastic_TelemetrySensorType_NAU7802 = 25,
|
||||
/* BMP3XX High accuracy temperature and pressure */
|
||||
meshtastic_TelemetrySensorType_BMP3XX = 26,
|
||||
/* ICM-20948 9-Axis digital motion processor */
|
||||
meshtastic_TelemetrySensorType_ICM20948 = 27,
|
||||
/* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go) */
|
||||
meshtastic_TelemetrySensorType_MAX17048 = 28,
|
||||
/* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor */
|
||||
meshtastic_TelemetrySensorType_CUSTOM_SENSOR = 29
|
||||
} meshtastic_TelemetrySensorType;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Key native device metrics such as battery level */
|
||||
typedef struct _meshtastic_DeviceMetrics {
|
||||
/* 0-100 (>100 means powered) */
|
||||
bool has_battery_level;
|
||||
uint32_t battery_level;
|
||||
/* Voltage measured */
|
||||
bool has_voltage;
|
||||
float voltage;
|
||||
/* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */
|
||||
bool has_channel_utilization;
|
||||
float channel_utilization;
|
||||
/* Percent of airtime for transmission used within the last hour. */
|
||||
bool has_air_util_tx;
|
||||
float air_util_tx;
|
||||
/* How long the device has been running since the last reboot (in seconds) */
|
||||
bool has_uptime_seconds;
|
||||
uint32_t uptime_seconds;
|
||||
} meshtastic_DeviceMetrics;
|
||||
|
||||
/* Weather station or other environmental metrics */
|
||||
typedef struct _meshtastic_EnvironmentMetrics {
|
||||
/* Temperature measured */
|
||||
bool has_temperature;
|
||||
float temperature;
|
||||
/* Relative humidity percent measured */
|
||||
bool has_relative_humidity;
|
||||
float relative_humidity;
|
||||
/* Barometric pressure in hPA measured */
|
||||
bool has_barometric_pressure;
|
||||
float barometric_pressure;
|
||||
/* Gas resistance in MOhm measured */
|
||||
bool has_gas_resistance;
|
||||
float gas_resistance;
|
||||
/* Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */
|
||||
bool has_voltage;
|
||||
float voltage;
|
||||
/* Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) */
|
||||
bool has_current;
|
||||
float current;
|
||||
/* relative scale IAQ value as measured by Bosch BME680 . value 0-500.
|
||||
Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here. */
|
||||
bool has_iaq;
|
||||
uint16_t iaq;
|
||||
/* RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm. */
|
||||
bool has_distance;
|
||||
float distance;
|
||||
/* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */
|
||||
bool has_lux;
|
||||
float lux;
|
||||
/* VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor. */
|
||||
bool has_white_lux;
|
||||
float white_lux;
|
||||
/* Infrared lux */
|
||||
bool has_ir_lux;
|
||||
float ir_lux;
|
||||
/* Ultraviolet lux */
|
||||
bool has_uv_lux;
|
||||
float uv_lux;
|
||||
/* Wind direction in degrees
|
||||
0 degrees = North, 90 = East, etc... */
|
||||
bool has_wind_direction;
|
||||
uint16_t wind_direction;
|
||||
/* Wind speed in m/s */
|
||||
bool has_wind_speed;
|
||||
float wind_speed;
|
||||
/* Weight in KG */
|
||||
bool has_weight;
|
||||
float weight;
|
||||
/* Wind gust in m/s */
|
||||
bool has_wind_gust;
|
||||
float wind_gust;
|
||||
/* Wind lull in m/s */
|
||||
bool has_wind_lull;
|
||||
float wind_lull;
|
||||
} meshtastic_EnvironmentMetrics;
|
||||
|
||||
/* Power Metrics (voltage / current / etc) */
|
||||
typedef struct _meshtastic_PowerMetrics {
|
||||
/* Voltage (Ch1) */
|
||||
bool has_ch1_voltage;
|
||||
float ch1_voltage;
|
||||
/* Current (Ch1) */
|
||||
bool has_ch1_current;
|
||||
float ch1_current;
|
||||
/* Voltage (Ch2) */
|
||||
bool has_ch2_voltage;
|
||||
float ch2_voltage;
|
||||
/* Current (Ch2) */
|
||||
bool has_ch2_current;
|
||||
float ch2_current;
|
||||
/* Voltage (Ch3) */
|
||||
bool has_ch3_voltage;
|
||||
float ch3_voltage;
|
||||
/* Current (Ch3) */
|
||||
bool has_ch3_current;
|
||||
float ch3_current;
|
||||
} meshtastic_PowerMetrics;
|
||||
|
||||
/* Air quality metrics */
|
||||
typedef struct _meshtastic_AirQualityMetrics {
|
||||
/* Concentration Units Standard PM1.0 */
|
||||
bool has_pm10_standard;
|
||||
uint32_t pm10_standard;
|
||||
/* Concentration Units Standard PM2.5 */
|
||||
bool has_pm25_standard;
|
||||
uint32_t pm25_standard;
|
||||
/* Concentration Units Standard PM10.0 */
|
||||
bool has_pm100_standard;
|
||||
uint32_t pm100_standard;
|
||||
/* Concentration Units Environmental PM1.0 */
|
||||
bool has_pm10_environmental;
|
||||
uint32_t pm10_environmental;
|
||||
/* Concentration Units Environmental PM2.5 */
|
||||
bool has_pm25_environmental;
|
||||
uint32_t pm25_environmental;
|
||||
/* Concentration Units Environmental PM10.0 */
|
||||
bool has_pm100_environmental;
|
||||
uint32_t pm100_environmental;
|
||||
/* 0.3um Particle Count */
|
||||
bool has_particles_03um;
|
||||
uint32_t particles_03um;
|
||||
/* 0.5um Particle Count */
|
||||
bool has_particles_05um;
|
||||
uint32_t particles_05um;
|
||||
/* 1.0um Particle Count */
|
||||
bool has_particles_10um;
|
||||
uint32_t particles_10um;
|
||||
/* 2.5um Particle Count */
|
||||
bool has_particles_25um;
|
||||
uint32_t particles_25um;
|
||||
/* 5.0um Particle Count */
|
||||
bool has_particles_50um;
|
||||
uint32_t particles_50um;
|
||||
/* 10.0um Particle Count */
|
||||
bool has_particles_100um;
|
||||
uint32_t particles_100um;
|
||||
} meshtastic_AirQualityMetrics;
|
||||
|
||||
/* Local device mesh statistics */
|
||||
typedef struct _meshtastic_LocalStats {
|
||||
/* How long the device has been running since the last reboot (in seconds) */
|
||||
uint32_t uptime_seconds;
|
||||
/* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). */
|
||||
float channel_utilization;
|
||||
/* Percent of airtime for transmission used within the last hour. */
|
||||
float air_util_tx;
|
||||
/* Number of packets sent */
|
||||
uint32_t num_packets_tx;
|
||||
/* Number of packets received good */
|
||||
uint32_t num_packets_rx;
|
||||
/* Number of packets received that are malformed or violate the protocol */
|
||||
uint32_t num_packets_rx_bad;
|
||||
/* Number of nodes online (in the past 2 hours) */
|
||||
uint16_t num_online_nodes;
|
||||
/* Number of nodes total */
|
||||
uint16_t num_total_nodes;
|
||||
} meshtastic_LocalStats;
|
||||
|
||||
/* Types of Measurements the telemetry module is equipped to handle */
|
||||
typedef struct _meshtastic_Telemetry {
|
||||
/* Seconds since 1970 - or 0 for unknown/unset */
|
||||
@@ -175,6 +247,8 @@ typedef struct _meshtastic_Telemetry {
|
||||
meshtastic_AirQualityMetrics air_quality_metrics;
|
||||
/* Power Metrics */
|
||||
meshtastic_PowerMetrics power_metrics;
|
||||
/* Local device mesh statistics */
|
||||
meshtastic_LocalStats local_stats;
|
||||
} variant;
|
||||
} meshtastic_Telemetry;
|
||||
|
||||
@@ -193,8 +267,9 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_NAU7802
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_NAU7802+1))
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_CUSTOM_SENSOR
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_CUSTOM_SENSOR+1))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -204,16 +279,18 @@ extern "C" {
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceMetrics_init_default {0, 0, 0, 0, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_PowerMetrics_init_default {0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_DeviceMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||
#define meshtastic_Nau7802Config_init_default {0, 0}
|
||||
#define meshtastic_DeviceMetrics_init_zero {0, 0, 0, 0, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_PowerMetrics_init_zero {0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_DeviceMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
||||
|
||||
@@ -238,6 +315,8 @@ extern "C" {
|
||||
#define meshtastic_EnvironmentMetrics_wind_direction_tag 13
|
||||
#define meshtastic_EnvironmentMetrics_wind_speed_tag 14
|
||||
#define meshtastic_EnvironmentMetrics_weight_tag 15
|
||||
#define meshtastic_EnvironmentMetrics_wind_gust_tag 16
|
||||
#define meshtastic_EnvironmentMetrics_wind_lull_tag 17
|
||||
#define meshtastic_PowerMetrics_ch1_voltage_tag 1
|
||||
#define meshtastic_PowerMetrics_ch1_current_tag 2
|
||||
#define meshtastic_PowerMetrics_ch2_voltage_tag 3
|
||||
@@ -256,81 +335,106 @@ extern "C" {
|
||||
#define meshtastic_AirQualityMetrics_particles_25um_tag 10
|
||||
#define meshtastic_AirQualityMetrics_particles_50um_tag 11
|
||||
#define meshtastic_AirQualityMetrics_particles_100um_tag 12
|
||||
#define meshtastic_LocalStats_uptime_seconds_tag 1
|
||||
#define meshtastic_LocalStats_channel_utilization_tag 2
|
||||
#define meshtastic_LocalStats_air_util_tx_tag 3
|
||||
#define meshtastic_LocalStats_num_packets_tx_tag 4
|
||||
#define meshtastic_LocalStats_num_packets_rx_tag 5
|
||||
#define meshtastic_LocalStats_num_packets_rx_bad_tag 6
|
||||
#define meshtastic_LocalStats_num_online_nodes_tag 7
|
||||
#define meshtastic_LocalStats_num_total_nodes_tag 8
|
||||
#define meshtastic_Telemetry_time_tag 1
|
||||
#define meshtastic_Telemetry_device_metrics_tag 2
|
||||
#define meshtastic_Telemetry_environment_metrics_tag 3
|
||||
#define meshtastic_Telemetry_air_quality_metrics_tag 4
|
||||
#define meshtastic_Telemetry_power_metrics_tag 5
|
||||
#define meshtastic_Telemetry_local_stats_tag 6
|
||||
#define meshtastic_Nau7802Config_zeroOffset_tag 1
|
||||
#define meshtastic_Nau7802Config_calibrationFactor_tag 2
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, battery_level, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, voltage, 2) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, channel_utilization, 3) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, air_util_tx, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, uptime_seconds, 5)
|
||||
X(a, STATIC, OPTIONAL, UINT32, battery_level, 1) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, voltage, 2) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, channel_utilization, 3) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, air_util_tx, 4) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, uptime_seconds, 5)
|
||||
#define meshtastic_DeviceMetrics_CALLBACK NULL
|
||||
#define meshtastic_DeviceMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_EnvironmentMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, temperature, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, relative_humidity, 2) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, barometric_pressure, 3) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, gas_resistance, 4) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, voltage, 5) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, current, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, iaq, 7) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, distance, 8) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, lux, 9) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, white_lux, 10) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ir_lux, 11) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, uv_lux, 12) \
|
||||
X(a, STATIC, SINGULAR, UINT32, wind_direction, 13) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, wind_speed, 14) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, weight, 15)
|
||||
X(a, STATIC, OPTIONAL, FLOAT, temperature, 1) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, relative_humidity, 2) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, barometric_pressure, 3) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, gas_resistance, 4) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, voltage, 5) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, current, 6) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, iaq, 7) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, distance, 8) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, lux, 9) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, white_lux, 10) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ir_lux, 11) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, uv_lux, 12) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, wind_direction, 13) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, wind_speed, 14) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, weight, 15) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, wind_gust, 16) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, wind_lull, 17)
|
||||
#define meshtastic_EnvironmentMetrics_CALLBACK NULL
|
||||
#define meshtastic_EnvironmentMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_PowerMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch1_voltage, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch1_current, 2) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch2_voltage, 3) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch2_current, 4) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch3_voltage, 5) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, ch3_current, 6)
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch1_voltage, 1) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch1_current, 2) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch2_voltage, 3) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch2_current, 4) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch3_voltage, 5) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch3_current, 6)
|
||||
#define meshtastic_PowerMetrics_CALLBACK NULL
|
||||
#define meshtastic_PowerMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_AirQualityMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm10_standard, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm25_standard, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm100_standard, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm10_environmental, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm25_environmental, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pm100_environmental, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_03um, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_05um, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_10um, 9) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_25um, 10) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_50um, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, particles_100um, 12)
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm10_standard, 1) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm25_standard, 2) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm100_standard, 3) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm10_environmental, 4) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm25_environmental, 5) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm100_environmental, 6) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_03um, 7) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_05um, 8) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_10um, 9) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_25um, 10) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_50um, 11) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_100um, 12)
|
||||
#define meshtastic_AirQualityMetrics_CALLBACK NULL
|
||||
#define meshtastic_AirQualityMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_LocalStats_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, uptime_seconds, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, channel_utilization, 2) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, air_util_tx, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_packets_tx, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_packets_rx, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_packets_rx_bad, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_online_nodes, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_total_nodes, 8)
|
||||
#define meshtastic_LocalStats_CALLBACK NULL
|
||||
#define meshtastic_LocalStats_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Telemetry_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, time, 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,device_metrics,variant.device_metrics), 2) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,environment_metrics,variant.environment_metrics), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,air_quality_metrics,variant.air_quality_metrics), 4) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,power_metrics,variant.power_metrics), 5)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,power_metrics,variant.power_metrics), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,local_stats,variant.local_stats), 6)
|
||||
#define meshtastic_Telemetry_CALLBACK NULL
|
||||
#define meshtastic_Telemetry_DEFAULT NULL
|
||||
#define meshtastic_Telemetry_variant_device_metrics_MSGTYPE meshtastic_DeviceMetrics
|
||||
#define meshtastic_Telemetry_variant_environment_metrics_MSGTYPE meshtastic_EnvironmentMetrics
|
||||
#define meshtastic_Telemetry_variant_air_quality_metrics_MSGTYPE meshtastic_AirQualityMetrics
|
||||
#define meshtastic_Telemetry_variant_power_metrics_MSGTYPE meshtastic_PowerMetrics
|
||||
#define meshtastic_Telemetry_variant_local_stats_MSGTYPE meshtastic_LocalStats
|
||||
|
||||
#define meshtastic_Nau7802Config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, INT32, zeroOffset, 1) \
|
||||
@@ -342,6 +446,7 @@ extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_PowerMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AirQualityMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_LocalStats_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Telemetry_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
|
||||
@@ -350,6 +455,7 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
#define meshtastic_EnvironmentMetrics_fields &meshtastic_EnvironmentMetrics_msg
|
||||
#define meshtastic_PowerMetrics_fields &meshtastic_PowerMetrics_msg
|
||||
#define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg
|
||||
#define meshtastic_LocalStats_fields &meshtastic_LocalStats_msg
|
||||
#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
|
||||
#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
|
||||
|
||||
@@ -357,10 +463,11 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
||||
#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size
|
||||
#define meshtastic_AirQualityMetrics_size 72
|
||||
#define meshtastic_DeviceMetrics_size 27
|
||||
#define meshtastic_EnvironmentMetrics_size 73
|
||||
#define meshtastic_EnvironmentMetrics_size 85
|
||||
#define meshtastic_LocalStats_size 42
|
||||
#define meshtastic_Nau7802Config_size 16
|
||||
#define meshtastic_PowerMetrics_size 30
|
||||
#define meshtastic_Telemetry_size 80
|
||||
#define meshtastic_Telemetry_size 92
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
Reference in New Issue
Block a user