This will generate the message for the programme

Dependencies:   MODSERIAL Nanopb

Committer:
justinbuckland
Date:
Fri Sep 20 12:55:49 2019 +0000
Revision:
4:629ca12c04f4
Parent:
2:b46d53a5f931
Generates example low T test sequence for use with thermochromic tape

Who changed what in which revision?

UserRevisionLine numberNew contents of line
omatthews 0:388a2a9f5247 1 /* Automatically generated nanopb header */
omatthews 2:b46d53a5f931 2 /* Generated by nanopb-0.3.9.3 at Thu Aug 29 14:10:38 2019. */
omatthews 0:388a2a9f5247 3
omatthews 0:388a2a9f5247 4 #ifndef PB_MEMSPCR_MEMSPCR_PB_H_INCLUDED
omatthews 0:388a2a9f5247 5 #define PB_MEMSPCR_MEMSPCR_PB_H_INCLUDED
omatthews 0:388a2a9f5247 6 #include <pb.h>
omatthews 0:388a2a9f5247 7
omatthews 0:388a2a9f5247 8 /* @@protoc_insertion_point(includes) */
omatthews 0:388a2a9f5247 9 #if PB_PROTO_HEADER_VERSION != 30
omatthews 0:388a2a9f5247 10 #error Regenerate this file with the current version of nanopb generator.
omatthews 0:388a2a9f5247 11 #endif
omatthews 0:388a2a9f5247 12
omatthews 0:388a2a9f5247 13 #ifdef __cplusplus
omatthews 0:388a2a9f5247 14 extern "C" {
omatthews 0:388a2a9f5247 15 #endif
omatthews 0:388a2a9f5247 16
omatthews 0:388a2a9f5247 17 /* Enum definitions */
omatthews 2:b46d53a5f931 18 typedef enum _memspcr_ExperimentConfiguration_Heater {
omatthews 2:b46d53a5f931 19 memspcr_ExperimentConfiguration_Heater_MAIN = 0,
omatthews 2:b46d53a5f931 20 memspcr_ExperimentConfiguration_Heater_LYSIS = 1
omatthews 2:b46d53a5f931 21 } memspcr_ExperimentConfiguration_Heater;
omatthews 2:b46d53a5f931 22 #define _memspcr_ExperimentConfiguration_Heater_MIN memspcr_ExperimentConfiguration_Heater_MAIN
omatthews 2:b46d53a5f931 23 #define _memspcr_ExperimentConfiguration_Heater_MAX memspcr_ExperimentConfiguration_Heater_LYSIS
omatthews 2:b46d53a5f931 24 #define _memspcr_ExperimentConfiguration_Heater_ARRAYSIZE ((memspcr_ExperimentConfiguration_Heater)(memspcr_ExperimentConfiguration_Heater_LYSIS+1))
omatthews 0:388a2a9f5247 25
omatthews 0:388a2a9f5247 26 /* Struct definitions */
omatthews 0:388a2a9f5247 27 typedef struct _memspcr_FluidicConfiguration {
omatthews 0:388a2a9f5247 28 float pressure_setpoint;
omatthews 0:388a2a9f5247 29 float pressure_hysterisis;
omatthews 0:388a2a9f5247 30 /* @@protoc_insertion_point(struct:memspcr_FluidicConfiguration) */
omatthews 0:388a2a9f5247 31 } memspcr_FluidicConfiguration;
omatthews 0:388a2a9f5247 32
omatthews 0:388a2a9f5247 33 typedef struct _memspcr_OpticsConfiguration {
omatthews 0:388a2a9f5247 34 int32_t pre_trigger_ms;
omatthews 0:388a2a9f5247 35 int32_t on_time_ms;
omatthews 0:388a2a9f5247 36 float led_pwm;
omatthews 0:388a2a9f5247 37 /* @@protoc_insertion_point(struct:memspcr_OpticsConfiguration) */
omatthews 0:388a2a9f5247 38 } memspcr_OpticsConfiguration;
omatthews 0:388a2a9f5247 39
omatthews 0:388a2a9f5247 40 typedef struct _memspcr_ThermalConfiguration {
omatthews 0:388a2a9f5247 41 float guard_drive_ratio;
omatthews 0:388a2a9f5247 42 int32_t adc_settling_time_us;
omatthews 0:388a2a9f5247 43 float pid_kp;
omatthews 0:388a2a9f5247 44 float pid_integral_time;
omatthews 0:388a2a9f5247 45 float pid_derivative_time;
omatthews 2:b46d53a5f931 46 int32_t control_loop_interval_ms;
omatthews 0:388a2a9f5247 47 /* @@protoc_insertion_point(struct:memspcr_ThermalConfiguration) */
omatthews 0:388a2a9f5247 48 } memspcr_ThermalConfiguration;
omatthews 0:388a2a9f5247 49
omatthews 0:388a2a9f5247 50 typedef struct _memspcr_ThermalStep {
omatthews 0:388a2a9f5247 51 int32_t elapsed_time_ms;
omatthews 0:388a2a9f5247 52 float resistance;
omatthews 0:388a2a9f5247 53 int32_t camera_offset_ms;
omatthews 0:388a2a9f5247 54 /* @@protoc_insertion_point(struct:memspcr_ThermalStep) */
omatthews 0:388a2a9f5247 55 } memspcr_ThermalStep;
omatthews 0:388a2a9f5247 56
omatthews 0:388a2a9f5247 57 typedef struct _memspcr_ExperimentConfiguration {
omatthews 0:388a2a9f5247 58 memspcr_ThermalConfiguration thermal;
omatthews 2:b46d53a5f931 59 pb_callback_t profile;
omatthews 0:388a2a9f5247 60 memspcr_OpticsConfiguration optics;
omatthews 0:388a2a9f5247 61 memspcr_FluidicConfiguration fluidics;
omatthews 0:388a2a9f5247 62 int32_t logging_interval_ms;
omatthews 2:b46d53a5f931 63 memspcr_ExperimentConfiguration_Heater selected_heater;
omatthews 0:388a2a9f5247 64 /* @@protoc_insertion_point(struct:memspcr_ExperimentConfiguration) */
omatthews 0:388a2a9f5247 65 } memspcr_ExperimentConfiguration;
omatthews 0:388a2a9f5247 66
omatthews 0:388a2a9f5247 67 /* Default values for struct fields */
omatthews 0:388a2a9f5247 68
omatthews 0:388a2a9f5247 69 /* Initializer values for message structs */
omatthews 0:388a2a9f5247 70 #define memspcr_ThermalStep_init_default {0, 0, 0}
omatthews 2:b46d53a5f931 71 #define memspcr_ThermalConfiguration_init_default {0, 0, 0, 0, 0, 0}
omatthews 0:388a2a9f5247 72 #define memspcr_OpticsConfiguration_init_default {0, 0, 0}
omatthews 0:388a2a9f5247 73 #define memspcr_FluidicConfiguration_init_default {0, 0}
omatthews 2:b46d53a5f931 74 #define memspcr_ExperimentConfiguration_init_default {memspcr_ThermalConfiguration_init_default, {{NULL}, NULL}, memspcr_OpticsConfiguration_init_default, memspcr_FluidicConfiguration_init_default, 0, _memspcr_ExperimentConfiguration_Heater_MIN}
omatthews 0:388a2a9f5247 75 #define memspcr_ThermalStep_init_zero {0, 0, 0}
omatthews 2:b46d53a5f931 76 #define memspcr_ThermalConfiguration_init_zero {0, 0, 0, 0, 0, 0}
omatthews 0:388a2a9f5247 77 #define memspcr_OpticsConfiguration_init_zero {0, 0, 0}
omatthews 0:388a2a9f5247 78 #define memspcr_FluidicConfiguration_init_zero {0, 0}
omatthews 2:b46d53a5f931 79 #define memspcr_ExperimentConfiguration_init_zero {memspcr_ThermalConfiguration_init_zero, {{NULL}, NULL}, memspcr_OpticsConfiguration_init_zero, memspcr_FluidicConfiguration_init_zero, 0, _memspcr_ExperimentConfiguration_Heater_MIN}
omatthews 0:388a2a9f5247 80
omatthews 0:388a2a9f5247 81 /* Field tags (for use in manual encoding/decoding) */
omatthews 0:388a2a9f5247 82 #define memspcr_FluidicConfiguration_pressure_setpoint_tag 1
omatthews 0:388a2a9f5247 83 #define memspcr_FluidicConfiguration_pressure_hysterisis_tag 2
omatthews 0:388a2a9f5247 84 #define memspcr_OpticsConfiguration_pre_trigger_ms_tag 1
omatthews 0:388a2a9f5247 85 #define memspcr_OpticsConfiguration_on_time_ms_tag 2
omatthews 0:388a2a9f5247 86 #define memspcr_OpticsConfiguration_led_pwm_tag 3
omatthews 0:388a2a9f5247 87 #define memspcr_ThermalConfiguration_guard_drive_ratio_tag 2
omatthews 0:388a2a9f5247 88 #define memspcr_ThermalConfiguration_adc_settling_time_us_tag 4
omatthews 0:388a2a9f5247 89 #define memspcr_ThermalConfiguration_pid_kp_tag 7
omatthews 0:388a2a9f5247 90 #define memspcr_ThermalConfiguration_pid_integral_time_tag 8
omatthews 0:388a2a9f5247 91 #define memspcr_ThermalConfiguration_pid_derivative_time_tag 9
omatthews 2:b46d53a5f931 92 #define memspcr_ThermalConfiguration_control_loop_interval_ms_tag 10
omatthews 0:388a2a9f5247 93 #define memspcr_ThermalStep_elapsed_time_ms_tag 1
omatthews 0:388a2a9f5247 94 #define memspcr_ThermalStep_resistance_tag 2
omatthews 0:388a2a9f5247 95 #define memspcr_ThermalStep_camera_offset_ms_tag 3
omatthews 0:388a2a9f5247 96 #define memspcr_ExperimentConfiguration_thermal_tag 1
omatthews 2:b46d53a5f931 97 #define memspcr_ExperimentConfiguration_profile_tag 3
omatthews 2:b46d53a5f931 98 #define memspcr_ExperimentConfiguration_selected_heater_tag 7
omatthews 2:b46d53a5f931 99 #define memspcr_ExperimentConfiguration_optics_tag 4
omatthews 2:b46d53a5f931 100 #define memspcr_ExperimentConfiguration_fluidics_tag 5
omatthews 2:b46d53a5f931 101 #define memspcr_ExperimentConfiguration_logging_interval_ms_tag 6
omatthews 0:388a2a9f5247 102
omatthews 0:388a2a9f5247 103 /* Struct field encoding specification for nanopb */
omatthews 0:388a2a9f5247 104 extern const pb_field_t memspcr_ThermalStep_fields[4];
omatthews 2:b46d53a5f931 105 extern const pb_field_t memspcr_ThermalConfiguration_fields[7];
omatthews 0:388a2a9f5247 106 extern const pb_field_t memspcr_OpticsConfiguration_fields[4];
omatthews 0:388a2a9f5247 107 extern const pb_field_t memspcr_FluidicConfiguration_fields[3];
omatthews 2:b46d53a5f931 108 extern const pb_field_t memspcr_ExperimentConfiguration_fields[7];
omatthews 0:388a2a9f5247 109
omatthews 0:388a2a9f5247 110 /* Maximum encoded size of messages (where known) */
omatthews 0:388a2a9f5247 111 #define memspcr_ThermalStep_size 27
omatthews 2:b46d53a5f931 112 #define memspcr_ThermalConfiguration_size 42
omatthews 0:388a2a9f5247 113 #define memspcr_OpticsConfiguration_size 27
omatthews 0:388a2a9f5247 114 #define memspcr_FluidicConfiguration_size 10
omatthews 0:388a2a9f5247 115 /* memspcr_ExperimentConfiguration_size depends on runtime parameters */
omatthews 0:388a2a9f5247 116
omatthews 0:388a2a9f5247 117 /* Message IDs (where set with "msgid" option) */
omatthews 0:388a2a9f5247 118 #ifdef PB_MSGID
omatthews 0:388a2a9f5247 119
omatthews 0:388a2a9f5247 120 #define MEMSPCR_MESSAGES \
omatthews 0:388a2a9f5247 121
omatthews 0:388a2a9f5247 122
omatthews 0:388a2a9f5247 123 #endif
omatthews 0:388a2a9f5247 124
omatthews 0:388a2a9f5247 125 #ifdef __cplusplus
omatthews 0:388a2a9f5247 126 } /* extern "C" */
omatthews 0:388a2a9f5247 127 #endif
omatthews 0:388a2a9f5247 128 /* @@protoc_insertion_point(eof) */
omatthews 0:388a2a9f5247 129
omatthews 0:388a2a9f5247 130 #endif