Trying to encode a configuration file and a set of instructions to be passed to a microcontroller

Dependencies:   MODSERIAL Nanopb

Committer:
omatthews
Date:
Sun Aug 18 21:52:33 2019 +0000
Revision:
5:72408582aadf
Parent:
2:89156c267f7a
Can only encode config

Who changed what in which revision?

UserRevisionLine numberNew contents of line
omatthews 0:abf096b1334e 1 /* Automatically generated nanopb header */
omatthews 2:89156c267f7a 2 /* Generated by nanopb-0.3.9.3 at Sun Aug 18 20:07:09 2019. */
omatthews 0:abf096b1334e 3
omatthews 0:abf096b1334e 4 #ifndef PB_LEX_INITIALISATION_PB_H_INCLUDED
omatthews 0:abf096b1334e 5 #define PB_LEX_INITIALISATION_PB_H_INCLUDED
omatthews 0:abf096b1334e 6 #include <pb.h>
omatthews 0:abf096b1334e 7
omatthews 0:abf096b1334e 8 /* @@protoc_insertion_point(includes) */
omatthews 0:abf096b1334e 9 #if PB_PROTO_HEADER_VERSION != 30
omatthews 0:abf096b1334e 10 #error Regenerate this file with the current version of nanopb generator.
omatthews 0:abf096b1334e 11 #endif
omatthews 0:abf096b1334e 12
omatthews 0:abf096b1334e 13 #ifdef __cplusplus
omatthews 0:abf096b1334e 14 extern "C" {
omatthews 0:abf096b1334e 15 #endif
omatthews 0:abf096b1334e 16
omatthews 0:abf096b1334e 17 /* Struct definitions */
omatthews 2:89156c267f7a 18 typedef struct _Configuration {
omatthews 2:89156c267f7a 19 int32_t n_set_points;
omatthews 2:89156c267f7a 20 /* @@protoc_insertion_point(struct:Configuration) */
omatthews 2:89156c267f7a 21 } Configuration;
omatthews 2:89156c267f7a 22
omatthews 0:abf096b1334e 23 typedef struct _SetPoint {
omatthews 0:abf096b1334e 24 float r_set_point;
omatthews 0:abf096b1334e 25 int32_t time_point;
omatthews 0:abf096b1334e 26 int32_t trig_time;
omatthews 0:abf096b1334e 27 /* @@protoc_insertion_point(struct:SetPoint) */
omatthews 0:abf096b1334e 28 } SetPoint;
omatthews 0:abf096b1334e 29
omatthews 0:abf096b1334e 30 /* Default values for struct fields */
omatthews 0:abf096b1334e 31
omatthews 0:abf096b1334e 32 /* Initializer values for message structs */
omatthews 0:abf096b1334e 33 #define SetPoint_init_default {0, 0, 0}
omatthews 2:89156c267f7a 34 #define Configuration_init_default {0}
omatthews 0:abf096b1334e 35 #define SetPoint_init_zero {0, 0, 0}
omatthews 2:89156c267f7a 36 #define Configuration_init_zero {0}
omatthews 0:abf096b1334e 37
omatthews 0:abf096b1334e 38 /* Field tags (for use in manual encoding/decoding) */
omatthews 2:89156c267f7a 39 #define Configuration_n_set_points_tag 1
omatthews 0:abf096b1334e 40 #define SetPoint_r_set_point_tag 1
omatthews 0:abf096b1334e 41 #define SetPoint_time_point_tag 2
omatthews 0:abf096b1334e 42 #define SetPoint_trig_time_tag 3
omatthews 0:abf096b1334e 43
omatthews 0:abf096b1334e 44 /* Struct field encoding specification for nanopb */
omatthews 0:abf096b1334e 45 extern const pb_field_t SetPoint_fields[4];
omatthews 2:89156c267f7a 46 extern const pb_field_t Configuration_fields[2];
omatthews 0:abf096b1334e 47
omatthews 0:abf096b1334e 48 /* Maximum encoded size of messages (where known) */
omatthews 0:abf096b1334e 49 #define SetPoint_size 27
omatthews 2:89156c267f7a 50 #define Configuration_size 11
omatthews 0:abf096b1334e 51
omatthews 0:abf096b1334e 52 /* Message IDs (where set with "msgid" option) */
omatthews 0:abf096b1334e 53 #ifdef PB_MSGID
omatthews 0:abf096b1334e 54
omatthews 0:abf096b1334e 55 #define LEX_INITIALISATION_MESSAGES \
omatthews 0:abf096b1334e 56
omatthews 0:abf096b1334e 57
omatthews 0:abf096b1334e 58 #endif
omatthews 0:abf096b1334e 59
omatthews 0:abf096b1334e 60 #ifdef __cplusplus
omatthews 0:abf096b1334e 61 } /* extern "C" */
omatthews 0:abf096b1334e 62 #endif
omatthews 0:abf096b1334e 63 /* @@protoc_insertion_point(eof) */
omatthews 0:abf096b1334e 64
omatthews 0:abf096b1334e 65 #endif