@@ -44,7 +44,7 @@ SCENARIO("Test the decoding of command messages") {
4444
4545 THEN (" The decode is successful" ) {
4646 REQUIRE (err == Decoder::Status::Complete);
47- REQUIRE (strcmp (command.thingUpdateCmd .params . thing_id , thingIdToMatch) == 0 );
47+ REQUIRE (strcmp (command.thingUpdateCmd .thing_id , thingIdToMatch) == 0 );
4848 REQUIRE (command.c .id == ThingUpdateCmdId);
4949 }
5050 }
@@ -73,7 +73,7 @@ SCENARIO("Test the decoding of command messages") {
7373
7474 THEN (" The decode is successful" ) {
7575 REQUIRE (err == Decoder::Status::Complete);
76- REQUIRE (strcmp (command.thingDetachCmd .params . thing_id , thingIdToMatch) == 0 );
76+ REQUIRE (strcmp (command.thingDetachCmd .thing_id , thingIdToMatch) == 0 );
7777 REQUIRE (command.c .id == ThingDetachCmdId);
7878 }
7979 }
@@ -143,8 +143,8 @@ SCENARIO("Test the decoding of command messages") {
143143
144144 THEN (" The decode is successful" ) {
145145 REQUIRE (err == Decoder::Status::Complete);
146- REQUIRE (command.timezoneCommandDown .params . offset == (uint32_t )1708963873 );
147- REQUIRE (command.timezoneCommandDown .params . until == (uint32_t )2024579473 );
146+ REQUIRE (command.timezoneCommandDown .offset == (uint32_t )1708963873 );
147+ REQUIRE (command.timezoneCommandDown .until == (uint32_t )2024579473 );
148148 REQUIRE (command.c .id == TimezoneCommandDownId);
149149 }
150150 }
@@ -173,23 +173,23 @@ SCENARIO("Test the decoding of command messages") {
173173
174174 THEN (" The decode is successful" ) {
175175 REQUIRE (err == Decoder::Status::Complete);
176- REQUIRE (command.lastValuesUpdateCmd .params . length == 13 );
177- REQUIRE (command.lastValuesUpdateCmd .params . last_values [0 ] == (uint8_t )0x00 );
178- REQUIRE (command.lastValuesUpdateCmd .params . last_values [1 ] == (uint8_t )0x01 );
179- REQUIRE (command.lastValuesUpdateCmd .params . last_values [2 ] == (uint8_t )0x02 );
180- REQUIRE (command.lastValuesUpdateCmd .params . last_values [3 ] == (uint8_t )0x03 );
181- REQUIRE (command.lastValuesUpdateCmd .params . last_values [4 ] == (uint8_t )0x04 );
182- REQUIRE (command.lastValuesUpdateCmd .params . last_values [5 ] == (uint8_t )0x05 );
183- REQUIRE (command.lastValuesUpdateCmd .params . last_values [6 ] == (uint8_t )0x06 );
184- REQUIRE (command.lastValuesUpdateCmd .params . last_values [7 ] == (uint8_t )0x07 );
185- REQUIRE (command.lastValuesUpdateCmd .params . last_values [8 ] == (uint8_t )0x08 );
186- REQUIRE (command.lastValuesUpdateCmd .params . last_values [9 ] == (uint8_t )0x09 );
187- REQUIRE (command.lastValuesUpdateCmd .params . last_values [10 ] == (uint8_t )0x10 );
188- REQUIRE (command.lastValuesUpdateCmd .params . last_values [11 ] == (uint8_t )0x11 );
189- REQUIRE (command.lastValuesUpdateCmd .params . last_values [12 ] == (uint8_t )0x12 );
176+ REQUIRE (command.lastValuesUpdateCmd .length == 13 );
177+ REQUIRE (command.lastValuesUpdateCmd .last_values [0 ] == (uint8_t )0x00 );
178+ REQUIRE (command.lastValuesUpdateCmd .last_values [1 ] == (uint8_t )0x01 );
179+ REQUIRE (command.lastValuesUpdateCmd .last_values [2 ] == (uint8_t )0x02 );
180+ REQUIRE (command.lastValuesUpdateCmd .last_values [3 ] == (uint8_t )0x03 );
181+ REQUIRE (command.lastValuesUpdateCmd .last_values [4 ] == (uint8_t )0x04 );
182+ REQUIRE (command.lastValuesUpdateCmd .last_values [5 ] == (uint8_t )0x05 );
183+ REQUIRE (command.lastValuesUpdateCmd .last_values [6 ] == (uint8_t )0x06 );
184+ REQUIRE (command.lastValuesUpdateCmd .last_values [7 ] == (uint8_t )0x07 );
185+ REQUIRE (command.lastValuesUpdateCmd .last_values [8 ] == (uint8_t )0x08 );
186+ REQUIRE (command.lastValuesUpdateCmd .last_values [9 ] == (uint8_t )0x09 );
187+ REQUIRE (command.lastValuesUpdateCmd .last_values [10 ] == (uint8_t )0x10 );
188+ REQUIRE (command.lastValuesUpdateCmd .last_values [11 ] == (uint8_t )0x11 );
189+ REQUIRE (command.lastValuesUpdateCmd .last_values [12 ] == (uint8_t )0x12 );
190190 REQUIRE (command.c .id == LastValuesUpdateCmdId);
191191 }
192- free (command.lastValuesUpdateCmd .params . last_values );
192+ free (command.lastValuesUpdateCmd .last_values );
193193 }
194194
195195 /* ***************************************************************************/
@@ -257,75 +257,75 @@ SCENARIO("Test the decoding of command messages") {
257257
258258 THEN (" The decode is successful" ) {
259259 REQUIRE (err == Decoder::Status::Complete);
260- REQUIRE (memcmp (command.otaUpdateCmdDown .params . id , otaIdToMatch, ID_SIZE) == 0 );
261- REQUIRE (strcmp (command.otaUpdateCmdDown .params . url , urlToMatch) == 0 );
260+ REQUIRE (memcmp (command.otaUpdateCmdDown .id , otaIdToMatch, ID_SIZE) == 0 );
261+ REQUIRE (strcmp (command.otaUpdateCmdDown .url , urlToMatch) == 0 );
262262 // Initial SHA256 check
263- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [0 ] == (uint8_t )0x00 );
264- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [1 ] == (uint8_t )0x00 );
265- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [2 ] == (uint8_t )0x00 );
266- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [3 ] == (uint8_t )0x00 );
267- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [4 ] == (uint8_t )0x00 );
268- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [5 ] == (uint8_t )0x00 );
269- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [6 ] == (uint8_t )0x00 );
270- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [7 ] == (uint8_t )0x00 );
271- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [8 ] == (uint8_t )0x00 );
272- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [9 ] == (uint8_t )0x00 );
273- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [10 ] == (uint8_t )0x00 );
274- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [11 ] == (uint8_t )0x00 );
275- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [12 ] == (uint8_t )0x00 );
276- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [13 ] == (uint8_t )0x00 );
277- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [14 ] == (uint8_t )0x00 );
278- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [15 ] == (uint8_t )0x00 );
279- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [16 ] == (uint8_t )0x00 );
280- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [17 ] == (uint8_t )0x00 );
281- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [18 ] == (uint8_t )0x00 );
282- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [19 ] == (uint8_t )0x00 );
283- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [20 ] == (uint8_t )0x00 );
284- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [21 ] == (uint8_t )0x00 );
285- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [22 ] == (uint8_t )0x00 );
286- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [23 ] == (uint8_t )0x00 );
287- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [24 ] == (uint8_t )0x00 );
288- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [25 ] == (uint8_t )0x00 );
289- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [26 ] == (uint8_t )0x00 );
290- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [27 ] == (uint8_t )0x00 );
291- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [28 ] == (uint8_t )0x00 );
292- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [29 ] == (uint8_t )0x00 );
293- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [30 ] == (uint8_t )0x00 );
294- REQUIRE (command.otaUpdateCmdDown .params . initialSha256 [31 ] == (uint8_t )0x00 );
263+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [0 ] == (uint8_t )0x00 );
264+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [1 ] == (uint8_t )0x00 );
265+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [2 ] == (uint8_t )0x00 );
266+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [3 ] == (uint8_t )0x00 );
267+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [4 ] == (uint8_t )0x00 );
268+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [5 ] == (uint8_t )0x00 );
269+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [6 ] == (uint8_t )0x00 );
270+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [7 ] == (uint8_t )0x00 );
271+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [8 ] == (uint8_t )0x00 );
272+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [9 ] == (uint8_t )0x00 );
273+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [10 ] == (uint8_t )0x00 );
274+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [11 ] == (uint8_t )0x00 );
275+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [12 ] == (uint8_t )0x00 );
276+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [13 ] == (uint8_t )0x00 );
277+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [14 ] == (uint8_t )0x00 );
278+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [15 ] == (uint8_t )0x00 );
279+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [16 ] == (uint8_t )0x00 );
280+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [17 ] == (uint8_t )0x00 );
281+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [18 ] == (uint8_t )0x00 );
282+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [19 ] == (uint8_t )0x00 );
283+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [20 ] == (uint8_t )0x00 );
284+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [21 ] == (uint8_t )0x00 );
285+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [22 ] == (uint8_t )0x00 );
286+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [23 ] == (uint8_t )0x00 );
287+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [24 ] == (uint8_t )0x00 );
288+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [25 ] == (uint8_t )0x00 );
289+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [26 ] == (uint8_t )0x00 );
290+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [27 ] == (uint8_t )0x00 );
291+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [28 ] == (uint8_t )0x00 );
292+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [29 ] == (uint8_t )0x00 );
293+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [30 ] == (uint8_t )0x00 );
294+ REQUIRE (command.otaUpdateCmdDown .initialSha256 [31 ] == (uint8_t )0x00 );
295295
296296 // Final SHA256 check
297- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [0 ] == (uint8_t )0xdf );
298- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [1 ] == (uint8_t )0x1e );
299- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [2 ] == (uint8_t )0xac );
300- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [3 ] == (uint8_t )0x9c );
301- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [4 ] == (uint8_t )0x7b );
302- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [5 ] == (uint8_t )0xd6 );
303- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [6 ] == (uint8_t )0x34 );
304- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [7 ] == (uint8_t )0x73 );
305- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [8 ] == (uint8_t )0xff );
306- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [9 ] == (uint8_t )0xfb );
307- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [10 ] == (uint8_t )0x11 );
308- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [11 ] == (uint8_t )0x7f );
309- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [12 ] == (uint8_t )0x98 );
310- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [13 ] == (uint8_t )0x73 );
311- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [14 ] == (uint8_t )0x70 );
312- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [15 ] == (uint8_t )0x3e );
313- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [16 ] == (uint8_t )0x4e );
314- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [17 ] == (uint8_t )0xc9 );
315- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [18 ] == (uint8_t )0x55 );
316- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [19 ] == (uint8_t )0x93 );
317- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [20 ] == (uint8_t )0x1e );
318- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [21 ] == (uint8_t )0x26 );
319- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [22 ] == (uint8_t )0x7f );
320- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [23 ] == (uint8_t )0x26 );
321- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [24 ] == (uint8_t )0x26 );
322- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [25 ] == (uint8_t )0x2b );
323- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [26 ] == (uint8_t )0x09 );
324- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [27 ] == (uint8_t )0x49 );
325- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [28 ] == (uint8_t )0xbc );
326- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [29 ] == (uint8_t )0x16 );
327- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [30 ] == (uint8_t )0xdc );
328- REQUIRE (command.otaUpdateCmdDown .params . finalSha256 [31 ] == (uint8_t )0x49 );
297+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [0 ] == (uint8_t )0xdf );
298+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [1 ] == (uint8_t )0x1e );
299+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [2 ] == (uint8_t )0xac );
300+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [3 ] == (uint8_t )0x9c );
301+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [4 ] == (uint8_t )0x7b );
302+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [5 ] == (uint8_t )0xd6 );
303+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [6 ] == (uint8_t )0x34 );
304+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [7 ] == (uint8_t )0x73 );
305+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [8 ] == (uint8_t )0xff );
306+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [9 ] == (uint8_t )0xfb );
307+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [10 ] == (uint8_t )0x11 );
308+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [11 ] == (uint8_t )0x7f );
309+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [12 ] == (uint8_t )0x98 );
310+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [13 ] == (uint8_t )0x73 );
311+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [14 ] == (uint8_t )0x70 );
312+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [15 ] == (uint8_t )0x3e );
313+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [16 ] == (uint8_t )0x4e );
314+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [17 ] == (uint8_t )0xc9 );
315+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [18 ] == (uint8_t )0x55 );
316+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [19 ] == (uint8_t )0x93 );
317+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [20 ] == (uint8_t )0x1e );
318+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [21 ] == (uint8_t )0x26 );
319+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [22 ] == (uint8_t )0x7f );
320+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [23 ] == (uint8_t )0x26 );
321+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [24 ] == (uint8_t )0x26 );
322+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [25 ] == (uint8_t )0x2b );
323+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [26 ] == (uint8_t )0x09 );
324+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [27 ] == (uint8_t )0x49 );
325+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [28 ] == (uint8_t )0xbc );
326+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [29 ] == (uint8_t )0x16 );
327+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [30 ] == (uint8_t )0xdc );
328+ REQUIRE (command.otaUpdateCmdDown .finalSha256 [31 ] == (uint8_t )0x49 );
329329
330330 REQUIRE (command.c .id == OtaUpdateCmdDownId);
331331 }
0 commit comments