2023-01-18 13:42:53 +00:00
|
|
|
/* Automatically generated nanopb header */
|
|
|
|
|
/* Generated by nanopb-0.4.7 */
|
|
|
|
|
|
|
|
|
|
#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICE_METADATA_PB_H_INCLUDED
|
|
|
|
|
#define PB_MESHTASTIC_MESHTASTIC_DEVICE_METADATA_PB_H_INCLUDED
|
|
|
|
|
#include <pb.h>
|
2023-01-21 18:22:19 +01:00
|
|
|
#include "meshtastic/config.pb.h"
|
2023-02-02 14:05:58 -06:00
|
|
|
#include "meshtastic/mesh.pb.h"
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
|
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Struct definitions */
|
|
|
|
|
/* Device metadata response */
|
2023-01-21 18:22:19 +01:00
|
|
|
typedef struct _meshtastic_DeviceMetadata {
|
2023-01-18 13:42:53 +00:00
|
|
|
/* Device firmware version string */
|
|
|
|
|
char firmware_version[18];
|
|
|
|
|
/* Device state version */
|
|
|
|
|
uint32_t device_state_version;
|
|
|
|
|
/* Indicates whether the device can shutdown CPU natively or via power management chip */
|
|
|
|
|
bool canShutdown;
|
|
|
|
|
/* Indicates that the device has native wifi capability */
|
|
|
|
|
bool hasWifi;
|
|
|
|
|
/* Indicates that the device has native bluetooth capability */
|
|
|
|
|
bool hasBluetooth;
|
|
|
|
|
/* Indicates that the device has an ethernet peripheral */
|
|
|
|
|
bool hasEthernet;
|
|
|
|
|
/* Indicates that the device's role in the mesh */
|
2023-01-21 18:22:19 +01:00
|
|
|
meshtastic_Config_DeviceConfig_Role role;
|
2023-01-18 13:42:53 +00:00
|
|
|
/* Indicates the device's current enabled position flags */
|
2023-01-18 21:12:03 +00:00
|
|
|
uint32_t position_flags;
|
2023-02-02 14:05:58 -06:00
|
|
|
/* Device hardware model */
|
|
|
|
|
meshtastic_HardwareModel hw_model;
|
2023-01-21 18:22:19 +01:00
|
|
|
} meshtastic_DeviceMetadata;
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Initializer values for message structs */
|
2023-02-02 14:05:58 -06:00
|
|
|
#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}
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
2023-01-21 18:22:19 +01:00
|
|
|
#define meshtastic_DeviceMetadata_firmware_version_tag 1
|
|
|
|
|
#define meshtastic_DeviceMetadata_device_state_version_tag 2
|
|
|
|
|
#define meshtastic_DeviceMetadata_canShutdown_tag 3
|
|
|
|
|
#define meshtastic_DeviceMetadata_hasWifi_tag 4
|
|
|
|
|
#define meshtastic_DeviceMetadata_hasBluetooth_tag 5
|
|
|
|
|
#define meshtastic_DeviceMetadata_hasEthernet_tag 6
|
|
|
|
|
#define meshtastic_DeviceMetadata_role_tag 7
|
|
|
|
|
#define meshtastic_DeviceMetadata_position_flags_tag 8
|
2023-02-02 14:05:58 -06:00
|
|
|
#define meshtastic_DeviceMetadata_hw_model_tag 9
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
/* Struct field encoding specification for nanopb */
|
2023-01-21 18:22:19 +01:00
|
|
|
#define meshtastic_DeviceMetadata_FIELDLIST(X, a) \
|
2023-01-18 13:42:53 +00:00
|
|
|
X(a, STATIC, SINGULAR, STRING, firmware_version, 1) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UINT32, device_state_version, 2) \
|
|
|
|
|
X(a, STATIC, SINGULAR, BOOL, canShutdown, 3) \
|
|
|
|
|
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) \
|
2023-02-02 14:05:58 -06:00
|
|
|
X(a, STATIC, SINGULAR, UINT32, position_flags, 8) \
|
|
|
|
|
X(a, STATIC, SINGULAR, UENUM, hw_model, 9)
|
2023-01-21 18:22:19 +01:00
|
|
|
#define meshtastic_DeviceMetadata_CALLBACK NULL
|
|
|
|
|
#define meshtastic_DeviceMetadata_DEFAULT NULL
|
2023-01-18 13:42:53 +00:00
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
extern const pb_msgdesc_t meshtastic_DeviceMetadata_msg;
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
2023-01-21 18:22:19 +01:00
|
|
|
#define meshtastic_DeviceMetadata_fields &meshtastic_DeviceMetadata_msg
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
2023-02-02 14:05:58 -06:00
|
|
|
#define meshtastic_DeviceMetadata_size 44
|
2023-01-18 13:42:53 +00:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
} /* extern "C" */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|