diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-04-26 15:38:07 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-04-26 15:38:07 +0300 |
| commit | 76845dc21fd587cfefd886e2539b3202d00564f6 (patch) | |
| tree | 38553f5e21eb410f30386be055cba39830045d5a /Software/Embedded_SW | |
| parent | 257919304a46076138cd31d688323f80f3081f7f (diff) | |
| download | Tango-76845dc21fd587cfefd886e2539b3202d00564f6.tar.gz Tango-76845dc21fd587cfefd886e2539b3202d00564f6.zip | |
move dispenser EEPROM handling to stubs. add whs eeprom handling draft
Diffstat (limited to 'Software/Embedded_SW')
19 files changed, 1250 insertions, 270 deletions
diff --git a/Software/Embedded_SW/Embedded/Communication/Container.c b/Software/Embedded_SW/Embedded/Communication/Container.c index c35b0ca45..cabac2f0c 100644 --- a/Software/Embedded_SW/Embedded/Communication/Container.c +++ b/Software/Embedded_SW/Embedded/Communication/Container.c @@ -484,9 +484,12 @@ void receive_callback(char* buffer, size_t length) case MESSAGE_TYPE__StopThreadLoadingRequest: StopThreadLoadingFunc(requestContainer); break; - case MESSAGE_TYPE__DispenserEEpromRequest: + case MESSAGE_TYPE__StubDispenserEEpromRequest: DispenserEEpromRequestFunc(requestContainer); break; + case MESSAGE_TYPE__StubWHSEEpromRequest: + WhsEEpromRequestFunc(requestContainer); + break; default: //unsupported message type !! LOG_ERROR (requestContainer->type,"unsupported message type"); diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c index e05a3f251..021d4755b 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.c @@ -7,7 +7,7 @@ #endif #include "MessageType.pb-c.h" -static const ProtobufCEnumValue message_type__enum_values_by_number[247] = +static const ProtobufCEnumValue message_type__enum_values_by_number[249] = { { "", "", 0 }, { "", "", 1 }, @@ -113,6 +113,10 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[247] = { "", "", 102 }, { "", "", 103 }, { "", "", 104 }, + { "", "", 105 }, + { "", "", 106 }, + { "", "", 107 }, + { "", "", 108 }, { "", "", 1000 }, { "", "", 1001 }, { "", "", 1002 }, @@ -178,8 +182,6 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[247] = { "", "", 2043 }, { "", "", 2044 }, { "", "", 2045 }, - { "", "", 2046 }, - { "", "", 2047 }, { "", "", 3000 }, { "", "", 3001 }, { "", "", 3002 }, @@ -258,145 +260,143 @@ static const ProtobufCEnumValue message_type__enum_values_by_number[247] = { "", "", 11005 }, }; static const ProtobufCIntRange message_type__value_ranges[] = { -{0, 0},{3, 2},{1000, 104},{2000, 123},{3000, 171},{4000, 185},{5000, 193},{6000, 197},{7000, 203},{8000, 227},{9000, 233},{10000, 237},{11000, 241},{0, 247} +{0, 0},{3, 2},{1000, 108},{2000, 127},{3000, 173},{4000, 187},{5000, 195},{6000, 199},{7000, 205},{8000, 229},{9000, 235},{10000, 239},{11000, 243},{0, 249} }; -static const ProtobufCEnumValueIndex message_type__enum_values_by_name[247] = +static const ProtobufCEnumValueIndex message_type__enum_values_by_name[249] = { - { "", 183 }, - { "", 184 }, - { "", 173 }, - { "", 174 }, - { "", 239 }, - { "", 240 }, - { "", 225 }, - { "", 226 }, + { "", 185 }, + { "", 186 }, + { "", 175 }, + { "", 176 }, + { "", 241 }, + { "", 242 }, + { "", 227 }, + { "", 228 }, { "", 2 }, { "", 3 }, - { "", 167 }, - { "", 168 }, - { "", 117 }, - { "", 118 }, - { "", 199 }, - { "", 200 }, - { "", 243 }, - { "", 244 }, - { "", 211 }, - { "", 212 }, - { "", 177 }, - { "", 178 }, - { "", 213 }, - { "", 214 }, - { "", 109 }, - { "", 110 }, + { "", 171 }, + { "", 172 }, + { "", 121 }, + { "", 122 }, { "", 201 }, { "", 202 }, - { "", 133 }, - { "", 134 }, - { "", 139 }, - { "", 140 }, - { "", 227 }, - { "", 228 }, - { "", 169 }, - { "", 170 }, - { "", 135 }, - { "", 136 }, + { "", 245 }, + { "", 246 }, + { "", 213 }, + { "", 214 }, + { "", 179 }, + { "", 180 }, + { "", 215 }, + { "", 216 }, + { "", 113 }, + { "", 114 }, + { "", 203 }, + { "", 204 }, { "", 137 }, { "", 138 }, + { "", 143 }, + { "", 144 }, + { "", 229 }, + { "", 230 }, + { "", 139 }, + { "", 140 }, + { "", 141 }, + { "", 142 }, { "", 1 }, + { "", 209 }, + { "", 210 }, + { "", 109 }, + { "", 110 }, + { "", 111 }, + { "", 112 }, + { "", 108 }, + { "", 223 }, + { "", 224 }, { "", 207 }, { "", 208 }, - { "", 105 }, - { "", 106 }, - { "", 107 }, - { "", 108 }, - { "", 104 }, { "", 221 }, { "", 222 }, { "", 205 }, { "", 206 }, + { "", 125 }, + { "", 126 }, { "", 219 }, { "", 220 }, - { "", 203 }, - { "", 204 }, - { "", 121 }, - { "", 122 }, { "", 217 }, { "", 218 }, - { "", 215 }, - { "", 216 }, - { "", 171 }, - { "", 172 }, - { "", 197 }, - { "", 198 }, - { "", 209 }, - { "", 210 }, + { "", 173 }, + { "", 174 }, + { "", 199 }, + { "", 200 }, + { "", 211 }, + { "", 212 }, + { "", 233 }, + { "", 234 }, { "", 231 }, { "", 232 }, - { "", 229 }, - { "", 230 }, - { "", 125 }, - { "", 126 }, - { "", 131 }, - { "", 132 }, - { "", 127 }, - { "", 128 }, { "", 129 }, { "", 130 }, + { "", 135 }, + { "", 136 }, + { "", 131 }, + { "", 132 }, + { "", 133 }, + { "", 134 }, { "", 0 }, - { "", 111 }, - { "", 112 }, + { "", 115 }, + { "", 116 }, { "", 4 }, { "", 5 }, - { "", 149 }, - { "", 150 }, - { "", 179 }, - { "", 180 }, - { "", 159 }, - { "", 160 }, - { "", 147 }, - { "", 148 }, - { "", 189 }, - { "", 190 }, - { "", 141 }, - { "", 142 }, - { "", 157 }, - { "", 158 }, - { "", 161 }, - { "", 162 }, - { "", 191 }, - { "", 192 }, - { "", 113 }, - { "", 114 }, - { "", 163 }, - { "", 164 }, - { "", 185 }, - { "", 186 }, - { "", 123 }, - { "", 124 }, { "", 153 }, { "", 154 }, { "", 181 }, { "", 182 }, - { "", 233 }, - { "", 234 }, - { "", 237 }, - { "", 238 }, - { "", 241 }, - { "", 242 }, - { "", 115 }, - { "", 116 }, + { "", 163 }, + { "", 164 }, + { "", 151 }, + { "", 152 }, + { "", 191 }, + { "", 192 }, + { "", 145 }, + { "", 146 }, + { "", 161 }, + { "", 162 }, { "", 165 }, { "", 166 }, + { "", 193 }, + { "", 194 }, + { "", 117 }, + { "", 118 }, + { "", 167 }, + { "", 168 }, { "", 187 }, { "", 188 }, - { "", 151 }, - { "", 152 }, - { "", 155 }, - { "", 156 }, + { "", 127 }, + { "", 128 }, + { "", 157 }, + { "", 158 }, + { "", 183 }, + { "", 184 }, { "", 235 }, { "", 236 }, - { "", 245 }, - { "", 246 }, + { "", 239 }, + { "", 240 }, + { "", 243 }, + { "", 244 }, + { "", 119 }, + { "", 120 }, + { "", 169 }, + { "", 170 }, + { "", 189 }, + { "", 190 }, + { "", 155 }, + { "", 156 }, + { "", 159 }, + { "", 160 }, + { "", 237 }, + { "", 238 }, + { "", 247 }, + { "", 248 }, { "", 100 }, { "", 101 }, { "", 6 }, @@ -405,6 +405,8 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[247] = { "", 9 }, { "", 80 }, { "", 81 }, + { "", 104 }, + { "", 105 }, { "", 10 }, { "", 11 }, { "", 32 }, @@ -495,20 +497,22 @@ static const ProtobufCEnumValueIndex message_type__enum_values_by_name[247] = { "", 79 }, { "", 30 }, { "", 31 }, + { "", 106 }, + { "", 107 }, + { "", 197 }, + { "", 198 }, + { "", 149 }, + { "", 150 }, + { "", 147 }, + { "", 148 }, + { "", 123 }, + { "", 124 }, { "", 195 }, { "", 196 }, - { "", 145 }, - { "", 146 }, - { "", 143 }, - { "", 144 }, - { "", 119 }, - { "", 120 }, - { "", 193 }, - { "", 194 }, - { "", 175 }, - { "", 176 }, - { "", 223 }, - { "", 224 }, + { "", 177 }, + { "", 178 }, + { "", 225 }, + { "", 226 }, }; const ProtobufCEnumDescriptor message_type__descriptor = { @@ -517,9 +521,9 @@ const ProtobufCEnumDescriptor message_type__descriptor = "", "", "", - 247, + 249, message_type__enum_values_by_number, - 247, + 249, message_type__enum_values_by_name, 13, message_type__value_ranges, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h index fdc7d1bd8..d889d9f52 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Common/MessageType.pb-c.h @@ -124,6 +124,10 @@ typedef enum _MessageType { MESSAGE_TYPE__StubAbortJobResponse = 102, MESSAGE_TYPE__StubMidTankPressureSensorRequest = 103, MESSAGE_TYPE__StubMidTankPressureSensorResponse = 104, + MESSAGE_TYPE__StubDispenserEEpromRequest = 105, + MESSAGE_TYPE__StubDispenserEEpromResponse = 106, + MESSAGE_TYPE__StubWHSEEpromRequest = 107, + MESSAGE_TYPE__StubWHSEEpromResponse = 108, MESSAGE_TYPE__ExternalBridgeUdpDiscoveryPacket = 1000, MESSAGE_TYPE__ExternalBridgeLoginRequest = 1001, MESSAGE_TYPE__ExternalBridgeLoginResponse = 1002, @@ -189,8 +193,6 @@ typedef enum _MessageType { MESSAGE_TYPE__StopCartridgesUpdateResponse = 2043, MESSAGE_TYPE__CartridgeValidationRequest = 2044, MESSAGE_TYPE__CartridgeValidationResponse = 2045, - MESSAGE_TYPE__DispenserEEpromRequest = 2046, - MESSAGE_TYPE__DispenserEEpromResponse = 2047, MESSAGE_TYPE__JobRequest = 3000, MESSAGE_TYPE__JobResponse = 3001, MESSAGE_TYPE__AbortJobRequest = 3002, diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEPROM.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEPROM.pb-c.c index ac762deec..88ef38caf 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEPROM.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEPROM.pb-c.c @@ -1,66 +1,66 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEPROM.proto */ +/* Generated from: StubDispenserEEPROM.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif -#include "DispenserEEPROM.pb-c.h" -void dispenser_eeprom__init - (DispenserEEprom *message) +#include "StubDispenserEEPROM.pb-c.h" +void dispenser_eeprom_data__init + (DispenserEEpromData *message) { - static const DispenserEEprom init_value = DISPENSER_EEPROM__INIT; + static const DispenserEEpromData init_value = DISPENSER_EEPROM_DATA__INIT; *message = init_value; } -size_t dispenser_eeprom__get_packed_size - (const DispenserEEprom *message) +size_t dispenser_eeprom_data__get_packed_size + (const DispenserEEpromData *message) { - assert(message->base.descriptor == &dispenser_eeprom__descriptor); + assert(message->base.descriptor == &dispenser_eeprom_data__descriptor); return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); } -size_t dispenser_eeprom__pack - (const DispenserEEprom *message, +size_t dispenser_eeprom_data__pack + (const DispenserEEpromData *message, uint8_t *out) { - assert(message->base.descriptor == &dispenser_eeprom__descriptor); + assert(message->base.descriptor == &dispenser_eeprom_data__descriptor); return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); } -size_t dispenser_eeprom__pack_to_buffer - (const DispenserEEprom *message, +size_t dispenser_eeprom_data__pack_to_buffer + (const DispenserEEpromData *message, ProtobufCBuffer *buffer) { - assert(message->base.descriptor == &dispenser_eeprom__descriptor); + assert(message->base.descriptor == &dispenser_eeprom_data__descriptor); return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); } -DispenserEEprom * - dispenser_eeprom__unpack +DispenserEEpromData * + dispenser_eeprom_data__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data) { - return (DispenserEEprom *) - protobuf_c_message_unpack (&dispenser_eeprom__descriptor, + return (DispenserEEpromData *) + protobuf_c_message_unpack (&dispenser_eeprom_data__descriptor, allocator, len, data); } -void dispenser_eeprom__free_unpacked - (DispenserEEprom *message, +void dispenser_eeprom_data__free_unpacked + (DispenserEEpromData *message, ProtobufCAllocator *allocator) { if(!message) return; - assert(message->base.descriptor == &dispenser_eeprom__descriptor); + assert(message->base.descriptor == &dispenser_eeprom_data__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = +static const ProtobufCFieldDescriptor dispenser_eeprom_data__field_descriptors[32] = { { "", 1, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_header), - offsetof(DispenserEEprom, header), + offsetof(DispenserEEpromData, has_header), + offsetof(DispenserEEpromData, header), NULL, NULL, 0, /* flags */ @@ -71,8 +71,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 2, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_tablelength), - offsetof(DispenserEEprom, tablelength), + offsetof(DispenserEEpromData, has_tablelength), + offsetof(DispenserEEpromData, tablelength), NULL, NULL, 0, /* flags */ @@ -83,8 +83,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 3, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_tableversion), - offsetof(DispenserEEprom, tableversion), + offsetof(DispenserEEpromData, has_tableversion), + offsetof(DispenserEEpromData, tableversion), NULL, NULL, 0, /* flags */ @@ -96,7 +96,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(DispenserEEprom, dispenserp_n), + offsetof(DispenserEEpromData, dispenserp_n), NULL, NULL, 0, /* flags */ @@ -108,7 +108,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(DispenserEEprom, pcbs_n), + offsetof(DispenserEEpromData, pcbs_n), NULL, NULL, 0, /* flags */ @@ -120,7 +120,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(DispenserEEprom, pcbpartnumber), + offsetof(DispenserEEpromData, pcbpartnumber), NULL, NULL, 0, /* flags */ @@ -132,7 +132,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(DispenserEEprom, dispensers_n), + offsetof(DispenserEEpromData, dispensers_n), NULL, NULL, 0, /* flags */ @@ -143,8 +143,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 8, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_minimalpressure), - offsetof(DispenserEEprom, minimalpressure), + offsetof(DispenserEEpromData, has_minimalpressure), + offsetof(DispenserEEpromData, minimalpressure), NULL, NULL, 0, /* flags */ @@ -155,8 +155,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 9, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_maximalpressure), - offsetof(DispenserEEprom, maximalpressure), + offsetof(DispenserEEpromData, has_maximalpressure), + offsetof(DispenserEEpromData, maximalpressure), NULL, NULL, 0, /* flags */ @@ -167,8 +167,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 10, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_minimalmv), - offsetof(DispenserEEprom, minimalmv), + offsetof(DispenserEEpromData, has_minimalmv), + offsetof(DispenserEEpromData, minimalmv), NULL, NULL, 0, /* flags */ @@ -179,8 +179,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 11, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_maximalmv), - offsetof(DispenserEEprom, maximalmv), + offsetof(DispenserEEpromData, has_maximalmv), + offsetof(DispenserEEpromData, maximalmv), NULL, NULL, 0, /* flags */ @@ -191,8 +191,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 12, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_totalcycles), - offsetof(DispenserEEprom, totalcycles), + offsetof(DispenserEEpromData, has_totalcycles), + offsetof(DispenserEEpromData, totalcycles), NULL, NULL, 0, /* flags */ @@ -203,8 +203,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 13, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_bubblesize), - offsetof(DispenserEEprom, bubblesize), + offsetof(DispenserEEpromData, has_bubblesize), + offsetof(DispenserEEpromData, bubblesize), NULL, NULL, 0, /* flags */ @@ -215,8 +215,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 14, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_avg_nl_stepvalue_1_4), - offsetof(DispenserEEprom, avg_nl_stepvalue_1_4), + offsetof(DispenserEEpromData, has_avg_nl_stepvalue_1_4), + offsetof(DispenserEEpromData, avg_nl_stepvalue_1_4), NULL, NULL, 0, /* flags */ @@ -227,8 +227,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 15, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_avg_nl_stepvalue_2_4), - offsetof(DispenserEEprom, avg_nl_stepvalue_2_4), + offsetof(DispenserEEpromData, has_avg_nl_stepvalue_2_4), + offsetof(DispenserEEpromData, avg_nl_stepvalue_2_4), NULL, NULL, 0, /* flags */ @@ -239,8 +239,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 16, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_avg_nl_stepvalue_3_4), - offsetof(DispenserEEprom, avg_nl_stepvalue_3_4), + offsetof(DispenserEEpromData, has_avg_nl_stepvalue_3_4), + offsetof(DispenserEEpromData, avg_nl_stepvalue_3_4), NULL, NULL, 0, /* flags */ @@ -251,8 +251,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 17, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_avg_nl_stepvalue_4_4), - offsetof(DispenserEEprom, avg_nl_stepvalue_4_4), + offsetof(DispenserEEpromData, has_avg_nl_stepvalue_4_4), + offsetof(DispenserEEpromData, avg_nl_stepvalue_4_4), NULL, NULL, 0, /* flags */ @@ -263,8 +263,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 18, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_sw_reserve), - offsetof(DispenserEEprom, sw_reserve), + offsetof(DispenserEEpromData, has_sw_reserve), + offsetof(DispenserEEpromData, sw_reserve), NULL, NULL, 0, /* flags */ @@ -275,8 +275,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 19, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, - offsetof(DispenserEEprom, has_spare1_pressure), - offsetof(DispenserEEprom, spare1_pressure), + offsetof(DispenserEEpromData, has_spare1_pressure), + offsetof(DispenserEEpromData, spare1_pressure), NULL, NULL, 0, /* flags */ @@ -287,8 +287,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 20, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_INT32, - offsetof(DispenserEEprom, has_spare2_pressure), - offsetof(DispenserEEprom, spare2_pressure), + offsetof(DispenserEEpromData, has_spare2_pressure), + offsetof(DispenserEEpromData, spare2_pressure), NULL, NULL, 0, /* flags */ @@ -299,8 +299,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 21, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_motorpulsespercycle), - offsetof(DispenserEEprom, motorpulsespercycle), + offsetof(DispenserEEpromData, has_motorpulsespercycle), + offsetof(DispenserEEpromData, motorpulsespercycle), NULL, NULL, 0, /* flags */ @@ -311,8 +311,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 22, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_color), - offsetof(DispenserEEprom, color), + offsetof(DispenserEEpromData, has_color), + offsetof(DispenserEEpromData, color), NULL, NULL, 0, /* flags */ @@ -323,8 +323,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 23, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_pressureslope), - offsetof(DispenserEEprom, pressureslope), + offsetof(DispenserEEpromData, has_pressureslope), + offsetof(DispenserEEpromData, pressureslope), NULL, NULL, 0, /* flags */ @@ -336,7 +336,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_STRING, 0, /* quantifier_offset */ - offsetof(DispenserEEprom, productiondate), + offsetof(DispenserEEpromData, productiondate), NULL, NULL, 0, /* flags */ @@ -347,8 +347,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 25, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_atslocation), - offsetof(DispenserEEprom, atslocation), + offsetof(DispenserEEpromData, has_atslocation), + offsetof(DispenserEEpromData, atslocation), NULL, NULL, 0, /* flags */ @@ -359,8 +359,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 26, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_spare1), - offsetof(DispenserEEprom, spare1), + offsetof(DispenserEEpromData, has_spare1), + offsetof(DispenserEEpromData, spare1), NULL, NULL, 0, /* flags */ @@ -371,8 +371,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 27, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_spare2), - offsetof(DispenserEEprom, spare2), + offsetof(DispenserEEpromData, has_spare2), + offsetof(DispenserEEpromData, spare2), NULL, NULL, 0, /* flags */ @@ -383,8 +383,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 28, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_UINT32, - offsetof(DispenserEEprom, has_atschannel), - offsetof(DispenserEEprom, atschannel), + offsetof(DispenserEEpromData, has_atschannel), + offsetof(DispenserEEpromData, atschannel), NULL, NULL, 0, /* flags */ @@ -395,8 +395,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 29, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(DispenserEEprom, has_unitempty), - offsetof(DispenserEEprom, unitempty), + offsetof(DispenserEEpromData, has_unitempty), + offsetof(DispenserEEpromData, unitempty), NULL, NULL, 0, /* flags */ @@ -407,8 +407,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 30, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(DispenserEEprom, has_dryrunpass_fail), - offsetof(DispenserEEprom, dryrunpass_fail), + offsetof(DispenserEEpromData, has_dryrunpass_fail), + offsetof(DispenserEEpromData, dryrunpass_fail), NULL, NULL, 0, /* flags */ @@ -419,8 +419,8 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = 31, PROTOBUF_C_LABEL_OPTIONAL, PROTOBUF_C_TYPE_BOOL, - offsetof(DispenserEEprom, has_flowpass_fail), - offsetof(DispenserEEprom, flowpass_fail), + offsetof(DispenserEEpromData, has_flowpass_fail), + offsetof(DispenserEEpromData, flowpass_fail), NULL, NULL, 0, /* flags */ @@ -430,16 +430,16 @@ static const ProtobufCFieldDescriptor dispenser_eeprom__field_descriptors[32] = "", 32, PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BOOL, - offsetof(DispenserEEprom, has_checksum), - offsetof(DispenserEEprom, checksum), + PROTOBUF_C_TYPE_UINT32, + offsetof(DispenserEEpromData, has_checksum), + offsetof(DispenserEEpromData, checksum), NULL, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, }; -static const unsigned dispenser_eeprom__field_indices_by_name[] = { +static const unsigned dispenser_eeprom_data__field_indices_by_name[] = { 27, /* field[27] = ATSChannel */ 24, /* field[24] = ATSlocation */ 13, /* field[13] = AVG_Nl_stepValue_1_4 */ @@ -473,23 +473,23 @@ static const unsigned dispenser_eeprom__field_indices_by_name[] = { 11, /* field[11] = TotalCycles */ 28, /* field[28] = UnitEmpty */ }; -static const ProtobufCIntRange dispenser_eeprom__number_ranges[1 + 1] = +static const ProtobufCIntRange dispenser_eeprom_data__number_ranges[1 + 1] = { { 1, 0 }, { 0, 32 } }; -const ProtobufCMessageDescriptor dispenser_eeprom__descriptor = +const ProtobufCMessageDescriptor dispenser_eeprom_data__descriptor = { PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, "", "", "", "", - sizeof(DispenserEEprom), + sizeof(DispenserEEpromData), 32, - dispenser_eeprom__field_descriptors, - dispenser_eeprom__field_indices_by_name, - 1, dispenser_eeprom__number_ranges, - (ProtobufCMessageInit) dispenser_eeprom__init, + dispenser_eeprom_data__field_descriptors, + dispenser_eeprom_data__field_indices_by_name, + 1, dispenser_eeprom_data__number_ranges, + (ProtobufCMessageInit) dispenser_eeprom_data__init, NULL,NULL,NULL /* reserved[123] */ }; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEPROM.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEPROM.pb-c.h index 34b9b333d..d07cd3006 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEPROM.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEPROM.pb-c.h @@ -1,8 +1,8 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEPROM.proto */ +/* Generated from: StubDispenserEEPROM.proto */ -#ifndef PROTOBUF_C_DispenserEEPROM_2eproto__INCLUDED -#define PROTOBUF_C_DispenserEEPROM_2eproto__INCLUDED +#ifndef PROTOBUF_C_StubDispenserEEPROM_2eproto__INCLUDED +#define PROTOBUF_C_StubDispenserEEPROM_2eproto__INCLUDED #include <protobuf-c/protobuf-c.h> @@ -15,7 +15,7 @@ PROTOBUF_C__BEGIN_DECLS #endif -typedef struct _DispenserEEprom DispenserEEprom; +typedef struct _DispenserEEpromData DispenserEEpromData; /* --- enums --- */ @@ -23,7 +23,7 @@ typedef struct _DispenserEEprom DispenserEEprom; /* --- messages --- */ -struct _DispenserEEprom +struct _DispenserEEpromData { ProtobufCMessage base; protobuf_c_boolean has_header; @@ -84,36 +84,36 @@ struct _DispenserEEprom protobuf_c_boolean has_flowpass_fail; protobuf_c_boolean flowpass_fail; protobuf_c_boolean has_checksum; - protobuf_c_boolean checksum; + uint32_t checksum; }; -#define DISPENSER_EEPROM__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&dispenser_eeprom__descriptor) \ +#define DISPENSER_EEPROM_DATA__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&dispenser_eeprom_data__descriptor) \ , 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } -/* DispenserEEprom methods */ -void dispenser_eeprom__init - (DispenserEEprom *message); -size_t dispenser_eeprom__get_packed_size - (const DispenserEEprom *message); -size_t dispenser_eeprom__pack - (const DispenserEEprom *message, +/* DispenserEEpromData methods */ +void dispenser_eeprom_data__init + (DispenserEEpromData *message); +size_t dispenser_eeprom_data__get_packed_size + (const DispenserEEpromData *message); +size_t dispenser_eeprom_data__pack + (const DispenserEEpromData *message, uint8_t *out); -size_t dispenser_eeprom__pack_to_buffer - (const DispenserEEprom *message, +size_t dispenser_eeprom_data__pack_to_buffer + (const DispenserEEpromData *message, ProtobufCBuffer *buffer); -DispenserEEprom * - dispenser_eeprom__unpack +DispenserEEpromData * + dispenser_eeprom_data__unpack (ProtobufCAllocator *allocator, size_t len, const uint8_t *data); -void dispenser_eeprom__free_unpacked - (DispenserEEprom *message, +void dispenser_eeprom_data__free_unpacked + (DispenserEEpromData *message, ProtobufCAllocator *allocator); /* --- per-message closures --- */ -typedef void (*DispenserEEprom_Closure) - (const DispenserEEprom *message, +typedef void (*DispenserEEpromData_Closure) + (const DispenserEEpromData *message, void *closure_data); /* --- services --- */ @@ -121,9 +121,9 @@ typedef void (*DispenserEEprom_Closure) /* --- descriptors --- */ -extern const ProtobufCMessageDescriptor dispenser_eeprom__descriptor; +extern const ProtobufCMessageDescriptor dispenser_eeprom_data__descriptor; PROTOBUF_C__END_DECLS -#endif /* PROTOBUF_C_DispenserEEPROM_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_StubDispenserEEPROM_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromRequest.pb-c.c index a86bfd0b1..0b455922c 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromRequest.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromRequest.pb-c.c @@ -1,12 +1,12 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEpromRequest.proto */ +/* Generated from: StubDispenserEEpromRequest.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif -#include "DispenserEEpromRequest.pb-c.h" +#include "StubDispenserEEpromRequest.pb-c.h" void dispenser_eeprom_request__init (DispenserEEpromRequest *message) { @@ -85,7 +85,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom_request__field_descriptor PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ offsetof(DispenserEEpromRequest, dispensereeprom), - &dispenser_eeprom__descriptor, + &dispenser_eeprom_data__descriptor, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromRequest.pb-c.h index e7db7f73e..94449d740 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromRequest.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromRequest.pb-c.h @@ -1,8 +1,8 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEpromRequest.proto */ +/* Generated from: StubDispenserEEpromRequest.proto */ -#ifndef PROTOBUF_C_DispenserEEpromRequest_2eproto__INCLUDED -#define PROTOBUF_C_DispenserEEpromRequest_2eproto__INCLUDED +#ifndef PROTOBUF_C_StubDispenserEEpromRequest_2eproto__INCLUDED +#define PROTOBUF_C_StubDispenserEEpromRequest_2eproto__INCLUDED #include <protobuf-c/protobuf-c.h> @@ -14,7 +14,7 @@ PROTOBUF_C__BEGIN_DECLS # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. #endif -#include "DispenserEEprom.pb-c.h" +#include "StubDispenserEEPROM.pb-c.h" typedef struct _DispenserEEpromRequest DispenserEEpromRequest; @@ -31,7 +31,7 @@ struct _DispenserEEpromRequest uint32_t dispenserid; protobuf_c_boolean has_burnrequest; protobuf_c_boolean burnrequest; - DispenserEEprom *dispensereeprom; + DispenserEEpromData *dispensereeprom; }; #define DISPENSER_EEPROM_REQUEST__INIT \ { PROTOBUF_C_MESSAGE_INIT (&dispenser_eeprom_request__descriptor) \ @@ -73,4 +73,4 @@ extern const ProtobufCMessageDescriptor dispenser_eeprom_request__descriptor; PROTOBUF_C__END_DECLS -#endif /* PROTOBUF_C_DispenserEEpromRequest_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_StubDispenserEEpromRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromResponse.pb-c.c index 71459129d..ac5b9b9af 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromResponse.pb-c.c +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromResponse.pb-c.c @@ -1,12 +1,12 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEpromResponse.proto */ +/* Generated from: StubDispenserEEpromResponse.proto */ /* Do not generate deprecated warnings for self */ #ifndef PROTOBUF_C__NO_DEPRECATED #define PROTOBUF_C__NO_DEPRECATED #endif -#include "DispenserEEpromResponse.pb-c.h" +#include "StubDispenserEEpromResponse.pb-c.h" void dispenser_eeprom_response__init (DispenserEEpromResponse *message) { @@ -73,7 +73,7 @@ static const ProtobufCFieldDescriptor dispenser_eeprom_response__field_descripto PROTOBUF_C_TYPE_MESSAGE, 0, /* quantifier_offset */ offsetof(DispenserEEpromResponse, dispensereeprom), - &dispenser_eeprom__descriptor, + &dispenser_eeprom_data__descriptor, NULL, 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromResponse.pb-c.h index b4e7f98b5..e285e8486 100644 --- a/Software/Embedded_SW/Embedded/Communication/PMR/Diagnostics/DispenserEEpromResponse.pb-c.h +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubDispenserEEpromResponse.pb-c.h @@ -1,8 +1,8 @@ /* Generated by the protocol buffer compiler. DO NOT EDIT! */ -/* Generated from: DispenserEEpromResponse.proto */ +/* Generated from: StubDispenserEEpromResponse.proto */ -#ifndef PROTOBUF_C_DispenserEEpromResponse_2eproto__INCLUDED -#define PROTOBUF_C_DispenserEEpromResponse_2eproto__INCLUDED +#ifndef PROTOBUF_C_StubDispenserEEpromResponse_2eproto__INCLUDED +#define PROTOBUF_C_StubDispenserEEpromResponse_2eproto__INCLUDED #include <protobuf-c/protobuf-c.h> @@ -14,7 +14,7 @@ PROTOBUF_C__BEGIN_DECLS # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. #endif -#include "DispenserEEprom.pb-c.h" +#include "StubDispenserEEprom.pb-c.h" typedef struct _DispenserEEpromResponse DispenserEEpromResponse; @@ -29,7 +29,7 @@ struct _DispenserEEpromResponse ProtobufCMessage base; protobuf_c_boolean has_dispenserid; uint32_t dispenserid; - DispenserEEprom *dispensereeprom; + DispenserEEpromData *dispensereeprom; }; #define DISPENSER_EEPROM_RESPONSE__INIT \ { PROTOBUF_C_MESSAGE_INIT (&dispenser_eeprom_response__descriptor) \ @@ -71,4 +71,4 @@ extern const ProtobufCMessageDescriptor dispenser_eeprom_response__descriptor; PROTOBUF_C__END_DECLS -#endif /* PROTOBUF_C_DispenserEEpromResponse_2eproto__INCLUDED */ +#endif /* PROTOBUF_C_StubDispenserEEpromResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.c new file mode 100644 index 000000000..919b17543 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.c @@ -0,0 +1,326 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEPROM.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubWhsEEPROM.pb-c.h" +void whs_eeprom_data__init + (WhsEEpromData *message) +{ + static const WhsEEpromData init_value = WHS_EEPROM_DATA__INIT; + *message = init_value; +} +size_t whs_eeprom_data__get_packed_size + (const WhsEEpromData *message) +{ + assert(message->base.descriptor == &whs_eeprom_data__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t whs_eeprom_data__pack + (const WhsEEpromData *message, + uint8_t *out) +{ + assert(message->base.descriptor == &whs_eeprom_data__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t whs_eeprom_data__pack_to_buffer + (const WhsEEpromData *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &whs_eeprom_data__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +WhsEEpromData * + whs_eeprom_data__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (WhsEEpromData *) + protobuf_c_message_unpack (&whs_eeprom_data__descriptor, + allocator, len, data); +} +void whs_eeprom_data__free_unpacked + (WhsEEpromData *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &whs_eeprom_data__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor whs_eeprom_data__field_descriptors[19] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(WhsEEpromData, has_header), + offsetof(WhsEEpromData, header), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(WhsEEpromData, has_tablelength), + offsetof(WhsEEpromData, tablelength), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 3, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(WhsEEpromData, has_tableversion), + offsetof(WhsEEpromData, tableversion), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 4, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, whsp_n), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 5, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, pcbs_n), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 6, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, pcbpartnumber), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 7, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, whss_n), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 8, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice1flow), + offsetof(WhsEEpromData, orifice1flow), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 9, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice1slope), + offsetof(WhsEEpromData, orifice1slope), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 10, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice2flow), + offsetof(WhsEEpromData, orifice2flow), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 11, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice2slope), + offsetof(WhsEEpromData, orifice2slope), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 12, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice3flow), + offsetof(WhsEEpromData, orifice3flow), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 13, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orifice3slope), + offsetof(WhsEEpromData, orifice3slope), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 14, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orificevalveflow), + offsetof(WhsEEpromData, orificevalveflow), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 15, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(WhsEEpromData, has_orificevalveslope), + offsetof(WhsEEpromData, orificevalveslope), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 16, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, vocinstallationdate), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 17, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, filterinstallationdate), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 18, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(WhsEEpromData, productiondate), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 19, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_UINT32, + offsetof(WhsEEpromData, has_checksum), + offsetof(WhsEEpromData, checksum), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned whs_eeprom_data__field_indices_by_name[] = { + 18, /* field[18] = CheckSum */ + 16, /* field[16] = FilterInstallationDate */ + 0, /* field[0] = Header */ + 7, /* field[7] = Orifice1Flow */ + 8, /* field[8] = Orifice1Slope */ + 9, /* field[9] = Orifice2Flow */ + 10, /* field[10] = Orifice2Slope */ + 11, /* field[11] = Orifice3Flow */ + 12, /* field[12] = Orifice3Slope */ + 13, /* field[13] = OrificeValveFlow */ + 14, /* field[14] = OrificeValveSlope */ + 5, /* field[5] = PCBPartNumber */ + 4, /* field[4] = PCBS_N */ + 17, /* field[17] = ProductionDate */ + 1, /* field[1] = TableLength */ + 2, /* field[2] = Tableversion */ + 15, /* field[15] = VOCInstallationDate */ + 3, /* field[3] = WhsP_N */ + 6, /* field[6] = WhsS_N */ +}; +static const ProtobufCIntRange whs_eeprom_data__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 19 } +}; +const ProtobufCMessageDescriptor whs_eeprom_data__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(WhsEEpromData), + 19, + whs_eeprom_data__field_descriptors, + whs_eeprom_data__field_indices_by_name, + 1, whs_eeprom_data__number_ranges, + (ProtobufCMessageInit) whs_eeprom_data__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.h new file mode 100644 index 000000000..a140ecf81 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEPROM.pb-c.h @@ -0,0 +1,101 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEPROM.proto */ + +#ifndef PROTOBUF_C_StubWhsEEPROM_2eproto__INCLUDED +#define PROTOBUF_C_StubWhsEEPROM_2eproto__INCLUDED + +#include <protobuf-c/protobuf-c.h> + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + + +typedef struct _WhsEEpromData WhsEEpromData; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _WhsEEpromData +{ + ProtobufCMessage base; + protobuf_c_boolean has_header; + uint32_t header; + protobuf_c_boolean has_tablelength; + uint32_t tablelength; + protobuf_c_boolean has_tableversion; + uint32_t tableversion; + char *whsp_n; + char *pcbs_n; + char *pcbpartnumber; + char *whss_n; + protobuf_c_boolean has_orifice1flow; + double orifice1flow; + protobuf_c_boolean has_orifice1slope; + double orifice1slope; + protobuf_c_boolean has_orifice2flow; + double orifice2flow; + protobuf_c_boolean has_orifice2slope; + double orifice2slope; + protobuf_c_boolean has_orifice3flow; + double orifice3flow; + protobuf_c_boolean has_orifice3slope; + double orifice3slope; + protobuf_c_boolean has_orificevalveflow; + double orificevalveflow; + protobuf_c_boolean has_orificevalveslope; + double orificevalveslope; + char *vocinstallationdate; + char *filterinstallationdate; + char *productiondate; + protobuf_c_boolean has_checksum; + uint32_t checksum; +}; +#define WHS_EEPROM_DATA__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&whs_eeprom_data__descriptor) \ + , 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0 } + + +/* WhsEEpromData methods */ +void whs_eeprom_data__init + (WhsEEpromData *message); +size_t whs_eeprom_data__get_packed_size + (const WhsEEpromData *message); +size_t whs_eeprom_data__pack + (const WhsEEpromData *message, + uint8_t *out); +size_t whs_eeprom_data__pack_to_buffer + (const WhsEEpromData *message, + ProtobufCBuffer *buffer); +WhsEEpromData * + whs_eeprom_data__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void whs_eeprom_data__free_unpacked + (WhsEEpromData *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*WhsEEpromData_Closure) + (const WhsEEpromData *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor whs_eeprom_data__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubWhsEEPROM_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.c new file mode 100644 index 000000000..9596486c7 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.c @@ -0,0 +1,105 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEpromRequest.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubWhsEEpromRequest.pb-c.h" +void whs_eeprom_request__init + (WhsEEpromRequest *message) +{ + static const WhsEEpromRequest init_value = WHS_EEPROM_REQUEST__INIT; + *message = init_value; +} +size_t whs_eeprom_request__get_packed_size + (const WhsEEpromRequest *message) +{ + assert(message->base.descriptor == &whs_eeprom_request__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t whs_eeprom_request__pack + (const WhsEEpromRequest *message, + uint8_t *out) +{ + assert(message->base.descriptor == &whs_eeprom_request__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t whs_eeprom_request__pack_to_buffer + (const WhsEEpromRequest *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &whs_eeprom_request__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +WhsEEpromRequest * + whs_eeprom_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (WhsEEpromRequest *) + protobuf_c_message_unpack (&whs_eeprom_request__descriptor, + allocator, len, data); +} +void whs_eeprom_request__free_unpacked + (WhsEEpromRequest *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &whs_eeprom_request__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor whs_eeprom_request__field_descriptors[2] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(WhsEEpromRequest, has_burnrequest), + offsetof(WhsEEpromRequest, burnrequest), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "", + 2, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(WhsEEpromRequest, whseeprom), + &whs_eeprom_data__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned whs_eeprom_request__field_indices_by_name[] = { + 0, /* field[0] = BurnRequest */ + 1, /* field[1] = WhsEEprom */ +}; +static const ProtobufCIntRange whs_eeprom_request__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 2 } +}; +const ProtobufCMessageDescriptor whs_eeprom_request__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(WhsEEpromRequest), + 2, + whs_eeprom_request__field_descriptors, + whs_eeprom_request__field_indices_by_name, + 1, whs_eeprom_request__number_ranges, + (ProtobufCMessageInit) whs_eeprom_request__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.h new file mode 100644 index 000000000..a54021c93 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromRequest.pb-c.h @@ -0,0 +1,74 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEpromRequest.proto */ + +#ifndef PROTOBUF_C_StubWhsEEpromRequest_2eproto__INCLUDED +#define PROTOBUF_C_StubWhsEEpromRequest_2eproto__INCLUDED + +#include <protobuf-c/protobuf-c.h> + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "StubWhsEEPROM.pb-c.h" + +typedef struct _WhsEEpromRequest WhsEEpromRequest; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _WhsEEpromRequest +{ + ProtobufCMessage base; + protobuf_c_boolean has_burnrequest; + protobuf_c_boolean burnrequest; + WhsEEpromData *whseeprom; +}; +#define WHS_EEPROM_REQUEST__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&whs_eeprom_request__descriptor) \ + , 0, 0, NULL } + + +/* WhsEEpromRequest methods */ +void whs_eeprom_request__init + (WhsEEpromRequest *message); +size_t whs_eeprom_request__get_packed_size + (const WhsEEpromRequest *message); +size_t whs_eeprom_request__pack + (const WhsEEpromRequest *message, + uint8_t *out); +size_t whs_eeprom_request__pack_to_buffer + (const WhsEEpromRequest *message, + ProtobufCBuffer *buffer); +WhsEEpromRequest * + whs_eeprom_request__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void whs_eeprom_request__free_unpacked + (WhsEEpromRequest *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*WhsEEpromRequest_Closure) + (const WhsEEpromRequest *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor whs_eeprom_request__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubWhsEEpromRequest_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.c b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.c new file mode 100644 index 000000000..85a138a6a --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.c @@ -0,0 +1,92 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEpromResponse.proto */ + +/* Do not generate deprecated warnings for self */ +#ifndef PROTOBUF_C__NO_DEPRECATED +#define PROTOBUF_C__NO_DEPRECATED +#endif + +#include "StubWhsEEpromResponse.pb-c.h" +void whs_eeprom_response__init + (WhsEEpromResponse *message) +{ + static const WhsEEpromResponse init_value = WHS_EEPROM_RESPONSE__INIT; + *message = init_value; +} +size_t whs_eeprom_response__get_packed_size + (const WhsEEpromResponse *message) +{ + assert(message->base.descriptor == &whs_eeprom_response__descriptor); + return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); +} +size_t whs_eeprom_response__pack + (const WhsEEpromResponse *message, + uint8_t *out) +{ + assert(message->base.descriptor == &whs_eeprom_response__descriptor); + return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); +} +size_t whs_eeprom_response__pack_to_buffer + (const WhsEEpromResponse *message, + ProtobufCBuffer *buffer) +{ + assert(message->base.descriptor == &whs_eeprom_response__descriptor); + return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); +} +WhsEEpromResponse * + whs_eeprom_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data) +{ + return (WhsEEpromResponse *) + protobuf_c_message_unpack (&whs_eeprom_response__descriptor, + allocator, len, data); +} +void whs_eeprom_response__free_unpacked + (WhsEEpromResponse *message, + ProtobufCAllocator *allocator) +{ + if(!message) + return; + assert(message->base.descriptor == &whs_eeprom_response__descriptor); + protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); +} +static const ProtobufCFieldDescriptor whs_eeprom_response__field_descriptors[1] = +{ + { + "", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_MESSAGE, + 0, /* quantifier_offset */ + offsetof(WhsEEpromResponse, whseeprom), + &whs_eeprom_data__descriptor, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, +}; +static const unsigned whs_eeprom_response__field_indices_by_name[] = { + 0, /* field[0] = WhsEEprom */ +}; +static const ProtobufCIntRange whs_eeprom_response__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } +}; +const ProtobufCMessageDescriptor whs_eeprom_response__descriptor = +{ + PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC, + "", + "", + "", + "", + sizeof(WhsEEpromResponse), + 1, + whs_eeprom_response__field_descriptors, + whs_eeprom_response__field_indices_by_name, + 1, whs_eeprom_response__number_ranges, + (ProtobufCMessageInit) whs_eeprom_response__init, + NULL,NULL,NULL /* reserved[123] */ +}; diff --git a/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.h b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.h new file mode 100644 index 000000000..84c529277 --- /dev/null +++ b/Software/Embedded_SW/Embedded/Communication/PMR/Stubs/StubWhsEEpromResponse.pb-c.h @@ -0,0 +1,72 @@ +/* Generated by the protocol buffer compiler. DO NOT EDIT! */ +/* Generated from: StubWhsEEpromResponse.proto */ + +#ifndef PROTOBUF_C_StubWhsEEpromResponse_2eproto__INCLUDED +#define PROTOBUF_C_StubWhsEEpromResponse_2eproto__INCLUDED + +#include <protobuf-c/protobuf-c.h> + +PROTOBUF_C__BEGIN_DECLS + +#if PROTOBUF_C_VERSION_NUMBER < 1003000 +# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. +#elif 1003000 < PROTOBUF_C_MIN_COMPILER_VERSION +# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. +#endif + +#include "StubWhsEEprom.pb-c.h" + +typedef struct _WhsEEpromResponse WhsEEpromResponse; + + +/* --- enums --- */ + + +/* --- messages --- */ + +struct _WhsEEpromResponse +{ + ProtobufCMessage base; + WhsEEpromData *whseeprom; +}; +#define WHS_EEPROM_RESPONSE__INIT \ + { PROTOBUF_C_MESSAGE_INIT (&whs_eeprom_response__descriptor) \ + , NULL } + + +/* WhsEEpromResponse methods */ +void whs_eeprom_response__init + (WhsEEpromResponse *message); +size_t whs_eeprom_response__get_packed_size + (const WhsEEpromResponse *message); +size_t whs_eeprom_response__pack + (const WhsEEpromResponse *message, + uint8_t *out); +size_t whs_eeprom_response__pack_to_buffer + (const WhsEEpromResponse *message, + ProtobufCBuffer *buffer); +WhsEEpromResponse * + whs_eeprom_response__unpack + (ProtobufCAllocator *allocator, + size_t len, + const uint8_t *data); +void whs_eeprom_response__free_unpacked + (WhsEEpromResponse *message, + ProtobufCAllocator *allocator); +/* --- per-message closures --- */ + +typedef void (*WhsEEpromResponse_Closure) + (const WhsEEpromResponse *message, + void *closure_data); + +/* --- services --- */ + + +/* --- descriptors --- */ + +extern const ProtobufCMessageDescriptor whs_eeprom_response__descriptor; + +PROTOBUF_C__END_DECLS + + +#endif /* PROTOBUF_C_StubWhsEEpromResponse_2eproto__INCLUDED */ diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c index d374ca533..4b9f457e0 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/Dispenser_Card/EEPROM/Dispenser_EEPROM.c @@ -21,9 +21,9 @@ #include <drivers/FPGA/FPGA_Comm.h> #include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" -#include "PMR/Diagnostics/DispenserEEprom.pb-c.h" -#include "PMR/Diagnostics/DispenserEEpromRequest.pb-c.h" -#include "PMR/Diagnostics/DispenserEEpromResponse.pb-c.h" +#include "PMR/stubs/StubDispenserEEprom.pb-c.h" +#include "PMR/stubs/StubDispenserEEpromRequest.pb-c.h" +#include "PMR/stubs/StubDispenserEEpromResponse.pb-c.h" @@ -239,7 +239,7 @@ uint8_t Check_Dispenser_Type(uint8_t Dispenser_ID) return Dispenser_struct[Dispenser_ID].Status; } -uint32_t Get_EEPROM_DATA_From_Dispenser(int Dispenser_ID,DispenserEEprom *dispensereeprom) +uint32_t Get_EEPROM_DATA_From_Dispenser(int Dispenser_ID,DispenserEEpromData *dispensereeprom) { uint32_t status = OK; status |= I2C_EEprom_Set_for_Read_Ch(Dispenser_ID, 0xA0); @@ -320,7 +320,7 @@ uint32_t Get_EEPROM_DATA_From_Dispenser(int Dispenser_ID,DispenserEEprom *dispen } return status; } -uint32_t Prepare_EEPROM_DATA_For_Burning(int Dispenser_ID,DispenserEEprom *dispensereeprom) +uint32_t Prepare_EEPROM_DATA_For_Burning(int Dispenser_ID,DispenserEEpromData *dispensereeprom) { uint32_t status = OK; Dispenser_struct[Dispenser_ID].Write_Disp_EEPROM.bytes.Header = dispensereeprom->header; @@ -371,8 +371,8 @@ uint32_t DispenserEEpromRequestFunc(MessageContainer* requestContainer) MessageContainer responseContainer; uint32_t status = OK; - DispenserEEprom *DispenserEEpromInstance; - Report("DispenserEEpromRequestFunc",__FILE__,__LINE__,request->dispenserid,RpWarning,(int)request->burnrequest,0); + DispenserEEpromData *DispenserEEpromInstance; + Report("StubDispenserEEpromRequestFunc",__FILE__,__LINE__,request->dispenserid,RpWarning,(int)request->burnrequest,0); if (request->burnrequest == true) { @@ -380,10 +380,10 @@ uint32_t DispenserEEpromRequestFunc(MessageContainer* requestContainer) } else { - DispenserEEpromInstance = my_malloc(sizeof(DispenserEEprom)); + DispenserEEpromInstance = my_malloc(sizeof(DispenserEEpromData)); if (DispenserEEpromInstance) { - dispenser_eeprom__init(DispenserEEpromInstance); + dispenser_eeprom_data__init(DispenserEEpromInstance); status = Get_EEPROM_DATA_From_Dispenser(request->dispenserid,DispenserEEpromInstance); } else @@ -398,7 +398,7 @@ uint32_t DispenserEEpromRequestFunc(MessageContainer* requestContainer) } Cresponse.has_dispenserid = true; Cresponse.dispenserid = request->dispenserid; - responseContainer = createContainer(MESSAGE_TYPE__DispenserEEpromResponse, requestContainer->token, true, &Cresponse, &dispenser_eeprom_response__pack, &dispenser_eeprom_response__get_packed_size); + responseContainer = createContainer(MESSAGE_TYPE__StubDispenserEEpromResponse, requestContainer->token, true, &Cresponse, &dispenser_eeprom_response__pack, &dispenser_eeprom_response__get_packed_size); responseContainer.continuous = false; if (status != OK) { diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.c index 0832280c2..485a224f6 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.c @@ -12,6 +12,10 @@ #include "Drivers/I2C_Communication/WHS_Card/WHS_data.h" #include "driverlib/i2c.h" +#include "PMR/stubs/StubWhsEEprom.pb-c.h" +#include "PMR/stubs/StubWhsEEpromRequest.pb-c.h" +#include "PMR/stubs/StubWhsEEpromResponse.pb-c.h" + //EEPROM M24M01-DFMN6TP //uint32_t I2C_WHS_EEPROM_SLAVE_ADD = 0xA0; @@ -188,3 +192,180 @@ uint32_t Test_WHS_EEPROM() return status; } */ + +uint32_t Get_EEPROM_DATA_From_WHS(WhsEEpromData *Whseeprom) +{ + uint32_t status = OK; +/* status |= I2C_EEprom_Set_for_Read_Ch(Whs_ID, 0xA0); + status |= I2C_EEprom_Read_Ch(Whs_ID, 0xA0); + + if (status == OK) + { + Whseeprom->has_header = true; + Whseeprom->header = Whs_struct.Read_Disp_EEPROM.bytes.Header; + Whseeprom->has_tablelength = true; + Whseeprom->tablelength = Whs_struct.Read_Disp_EEPROM.bytes.Table_Length; + Whseeprom->has_tableversion = true; + Whseeprom->tableversion = Whs_struct.Read_Disp_EEPROM.bytes.Table_version; + Whseeprom->Whsp_n = my_malloc(sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Whs_Part_Number)); + if (Whseeprom->Whsp_n) + memcpy(Whseeprom->Whsp_n,Whs_struct.Read_Disp_EEPROM.bytes.Whs_Part_Number,sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Whs_Part_Number)); + Whseeprom->pcbs_n = my_malloc(sizeof(Whs_struct.Read_Disp_EEPROM.bytes.PCB_SN)); + if (Whseeprom->pcbs_n) + memcpy(Whseeprom->pcbs_n,Whs_struct.Read_Disp_EEPROM.bytes.PCB_SN,sizeof(Whs_struct.Read_Disp_EEPROM.bytes.PCB_SN)); + Whseeprom->pcbpartnumber = my_malloc(sizeof(Whs_struct.Read_Disp_EEPROM.bytes.PCB_Part_Number)); + if (Whseeprom->pcbpartnumber) + memcpy(Whseeprom->pcbpartnumber,Whs_struct.Read_Disp_EEPROM.bytes.PCB_Part_Number,sizeof(Whs_struct.Read_Disp_EEPROM.bytes.PCB_Part_Number)); + Whseeprom->Whss_n = my_malloc(sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Whs_SN)); + if (Whseeprom->Whss_n) + memcpy(Whseeprom->Whss_n,Whs_struct.Read_Disp_EEPROM.bytes.Whs_SN,sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Whs_SN)); + Whseeprom->has_minimalpressure = true; + Whseeprom->minimalpressure = Whs_struct.Read_Disp_EEPROM.bytes.Maximal_Pressure; + Whseeprom->has_maximalpressure = true; + Whseeprom->maximalpressure = Whs_struct.Read_Disp_EEPROM.bytes.Maximal_Pressure; + Whseeprom->has_minimalmv = true; + Whseeprom->minimalmv = Whs_struct.Read_Disp_EEPROM.bytes.Minimal_MV; + Whseeprom->has_maximalmv = true; + Whseeprom->maximalmv = Whs_struct.Read_Disp_EEPROM.bytes.Maximal_MV; + Whseeprom->has_totalcycles = true; + Whseeprom->totalcycles = Whs_struct.Read_Disp_EEPROM.bytes.Total_Cycles; + Whseeprom->has_bubblesize = true; + Whseeprom->bubblesize = Whs_struct.Read_Disp_EEPROM.bytes.Bubble_Size; + Whseeprom->has_avg_nl_stepvalue_1_4 = true; + Whseeprom->avg_nl_stepvalue_1_4 = Whs_struct.Read_Disp_EEPROM.bytes.AVG_Nl_Step_Value_1_4; + Whseeprom->has_avg_nl_stepvalue_2_4 = true; + Whseeprom->avg_nl_stepvalue_2_4 = Whs_struct.Read_Disp_EEPROM.bytes.AVG_Nl_Step_Value_2_4; + Whseeprom->has_avg_nl_stepvalue_3_4 = true; + Whseeprom->avg_nl_stepvalue_3_4 = Whs_struct.Read_Disp_EEPROM.bytes.AVG_Nl_Step_Value_3_4; + Whseeprom->has_avg_nl_stepvalue_4_4 = true; + Whseeprom->avg_nl_stepvalue_4_4 = Whs_struct.Read_Disp_EEPROM.bytes.AVG_Nl_Step_Value_4_4; + Whseeprom->has_sw_reserve = true; + Whseeprom->sw_reserve = Whs_struct.Read_Disp_EEPROM.bytes.SW_Reserve; + Whseeprom->has_spare1_pressure = true; + Whseeprom->spare1_pressure = Whs_struct.Read_Disp_EEPROM.bytes.Spare1_pressure; + Whseeprom->has_spare2_pressure = true; + Whseeprom->spare2_pressure = Whs_struct.Read_Disp_EEPROM.bytes.Spare2_pressure; + Whseeprom->has_motorpulsespercycle = true; + Whseeprom->motorpulsespercycle = Whs_struct.Read_Disp_EEPROM.bytes.Motor_PPC; + Whseeprom->has_color = true; + Whseeprom->color = Whs_struct.Read_Disp_EEPROM.bytes.color; + Whseeprom->has_pressureslope = true; + Whseeprom->pressureslope = Whs_struct.Read_Disp_EEPROM.bytes.Pressure_Slope; + Whseeprom->productiondate = my_malloc(sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Production_Test_Date)+1); + if (Whseeprom->productiondate) + memcpy(Whseeprom->productiondate,Whs_struct.Read_Disp_EEPROM.bytes.Production_Test_Date,sizeof(Whs_struct.Read_Disp_EEPROM.bytes.Production_Test_Date)); + Whseeprom->has_atslocation = true; + Whseeprom->atslocation = Whs_struct.Read_Disp_EEPROM.bytes.ATS_Location; + Whseeprom->has_spare1 = true; + Whseeprom->spare1 = Whs_struct.Read_Disp_EEPROM.bytes.Spare1; + Whseeprom->has_spare2 = true; + Whseeprom->spare2 = Whs_struct.Read_Disp_EEPROM.bytes.Spare2; + Whseeprom->has_atschannel = true; + Whseeprom->atschannel = Whs_struct.Read_Disp_EEPROM.bytes.ATS_Channel; + Whseeprom->has_unitempty = true; + Whseeprom->unitempty = Whs_struct.Read_Disp_EEPROM.bytes.Unit_Empty; + Whseeprom->has_dryrunpass_fail = true; + Whseeprom->dryrunpass_fail = Whs_struct.Read_Disp_EEPROM.bytes.Dry_Run_Status; + Whseeprom->has_flowpass_fail = true; + Whseeprom->flowpass_fail = Whs_struct.Read_Disp_EEPROM.bytes.Flow_Status; + Whseeprom->has_checksum = true; + Whseeprom->checksum = Whs_struct.Read_Disp_EEPROM.bytes.CheckSum; + + } + */ + return status; +} +uint32_t Prepare_WHS_DATA_For_Burning(WhsEEpromData *Whseeprom) +{ + uint32_t status = OK; + /* + Whs_struct.Write_Disp_EEPROM.bytes.Header = Whseeprom->header; + Whs_struct.Write_Disp_EEPROM.bytes.Table_Length = Whseeprom->tablelength; + Whs_struct.Write_Disp_EEPROM.bytes.Table_version = Whseeprom->tableversion; + Whs_struct.Write_Disp_EEPROM.bytes.Maximal_Pressure = Whseeprom->minimalpressure; + Whs_struct.Write_Disp_EEPROM.bytes.Maximal_Pressure = Whseeprom->maximalpressure; + Whs_struct.Write_Disp_EEPROM.bytes.Minimal_MV = Whseeprom->minimalmv; + Whs_struct.Write_Disp_EEPROM.bytes.Maximal_MV = Whseeprom->maximalmv; + Whs_struct.Write_Disp_EEPROM.bytes.Total_Cycles = Whseeprom->totalcycles; + Whs_struct.Write_Disp_EEPROM.bytes.Bubble_Size = Whseeprom->bubblesize; + Whs_struct.Write_Disp_EEPROM.bytes.AVG_Nl_Step_Value_1_4 = Whseeprom->avg_nl_stepvalue_1_4; + Whs_struct.Write_Disp_EEPROM.bytes.AVG_Nl_Step_Value_2_4 = Whseeprom->avg_nl_stepvalue_2_4; + Whs_struct.Write_Disp_EEPROM.bytes.AVG_Nl_Step_Value_3_4 = Whseeprom->avg_nl_stepvalue_3_4; + Whs_struct.Write_Disp_EEPROM.bytes.AVG_Nl_Step_Value_4_4 = Whseeprom->avg_nl_stepvalue_4_4; + Whs_struct.Write_Disp_EEPROM.bytes.SW_Reserve = Whseeprom->sw_reserve; + Whs_struct.Write_Disp_EEPROM.bytes.Spare1_pressure = Whseeprom->spare1_pressure; + Whs_struct.Write_Disp_EEPROM.bytes.Spare2_pressure = Whseeprom->spare2_pressure; + Whs_struct.Write_Disp_EEPROM.bytes.Motor_PPC = Whseeprom->motorpulsespercycle; + Whs_struct.Write_Disp_EEPROM.bytes.color = Whseeprom->color; + Whs_struct.Write_Disp_EEPROM.bytes.Pressure_Slope = Whseeprom->pressureslope; + Whs_struct.Write_Disp_EEPROM.bytes.ATS_Location = Whseeprom->atslocation; + Whs_struct.Write_Disp_EEPROM.bytes.Spare1 = Whseeprom->spare1; + Whs_struct.Write_Disp_EEPROM.bytes.Spare2 = Whseeprom->spare2; + Whs_struct.Write_Disp_EEPROM.bytes.ATS_Channel = Whseeprom->atschannel; + Whs_struct.Write_Disp_EEPROM.bytes.Unit_Empty = Whseeprom->unitempty; + Whs_struct.Write_Disp_EEPROM.bytes.Dry_Run_Status = Whseeprom->dryrunpass_fail; + Whs_struct.Write_Disp_EEPROM.bytes.Flow_Status = Whseeprom->flowpass_fail; + Whs_struct.Write_Disp_EEPROM.bytes.CheckSum = Whseeprom->checksum; + if (Whseeprom->Whsp_n) + strncpy(Whs_struct.Write_Disp_EEPROM.bytes.Whs_Part_Number,Whseeprom->Whsp_n,sizeof(Whs_struct.Write_Disp_EEPROM.bytes.Whs_Part_Number)); + if (Whseeprom->pcbs_n) + strncpy(Whs_struct.Write_Disp_EEPROM.bytes.PCB_SN,Whseeprom->pcbs_n,sizeof(Whs_struct.Write_Disp_EEPROM.bytes.PCB_SN)); + if (Whseeprom->pcbpartnumber) + strncpy(Whs_struct.Write_Disp_EEPROM.bytes.PCB_Part_Number,Whseeprom->pcbpartnumber,sizeof(Whs_struct.Write_Disp_EEPROM.bytes.PCB_Part_Number)); + if (Whseeprom->Whss_n) + strncpy(Whs_struct.Write_Disp_EEPROM.bytes.Whs_SN,Whseeprom->Whss_n,sizeof(Whs_struct.Write_Disp_EEPROM.bytes.Whs_SN)); + if (Whseeprom->productiondate) + strncpy(Whs_struct.Write_Disp_EEPROM.bytes.Production_Test_Date,Whseeprom->productiondate,sizeof(Whs_struct.Write_Disp_EEPROM.bytes.Production_Test_Date)); + status = I2C_EEprom_Write_Ch(Whs_ID, 0xA0); + SysCtlDelay(5000000);//Must delay for at least 5 milli. !!! (See data sheet ) + */ + return status; +} +uint32_t WhsEEpromRequestFunc(MessageContainer* requestContainer) +{ + WhsEEpromRequest *request = whs_eeprom_request__unpack(NULL, requestContainer->data.len, requestContainer->data.data); + WhsEEpromResponse Cresponse = WHS_EEPROM_RESPONSE__INIT; + MessageContainer responseContainer; + + uint32_t status = OK; + WhsEEpromData *WhsEEpromInstance; + Report("StubWhsEEpromRequestFunc",__FILE__,__LINE__,1,RpWarning,(int)request->burnrequest,0); + + if (request->burnrequest == true) + { + status = Prepare_WHS_DATA_For_Burning(request->whseeprom); + } + else + { + WhsEEpromInstance = my_malloc(sizeof(WhsEEpromData)); + if (WhsEEpromInstance) + { + whs_eeprom_data__init(WhsEEpromInstance); + status = Get_EEPROM_DATA_From_WHS(WhsEEpromInstance); + } + else + { + status = FAILED; + LOG_ERROR(1,"my_malloc failed"); + } + } + if ((request->burnrequest == false) && (status == OK)) + { + Cresponse.whseeprom = WhsEEpromInstance; + } + responseContainer = createContainer(MESSAGE_TYPE__StubWHSEEpromResponse, requestContainer->token, true, &Cresponse, &whs_eeprom_response__pack, &whs_eeprom_response__get_packed_size); + responseContainer.continuous = false; + if (status != OK) + { + responseContainer.error = ERROR_CODE__INVALID_PARAMETER; + responseContainer.has_error = true; + } + uint8_t* container_buffer = my_malloc(message_container__get_packed_size(&responseContainer)); + size_t container_size = message_container__pack(&responseContainer, container_buffer); + my_free(responseContainer.data.data); + if (WhsEEpromInstance) + my_free(WhsEEpromInstance); + SendChars((char*)container_buffer, container_size); + return OK; + +} diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h index 05a8ed95a..74ab0762b 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/EEPROM/WHS_EEPROM.h @@ -10,13 +10,30 @@ typedef struct { - uint8_t PCB_SN[20]; uint8_t Module_SN[20]; double Orifice_Pressure_V0[3]; // (measured orifice sensor voltage without flow) value for each orifice sensor double Orifice_Waste_Level_V0; // (measured orifice sensor voltage without flow) value for each orifice sensor double flow_calc_coefficient_C; // C (flow calculation coefficient) value (=0.239) - + uint32_t Header; + uint32_t Table_Length; + uint32_t Table_version; + uint8_t WHS_Part_Number[20];//String + // uint8_t PCB_SN[20];//String + uint8_t PCB_Part_Number[20];//String + uint8_t WHS_SN[20];//String + double Orifice1Flow; + double Orifice1Slope; + double Orifice2Flow; + double Orifice2Slope; + double Orifice3Flow; + double Orifice3Slope; + double OrificeValveFlow; + double OrificeValveSlope; + uint8_t VOCInstallationDate[8]; + uint8_t FilterInstallationDate[8]; + uint8_t ProductionDate[8]; + uint32_t CheckSum; }WHS_EEPROM_BYTES; typedef union @@ -63,4 +80,6 @@ uint32_t Check_WHS_Type_Via_EEPROM(); bool WHS_I2C_EEprom_Write_Byte(uint32_t address, uint8_t data); bool WHS_I2C_EEprom_Read_Byte (uint32_t address, uint8_t* p_data); +uint32_t DispenserEEpromRequestFunc(MessageContainer* requestContainer); + #endif /* DRIVERS_I2C_COMMUNICATION_WHS_CARD_EEPROM_WHS_EEPROM_H_ */ diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 3b97e9eb7..9698f1ea3 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -59,7 +59,7 @@ uint32_t ScrewControlId = 0xFF; static bool KeepWindingCone = false; static uint32_t WindingConeLocation; -static uint32_t WinderBackToBaseTime = 800; +static uint32_t WinderBackToBaseTime = 1500; float NumberOfRotationPerPassage = 0.0; InternalWinderConfigStruc InternalWinderCfg = {0}; @@ -580,7 +580,8 @@ uint32_t Winder_End(void) ScrewsStopControlTimer(); //move the cart to the edge so the spool can be easily replaced //MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize, 1000, GPI_LS_SCREW_RIGHT, NULL,0); - MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); + //MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); + MotorAbortMovetoLimitSwitch(HARDWARE_MOTOR_TYPE__MOTO_SCREW); //bug #2709 return OK; } void Winder_ScrewHomeLimitSwitchInterrupt(void) |
