Created
November 9, 2017 20:38
-
-
Save kke/63537990dbba362d7f3d24870fa2089a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Automatically generated nanopb header */ | |
/* Generated by nanopb-0.3.6 at Thu Nov 9 22:08:54 2017. */ | |
#ifndef PB_SENSOR_PB_H_INCLUDED | |
#define PB_SENSOR_PB_H_INCLUDED | |
#include <pb.h> | |
/* @@protoc_insertion_point(includes) */ | |
#if PB_PROTO_HEADER_VERSION != 30 | |
#error Regenerate this file with the current version of nanopb generator. | |
#endif | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/* Enum definitions */ | |
typedef enum _Ping_Op { | |
Ping_Op_PING = 0, | |
Ping_Op_PONG = 1 | |
} Ping_Op; | |
#define _Ping_Op_MIN Ping_Op_PING | |
#define _Ping_Op_MAX Ping_Op_PONG | |
#define _Ping_Op_ARRAYSIZE ((Ping_Op)(Ping_Op_PONG+1)) | |
/* Struct definitions */ | |
typedef struct _Ping { | |
bool has_operation; | |
Ping_Op operation; | |
bool has_number; | |
uint32_t number; | |
/* @@protoc_insertion_point(struct:Ping) */ | |
} Ping; | |
typedef struct _SensorReport { | |
bool has_device_id; | |
uint32_t device_id; | |
bool has_sensor_id; | |
uint32_t sensor_id; | |
bool has_timestamp; | |
uint32_t timestamp; | |
pb_size_t which_value; | |
union { | |
float f; | |
uint32_t percentage; | |
int32_t val; | |
bool b; | |
} value; | |
/* @@protoc_insertion_point(struct:SensorReport) */ | |
} SensorReport; | |
typedef struct _ServerResponse { | |
bool has_goto_sleep_seconds; | |
uint32_t goto_sleep_seconds; | |
bool has_upgrade_available; | |
bool upgrade_available; | |
bool has_start_ota_ap; | |
bool start_ota_ap; | |
pb_callback_t firmware_url; | |
pb_callback_t spiffs_url; | |
/* @@protoc_insertion_point(struct:ServerResponse) */ | |
} ServerResponse; | |
/* Default values for struct fields */ | |
/* Initializer values for message structs */ | |
#define SensorReport_init_default {false, 0, false, 0, false, 0, 0, {0}} | |
#define ServerResponse_init_default {false, 0, false, 0, false, 0, {{NULL}, NULL}, {{NULL}, NULL}} | |
#define Ping_init_default {false, (Ping_Op)0, false, 0} | |
#define SensorReport_init_zero {false, 0, false, 0, false, 0, 0, {0}} | |
#define ServerResponse_init_zero {false, 0, false, 0, false, 0, {{NULL}, NULL}, {{NULL}, NULL}} | |
#define Ping_init_zero {false, (Ping_Op)0, false, 0} | |
/* Field tags (for use in manual encoding/decoding) */ | |
#define Ping_operation_tag 1 | |
#define Ping_number_tag 2 | |
#define SensorReport_f_tag 4 | |
#define SensorReport_percentage_tag 5 | |
#define SensorReport_val_tag 6 | |
#define SensorReport_b_tag 7 | |
#define SensorReport_device_id_tag 1 | |
#define SensorReport_sensor_id_tag 2 | |
#define SensorReport_timestamp_tag 3 | |
#define ServerResponse_goto_sleep_seconds_tag 1 | |
#define ServerResponse_upgrade_available_tag 2 | |
#define ServerResponse_start_ota_ap_tag 3 | |
#define ServerResponse_firmware_url_tag 4 | |
#define ServerResponse_spiffs_url_tag 5 | |
/* Struct field encoding specification for nanopb */ | |
extern const pb_field_t SensorReport_fields[8]; | |
extern const pb_field_t ServerResponse_fields[6]; | |
extern const pb_field_t Ping_fields[3]; | |
/* Maximum encoded size of messages (where known) */ | |
#define SensorReport_size 20 | |
/* ServerResponse_size depends on runtime parameters */ | |
#define Ping_size 7 | |
/* Message IDs (where set with "msgid" option) */ | |
#ifdef PB_MSGID | |
#define SENSOR_MESSAGES \ | |
#endif | |
#ifdef __cplusplus | |
} /* extern "C" */ | |
#endif | |
/* @@protoc_insertion_point(eof) */ | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment