mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 23:21:06 +00:00
Merge remote-tracking branch 'remotes/origin/master' into rsyslog-client
This commit is contained in:
@@ -599,6 +599,17 @@ uint32_t sinceLastSeen(const meshtastic_NodeInfo *n)
|
||||
return delta;
|
||||
}
|
||||
|
||||
uint32_t sinceReceived(const meshtastic_MeshPacket *p)
|
||||
{
|
||||
uint32_t now = getTime();
|
||||
|
||||
int delta = (int)(now - p->rx_time);
|
||||
if (delta < 0) // our clock must be slightly off still - not set from GPS yet
|
||||
delta = 0;
|
||||
|
||||
return delta;
|
||||
}
|
||||
|
||||
#define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline
|
||||
|
||||
size_t NodeDB::getNumOnlineNodes()
|
||||
|
||||
@@ -32,6 +32,9 @@ extern meshtastic_User &owner;
|
||||
/// Given a node, return how many seconds in the past (vs now) that we last heard from it
|
||||
uint32_t sinceLastSeen(const meshtastic_NodeInfo *n);
|
||||
|
||||
/// Given a packet, return how many seconds in the past (vs now) it was received
|
||||
uint32_t sinceReceived(const meshtastic_MeshPacket *p);
|
||||
|
||||
class NodeDB
|
||||
{
|
||||
// NodeNum provisionalNodeNum; // if we are trying to find a node num this is our current attempt
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
PB_BIND(meshtastic_AdminMessage, meshtastic_AdminMessage, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_HamParameters, meshtastic_HamParameters, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "meshtastic/device_metadata.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
#include "meshtastic/module_config.pb.h"
|
||||
#include "meshtastic/connection_status.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
@@ -56,6 +57,18 @@ typedef enum _meshtastic_AdminMessage_ModuleConfigType {
|
||||
} meshtastic_AdminMessage_ModuleConfigType;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Parameters for setting up Meshtastic for ameteur radio usage */
|
||||
typedef struct _meshtastic_HamParameters {
|
||||
/* Amateur radio call sign, eg. KD2ABC */
|
||||
char call_sign[8];
|
||||
/* Transmit power in dBm at the LoRA transceiver, not including any amplification */
|
||||
int32_t tx_power;
|
||||
/* The selected frequency of LoRA operation
|
||||
Please respect your local laws, regulations, and band plans.
|
||||
Ensure your radio is capable of operating of the selected frequency before setting this. */
|
||||
float frequency;
|
||||
} meshtastic_HamParameters;
|
||||
|
||||
/* 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) */
|
||||
@@ -91,6 +104,12 @@ typedef struct _meshtastic_AdminMessage {
|
||||
bool get_ringtone_request;
|
||||
/* Get the Ringtone in the response to this message. */
|
||||
char get_ringtone_response[231];
|
||||
/* Request the node to send it's connection status */
|
||||
bool get_device_connection_status_request;
|
||||
/* Device connection status response */
|
||||
meshtastic_DeviceConnectionStatus get_device_connection_status_response;
|
||||
/* Setup a node for licensed amateur (ham) radio operation */
|
||||
meshtastic_HamParameters set_ham_mode;
|
||||
/* Set the owner for this node */
|
||||
meshtastic_User set_owner;
|
||||
/* Set channels (using the new API).
|
||||
@@ -147,11 +166,17 @@ extern "C" {
|
||||
#define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_AdminMessage_init_default {0, {0}}
|
||||
#define meshtastic_HamParameters_init_default {"", 0, 0}
|
||||
#define meshtastic_AdminMessage_init_zero {0, {0}}
|
||||
#define meshtastic_HamParameters_init_zero {"", 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_HamParameters_call_sign_tag 1
|
||||
#define meshtastic_HamParameters_tx_power_tag 2
|
||||
#define meshtastic_HamParameters_frequency_tag 3
|
||||
#define meshtastic_AdminMessage_get_channel_request_tag 1
|
||||
#define meshtastic_AdminMessage_get_channel_response_tag 2
|
||||
#define meshtastic_AdminMessage_get_owner_request_tag 3
|
||||
@@ -166,6 +191,9 @@ extern "C" {
|
||||
#define meshtastic_AdminMessage_get_device_metadata_response_tag 13
|
||||
#define meshtastic_AdminMessage_get_ringtone_request_tag 14
|
||||
#define meshtastic_AdminMessage_get_ringtone_response_tag 15
|
||||
#define meshtastic_AdminMessage_get_device_connection_status_request_tag 16
|
||||
#define meshtastic_AdminMessage_get_device_connection_status_response_tag 17
|
||||
#define meshtastic_AdminMessage_set_ham_mode_tag 18
|
||||
#define meshtastic_AdminMessage_set_owner_tag 32
|
||||
#define meshtastic_AdminMessage_set_channel_tag 33
|
||||
#define meshtastic_AdminMessage_set_config_tag 34
|
||||
@@ -197,6 +225,9 @@ X(a, STATIC, ONEOF, BOOL, (payload_variant,get_device_metadata_request,
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_device_metadata_response,get_device_metadata_response), 13) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_ringtone_request,get_ringtone_request), 14) \
|
||||
X(a, STATIC, ONEOF, STRING, (payload_variant,get_ringtone_response,get_ringtone_response), 15) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_device_connection_status_request,get_device_connection_status_request), 16) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_device_connection_status_response,get_device_connection_status_response), 17) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_ham_mode,set_ham_mode), 18) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_owner,set_owner), 32) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_channel,set_channel), 33) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_config,set_config), 34) \
|
||||
@@ -218,18 +249,30 @@ X(a, STATIC, ONEOF, INT32, (payload_variant,nodedb_reset,nodedb_reset),
|
||||
#define meshtastic_AdminMessage_payload_variant_get_config_response_MSGTYPE meshtastic_Config
|
||||
#define meshtastic_AdminMessage_payload_variant_get_module_config_response_MSGTYPE meshtastic_ModuleConfig
|
||||
#define meshtastic_AdminMessage_payload_variant_get_device_metadata_response_MSGTYPE meshtastic_DeviceMetadata
|
||||
#define meshtastic_AdminMessage_payload_variant_get_device_connection_status_response_MSGTYPE meshtastic_DeviceConnectionStatus
|
||||
#define meshtastic_AdminMessage_payload_variant_set_ham_mode_MSGTYPE meshtastic_HamParameters
|
||||
#define meshtastic_AdminMessage_payload_variant_set_owner_MSGTYPE meshtastic_User
|
||||
#define meshtastic_AdminMessage_payload_variant_set_channel_MSGTYPE meshtastic_Channel
|
||||
#define meshtastic_AdminMessage_payload_variant_set_config_MSGTYPE meshtastic_Config
|
||||
#define meshtastic_AdminMessage_payload_variant_set_module_config_MSGTYPE meshtastic_ModuleConfig
|
||||
|
||||
#define meshtastic_HamParameters_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, call_sign, 1) \
|
||||
X(a, STATIC, SINGULAR, INT32, tx_power, 2) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, frequency, 3)
|
||||
#define meshtastic_HamParameters_CALLBACK NULL
|
||||
#define meshtastic_HamParameters_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_msg;
|
||||
extern const pb_msgdesc_t meshtastic_HamParameters_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg
|
||||
#define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define meshtastic_AdminMessage_size 234
|
||||
#define meshtastic_HamParameters_size 25
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
27
src/mesh/generated/meshtastic/connection_status.pb.c
Normal file
27
src/mesh/generated/meshtastic/connection_status.pb.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.7 */
|
||||
|
||||
#include "meshtastic/connection_status.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_DeviceConnectionStatus, meshtastic_DeviceConnectionStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_WifiConnectionStatus, meshtastic_WifiConnectionStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_EthernetConnectionStatus, meshtastic_EthernetConnectionStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NetworkConnectionStatus, meshtastic_NetworkConnectionStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_BluetoothConnectionStatus, meshtastic_BluetoothConnectionStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SerialConnectionStatus, meshtastic_SerialConnectionStatus, AUTO)
|
||||
|
||||
|
||||
|
||||
189
src/mesh/generated/meshtastic/connection_status.pb.h
Normal file
189
src/mesh/generated/meshtastic/connection_status.pb.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.7 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_CONNECTION_STATUS_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
/* Ethernet or WiFi connection status */
|
||||
typedef struct _meshtastic_NetworkConnectionStatus {
|
||||
/* IP address of device */
|
||||
uint32_t ip_address;
|
||||
/* Whether the device has an active connection or not */
|
||||
bool is_connected;
|
||||
/* Whether the device has an active connection to an MQTT broker or not */
|
||||
bool is_mqtt_connected;
|
||||
/* Whether the device is actively remote syslogging or not */
|
||||
bool is_syslog_connected;
|
||||
} meshtastic_NetworkConnectionStatus;
|
||||
|
||||
/* WiFi connection status */
|
||||
typedef struct _meshtastic_WifiConnectionStatus {
|
||||
/* Connection status */
|
||||
bool has_status;
|
||||
meshtastic_NetworkConnectionStatus status;
|
||||
/* WiFi access point ssid */
|
||||
char ssid[33];
|
||||
/* Rssi of wireless connection */
|
||||
int32_t rssi;
|
||||
} meshtastic_WifiConnectionStatus;
|
||||
|
||||
/* Ethernet connection status */
|
||||
typedef struct _meshtastic_EthernetConnectionStatus {
|
||||
/* Connection status */
|
||||
bool has_status;
|
||||
meshtastic_NetworkConnectionStatus status;
|
||||
} meshtastic_EthernetConnectionStatus;
|
||||
|
||||
/* Bluetooth connection status */
|
||||
typedef struct _meshtastic_BluetoothConnectionStatus {
|
||||
/* The pairing pin for bluetooth */
|
||||
uint32_t pin;
|
||||
/* Rssi of bluetooth connection */
|
||||
int32_t rssi;
|
||||
/* Whether the device has an active connection or not */
|
||||
bool is_connected;
|
||||
} meshtastic_BluetoothConnectionStatus;
|
||||
|
||||
/* Serial connection status */
|
||||
typedef struct _meshtastic_SerialConnectionStatus {
|
||||
/* The serial baud rate */
|
||||
uint32_t baud;
|
||||
/* Whether the device has an active connection or not */
|
||||
bool is_connected;
|
||||
} meshtastic_SerialConnectionStatus;
|
||||
|
||||
typedef struct _meshtastic_DeviceConnectionStatus {
|
||||
/* WiFi Status */
|
||||
bool has_wifi;
|
||||
meshtastic_WifiConnectionStatus wifi;
|
||||
/* WiFi Status */
|
||||
bool has_ethernet;
|
||||
meshtastic_EthernetConnectionStatus ethernet;
|
||||
/* Bluetooth Status */
|
||||
bool has_bluetooth;
|
||||
meshtastic_BluetoothConnectionStatus bluetooth;
|
||||
/* Serial Status */
|
||||
bool has_serial;
|
||||
meshtastic_SerialConnectionStatus serial;
|
||||
} meshtastic_DeviceConnectionStatus;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceConnectionStatus_init_default {false, meshtastic_WifiConnectionStatus_init_default, false, meshtastic_EthernetConnectionStatus_init_default, false, meshtastic_BluetoothConnectionStatus_init_default, false, meshtastic_SerialConnectionStatus_init_default}
|
||||
#define meshtastic_WifiConnectionStatus_init_default {false, meshtastic_NetworkConnectionStatus_init_default, "", 0}
|
||||
#define meshtastic_EthernetConnectionStatus_init_default {false, meshtastic_NetworkConnectionStatus_init_default}
|
||||
#define meshtastic_NetworkConnectionStatus_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_BluetoothConnectionStatus_init_default {0, 0, 0}
|
||||
#define meshtastic_SerialConnectionStatus_init_default {0, 0}
|
||||
#define meshtastic_DeviceConnectionStatus_init_zero {false, meshtastic_WifiConnectionStatus_init_zero, false, meshtastic_EthernetConnectionStatus_init_zero, false, meshtastic_BluetoothConnectionStatus_init_zero, false, meshtastic_SerialConnectionStatus_init_zero}
|
||||
#define meshtastic_WifiConnectionStatus_init_zero {false, meshtastic_NetworkConnectionStatus_init_zero, "", 0}
|
||||
#define meshtastic_EthernetConnectionStatus_init_zero {false, meshtastic_NetworkConnectionStatus_init_zero}
|
||||
#define meshtastic_NetworkConnectionStatus_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_BluetoothConnectionStatus_init_zero {0, 0, 0}
|
||||
#define meshtastic_SerialConnectionStatus_init_zero {0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_NetworkConnectionStatus_ip_address_tag 1
|
||||
#define meshtastic_NetworkConnectionStatus_is_connected_tag 2
|
||||
#define meshtastic_NetworkConnectionStatus_is_mqtt_connected_tag 3
|
||||
#define meshtastic_NetworkConnectionStatus_is_syslog_connected_tag 4
|
||||
#define meshtastic_WifiConnectionStatus_status_tag 1
|
||||
#define meshtastic_WifiConnectionStatus_ssid_tag 2
|
||||
#define meshtastic_WifiConnectionStatus_rssi_tag 3
|
||||
#define meshtastic_EthernetConnectionStatus_status_tag 1
|
||||
#define meshtastic_BluetoothConnectionStatus_pin_tag 1
|
||||
#define meshtastic_BluetoothConnectionStatus_rssi_tag 2
|
||||
#define meshtastic_BluetoothConnectionStatus_is_connected_tag 3
|
||||
#define meshtastic_SerialConnectionStatus_baud_tag 1
|
||||
#define meshtastic_SerialConnectionStatus_is_connected_tag 2
|
||||
#define meshtastic_DeviceConnectionStatus_wifi_tag 1
|
||||
#define meshtastic_DeviceConnectionStatus_ethernet_tag 2
|
||||
#define meshtastic_DeviceConnectionStatus_bluetooth_tag 3
|
||||
#define meshtastic_DeviceConnectionStatus_serial_tag 4
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, wifi, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, ethernet, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, bluetooth, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, serial, 4)
|
||||
#define meshtastic_DeviceConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_DeviceConnectionStatus_DEFAULT NULL
|
||||
#define meshtastic_DeviceConnectionStatus_wifi_MSGTYPE meshtastic_WifiConnectionStatus
|
||||
#define meshtastic_DeviceConnectionStatus_ethernet_MSGTYPE meshtastic_EthernetConnectionStatus
|
||||
#define meshtastic_DeviceConnectionStatus_bluetooth_MSGTYPE meshtastic_BluetoothConnectionStatus
|
||||
#define meshtastic_DeviceConnectionStatus_serial_MSGTYPE meshtastic_SerialConnectionStatus
|
||||
|
||||
#define meshtastic_WifiConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, status, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, ssid, 2) \
|
||||
X(a, STATIC, SINGULAR, INT32, rssi, 3)
|
||||
#define meshtastic_WifiConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_WifiConnectionStatus_DEFAULT NULL
|
||||
#define meshtastic_WifiConnectionStatus_status_MSGTYPE meshtastic_NetworkConnectionStatus
|
||||
|
||||
#define meshtastic_EthernetConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, status, 1)
|
||||
#define meshtastic_EthernetConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_EthernetConnectionStatus_DEFAULT NULL
|
||||
#define meshtastic_EthernetConnectionStatus_status_MSGTYPE meshtastic_NetworkConnectionStatus
|
||||
|
||||
#define meshtastic_NetworkConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, ip_address, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_connected, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_mqtt_connected, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_syslog_connected, 4)
|
||||
#define meshtastic_NetworkConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_NetworkConnectionStatus_DEFAULT NULL
|
||||
|
||||
#define meshtastic_BluetoothConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pin, 1) \
|
||||
X(a, STATIC, SINGULAR, INT32, rssi, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_connected, 3)
|
||||
#define meshtastic_BluetoothConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_BluetoothConnectionStatus_DEFAULT NULL
|
||||
|
||||
#define meshtastic_SerialConnectionStatus_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, baud, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_connected, 2)
|
||||
#define meshtastic_SerialConnectionStatus_CALLBACK NULL
|
||||
#define meshtastic_SerialConnectionStatus_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceConnectionStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_WifiConnectionStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_EthernetConnectionStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NetworkConnectionStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_BluetoothConnectionStatus_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SerialConnectionStatus_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_DeviceConnectionStatus_fields &meshtastic_DeviceConnectionStatus_msg
|
||||
#define meshtastic_WifiConnectionStatus_fields &meshtastic_WifiConnectionStatus_msg
|
||||
#define meshtastic_EthernetConnectionStatus_fields &meshtastic_EthernetConnectionStatus_msg
|
||||
#define meshtastic_NetworkConnectionStatus_fields &meshtastic_NetworkConnectionStatus_msg
|
||||
#define meshtastic_BluetoothConnectionStatus_fields &meshtastic_BluetoothConnectionStatus_msg
|
||||
#define meshtastic_SerialConnectionStatus_fields &meshtastic_SerialConnectionStatus_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define meshtastic_BluetoothConnectionStatus_size 19
|
||||
#define meshtastic_DeviceConnectionStatus_size 106
|
||||
#define meshtastic_EthernetConnectionStatus_size 13
|
||||
#define meshtastic_NetworkConnectionStatus_size 11
|
||||
#define meshtastic_SerialConnectionStatus_size 8
|
||||
#define meshtastic_WifiConnectionStatus_size 58
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,7 @@
|
||||
#define PB_MESHTASTIC_MESHTASTIC_DEVICE_METADATA_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/config.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
@@ -29,6 +30,8 @@ typedef struct _meshtastic_DeviceMetadata {
|
||||
meshtastic_Config_DeviceConfig_Role role;
|
||||
/* Indicates the device's current enabled position flags */
|
||||
uint32_t position_flags;
|
||||
/* Device hardware model */
|
||||
meshtastic_HardwareModel hw_model;
|
||||
} meshtastic_DeviceMetadata;
|
||||
|
||||
|
||||
@@ -37,8 +40,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceMetadata_init_default {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0}
|
||||
#define meshtastic_DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0}
|
||||
#define meshtastic_DeviceMetadata_init_default {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN}
|
||||
#define meshtastic_DeviceMetadata_init_zero {"", 0, 0, 0, 0, 0, _meshtastic_Config_DeviceConfig_Role_MIN, 0, _meshtastic_HardwareModel_MIN}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_DeviceMetadata_firmware_version_tag 1
|
||||
@@ -49,6 +52,7 @@ extern "C" {
|
||||
#define meshtastic_DeviceMetadata_hasEthernet_tag 6
|
||||
#define meshtastic_DeviceMetadata_role_tag 7
|
||||
#define meshtastic_DeviceMetadata_position_flags_tag 8
|
||||
#define meshtastic_DeviceMetadata_hw_model_tag 9
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceMetadata_FIELDLIST(X, a) \
|
||||
@@ -59,7 +63,8 @@ X(a, STATIC, SINGULAR, BOOL, hasWifi, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, hasBluetooth, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, hasEthernet, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, position_flags, 8)
|
||||
X(a, STATIC, SINGULAR, UINT32, position_flags, 8) \
|
||||
X(a, STATIC, SINGULAR, UENUM, hw_model, 9)
|
||||
#define meshtastic_DeviceMetadata_CALLBACK NULL
|
||||
#define meshtastic_DeviceMetadata_DEFAULT NULL
|
||||
|
||||
@@ -69,7 +74,7 @@ extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg;
|
||||
#define meshtastic_DeviceMetadata_fields &meshtastic_DeviceMetadata_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define meshtastic_DeviceMetadata_size 41
|
||||
#define meshtastic_DeviceMetadata_size 44
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#define PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#include "meshtastic/localonly.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
@@ -85,6 +86,12 @@ typedef struct _meshtastic_OEMStore {
|
||||
char oem_text[40];
|
||||
/* The default device encryption key, 16 or 32 byte */
|
||||
meshtastic_OEMStore_oem_aes_key_t oem_aes_key;
|
||||
/* A Preset LocalConfig to apply during factory reset */
|
||||
bool has_oem_local_config;
|
||||
meshtastic_LocalConfig oem_local_config;
|
||||
/* A Preset LocalModuleConfig to apply during factory reset */
|
||||
bool has_oem_local_module_config;
|
||||
meshtastic_LocalModuleConfig oem_local_module_config;
|
||||
} meshtastic_OEMStore;
|
||||
|
||||
|
||||
@@ -105,10 +112,10 @@ extern "C" {
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceState_init_default {false, meshtastic_MyNodeInfo_init_default, false, meshtastic_User_init_default, 0, {meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default, meshtastic_NodeInfo_init_default}, 0, {meshtastic_MeshPacket_init_default}, false, meshtastic_MeshPacket_init_default, 0, 0, 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}}}
|
||||
#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_DeviceState_init_zero {false, meshtastic_MyNodeInfo_init_zero, false, meshtastic_User_init_zero, 0, {meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero, meshtastic_NodeInfo_init_zero}, 0, {meshtastic_MeshPacket_init_zero}, false, meshtastic_MeshPacket_init_zero, 0, 0, 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}}}
|
||||
#define meshtastic_OEMStore_init_zero {0, 0, {0, {0}}, _meshtastic_ScreenFonts_MIN, "", {0, {0}}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_DeviceState_my_node_tag 2
|
||||
@@ -127,6 +134,8 @@ extern "C" {
|
||||
#define meshtastic_OEMStore_oem_font_tag 4
|
||||
#define meshtastic_OEMStore_oem_text_tag 5
|
||||
#define meshtastic_OEMStore_oem_aes_key_tag 6
|
||||
#define meshtastic_OEMStore_oem_local_config_tag 7
|
||||
#define meshtastic_OEMStore_oem_local_module_config_tag 8
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceState_FIELDLIST(X, a) \
|
||||
@@ -159,9 +168,13 @@ X(a, STATIC, SINGULAR, UINT32, oem_icon_height, 2) \
|
||||
X(a, STATIC, SINGULAR, BYTES, oem_icon_bits, 3) \
|
||||
X(a, STATIC, SINGULAR, UENUM, oem_font, 4) \
|
||||
X(a, STATIC, SINGULAR, STRING, oem_text, 5) \
|
||||
X(a, STATIC, SINGULAR, BYTES, oem_aes_key, 6)
|
||||
X(a, STATIC, SINGULAR, BYTES, oem_aes_key, 6) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, oem_local_config, 7) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, oem_local_module_config, 8)
|
||||
#define meshtastic_OEMStore_CALLBACK NULL
|
||||
#define meshtastic_OEMStore_DEFAULT NULL
|
||||
#define meshtastic_OEMStore_oem_local_config_MSGTYPE meshtastic_LocalConfig
|
||||
#define meshtastic_OEMStore_oem_local_module_config_MSGTYPE meshtastic_LocalModuleConfig
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceState_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ChannelFile_msg;
|
||||
@@ -175,7 +188,7 @@ extern const pb_msgdesc_t meshtastic_OEMStore_msg;
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define meshtastic_ChannelFile_size 638
|
||||
#define meshtastic_DeviceState_size 21800
|
||||
#define meshtastic_OEMStore_size 2140
|
||||
#define meshtastic_OEMStore_size 2992
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
@@ -12,6 +12,9 @@ PB_BIND(meshtastic_DeviceMetrics, meshtastic_DeviceMetrics, AUTO)
|
||||
PB_BIND(meshtastic_EnvironmentMetrics, meshtastic_EnvironmentMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_AirQualityMetrics, meshtastic_AirQualityMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Telemetry, meshtastic_Telemetry, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#endif
|
||||
|
||||
/* Enum definitions */
|
||||
/* TODO: REPLACE */
|
||||
/* Supported I2C Sensors for telemetry in Meshtastic */
|
||||
typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* No external telemetry sensor explicitly set */
|
||||
meshtastic_TelemetrySensorType_SENSOR_UNSET = 0,
|
||||
@@ -37,7 +37,9 @@ typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* 3-Axis magnetic sensor */
|
||||
meshtastic_TelemetrySensorType_QMC5883L = 11,
|
||||
/* High accuracy temperature and humidity */
|
||||
meshtastic_TelemetrySensorType_SHT31 = 12
|
||||
meshtastic_TelemetrySensorType_SHT31 = 12,
|
||||
/* PM2.5 air quality sensor */
|
||||
meshtastic_TelemetrySensorType_PMSA003I = 13
|
||||
} meshtastic_TelemetrySensorType;
|
||||
|
||||
/* Struct definitions */
|
||||
@@ -69,6 +71,34 @@ typedef struct _meshtastic_EnvironmentMetrics {
|
||||
float current;
|
||||
} meshtastic_EnvironmentMetrics;
|
||||
|
||||
/* Air quality metrics */
|
||||
typedef struct _meshtastic_AirQualityMetrics {
|
||||
/* Standard PM1.0 */
|
||||
uint32_t pm10_standard;
|
||||
/* Standard PM2.5 */
|
||||
uint32_t pm25_standard;
|
||||
/* Standard PM10.0 */
|
||||
uint32_t pm100_standard;
|
||||
/* Environmental PM1.0 */
|
||||
uint32_t pm10_environmental;
|
||||
/* Environmental PM2.5 */
|
||||
uint32_t pm25_environmental;
|
||||
/* Environmental PM10.0 */
|
||||
uint32_t pm100_environmental;
|
||||
/* 0.3um Particle Count */
|
||||
uint32_t particles_03um;
|
||||
/* 0.5um Particle Count */
|
||||
uint32_t particles_05um;
|
||||
/* 1.0um Particle Count */
|
||||
uint32_t particles_10um;
|
||||
/* 2.5um Particle Count */
|
||||
uint32_t particles_25um;
|
||||
/* 5.0um Particle Count */
|
||||
uint32_t particles_50um;
|
||||
/* 10.0um Particle Count */
|
||||
uint32_t particles_100um;
|
||||
} meshtastic_AirQualityMetrics;
|
||||
|
||||
/* Types of Measurements the telemetry module is equipped to handle */
|
||||
typedef struct _meshtastic_Telemetry {
|
||||
/* This is usually not sent over the mesh (to save space), but it is sent
|
||||
@@ -83,6 +113,8 @@ typedef struct _meshtastic_Telemetry {
|
||||
meshtastic_DeviceMetrics device_metrics;
|
||||
/* Weather station or other environmental metrics */
|
||||
meshtastic_EnvironmentMetrics environment_metrics;
|
||||
/* Air quality metrics */
|
||||
meshtastic_AirQualityMetrics air_quality_metrics;
|
||||
} variant;
|
||||
} meshtastic_Telemetry;
|
||||
|
||||
@@ -93,8 +125,9 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_SHT31
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_SHT31+1))
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_PMSA003I
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_PMSA003I+1))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -103,9 +136,11 @@ extern "C" {
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceMetrics_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_EnvironmentMetrics_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_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||
#define meshtastic_DeviceMetrics_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_EnvironmentMetrics_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_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
@@ -119,9 +154,22 @@ extern "C" {
|
||||
#define meshtastic_EnvironmentMetrics_gas_resistance_tag 4
|
||||
#define meshtastic_EnvironmentMetrics_voltage_tag 5
|
||||
#define meshtastic_EnvironmentMetrics_current_tag 6
|
||||
#define meshtastic_AirQualityMetrics_pm10_standard_tag 1
|
||||
#define meshtastic_AirQualityMetrics_pm25_standard_tag 2
|
||||
#define meshtastic_AirQualityMetrics_pm100_standard_tag 3
|
||||
#define meshtastic_AirQualityMetrics_pm10_environmental_tag 4
|
||||
#define meshtastic_AirQualityMetrics_pm25_environmental_tag 5
|
||||
#define meshtastic_AirQualityMetrics_pm100_environmental_tag 6
|
||||
#define meshtastic_AirQualityMetrics_particles_03um_tag 7
|
||||
#define meshtastic_AirQualityMetrics_particles_05um_tag 8
|
||||
#define meshtastic_AirQualityMetrics_particles_10um_tag 9
|
||||
#define meshtastic_AirQualityMetrics_particles_25um_tag 10
|
||||
#define meshtastic_AirQualityMetrics_particles_50um_tag 11
|
||||
#define meshtastic_AirQualityMetrics_particles_100um_tag 12
|
||||
#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
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceMetrics_FIELDLIST(X, a) \
|
||||
@@ -142,28 +190,49 @@ X(a, STATIC, SINGULAR, FLOAT, current, 6)
|
||||
#define meshtastic_EnvironmentMetrics_CALLBACK NULL
|
||||
#define meshtastic_EnvironmentMetrics_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)
|
||||
#define meshtastic_AirQualityMetrics_CALLBACK NULL
|
||||
#define meshtastic_AirQualityMetrics_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,environment_metrics,variant.environment_metrics), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,air_quality_metrics,variant.air_quality_metrics), 4)
|
||||
#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
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_EnvironmentMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AirQualityMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Telemetry_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_DeviceMetrics_fields &meshtastic_DeviceMetrics_msg
|
||||
#define meshtastic_EnvironmentMetrics_fields &meshtastic_EnvironmentMetrics_msg
|
||||
#define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg
|
||||
#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define meshtastic_AirQualityMetrics_size 72
|
||||
#define meshtastic_DeviceMetrics_size 21
|
||||
#define meshtastic_EnvironmentMetrics_size 30
|
||||
#define meshtastic_Telemetry_size 37
|
||||
#define meshtastic_Telemetry_size 79
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
||||
Reference in New Issue
Block a user