firmware/src/mesh/generated/telemetry.pb.h

95 lines
3.5 KiB
C
Raw Normal View History

/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.5 */
#ifndef PB_TELEMETRY_PB_H_INCLUDED
#define PB_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
/* Struct definitions */
/* TODO: REPLACE */
typedef struct _Telemetry {
/* 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 (IE Mobile Phone).
seconds since 1970 */
uint32_t time;
/* 1-100 (0 means powered) */
uint32_t battery_level;
/* 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;
/* This is sent by node only if it a router and if hop_limit is set to 0
and is not being sent as a reliable message. */
bool router_heartbeat;
/* Temperature measured */
float temperature;
/* Relative humidity percent measured */
float relative_humidity;
/* Barometric pressure in hPA measured */
float barometric_pressure;
/* Gas resistance in mOhm measured */
float gas_resistance;
/* Voltage measured */
float voltage;
/* Current measured */
float current;
} Telemetry;
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
#define Telemetry_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define Telemetry_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define Telemetry_time_tag 1
#define Telemetry_battery_level_tag 2
#define Telemetry_channel_utilization_tag 3
#define Telemetry_air_util_tx_tag 4
#define Telemetry_router_heartbeat_tag 5
#define Telemetry_temperature_tag 6
#define Telemetry_relative_humidity_tag 7
#define Telemetry_barometric_pressure_tag 8
#define Telemetry_gas_resistance_tag 9
#define Telemetry_voltage_tag 10
#define Telemetry_current_tag 11
/* Struct field encoding specification for nanopb */
#define Telemetry_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, FIXED32, time, 1) \
X(a, STATIC, SINGULAR, UINT32, battery_level, 2) \
X(a, STATIC, SINGULAR, FLOAT, channel_utilization, 3) \
X(a, STATIC, SINGULAR, FLOAT, air_util_tx, 4) \
X(a, STATIC, SINGULAR, BOOL, router_heartbeat, 5) \
X(a, STATIC, SINGULAR, FLOAT, temperature, 6) \
X(a, STATIC, SINGULAR, FLOAT, relative_humidity, 7) \
X(a, STATIC, SINGULAR, FLOAT, barometric_pressure, 8) \
X(a, STATIC, SINGULAR, FLOAT, gas_resistance, 9) \
X(a, STATIC, SINGULAR, FLOAT, voltage, 10) \
X(a, STATIC, SINGULAR, FLOAT, current, 11)
#define Telemetry_CALLBACK NULL
#define Telemetry_DEFAULT NULL
extern const pb_msgdesc_t Telemetry_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define Telemetry_fields &Telemetry_msg
/* Maximum encoded size of messages (where known) */
#define Telemetry_size 53
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif