/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.9.1 */

#ifndef PB_MESHTASTIC_MESHTASTIC_MESH_BEACON_PB_H_INCLUDED
#define PB_MESHTASTIC_MESHTASTIC_MESH_BEACON_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 */
/* Payload for MESH_BEACON_APP packets.
 Periodically broadcast by nodes in beacon mode.
 Listeners deliver the text message to the local inbox and cache any offered
 channel/preset for the client app to act on — the firmware never auto-applies them. */
typedef struct _meshtastic_MeshBeacon {
    /* Human-readable beacon message. Max 100 bytes enforced by firmware on send. */
    char message[101];
    /* Optional channel (name + PSK) being advertised to listening clients.
 A client app may offer to switch the user to this channel; firmware never applies it automatically. */
    bool has_offer_channel;
    meshtastic_ChannelSettings offer_channel;
    /* Optional region being advertised alongside offer_preset. */
    meshtastic_Config_LoRaConfig_RegionCode offer_region;
    /* Optional modem preset being advertised.
 Combined with offer_region, tells a client "there is a mesh on this preset/region". */
    bool has_offer_preset;
    meshtastic_Config_LoRaConfig_ModemPreset offer_preset;
} meshtastic_MeshBeacon;


#ifdef __cplusplus
extern "C" {
#endif

/* Initializer values for message structs */
#define meshtastic_MeshBeacon_init_default       {"", false, meshtastic_ChannelSettings_init_default, _meshtastic_Config_LoRaConfig_RegionCode_MIN, false, _meshtastic_Config_LoRaConfig_ModemPreset_MIN}
#define meshtastic_MeshBeacon_init_zero          {"", false, meshtastic_ChannelSettings_init_zero, _meshtastic_Config_LoRaConfig_RegionCode_MIN, false, _meshtastic_Config_LoRaConfig_ModemPreset_MIN}

/* Field tags (for use in manual encoding/decoding) */
#define meshtastic_MeshBeacon_message_tag        1
#define meshtastic_MeshBeacon_offer_channel_tag  2
#define meshtastic_MeshBeacon_offer_region_tag   3
#define meshtastic_MeshBeacon_offer_preset_tag   4

/* Struct field encoding specification for nanopb */
#define meshtastic_MeshBeacon_FIELDLIST(X, a) \
X(a, STATIC,   SINGULAR, STRING,   message,           1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  offer_channel,     2) \
X(a, STATIC,   SINGULAR, UENUM,    offer_region,      3) \
X(a, STATIC,   OPTIONAL, UENUM,    offer_preset,      4)
#define meshtastic_MeshBeacon_CALLBACK NULL
#define meshtastic_MeshBeacon_DEFAULT NULL
#define meshtastic_MeshBeacon_offer_channel_MSGTYPE meshtastic_ChannelSettings

extern const pb_msgdesc_t meshtastic_MeshBeacon_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define meshtastic_MeshBeacon_fields &meshtastic_MeshBeacon_msg

/* Maximum encoded size of messages (where known) */
#define MESHTASTIC_MESHTASTIC_MESH_BEACON_PB_H_MAX_SIZE meshtastic_MeshBeacon_size
#define meshtastic_MeshBeacon_size               180

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
