@@ -0,0 +1,2 @@
|
||||
DisableFormat: true
|
||||
SortIncludes: false
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/admin.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_AdminMessage, meshtastic_AdminMessage, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_AdminMessage_InputEvent, meshtastic_AdminMessage_InputEvent, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_HamParameters, meshtastic_HamParameters, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeRemoteHardwarePinsResponse, meshtastic_NodeRemoteHardwarePinsResponse, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_SharedContact, meshtastic_SharedContact, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_KeyVerificationAdmin, meshtastic_KeyVerificationAdmin, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,553 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_ADMIN_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#include "meshtastic/config.pb.h"
|
||||
#include "meshtastic/connection_status.pb.h"
|
||||
#include "meshtastic/device_ui.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
#include "meshtastic/module_config.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Enum definitions */
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_AdminMessage_ConfigType {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG = 0,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_POSITION_CONFIG = 1,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_POWER_CONFIG = 2,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_NETWORK_CONFIG = 3,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_DISPLAY_CONFIG = 4,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_LORA_CONFIG = 5,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_BLUETOOTH_CONFIG = 6,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ConfigType_SECURITY_CONFIG = 7,
|
||||
/* Session key config */
|
||||
meshtastic_AdminMessage_ConfigType_SESSIONKEY_CONFIG = 8,
|
||||
/* device-ui config */
|
||||
meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG = 9
|
||||
} meshtastic_AdminMessage_ConfigType;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_AdminMessage_ModuleConfigType {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG = 0,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_SERIAL_CONFIG = 1,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_EXTNOTIF_CONFIG = 2,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_STOREFORWARD_CONFIG = 3,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_RANGETEST_CONFIG = 4,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_TELEMETRY_CONFIG = 5,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_CANNEDMSG_CONFIG = 6,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_AUDIO_CONFIG = 7,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_REMOTEHARDWARE_CONFIG = 8,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_NEIGHBORINFO_CONFIG = 9,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_AMBIENTLIGHTING_CONFIG = 10,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_DETECTIONSENSOR_CONFIG = 11,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG = 12
|
||||
} meshtastic_AdminMessage_ModuleConfigType;
|
||||
|
||||
typedef enum _meshtastic_AdminMessage_BackupLocation {
|
||||
/* Backup to the internal flash */
|
||||
meshtastic_AdminMessage_BackupLocation_FLASH = 0,
|
||||
/* Backup to the SD card */
|
||||
meshtastic_AdminMessage_BackupLocation_SD = 1
|
||||
} meshtastic_AdminMessage_BackupLocation;
|
||||
|
||||
/* Three stages of this request. */
|
||||
typedef enum _meshtastic_KeyVerificationAdmin_MessageType {
|
||||
/* This is the first stage, where a client initiates */
|
||||
meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION = 0,
|
||||
/* After the nonce has been returned over the mesh, the client prompts for the security number
|
||||
And uses this message to provide it to the node. */
|
||||
meshtastic_KeyVerificationAdmin_MessageType_PROVIDE_SECURITY_NUMBER = 1,
|
||||
/* Once the user has compared the verification message, this message notifies the node. */
|
||||
meshtastic_KeyVerificationAdmin_MessageType_DO_VERIFY = 2,
|
||||
/* This is the cancel path, can be taken at any point */
|
||||
meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY = 3
|
||||
} meshtastic_KeyVerificationAdmin_MessageType;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Input event message to be sent to the node. */
|
||||
typedef struct _meshtastic_AdminMessage_InputEvent {
|
||||
/* The input event code */
|
||||
uint8_t event_code;
|
||||
/* Keyboard character code */
|
||||
uint8_t kb_char;
|
||||
/* The touch X coordinate */
|
||||
uint16_t touch_x;
|
||||
/* The touch Y coordinate */
|
||||
uint16_t touch_y;
|
||||
} meshtastic_AdminMessage_InputEvent;
|
||||
|
||||
/* 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;
|
||||
/* Optional short name of user */
|
||||
char short_name[5];
|
||||
} meshtastic_HamParameters;
|
||||
|
||||
/* Response envelope for node_remote_hardware_pins */
|
||||
typedef struct _meshtastic_NodeRemoteHardwarePinsResponse {
|
||||
/* Nodes and their respective remote hardware GPIO pins */
|
||||
pb_size_t node_remote_hardware_pins_count;
|
||||
meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[16];
|
||||
} meshtastic_NodeRemoteHardwarePinsResponse;
|
||||
|
||||
typedef struct _meshtastic_SharedContact {
|
||||
/* The node number of the contact */
|
||||
uint32_t node_num;
|
||||
/* The User of the contact */
|
||||
bool has_user;
|
||||
meshtastic_User user;
|
||||
/* Add this contact to the blocked / ignored list */
|
||||
bool should_ignore;
|
||||
/* Set the IS_KEY_MANUALLY_VERIFIED bit */
|
||||
bool manually_verified;
|
||||
} meshtastic_SharedContact;
|
||||
|
||||
/* This message is used by a client to initiate or complete a key verification */
|
||||
typedef struct _meshtastic_KeyVerificationAdmin {
|
||||
meshtastic_KeyVerificationAdmin_MessageType message_type;
|
||||
/* The nodenum we're requesting */
|
||||
uint32_t remote_nodenum;
|
||||
/* The nonce is used to track the connection */
|
||||
uint64_t nonce;
|
||||
/* The 4 digit code generated by the remote node, and communicated outside the mesh */
|
||||
bool has_security_number;
|
||||
uint32_t security_number;
|
||||
} meshtastic_KeyVerificationAdmin;
|
||||
|
||||
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) */
|
||||
typedef struct _meshtastic_AdminMessage {
|
||||
pb_size_t which_payload_variant;
|
||||
union {
|
||||
/* Send the specified channel in the response to this message
|
||||
NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present) */
|
||||
uint32_t get_channel_request;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_Channel get_channel_response;
|
||||
/* Send the current owner data in the response to this message. */
|
||||
bool get_owner_request;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_User get_owner_response;
|
||||
/* Ask for the following config data to be sent */
|
||||
meshtastic_AdminMessage_ConfigType get_config_request;
|
||||
/* Send the current Config in the response to this message. */
|
||||
meshtastic_Config get_config_response;
|
||||
/* Ask for the following config data to be sent */
|
||||
meshtastic_AdminMessage_ModuleConfigType get_module_config_request;
|
||||
/* Send the current Config in the response to this message. */
|
||||
meshtastic_ModuleConfig get_module_config_response;
|
||||
/* Get the Canned Message Module messages in the response to this message. */
|
||||
bool get_canned_message_module_messages_request;
|
||||
/* Get the Canned Message Module messages in the response to this message. */
|
||||
char get_canned_message_module_messages_response[201];
|
||||
/* Request the node to send device metadata (firmware, protobuf version, etc) */
|
||||
bool get_device_metadata_request;
|
||||
/* Device metadata response */
|
||||
meshtastic_DeviceMetadata get_device_metadata_response;
|
||||
/* Get the Ringtone in the response to this message. */
|
||||
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;
|
||||
/* Get the mesh's nodes with their available gpio pins for RemoteHardware module use */
|
||||
bool get_node_remote_hardware_pins_request;
|
||||
/* Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use */
|
||||
meshtastic_NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response;
|
||||
/* Enter (UF2) DFU mode
|
||||
Only implemented on NRF52 currently */
|
||||
bool enter_dfu_mode_request;
|
||||
/* Delete the file by the specified path from the device */
|
||||
char delete_file_request[201];
|
||||
/* Set zero and offset for scale chips */
|
||||
uint32_t set_scale;
|
||||
/* Backup the node's preferences */
|
||||
meshtastic_AdminMessage_BackupLocation backup_preferences;
|
||||
/* Restore the node's preferences */
|
||||
meshtastic_AdminMessage_BackupLocation restore_preferences;
|
||||
/* Remove backups of the node's preferences */
|
||||
meshtastic_AdminMessage_BackupLocation remove_backup_preferences;
|
||||
/* Send an input event to the node.
|
||||
This is used to trigger physical input events like button presses, touch events, etc. */
|
||||
meshtastic_AdminMessage_InputEvent send_input_event;
|
||||
/* Set the owner for this node */
|
||||
meshtastic_User set_owner;
|
||||
/* Set channels (using the new API).
|
||||
A special channel is the "primary channel".
|
||||
The other records are secondary channels.
|
||||
Note: only one channel can be marked as primary.
|
||||
If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically. */
|
||||
meshtastic_Channel set_channel;
|
||||
/* Set the current Config */
|
||||
meshtastic_Config set_config;
|
||||
/* Set the current Config */
|
||||
meshtastic_ModuleConfig set_module_config;
|
||||
/* Set the Canned Message Module messages text. */
|
||||
char set_canned_message_module_messages[201];
|
||||
/* Set the ringtone for ExternalNotification. */
|
||||
char set_ringtone_message[231];
|
||||
/* Remove the node by the specified node-num from the NodeDB on the device */
|
||||
uint32_t remove_by_nodenum;
|
||||
/* Set specified node-num to be favorited on the NodeDB on the device */
|
||||
uint32_t set_favorite_node;
|
||||
/* Set specified node-num to be un-favorited on the NodeDB on the device */
|
||||
uint32_t remove_favorite_node;
|
||||
/* Set fixed position data on the node and then set the position.fixed_position = true */
|
||||
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;
|
||||
/* Tell the node to send the stored ui data. */
|
||||
bool get_ui_config_request;
|
||||
/* Reply stored device ui data. */
|
||||
meshtastic_DeviceUIConfig get_ui_config_response;
|
||||
/* Tell the node to store UI data persistently. */
|
||||
meshtastic_DeviceUIConfig store_ui_config;
|
||||
/* Set specified node-num to be ignored on the NodeDB on the device */
|
||||
uint32_t set_ignored_node;
|
||||
/* Set specified node-num to be un-ignored on the NodeDB on the device */
|
||||
uint32_t remove_ignored_node;
|
||||
/* 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;
|
||||
/* Add a contact (User) to the nodedb */
|
||||
meshtastic_SharedContact add_contact;
|
||||
/* Initiate or respond to a key verification request */
|
||||
meshtastic_KeyVerificationAdmin key_verification;
|
||||
/* 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;
|
||||
/* This message is only supported for the simulator Portduino build.
|
||||
If received the simulator will exit successfully. */
|
||||
bool exit_simulator;
|
||||
/* Tell the node to reboot in this many seconds (or <0 to cancel reboot) */
|
||||
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 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.
|
||||
When true, favorites are preserved through reset. */
|
||||
bool 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;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_AdminMessage_ConfigType_MIN meshtastic_AdminMessage_ConfigType_DEVICE_CONFIG
|
||||
#define _meshtastic_AdminMessage_ConfigType_MAX meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG
|
||||
#define _meshtastic_AdminMessage_ConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ConfigType)(meshtastic_AdminMessage_ConfigType_DEVICEUI_CONFIG+1))
|
||||
|
||||
#define _meshtastic_AdminMessage_ModuleConfigType_MIN meshtastic_AdminMessage_ModuleConfigType_MQTT_CONFIG
|
||||
#define _meshtastic_AdminMessage_ModuleConfigType_MAX meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG
|
||||
#define _meshtastic_AdminMessage_ModuleConfigType_ARRAYSIZE ((meshtastic_AdminMessage_ModuleConfigType)(meshtastic_AdminMessage_ModuleConfigType_PAXCOUNTER_CONFIG+1))
|
||||
|
||||
#define _meshtastic_AdminMessage_BackupLocation_MIN meshtastic_AdminMessage_BackupLocation_FLASH
|
||||
#define _meshtastic_AdminMessage_BackupLocation_MAX meshtastic_AdminMessage_BackupLocation_SD
|
||||
#define _meshtastic_AdminMessage_BackupLocation_ARRAYSIZE ((meshtastic_AdminMessage_BackupLocation)(meshtastic_AdminMessage_BackupLocation_SD+1))
|
||||
|
||||
#define _meshtastic_KeyVerificationAdmin_MessageType_MIN meshtastic_KeyVerificationAdmin_MessageType_INITIATE_VERIFICATION
|
||||
#define _meshtastic_KeyVerificationAdmin_MessageType_MAX meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY
|
||||
#define _meshtastic_KeyVerificationAdmin_MessageType_ARRAYSIZE ((meshtastic_KeyVerificationAdmin_MessageType)(meshtastic_KeyVerificationAdmin_MessageType_DO_NOT_VERIFY+1))
|
||||
|
||||
#define meshtastic_AdminMessage_payload_variant_get_config_request_ENUMTYPE meshtastic_AdminMessage_ConfigType
|
||||
#define meshtastic_AdminMessage_payload_variant_get_module_config_request_ENUMTYPE meshtastic_AdminMessage_ModuleConfigType
|
||||
#define meshtastic_AdminMessage_payload_variant_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation
|
||||
#define meshtastic_AdminMessage_payload_variant_restore_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation
|
||||
#define meshtastic_AdminMessage_payload_variant_remove_backup_preferences_ENUMTYPE meshtastic_AdminMessage_BackupLocation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define meshtastic_KeyVerificationAdmin_message_type_ENUMTYPE meshtastic_KeyVerificationAdmin_MessageType
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_AdminMessage_init_default {0, {0}, {0, {0}}}
|
||||
#define meshtastic_AdminMessage_InputEvent_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_SharedContact_init_default {0, false, meshtastic_User_init_default, 0, 0}
|
||||
#define meshtastic_KeyVerificationAdmin_init_default {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||
#define meshtastic_AdminMessage_init_zero {0, {0}, {0, {0}}}
|
||||
#define meshtastic_AdminMessage_InputEvent_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}}
|
||||
#define meshtastic_SharedContact_init_zero {0, false, meshtastic_User_init_zero, 0, 0}
|
||||
#define meshtastic_KeyVerificationAdmin_init_zero {_meshtastic_KeyVerificationAdmin_MessageType_MIN, 0, 0, false, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_AdminMessage_InputEvent_event_code_tag 1
|
||||
#define meshtastic_AdminMessage_InputEvent_kb_char_tag 2
|
||||
#define meshtastic_AdminMessage_InputEvent_touch_x_tag 3
|
||||
#define meshtastic_AdminMessage_InputEvent_touch_y_tag 4
|
||||
#define meshtastic_HamParameters_call_sign_tag 1
|
||||
#define meshtastic_HamParameters_tx_power_tag 2
|
||||
#define meshtastic_HamParameters_frequency_tag 3
|
||||
#define meshtastic_HamParameters_short_name_tag 4
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_tag 1
|
||||
#define meshtastic_SharedContact_node_num_tag 1
|
||||
#define meshtastic_SharedContact_user_tag 2
|
||||
#define meshtastic_SharedContact_should_ignore_tag 3
|
||||
#define meshtastic_SharedContact_manually_verified_tag 4
|
||||
#define meshtastic_KeyVerificationAdmin_message_type_tag 1
|
||||
#define meshtastic_KeyVerificationAdmin_remote_nodenum_tag 2
|
||||
#define meshtastic_KeyVerificationAdmin_nonce_tag 3
|
||||
#define meshtastic_KeyVerificationAdmin_security_number_tag 4
|
||||
#define meshtastic_AdminMessage_get_channel_request_tag 1
|
||||
#define meshtastic_AdminMessage_get_channel_response_tag 2
|
||||
#define meshtastic_AdminMessage_get_owner_request_tag 3
|
||||
#define meshtastic_AdminMessage_get_owner_response_tag 4
|
||||
#define meshtastic_AdminMessage_get_config_request_tag 5
|
||||
#define meshtastic_AdminMessage_get_config_response_tag 6
|
||||
#define meshtastic_AdminMessage_get_module_config_request_tag 7
|
||||
#define meshtastic_AdminMessage_get_module_config_response_tag 8
|
||||
#define meshtastic_AdminMessage_get_canned_message_module_messages_request_tag 10
|
||||
#define meshtastic_AdminMessage_get_canned_message_module_messages_response_tag 11
|
||||
#define meshtastic_AdminMessage_get_device_metadata_request_tag 12
|
||||
#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_get_node_remote_hardware_pins_request_tag 19
|
||||
#define meshtastic_AdminMessage_get_node_remote_hardware_pins_response_tag 20
|
||||
#define meshtastic_AdminMessage_enter_dfu_mode_request_tag 21
|
||||
#define meshtastic_AdminMessage_delete_file_request_tag 22
|
||||
#define meshtastic_AdminMessage_set_scale_tag 23
|
||||
#define meshtastic_AdminMessage_backup_preferences_tag 24
|
||||
#define meshtastic_AdminMessage_restore_preferences_tag 25
|
||||
#define meshtastic_AdminMessage_remove_backup_preferences_tag 26
|
||||
#define meshtastic_AdminMessage_send_input_event_tag 27
|
||||
#define meshtastic_AdminMessage_set_owner_tag 32
|
||||
#define meshtastic_AdminMessage_set_channel_tag 33
|
||||
#define meshtastic_AdminMessage_set_config_tag 34
|
||||
#define meshtastic_AdminMessage_set_module_config_tag 35
|
||||
#define meshtastic_AdminMessage_set_canned_message_module_messages_tag 36
|
||||
#define meshtastic_AdminMessage_set_ringtone_message_tag 37
|
||||
#define meshtastic_AdminMessage_remove_by_nodenum_tag 38
|
||||
#define meshtastic_AdminMessage_set_favorite_node_tag 39
|
||||
#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_get_ui_config_request_tag 44
|
||||
#define meshtastic_AdminMessage_get_ui_config_response_tag 45
|
||||
#define meshtastic_AdminMessage_store_ui_config_tag 46
|
||||
#define meshtastic_AdminMessage_set_ignored_node_tag 47
|
||||
#define meshtastic_AdminMessage_remove_ignored_node_tag 48
|
||||
#define meshtastic_AdminMessage_begin_edit_settings_tag 64
|
||||
#define meshtastic_AdminMessage_commit_edit_settings_tag 65
|
||||
#define meshtastic_AdminMessage_add_contact_tag 66
|
||||
#define meshtastic_AdminMessage_key_verification_tag 67
|
||||
#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_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) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,get_channel_request,get_channel_request), 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_channel_response,get_channel_response), 2) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_owner_request,get_owner_request), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_owner_response,get_owner_response), 4) \
|
||||
X(a, STATIC, ONEOF, UENUM, (payload_variant,get_config_request,get_config_request), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_config_response,get_config_response), 6) \
|
||||
X(a, STATIC, ONEOF, UENUM, (payload_variant,get_module_config_request,get_module_config_request), 7) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_module_config_response,get_module_config_response), 8) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_canned_message_module_messages_request,get_canned_message_module_messages_request), 10) \
|
||||
X(a, STATIC, ONEOF, STRING, (payload_variant,get_canned_message_module_messages_response,get_canned_message_module_messages_response), 11) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,get_device_metadata_request,get_device_metadata_request), 12) \
|
||||
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, BOOL, (payload_variant,get_node_remote_hardware_pins_request,get_node_remote_hardware_pins_request), 19) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_node_remote_hardware_pins_response,get_node_remote_hardware_pins_response), 20) \
|
||||
X(a, STATIC, ONEOF, BOOL, (payload_variant,enter_dfu_mode_request,enter_dfu_mode_request), 21) \
|
||||
X(a, STATIC, ONEOF, STRING, (payload_variant,delete_file_request,delete_file_request), 22) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,set_scale,set_scale), 23) \
|
||||
X(a, STATIC, ONEOF, UENUM, (payload_variant,backup_preferences,backup_preferences), 24) \
|
||||
X(a, STATIC, ONEOF, UENUM, (payload_variant,restore_preferences,restore_preferences), 25) \
|
||||
X(a, STATIC, ONEOF, UENUM, (payload_variant,remove_backup_preferences,remove_backup_preferences), 26) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,send_input_event,send_input_event), 27) \
|
||||
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) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,set_module_config,set_module_config), 35) \
|
||||
X(a, STATIC, ONEOF, STRING, (payload_variant,set_canned_message_module_messages,set_canned_message_module_messages), 36) \
|
||||
X(a, STATIC, ONEOF, STRING, (payload_variant,set_ringtone_message,set_ringtone_message), 37) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_by_nodenum,remove_by_nodenum), 38) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,set_favorite_node,set_favorite_node), 39) \
|
||||
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,get_ui_config_request,get_ui_config_request), 44) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,get_ui_config_response,get_ui_config_response), 45) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,store_ui_config,store_ui_config), 46) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,set_ignored_node,set_ignored_node), 47) \
|
||||
X(a, STATIC, ONEOF, UINT32, (payload_variant,remove_ignored_node,remove_ignored_node), 48) \
|
||||
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, MESSAGE, (payload_variant,add_contact,add_contact), 66) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,key_verification,key_verification), 67) \
|
||||
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_config,factory_reset_config), 99) \
|
||||
X(a, STATIC, ONEOF, BOOL, (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
|
||||
#define meshtastic_AdminMessage_payload_variant_get_owner_response_MSGTYPE meshtastic_User
|
||||
#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_get_node_remote_hardware_pins_response_MSGTYPE meshtastic_NodeRemoteHardwarePinsResponse
|
||||
#define meshtastic_AdminMessage_payload_variant_send_input_event_MSGTYPE meshtastic_AdminMessage_InputEvent
|
||||
#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_AdminMessage_payload_variant_set_fixed_position_MSGTYPE meshtastic_Position
|
||||
#define meshtastic_AdminMessage_payload_variant_get_ui_config_response_MSGTYPE meshtastic_DeviceUIConfig
|
||||
#define meshtastic_AdminMessage_payload_variant_store_ui_config_MSGTYPE meshtastic_DeviceUIConfig
|
||||
#define meshtastic_AdminMessage_payload_variant_add_contact_MSGTYPE meshtastic_SharedContact
|
||||
#define meshtastic_AdminMessage_payload_variant_key_verification_MSGTYPE meshtastic_KeyVerificationAdmin
|
||||
|
||||
#define meshtastic_AdminMessage_InputEvent_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, event_code, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, kb_char, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, touch_x, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, touch_y, 4)
|
||||
#define meshtastic_AdminMessage_InputEvent_CALLBACK NULL
|
||||
#define meshtastic_AdminMessage_InputEvent_DEFAULT NULL
|
||||
|
||||
#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) \
|
||||
X(a, STATIC, SINGULAR, STRING, short_name, 4)
|
||||
#define meshtastic_HamParameters_CALLBACK NULL
|
||||
#define meshtastic_HamParameters_DEFAULT NULL
|
||||
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_FIELDLIST(X, a) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, node_remote_hardware_pins, 1)
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_CALLBACK NULL
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_DEFAULT NULL
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin
|
||||
|
||||
#define meshtastic_SharedContact_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, node_num, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, user, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, should_ignore, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, manually_verified, 4)
|
||||
#define meshtastic_SharedContact_CALLBACK NULL
|
||||
#define meshtastic_SharedContact_DEFAULT NULL
|
||||
#define meshtastic_SharedContact_user_MSGTYPE meshtastic_User
|
||||
|
||||
#define meshtastic_KeyVerificationAdmin_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, message_type, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, remote_nodenum, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT64, nonce, 3) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, security_number, 4)
|
||||
#define meshtastic_KeyVerificationAdmin_CALLBACK NULL
|
||||
#define meshtastic_KeyVerificationAdmin_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_msg;
|
||||
extern const pb_msgdesc_t meshtastic_AdminMessage_InputEvent_msg;
|
||||
extern const pb_msgdesc_t meshtastic_HamParameters_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NodeRemoteHardwarePinsResponse_msg;
|
||||
extern const pb_msgdesc_t meshtastic_SharedContact_msg;
|
||||
extern const pb_msgdesc_t meshtastic_KeyVerificationAdmin_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_AdminMessage_fields &meshtastic_AdminMessage_msg
|
||||
#define meshtastic_AdminMessage_InputEvent_fields &meshtastic_AdminMessage_InputEvent_msg
|
||||
#define meshtastic_HamParameters_fields &meshtastic_HamParameters_msg
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_fields &meshtastic_NodeRemoteHardwarePinsResponse_msg
|
||||
#define meshtastic_SharedContact_fields &meshtastic_SharedContact_msg
|
||||
#define meshtastic_KeyVerificationAdmin_fields &meshtastic_KeyVerificationAdmin_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_ADMIN_PB_H_MAX_SIZE meshtastic_AdminMessage_size
|
||||
#define meshtastic_AdminMessage_InputEvent_size 14
|
||||
#define meshtastic_AdminMessage_size 511
|
||||
#define meshtastic_HamParameters_size 31
|
||||
#define meshtastic_KeyVerificationAdmin_size 25
|
||||
#define meshtastic_NodeRemoteHardwarePinsResponse_size 496
|
||||
#define meshtastic_SharedContact_size 127
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/apponly.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_ChannelSet, meshtastic_ChannelSet, 2)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_APPONLY_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#include "meshtastic/config.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
/* This is the most compact possible representation for a set of channels.
|
||||
It includes only one PRIMARY channel (which must be first) and
|
||||
any SECONDARY channels.
|
||||
No DISABLED channels are included.
|
||||
This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL */
|
||||
typedef struct _meshtastic_ChannelSet {
|
||||
/* Channel list with settings */
|
||||
pb_size_t settings_count;
|
||||
meshtastic_ChannelSettings settings[8];
|
||||
/* LoRa config */
|
||||
bool has_lora_config;
|
||||
meshtastic_Config_LoRaConfig lora_config;
|
||||
} meshtastic_ChannelSet;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_ChannelSet_init_default {0, {meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default, meshtastic_ChannelSettings_init_default}, false, meshtastic_Config_LoRaConfig_init_default}
|
||||
#define meshtastic_ChannelSet_init_zero {0, {meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero, meshtastic_ChannelSettings_init_zero}, false, meshtastic_Config_LoRaConfig_init_zero}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_ChannelSet_settings_tag 1
|
||||
#define meshtastic_ChannelSet_lora_config_tag 2
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_ChannelSet_FIELDLIST(X, a) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, settings, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, lora_config, 2)
|
||||
#define meshtastic_ChannelSet_CALLBACK NULL
|
||||
#define meshtastic_ChannelSet_DEFAULT NULL
|
||||
#define meshtastic_ChannelSet_settings_MSGTYPE meshtastic_ChannelSettings
|
||||
#define meshtastic_ChannelSet_lora_config_MSGTYPE meshtastic_Config_LoRaConfig
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_ChannelSet_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_ChannelSet_fields &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 679
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/atak.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_TAKPacket, meshtastic_TAKPacket, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_GeoChat, meshtastic_GeoChat, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Group, meshtastic_Group, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Status, meshtastic_Status, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Contact, meshtastic_Contact, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_PLI, meshtastic_PLI, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_ATAK_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_ATAK_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 */
|
||||
typedef enum _meshtastic_Team {
|
||||
/* Unspecifed */
|
||||
meshtastic_Team_Unspecifed_Color = 0,
|
||||
/* White */
|
||||
meshtastic_Team_White = 1,
|
||||
/* Yellow */
|
||||
meshtastic_Team_Yellow = 2,
|
||||
/* Orange */
|
||||
meshtastic_Team_Orange = 3,
|
||||
/* Magenta */
|
||||
meshtastic_Team_Magenta = 4,
|
||||
/* Red */
|
||||
meshtastic_Team_Red = 5,
|
||||
/* Maroon */
|
||||
meshtastic_Team_Maroon = 6,
|
||||
/* Purple */
|
||||
meshtastic_Team_Purple = 7,
|
||||
/* Dark Blue */
|
||||
meshtastic_Team_Dark_Blue = 8,
|
||||
/* Blue */
|
||||
meshtastic_Team_Blue = 9,
|
||||
/* Cyan */
|
||||
meshtastic_Team_Cyan = 10,
|
||||
/* Teal */
|
||||
meshtastic_Team_Teal = 11,
|
||||
/* Green */
|
||||
meshtastic_Team_Green = 12,
|
||||
/* Dark Green */
|
||||
meshtastic_Team_Dark_Green = 13,
|
||||
/* Brown */
|
||||
meshtastic_Team_Brown = 14
|
||||
} meshtastic_Team;
|
||||
|
||||
/* Role of the group member */
|
||||
typedef enum _meshtastic_MemberRole {
|
||||
/* Unspecifed */
|
||||
meshtastic_MemberRole_Unspecifed = 0,
|
||||
/* Team Member */
|
||||
meshtastic_MemberRole_TeamMember = 1,
|
||||
/* Team Lead */
|
||||
meshtastic_MemberRole_TeamLead = 2,
|
||||
/* Headquarters */
|
||||
meshtastic_MemberRole_HQ = 3,
|
||||
/* Airsoft enthusiast */
|
||||
meshtastic_MemberRole_Sniper = 4,
|
||||
/* Medic */
|
||||
meshtastic_MemberRole_Medic = 5,
|
||||
/* ForwardObserver */
|
||||
meshtastic_MemberRole_ForwardObserver = 6,
|
||||
/* Radio Telephone Operator */
|
||||
meshtastic_MemberRole_RTO = 7,
|
||||
/* Doggo */
|
||||
meshtastic_MemberRole_K9 = 8
|
||||
} meshtastic_MemberRole;
|
||||
|
||||
/* Struct definitions */
|
||||
/* ATAK GeoChat message */
|
||||
typedef struct _meshtastic_GeoChat {
|
||||
/* The text message */
|
||||
char message[200];
|
||||
/* Uid recipient of the message */
|
||||
bool has_to;
|
||||
char to[120];
|
||||
/* Callsign of the recipient for the message */
|
||||
bool has_to_callsign;
|
||||
char to_callsign[120];
|
||||
} meshtastic_GeoChat;
|
||||
|
||||
/* ATAK Group
|
||||
<__group role='Team Member' name='Cyan'/> */
|
||||
typedef struct _meshtastic_Group {
|
||||
/* Role of the group member */
|
||||
meshtastic_MemberRole role;
|
||||
/* Team (color)
|
||||
Default Cyan */
|
||||
meshtastic_Team team;
|
||||
} meshtastic_Group;
|
||||
|
||||
/* ATAK EUD Status
|
||||
<status battery='100' /> */
|
||||
typedef struct _meshtastic_Status {
|
||||
/* Battery level */
|
||||
uint8_t battery;
|
||||
} meshtastic_Status;
|
||||
|
||||
/* ATAK Contact
|
||||
<contact endpoint='0.0.0.0:4242:tcp' phone='+12345678' callsign='FALKE'/> */
|
||||
typedef struct _meshtastic_Contact {
|
||||
/* Callsign */
|
||||
char callsign[120];
|
||||
/* Device callsign */
|
||||
char device_callsign[120]; /* IP address of endpoint in integer form (0.0.0.0 default) */
|
||||
} meshtastic_Contact;
|
||||
|
||||
/* Position Location Information from ATAK */
|
||||
typedef struct _meshtastic_PLI {
|
||||
/* The new preferred location encoding, multiply by 1e-7 to get degrees
|
||||
in floating point */
|
||||
int32_t latitude_i;
|
||||
/* The new preferred location encoding, multiply by 1e-7 to get degrees
|
||||
in floating point */
|
||||
int32_t longitude_i;
|
||||
/* Altitude (ATAK prefers HAE) */
|
||||
int32_t altitude;
|
||||
/* Speed */
|
||||
uint32_t speed;
|
||||
/* Course in degrees */
|
||||
uint16_t course;
|
||||
} meshtastic_PLI;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(220) meshtastic_TAKPacket_detail_t;
|
||||
/* Packets for the official ATAK Plugin */
|
||||
typedef struct _meshtastic_TAKPacket {
|
||||
/* Are the payloads strings compressed for LoRA transport? */
|
||||
bool is_compressed;
|
||||
/* The contact / callsign for ATAK user */
|
||||
bool has_contact;
|
||||
meshtastic_Contact contact;
|
||||
/* The group for ATAK user */
|
||||
bool has_group;
|
||||
meshtastic_Group group;
|
||||
/* The status of the ATAK EUD */
|
||||
bool has_status;
|
||||
meshtastic_Status status;
|
||||
pb_size_t which_payload_variant;
|
||||
union {
|
||||
/* TAK position report */
|
||||
meshtastic_PLI pli;
|
||||
/* ATAK GeoChat message */
|
||||
meshtastic_GeoChat chat;
|
||||
/* Generic CoT detail XML
|
||||
May be compressed / truncated by the sender (EUD) */
|
||||
meshtastic_TAKPacket_detail_t detail;
|
||||
} payload_variant;
|
||||
} meshtastic_TAKPacket;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_Team_MIN meshtastic_Team_Unspecifed_Color
|
||||
#define _meshtastic_Team_MAX meshtastic_Team_Brown
|
||||
#define _meshtastic_Team_ARRAYSIZE ((meshtastic_Team)(meshtastic_Team_Brown+1))
|
||||
|
||||
#define _meshtastic_MemberRole_MIN meshtastic_MemberRole_Unspecifed
|
||||
#define _meshtastic_MemberRole_MAX meshtastic_MemberRole_K9
|
||||
#define _meshtastic_MemberRole_ARRAYSIZE ((meshtastic_MemberRole)(meshtastic_MemberRole_K9+1))
|
||||
|
||||
|
||||
|
||||
#define meshtastic_Group_role_ENUMTYPE meshtastic_MemberRole
|
||||
#define meshtastic_Group_team_ENUMTYPE meshtastic_Team
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_TAKPacket_init_default {0, false, meshtastic_Contact_init_default, false, meshtastic_Group_init_default, false, meshtastic_Status_init_default, 0, {meshtastic_PLI_init_default}}
|
||||
#define meshtastic_GeoChat_init_default {"", false, "", false, ""}
|
||||
#define meshtastic_Group_init_default {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN}
|
||||
#define meshtastic_Status_init_default {0}
|
||||
#define meshtastic_Contact_init_default {"", ""}
|
||||
#define meshtastic_PLI_init_default {0, 0, 0, 0, 0}
|
||||
#define meshtastic_TAKPacket_init_zero {0, false, meshtastic_Contact_init_zero, false, meshtastic_Group_init_zero, false, meshtastic_Status_init_zero, 0, {meshtastic_PLI_init_zero}}
|
||||
#define meshtastic_GeoChat_init_zero {"", false, "", false, ""}
|
||||
#define meshtastic_Group_init_zero {_meshtastic_MemberRole_MIN, _meshtastic_Team_MIN}
|
||||
#define meshtastic_Status_init_zero {0}
|
||||
#define meshtastic_Contact_init_zero {"", ""}
|
||||
#define meshtastic_PLI_init_zero {0, 0, 0, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_GeoChat_message_tag 1
|
||||
#define meshtastic_GeoChat_to_tag 2
|
||||
#define meshtastic_GeoChat_to_callsign_tag 3
|
||||
#define meshtastic_Group_role_tag 1
|
||||
#define meshtastic_Group_team_tag 2
|
||||
#define meshtastic_Status_battery_tag 1
|
||||
#define meshtastic_Contact_callsign_tag 1
|
||||
#define meshtastic_Contact_device_callsign_tag 2
|
||||
#define meshtastic_PLI_latitude_i_tag 1
|
||||
#define meshtastic_PLI_longitude_i_tag 2
|
||||
#define meshtastic_PLI_altitude_tag 3
|
||||
#define meshtastic_PLI_speed_tag 4
|
||||
#define meshtastic_PLI_course_tag 5
|
||||
#define meshtastic_TAKPacket_is_compressed_tag 1
|
||||
#define meshtastic_TAKPacket_contact_tag 2
|
||||
#define meshtastic_TAKPacket_group_tag 3
|
||||
#define meshtastic_TAKPacket_status_tag 4
|
||||
#define meshtastic_TAKPacket_pli_tag 5
|
||||
#define meshtastic_TAKPacket_chat_tag 6
|
||||
#define meshtastic_TAKPacket_detail_tag 7
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_TAKPacket_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_compressed, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, contact, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, group, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, status, 4) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,pli,payload_variant.pli), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,chat,payload_variant.chat), 6) \
|
||||
X(a, STATIC, ONEOF, BYTES, (payload_variant,detail,payload_variant.detail), 7)
|
||||
#define meshtastic_TAKPacket_CALLBACK NULL
|
||||
#define meshtastic_TAKPacket_DEFAULT NULL
|
||||
#define meshtastic_TAKPacket_contact_MSGTYPE meshtastic_Contact
|
||||
#define meshtastic_TAKPacket_group_MSGTYPE meshtastic_Group
|
||||
#define meshtastic_TAKPacket_status_MSGTYPE meshtastic_Status
|
||||
#define meshtastic_TAKPacket_payload_variant_pli_MSGTYPE meshtastic_PLI
|
||||
#define meshtastic_TAKPacket_payload_variant_chat_MSGTYPE meshtastic_GeoChat
|
||||
|
||||
#define meshtastic_GeoChat_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, message, 1) \
|
||||
X(a, STATIC, OPTIONAL, STRING, to, 2) \
|
||||
X(a, STATIC, OPTIONAL, STRING, to_callsign, 3)
|
||||
#define meshtastic_GeoChat_CALLBACK NULL
|
||||
#define meshtastic_GeoChat_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Group_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 1) \
|
||||
X(a, STATIC, SINGULAR, UENUM, team, 2)
|
||||
#define meshtastic_Group_CALLBACK NULL
|
||||
#define meshtastic_Group_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Status_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, battery, 1)
|
||||
#define meshtastic_Status_CALLBACK NULL
|
||||
#define meshtastic_Status_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Contact_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, callsign, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, device_callsign, 2)
|
||||
#define meshtastic_Contact_CALLBACK NULL
|
||||
#define meshtastic_Contact_DEFAULT NULL
|
||||
|
||||
#define meshtastic_PLI_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, SINGULAR, UINT32, speed, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, course, 5)
|
||||
#define meshtastic_PLI_CALLBACK NULL
|
||||
#define meshtastic_PLI_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_TAKPacket_msg;
|
||||
extern const pb_msgdesc_t meshtastic_GeoChat_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Group_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Status_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Contact_msg;
|
||||
extern const pb_msgdesc_t meshtastic_PLI_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_TAKPacket_fields &meshtastic_TAKPacket_msg
|
||||
#define meshtastic_GeoChat_fields &meshtastic_GeoChat_msg
|
||||
#define meshtastic_Group_fields &meshtastic_Group_msg
|
||||
#define meshtastic_Status_fields &meshtastic_Status_msg
|
||||
#define meshtastic_Contact_fields &meshtastic_Contact_msg
|
||||
#define meshtastic_PLI_fields &meshtastic_PLI_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_ATAK_PB_H_MAX_SIZE meshtastic_TAKPacket_size
|
||||
#define meshtastic_Contact_size 242
|
||||
#define meshtastic_GeoChat_size 444
|
||||
#define meshtastic_Group_size 4
|
||||
#define meshtastic_PLI_size 31
|
||||
#define meshtastic_Status_size 3
|
||||
#define meshtastic_TAKPacket_size 705
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/cannedmessages.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_CannedMessageModuleConfig, meshtastic_CannedMessageModuleConfig, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_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 */
|
||||
/* Canned message module configuration. */
|
||||
typedef struct _meshtastic_CannedMessageModuleConfig {
|
||||
/* Predefined messages for canned message module separated by '|' characters. */
|
||||
char messages[201];
|
||||
} meshtastic_CannedMessageModuleConfig;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_CannedMessageModuleConfig_init_default {""}
|
||||
#define meshtastic_CannedMessageModuleConfig_init_zero {""}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_CannedMessageModuleConfig_messages_tag 1
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_CannedMessageModuleConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, messages, 1)
|
||||
#define meshtastic_CannedMessageModuleConfig_CALLBACK NULL
|
||||
#define meshtastic_CannedMessageModuleConfig_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_CannedMessageModuleConfig_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_CannedMessageModuleConfig_fields &meshtastic_CannedMessageModuleConfig_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_CANNEDMESSAGES_PB_H_MAX_SIZE meshtastic_CannedMessageModuleConfig_size
|
||||
#define meshtastic_CannedMessageModuleConfig_size 203
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_ChannelSettings, meshtastic_ChannelSettings, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleSettings, meshtastic_ModuleSettings, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Channel, meshtastic_Channel, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_CHANNEL_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 */
|
||||
/* How this channel is being used (or not).
|
||||
Note: this field is an enum to give us options for the future.
|
||||
In particular, someday we might make a 'SCANNING' option.
|
||||
SCANNING channels could have different frequencies and the radio would
|
||||
occasionally check that freq to see if anything is being transmitted.
|
||||
For devices that have multiple physical radios attached, we could keep multiple PRIMARY/SCANNING channels active at once to allow
|
||||
cross band routing as needed.
|
||||
If a device has only a single radio (the common case) only one channel can be PRIMARY at a time
|
||||
(but any number of SECONDARY channels can't be sent received on that common frequency) */
|
||||
typedef enum _meshtastic_Channel_Role {
|
||||
/* This channel is not in use right now */
|
||||
meshtastic_Channel_Role_DISABLED = 0,
|
||||
/* This channel is used to set the frequency for the radio - all other enabled channels must be SECONDARY */
|
||||
meshtastic_Channel_Role_PRIMARY = 1,
|
||||
/* Secondary channels are only used for encryption/decryption/authentication purposes.
|
||||
Their radio settings (freq etc) are ignored, only psk is used. */
|
||||
meshtastic_Channel_Role_SECONDARY = 2
|
||||
} meshtastic_Channel_Role;
|
||||
|
||||
/* Struct definitions */
|
||||
/* This message is specifically for modules to store per-channel configuration data. */
|
||||
typedef struct _meshtastic_ModuleSettings {
|
||||
/* Bits of precision for the location sent in position packets. */
|
||||
uint32_t position_precision;
|
||||
/* Controls whether or not the client / device should mute the current channel
|
||||
Useful for noisy public channels you don't necessarily want to disable */
|
||||
bool is_muted;
|
||||
} meshtastic_ModuleSettings;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(32) meshtastic_ChannelSettings_psk_t;
|
||||
/* This information can be encoded as a QRcode/url so that other users can configure
|
||||
their radio to join the same channel.
|
||||
A note about how channel names are shown to users: channelname-X
|
||||
poundsymbol is a prefix used to indicate this is a channel name (idea from @professr).
|
||||
Where X is a letter from A-Z (base 26) representing a hash of the PSK for this
|
||||
channel - so that if the user changes anything about the channel (which does
|
||||
force a new PSK) this letter will also change. Thus preventing user confusion if
|
||||
two friends try to type in a channel name of "BobsChan" and then can't talk
|
||||
because their PSKs will be different.
|
||||
The PSK is hashed into this letter by "0x41 + [xor all bytes of the psk ] modulo 26"
|
||||
This also allows the option of someday if people have the PSK off (zero), the
|
||||
users COULD type in a channel name and be able to talk.
|
||||
FIXME: Add description of multi-channel support and how primary vs secondary channels are used.
|
||||
FIXME: explain how apps use channels for security.
|
||||
explain how remote settings and remote gpio are managed as an example */
|
||||
typedef struct _meshtastic_ChannelSettings {
|
||||
/* Deprecated in favor of LoraConfig.channel_num */
|
||||
uint32_t channel_num;
|
||||
/* A simple pre-shared key for now for crypto.
|
||||
Must be either 0 bytes (no crypto), 16 bytes (AES128), or 32 bytes (AES256).
|
||||
A special shorthand is used for 1 byte long psks.
|
||||
These psks should be treated as only minimally secure,
|
||||
because they are listed in this source code.
|
||||
Those bytes are mapped using the following scheme:
|
||||
`0` = No crypto
|
||||
`1` = The special "default" channel key: {0xd4, 0xf1, 0xbb, 0x3a, 0x20, 0x29, 0x07, 0x59, 0xf0, 0xbc, 0xff, 0xab, 0xcf, 0x4e, 0x69, 0x01}
|
||||
`2` through 10 = The default channel key, except with 1 through 9 added to the last byte.
|
||||
Shown to user as simple1 through 10 */
|
||||
meshtastic_ChannelSettings_psk_t psk;
|
||||
/* A SHORT name that will be packed into the URL.
|
||||
Less than 12 bytes.
|
||||
Something for end users to call the channel
|
||||
If this is the empty string it is assumed that this channel
|
||||
is the special (minimally secure) "Default"channel.
|
||||
In user interfaces it should be rendered as a local language translation of "X".
|
||||
For channel_num hashing empty string will be treated as "X".
|
||||
Where "X" is selected based on the English words listed above for ModemPreset */
|
||||
char name[12];
|
||||
/* Used to construct a globally unique channel ID.
|
||||
The full globally unique ID will be: "name.id" where ID is shown as base36.
|
||||
Assuming that the number of meshtastic users is below 20K (true for a long time)
|
||||
the chance of this 64 bit random number colliding with anyone else is super low.
|
||||
And the penalty for collision is low as well, it just means that anyone trying to decrypt channel messages might need to
|
||||
try multiple candidate channels.
|
||||
Any time a non wire compatible change is made to a channel, this field should be regenerated.
|
||||
There are a small number of 'special' globally known (and fairly) insecure standard channels.
|
||||
Those channels do not have a numeric id included in the settings, but instead it is pulled from
|
||||
a table of well known IDs.
|
||||
(see Well Known Channels FIXME) */
|
||||
uint32_t id;
|
||||
/* If true, messages on the mesh will be sent to the *public* internet by any gateway ndoe */
|
||||
bool uplink_enabled;
|
||||
/* If true, messages seen on the internet will be forwarded to the local mesh. */
|
||||
bool downlink_enabled;
|
||||
/* Per-channel module settings. */
|
||||
bool has_module_settings;
|
||||
meshtastic_ModuleSettings module_settings;
|
||||
} meshtastic_ChannelSettings;
|
||||
|
||||
/* A pair of a channel number, mode and the (sharable) settings for that channel */
|
||||
typedef struct _meshtastic_Channel {
|
||||
/* The index of this channel in the channel table (from 0 to MAX_NUM_CHANNELS-1)
|
||||
(Someday - not currently implemented) An index of -1 could be used to mean "set by name",
|
||||
in which case the target node will find and set the channel by settings.name. */
|
||||
int8_t index;
|
||||
/* The new settings, or NULL to disable that channel */
|
||||
bool has_settings;
|
||||
meshtastic_ChannelSettings settings;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_Channel_Role role;
|
||||
} meshtastic_Channel;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_Channel_Role_MIN meshtastic_Channel_Role_DISABLED
|
||||
#define _meshtastic_Channel_Role_MAX meshtastic_Channel_Role_SECONDARY
|
||||
#define _meshtastic_Channel_Role_ARRAYSIZE ((meshtastic_Channel_Role)(meshtastic_Channel_Role_SECONDARY+1))
|
||||
|
||||
|
||||
|
||||
#define meshtastic_Channel_role_ENUMTYPE meshtastic_Channel_Role
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_ChannelSettings_init_default {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_default}
|
||||
#define meshtastic_ModuleSettings_init_default {0, 0}
|
||||
#define meshtastic_Channel_init_default {0, false, meshtastic_ChannelSettings_init_default, _meshtastic_Channel_Role_MIN}
|
||||
#define meshtastic_ChannelSettings_init_zero {0, {0, {0}}, "", 0, 0, 0, false, meshtastic_ModuleSettings_init_zero}
|
||||
#define meshtastic_ModuleSettings_init_zero {0, 0}
|
||||
#define meshtastic_Channel_init_zero {0, false, meshtastic_ChannelSettings_init_zero, _meshtastic_Channel_Role_MIN}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_ModuleSettings_position_precision_tag 1
|
||||
#define meshtastic_ModuleSettings_is_muted_tag 2
|
||||
#define meshtastic_ChannelSettings_channel_num_tag 1
|
||||
#define meshtastic_ChannelSettings_psk_tag 2
|
||||
#define meshtastic_ChannelSettings_name_tag 3
|
||||
#define meshtastic_ChannelSettings_id_tag 4
|
||||
#define meshtastic_ChannelSettings_uplink_enabled_tag 5
|
||||
#define meshtastic_ChannelSettings_downlink_enabled_tag 6
|
||||
#define meshtastic_ChannelSettings_module_settings_tag 7
|
||||
#define meshtastic_Channel_index_tag 1
|
||||
#define meshtastic_Channel_settings_tag 2
|
||||
#define meshtastic_Channel_role_tag 3
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_ChannelSettings_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, channel_num, 1) \
|
||||
X(a, STATIC, SINGULAR, BYTES, psk, 2) \
|
||||
X(a, STATIC, SINGULAR, STRING, name, 3) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, id, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, uplink_enabled, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, downlink_enabled, 6) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, module_settings, 7)
|
||||
#define meshtastic_ChannelSettings_CALLBACK NULL
|
||||
#define meshtastic_ChannelSettings_DEFAULT NULL
|
||||
#define meshtastic_ChannelSettings_module_settings_MSGTYPE meshtastic_ModuleSettings
|
||||
|
||||
#define meshtastic_ModuleSettings_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, position_precision, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_muted, 2)
|
||||
#define meshtastic_ModuleSettings_CALLBACK NULL
|
||||
#define meshtastic_ModuleSettings_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Channel_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, INT32, index, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, settings, 2) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 3)
|
||||
#define meshtastic_Channel_CALLBACK NULL
|
||||
#define meshtastic_Channel_DEFAULT NULL
|
||||
#define meshtastic_Channel_settings_MSGTYPE meshtastic_ChannelSettings
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_ChannelSettings_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleSettings_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Channel_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_ChannelSettings_fields &meshtastic_ChannelSettings_msg
|
||||
#define meshtastic_ModuleSettings_fields &meshtastic_ModuleSettings_msg
|
||||
#define meshtastic_Channel_fields &meshtastic_Channel_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_CHANNEL_PB_H_MAX_SIZE meshtastic_Channel_size
|
||||
#define meshtastic_ChannelSettings_size 72
|
||||
#define meshtastic_Channel_size 87
|
||||
#define meshtastic_ModuleSettings_size 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/clientonly.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_DeviceProfile, meshtastic_DeviceProfile, 2)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_CLIENTONLY_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/localonly.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
/* This abstraction is used to contain any configuration for provisioning a node on any client.
|
||||
It is useful for importing and exporting configurations. */
|
||||
typedef struct _meshtastic_DeviceProfile {
|
||||
/* Long name for the node */
|
||||
bool has_long_name;
|
||||
char long_name[40];
|
||||
/* Short name of the node */
|
||||
bool has_short_name;
|
||||
char short_name[5];
|
||||
/* The url of the channels from our node */
|
||||
pb_callback_t channel_url;
|
||||
/* The Config of the node */
|
||||
bool has_config;
|
||||
meshtastic_LocalConfig config;
|
||||
/* The ModuleConfig of the node */
|
||||
bool has_module_config;
|
||||
meshtastic_LocalModuleConfig module_config;
|
||||
/* Fixed position data */
|
||||
bool has_fixed_position;
|
||||
meshtastic_Position fixed_position;
|
||||
/* Ringtone for ExternalNotification */
|
||||
bool has_ringtone;
|
||||
char ringtone[231];
|
||||
/* Predefined messages for CannedMessage */
|
||||
bool has_canned_messages;
|
||||
char canned_messages[201];
|
||||
} meshtastic_DeviceProfile;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceProfile_init_default {false, "", false, "", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default, false, meshtastic_Position_init_default, false, "", false, ""}
|
||||
#define meshtastic_DeviceProfile_init_zero {false, "", false, "", {{NULL}, NULL}, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero, false, meshtastic_Position_init_zero, false, "", false, ""}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_DeviceProfile_long_name_tag 1
|
||||
#define meshtastic_DeviceProfile_short_name_tag 2
|
||||
#define meshtastic_DeviceProfile_channel_url_tag 3
|
||||
#define meshtastic_DeviceProfile_config_tag 4
|
||||
#define meshtastic_DeviceProfile_module_config_tag 5
|
||||
#define meshtastic_DeviceProfile_fixed_position_tag 6
|
||||
#define meshtastic_DeviceProfile_ringtone_tag 7
|
||||
#define meshtastic_DeviceProfile_canned_messages_tag 8
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceProfile_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, STRING, long_name, 1) \
|
||||
X(a, STATIC, OPTIONAL, STRING, short_name, 2) \
|
||||
X(a, CALLBACK, OPTIONAL, STRING, channel_url, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, config, 4) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, module_config, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, fixed_position, 6) \
|
||||
X(a, STATIC, OPTIONAL, STRING, ringtone, 7) \
|
||||
X(a, STATIC, OPTIONAL, STRING, canned_messages, 8)
|
||||
#define meshtastic_DeviceProfile_CALLBACK pb_default_field_callback
|
||||
#define meshtastic_DeviceProfile_DEFAULT NULL
|
||||
#define meshtastic_DeviceProfile_config_MSGTYPE meshtastic_LocalConfig
|
||||
#define meshtastic_DeviceProfile_module_config_MSGTYPE meshtastic_LocalModuleConfig
|
||||
#define meshtastic_DeviceProfile_fixed_position_MSGTYPE meshtastic_Position
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceProfile_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_DeviceProfile_fields &meshtastic_DeviceProfile_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
/* meshtastic_DeviceProfile_size depends on runtime parameters */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/config.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_Config, meshtastic_Config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_DeviceConfig, meshtastic_Config_DeviceConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_PositionConfig, meshtastic_Config_PositionConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_PowerConfig, meshtastic_Config_PowerConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_NetworkConfig, meshtastic_Config_NetworkConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_NetworkConfig_IpV4Config, meshtastic_Config_NetworkConfig_IpV4Config, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Config_DisplayConfig, meshtastic_Config_DisplayConfig, AUTO)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#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)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#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 {
|
||||
/* 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_MESHTASTIC_CONNECTION_STATUS_PB_H_MAX_SIZE meshtastic_DeviceConnectionStatus_size
|
||||
#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
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/device_ui.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_DeviceUIConfig, meshtastic_DeviceUIConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeFilter, meshtastic_NodeFilter, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeHighlight, meshtastic_NodeHighlight, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_GeoPoint, meshtastic_GeoPoint, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Map, meshtastic_Map, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,368 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_DEVICE_UI_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 */
|
||||
typedef enum _meshtastic_CompassMode {
|
||||
/* Compass with dynamic ring and heading */
|
||||
meshtastic_CompassMode_DYNAMIC = 0,
|
||||
/* Compass with fixed ring and heading */
|
||||
meshtastic_CompassMode_FIXED_RING = 1,
|
||||
/* Compass with heading and freeze option */
|
||||
meshtastic_CompassMode_FREEZE_HEADING = 2
|
||||
} meshtastic_CompassMode;
|
||||
|
||||
typedef enum _meshtastic_Theme {
|
||||
/* Dark */
|
||||
meshtastic_Theme_DARK = 0,
|
||||
/* Light */
|
||||
meshtastic_Theme_LIGHT = 1,
|
||||
/* Red */
|
||||
meshtastic_Theme_RED = 2
|
||||
} meshtastic_Theme;
|
||||
|
||||
/* Localization */
|
||||
typedef enum _meshtastic_Language {
|
||||
/* English */
|
||||
meshtastic_Language_ENGLISH = 0,
|
||||
/* French */
|
||||
meshtastic_Language_FRENCH = 1,
|
||||
/* German */
|
||||
meshtastic_Language_GERMAN = 2,
|
||||
/* Italian */
|
||||
meshtastic_Language_ITALIAN = 3,
|
||||
/* Portuguese */
|
||||
meshtastic_Language_PORTUGUESE = 4,
|
||||
/* Spanish */
|
||||
meshtastic_Language_SPANISH = 5,
|
||||
/* Swedish */
|
||||
meshtastic_Language_SWEDISH = 6,
|
||||
/* Finnish */
|
||||
meshtastic_Language_FINNISH = 7,
|
||||
/* Polish */
|
||||
meshtastic_Language_POLISH = 8,
|
||||
/* Turkish */
|
||||
meshtastic_Language_TURKISH = 9,
|
||||
/* Serbian */
|
||||
meshtastic_Language_SERBIAN = 10,
|
||||
/* Russian */
|
||||
meshtastic_Language_RUSSIAN = 11,
|
||||
/* Dutch */
|
||||
meshtastic_Language_DUTCH = 12,
|
||||
/* Greek */
|
||||
meshtastic_Language_GREEK = 13,
|
||||
/* Norwegian */
|
||||
meshtastic_Language_NORWEGIAN = 14,
|
||||
/* Slovenian */
|
||||
meshtastic_Language_SLOVENIAN = 15,
|
||||
/* Ukrainian */
|
||||
meshtastic_Language_UKRAINIAN = 16,
|
||||
/* Bulgarian */
|
||||
meshtastic_Language_BULGARIAN = 17,
|
||||
/* Czech */
|
||||
meshtastic_Language_CZECH = 18,
|
||||
/* Danish */
|
||||
meshtastic_Language_DANISH = 19,
|
||||
/* Simplified Chinese (experimental) */
|
||||
meshtastic_Language_SIMPLIFIED_CHINESE = 30,
|
||||
/* Traditional Chinese (experimental) */
|
||||
meshtastic_Language_TRADITIONAL_CHINESE = 31
|
||||
} meshtastic_Language;
|
||||
|
||||
/* How the GPS coordinates are displayed on the OLED screen. */
|
||||
typedef enum _meshtastic_DeviceUIConfig_GpsCoordinateFormat {
|
||||
/* GPS coordinates are displayed in the normal decimal degrees format:
|
||||
DD.DDDDDD DDD.DDDDDD */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC = 0,
|
||||
/* GPS coordinates are displayed in the degrees minutes seconds format:
|
||||
DD°MM'SS"C DDD°MM'SS"C, where C is the compass point representing the locations quadrant */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_DMS = 1,
|
||||
/* Universal Transverse Mercator format:
|
||||
ZZB EEEEEE NNNNNNN, where Z is zone, B is band, E is easting, N is northing */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_UTM = 2,
|
||||
/* Military Grid Reference System format:
|
||||
ZZB CD EEEEE NNNNN, where Z is zone, B is band, C is the east 100k square, D is the north 100k square,
|
||||
E is easting, N is northing */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_MGRS = 3,
|
||||
/* Open Location Code (aka Plus Codes). */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_OLC = 4,
|
||||
/* Ordnance Survey Grid Reference (the National Grid System of the UK).
|
||||
Format: AB EEEEE NNNNN, where A is the east 100k square, B is the north 100k square,
|
||||
E is the easting, N is the northing */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_OSGR = 5,
|
||||
/* Maidenhead Locator System
|
||||
Described here: https://en.wikipedia.org/wiki/Maidenhead_Locator_System */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS = 6
|
||||
} meshtastic_DeviceUIConfig_GpsCoordinateFormat;
|
||||
|
||||
/* Struct definitions */
|
||||
typedef struct _meshtastic_NodeFilter {
|
||||
/* Filter unknown nodes */
|
||||
bool unknown_switch;
|
||||
/* Filter offline nodes */
|
||||
bool offline_switch;
|
||||
/* Filter nodes w/o public key */
|
||||
bool public_key_switch;
|
||||
/* Filter based on hops away */
|
||||
int8_t hops_away;
|
||||
/* Filter nodes w/o position */
|
||||
bool position_switch;
|
||||
/* Filter nodes by matching name string */
|
||||
char node_name[16];
|
||||
/* Filter based on channel */
|
||||
int8_t channel;
|
||||
} meshtastic_NodeFilter;
|
||||
|
||||
typedef struct _meshtastic_NodeHighlight {
|
||||
/* Hightlight nodes w/ active chat */
|
||||
bool chat_switch;
|
||||
/* Highlight nodes w/ position */
|
||||
bool position_switch;
|
||||
/* Highlight nodes w/ telemetry data */
|
||||
bool telemetry_switch;
|
||||
/* Highlight nodes w/ iaq data */
|
||||
bool iaq_switch;
|
||||
/* Highlight nodes by matching name string */
|
||||
char node_name[16];
|
||||
} meshtastic_NodeHighlight;
|
||||
|
||||
typedef struct _meshtastic_GeoPoint {
|
||||
/* Zoom level */
|
||||
int8_t zoom;
|
||||
/* Coordinate: latitude */
|
||||
int32_t latitude;
|
||||
/* Coordinate: longitude */
|
||||
int32_t longitude;
|
||||
} meshtastic_GeoPoint;
|
||||
|
||||
typedef struct _meshtastic_Map {
|
||||
/* Home coordinates */
|
||||
bool has_home;
|
||||
meshtastic_GeoPoint home;
|
||||
/* Map tile style */
|
||||
char style[20];
|
||||
/* Map scroll follows GPS */
|
||||
bool follow_gps;
|
||||
} meshtastic_Map;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(16) meshtastic_DeviceUIConfig_calibration_data_t;
|
||||
typedef struct _meshtastic_DeviceUIConfig {
|
||||
/* A version integer used to invalidate saved files when we make incompatible changes. */
|
||||
uint32_t version;
|
||||
/* TFT display brightness 1..255 */
|
||||
uint8_t screen_brightness;
|
||||
/* Screen timeout 0..900 */
|
||||
uint16_t screen_timeout;
|
||||
/* Screen/Settings lock enabled */
|
||||
bool screen_lock;
|
||||
bool settings_lock;
|
||||
uint32_t pin_code;
|
||||
/* Color theme */
|
||||
meshtastic_Theme theme;
|
||||
/* Audible message, banner and ring tone */
|
||||
bool alert_enabled;
|
||||
bool banner_enabled;
|
||||
uint8_t ring_tone_id;
|
||||
/* Localization */
|
||||
meshtastic_Language language;
|
||||
/* Node list filter */
|
||||
bool has_node_filter;
|
||||
meshtastic_NodeFilter node_filter;
|
||||
/* Node list highlightening */
|
||||
bool has_node_highlight;
|
||||
meshtastic_NodeHighlight node_highlight;
|
||||
/* 8 integers for screen calibration data */
|
||||
meshtastic_DeviceUIConfig_calibration_data_t calibration_data;
|
||||
/* Map related data */
|
||||
bool has_map_data;
|
||||
meshtastic_Map map_data;
|
||||
/* Compass mode */
|
||||
meshtastic_CompassMode compass_mode;
|
||||
/* RGB color for BaseUI
|
||||
0xRRGGBB format, e.g. 0xFF0000 for red */
|
||||
uint32_t screen_rgb_color;
|
||||
/* Clockface analog style
|
||||
true for analog clockface, false for digital clockface */
|
||||
bool is_clockface_analog;
|
||||
/* How the GPS coordinates are formatted on the OLED screen. */
|
||||
meshtastic_DeviceUIConfig_GpsCoordinateFormat gps_format;
|
||||
} meshtastic_DeviceUIConfig;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_CompassMode_MIN meshtastic_CompassMode_DYNAMIC
|
||||
#define _meshtastic_CompassMode_MAX meshtastic_CompassMode_FREEZE_HEADING
|
||||
#define _meshtastic_CompassMode_ARRAYSIZE ((meshtastic_CompassMode)(meshtastic_CompassMode_FREEZE_HEADING+1))
|
||||
|
||||
#define _meshtastic_Theme_MIN meshtastic_Theme_DARK
|
||||
#define _meshtastic_Theme_MAX meshtastic_Theme_RED
|
||||
#define _meshtastic_Theme_ARRAYSIZE ((meshtastic_Theme)(meshtastic_Theme_RED+1))
|
||||
|
||||
#define _meshtastic_Language_MIN meshtastic_Language_ENGLISH
|
||||
#define _meshtastic_Language_MAX meshtastic_Language_TRADITIONAL_CHINESE
|
||||
#define _meshtastic_Language_ARRAYSIZE ((meshtastic_Language)(meshtastic_Language_TRADITIONAL_CHINESE+1))
|
||||
|
||||
#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN meshtastic_DeviceUIConfig_GpsCoordinateFormat_DEC
|
||||
#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MAX meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS
|
||||
#define _meshtastic_DeviceUIConfig_GpsCoordinateFormat_ARRAYSIZE ((meshtastic_DeviceUIConfig_GpsCoordinateFormat)(meshtastic_DeviceUIConfig_GpsCoordinateFormat_MLS+1))
|
||||
|
||||
#define meshtastic_DeviceUIConfig_theme_ENUMTYPE meshtastic_Theme
|
||||
#define meshtastic_DeviceUIConfig_language_ENUMTYPE meshtastic_Language
|
||||
#define meshtastic_DeviceUIConfig_compass_mode_ENUMTYPE meshtastic_CompassMode
|
||||
#define meshtastic_DeviceUIConfig_gps_format_ENUMTYPE meshtastic_DeviceUIConfig_GpsCoordinateFormat
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_DeviceUIConfig_init_default {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_default, false, meshtastic_NodeHighlight_init_default, {0, {0}}, false, meshtastic_Map_init_default, _meshtastic_CompassMode_MIN, 0, 0, _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN}
|
||||
#define meshtastic_NodeFilter_init_default {0, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_NodeHighlight_init_default {0, 0, 0, 0, ""}
|
||||
#define meshtastic_GeoPoint_init_default {0, 0, 0}
|
||||
#define meshtastic_Map_init_default {false, meshtastic_GeoPoint_init_default, "", 0}
|
||||
#define meshtastic_DeviceUIConfig_init_zero {0, 0, 0, 0, 0, 0, _meshtastic_Theme_MIN, 0, 0, 0, _meshtastic_Language_MIN, false, meshtastic_NodeFilter_init_zero, false, meshtastic_NodeHighlight_init_zero, {0, {0}}, false, meshtastic_Map_init_zero, _meshtastic_CompassMode_MIN, 0, 0, _meshtastic_DeviceUIConfig_GpsCoordinateFormat_MIN}
|
||||
#define meshtastic_NodeFilter_init_zero {0, 0, 0, 0, 0, "", 0}
|
||||
#define meshtastic_NodeHighlight_init_zero {0, 0, 0, 0, ""}
|
||||
#define meshtastic_GeoPoint_init_zero {0, 0, 0}
|
||||
#define meshtastic_Map_init_zero {false, meshtastic_GeoPoint_init_zero, "", 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_NodeFilter_unknown_switch_tag 1
|
||||
#define meshtastic_NodeFilter_offline_switch_tag 2
|
||||
#define meshtastic_NodeFilter_public_key_switch_tag 3
|
||||
#define meshtastic_NodeFilter_hops_away_tag 4
|
||||
#define meshtastic_NodeFilter_position_switch_tag 5
|
||||
#define meshtastic_NodeFilter_node_name_tag 6
|
||||
#define meshtastic_NodeFilter_channel_tag 7
|
||||
#define meshtastic_NodeHighlight_chat_switch_tag 1
|
||||
#define meshtastic_NodeHighlight_position_switch_tag 2
|
||||
#define meshtastic_NodeHighlight_telemetry_switch_tag 3
|
||||
#define meshtastic_NodeHighlight_iaq_switch_tag 4
|
||||
#define meshtastic_NodeHighlight_node_name_tag 5
|
||||
#define meshtastic_GeoPoint_zoom_tag 1
|
||||
#define meshtastic_GeoPoint_latitude_tag 2
|
||||
#define meshtastic_GeoPoint_longitude_tag 3
|
||||
#define meshtastic_Map_home_tag 1
|
||||
#define meshtastic_Map_style_tag 2
|
||||
#define meshtastic_Map_follow_gps_tag 3
|
||||
#define meshtastic_DeviceUIConfig_version_tag 1
|
||||
#define meshtastic_DeviceUIConfig_screen_brightness_tag 2
|
||||
#define meshtastic_DeviceUIConfig_screen_timeout_tag 3
|
||||
#define meshtastic_DeviceUIConfig_screen_lock_tag 4
|
||||
#define meshtastic_DeviceUIConfig_settings_lock_tag 5
|
||||
#define meshtastic_DeviceUIConfig_pin_code_tag 6
|
||||
#define meshtastic_DeviceUIConfig_theme_tag 7
|
||||
#define meshtastic_DeviceUIConfig_alert_enabled_tag 8
|
||||
#define meshtastic_DeviceUIConfig_banner_enabled_tag 9
|
||||
#define meshtastic_DeviceUIConfig_ring_tone_id_tag 10
|
||||
#define meshtastic_DeviceUIConfig_language_tag 11
|
||||
#define meshtastic_DeviceUIConfig_node_filter_tag 12
|
||||
#define meshtastic_DeviceUIConfig_node_highlight_tag 13
|
||||
#define meshtastic_DeviceUIConfig_calibration_data_tag 14
|
||||
#define meshtastic_DeviceUIConfig_map_data_tag 15
|
||||
#define meshtastic_DeviceUIConfig_compass_mode_tag 16
|
||||
#define meshtastic_DeviceUIConfig_screen_rgb_color_tag 17
|
||||
#define meshtastic_DeviceUIConfig_is_clockface_analog_tag 18
|
||||
#define meshtastic_DeviceUIConfig_gps_format_tag 19
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_DeviceUIConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, screen_brightness, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, screen_timeout, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, screen_lock, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, settings_lock, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, pin_code, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, theme, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_enabled, 8) \
|
||||
X(a, STATIC, SINGULAR, BOOL, banner_enabled, 9) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ring_tone_id, 10) \
|
||||
X(a, STATIC, SINGULAR, UENUM, language, 11) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, node_filter, 12) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, node_highlight, 13) \
|
||||
X(a, STATIC, SINGULAR, BYTES, calibration_data, 14) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, map_data, 15) \
|
||||
X(a, STATIC, SINGULAR, UENUM, compass_mode, 16) \
|
||||
X(a, STATIC, SINGULAR, UINT32, screen_rgb_color, 17) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_clockface_analog, 18) \
|
||||
X(a, STATIC, SINGULAR, UENUM, gps_format, 19)
|
||||
#define meshtastic_DeviceUIConfig_CALLBACK NULL
|
||||
#define meshtastic_DeviceUIConfig_DEFAULT NULL
|
||||
#define meshtastic_DeviceUIConfig_node_filter_MSGTYPE meshtastic_NodeFilter
|
||||
#define meshtastic_DeviceUIConfig_node_highlight_MSGTYPE meshtastic_NodeHighlight
|
||||
#define meshtastic_DeviceUIConfig_map_data_MSGTYPE meshtastic_Map
|
||||
|
||||
#define meshtastic_NodeFilter_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, unknown_switch, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, offline_switch, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, public_key_switch, 3) \
|
||||
X(a, STATIC, SINGULAR, INT32, hops_away, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, position_switch, 5) \
|
||||
X(a, STATIC, SINGULAR, STRING, node_name, 6) \
|
||||
X(a, STATIC, SINGULAR, INT32, channel, 7)
|
||||
#define meshtastic_NodeFilter_CALLBACK NULL
|
||||
#define meshtastic_NodeFilter_DEFAULT NULL
|
||||
|
||||
#define meshtastic_NodeHighlight_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, chat_switch, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, position_switch, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, telemetry_switch, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, iaq_switch, 4) \
|
||||
X(a, STATIC, SINGULAR, STRING, node_name, 5)
|
||||
#define meshtastic_NodeHighlight_CALLBACK NULL
|
||||
#define meshtastic_NodeHighlight_DEFAULT NULL
|
||||
|
||||
#define meshtastic_GeoPoint_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, INT32, zoom, 1) \
|
||||
X(a, STATIC, SINGULAR, INT32, latitude, 2) \
|
||||
X(a, STATIC, SINGULAR, INT32, longitude, 3)
|
||||
#define meshtastic_GeoPoint_CALLBACK NULL
|
||||
#define meshtastic_GeoPoint_DEFAULT NULL
|
||||
|
||||
#define meshtastic_Map_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, home, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, style, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, follow_gps, 3)
|
||||
#define meshtastic_Map_CALLBACK NULL
|
||||
#define meshtastic_Map_DEFAULT NULL
|
||||
#define meshtastic_Map_home_MSGTYPE meshtastic_GeoPoint
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_DeviceUIConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NodeFilter_msg;
|
||||
extern const pb_msgdesc_t meshtastic_NodeHighlight_msg;
|
||||
extern const pb_msgdesc_t meshtastic_GeoPoint_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Map_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_DeviceUIConfig_fields &meshtastic_DeviceUIConfig_msg
|
||||
#define meshtastic_NodeFilter_fields &meshtastic_NodeFilter_msg
|
||||
#define meshtastic_NodeHighlight_fields &meshtastic_NodeHighlight_msg
|
||||
#define meshtastic_GeoPoint_fields &meshtastic_GeoPoint_msg
|
||||
#define meshtastic_Map_fields &meshtastic_Map_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_DEVICE_UI_PB_H_MAX_SIZE meshtastic_DeviceUIConfig_size
|
||||
#define meshtastic_DeviceUIConfig_size 204
|
||||
#define meshtastic_GeoPoint_size 33
|
||||
#define meshtastic_Map_size 58
|
||||
#define meshtastic_NodeFilter_size 47
|
||||
#define meshtastic_NodeHighlight_size 25
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/deviceonly.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_PositionLite, meshtastic_PositionLite, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_UserLite, meshtastic_UserLite, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeInfoLite, meshtastic_NodeInfoLite, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_DeviceState, meshtastic_DeviceState, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeDatabase, meshtastic_NodeDatabase, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ChannelFile, meshtastic_ChannelFile, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_BackupPreferences, meshtastic_BackupPreferences, 2)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,374 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include <vector>
|
||||
#include "meshtastic/channel.pb.h"
|
||||
#include "meshtastic/config.pb.h"
|
||||
#include "meshtastic/localonly.pb.h"
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
#include "meshtastic/telemetry.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
/* Position with static location information only for NodeDBLite */
|
||||
typedef struct _meshtastic_PositionLite {
|
||||
/* The new preferred location encoding, multiply by 1e-7 to get degrees
|
||||
in floating point */
|
||||
int32_t latitude_i;
|
||||
/* TODO: REPLACE */
|
||||
int32_t longitude_i;
|
||||
/* In meters above MSL (but see issue #359) */
|
||||
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 RTC If it is sent over
|
||||
the mesh (because there are devices on the mesh without GPS), it will only
|
||||
be sent by devices which has a hardware GPS clock.
|
||||
seconds since 1970 */
|
||||
uint32_t time;
|
||||
/* TODO: REPLACE */
|
||||
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;
|
||||
/* Whether or not the node can be messaged */
|
||||
bool has_is_unmessagable;
|
||||
bool is_unmessagable;
|
||||
} meshtastic_UserLite;
|
||||
|
||||
typedef struct _meshtastic_NodeInfoLite {
|
||||
/* The node number */
|
||||
uint32_t num;
|
||||
/* The user info for this node */
|
||||
bool has_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;
|
||||
meshtastic_PositionLite position;
|
||||
/* Returns the Signal-to-noise ratio (SNR) of the last received message,
|
||||
as measured by the receiver. Return SNR of the last received message in dB */
|
||||
float snr;
|
||||
/* Set to indicate the last time we received a packet from this node */
|
||||
uint32_t last_heard;
|
||||
/* The latest device metrics for the node. */
|
||||
bool has_device_metrics;
|
||||
meshtastic_DeviceMetrics device_metrics;
|
||||
/* local channel index we heard that node on. Only populated if its not the default channel. */
|
||||
uint8_t channel;
|
||||
/* True if we witnessed the node over MQTT instead of LoRA transport */
|
||||
bool via_mqtt;
|
||||
/* Number of hops away from us this node is (0 if direct neighbor) */
|
||||
bool has_hops_away;
|
||||
uint8_t hops_away;
|
||||
/* True if node is in our favorites list
|
||||
Persists between NodeDB internal clean ups */
|
||||
bool is_favorite;
|
||||
/* True if node is in our ignored list
|
||||
Persists between NodeDB internal clean ups */
|
||||
bool is_ignored;
|
||||
/* Last byte of the node number of the node that should be used as the next hop to reach this node. */
|
||||
uint8_t next_hop;
|
||||
/* Bitfield for storing booleans.
|
||||
LSB 0 is_key_manually_verified */
|
||||
uint32_t bitfield;
|
||||
} meshtastic_NodeInfoLite;
|
||||
|
||||
/* This message is never sent over the wire, but it is used for serializing DB
|
||||
state to flash in the device code
|
||||
FIXME, since we write this each time we enter deep sleep (and have infinite
|
||||
flash) it would be better to use some sort of append only data structure for
|
||||
the receive queue and use the preferences store for the other stuff */
|
||||
typedef struct _meshtastic_DeviceState {
|
||||
/* Read only settings/info about this node */
|
||||
bool has_my_node;
|
||||
meshtastic_MyNodeInfo my_node;
|
||||
/* My owner info */
|
||||
bool has_owner;
|
||||
meshtastic_User owner;
|
||||
/* Received packets saved for delivery to the phone */
|
||||
pb_size_t receive_queue_count;
|
||||
meshtastic_MeshPacket receive_queue[1];
|
||||
/* We keep the last received text message (only) stored in the device flash,
|
||||
so we can show it on the screen.
|
||||
Might be null */
|
||||
bool has_rx_text_message;
|
||||
meshtastic_MeshPacket rx_text_message;
|
||||
/* A version integer used to invalidate old save files when we make
|
||||
incompatible changes This integer is set at build time and is private to
|
||||
NodeDB.cpp in the device code. */
|
||||
uint32_t version;
|
||||
/* Used only during development.
|
||||
Indicates developer is testing and changes should never be saved to flash.
|
||||
Deprecated in 2.3.1 */
|
||||
bool no_save;
|
||||
/* Previously used to manage GPS factory resets.
|
||||
Deprecated in 2.5.23 */
|
||||
bool did_gps_reset;
|
||||
/* We keep the last received waypoint stored in the device flash,
|
||||
so we can show it on the screen.
|
||||
Might be null */
|
||||
bool has_rx_waypoint;
|
||||
meshtastic_MeshPacket rx_waypoint;
|
||||
/* The mesh's nodes with their available gpio pins for RemoteHardware module */
|
||||
pb_size_t node_remote_hardware_pins_count;
|
||||
meshtastic_NodeRemoteHardwarePin node_remote_hardware_pins[12];
|
||||
} meshtastic_DeviceState;
|
||||
|
||||
typedef struct _meshtastic_NodeDatabase {
|
||||
/* A version integer used to invalidate old save files when we make
|
||||
incompatible changes This integer is set at build time and is private to
|
||||
NodeDB.cpp in the device code. */
|
||||
uint32_t version;
|
||||
/* New lite version of NodeDB to decrease memory footprint */
|
||||
std::vector<meshtastic_NodeInfoLite> nodes;
|
||||
} meshtastic_NodeDatabase;
|
||||
|
||||
/* The on-disk saved channels */
|
||||
typedef struct _meshtastic_ChannelFile {
|
||||
/* The channels our node knows about */
|
||||
pb_size_t channels_count;
|
||||
meshtastic_Channel channels[8];
|
||||
/* A version integer used to invalidate old save files when we make
|
||||
incompatible changes This integer is set at build time and is private to
|
||||
NodeDB.cpp in the device code. */
|
||||
uint32_t version;
|
||||
} meshtastic_ChannelFile;
|
||||
|
||||
/* The on-disk backup of the node's preferences */
|
||||
typedef struct _meshtastic_BackupPreferences {
|
||||
/* The version of the backup */
|
||||
uint32_t version;
|
||||
/* The timestamp of the backup (if node has time) */
|
||||
uint32_t timestamp;
|
||||
/* The node's configuration */
|
||||
bool has_config;
|
||||
meshtastic_LocalConfig config;
|
||||
/* The node's module configuration */
|
||||
bool has_module_config;
|
||||
meshtastic_LocalModuleConfig module_config;
|
||||
/* The node's channels */
|
||||
bool has_channels;
|
||||
meshtastic_ChannelFile channels;
|
||||
/* The node's user (owner) information */
|
||||
bool has_owner;
|
||||
meshtastic_User owner;
|
||||
} meshtastic_BackupPreferences;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_PositionLite_init_default {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||
#define meshtastic_UserLite_init_default {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 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, false, 0, 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}}
|
||||
#define meshtastic_NodeDatabase_init_default {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_BackupPreferences_init_default {0, 0, false, meshtastic_LocalConfig_init_default, false, meshtastic_LocalModuleConfig_init_default, false, meshtastic_ChannelFile_init_default, false, meshtastic_User_init_default}
|
||||
#define meshtastic_PositionLite_init_zero {0, 0, 0, 0, _meshtastic_Position_LocSource_MIN}
|
||||
#define meshtastic_UserLite_init_zero {{0}, "", "", _meshtastic_HardwareModel_MIN, 0, _meshtastic_Config_DeviceConfig_Role_MIN, {0, {0}}, false, 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, false, 0, 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}}
|
||||
#define meshtastic_NodeDatabase_init_zero {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_BackupPreferences_init_zero {0, 0, false, meshtastic_LocalConfig_init_zero, false, meshtastic_LocalModuleConfig_init_zero, false, meshtastic_ChannelFile_init_zero, false, meshtastic_User_init_zero}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_PositionLite_latitude_i_tag 1
|
||||
#define meshtastic_PositionLite_longitude_i_tag 2
|
||||
#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_UserLite_is_unmessagable_tag 9
|
||||
#define meshtastic_NodeInfoLite_num_tag 1
|
||||
#define meshtastic_NodeInfoLite_user_tag 2
|
||||
#define meshtastic_NodeInfoLite_position_tag 3
|
||||
#define meshtastic_NodeInfoLite_snr_tag 4
|
||||
#define meshtastic_NodeInfoLite_last_heard_tag 5
|
||||
#define meshtastic_NodeInfoLite_device_metrics_tag 6
|
||||
#define meshtastic_NodeInfoLite_channel_tag 7
|
||||
#define meshtastic_NodeInfoLite_via_mqtt_tag 8
|
||||
#define meshtastic_NodeInfoLite_hops_away_tag 9
|
||||
#define meshtastic_NodeInfoLite_is_favorite_tag 10
|
||||
#define meshtastic_NodeInfoLite_is_ignored_tag 11
|
||||
#define meshtastic_NodeInfoLite_next_hop_tag 12
|
||||
#define meshtastic_NodeInfoLite_bitfield_tag 13
|
||||
#define meshtastic_DeviceState_my_node_tag 2
|
||||
#define meshtastic_DeviceState_owner_tag 3
|
||||
#define meshtastic_DeviceState_receive_queue_tag 5
|
||||
#define meshtastic_DeviceState_rx_text_message_tag 7
|
||||
#define meshtastic_DeviceState_version_tag 8
|
||||
#define meshtastic_DeviceState_no_save_tag 9
|
||||
#define meshtastic_DeviceState_did_gps_reset_tag 11
|
||||
#define meshtastic_DeviceState_rx_waypoint_tag 12
|
||||
#define meshtastic_DeviceState_node_remote_hardware_pins_tag 13
|
||||
#define meshtastic_NodeDatabase_version_tag 1
|
||||
#define meshtastic_NodeDatabase_nodes_tag 2
|
||||
#define meshtastic_ChannelFile_channels_tag 1
|
||||
#define meshtastic_ChannelFile_version_tag 2
|
||||
#define meshtastic_BackupPreferences_version_tag 1
|
||||
#define meshtastic_BackupPreferences_timestamp_tag 2
|
||||
#define meshtastic_BackupPreferences_config_tag 3
|
||||
#define meshtastic_BackupPreferences_module_config_tag 4
|
||||
#define meshtastic_BackupPreferences_channels_tag 5
|
||||
#define meshtastic_BackupPreferences_owner_tag 6
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_PositionLite_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, SINGULAR, FIXED32, time, 4) \
|
||||
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) \
|
||||
X(a, STATIC, OPTIONAL, BOOL, is_unmessagable, 9)
|
||||
#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) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, position, 3) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, snr, 4) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, last_heard, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, device_metrics, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, channel, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, via_mqtt, 8) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, hops_away, 9) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_favorite, 10) \
|
||||
X(a, STATIC, SINGULAR, BOOL, is_ignored, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, next_hop, 12) \
|
||||
X(a, STATIC, SINGULAR, UINT32, bitfield, 13)
|
||||
#define meshtastic_NodeInfoLite_CALLBACK NULL
|
||||
#define meshtastic_NodeInfoLite_DEFAULT NULL
|
||||
#define meshtastic_NodeInfoLite_user_MSGTYPE meshtastic_UserLite
|
||||
#define meshtastic_NodeInfoLite_position_MSGTYPE meshtastic_PositionLite
|
||||
#define meshtastic_NodeInfoLite_device_metrics_MSGTYPE meshtastic_DeviceMetrics
|
||||
|
||||
#define meshtastic_DeviceState_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, my_node, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, owner, 3) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, receive_queue, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, rx_text_message, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 8) \
|
||||
X(a, STATIC, SINGULAR, BOOL, no_save, 9) \
|
||||
X(a, STATIC, SINGULAR, BOOL, did_gps_reset, 11) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, rx_waypoint, 12) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, node_remote_hardware_pins, 13)
|
||||
#define meshtastic_DeviceState_CALLBACK NULL
|
||||
#define meshtastic_DeviceState_DEFAULT NULL
|
||||
#define meshtastic_DeviceState_my_node_MSGTYPE meshtastic_MyNodeInfo
|
||||
#define meshtastic_DeviceState_owner_MSGTYPE meshtastic_User
|
||||
#define meshtastic_DeviceState_receive_queue_MSGTYPE meshtastic_MeshPacket
|
||||
#define meshtastic_DeviceState_rx_text_message_MSGTYPE meshtastic_MeshPacket
|
||||
#define meshtastic_DeviceState_rx_waypoint_MSGTYPE meshtastic_MeshPacket
|
||||
#define meshtastic_DeviceState_node_remote_hardware_pins_MSGTYPE meshtastic_NodeRemoteHardwarePin
|
||||
|
||||
#define meshtastic_NodeDatabase_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 1) \
|
||||
X(a, CALLBACK, REPEATED, MESSAGE, nodes, 2)
|
||||
extern bool meshtastic_NodeDatabase_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field);
|
||||
#define meshtastic_NodeDatabase_CALLBACK meshtastic_NodeDatabase_callback
|
||||
#define meshtastic_NodeDatabase_DEFAULT NULL
|
||||
#define meshtastic_NodeDatabase_nodes_MSGTYPE meshtastic_NodeInfoLite
|
||||
|
||||
#define meshtastic_ChannelFile_FIELDLIST(X, a) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, channels, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 2)
|
||||
#define meshtastic_ChannelFile_CALLBACK NULL
|
||||
#define meshtastic_ChannelFile_DEFAULT NULL
|
||||
#define meshtastic_ChannelFile_channels_MSGTYPE meshtastic_Channel
|
||||
|
||||
#define meshtastic_BackupPreferences_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 1) \
|
||||
X(a, STATIC, SINGULAR, FIXED32, timestamp, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, config, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, module_config, 4) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, channels, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, owner, 6)
|
||||
#define meshtastic_BackupPreferences_CALLBACK NULL
|
||||
#define meshtastic_BackupPreferences_DEFAULT NULL
|
||||
#define meshtastic_BackupPreferences_config_MSGTYPE meshtastic_LocalConfig
|
||||
#define meshtastic_BackupPreferences_module_config_MSGTYPE meshtastic_LocalModuleConfig
|
||||
#define meshtastic_BackupPreferences_channels_MSGTYPE meshtastic_ChannelFile
|
||||
#define meshtastic_BackupPreferences_owner_MSGTYPE meshtastic_User
|
||||
|
||||
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_NodeDatabase_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ChannelFile_msg;
|
||||
extern const pb_msgdesc_t meshtastic_BackupPreferences_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_NodeDatabase_fields &meshtastic_NodeDatabase_msg
|
||||
#define meshtastic_ChannelFile_fields &meshtastic_ChannelFile_msg
|
||||
#define meshtastic_BackupPreferences_fields &meshtastic_BackupPreferences_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
/* meshtastic_NodeDatabase_size depends on runtime parameters */
|
||||
#define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size
|
||||
#define meshtastic_BackupPreferences_size 2277
|
||||
#define meshtastic_ChannelFile_size 718
|
||||
#define meshtastic_DeviceState_size 1737
|
||||
#define meshtastic_NodeInfoLite_size 196
|
||||
#define meshtastic_PositionLite_size 28
|
||||
#define meshtastic_UserLite_size 98
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/interdevice.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_SensorData, meshtastic_SensorData, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_InterdeviceMessage, meshtastic_InterdeviceMessage, 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_INTERDEVICE_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_INTERDEVICE_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 */
|
||||
typedef enum _meshtastic_MessageType {
|
||||
meshtastic_MessageType_ACK = 0,
|
||||
meshtastic_MessageType_COLLECT_INTERVAL = 160, /* in ms */
|
||||
meshtastic_MessageType_BEEP_ON = 161, /* duration ms */
|
||||
meshtastic_MessageType_BEEP_OFF = 162, /* cancel prematurely */
|
||||
meshtastic_MessageType_SHUTDOWN = 163,
|
||||
meshtastic_MessageType_POWER_ON = 164,
|
||||
meshtastic_MessageType_SCD41_TEMP = 176,
|
||||
meshtastic_MessageType_SCD41_HUMIDITY = 177,
|
||||
meshtastic_MessageType_SCD41_CO2 = 178,
|
||||
meshtastic_MessageType_AHT20_TEMP = 179,
|
||||
meshtastic_MessageType_AHT20_HUMIDITY = 180,
|
||||
meshtastic_MessageType_TVOC_INDEX = 181
|
||||
} meshtastic_MessageType;
|
||||
|
||||
/* Struct definitions */
|
||||
typedef struct _meshtastic_SensorData {
|
||||
/* The message type */
|
||||
meshtastic_MessageType type;
|
||||
pb_size_t which_data;
|
||||
union {
|
||||
float float_value;
|
||||
uint32_t uint32_value;
|
||||
} data;
|
||||
} meshtastic_SensorData;
|
||||
|
||||
typedef struct _meshtastic_InterdeviceMessage {
|
||||
pb_size_t which_data;
|
||||
union {
|
||||
char nmea[1024];
|
||||
meshtastic_SensorData sensor;
|
||||
} data;
|
||||
} meshtastic_InterdeviceMessage;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_MessageType_MIN meshtastic_MessageType_ACK
|
||||
#define _meshtastic_MessageType_MAX meshtastic_MessageType_TVOC_INDEX
|
||||
#define _meshtastic_MessageType_ARRAYSIZE ((meshtastic_MessageType)(meshtastic_MessageType_TVOC_INDEX+1))
|
||||
|
||||
#define meshtastic_SensorData_type_ENUMTYPE meshtastic_MessageType
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_SensorData_init_default {_meshtastic_MessageType_MIN, 0, {0}}
|
||||
#define meshtastic_InterdeviceMessage_init_default {0, {""}}
|
||||
#define meshtastic_SensorData_init_zero {_meshtastic_MessageType_MIN, 0, {0}}
|
||||
#define meshtastic_InterdeviceMessage_init_zero {0, {""}}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_SensorData_type_tag 1
|
||||
#define meshtastic_SensorData_float_value_tag 2
|
||||
#define meshtastic_SensorData_uint32_value_tag 3
|
||||
#define meshtastic_InterdeviceMessage_nmea_tag 1
|
||||
#define meshtastic_InterdeviceMessage_sensor_tag 2
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_SensorData_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, type, 1) \
|
||||
X(a, STATIC, ONEOF, FLOAT, (data,float_value,data.float_value), 2) \
|
||||
X(a, STATIC, ONEOF, UINT32, (data,uint32_value,data.uint32_value), 3)
|
||||
#define meshtastic_SensorData_CALLBACK NULL
|
||||
#define meshtastic_SensorData_DEFAULT NULL
|
||||
|
||||
#define meshtastic_InterdeviceMessage_FIELDLIST(X, a) \
|
||||
X(a, STATIC, ONEOF, STRING, (data,nmea,data.nmea), 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (data,sensor,data.sensor), 2)
|
||||
#define meshtastic_InterdeviceMessage_CALLBACK NULL
|
||||
#define meshtastic_InterdeviceMessage_DEFAULT NULL
|
||||
#define meshtastic_InterdeviceMessage_data_sensor_MSGTYPE meshtastic_SensorData
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_SensorData_msg;
|
||||
extern const pb_msgdesc_t meshtastic_InterdeviceMessage_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_SensorData_fields &meshtastic_SensorData_msg
|
||||
#define meshtastic_InterdeviceMessage_fields &meshtastic_InterdeviceMessage_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_INTERDEVICE_PB_H_MAX_SIZE meshtastic_InterdeviceMessage_size
|
||||
#define meshtastic_InterdeviceMessage_size 1026
|
||||
#define meshtastic_SensorData_size 9
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/localonly.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_LocalConfig, meshtastic_LocalConfig, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LocalModuleConfig, meshtastic_LocalModuleConfig, 2)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_INCLUDED
|
||||
#include <pb.h>
|
||||
#include "meshtastic/config.pb.h"
|
||||
#include "meshtastic/module_config.pb.h"
|
||||
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
typedef struct _meshtastic_LocalConfig {
|
||||
/* The part of the config that is specific to the Device */
|
||||
bool has_device;
|
||||
meshtastic_Config_DeviceConfig device;
|
||||
/* The part of the config that is specific to the GPS Position */
|
||||
bool has_position;
|
||||
meshtastic_Config_PositionConfig position;
|
||||
/* The part of the config that is specific to the Power settings */
|
||||
bool has_power;
|
||||
meshtastic_Config_PowerConfig power;
|
||||
/* The part of the config that is specific to the Wifi Settings */
|
||||
bool has_network;
|
||||
meshtastic_Config_NetworkConfig network;
|
||||
/* The part of the config that is specific to the Display */
|
||||
bool has_display;
|
||||
meshtastic_Config_DisplayConfig display;
|
||||
/* The part of the config that is specific to the Lora Radio */
|
||||
bool has_lora;
|
||||
meshtastic_Config_LoRaConfig lora;
|
||||
/* The part of the config that is specific to the Bluetooth settings */
|
||||
bool has_bluetooth;
|
||||
meshtastic_Config_BluetoothConfig bluetooth;
|
||||
/* A version integer used to invalidate old save files when we make
|
||||
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 {
|
||||
/* The part of the config that is specific to the MQTT module */
|
||||
bool has_mqtt;
|
||||
meshtastic_ModuleConfig_MQTTConfig mqtt;
|
||||
/* The part of the config that is specific to the Serial module */
|
||||
bool has_serial;
|
||||
meshtastic_ModuleConfig_SerialConfig serial;
|
||||
/* The part of the config that is specific to the ExternalNotification module */
|
||||
bool has_external_notification;
|
||||
meshtastic_ModuleConfig_ExternalNotificationConfig external_notification;
|
||||
/* The part of the config that is specific to the Store & Forward module */
|
||||
bool has_store_forward;
|
||||
meshtastic_ModuleConfig_StoreForwardConfig store_forward;
|
||||
/* The part of the config that is specific to the RangeTest module */
|
||||
bool has_range_test;
|
||||
meshtastic_ModuleConfig_RangeTestConfig range_test;
|
||||
/* The part of the config that is specific to the Telemetry module */
|
||||
bool has_telemetry;
|
||||
meshtastic_ModuleConfig_TelemetryConfig telemetry;
|
||||
/* The part of the config that is specific to the Canned Message module */
|
||||
bool has_canned_message;
|
||||
meshtastic_ModuleConfig_CannedMessageConfig canned_message;
|
||||
/* A version integer used to invalidate old save files when we make
|
||||
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 the Audio module */
|
||||
bool has_audio;
|
||||
meshtastic_ModuleConfig_AudioConfig audio;
|
||||
/* The part of the config that is specific to the Remote Hardware module */
|
||||
bool has_remote_hardware;
|
||||
meshtastic_ModuleConfig_RemoteHardwareConfig remote_hardware;
|
||||
/* The part of the config that is specific to the Neighbor Info module */
|
||||
bool has_neighbor_info;
|
||||
meshtastic_ModuleConfig_NeighborInfoConfig neighbor_info;
|
||||
/* The part of the config that is specific to the Ambient Lighting module */
|
||||
bool has_ambient_lighting;
|
||||
meshtastic_ModuleConfig_AmbientLightingConfig ambient_lighting;
|
||||
/* The part of the config that is specific to the Detection Sensor module */
|
||||
bool has_detection_sensor;
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;
|
||||
/* Paxcounter Config */
|
||||
bool has_paxcounter;
|
||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||
} meshtastic_LocalModuleConfig;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
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, 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, 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) */
|
||||
#define meshtastic_LocalConfig_device_tag 1
|
||||
#define meshtastic_LocalConfig_position_tag 2
|
||||
#define meshtastic_LocalConfig_power_tag 3
|
||||
#define meshtastic_LocalConfig_network_tag 4
|
||||
#define meshtastic_LocalConfig_display_tag 5
|
||||
#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
|
||||
#define meshtastic_LocalModuleConfig_store_forward_tag 4
|
||||
#define meshtastic_LocalModuleConfig_range_test_tag 5
|
||||
#define meshtastic_LocalModuleConfig_telemetry_tag 6
|
||||
#define meshtastic_LocalModuleConfig_canned_message_tag 7
|
||||
#define meshtastic_LocalModuleConfig_version_tag 8
|
||||
#define meshtastic_LocalModuleConfig_audio_tag 9
|
||||
#define meshtastic_LocalModuleConfig_remote_hardware_tag 10
|
||||
#define meshtastic_LocalModuleConfig_neighbor_info_tag 11
|
||||
#define meshtastic_LocalModuleConfig_ambient_lighting_tag 12
|
||||
#define meshtastic_LocalModuleConfig_detection_sensor_tag 13
|
||||
#define meshtastic_LocalModuleConfig_paxcounter_tag 14
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_LocalConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, device, 1) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, position, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, power, 3) \
|
||||
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, OPTIONAL, MESSAGE, security, 9)
|
||||
#define meshtastic_LocalConfig_CALLBACK NULL
|
||||
#define meshtastic_LocalConfig_DEFAULT NULL
|
||||
#define meshtastic_LocalConfig_device_MSGTYPE meshtastic_Config_DeviceConfig
|
||||
#define meshtastic_LocalConfig_position_MSGTYPE meshtastic_Config_PositionConfig
|
||||
#define meshtastic_LocalConfig_power_MSGTYPE meshtastic_Config_PowerConfig
|
||||
#define meshtastic_LocalConfig_network_MSGTYPE meshtastic_Config_NetworkConfig
|
||||
#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) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, serial, 2) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, external_notification, 3) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, store_forward, 4) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, range_test, 5) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, telemetry, 6) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, canned_message, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, version, 8) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, audio, 9) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, remote_hardware, 10) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, neighbor_info, 11) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, ambient_lighting, 12) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, detection_sensor, 13) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, paxcounter, 14)
|
||||
#define meshtastic_LocalModuleConfig_CALLBACK NULL
|
||||
#define meshtastic_LocalModuleConfig_DEFAULT NULL
|
||||
#define meshtastic_LocalModuleConfig_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||
#define meshtastic_LocalModuleConfig_serial_MSGTYPE meshtastic_ModuleConfig_SerialConfig
|
||||
#define meshtastic_LocalModuleConfig_external_notification_MSGTYPE meshtastic_ModuleConfig_ExternalNotificationConfig
|
||||
#define meshtastic_LocalModuleConfig_store_forward_MSGTYPE meshtastic_ModuleConfig_StoreForwardConfig
|
||||
#define meshtastic_LocalModuleConfig_range_test_MSGTYPE meshtastic_ModuleConfig_RangeTestConfig
|
||||
#define meshtastic_LocalModuleConfig_telemetry_MSGTYPE meshtastic_ModuleConfig_TelemetryConfig
|
||||
#define meshtastic_LocalModuleConfig_canned_message_MSGTYPE meshtastic_ModuleConfig_CannedMessageConfig
|
||||
#define meshtastic_LocalModuleConfig_audio_MSGTYPE meshtastic_ModuleConfig_AudioConfig
|
||||
#define meshtastic_LocalModuleConfig_remote_hardware_MSGTYPE meshtastic_ModuleConfig_RemoteHardwareConfig
|
||||
#define meshtastic_LocalModuleConfig_neighbor_info_MSGTYPE meshtastic_ModuleConfig_NeighborInfoConfig
|
||||
#define meshtastic_LocalModuleConfig_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||
#define meshtastic_LocalModuleConfig_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||
#define meshtastic_LocalModuleConfig_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_LocalConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_LocalModuleConfig_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_LocalConfig_fields &meshtastic_LocalConfig_msg
|
||||
#define meshtastic_LocalModuleConfig_fields &meshtastic_LocalModuleConfig_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_LOCALONLY_PB_H_MAX_SIZE meshtastic_LocalConfig_size
|
||||
#define meshtastic_LocalConfig_size 749
|
||||
#define meshtastic_LocalModuleConfig_size 673
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,126 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/mesh.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_Position, meshtastic_Position, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_User, meshtastic_User, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_RouteDiscovery, meshtastic_RouteDiscovery, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Routing, meshtastic_Routing, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Data, meshtastic_Data, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_KeyVerification, meshtastic_KeyVerification, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_MqttClientProxyMessage, meshtastic_MqttClientProxyMessage, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_MeshPacket, meshtastic_MeshPacket, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeInfo, meshtastic_NodeInfo, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_MyNodeInfo, meshtastic_MyNodeInfo, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LogRecord, meshtastic_LogRecord, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_QueueStatus, meshtastic_QueueStatus, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_FromRadio, meshtastic_FromRadio, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ClientNotification, meshtastic_ClientNotification, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_KeyVerificationNumberInform, meshtastic_KeyVerificationNumberInform, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_KeyVerificationNumberRequest, meshtastic_KeyVerificationNumberRequest, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_KeyVerificationFinal, meshtastic_KeyVerificationFinal, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_DuplicatedPublicKey, meshtastic_DuplicatedPublicKey, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LowEntropyKey, meshtastic_LowEntropyKey, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_FileInfo, meshtastic_FileInfo, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ToRadio, meshtastic_ToRadio, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Compressed, meshtastic_Compressed, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NeighborInfo, meshtastic_NeighborInfo, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Neighbor, meshtastic_Neighbor, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_DeviceMetadata, meshtastic_DeviceMetadata, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Heartbeat, meshtastic_Heartbeat, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_NodeRemoteHardwarePin, meshtastic_NodeRemoteHardwarePin, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ChunkedPayload, meshtastic_ChunkedPayload, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_resend_chunks, meshtastic_resend_chunks, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ChunkedPayloadResponse, meshtastic_ChunkedPayloadResponse, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,69 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/module_config.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig, meshtastic_ModuleConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_MQTTConfig, meshtastic_ModuleConfig_MQTTConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_MapReportSettings, meshtastic_ModuleConfig_MapReportSettings, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_RemoteHardwareConfig, meshtastic_ModuleConfig_RemoteHardwareConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_NeighborInfoConfig, meshtastic_ModuleConfig_NeighborInfoConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_DetectionSensorConfig, meshtastic_ModuleConfig_DetectionSensorConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_AudioConfig, meshtastic_ModuleConfig_AudioConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_PaxcounterConfig, meshtastic_ModuleConfig_PaxcounterConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_SerialConfig, meshtastic_ModuleConfig_SerialConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_ExternalNotificationConfig, meshtastic_ModuleConfig_ExternalNotificationConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_StoreForwardConfig, meshtastic_ModuleConfig_StoreForwardConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_RangeTestConfig, meshtastic_ModuleConfig_RangeTestConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_TelemetryConfig, meshtastic_ModuleConfig_TelemetryConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_CannedMessageConfig, meshtastic_ModuleConfig_CannedMessageConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_ModuleConfig_AmbientLightingConfig, meshtastic_ModuleConfig_AmbientLightingConfig, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_RemoteHardwarePin, meshtastic_RemoteHardwarePin, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,926 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_MODULE_CONFIG_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 */
|
||||
typedef enum _meshtastic_RemoteHardwarePinType {
|
||||
/* Unset/unused */
|
||||
meshtastic_RemoteHardwarePinType_UNKNOWN = 0,
|
||||
/* GPIO pin can be read (if it is high / low) */
|
||||
meshtastic_RemoteHardwarePinType_DIGITAL_READ = 1,
|
||||
/* GPIO pin can be written to (high / low) */
|
||||
meshtastic_RemoteHardwarePinType_DIGITAL_WRITE = 2
|
||||
} meshtastic_RemoteHardwarePinType;
|
||||
|
||||
typedef enum _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType {
|
||||
/* Event is triggered if pin is low */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW = 0,
|
||||
/* Event is triggered if pin is high */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_HIGH = 1,
|
||||
/* Event is triggered when pin goes high to low */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_FALLING_EDGE = 2,
|
||||
/* Event is triggered when pin goes low to high */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_RISING_EDGE = 3,
|
||||
/* Event is triggered on every pin state change, low is considered to be
|
||||
"active" */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_LOW = 4,
|
||||
/* Event is triggered on every pin state change, high is considered to be
|
||||
"active" */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH = 5
|
||||
} meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType;
|
||||
|
||||
/* Baudrate for codec2 voice */
|
||||
typedef enum _meshtastic_ModuleConfig_AudioConfig_Audio_Baud {
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT = 0,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_3200 = 1,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_2400 = 2,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1600 = 3,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1400 = 4,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1300 = 5,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_1200 = 6,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700 = 7,
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B = 8
|
||||
} meshtastic_ModuleConfig_AudioConfig_Audio_Baud;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Baud {
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_DEFAULT = 0,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_110 = 1,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_300 = 2,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_600 = 3,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_1200 = 4,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_2400 = 5,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_4800 = 6,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_9600 = 7,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_19200 = 8,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_38400 = 9,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_57600 = 10,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_115200 = 11,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_230400 = 12,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_460800 = 13,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_576000 = 14,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600 = 15
|
||||
} meshtastic_ModuleConfig_SerialConfig_Serial_Baud;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_ModuleConfig_SerialConfig_Serial_Mode {
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_DEFAULT = 0,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_SIMPLE = 1,
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_PROTO = 2,
|
||||
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,
|
||||
/* Ecowitt WS85 weather station */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85 = 6,
|
||||
/* VE.Direct is a serial protocol used by Victron Energy products
|
||||
https://beta.ivc.no/wiki/index.php/Victron_VE_Direct_DIY_Cable */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_VE_DIRECT = 7,
|
||||
/* Used to configure and view some parameters of MeshSolar.
|
||||
https://heltec.org/project/meshsolar/ */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG = 8
|
||||
} meshtastic_ModuleConfig_SerialConfig_Serial_Mode;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE = 0,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP = 17,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN = 18,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_LEFT = 19,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT = 20,
|
||||
/* '\n' */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_SELECT = 10,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK = 27,
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL = 24
|
||||
} meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
/* Struct definitions */
|
||||
/* Settings for reporting unencrypted information about our node to a map via MQTT */
|
||||
typedef struct _meshtastic_ModuleConfig_MapReportSettings {
|
||||
/* How often we should report our info to the map (in seconds) */
|
||||
uint32_t publish_interval_secs;
|
||||
/* Bits of precision for the location sent (default of 32 is full precision). */
|
||||
uint32_t position_precision;
|
||||
/* Whether we have opted-in to report our location to the map */
|
||||
bool should_report_location;
|
||||
} meshtastic_ModuleConfig_MapReportSettings;
|
||||
|
||||
/* MQTT Client Config */
|
||||
typedef struct _meshtastic_ModuleConfig_MQTTConfig {
|
||||
/* If a meshtastic node is able to reach the internet it will normally attempt to gateway any channels that are marked as
|
||||
is_uplink_enabled or is_downlink_enabled. */
|
||||
bool enabled;
|
||||
/* The server to use for our MQTT global message gateway feature.
|
||||
If not set, the default server will be used */
|
||||
char address[64];
|
||||
/* MQTT username to use (most useful for a custom MQTT server).
|
||||
If using a custom server, this will be honoured even if empty.
|
||||
If using the default server, this will only be honoured if set, otherwise the device will use the default username */
|
||||
char username[64];
|
||||
/* MQTT password to use (most useful for a custom MQTT server).
|
||||
If using a custom server, this will be honoured even if empty.
|
||||
If using the default server, this will only be honoured if set, otherwise the device will use the default password */
|
||||
char password[32];
|
||||
/* Whether to send encrypted or decrypted packets to MQTT.
|
||||
This parameter is only honoured if you also set server
|
||||
(the default official mqtt.meshtastic.org server can handle encrypted packets)
|
||||
Decrypted packets may be useful for external systems that want to consume meshtastic packets */
|
||||
bool encryption_enabled;
|
||||
/* Whether to send / consume json packets on MQTT */
|
||||
bool json_enabled;
|
||||
/* If true, we attempt to establish a secure connection using TLS */
|
||||
bool tls_enabled;
|
||||
/* The root topic to use for MQTT messages. Default is "msh".
|
||||
This is useful if you want to use a single MQTT server for multiple meshtastic networks and separate them via ACLs */
|
||||
char root[32];
|
||||
/* If true, we can use the connected phone / client to proxy messages to MQTT instead of a direct connection */
|
||||
bool proxy_to_client_enabled;
|
||||
/* If true, we will periodically report unencrypted information about our node to a map via MQTT */
|
||||
bool map_reporting_enabled;
|
||||
/* Settings for reporting information about our node to a map via MQTT */
|
||||
bool has_map_report_settings;
|
||||
meshtastic_ModuleConfig_MapReportSettings map_report_settings;
|
||||
} meshtastic_ModuleConfig_MQTTConfig;
|
||||
|
||||
/* NeighborInfoModule Config */
|
||||
typedef struct _meshtastic_ModuleConfig_NeighborInfoConfig {
|
||||
/* Whether the Module is enabled */
|
||||
bool enabled;
|
||||
/* Interval in seconds of how often we should try to send our
|
||||
Neighbor Info (minimum is 14400, i.e., 4 hours) */
|
||||
uint32_t update_interval;
|
||||
/* Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa.
|
||||
Note that this is not available on a channel with default key and name. */
|
||||
bool transmit_over_lora;
|
||||
} meshtastic_ModuleConfig_NeighborInfoConfig;
|
||||
|
||||
/* Detection Sensor Module Config */
|
||||
typedef struct _meshtastic_ModuleConfig_DetectionSensorConfig {
|
||||
/* Whether the Module is enabled */
|
||||
bool enabled;
|
||||
/* Interval in seconds of how often we can send a message to the mesh when a
|
||||
trigger event is detected */
|
||||
uint32_t minimum_broadcast_secs;
|
||||
/* Interval in seconds of how often we should send a message to the mesh
|
||||
with the current state regardless of trigger events When set to 0, only
|
||||
trigger events will be broadcasted Works as a sort of status heartbeat
|
||||
for peace of mind */
|
||||
uint32_t state_broadcast_secs;
|
||||
/* Send ASCII bell with alert message
|
||||
Useful for triggering ext. notification on bell */
|
||||
bool send_bell;
|
||||
/* Friendly name used to format message sent to mesh
|
||||
Example: A name "Motion" would result in a message "Motion detected"
|
||||
Maximum length of 20 characters */
|
||||
char name[20];
|
||||
/* GPIO pin to monitor for state changes */
|
||||
uint8_t monitor_pin;
|
||||
/* The type of trigger event to be used */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType detection_trigger_type;
|
||||
/* Whether or not use INPUT_PULLUP mode for GPIO pin
|
||||
Only applicable if the board uses pull-up resistors on the pin */
|
||||
bool use_pullup;
|
||||
} meshtastic_ModuleConfig_DetectionSensorConfig;
|
||||
|
||||
/* Audio Config for codec2 voice */
|
||||
typedef struct _meshtastic_ModuleConfig_AudioConfig {
|
||||
/* Whether Audio is enabled */
|
||||
bool codec2_enabled;
|
||||
/* PTT Pin */
|
||||
uint8_t ptt_pin;
|
||||
/* The audio sample rate to use for codec2 */
|
||||
meshtastic_ModuleConfig_AudioConfig_Audio_Baud bitrate;
|
||||
/* I2S Word Select */
|
||||
uint8_t i2s_ws;
|
||||
/* I2S Data IN */
|
||||
uint8_t i2s_sd;
|
||||
/* I2S Data OUT */
|
||||
uint8_t i2s_din;
|
||||
/* I2S Clock */
|
||||
uint8_t i2s_sck;
|
||||
} meshtastic_ModuleConfig_AudioConfig;
|
||||
|
||||
/* Config for the Paxcounter Module */
|
||||
typedef struct _meshtastic_ModuleConfig_PaxcounterConfig {
|
||||
/* Enable the Paxcounter Module */
|
||||
bool enabled;
|
||||
uint32_t paxcounter_update_interval;
|
||||
/* WiFi RSSI threshold. Defaults to -80 */
|
||||
int32_t wifi_threshold;
|
||||
/* BLE RSSI threshold. Defaults to -80 */
|
||||
int32_t ble_threshold;
|
||||
} meshtastic_ModuleConfig_PaxcounterConfig;
|
||||
|
||||
/* Serial Config */
|
||||
typedef struct _meshtastic_ModuleConfig_SerialConfig {
|
||||
/* Preferences for the SerialModule */
|
||||
bool enabled;
|
||||
/* TODO: REPLACE */
|
||||
bool echo;
|
||||
/* RX pin (should match Arduino gpio pin number) */
|
||||
uint32_t rxd;
|
||||
/* TX pin (should match Arduino gpio pin number) */
|
||||
uint32_t txd;
|
||||
/* Serial baud rate */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Baud baud;
|
||||
/* TODO: REPLACE */
|
||||
uint32_t timeout;
|
||||
/* Mode for serial module operation */
|
||||
meshtastic_ModuleConfig_SerialConfig_Serial_Mode mode;
|
||||
/* Overrides the platform's defacto Serial port instance to use with Serial module config settings
|
||||
This is currently only usable in output modes like NMEA / CalTopo and may behave strangely or not work at all in other modes
|
||||
Existing logging over the Serial Console will still be present */
|
||||
bool override_console_serial_port;
|
||||
} meshtastic_ModuleConfig_SerialConfig;
|
||||
|
||||
/* External Notifications Config */
|
||||
typedef struct _meshtastic_ModuleConfig_ExternalNotificationConfig {
|
||||
/* Enable the ExternalNotificationModule */
|
||||
bool enabled;
|
||||
/* When using in On/Off mode, keep the output on for this many
|
||||
milliseconds. Default 1000ms (1 second). */
|
||||
uint32_t output_ms;
|
||||
/* Define the output pin GPIO setting Defaults to
|
||||
EXT_NOTIFY_OUT if set for the board.
|
||||
In standalone devices this pin should drive the LED to match the UI. */
|
||||
uint32_t output;
|
||||
/* IF this is true, the 'output' Pin will be pulled active high, false
|
||||
means active low. */
|
||||
bool active;
|
||||
/* True: Alert when a text message arrives (output) */
|
||||
bool alert_message;
|
||||
/* True: Alert when the bell character is received (output) */
|
||||
bool alert_bell;
|
||||
/* use a PWM output instead of a simple on/off output. This will ignore
|
||||
the 'output', 'output_ms' and 'active' settings and use the
|
||||
device.buzzer_gpio instead. */
|
||||
bool use_pwm;
|
||||
/* Optional: Define a secondary output pin for a vibra motor
|
||||
This is used in standalone devices to match the UI. */
|
||||
uint8_t output_vibra;
|
||||
/* Optional: Define a tertiary output pin for an active buzzer
|
||||
This is used in standalone devices to to match the UI. */
|
||||
uint8_t output_buzzer;
|
||||
/* True: Alert when a text message arrives (output_vibra) */
|
||||
bool alert_message_vibra;
|
||||
/* True: Alert when a text message arrives (output_buzzer) */
|
||||
bool alert_message_buzzer;
|
||||
/* True: Alert when the bell character is received (output_vibra) */
|
||||
bool alert_bell_vibra;
|
||||
/* True: Alert when the bell character is received (output_buzzer) */
|
||||
bool alert_bell_buzzer;
|
||||
/* The notification will toggle with 'output_ms' for this time of seconds.
|
||||
Default is 0 which means don't repeat at all. 60 would mean blink
|
||||
and/or beep for 60 seconds */
|
||||
uint16_t nag_timeout;
|
||||
/* When true, enables devices with native I2S audio output to use the RTTTL over speaker like a buzzer
|
||||
T-Watch S3 and T-Deck for example have this capability */
|
||||
bool use_i2s_as_buzzer;
|
||||
} meshtastic_ModuleConfig_ExternalNotificationConfig;
|
||||
|
||||
/* Store and Forward Module Config */
|
||||
typedef struct _meshtastic_ModuleConfig_StoreForwardConfig {
|
||||
/* Enable the Store and Forward Module */
|
||||
bool enabled;
|
||||
/* TODO: REPLACE */
|
||||
bool heartbeat;
|
||||
/* TODO: REPLACE */
|
||||
uint32_t records;
|
||||
/* TODO: REPLACE */
|
||||
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 */
|
||||
typedef struct _meshtastic_ModuleConfig_RangeTestConfig {
|
||||
/* Enable the Range Test Module */
|
||||
bool enabled;
|
||||
/* Send out range test messages from this node */
|
||||
uint32_t sender;
|
||||
/* Bool value indicating that this node should save a RangeTest.csv file.
|
||||
ESP32 Only */
|
||||
bool save;
|
||||
/* Bool indicating that the node should cleanup / destroy it's RangeTest.csv file.
|
||||
ESP32 Only */
|
||||
bool clear_on_reboot;
|
||||
} meshtastic_ModuleConfig_RangeTestConfig;
|
||||
|
||||
/* Configuration for both device and environment metrics */
|
||||
typedef struct _meshtastic_ModuleConfig_TelemetryConfig {
|
||||
/* Interval in seconds of how often we should try to send our
|
||||
device metrics to the mesh */
|
||||
uint32_t device_update_interval;
|
||||
uint32_t environment_update_interval;
|
||||
/* Preferences for the Telemetry Module (Environment)
|
||||
Enable/Disable the telemetry measurement module measurement collection */
|
||||
bool environment_measurement_enabled;
|
||||
/* Enable/Disable the telemetry measurement module on-device display */
|
||||
bool environment_screen_enabled;
|
||||
/* We'll always read the sensor in Celsius, but sometimes we might want to
|
||||
display the results in Fahrenheit as a "user preference". */
|
||||
bool environment_display_fahrenheit;
|
||||
/* Enable/Disable the air quality metrics */
|
||||
bool air_quality_enabled;
|
||||
/* Interval in seconds of how often we should try to send our
|
||||
air quality metrics to the mesh */
|
||||
uint32_t air_quality_interval;
|
||||
/* Enable/disable Power metrics */
|
||||
bool power_measurement_enabled;
|
||||
/* Interval in seconds of how often we should try to send our
|
||||
power metrics to the mesh */
|
||||
uint32_t power_update_interval;
|
||||
/* Enable/Disable the power measurement module on-device display */
|
||||
bool power_screen_enabled;
|
||||
/* Preferences for the (Health) Telemetry Module
|
||||
Enable/Disable the telemetry measurement module measurement collection */
|
||||
bool health_measurement_enabled;
|
||||
/* Interval in seconds of how often we should try to send our
|
||||
health metrics to the mesh */
|
||||
uint32_t health_update_interval;
|
||||
/* Enable/Disable the health telemetry module on-device display */
|
||||
bool health_screen_enabled;
|
||||
/* Enable/Disable the device telemetry module to send metrics to the mesh
|
||||
Note: We will still send telemtry to the connected phone / client every minute over the API */
|
||||
bool device_telemetry_enabled;
|
||||
} meshtastic_ModuleConfig_TelemetryConfig;
|
||||
|
||||
/* Canned Messages Module Config */
|
||||
typedef struct _meshtastic_ModuleConfig_CannedMessageConfig {
|
||||
/* Enable the rotary encoder #1. This is a 'dumb' encoder sending pulses on both A and B pins while rotating. */
|
||||
bool rotary1_enabled;
|
||||
/* GPIO pin for rotary encoder A port. */
|
||||
uint32_t inputbroker_pin_a;
|
||||
/* GPIO pin for rotary encoder B port. */
|
||||
uint32_t inputbroker_pin_b;
|
||||
/* GPIO pin for rotary encoder Press port. */
|
||||
uint32_t inputbroker_pin_press;
|
||||
/* Generate input event on CW of this kind. */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_cw;
|
||||
/* Generate input event on CCW of this kind. */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_ccw;
|
||||
/* Generate input event on Press of this kind. */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar inputbroker_event_press;
|
||||
/* Enable the Up/Down/Select input device. Can be RAK rotary encoder or 3 buttons. Uses the a/b/press definitions from inputbroker. */
|
||||
bool updown1_enabled;
|
||||
/* Enable/disable CannedMessageModule. */
|
||||
bool enabled;
|
||||
/* Input event origin accepted by the canned message module.
|
||||
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. */
|
||||
bool send_bell;
|
||||
} meshtastic_ModuleConfig_CannedMessageConfig;
|
||||
|
||||
/* Ambient Lighting Module - Settings for control of onboard LEDs to allow users to adjust the brightness levels and respective color levels.
|
||||
Initially created for the RAK14001 RGB LED module. */
|
||||
typedef struct _meshtastic_ModuleConfig_AmbientLightingConfig {
|
||||
/* Sets LED to on or off. */
|
||||
bool led_state;
|
||||
/* Sets the current for the LED output. Default is 10. */
|
||||
uint8_t current;
|
||||
/* Sets the red LED level. Values are 0-255. */
|
||||
uint8_t red;
|
||||
/* Sets the green LED level. Values are 0-255. */
|
||||
uint8_t green;
|
||||
/* Sets the blue LED level. Values are 0-255. */
|
||||
uint8_t blue;
|
||||
} meshtastic_ModuleConfig_AmbientLightingConfig;
|
||||
|
||||
/* A GPIO pin definition for remote hardware module */
|
||||
typedef struct _meshtastic_RemoteHardwarePin {
|
||||
/* GPIO Pin number (must match Arduino) */
|
||||
uint8_t gpio_pin;
|
||||
/* Name for the GPIO pin (i.e. Front gate, mailbox, etc) */
|
||||
char name[15];
|
||||
/* Type of GPIO access available to consumers on the mesh */
|
||||
meshtastic_RemoteHardwarePinType type;
|
||||
} meshtastic_RemoteHardwarePin;
|
||||
|
||||
/* RemoteHardwareModule Config */
|
||||
typedef struct _meshtastic_ModuleConfig_RemoteHardwareConfig {
|
||||
/* Whether the Module is enabled */
|
||||
bool enabled;
|
||||
/* Whether the Module allows consumers to read / write to pins not defined in available_pins */
|
||||
bool allow_undefined_pin_access;
|
||||
/* Exposes the available pins to the mesh for reading and writing */
|
||||
pb_size_t available_pins_count;
|
||||
meshtastic_RemoteHardwarePin available_pins[4];
|
||||
} meshtastic_ModuleConfig_RemoteHardwareConfig;
|
||||
|
||||
/* Module Config */
|
||||
typedef struct _meshtastic_ModuleConfig {
|
||||
pb_size_t which_payload_variant;
|
||||
union {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_MQTTConfig mqtt;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_SerialConfig serial;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_ExternalNotificationConfig external_notification;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_StoreForwardConfig store_forward;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_RangeTestConfig range_test;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_TelemetryConfig telemetry;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_CannedMessageConfig canned_message;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_AudioConfig audio;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_RemoteHardwareConfig remote_hardware;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_NeighborInfoConfig neighbor_info;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_AmbientLightingConfig ambient_lighting;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_DetectionSensorConfig detection_sensor;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_ModuleConfig_PaxcounterConfig paxcounter;
|
||||
} payload_variant;
|
||||
} meshtastic_ModuleConfig;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_RemoteHardwarePinType_MIN meshtastic_RemoteHardwarePinType_UNKNOWN
|
||||
#define _meshtastic_RemoteHardwarePinType_MAX meshtastic_RemoteHardwarePinType_DIGITAL_WRITE
|
||||
#define _meshtastic_RemoteHardwarePinType_ARRAYSIZE ((meshtastic_RemoteHardwarePinType)(meshtastic_RemoteHardwarePinType_DIGITAL_WRITE+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_LOGIC_LOW
|
||||
#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MAX meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH
|
||||
#define _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_ARRAYSIZE ((meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType)(meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_EITHER_EDGE_ACTIVE_HIGH+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_DEFAULT
|
||||
#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MAX meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B
|
||||
#define _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_ARRAYSIZE ((meshtastic_ModuleConfig_AudioConfig_Audio_Baud)(meshtastic_ModuleConfig_AudioConfig_Audio_Baud_CODEC2_700B+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MIN meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_DEFAULT
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Baud_MAX meshtastic_ModuleConfig_SerialConfig_Serial_Baud_BAUD_921600
|
||||
#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_MS_CONFIG
|
||||
#define _meshtastic_ModuleConfig_SerialConfig_Serial_Mode_ARRAYSIZE ((meshtastic_ModuleConfig_SerialConfig_Serial_Mode)(meshtastic_ModuleConfig_SerialConfig_Serial_Mode_MS_CONFIG+1))
|
||||
|
||||
#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MIN meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_NONE
|
||||
#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_MAX meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK
|
||||
#define _meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_ARRAYSIZE ((meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar)(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_BACK+1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_ENUMTYPE meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType
|
||||
|
||||
#define meshtastic_ModuleConfig_AudioConfig_bitrate_ENUMTYPE meshtastic_ModuleConfig_AudioConfig_Audio_Baud
|
||||
|
||||
|
||||
#define meshtastic_ModuleConfig_SerialConfig_baud_ENUMTYPE meshtastic_ModuleConfig_SerialConfig_Serial_Baud
|
||||
#define meshtastic_ModuleConfig_SerialConfig_mode_ENUMTYPE meshtastic_ModuleConfig_SerialConfig_Serial_Mode
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_cw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_ENUMTYPE meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar
|
||||
|
||||
|
||||
#define meshtastic_RemoteHardwarePin_type_ENUMTYPE meshtastic_RemoteHardwarePinType
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_ModuleConfig_init_default {0, {meshtastic_ModuleConfig_MQTTConfig_init_default}}
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_init_default {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_default}
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_init_default {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_default {0, 0, 0, {meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default, meshtastic_RemoteHardwarePin_init_default}}
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_default {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_default {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_AudioConfig_init_default {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||
#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, 0}
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_init_default {0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_default {0, 0, 0, 0, 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}
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_default {0, 0, 0, 0, 0}
|
||||
#define meshtastic_RemoteHardwarePin_init_default {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
||||
#define meshtastic_ModuleConfig_init_zero {0, {meshtastic_ModuleConfig_MQTTConfig_init_zero}}
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_init_zero {0, "", "", "", 0, 0, 0, "", 0, 0, false, meshtastic_ModuleConfig_MapReportSettings_init_zero}
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_init_zero {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_init_zero {0, 0, 0, {meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero, meshtastic_RemoteHardwarePin_init_zero}}
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_init_zero {0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_init_zero {0, 0, 0, 0, "", 0, _meshtastic_ModuleConfig_DetectionSensorConfig_TriggerType_MIN, 0}
|
||||
#define meshtastic_ModuleConfig_AudioConfig_init_zero {0, 0, _meshtastic_ModuleConfig_AudioConfig_Audio_Baud_MIN, 0, 0, 0, 0}
|
||||
#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, 0}
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_init_zero {0, 0, 0, 0}
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_init_zero {0, 0, 0, 0, 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}
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_init_zero {0, 0, 0, 0, 0}
|
||||
#define meshtastic_RemoteHardwarePin_init_zero {0, "", _meshtastic_RemoteHardwarePinType_MIN}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_publish_interval_secs_tag 1
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_position_precision_tag 2
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_should_report_location_tag 3
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_address_tag 2
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_username_tag 3
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_password_tag 4
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_encryption_enabled_tag 5
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_json_enabled_tag 6
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_tls_enabled_tag 7
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_root_tag 8
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_proxy_to_client_enabled_tag 9
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_map_reporting_enabled_tag 10
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_tag 11
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_update_interval_tag 2
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_transmit_over_lora_tag 3
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_minimum_broadcast_secs_tag 2
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_state_broadcast_secs_tag 3
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_send_bell_tag 4
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_name_tag 5
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_monitor_pin_tag 6
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_detection_trigger_type_tag 7
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_use_pullup_tag 8
|
||||
#define meshtastic_ModuleConfig_AudioConfig_codec2_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_AudioConfig_ptt_pin_tag 2
|
||||
#define meshtastic_ModuleConfig_AudioConfig_bitrate_tag 3
|
||||
#define meshtastic_ModuleConfig_AudioConfig_i2s_ws_tag 4
|
||||
#define meshtastic_ModuleConfig_AudioConfig_i2s_sd_tag 5
|
||||
#define meshtastic_ModuleConfig_AudioConfig_i2s_din_tag 6
|
||||
#define meshtastic_ModuleConfig_AudioConfig_i2s_sck_tag 7
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_paxcounter_update_interval_tag 2
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_wifi_threshold_tag 3
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_ble_threshold_tag 4
|
||||
#define meshtastic_ModuleConfig_SerialConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_SerialConfig_echo_tag 2
|
||||
#define meshtastic_ModuleConfig_SerialConfig_rxd_tag 3
|
||||
#define meshtastic_ModuleConfig_SerialConfig_txd_tag 4
|
||||
#define meshtastic_ModuleConfig_SerialConfig_baud_tag 5
|
||||
#define meshtastic_ModuleConfig_SerialConfig_timeout_tag 6
|
||||
#define meshtastic_ModuleConfig_SerialConfig_mode_tag 7
|
||||
#define meshtastic_ModuleConfig_SerialConfig_override_console_serial_port_tag 8
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_ms_tag 2
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_tag 3
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_active_tag 4
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_tag 5
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_tag 6
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_use_pwm_tag 7
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_vibra_tag 8
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_output_buzzer_tag 9
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_vibra_tag 10
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_message_buzzer_tag 11
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_vibra_tag 12
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_alert_bell_buzzer_tag 13
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_nag_timeout_tag 14
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_use_i2s_as_buzzer_tag 15
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_heartbeat_tag 2
|
||||
#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
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_clear_on_reboot_tag 4
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_device_update_interval_tag 1
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_environment_update_interval_tag 2
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_environment_measurement_enabled_tag 3
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_environment_screen_enabled_tag 4
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_environment_display_fahrenheit_tag 5
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_air_quality_enabled_tag 6
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_air_quality_interval_tag 7
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_power_measurement_enabled_tag 8
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_power_update_interval_tag 9
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_power_screen_enabled_tag 10
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_health_measurement_enabled_tag 11
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_health_update_interval_tag 12
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_health_screen_enabled_tag 13
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_device_telemetry_enabled_tag 14
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_rotary1_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_a_tag 2
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_b_tag 3
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_pin_press_tag 4
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_cw_tag 5
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_ccw_tag 6
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_inputbroker_event_press_tag 7
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_updown1_enabled_tag 8
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_enabled_tag 9
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_allow_input_source_tag 10
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_send_bell_tag 11
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_led_state_tag 1
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_current_tag 2
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_red_tag 3
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_green_tag 4
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_blue_tag 5
|
||||
#define meshtastic_RemoteHardwarePin_gpio_pin_tag 1
|
||||
#define meshtastic_RemoteHardwarePin_name_tag 2
|
||||
#define meshtastic_RemoteHardwarePin_type_tag 3
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_enabled_tag 1
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_allow_undefined_pin_access_tag 2
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_tag 3
|
||||
#define meshtastic_ModuleConfig_mqtt_tag 1
|
||||
#define meshtastic_ModuleConfig_serial_tag 2
|
||||
#define meshtastic_ModuleConfig_external_notification_tag 3
|
||||
#define meshtastic_ModuleConfig_store_forward_tag 4
|
||||
#define meshtastic_ModuleConfig_range_test_tag 5
|
||||
#define meshtastic_ModuleConfig_telemetry_tag 6
|
||||
#define meshtastic_ModuleConfig_canned_message_tag 7
|
||||
#define meshtastic_ModuleConfig_audio_tag 8
|
||||
#define meshtastic_ModuleConfig_remote_hardware_tag 9
|
||||
#define meshtastic_ModuleConfig_neighbor_info_tag 10
|
||||
#define meshtastic_ModuleConfig_ambient_lighting_tag 11
|
||||
#define meshtastic_ModuleConfig_detection_sensor_tag 12
|
||||
#define meshtastic_ModuleConfig_paxcounter_tag 13
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_ModuleConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,mqtt,payload_variant.mqtt), 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,serial,payload_variant.serial), 2) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,external_notification,payload_variant.external_notification), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,store_forward,payload_variant.store_forward), 4) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,range_test,payload_variant.range_test), 5) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,telemetry,payload_variant.telemetry), 6) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,canned_message,payload_variant.canned_message), 7) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,audio,payload_variant.audio), 8) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,remote_hardware,payload_variant.remote_hardware), 9) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,neighbor_info,payload_variant.neighbor_info), 10) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,ambient_lighting,payload_variant.ambient_lighting), 11) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,detection_sensor,payload_variant.detection_sensor), 12) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload_variant,paxcounter,payload_variant.paxcounter), 13)
|
||||
#define meshtastic_ModuleConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_DEFAULT NULL
|
||||
#define meshtastic_ModuleConfig_payload_variant_mqtt_MSGTYPE meshtastic_ModuleConfig_MQTTConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_serial_MSGTYPE meshtastic_ModuleConfig_SerialConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_external_notification_MSGTYPE meshtastic_ModuleConfig_ExternalNotificationConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_store_forward_MSGTYPE meshtastic_ModuleConfig_StoreForwardConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_range_test_MSGTYPE meshtastic_ModuleConfig_RangeTestConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_telemetry_MSGTYPE meshtastic_ModuleConfig_TelemetryConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_canned_message_MSGTYPE meshtastic_ModuleConfig_CannedMessageConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_audio_MSGTYPE meshtastic_ModuleConfig_AudioConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_remote_hardware_MSGTYPE meshtastic_ModuleConfig_RemoteHardwareConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_neighbor_info_MSGTYPE meshtastic_ModuleConfig_NeighborInfoConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_ambient_lighting_MSGTYPE meshtastic_ModuleConfig_AmbientLightingConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_detection_sensor_MSGTYPE meshtastic_ModuleConfig_DetectionSensorConfig
|
||||
#define meshtastic_ModuleConfig_payload_variant_paxcounter_MSGTYPE meshtastic_ModuleConfig_PaxcounterConfig
|
||||
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, address, 2) \
|
||||
X(a, STATIC, SINGULAR, STRING, username, 3) \
|
||||
X(a, STATIC, SINGULAR, STRING, password, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, encryption_enabled, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, json_enabled, 6) \
|
||||
X(a, STATIC, SINGULAR, BOOL, tls_enabled, 7) \
|
||||
X(a, STATIC, SINGULAR, STRING, root, 8) \
|
||||
X(a, STATIC, SINGULAR, BOOL, proxy_to_client_enabled, 9) \
|
||||
X(a, STATIC, SINGULAR, BOOL, map_reporting_enabled, 10) \
|
||||
X(a, STATIC, OPTIONAL, MESSAGE, map_report_settings, 11)
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_DEFAULT NULL
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_map_report_settings_MSGTYPE meshtastic_ModuleConfig_MapReportSettings
|
||||
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, publish_interval_secs, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, position_precision, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, should_report_location, 3)
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, allow_undefined_pin_access, 2) \
|
||||
X(a, STATIC, REPEATED, MESSAGE, available_pins, 3)
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_DEFAULT NULL
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_available_pins_MSGTYPE meshtastic_RemoteHardwarePin
|
||||
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, update_interval, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, transmit_over_lora, 3)
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, minimum_broadcast_secs, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, state_broadcast_secs, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, send_bell, 4) \
|
||||
X(a, STATIC, SINGULAR, STRING, name, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, monitor_pin, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, detection_trigger_type, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, use_pullup, 8)
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_AudioConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, codec2_enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ptt_pin, 2) \
|
||||
X(a, STATIC, SINGULAR, UENUM, bitrate, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, i2s_ws, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, i2s_sd, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, i2s_din, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, i2s_sck, 7)
|
||||
#define meshtastic_ModuleConfig_AudioConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_AudioConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, paxcounter_update_interval, 2) \
|
||||
X(a, STATIC, SINGULAR, INT32, wifi_threshold, 3) \
|
||||
X(a, STATIC, SINGULAR, INT32, ble_threshold, 4)
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_SerialConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, echo, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, rxd, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, txd, 4) \
|
||||
X(a, STATIC, SINGULAR, UENUM, baud, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, timeout, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, mode, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, override_console_serial_port, 8)
|
||||
#define meshtastic_ModuleConfig_SerialConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_SerialConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, output_ms, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, output, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, active, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_message, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_bell, 6) \
|
||||
X(a, STATIC, SINGULAR, BOOL, use_pwm, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, output_vibra, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, output_buzzer, 9) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_message_vibra, 10) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_message_buzzer, 11) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_bell_vibra, 12) \
|
||||
X(a, STATIC, SINGULAR, BOOL, alert_bell_buzzer, 13) \
|
||||
X(a, STATIC, SINGULAR, UINT32, nag_timeout, 14) \
|
||||
X(a, STATIC, SINGULAR, BOOL, use_i2s_as_buzzer, 15)
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_FIELDLIST(X, a) \
|
||||
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, BOOL, is_server, 6)
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, sender, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, save, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, clear_on_reboot, 4)
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, device_update_interval, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, environment_update_interval, 2) \
|
||||
X(a, STATIC, SINGULAR, BOOL, environment_measurement_enabled, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, environment_screen_enabled, 4) \
|
||||
X(a, STATIC, SINGULAR, BOOL, environment_display_fahrenheit, 5) \
|
||||
X(a, STATIC, SINGULAR, BOOL, air_quality_enabled, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, air_quality_interval, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, power_measurement_enabled, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, power_update_interval, 9) \
|
||||
X(a, STATIC, SINGULAR, BOOL, power_screen_enabled, 10) \
|
||||
X(a, STATIC, SINGULAR, BOOL, health_measurement_enabled, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, health_update_interval, 12) \
|
||||
X(a, STATIC, SINGULAR, BOOL, health_screen_enabled, 13) \
|
||||
X(a, STATIC, SINGULAR, BOOL, device_telemetry_enabled, 14)
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, rotary1_enabled, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, inputbroker_pin_a, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, inputbroker_pin_b, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, inputbroker_pin_press, 4) \
|
||||
X(a, STATIC, SINGULAR, UENUM, inputbroker_event_cw, 5) \
|
||||
X(a, STATIC, SINGULAR, UENUM, inputbroker_event_ccw, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, inputbroker_event_press, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, updown1_enabled, 8) \
|
||||
X(a, STATIC, SINGULAR, BOOL, enabled, 9) \
|
||||
X(a, STATIC, SINGULAR, STRING, allow_input_source, 10) \
|
||||
X(a, STATIC, SINGULAR, BOOL, send_bell, 11)
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, led_state, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, current, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, red, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, green, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, blue, 5)
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_CALLBACK NULL
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_DEFAULT NULL
|
||||
|
||||
#define meshtastic_RemoteHardwarePin_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, gpio_pin, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, name, 2) \
|
||||
X(a, STATIC, SINGULAR, UENUM, type, 3)
|
||||
#define meshtastic_RemoteHardwarePin_CALLBACK NULL
|
||||
#define meshtastic_RemoteHardwarePin_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_MQTTConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_MapReportSettings_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_RemoteHardwareConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_NeighborInfoConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_DetectionSensorConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_AudioConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_PaxcounterConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_SerialConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_ExternalNotificationConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_StoreForwardConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_RangeTestConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_TelemetryConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_CannedMessageConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_ModuleConfig_AmbientLightingConfig_msg;
|
||||
extern const pb_msgdesc_t meshtastic_RemoteHardwarePin_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_ModuleConfig_fields &meshtastic_ModuleConfig_msg
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_fields &meshtastic_ModuleConfig_MQTTConfig_msg
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_fields &meshtastic_ModuleConfig_MapReportSettings_msg
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_fields &meshtastic_ModuleConfig_RemoteHardwareConfig_msg
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_fields &meshtastic_ModuleConfig_NeighborInfoConfig_msg
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_fields &meshtastic_ModuleConfig_DetectionSensorConfig_msg
|
||||
#define meshtastic_ModuleConfig_AudioConfig_fields &meshtastic_ModuleConfig_AudioConfig_msg
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_fields &meshtastic_ModuleConfig_PaxcounterConfig_msg
|
||||
#define meshtastic_ModuleConfig_SerialConfig_fields &meshtastic_ModuleConfig_SerialConfig_msg
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_fields &meshtastic_ModuleConfig_ExternalNotificationConfig_msg
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_fields &meshtastic_ModuleConfig_StoreForwardConfig_msg
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_fields &meshtastic_ModuleConfig_RangeTestConfig_msg
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_fields &meshtastic_ModuleConfig_TelemetryConfig_msg
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_fields &meshtastic_ModuleConfig_CannedMessageConfig_msg
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_fields &meshtastic_ModuleConfig_AmbientLightingConfig_msg
|
||||
#define meshtastic_RemoteHardwarePin_fields &meshtastic_RemoteHardwarePin_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_MODULE_CONFIG_PB_H_MAX_SIZE meshtastic_ModuleConfig_size
|
||||
#define meshtastic_ModuleConfig_AmbientLightingConfig_size 14
|
||||
#define meshtastic_ModuleConfig_AudioConfig_size 19
|
||||
#define meshtastic_ModuleConfig_CannedMessageConfig_size 49
|
||||
#define meshtastic_ModuleConfig_DetectionSensorConfig_size 44
|
||||
#define meshtastic_ModuleConfig_ExternalNotificationConfig_size 42
|
||||
#define meshtastic_ModuleConfig_MQTTConfig_size 224
|
||||
#define meshtastic_ModuleConfig_MapReportSettings_size 14
|
||||
#define meshtastic_ModuleConfig_NeighborInfoConfig_size 10
|
||||
#define meshtastic_ModuleConfig_PaxcounterConfig_size 30
|
||||
#define meshtastic_ModuleConfig_RangeTestConfig_size 12
|
||||
#define meshtastic_ModuleConfig_RemoteHardwareConfig_size 96
|
||||
#define meshtastic_ModuleConfig_SerialConfig_size 28
|
||||
#define meshtastic_ModuleConfig_StoreForwardConfig_size 24
|
||||
#define meshtastic_ModuleConfig_TelemetryConfig_size 48
|
||||
#define meshtastic_ModuleConfig_size 227
|
||||
#define meshtastic_RemoteHardwarePin_size 21
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/mqtt.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_ServiceEnvelope, meshtastic_ServiceEnvelope, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_MapReport, meshtastic_MapReport, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_MQTT_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.
|
||||
#endif
|
||||
|
||||
/* Struct definitions */
|
||||
/* This message wraps a MeshPacket with extra metadata about the sender and how it arrived. */
|
||||
typedef struct _meshtastic_ServiceEnvelope {
|
||||
/* The (probably encrypted) packet */
|
||||
struct _meshtastic_MeshPacket *packet;
|
||||
/* The global channel ID it was sent on */
|
||||
char *channel_id;
|
||||
/* The sending gateway node ID. Can we use this to authenticate/prevent fake
|
||||
nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as
|
||||
the globally trusted nodenum */
|
||||
char *gateway_id;
|
||||
} meshtastic_ServiceEnvelope;
|
||||
|
||||
/* Information about a node intended to be reported unencrypted to a map using MQTT. */
|
||||
typedef struct _meshtastic_MapReport {
|
||||
/* 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];
|
||||
/* Role of the node that applies specific settings for a particular use-case */
|
||||
meshtastic_Config_DeviceConfig_Role role;
|
||||
/* Hardware model of the node, i.e. T-Beam, Heltec V3, etc... */
|
||||
meshtastic_HardwareModel hw_model;
|
||||
/* Device firmware version string */
|
||||
char firmware_version[18];
|
||||
/* The region code for the radio (US, CN, EU433, etc...) */
|
||||
meshtastic_Config_LoRaConfig_RegionCode region;
|
||||
/* Modem preset used by the radio (LongFast, MediumSlow, etc...) */
|
||||
meshtastic_Config_LoRaConfig_ModemPreset modem_preset;
|
||||
/* Whether the node has a channel with default PSK and name (LongFast, MediumSlow, etc...)
|
||||
and it uses the default frequency slot given the region and modem preset. */
|
||||
bool has_default_channel;
|
||||
/* Latitude: multiply by 1e-7 to get degrees in floating point */
|
||||
int32_t latitude_i;
|
||||
/* Longitude: multiply by 1e-7 to get degrees in floating point */
|
||||
int32_t longitude_i;
|
||||
/* Altitude in meters above MSL */
|
||||
int32_t altitude;
|
||||
/* Indicates the bits of precision for latitude and longitude set by the sending node */
|
||||
uint32_t position_precision;
|
||||
/* Number of online nodes (heard in the last 2 hours) this node has in its list that were received locally (not via MQTT) */
|
||||
uint16_t num_online_local_nodes;
|
||||
/* User has opted in to share their location (map report) with the mqtt server
|
||||
Controlled by map_report.should_report_location */
|
||||
bool has_opted_report_location;
|
||||
} meshtastic_MapReport;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_ServiceEnvelope_init_default {NULL, NULL, NULL}
|
||||
#define meshtastic_MapReport_init_default {"", "", _meshtastic_Config_DeviceConfig_Role_MIN, _meshtastic_HardwareModel_MIN, "", _meshtastic_Config_LoRaConfig_RegionCode_MIN, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_ServiceEnvelope_init_zero {NULL, NULL, NULL}
|
||||
#define meshtastic_MapReport_init_zero {"", "", _meshtastic_Config_DeviceConfig_Role_MIN, _meshtastic_HardwareModel_MIN, "", _meshtastic_Config_LoRaConfig_RegionCode_MIN, _meshtastic_Config_LoRaConfig_ModemPreset_MIN, 0, 0, 0, 0, 0, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_ServiceEnvelope_packet_tag 1
|
||||
#define meshtastic_ServiceEnvelope_channel_id_tag 2
|
||||
#define meshtastic_ServiceEnvelope_gateway_id_tag 3
|
||||
#define meshtastic_MapReport_long_name_tag 1
|
||||
#define meshtastic_MapReport_short_name_tag 2
|
||||
#define meshtastic_MapReport_role_tag 3
|
||||
#define meshtastic_MapReport_hw_model_tag 4
|
||||
#define meshtastic_MapReport_firmware_version_tag 5
|
||||
#define meshtastic_MapReport_region_tag 6
|
||||
#define meshtastic_MapReport_modem_preset_tag 7
|
||||
#define meshtastic_MapReport_has_default_channel_tag 8
|
||||
#define meshtastic_MapReport_latitude_i_tag 9
|
||||
#define meshtastic_MapReport_longitude_i_tag 10
|
||||
#define meshtastic_MapReport_altitude_tag 11
|
||||
#define meshtastic_MapReport_position_precision_tag 12
|
||||
#define meshtastic_MapReport_num_online_local_nodes_tag 13
|
||||
#define meshtastic_MapReport_has_opted_report_location_tag 14
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_ServiceEnvelope_FIELDLIST(X, a) \
|
||||
X(a, POINTER, OPTIONAL, MESSAGE, packet, 1) \
|
||||
X(a, POINTER, SINGULAR, STRING, channel_id, 2) \
|
||||
X(a, POINTER, SINGULAR, STRING, gateway_id, 3)
|
||||
#define meshtastic_ServiceEnvelope_CALLBACK NULL
|
||||
#define meshtastic_ServiceEnvelope_DEFAULT NULL
|
||||
#define meshtastic_ServiceEnvelope_packet_MSGTYPE meshtastic_MeshPacket
|
||||
|
||||
#define meshtastic_MapReport_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, long_name, 1) \
|
||||
X(a, STATIC, SINGULAR, STRING, short_name, 2) \
|
||||
X(a, STATIC, SINGULAR, UENUM, role, 3) \
|
||||
X(a, STATIC, SINGULAR, UENUM, hw_model, 4) \
|
||||
X(a, STATIC, SINGULAR, STRING, firmware_version, 5) \
|
||||
X(a, STATIC, SINGULAR, UENUM, region, 6) \
|
||||
X(a, STATIC, SINGULAR, UENUM, modem_preset, 7) \
|
||||
X(a, STATIC, SINGULAR, BOOL, has_default_channel, 8) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, latitude_i, 9) \
|
||||
X(a, STATIC, SINGULAR, SFIXED32, longitude_i, 10) \
|
||||
X(a, STATIC, SINGULAR, INT32, altitude, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, position_precision, 12) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_online_local_nodes, 13) \
|
||||
X(a, STATIC, SINGULAR, BOOL, has_opted_report_location, 14)
|
||||
#define meshtastic_MapReport_CALLBACK NULL
|
||||
#define meshtastic_MapReport_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_ServiceEnvelope_msg;
|
||||
extern const pb_msgdesc_t meshtastic_MapReport_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_ServiceEnvelope_fields &meshtastic_ServiceEnvelope_msg
|
||||
#define meshtastic_MapReport_fields &meshtastic_MapReport_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
/* meshtastic_ServiceEnvelope_size depends on runtime parameters */
|
||||
#define MESHTASTIC_MESHTASTIC_MQTT_PB_H_MAX_SIZE meshtastic_MapReport_size
|
||||
#define meshtastic_MapReport_size 110
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/paxcount.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_Paxcount, meshtastic_Paxcount, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_PAXCOUNT_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 */
|
||||
/* TODO: REPLACE */
|
||||
typedef struct _meshtastic_Paxcount {
|
||||
/* seen Wifi devices */
|
||||
uint32_t wifi;
|
||||
/* Seen BLE devices */
|
||||
uint32_t ble;
|
||||
/* Uptime in seconds */
|
||||
uint32_t uptime;
|
||||
} meshtastic_Paxcount;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_Paxcount_init_default {0, 0, 0}
|
||||
#define meshtastic_Paxcount_init_zero {0, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_Paxcount_wifi_tag 1
|
||||
#define meshtastic_Paxcount_ble_tag 2
|
||||
#define meshtastic_Paxcount_uptime_tag 3
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_Paxcount_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, wifi, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, ble, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, uptime, 3)
|
||||
#define meshtastic_Paxcount_CALLBACK NULL
|
||||
#define meshtastic_Paxcount_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_Paxcount_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_Paxcount_fields &meshtastic_Paxcount_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_PAXCOUNT_PB_H_MAX_SIZE meshtastic_Paxcount_size
|
||||
#define meshtastic_Paxcount_size 18
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/portnums.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_PORTNUMS_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_PORTNUMS_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 */
|
||||
/* For any new 'apps' that run on the device or via sister apps on phones/PCs they should pick and use a
|
||||
unique 'portnum' for their application.
|
||||
If you are making a new app using meshtastic, please send in a pull request to add your 'portnum' to this
|
||||
master table.
|
||||
PortNums should be assigned in the following range:
|
||||
0-63 Core Meshtastic use, do not use for third party apps
|
||||
64-127 Registered 3rd party apps, send in a pull request that adds a new entry to portnums.proto to register your application
|
||||
256-511 Use one of these portnums for your private applications that you don't want to register publically
|
||||
All other values are reserved.
|
||||
Note: This was formerly a Type enum named 'typ' with the same id #
|
||||
We have change to this 'portnum' based scheme for specifying app handlers for particular payloads.
|
||||
This change is backwards compatible by treating the legacy OPAQUE/CLEAR_TEXT values identically. */
|
||||
typedef enum _meshtastic_PortNum {
|
||||
/* Deprecated: do not use in new code (formerly called OPAQUE)
|
||||
A message sent from a device outside of the mesh, in a form the mesh does not understand
|
||||
NOTE: This must be 0, because it is documented in IMeshService.aidl to be so
|
||||
ENCODING: binary undefined */
|
||||
meshtastic_PortNum_UNKNOWN_APP = 0,
|
||||
/* A simple UTF-8 text message, which even the little micros in the mesh
|
||||
can understand and show on their screen eventually in some circumstances
|
||||
even signal might send messages in this form (see below)
|
||||
ENCODING: UTF-8 Plaintext (?) */
|
||||
meshtastic_PortNum_TEXT_MESSAGE_APP = 1,
|
||||
/* Reserved for built-in GPIO/example app.
|
||||
See remote_hardware.proto/HardwareMessage for details on the message sent/received to this port number
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_REMOTE_HARDWARE_APP = 2,
|
||||
/* The built-in position messaging app.
|
||||
Payload is a Position message.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_POSITION_APP = 3,
|
||||
/* The built-in user info app.
|
||||
Payload is a User message.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_NODEINFO_APP = 4,
|
||||
/* Protocol control packets for mesh protocol use.
|
||||
Payload is a Routing message.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_ROUTING_APP = 5,
|
||||
/* Admin control packets.
|
||||
Payload is a AdminMessage message.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_ADMIN_APP = 6,
|
||||
/* Compressed TEXT_MESSAGE payloads.
|
||||
ENCODING: UTF-8 Plaintext (?) with Unishox2 Compression
|
||||
NOTE: The Device Firmware converts a TEXT_MESSAGE_APP to TEXT_MESSAGE_COMPRESSED_APP if the compressed
|
||||
payload is shorter. There's no need for app developers to do this themselves. Also the firmware will decompress
|
||||
any incoming TEXT_MESSAGE_COMPRESSED_APP payload and convert to TEXT_MESSAGE_APP. */
|
||||
meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP = 7,
|
||||
/* Waypoint payloads.
|
||||
Payload is a Waypoint message.
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_WAYPOINT_APP = 8,
|
||||
/* Audio Payloads.
|
||||
Encapsulated codec2 packets. On 2.4 GHZ Bandwidths only for now
|
||||
ENCODING: codec2 audio frames
|
||||
NOTE: audio frames contain a 3 byte header (0xc0 0xde 0xc2) and a one byte marker for the decompressed bitrate.
|
||||
This marker comes from the 'moduleConfig.audio.bitrate' enum minus one. */
|
||||
meshtastic_PortNum_AUDIO_APP = 9,
|
||||
/* Same as Text Message but originating from Detection Sensor Module.
|
||||
NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */
|
||||
meshtastic_PortNum_DETECTION_SENSOR_APP = 10,
|
||||
/* Same as Text Message but used for critical alerts. */
|
||||
meshtastic_PortNum_ALERT_APP = 11,
|
||||
/* Module/port for handling key verification requests. */
|
||||
meshtastic_PortNum_KEY_VERIFICATION_APP = 12,
|
||||
/* Provides a 'ping' service that replies to any packet it receives.
|
||||
Also serves as a small example module.
|
||||
ENCODING: ASCII Plaintext */
|
||||
meshtastic_PortNum_REPLY_APP = 32,
|
||||
/* Used for the python IP tunnel feature
|
||||
ENCODING: IP Packet. Handled by the python API, firmware ignores this one and pases on. */
|
||||
meshtastic_PortNum_IP_TUNNEL_APP = 33,
|
||||
/* Paxcounter lib included in the firmware
|
||||
ENCODING: protobuf */
|
||||
meshtastic_PortNum_PAXCOUNTER_APP = 34,
|
||||
/* Provides a hardware serial interface to send and receive from the Meshtastic network.
|
||||
Connect to the RX/TX pins of a device with 38400 8N1. Packets received from the Meshtastic
|
||||
network is forwarded to the RX pin while sending a packet to TX will go out to the Mesh network.
|
||||
Maximum packet size of 240 bytes.
|
||||
Module is disabled by default can be turned on by setting SERIAL_MODULE_ENABLED = 1 in SerialPlugh.cpp.
|
||||
ENCODING: binary undefined */
|
||||
meshtastic_PortNum_SERIAL_APP = 64,
|
||||
/* STORE_FORWARD_APP (Work in Progress)
|
||||
Maintained by Jm Casler (MC Hamster) : jm@casler.org
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_STORE_FORWARD_APP = 65,
|
||||
/* Optional port for messages for the range test module.
|
||||
ENCODING: ASCII Plaintext
|
||||
NOTE: This portnum traffic is not sent to the public MQTT starting at firmware version 2.2.9 */
|
||||
meshtastic_PortNum_RANGE_TEST_APP = 66,
|
||||
/* Provides a format to send and receive telemetry data from the Meshtastic network.
|
||||
Maintained by Charles Crossan (crossan007) : crossan007@gmail.com
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_TELEMETRY_APP = 67,
|
||||
/* Experimental tools for estimating node position without a GPS
|
||||
Maintained by Github user a-f-G-U-C (a Meshtastic contributor)
|
||||
Project files at https://github.com/a-f-G-U-C/Meshtastic-ZPS
|
||||
ENCODING: arrays of int64 fields */
|
||||
meshtastic_PortNum_ZPS_APP = 68,
|
||||
/* Used to let multiple instances of Linux native applications communicate
|
||||
as if they did using their LoRa chip.
|
||||
Maintained by GitHub user GUVWAF.
|
||||
Project files at https://github.com/GUVWAF/Meshtasticator
|
||||
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. 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
|
||||
ENCODING: Protobuf */
|
||||
meshtastic_PortNum_NEIGHBORINFO_APP = 71,
|
||||
/* ATAK Plugin
|
||||
Portnum for payloads from the official Meshtastic ATAK plugin */
|
||||
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,
|
||||
/* Reticulum Network Stack Tunnel App
|
||||
ENCODING: Fragmented RNS Packet. Handled by Meshtastic RNS interface */
|
||||
meshtastic_PortNum_RETICULUM_TUNNEL_APP = 76,
|
||||
/* App for transporting Cayenne Low Power Payload, popular for LoRaWAN sensor nodes. Offers ability to send
|
||||
arbitrary telemetry over meshtastic that is not covered by telemetry.proto
|
||||
ENCODING: CayenneLLP */
|
||||
meshtastic_PortNum_CAYENNE_APP = 77,
|
||||
/* 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)) */
|
||||
meshtastic_PortNum_PRIVATE_APP = 256,
|
||||
/* ATAK Forwarder Module https://github.com/paulmandal/atak-forwarder
|
||||
ENCODING: libcotshrink */
|
||||
meshtastic_PortNum_ATAK_FORWARDER = 257,
|
||||
/* Currently we limit port nums to no higher than this value */
|
||||
meshtastic_PortNum_MAX = 511
|
||||
} meshtastic_PortNum;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_PortNum_MIN meshtastic_PortNum_UNKNOWN_APP
|
||||
#define _meshtastic_PortNum_MAX meshtastic_PortNum_MAX
|
||||
#define _meshtastic_PortNum_ARRAYSIZE ((meshtastic_PortNum)(meshtastic_PortNum_MAX+1))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#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
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/remote_hardware.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_HardwareMessage, meshtastic_HardwareMessage, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_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 */
|
||||
/* TODO: REPLACE */
|
||||
typedef enum _meshtastic_HardwareMessage_Type {
|
||||
/* Unset/unused */
|
||||
meshtastic_HardwareMessage_Type_UNSET = 0,
|
||||
/* Set gpio gpios based on gpio_mask/gpio_value */
|
||||
meshtastic_HardwareMessage_Type_WRITE_GPIOS = 1,
|
||||
/* We are now interested in watching the gpio_mask gpios.
|
||||
If the selected gpios change, please broadcast GPIOS_CHANGED.
|
||||
Will implicitly change the gpios requested to be INPUT gpios. */
|
||||
meshtastic_HardwareMessage_Type_WATCH_GPIOS = 2,
|
||||
/* The gpios listed in gpio_mask have changed, the new values are listed in gpio_value */
|
||||
meshtastic_HardwareMessage_Type_GPIOS_CHANGED = 3,
|
||||
/* Read the gpios specified in gpio_mask, send back a READ_GPIOS_REPLY reply with gpio_value populated */
|
||||
meshtastic_HardwareMessage_Type_READ_GPIOS = 4,
|
||||
/* A reply to READ_GPIOS. gpio_mask and gpio_value will be populated */
|
||||
meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY = 5
|
||||
} meshtastic_HardwareMessage_Type;
|
||||
|
||||
/* Struct definitions */
|
||||
/* An example app to show off the module system. This message is used for
|
||||
REMOTE_HARDWARE_APP PortNums.
|
||||
Also provides easy remote access to any GPIO.
|
||||
In the future other remote hardware operations can be added based on user interest
|
||||
(i.e. serial output, spi/i2c input/output).
|
||||
FIXME - currently this feature is turned on by default which is dangerous
|
||||
because no security yet (beyond the channel mechanism).
|
||||
It should be off by default and then protected based on some TBD mechanism
|
||||
(a special channel once multichannel support is included?) */
|
||||
typedef struct _meshtastic_HardwareMessage {
|
||||
/* What type of HardwareMessage is this? */
|
||||
meshtastic_HardwareMessage_Type type;
|
||||
/* What gpios are we changing. Not used for all MessageTypes, see MessageType for details */
|
||||
uint64_t gpio_mask;
|
||||
/* For gpios that were listed in gpio_mask as valid, what are the signal levels for those gpios.
|
||||
Not used for all MessageTypes, see MessageType for details */
|
||||
uint64_t gpio_value;
|
||||
} meshtastic_HardwareMessage;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_HardwareMessage_Type_MIN meshtastic_HardwareMessage_Type_UNSET
|
||||
#define _meshtastic_HardwareMessage_Type_MAX meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY
|
||||
#define _meshtastic_HardwareMessage_Type_ARRAYSIZE ((meshtastic_HardwareMessage_Type)(meshtastic_HardwareMessage_Type_READ_GPIOS_REPLY+1))
|
||||
|
||||
#define meshtastic_HardwareMessage_type_ENUMTYPE meshtastic_HardwareMessage_Type
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_HardwareMessage_init_default {_meshtastic_HardwareMessage_Type_MIN, 0, 0}
|
||||
#define meshtastic_HardwareMessage_init_zero {_meshtastic_HardwareMessage_Type_MIN, 0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_HardwareMessage_type_tag 1
|
||||
#define meshtastic_HardwareMessage_gpio_mask_tag 2
|
||||
#define meshtastic_HardwareMessage_gpio_value_tag 3
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_HardwareMessage_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, type, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT64, gpio_mask, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT64, gpio_value, 3)
|
||||
#define meshtastic_HardwareMessage_CALLBACK NULL
|
||||
#define meshtastic_HardwareMessage_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_HardwareMessage_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_HardwareMessage_fields &meshtastic_HardwareMessage_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_REMOTE_HARDWARE_PB_H_MAX_SIZE meshtastic_HardwareMessage_size
|
||||
#define meshtastic_HardwareMessage_size 24
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/rtttl.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_RTTTLConfig, meshtastic_RTTTLConfig, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_RTTTL_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_RTTTL_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 */
|
||||
/* Canned message module configuration. */
|
||||
typedef struct _meshtastic_RTTTLConfig {
|
||||
/* Ringtone for PWM Buzzer in RTTTL Format. */
|
||||
char ringtone[231];
|
||||
} meshtastic_RTTTLConfig;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_RTTTLConfig_init_default {""}
|
||||
#define meshtastic_RTTTLConfig_init_zero {""}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_RTTTLConfig_ringtone_tag 1
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_RTTTLConfig_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, STRING, ringtone, 1)
|
||||
#define meshtastic_RTTTLConfig_CALLBACK NULL
|
||||
#define meshtastic_RTTTLConfig_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_RTTTLConfig_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_RTTTLConfig_fields &meshtastic_RTTTLConfig_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_RTTTL_PB_H_MAX_SIZE meshtastic_RTTTLConfig_size
|
||||
#define meshtastic_RTTTLConfig_size 233
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/storeforward.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_StoreAndForward, meshtastic_StoreAndForward, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_StoreAndForward_Statistics, meshtastic_StoreAndForward_Statistics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_StoreAndForward_History, meshtastic_StoreAndForward_History, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_StoreAndForward_Heartbeat, meshtastic_StoreAndForward_Heartbeat, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_STOREFORWARD_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 */
|
||||
/* 001 - 063 = From Router
|
||||
064 - 127 = From Client */
|
||||
typedef enum _meshtastic_StoreAndForward_RequestResponse {
|
||||
/* Unset/unused */
|
||||
meshtastic_StoreAndForward_RequestResponse_UNSET = 0,
|
||||
/* Router is an in error state. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_ERROR = 1,
|
||||
/* Router heartbeat */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_HEARTBEAT = 2,
|
||||
/* Router has requested the client respond. This can work as a
|
||||
"are you there" message. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_PING = 3,
|
||||
/* The response to a "Ping" */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_PONG = 4,
|
||||
/* Router is currently busy. Please try again later. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_BUSY = 5,
|
||||
/* Router is responding to a request for history. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_HISTORY = 6,
|
||||
/* Router is responding to a request for stats. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_STATS = 7,
|
||||
/* Router sends a text message from its history that was a direct message. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_DIRECT = 8,
|
||||
/* Router sends a text message from its history that was a broadcast. */
|
||||
meshtastic_StoreAndForward_RequestResponse_ROUTER_TEXT_BROADCAST = 9,
|
||||
/* Client is an in error state. */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_ERROR = 64,
|
||||
/* Client has requested a replay from the router. */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_HISTORY = 65,
|
||||
/* Client has requested stats from the router. */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_STATS = 66,
|
||||
/* Client has requested the router respond. This can work as a
|
||||
"are you there" message. */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_PING = 67,
|
||||
/* The response to a "Ping" */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_PONG = 68,
|
||||
/* Client has requested that the router abort processing the client's request */
|
||||
meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT = 106
|
||||
} meshtastic_StoreAndForward_RequestResponse;
|
||||
|
||||
/* Struct definitions */
|
||||
/* TODO: REPLACE */
|
||||
typedef struct _meshtastic_StoreAndForward_Statistics {
|
||||
/* Number of messages we have ever seen */
|
||||
uint32_t messages_total;
|
||||
/* Number of messages we have currently saved our history. */
|
||||
uint32_t messages_saved;
|
||||
/* Maximum number of messages we will save */
|
||||
uint32_t messages_max;
|
||||
/* Router uptime in seconds */
|
||||
uint32_t up_time;
|
||||
/* Number of times any client sent a request to the S&F. */
|
||||
uint32_t requests;
|
||||
/* Number of times the history was requested. */
|
||||
uint32_t requests_history;
|
||||
/* Is the heartbeat enabled on the server? */
|
||||
bool heartbeat;
|
||||
/* Maximum number of messages the server will return. */
|
||||
uint32_t return_max;
|
||||
/* Maximum history window in minutes the server will return messages from. */
|
||||
uint32_t return_window;
|
||||
} meshtastic_StoreAndForward_Statistics;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef struct _meshtastic_StoreAndForward_History {
|
||||
/* Number of that will be sent to the client */
|
||||
uint32_t history_messages;
|
||||
/* The window of messages that was used to filter the history client requested */
|
||||
uint32_t window;
|
||||
/* Index in the packet history of the last message sent in a previous request to the server.
|
||||
Will be sent to the client before sending the history and can be set in a subsequent request to avoid getting packets the server already sent to the client. */
|
||||
uint32_t last_request;
|
||||
} meshtastic_StoreAndForward_History;
|
||||
|
||||
/* TODO: REPLACE */
|
||||
typedef struct _meshtastic_StoreAndForward_Heartbeat {
|
||||
/* Period in seconds that the heartbeat is sent out that will be sent to the client */
|
||||
uint32_t period;
|
||||
/* If set, this is not the primary Store & Forward router on the mesh */
|
||||
uint32_t secondary;
|
||||
} meshtastic_StoreAndForward_Heartbeat;
|
||||
|
||||
typedef PB_BYTES_ARRAY_T(233) meshtastic_StoreAndForward_text_t;
|
||||
/* TODO: REPLACE */
|
||||
typedef struct _meshtastic_StoreAndForward {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_StoreAndForward_RequestResponse rr;
|
||||
pb_size_t which_variant;
|
||||
union {
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_StoreAndForward_Statistics stats;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_StoreAndForward_History history;
|
||||
/* TODO: REPLACE */
|
||||
meshtastic_StoreAndForward_Heartbeat heartbeat;
|
||||
/* Text from history message. */
|
||||
meshtastic_StoreAndForward_text_t text;
|
||||
} variant;
|
||||
} meshtastic_StoreAndForward;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_StoreAndForward_RequestResponse_MIN meshtastic_StoreAndForward_RequestResponse_UNSET
|
||||
#define _meshtastic_StoreAndForward_RequestResponse_MAX meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT
|
||||
#define _meshtastic_StoreAndForward_RequestResponse_ARRAYSIZE ((meshtastic_StoreAndForward_RequestResponse)(meshtastic_StoreAndForward_RequestResponse_CLIENT_ABORT+1))
|
||||
|
||||
#define meshtastic_StoreAndForward_rr_ENUMTYPE meshtastic_StoreAndForward_RequestResponse
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_StoreAndForward_init_default {_meshtastic_StoreAndForward_RequestResponse_MIN, 0, {meshtastic_StoreAndForward_Statistics_init_default}}
|
||||
#define meshtastic_StoreAndForward_Statistics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_StoreAndForward_History_init_default {0, 0, 0}
|
||||
#define meshtastic_StoreAndForward_Heartbeat_init_default {0, 0}
|
||||
#define meshtastic_StoreAndForward_init_zero {_meshtastic_StoreAndForward_RequestResponse_MIN, 0, {meshtastic_StoreAndForward_Statistics_init_zero}}
|
||||
#define meshtastic_StoreAndForward_Statistics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_StoreAndForward_History_init_zero {0, 0, 0}
|
||||
#define meshtastic_StoreAndForward_Heartbeat_init_zero {0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_StoreAndForward_Statistics_messages_total_tag 1
|
||||
#define meshtastic_StoreAndForward_Statistics_messages_saved_tag 2
|
||||
#define meshtastic_StoreAndForward_Statistics_messages_max_tag 3
|
||||
#define meshtastic_StoreAndForward_Statistics_up_time_tag 4
|
||||
#define meshtastic_StoreAndForward_Statistics_requests_tag 5
|
||||
#define meshtastic_StoreAndForward_Statistics_requests_history_tag 6
|
||||
#define meshtastic_StoreAndForward_Statistics_heartbeat_tag 7
|
||||
#define meshtastic_StoreAndForward_Statistics_return_max_tag 8
|
||||
#define meshtastic_StoreAndForward_Statistics_return_window_tag 9
|
||||
#define meshtastic_StoreAndForward_History_history_messages_tag 1
|
||||
#define meshtastic_StoreAndForward_History_window_tag 2
|
||||
#define meshtastic_StoreAndForward_History_last_request_tag 3
|
||||
#define meshtastic_StoreAndForward_Heartbeat_period_tag 1
|
||||
#define meshtastic_StoreAndForward_Heartbeat_secondary_tag 2
|
||||
#define meshtastic_StoreAndForward_rr_tag 1
|
||||
#define meshtastic_StoreAndForward_stats_tag 2
|
||||
#define meshtastic_StoreAndForward_history_tag 3
|
||||
#define meshtastic_StoreAndForward_heartbeat_tag 4
|
||||
#define meshtastic_StoreAndForward_text_tag 5
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_StoreAndForward_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, rr, 1) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,stats,variant.stats), 2) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,history,variant.history), 3) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,heartbeat,variant.heartbeat), 4) \
|
||||
X(a, STATIC, ONEOF, BYTES, (variant,text,variant.text), 5)
|
||||
#define meshtastic_StoreAndForward_CALLBACK NULL
|
||||
#define meshtastic_StoreAndForward_DEFAULT NULL
|
||||
#define meshtastic_StoreAndForward_variant_stats_MSGTYPE meshtastic_StoreAndForward_Statistics
|
||||
#define meshtastic_StoreAndForward_variant_history_MSGTYPE meshtastic_StoreAndForward_History
|
||||
#define meshtastic_StoreAndForward_variant_heartbeat_MSGTYPE meshtastic_StoreAndForward_Heartbeat
|
||||
|
||||
#define meshtastic_StoreAndForward_Statistics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, messages_total, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, messages_saved, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, messages_max, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, up_time, 4) \
|
||||
X(a, STATIC, SINGULAR, UINT32, requests, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, requests_history, 6) \
|
||||
X(a, STATIC, SINGULAR, BOOL, heartbeat, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, return_max, 8) \
|
||||
X(a, STATIC, SINGULAR, UINT32, return_window, 9)
|
||||
#define meshtastic_StoreAndForward_Statistics_CALLBACK NULL
|
||||
#define meshtastic_StoreAndForward_Statistics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_StoreAndForward_History_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, history_messages, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, window, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, last_request, 3)
|
||||
#define meshtastic_StoreAndForward_History_CALLBACK NULL
|
||||
#define meshtastic_StoreAndForward_History_DEFAULT NULL
|
||||
|
||||
#define meshtastic_StoreAndForward_Heartbeat_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, period, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, secondary, 2)
|
||||
#define meshtastic_StoreAndForward_Heartbeat_CALLBACK NULL
|
||||
#define meshtastic_StoreAndForward_Heartbeat_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_StoreAndForward_msg;
|
||||
extern const pb_msgdesc_t meshtastic_StoreAndForward_Statistics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_StoreAndForward_History_msg;
|
||||
extern const pb_msgdesc_t meshtastic_StoreAndForward_Heartbeat_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_StoreAndForward_fields &meshtastic_StoreAndForward_msg
|
||||
#define meshtastic_StoreAndForward_Statistics_fields &meshtastic_StoreAndForward_Statistics_msg
|
||||
#define meshtastic_StoreAndForward_History_fields &meshtastic_StoreAndForward_History_msg
|
||||
#define meshtastic_StoreAndForward_Heartbeat_fields &meshtastic_StoreAndForward_Heartbeat_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_STOREFORWARD_PB_H_MAX_SIZE meshtastic_StoreAndForward_size
|
||||
#define meshtastic_StoreAndForward_Heartbeat_size 12
|
||||
#define meshtastic_StoreAndForward_History_size 18
|
||||
#define meshtastic_StoreAndForward_Statistics_size 50
|
||||
#define meshtastic_StoreAndForward_size 238
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,38 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/telemetry.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_DeviceMetrics, meshtastic_DeviceMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_EnvironmentMetrics, meshtastic_EnvironmentMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_PowerMetrics, meshtastic_PowerMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_AirQualityMetrics, meshtastic_AirQualityMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_LocalStats, meshtastic_LocalStats, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_HealthMetrics, meshtastic_HealthMetrics, AUTO)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_HostMetrics, meshtastic_HostMetrics, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Telemetry, meshtastic_Telemetry, 2)
|
||||
|
||||
|
||||
PB_BIND(meshtastic_Nau7802Config, meshtastic_Nau7802Config, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,767 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_TELEMETRY_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 */
|
||||
/* Supported I2C Sensors for telemetry in Meshtastic */
|
||||
typedef enum _meshtastic_TelemetrySensorType {
|
||||
/* No external telemetry sensor explicitly set */
|
||||
meshtastic_TelemetrySensorType_SENSOR_UNSET = 0,
|
||||
/* High accuracy temperature, pressure, humidity */
|
||||
meshtastic_TelemetrySensorType_BME280 = 1,
|
||||
/* High accuracy temperature, pressure, humidity, and air resistance */
|
||||
meshtastic_TelemetrySensorType_BME680 = 2,
|
||||
/* Very high accuracy temperature */
|
||||
meshtastic_TelemetrySensorType_MCP9808 = 3,
|
||||
/* Moderate accuracy current and voltage */
|
||||
meshtastic_TelemetrySensorType_INA260 = 4,
|
||||
/* Moderate accuracy current and voltage */
|
||||
meshtastic_TelemetrySensorType_INA219 = 5,
|
||||
/* High accuracy temperature and pressure */
|
||||
meshtastic_TelemetrySensorType_BMP280 = 6,
|
||||
/* High accuracy temperature and humidity */
|
||||
meshtastic_TelemetrySensorType_SHTC3 = 7,
|
||||
/* High accuracy pressure */
|
||||
meshtastic_TelemetrySensorType_LPS22 = 8,
|
||||
/* 3-Axis magnetic sensor */
|
||||
meshtastic_TelemetrySensorType_QMC6310 = 9,
|
||||
/* 6-Axis inertial measurement sensor */
|
||||
meshtastic_TelemetrySensorType_QMI8658 = 10,
|
||||
/* 3-Axis magnetic sensor */
|
||||
meshtastic_TelemetrySensorType_QMC5883L = 11,
|
||||
/* High accuracy temperature and humidity */
|
||||
meshtastic_TelemetrySensorType_SHT31 = 12,
|
||||
/* PM2.5 air quality sensor */
|
||||
meshtastic_TelemetrySensorType_PMSA003I = 13,
|
||||
/* INA3221 3 Channel Voltage / Current Sensor */
|
||||
meshtastic_TelemetrySensorType_INA3221 = 14,
|
||||
/* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) */
|
||||
meshtastic_TelemetrySensorType_BMP085 = 15,
|
||||
/* RCWL-9620 Doppler Radar Distance Sensor, used for water level detection */
|
||||
meshtastic_TelemetrySensorType_RCWL9620 = 16,
|
||||
/* Sensirion High accuracy temperature and humidity */
|
||||
meshtastic_TelemetrySensorType_SHT4X = 17,
|
||||
/* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor. */
|
||||
meshtastic_TelemetrySensorType_VEML7700 = 18,
|
||||
/* MLX90632 non-contact IR temperature sensor. */
|
||||
meshtastic_TelemetrySensorType_MLX90632 = 19,
|
||||
/* TI OPT3001 Ambient Light Sensor */
|
||||
meshtastic_TelemetrySensorType_OPT3001 = 20,
|
||||
/* Lite On LTR-390UV-01 UV Light Sensor */
|
||||
meshtastic_TelemetrySensorType_LTR390UV = 21,
|
||||
/* AMS TSL25911FN RGB Light Sensor */
|
||||
meshtastic_TelemetrySensorType_TSL25911FN = 22,
|
||||
/* AHT10 Integrated temperature and humidity sensor */
|
||||
meshtastic_TelemetrySensorType_AHT10 = 23,
|
||||
/* 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,
|
||||
/* 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,
|
||||
/* MAX30102 Pulse Oximeter and Heart-Rate Sensor */
|
||||
meshtastic_TelemetrySensorType_MAX30102 = 30,
|
||||
/* MLX90614 non-contact IR temperature sensor */
|
||||
meshtastic_TelemetrySensorType_MLX90614 = 31,
|
||||
/* SCD40/SCD41 CO2, humidity, temperature sensor */
|
||||
meshtastic_TelemetrySensorType_SCD4X = 32,
|
||||
/* ClimateGuard RadSens, radiation, Geiger-Muller Tube */
|
||||
meshtastic_TelemetrySensorType_RADSENS = 33,
|
||||
/* High accuracy current and voltage */
|
||||
meshtastic_TelemetrySensorType_INA226 = 34,
|
||||
/* DFRobot Gravity tipping bucket rain gauge */
|
||||
meshtastic_TelemetrySensorType_DFROBOT_RAIN = 35,
|
||||
/* Infineon DPS310 High accuracy pressure and temperature */
|
||||
meshtastic_TelemetrySensorType_DPS310 = 36,
|
||||
/* RAKWireless RAK12035 Soil Moisture Sensor Module */
|
||||
meshtastic_TelemetrySensorType_RAK12035 = 37,
|
||||
/* MAX17261 lipo battery gauge */
|
||||
meshtastic_TelemetrySensorType_MAX17261 = 38,
|
||||
/* PCT2075 Temperature Sensor */
|
||||
meshtastic_TelemetrySensorType_PCT2075 = 39,
|
||||
/* ADS1X15 ADC */
|
||||
meshtastic_TelemetrySensorType_ADS1X15 = 40,
|
||||
/* ADS1X15 ADC_ALT */
|
||||
meshtastic_TelemetrySensorType_ADS1X15_ALT = 41,
|
||||
/* Sensirion SFA30 Formaldehyde sensor */
|
||||
meshtastic_TelemetrySensorType_SFA30 = 42,
|
||||
/* SEN5X PM SENSORS */
|
||||
meshtastic_TelemetrySensorType_SEN5X = 43,
|
||||
/* TSL2561 light sensor */
|
||||
meshtastic_TelemetrySensorType_TSL2561 = 44,
|
||||
/* BH1750 light sensor */
|
||||
meshtastic_TelemetrySensorType_BH1750 = 45
|
||||
} 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;
|
||||
/* Radiation in µR/h */
|
||||
bool has_radiation;
|
||||
float radiation;
|
||||
/* Rainfall in the last hour in mm */
|
||||
bool has_rainfall_1h;
|
||||
float rainfall_1h;
|
||||
/* Rainfall in the last 24 hours in mm */
|
||||
bool has_rainfall_24h;
|
||||
float rainfall_24h;
|
||||
/* Soil moisture measured (% 1-100) */
|
||||
bool has_soil_moisture;
|
||||
uint8_t soil_moisture;
|
||||
/* Soil temperature measured (*C) */
|
||||
bool has_soil_temperature;
|
||||
float soil_temperature;
|
||||
} 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;
|
||||
/* Voltage (Ch4) */
|
||||
bool has_ch4_voltage;
|
||||
float ch4_voltage;
|
||||
/* Current (Ch4) */
|
||||
bool has_ch4_current;
|
||||
float ch4_current;
|
||||
/* Voltage (Ch5) */
|
||||
bool has_ch5_voltage;
|
||||
float ch5_voltage;
|
||||
/* Current (Ch5) */
|
||||
bool has_ch5_current;
|
||||
float ch5_current;
|
||||
/* Voltage (Ch6) */
|
||||
bool has_ch6_voltage;
|
||||
float ch6_voltage;
|
||||
/* Current (Ch6) */
|
||||
bool has_ch6_current;
|
||||
float ch6_current;
|
||||
/* Voltage (Ch7) */
|
||||
bool has_ch7_voltage;
|
||||
float ch7_voltage;
|
||||
/* Current (Ch7) */
|
||||
bool has_ch7_current;
|
||||
float ch7_current;
|
||||
/* Voltage (Ch8) */
|
||||
bool has_ch8_voltage;
|
||||
float ch8_voltage;
|
||||
/* Current (Ch8) */
|
||||
bool has_ch8_current;
|
||||
float ch8_current;
|
||||
} meshtastic_PowerMetrics;
|
||||
|
||||
/* Air quality metrics */
|
||||
typedef struct _meshtastic_AirQualityMetrics {
|
||||
/* Concentration Units Standard PM1.0 in ug/m3 */
|
||||
bool has_pm10_standard;
|
||||
uint32_t pm10_standard;
|
||||
/* Concentration Units Standard PM2.5 in ug/m3 */
|
||||
bool has_pm25_standard;
|
||||
uint32_t pm25_standard;
|
||||
/* Concentration Units Standard PM10.0 in ug/m3 */
|
||||
bool has_pm100_standard;
|
||||
uint32_t pm100_standard;
|
||||
/* Concentration Units Environmental PM1.0 in ug/m3 */
|
||||
bool has_pm10_environmental;
|
||||
uint32_t pm10_environmental;
|
||||
/* Concentration Units Environmental PM2.5 in ug/m3 */
|
||||
bool has_pm25_environmental;
|
||||
uint32_t pm25_environmental;
|
||||
/* Concentration Units Environmental PM10.0 in ug/m3 */
|
||||
bool has_pm100_environmental;
|
||||
uint32_t pm100_environmental;
|
||||
/* 0.3um Particle Count in #/0.1l */
|
||||
bool has_particles_03um;
|
||||
uint32_t particles_03um;
|
||||
/* 0.5um Particle Count in #/0.1l */
|
||||
bool has_particles_05um;
|
||||
uint32_t particles_05um;
|
||||
/* 1.0um Particle Count in #/0.1l */
|
||||
bool has_particles_10um;
|
||||
uint32_t particles_10um;
|
||||
/* 2.5um Particle Count in #/0.1l */
|
||||
bool has_particles_25um;
|
||||
uint32_t particles_25um;
|
||||
/* 5.0um Particle Count in #/0.1l */
|
||||
bool has_particles_50um;
|
||||
uint32_t particles_50um;
|
||||
/* 10.0um Particle Count in #/0.1l */
|
||||
bool has_particles_100um;
|
||||
uint32_t particles_100um;
|
||||
/* CO2 concentration in ppm */
|
||||
bool has_co2;
|
||||
uint32_t co2;
|
||||
/* CO2 sensor temperature in degC */
|
||||
bool has_co2_temperature;
|
||||
float co2_temperature;
|
||||
/* CO2 sensor relative humidity in % */
|
||||
bool has_co2_humidity;
|
||||
float co2_humidity;
|
||||
/* Formaldehyde sensor formaldehyde concentration in ppb */
|
||||
bool has_form_formaldehyde;
|
||||
float form_formaldehyde;
|
||||
/* Formaldehyde sensor relative humidity in %RH */
|
||||
bool has_form_humidity;
|
||||
float form_humidity;
|
||||
/* Formaldehyde sensor temperature in degrees Celsius */
|
||||
bool has_form_temperature;
|
||||
float form_temperature;
|
||||
/* Concentration Units Standard PM4.0 in ug/m3 */
|
||||
bool has_pm40_standard;
|
||||
uint32_t pm40_standard;
|
||||
/* 4.0um Particle Count in #/0.1l */
|
||||
bool has_particles_40um;
|
||||
uint32_t particles_40um;
|
||||
/* PM Sensor Temperature */
|
||||
bool has_pm_temperature;
|
||||
float pm_temperature;
|
||||
/* PM Sensor humidity */
|
||||
bool has_pm_humidity;
|
||||
float pm_humidity;
|
||||
/* PM Sensor VOC Index */
|
||||
bool has_pm_voc_idx;
|
||||
float pm_voc_idx;
|
||||
/* PM Sensor NOx Index */
|
||||
bool has_pm_nox_idx;
|
||||
float pm_nox_idx;
|
||||
/* Typical Particle Size in um */
|
||||
bool has_particles_tps;
|
||||
float particles_tps;
|
||||
} 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 (both good and bad) */
|
||||
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;
|
||||
/* Number of received packets that were duplicates (due to multiple nodes relaying).
|
||||
If this number is high, there are nodes in the mesh relaying packets when it's unnecessary, for example due to the ROUTER/REPEATER role. */
|
||||
uint32_t num_rx_dupe;
|
||||
/* Number of packets we transmitted that were a relay for others (not originating from ourselves). */
|
||||
uint32_t num_tx_relay;
|
||||
/* Number of times we canceled a packet to be relayed, because someone else did it before us.
|
||||
This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you. */
|
||||
uint32_t num_tx_relay_canceled;
|
||||
/* Number of bytes used in the heap */
|
||||
uint32_t heap_total_bytes;
|
||||
/* Number of bytes free in the heap */
|
||||
uint32_t heap_free_bytes;
|
||||
/* Number of packets that were dropped because the transmit queue was full. */
|
||||
uint16_t num_tx_dropped;
|
||||
} meshtastic_LocalStats;
|
||||
|
||||
/* Health telemetry metrics */
|
||||
typedef struct _meshtastic_HealthMetrics {
|
||||
/* Heart rate (beats per minute) */
|
||||
bool has_heart_bpm;
|
||||
uint8_t heart_bpm;
|
||||
/* SpO2 (blood oxygen saturation) level */
|
||||
bool has_spO2;
|
||||
uint8_t spO2;
|
||||
/* Body temperature in degrees Celsius */
|
||||
bool has_temperature;
|
||||
float temperature;
|
||||
} meshtastic_HealthMetrics;
|
||||
|
||||
/* Linux host metrics */
|
||||
typedef struct _meshtastic_HostMetrics {
|
||||
/* Host system uptime */
|
||||
uint32_t uptime_seconds;
|
||||
/* Host system free memory */
|
||||
uint64_t freemem_bytes;
|
||||
/* Host system disk space free for / */
|
||||
uint64_t diskfree1_bytes;
|
||||
/* Secondary system disk space free */
|
||||
bool has_diskfree2_bytes;
|
||||
uint64_t diskfree2_bytes;
|
||||
/* Tertiary disk space free */
|
||||
bool has_diskfree3_bytes;
|
||||
uint64_t diskfree3_bytes;
|
||||
/* Host system one minute load in 1/100ths */
|
||||
uint16_t load1;
|
||||
/* Host system five minute load in 1/100ths */
|
||||
uint16_t load5;
|
||||
/* Host system fifteen minute load in 1/100ths */
|
||||
uint16_t load15;
|
||||
/* Optional User-provided string for arbitrary host system information
|
||||
that doesn't make sense as a dedicated entry. */
|
||||
bool has_user_string;
|
||||
char user_string[200];
|
||||
} meshtastic_HostMetrics;
|
||||
|
||||
/* Types of Measurements the telemetry module is equipped to handle */
|
||||
typedef struct _meshtastic_Telemetry {
|
||||
/* Seconds since 1970 - or 0 for unknown/unset */
|
||||
uint32_t time;
|
||||
pb_size_t which_variant;
|
||||
union {
|
||||
/* Key native device metrics such as battery level */
|
||||
meshtastic_DeviceMetrics device_metrics;
|
||||
/* Weather station or other environmental metrics */
|
||||
meshtastic_EnvironmentMetrics environment_metrics;
|
||||
/* Air quality metrics */
|
||||
meshtastic_AirQualityMetrics air_quality_metrics;
|
||||
/* Power Metrics */
|
||||
meshtastic_PowerMetrics power_metrics;
|
||||
/* Local device mesh statistics */
|
||||
meshtastic_LocalStats local_stats;
|
||||
/* Health telemetry metrics */
|
||||
meshtastic_HealthMetrics health_metrics;
|
||||
/* Linux host metrics */
|
||||
meshtastic_HostMetrics host_metrics;
|
||||
} variant;
|
||||
} meshtastic_Telemetry;
|
||||
|
||||
/* NAU7802 Telemetry configuration, for saving to flash */
|
||||
typedef struct _meshtastic_Nau7802Config {
|
||||
/* The offset setting for the NAU7802 */
|
||||
int32_t zeroOffset;
|
||||
/* The calibration factor for the NAU7802 */
|
||||
float calibrationFactor;
|
||||
} meshtastic_Nau7802Config;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_TelemetrySensorType_MIN meshtastic_TelemetrySensorType_SENSOR_UNSET
|
||||
#define _meshtastic_TelemetrySensorType_MAX meshtastic_TelemetrySensorType_BH1750
|
||||
#define _meshtastic_TelemetrySensorType_ARRAYSIZE ((meshtastic_TelemetrySensorType)(meshtastic_TelemetrySensorType_BH1750+1))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#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, 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, false, 0, false, 0, false, 0, false, 0, 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, 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_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_HostMetrics_init_default {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||
#define meshtastic_Nau7802Config_init_default {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, 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, false, 0, false, 0, false, 0, false, 0, 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, 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_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
||||
#define meshtastic_HostMetrics_init_zero {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||
#define meshtastic_Nau7802Config_init_zero {0, 0}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_DeviceMetrics_battery_level_tag 1
|
||||
#define meshtastic_DeviceMetrics_voltage_tag 2
|
||||
#define meshtastic_DeviceMetrics_channel_utilization_tag 3
|
||||
#define meshtastic_DeviceMetrics_air_util_tx_tag 4
|
||||
#define meshtastic_DeviceMetrics_uptime_seconds_tag 5
|
||||
#define meshtastic_EnvironmentMetrics_temperature_tag 1
|
||||
#define meshtastic_EnvironmentMetrics_relative_humidity_tag 2
|
||||
#define meshtastic_EnvironmentMetrics_barometric_pressure_tag 3
|
||||
#define meshtastic_EnvironmentMetrics_gas_resistance_tag 4
|
||||
#define meshtastic_EnvironmentMetrics_voltage_tag 5
|
||||
#define meshtastic_EnvironmentMetrics_current_tag 6
|
||||
#define meshtastic_EnvironmentMetrics_iaq_tag 7
|
||||
#define meshtastic_EnvironmentMetrics_distance_tag 8
|
||||
#define meshtastic_EnvironmentMetrics_lux_tag 9
|
||||
#define meshtastic_EnvironmentMetrics_white_lux_tag 10
|
||||
#define meshtastic_EnvironmentMetrics_ir_lux_tag 11
|
||||
#define meshtastic_EnvironmentMetrics_uv_lux_tag 12
|
||||
#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_EnvironmentMetrics_radiation_tag 18
|
||||
#define meshtastic_EnvironmentMetrics_rainfall_1h_tag 19
|
||||
#define meshtastic_EnvironmentMetrics_rainfall_24h_tag 20
|
||||
#define meshtastic_EnvironmentMetrics_soil_moisture_tag 21
|
||||
#define meshtastic_EnvironmentMetrics_soil_temperature_tag 22
|
||||
#define meshtastic_PowerMetrics_ch1_voltage_tag 1
|
||||
#define meshtastic_PowerMetrics_ch1_current_tag 2
|
||||
#define meshtastic_PowerMetrics_ch2_voltage_tag 3
|
||||
#define meshtastic_PowerMetrics_ch2_current_tag 4
|
||||
#define meshtastic_PowerMetrics_ch3_voltage_tag 5
|
||||
#define meshtastic_PowerMetrics_ch3_current_tag 6
|
||||
#define meshtastic_PowerMetrics_ch4_voltage_tag 7
|
||||
#define meshtastic_PowerMetrics_ch4_current_tag 8
|
||||
#define meshtastic_PowerMetrics_ch5_voltage_tag 9
|
||||
#define meshtastic_PowerMetrics_ch5_current_tag 10
|
||||
#define meshtastic_PowerMetrics_ch6_voltage_tag 11
|
||||
#define meshtastic_PowerMetrics_ch6_current_tag 12
|
||||
#define meshtastic_PowerMetrics_ch7_voltage_tag 13
|
||||
#define meshtastic_PowerMetrics_ch7_current_tag 14
|
||||
#define meshtastic_PowerMetrics_ch8_voltage_tag 15
|
||||
#define meshtastic_PowerMetrics_ch8_current_tag 16
|
||||
#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_AirQualityMetrics_co2_tag 13
|
||||
#define meshtastic_AirQualityMetrics_co2_temperature_tag 14
|
||||
#define meshtastic_AirQualityMetrics_co2_humidity_tag 15
|
||||
#define meshtastic_AirQualityMetrics_form_formaldehyde_tag 16
|
||||
#define meshtastic_AirQualityMetrics_form_humidity_tag 17
|
||||
#define meshtastic_AirQualityMetrics_form_temperature_tag 18
|
||||
#define meshtastic_AirQualityMetrics_pm40_standard_tag 19
|
||||
#define meshtastic_AirQualityMetrics_particles_40um_tag 20
|
||||
#define meshtastic_AirQualityMetrics_pm_temperature_tag 21
|
||||
#define meshtastic_AirQualityMetrics_pm_humidity_tag 22
|
||||
#define meshtastic_AirQualityMetrics_pm_voc_idx_tag 23
|
||||
#define meshtastic_AirQualityMetrics_pm_nox_idx_tag 24
|
||||
#define meshtastic_AirQualityMetrics_particles_tps_tag 25
|
||||
#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_LocalStats_num_rx_dupe_tag 9
|
||||
#define meshtastic_LocalStats_num_tx_relay_tag 10
|
||||
#define meshtastic_LocalStats_num_tx_relay_canceled_tag 11
|
||||
#define meshtastic_LocalStats_heap_total_bytes_tag 12
|
||||
#define meshtastic_LocalStats_heap_free_bytes_tag 13
|
||||
#define meshtastic_LocalStats_num_tx_dropped_tag 14
|
||||
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
||||
#define meshtastic_HealthMetrics_spO2_tag 2
|
||||
#define meshtastic_HealthMetrics_temperature_tag 3
|
||||
#define meshtastic_HostMetrics_uptime_seconds_tag 1
|
||||
#define meshtastic_HostMetrics_freemem_bytes_tag 2
|
||||
#define meshtastic_HostMetrics_diskfree1_bytes_tag 3
|
||||
#define meshtastic_HostMetrics_diskfree2_bytes_tag 4
|
||||
#define meshtastic_HostMetrics_diskfree3_bytes_tag 5
|
||||
#define meshtastic_HostMetrics_load1_tag 6
|
||||
#define meshtastic_HostMetrics_load5_tag 7
|
||||
#define meshtastic_HostMetrics_load15_tag 8
|
||||
#define meshtastic_HostMetrics_user_string_tag 9
|
||||
#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_Telemetry_health_metrics_tag 7
|
||||
#define meshtastic_Telemetry_host_metrics_tag 8
|
||||
#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, 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, 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) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, radiation, 18) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, rainfall_1h, 19) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, rainfall_24h, 20) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, soil_moisture, 21) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, soil_temperature, 22)
|
||||
#define meshtastic_EnvironmentMetrics_CALLBACK NULL
|
||||
#define meshtastic_EnvironmentMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_PowerMetrics_FIELDLIST(X, a) \
|
||||
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) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch4_voltage, 7) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch4_current, 8) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch5_voltage, 9) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch5_current, 10) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch6_voltage, 11) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch6_current, 12) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch7_voltage, 13) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch7_current, 14) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch8_voltage, 15) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, ch8_current, 16)
|
||||
#define meshtastic_PowerMetrics_CALLBACK NULL
|
||||
#define meshtastic_PowerMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_AirQualityMetrics_FIELDLIST(X, a) \
|
||||
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) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, co2, 13) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, co2_temperature, 14) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, co2_humidity, 15) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, form_formaldehyde, 16) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, form_humidity, 17) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, form_temperature, 18) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, pm40_standard, 19) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, particles_40um, 20) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_temperature, 21) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_humidity, 22) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_voc_idx, 23) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, pm_nox_idx, 24) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, particles_tps, 25)
|
||||
#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) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_rx_dupe, 9) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_tx_relay, 10) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) \
|
||||
X(a, STATIC, SINGULAR, UINT32, heap_total_bytes, 12) \
|
||||
X(a, STATIC, SINGULAR, UINT32, heap_free_bytes, 13) \
|
||||
X(a, STATIC, SINGULAR, UINT32, num_tx_dropped, 14)
|
||||
#define meshtastic_LocalStats_CALLBACK NULL
|
||||
#define meshtastic_LocalStats_DEFAULT NULL
|
||||
|
||||
#define meshtastic_HealthMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, heart_bpm, 1) \
|
||||
X(a, STATIC, OPTIONAL, UINT32, spO2, 2) \
|
||||
X(a, STATIC, OPTIONAL, FLOAT, temperature, 3)
|
||||
#define meshtastic_HealthMetrics_CALLBACK NULL
|
||||
#define meshtastic_HealthMetrics_DEFAULT NULL
|
||||
|
||||
#define meshtastic_HostMetrics_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, uptime_seconds, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT64, freemem_bytes, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT64, diskfree1_bytes, 3) \
|
||||
X(a, STATIC, OPTIONAL, UINT64, diskfree2_bytes, 4) \
|
||||
X(a, STATIC, OPTIONAL, UINT64, diskfree3_bytes, 5) \
|
||||
X(a, STATIC, SINGULAR, UINT32, load1, 6) \
|
||||
X(a, STATIC, SINGULAR, UINT32, load5, 7) \
|
||||
X(a, STATIC, SINGULAR, UINT32, load15, 8) \
|
||||
X(a, STATIC, OPTIONAL, STRING, user_string, 9)
|
||||
#define meshtastic_HostMetrics_CALLBACK NULL
|
||||
#define meshtastic_HostMetrics_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,local_stats,variant.local_stats), 6) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,health_metrics,variant.health_metrics), 7) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (variant,host_metrics,variant.host_metrics), 8)
|
||||
#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_Telemetry_variant_health_metrics_MSGTYPE meshtastic_HealthMetrics
|
||||
#define meshtastic_Telemetry_variant_host_metrics_MSGTYPE meshtastic_HostMetrics
|
||||
|
||||
#define meshtastic_Nau7802Config_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, INT32, zeroOffset, 1) \
|
||||
X(a, STATIC, SINGULAR, FLOAT, calibrationFactor, 2)
|
||||
#define meshtastic_Nau7802Config_CALLBACK NULL
|
||||
#define meshtastic_Nau7802Config_DEFAULT NULL
|
||||
|
||||
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_HealthMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_HostMetrics_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Telemetry_msg;
|
||||
extern const pb_msgdesc_t meshtastic_Nau7802Config_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_PowerMetrics_fields &meshtastic_PowerMetrics_msg
|
||||
#define meshtastic_AirQualityMetrics_fields &meshtastic_AirQualityMetrics_msg
|
||||
#define meshtastic_LocalStats_fields &meshtastic_LocalStats_msg
|
||||
#define meshtastic_HealthMetrics_fields &meshtastic_HealthMetrics_msg
|
||||
#define meshtastic_HostMetrics_fields &meshtastic_HostMetrics_msg
|
||||
#define meshtastic_Telemetry_fields &meshtastic_Telemetry_msg
|
||||
#define meshtastic_Nau7802Config_fields &meshtastic_Nau7802Config_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_TELEMETRY_PB_H_MAX_SIZE meshtastic_Telemetry_size
|
||||
#define meshtastic_AirQualityMetrics_size 150
|
||||
#define meshtastic_DeviceMetrics_size 27
|
||||
#define meshtastic_EnvironmentMetrics_size 113
|
||||
#define meshtastic_HealthMetrics_size 11
|
||||
#define meshtastic_HostMetrics_size 264
|
||||
#define meshtastic_LocalStats_size 76
|
||||
#define meshtastic_Nau7802Config_size 16
|
||||
#define meshtastic_PowerMetrics_size 81
|
||||
#define meshtastic_Telemetry_size 272
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Automatically generated nanopb constant definitions */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#include "meshtastic/xmodem.pb.h"
|
||||
#if PB_PROTO_HEADER_VERSION != 40
|
||||
#error Regenerate this file with the current version of nanopb generator.
|
||||
#endif
|
||||
|
||||
PB_BIND(meshtastic_XModem, meshtastic_XModem, AUTO)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* Automatically generated nanopb header */
|
||||
/* Generated by nanopb-0.4.9.1 */
|
||||
|
||||
#ifndef PB_MESHTASTIC_MESHTASTIC_XMODEM_PB_H_INCLUDED
|
||||
#define PB_MESHTASTIC_MESHTASTIC_XMODEM_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 */
|
||||
typedef enum _meshtastic_XModem_Control {
|
||||
meshtastic_XModem_Control_NUL = 0,
|
||||
meshtastic_XModem_Control_SOH = 1,
|
||||
meshtastic_XModem_Control_STX = 2,
|
||||
meshtastic_XModem_Control_EOT = 4,
|
||||
meshtastic_XModem_Control_ACK = 6,
|
||||
meshtastic_XModem_Control_NAK = 21,
|
||||
meshtastic_XModem_Control_CAN = 24,
|
||||
meshtastic_XModem_Control_CTRLZ = 26
|
||||
} meshtastic_XModem_Control;
|
||||
|
||||
/* Struct definitions */
|
||||
typedef PB_BYTES_ARRAY_T(128) meshtastic_XModem_buffer_t;
|
||||
typedef struct _meshtastic_XModem {
|
||||
meshtastic_XModem_Control control;
|
||||
uint16_t seq;
|
||||
uint16_t crc16;
|
||||
meshtastic_XModem_buffer_t buffer;
|
||||
} meshtastic_XModem;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _meshtastic_XModem_Control_MIN meshtastic_XModem_Control_NUL
|
||||
#define _meshtastic_XModem_Control_MAX meshtastic_XModem_Control_CTRLZ
|
||||
#define _meshtastic_XModem_Control_ARRAYSIZE ((meshtastic_XModem_Control)(meshtastic_XModem_Control_CTRLZ+1))
|
||||
|
||||
#define meshtastic_XModem_control_ENUMTYPE meshtastic_XModem_Control
|
||||
|
||||
|
||||
/* Initializer values for message structs */
|
||||
#define meshtastic_XModem_init_default {_meshtastic_XModem_Control_MIN, 0, 0, {0, {0}}}
|
||||
#define meshtastic_XModem_init_zero {_meshtastic_XModem_Control_MIN, 0, 0, {0, {0}}}
|
||||
|
||||
/* Field tags (for use in manual encoding/decoding) */
|
||||
#define meshtastic_XModem_control_tag 1
|
||||
#define meshtastic_XModem_seq_tag 2
|
||||
#define meshtastic_XModem_crc16_tag 3
|
||||
#define meshtastic_XModem_buffer_tag 4
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define meshtastic_XModem_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UENUM, control, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, seq, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, crc16, 3) \
|
||||
X(a, STATIC, SINGULAR, BYTES, buffer, 4)
|
||||
#define meshtastic_XModem_CALLBACK NULL
|
||||
#define meshtastic_XModem_DEFAULT NULL
|
||||
|
||||
extern const pb_msgdesc_t meshtastic_XModem_msg;
|
||||
|
||||
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
||||
#define meshtastic_XModem_fields &meshtastic_XModem_msg
|
||||
|
||||
/* Maximum encoded size of messages (where known) */
|
||||
#define MESHTASTIC_MESHTASTIC_XMODEM_PB_H_MAX_SIZE meshtastic_XModem_size
|
||||
#define meshtastic_XModem_size 141
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user