firmware/src/mesh/generated/meshtastic/mqtt.pb.h

62 lines
2.0 KiB
C
Raw Normal View History

2023-01-18 13:42:53 +00:00
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.7 */
#ifndef PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED
#define PB_MESHTASTIC_MESHTASTIC_MQTT_PB_H_INCLUDED
#include <pb.h>
2023-01-18 14:57:44 +00:00
#include "./mesh.pb.h"
2023-01-18 13:42:53 +00:00
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
/* This message wraps a MeshPacket with extra metadata about the sender and how it arrived. */
2023-01-18 16:19:47 +00:00
typedef struct _ServiceEnvelope {
2023-01-18 13:42:53 +00:00
/* The (probably encrypted) packet */
2023-01-18 16:19:47 +00:00
struct _MeshPacket *packet;
2023-01-18 13:42:53 +00:00
/* 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;
2023-01-18 16:19:47 +00:00
} ServiceEnvelope;
2023-01-18 13:42:53 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
2023-01-18 16:19:47 +00:00
#define ServiceEnvelope_init_default {NULL, NULL, NULL}
#define ServiceEnvelope_init_zero {NULL, NULL, NULL}
2023-01-18 13:42:53 +00:00
/* Field tags (for use in manual encoding/decoding) */
2023-01-18 16:19:47 +00:00
#define ServiceEnvelope_packet_tag 1
#define ServiceEnvelope_channel_id_tag 2
#define ServiceEnvelope_gateway_id_tag 3
2023-01-18 13:42:53 +00:00
/* Struct field encoding specification for nanopb */
2023-01-18 16:19:47 +00:00
#define ServiceEnvelope_FIELDLIST(X, a) \
2023-01-18 13:42:53 +00:00
X(a, POINTER, OPTIONAL, MESSAGE, packet, 1) \
X(a, POINTER, SINGULAR, STRING, channel_id, 2) \
X(a, POINTER, SINGULAR, STRING, gateway_id, 3)
2023-01-18 16:19:47 +00:00
#define ServiceEnvelope_CALLBACK NULL
#define ServiceEnvelope_DEFAULT NULL
#define ServiceEnvelope_packet_MSGTYPE MeshPacket
2023-01-18 13:42:53 +00:00
2023-01-18 16:19:47 +00:00
extern const pb_msgdesc_t ServiceEnvelope_msg;
2023-01-18 13:42:53 +00:00
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
2023-01-18 16:19:47 +00:00
#define ServiceEnvelope_fields &ServiceEnvelope_msg
2023-01-18 13:42:53 +00:00
/* Maximum encoded size of messages (where known) */
2023-01-18 16:19:47 +00:00
/* ServiceEnvelope_size depends on runtime parameters */
2023-01-18 13:42:53 +00:00
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif