From 05d2cd50d28723ba14059495a18f92bde46fae18 Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Thu, 5 Dec 2019 11:20:50 +0100 Subject: [PATCH 001/413] Fixing nominal GP startup test for new CAppdemo constructor --- src/tests/gp_tests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/gp_tests.cpp b/src/tests/gp_tests.cpp index 11be56e5..d76bcd82 100644 --- a/src/tests/gp_tests.cpp +++ b/src/tests/gp_tests.cpp @@ -140,6 +140,7 @@ TEST_GROUP(gp_tests) { } while(0) +#define GPD_KEY { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa } TEST(gp_tests, gp_recv_sensor_measurement) { CppThreadsTimerFactory timerFactory; GenericAsyncDataInputObservable uartIncomingDataHandler; @@ -154,10 +155,10 @@ TEST(gp_tests, gp_recv_sensor_measurement) { FAILF("Failed opening mock serial port"); } - stageExpectedTransitions.push_back(std::vector({0x1a, 0xc0, 0x38, 0xbc, 0x7e})); - std::vector sourceIdList; - sourceIdList.push_back(0x0500001U); - CAppDemo app(uartDriver, timerFactory, true, 11, sourceIdList); /* Force reset the network channel to 11 */ + stageExpectedTransitions.push_back({0x1a, 0xc0, 0x38, 0xbc, 0x7e}); + std::vector GPDList; + GPDList.push_back(CGpDevice(0x0500001U, GPD_KEY)); + CAppDemo app(uartDriver, timerFactory, true, false, 0, true, 11, false, GPDList); /* Force reset the network channel to 11 */ UT_WAIT_MS(50); /* Give 50ms for libezsp's internal process to write to serial */ UT_FAILF_UNLESS_STAGE(1); From 479b2248b1e5ae74ba8255f56d15bb03e2bec46f Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Thu, 5 Dec 2019 11:24:20 +0100 Subject: [PATCH 002/413] Removing explicit type std::vector() in test --- src/tests/gp_tests.cpp | 1092 ++++++++++++++++++++-------------------- 1 file changed, 546 insertions(+), 546 deletions(-) diff --git a/src/tests/gp_tests.cpp b/src/tests/gp_tests.cpp index d76bcd82..41705690 100644 --- a/src/tests/gp_tests.cpp +++ b/src/tests/gp_tests.cpp @@ -163,1118 +163,1118 @@ TEST(gp_tests, gp_recv_sensor_measurement) { UT_WAIT_MS(50); /* Give 50ms for libezsp's internal process to write to serial */ UT_FAILF_UNLESS_STAGE(1); - stageExpectedTransitions.push_back(std::vector({0x00, 0x42, 0x21, 0xa8, 0x52, 0xcd, 0x6e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x1a, 0xc1, 0x02, 0x0b, 0x0a, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x00, 0x42, 0x21, 0xa8, 0x52, 0xcd, 0x6e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x1a, 0xc1, 0x02, 0x0b, 0x0a, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(2); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x43, 0x21, 0xa8, 0x53, 0x05, 0xf0, 0x7e })); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x43, 0x21, 0xa8, 0x53, 0x05, 0xf0, 0x7e }); //std::cerr << "Remaining incoming queue:" << uartDriver.scheduledIncomingChunksToString() << "\n"; - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x42, 0xa1, 0xa8, 0x53, 0x28, 0x45, 0xd7, 0xcf, 0x00, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x42, 0xa1, 0xa8, 0x53, 0x28, 0x45, 0xd7, 0xcf, 0x00, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(4); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x40, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xbf, 0xeb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x43, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xe7, 0x42, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x40, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xbf, 0xeb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x43, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xe7, 0x42, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(6); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x41, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x9e, 0xf8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x40, 0xa1, 0x57, 0x54, 0x79, 0x23, 0xad, 0x47, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x41, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x9e, 0xf8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x40, 0xa1, 0x57, 0x54, 0x79, 0x23, 0xad, 0x47, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(8); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x46, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x29, 0xcb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x41, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x4d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x46, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x29, 0xcb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x41, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x4d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(10); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x47, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xec, 0x39, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x46, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x64, 0x0c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x47, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xec, 0x39, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x46, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x64, 0x0c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(12); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x44, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x20, 0x3f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x47, 0xa1, 0x57, 0x54, 0x79, 0x20, 0xa8, 0xa3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x44, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x20, 0x3f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x47, 0xa1, 0x57, 0x54, 0x79, 0x20, 0xa8, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(14); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x45, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x67, 0x4e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x44, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x59, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x45, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x67, 0x4e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x44, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x59, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(16); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x4a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0x8d, 0x58, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x45, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x4a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0x8d, 0x58, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x45, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(18); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x4b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xcb, 0x87, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x4a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xc5, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x4b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xcb, 0x87, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x4a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xc5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(20); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x48, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x74, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x4b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x48, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x74, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x4b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(22); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x49, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x65, 0xe4, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x48, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x90, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x49, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x65, 0xe4, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x48, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x90, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(24); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x4e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0x99, 0x64, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x49, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x0f, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x4e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0x99, 0x64, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x49, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x0f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(26); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x4f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x1f, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x4e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x4e, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x4f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x1f, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x4e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x4e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(28); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x4c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xe0, 0x2a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x4f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x17, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x4c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xe0, 0x2a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x4f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x17, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(30); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x4d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xaa, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x4c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x1b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x4d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xaa, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x4c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x1b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(32); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x52, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xac, 0x77, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x4d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xc1, 0x30, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x52, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xac, 0x77, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x4d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xc1, 0x30, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(34); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x53, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x3d, 0x19, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x52, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x22, 0xb7, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x53, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x3d, 0x19, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x52, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x22, 0xb7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(36); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x50, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0x00, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x53, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0x5a, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x50, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0x00, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x53, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0x5a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(38); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x51, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0xc8, 0x25, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x50, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x56, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x51, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0xc8, 0x25, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x50, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x56, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(40); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x56, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x4c, 0x1d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x51, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc9, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x56, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x4c, 0x1d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x51, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(42); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x57, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x2e, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x56, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x7d, 0x5e, 0x88, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x57, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x2e, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x56, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x7d, 0x5e, 0x88, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(44); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x54, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0x10, 0x80, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x57, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x92, 0x65, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x54, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0x10, 0x80, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x57, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x92, 0x65, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(46); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x55, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0xd8, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x54, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0xdd, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x55, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0xd8, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x54, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0xdd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(48); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x5a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x07, 0x31, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x55, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x42, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x5a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x07, 0x31, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x55, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x42, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(50); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x5b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0xe7, 0x68, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x5a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x41, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x5b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0xe7, 0x68, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x5a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x41, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(52); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x58, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0x27, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x5b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x7d, 0x38, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x58, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0x27, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x5b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x7d, 0x38, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(54); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x59, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0xfa, 0x03, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x58, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x14, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x59, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0xfa, 0x03, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x58, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x14, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(56); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x0d, 0xf2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x59, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x87, 0x8b, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x0d, 0xf2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x59, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x87, 0x8b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(58); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x5f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x73, 0x6d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xca, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x5f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x73, 0x6d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xca, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(60); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x5c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0x79, 0x5f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x5f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x93, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x5c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0x79, 0x5f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x5f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x93, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(62); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0xa1, 0x5f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x5c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x9f, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0xa1, 0x5f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x5c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x9f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(64); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x62, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xb1, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x00, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x62, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xb1, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x00, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(66); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x63, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x4a, 0x90, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x62, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x8f, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x63, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x4a, 0x90, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x62, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x8f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(68); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x60, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x31, 0xc2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x63, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x60, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x31, 0xc2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x63, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(70); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x61, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0xf9, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x60, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xda, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x61, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0xf9, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x60, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xda, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(72); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x66, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x21, 0xa7, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x61, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x45, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x66, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x21, 0xa7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x61, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x45, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(74); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x67, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0xe1, 0xa1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x66, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x51, 0x04, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x67, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0xe1, 0xa1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x66, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x51, 0x04, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(76); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x64, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0xa1, 0xc0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x67, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x64, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0xa1, 0xc0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x67, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(78); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x65, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0xbb, 0xff, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x64, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd4, 0x51, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x65, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0xbb, 0xff, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x64, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd4, 0x51, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(80); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x6a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x2f, 0xe6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x65, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xce, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x6a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x2f, 0xe6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x65, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xce, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(82); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x6b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x68, 0xbc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x6a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xcd, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x6b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x68, 0xbc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x6a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xcd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(84); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x68, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x86, 0x10, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x6b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x68, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x86, 0x10, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x6b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(86); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x69, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x05, 0xc2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x68, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x98, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x69, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x05, 0xc2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x68, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x98, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(88); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x6e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0xff, 0xb3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x69, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x02, 0xa1, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x6e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0xff, 0xb3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x69, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x02, 0xa1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(90); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x6f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0xb8, 0xf7, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x6e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xf6, 0xe0, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x6f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0xb8, 0xf7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x6e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xf6, 0xe0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(92); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x6c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x8c, 0x9e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x6f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5c, 0xb9, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x6c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x8c, 0x9e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x6f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5c, 0xb9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(94); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x6d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x5f, 0x10, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x6c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x73, 0xb5, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x6d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x5f, 0x10, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x6c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x73, 0xb5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(96); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x72, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0xed, 0x03, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x6d, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x8f, 0x02, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x72, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0xed, 0x03, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x6d, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x8f, 0x02, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(98); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x73, 0x21, 0xa8, 0x04, 0x03, 0x0b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x72, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x6c, 0x85, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x73, 0x21, 0xa8, 0x04, 0x03, 0x0b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x72, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x6c, 0x85, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(100); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x70, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xf9, 0x37, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x73, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xbe, 0xcf, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x70, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xf9, 0x37, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x73, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xbe, 0xcf, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(102); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x71, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0xd8, 0x24, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x70, 0xa1, 0x57, 0x54, 0x79, 0x23, 0x82, 0xcb, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x71, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0xd8, 0x24, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x70, 0xa1, 0x57, 0x54, 0x79, 0x23, 0x82, 0xcb, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(104); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x76, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x6f, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x71, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x76, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x6f, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x71, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(106); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x77, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xaa, 0xe5, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x76, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x77, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xaa, 0xe5, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x76, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(108); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x74, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x66, 0xe3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x77, 0xa1, 0x57, 0x54, 0x79, 0x20, 0x87, 0x2f, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x74, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x66, 0xe3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x77, 0xa1, 0x57, 0x54, 0x79, 0x20, 0x87, 0x2f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(110); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x75, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x21, 0x92, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x74, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xd5, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x75, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x21, 0x92, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x74, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xd5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(112); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x7a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xcb, 0x84, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x75, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x4a, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x7a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xcb, 0x84, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x75, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x4a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(114); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x7b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0x8d, 0x5b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x7a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x5c, 0x49, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x7b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0x8d, 0x5b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x7a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x5c, 0x49, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(116); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x78, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x32, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x7b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x10, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x78, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x32, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x7b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x10, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(118); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x79, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x23, 0x38, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x78, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x79, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x23, 0x38, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x78, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(120); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x7d, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xdf, 0xb8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x79, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb2, 0x83, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x7d, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xdf, 0xb8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x79, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb2, 0x83, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(122); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x7f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x59, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x7d, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xc2, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x7f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x59, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x7d, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xc2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(124); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x7c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xa6, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x7f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x9b, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x7c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xa6, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x7f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x9b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(126); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x7d, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xec, 0x2a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x7c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x97, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x7d, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xec, 0x2a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x7c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x97, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(128); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x02, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0x67, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x7d, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xee, 0xbc, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x02, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0x67, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x7d, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xee, 0xbc, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(130); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x03, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0xf6, 0x7d, 0x5d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x02, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x52, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x03, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0xf6, 0x7d, 0x5d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x02, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x52, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(132); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x00, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xcb, 0x7f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x03, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xce, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x00, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xcb, 0x7f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x03, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xce, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(134); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x01, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x03, 0x41, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x00, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xc2, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x01, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x03, 0x41, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x00, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xc2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(136); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x06, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x87, 0x79, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x01, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x06, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x87, 0x79, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x01, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(138); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x07, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0xe5, 0xe1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x06, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x07, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0xe5, 0xe1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x06, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(140); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x04, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xdb, 0xe4, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x07, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xe2, 0xf1, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x04, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xdb, 0xe4, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x07, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xe2, 0xf1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(142); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x05, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x33, 0xda, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x04, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x49, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x05, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x33, 0xda, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x04, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x49, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(144); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x0a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0xcc, 0x55, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x05, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x0a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0xcc, 0x55, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x05, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(146); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x0b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x2c, 0x0c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x0a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x19, 0xd5, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x0b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x2c, 0x0c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x0a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x19, 0xd5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(148); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x08, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xec, 0xf2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x0b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb3, 0x8c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x08, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xec, 0xf2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x0b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb3, 0x8c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(150); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x09, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x31, 0x67, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x08, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9c, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x09, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x31, 0x67, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x08, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9c, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(152); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x0e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0xc6, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x09, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf7, 0x1f, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x0e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0xc6, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x09, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf7, 0x1f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(154); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x0f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0xb8, 0x09, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x0e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x5e, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x0f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0xb8, 0x09, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x0e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x5e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(156); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x0c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xb2, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x0f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x07, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x0c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xb2, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x0f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x07, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(158); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x0d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x6a, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x0c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x86, 0x0b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x0d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x6a, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x0c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x86, 0x0b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(160); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x12, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0x01, 0x93, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x0d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xed, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x12, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0x01, 0x93, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x0d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xed, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(162); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x7d, 0x33, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0xfa, 0x9c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x12, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x7d, 0x33, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x7d, 0x33, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0xfa, 0x9c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x12, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x7d, 0x33, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(164); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x10, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x81, 0xce, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x7d, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa4, 0x4a, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x10, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x81, 0xce, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x7d, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa4, 0x4a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(166); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x7d, 0x31, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0xf0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x10, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x46, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x7d, 0x31, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0xf0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x10, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x46, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(168); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x16, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x91, 0xab, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x7d, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd9, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x16, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x91, 0xab, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x7d, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(170); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x17, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x51, 0xad, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x16, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x14, 0x98, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x17, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x51, 0xad, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x16, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x14, 0x98, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(172); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x14, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x7d, 0x31, 0xcc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x17, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x14, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x7d, 0x31, 0xcc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x17, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(174); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x15, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x0b, 0xf3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x14, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xcd, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x15, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x0b, 0xf3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x14, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xcd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(176); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x7d, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x9f, 0xea, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x15, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x7d, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x9f, 0xea, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x15, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(178); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x1b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0xd8, 0xb0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x7d, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x51, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x1b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0xd8, 0xb0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x7d, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x51, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(180); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x7d, 0x38, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x36, 0x1c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x1b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x08, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x7d, 0x38, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x36, 0x1c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x1b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x08, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(182); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x19, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x81, 0xa3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x7d, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x31, 0x5f, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x19, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x81, 0xa3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x7d, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x31, 0x5f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(184); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x1e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x7b, 0xd2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x19, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x47, 0x3d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x1e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x7b, 0xd2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x19, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x47, 0x3d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(186); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x1f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x3c, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x1e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x7c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x1f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x3c, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x1e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x7c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(188); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x1c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x08, 0xff, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x1f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x19, 0x25, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x1c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x08, 0xff, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x1f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x19, 0x25, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(190); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x1d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x05, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x1c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x36, 0x29, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x1d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x05, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x1c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x36, 0x29, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(192); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x22, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x8b, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x1d, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x9c, 0x0b, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x22, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x8b, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x1d, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x9c, 0x0b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(194); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x23, 0x21, 0x57, 0x54, 0x3d, 0x08, 0x73, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x22, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x4a, 0x84, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x23, 0x21, 0x57, 0x54, 0x3d, 0x08, 0x73, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x22, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x4a, 0x84, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(196); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x20, 0x21, 0x57, 0x54, 0x3d, 0x07, 0xcd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x23, 0xa5, 0x57, 0x54, 0x3d, 0x15, 0xc3, 0xc8, 0x7e, 0x22, 0x23, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xb7, 0xaf, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x20, 0x21, 0x57, 0x54, 0x3d, 0x07, 0xcd, 0x7e }); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x23, 0xa5, 0x57, 0x54, 0x3d, 0x15, 0xc3, 0xc8, 0x7e, 0x22, 0x23, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xb7, 0xaf, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(199); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x21, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0x7c, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x20, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x2c, 0x2e, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x21, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0x7c, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x20, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x2c, 0x2e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(201); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x26, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x25, 0x0b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x21, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x6f, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x26, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x25, 0x0b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x21, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(203); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x27, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x76, 0x39, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x26, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x34, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x27, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x76, 0x39, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x26, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x34, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(205); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x24, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0x9b, 0x91, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x27, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x9b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x24, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0x9b, 0x91, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x27, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x9b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(207); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x25, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0xe3, 0x22, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x24, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x61, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x25, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0xe3, 0x22, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x24, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x61, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(209); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x2a, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0xc2, 0x67, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x25, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xe4, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x2a, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0xc2, 0x67, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x25, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xe4, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(211); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x2b, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xd2, 0xaa, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x2a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xfd, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x2b, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xd2, 0xaa, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x2a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xfd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(213); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x28, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xbc, 0x2f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x2b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x28, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xbc, 0x2f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x2b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(215); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x29, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0xb7, 0x0e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x28, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa8, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x29, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0xb7, 0x0e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x28, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(217); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x2e, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0xde, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x29, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x2d, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x2e, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0xde, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x29, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x2d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(219); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x2f, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xc6, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x2e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x76, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x2f, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xc6, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x2e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x76, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(221); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x2c, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x68, 0xbb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x2f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd9, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x2c, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x68, 0xbb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x2f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(223); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x2d, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0x23, 0x37, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x2c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x2d, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0x23, 0x37, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x2c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(225); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x32, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0x32, 0x6b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x2d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa6, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x32, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0x32, 0x6b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x2d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(227); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x33, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xf3, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x32, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x3b, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x33, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xf3, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x32, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x3b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(229); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x30, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x4a, 0xb1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x30, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x4a, 0xb1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(231); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x31, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xc3, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x30, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x6e, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x31, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xc3, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x30, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x6e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(233); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x36, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x73, 0xd6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xeb, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x36, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x73, 0xd6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xeb, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(235); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x37, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x7d, 0x33, 0xef, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x36, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa1, 0xb0, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x37, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x7d, 0x33, 0xef, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x36, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa1, 0xb0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(237); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x34, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x59, 0x2d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x37, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x65, 0x1f, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x34, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x59, 0x2d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x37, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x65, 0x1f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(239); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x35, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xd3, 0x9d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x34, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x24, 0xe5, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x35, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xd3, 0x9d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x34, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x24, 0xe5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(241); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x5d, 0x97, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x35, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x60, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x5d, 0x97, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x35, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x60, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(243); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x3b, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x58, 0xc3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x79, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x3b, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x58, 0xc3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x79, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(245); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x38, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x90, 0xc0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x3b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x38, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x90, 0xc0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x3b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(247); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x39, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xe4, 0x8b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x2c, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x39, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xe4, 0x8b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x2c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(249); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x3e, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x41, 0xf0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x39, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa9, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x3e, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x41, 0xf0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x39, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(251); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x3f, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x52, 0x00, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x3e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xf2, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x3f, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x52, 0x00, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x3e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xf2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(253); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x3c, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x04, 0xc5, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x3f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x3c, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x04, 0xc5, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x3f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(255); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x3d, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xba, 0x42, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x3c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x3d, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xba, 0x42, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x3c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(257); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xc2, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x49, 0xfb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x3d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x22, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xc2, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x49, 0xfb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x3d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x22, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(259); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xc3, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xe5, 0x3c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xc2, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x2a, 0x87, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xc3, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xe5, 0x3c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xc2, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x2a, 0x87, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(261); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xc0, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x36, 0x69, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xc3, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xee, 0x28, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xc0, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x36, 0x69, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xc3, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xee, 0x28, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(263); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xc1, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0xf9, 0x8e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xc0, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xaf, 0xd2, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xc1, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0xf9, 0x8e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xc0, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xaf, 0xd2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(265); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xc6, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0x5e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xc1, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x77, 0x57, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xc6, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0x5e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xc1, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x77, 0x57, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(267); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xc7, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x75, 0x04, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xc6, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x30, 0x0c, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xc7, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x75, 0x04, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xc6, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x30, 0x0c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(269); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xc4, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x9d, 0x58, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xc7, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf4, 0xa3, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xc4, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x9d, 0x58, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xc7, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf4, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(271); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xc5, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x69, 0x8c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xc4, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb5, 0x59, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xc5, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x69, 0x8c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xc4, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb5, 0x59, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(273); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xca, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x15, 0x87, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xc5, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x6d, 0xdc, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xca, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x15, 0x87, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xc5, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x6d, 0xdc, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(275); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xcb, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x7b, 0x45, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xca, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x27, 0xc5, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xcb, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x7b, 0x45, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xca, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x27, 0xc5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(277); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xc8, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x14, 0x45, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xcb, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe3, 0x6a, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xc8, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x14, 0x45, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xcb, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe3, 0x6a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(279); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xc9, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x4e, 0x5c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xc8, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa2, 0x90, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xc9, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x4e, 0x5c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xc8, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa2, 0x90, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(281); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xce, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0xe9, 0x4e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xc9, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7a, 0x15, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xce, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0xe9, 0x4e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xc9, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7a, 0x15, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(283); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xcf, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x30, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xce, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x20, 0xb3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xcf, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x30, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xce, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x20, 0xb3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(285); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xcc, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x6c, 0x00, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xcf, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xe4, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xcc, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x6c, 0x00, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xcf, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xe4, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(287); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xcd, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x4c, 0x8f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xcc, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xa5, 0xe6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xcd, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x4c, 0x8f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xcc, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xa5, 0xe6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(289); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xd2, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x84, 0xfe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xcd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x7d, 0x5d, 0x63, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xd2, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x84, 0xfe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xcd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x7d, 0x5d, 0x63, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(291); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xd3, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x33, 0x57, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xd2, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0x0d, 0x8d, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xd3, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x33, 0x57, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xd2, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0x0d, 0x8d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(293); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xd0, 0x21, 0x57, 0x54, 0x3d, 0x7d, 0x5d, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xd3, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0xc9, 0x22, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xd0, 0x21, 0x57, 0x54, 0x3d, 0x7d, 0x5d, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xd3, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0xc9, 0x22, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(295); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xd1, 0x21, 0x57, 0x54, 0x3d, 0x05, 0xaf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xd0, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0xbd, 0x92, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xd1, 0x21, 0x57, 0x54, 0x3d, 0x05, 0xaf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xd0, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0xbd, 0x92, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(297); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xd6, 0x21, 0x57, 0x54, 0x32, 0x93, 0xa8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xd1, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x65, 0x17, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xd6, 0x21, 0x57, 0x54, 0x32, 0x93, 0xa8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xd1, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x65, 0x17, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(299); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xd7, 0x21, 0x57, 0x54, 0x32, 0xed, 0x9d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xd6, 0xa1, 0x57, 0x54, 0x32, 0x17, 0x6c, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xd7, 0x21, 0x57, 0x54, 0x32, 0xed, 0x9d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xd6, 0xa1, 0x57, 0x54, 0x32, 0x17, 0x6c, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(301); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xd4, 0x21, 0x57, 0x54, 0x32, 0x69, 0x63, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xd7, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xa8, 0x08, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xd4, 0x21, 0x57, 0x54, 0x32, 0x69, 0x63, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xd7, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xa8, 0x08, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(303); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xd5, 0x21, 0x57, 0x54, 0x3d, 0xe0, 0x7d, 0x38, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xd4, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xe9, 0xf2, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xd5, 0x21, 0x57, 0x54, 0x3d, 0xe0, 0x7d, 0x38, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xd4, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xe9, 0xf2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(305); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xda, 0x21, 0x57, 0x54, 0x3d, 0x85, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xd5, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x7f, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xda, 0x21, 0x57, 0x54, 0x3d, 0x85, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xd5, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x7f, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(307); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xdb, 0x21, 0x57, 0x54, 0x32, 0x0a, 0x07, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xda, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x35, 0x85, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xdb, 0x21, 0x57, 0x54, 0x32, 0x0a, 0x07, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xda, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x35, 0x85, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(309); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xd8, 0x21, 0x57, 0x54, 0x32, 0x8e, 0xf9, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xdb, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xbf, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xd8, 0x21, 0x57, 0x54, 0x32, 0x8e, 0xf9, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xdb, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xbf, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(311); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xd9, 0x21, 0x57, 0x54, 0x0a, 0x41, 0x36, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xd8, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xfe, 0x3b, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xd9, 0x21, 0x57, 0x54, 0x0a, 0x41, 0x36, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xd8, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xfe, 0x3b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(313); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xde, 0x21, 0x57, 0x54, 0x32, 0x91, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xd9, 0xa1, 0x57, 0x54, 0x0a, 0x15, 0x8a, 0xc0, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xde, 0x21, 0x57, 0x54, 0x32, 0x91, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xd9, 0xa1, 0x57, 0x54, 0x0a, 0x15, 0x8a, 0xc0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(315); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xdf, 0x21, 0x57, 0x54, 0x32, 0xef, 0xb0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xde, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0x01, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xdf, 0x21, 0x57, 0x54, 0x32, 0xef, 0xb0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xde, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0x01, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(317); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xdf, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0xc5, 0x8c, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xdf, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0xc5, 0x8c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(318); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x60, 0xdc, 0x21, 0x57, 0x54, 0x32, 0xa3, 0x0f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x76, 0xdf, 0xb1, 0x57, 0x54, 0x33, 0x84, 0x16, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x60, 0xdc, 0x21, 0x57, 0x54, 0x32, 0xa3, 0x0f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x76, 0xdf, 0xb1, 0x57, 0x54, 0x33, 0x84, 0x16, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(320); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x71, 0xdd, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x4f, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x07, 0xdc, 0xa1, 0x57, 0x54, 0x32, 0x15, 0x40, 0x93, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x71, 0xdd, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x4f, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x07, 0xdc, 0xa1, 0x57, 0x54, 0x32, 0x15, 0x40, 0x93, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(322); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x02, 0xe2, 0x21, 0x57, 0x54, 0x7f, 0x10, 0xe2, 0x51, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x10, 0xdd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x50, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x02, 0xe2, 0x21, 0x57, 0x54, 0x7f, 0x10, 0xe2, 0x51, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x10, 0xdd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x50, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(324); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); /* Note: stage 325->326 is directly coded inside class GPRecvSensorMeasurementTest above, it is not using the raw buffer automatic comparison trigger-based transition matching */ stageExpectedTransitions.push_back({}); /* Add an empty cell in the expected transitions (won't be used for comparison, but is required to get the stage indexes right in the next lines) */ - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xe2, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5b, 0xff, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xe2, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5b, 0xff, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(326); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); /* Note: stage 327->328 is directly coded inside class GPRecvSensorMeasurementTest above, it is not using the raw buffer automatic comparison trigger-based transition matching */ stageExpectedTransitions.push_back({}); /* Add an empty cell in the expected transitions (won't be used for comparison, but is required to get the stage indexes right in the next lines) */ - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x32, 0xe3, 0xa1, 0x57, 0x54, 0x42, 0x15, 0x82, 0x6f, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x32, 0xe3, 0xa1, 0x57, 0x54, 0x42, 0x15, 0x82, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(328); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(331); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(333); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(335); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(337); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x72, 0xe5, 0x21, 0x57, 0x54, 0x40, 0x16, 0xa6, 0xb3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x17, 0xe4, 0xa1, 0x57, 0x54, 0x0c, 0xd1, 0x87, 0x6b, 0x6a, 0xb5, 0xba, 0x57, 0xc5, 0xb3, 0x8e, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x72, 0xe5, 0x21, 0x57, 0x54, 0x40, 0x16, 0xa6, 0xb3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x17, 0xe4, 0xa1, 0x57, 0x54, 0x0c, 0xd1, 0x87, 0x6b, 0x6a, 0xb5, 0xba, 0x57, 0xc5, 0xb3, 0x8e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(339); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x03, 0xea, 0x21, 0x57, 0x54, 0x60, 0x15, 0x69, 0x35, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x20, 0xe5, 0xa1, 0x57, 0x54, 0x40, 0x15, 0xb1, 0x59, 0x97, 0x14, 0x5a, 0xc6, 0xf9, 0x9f, 0x59, 0xcf, 0xee, 0x84, 0x4d, 0xcc, 0x5f, 0x69, 0x6a, 0xe0, 0x3a, 0x61, 0x89, 0xfc, 0x7d, 0x5e, 0x3f, 0xa7, 0xeb, 0xcd, 0xde, 0x6f, 0x8f, 0xff, 0xc7, 0xdb, 0xd5, 0xd2, 0x69, 0x71, 0x7d, 0x31, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x03, 0xea, 0x21, 0x57, 0x54, 0x60, 0x15, 0x69, 0x35, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x20, 0xe5, 0xa1, 0x57, 0x54, 0x40, 0x15, 0xb1, 0x59, 0x97, 0x14, 0x5a, 0xc6, 0xf9, 0x9f, 0x59, 0xcf, 0xee, 0x84, 0x4d, 0xcc, 0x5f, 0x69, 0x6a, 0xe0, 0x3a, 0x61, 0x89, 0xfc, 0x7d, 0x5e, 0x3f, 0xa7, 0xeb, 0xcd, 0xde, 0x6f, 0x8f, 0xff, 0xc7, 0xdb, 0xd5, 0xd2, 0x69, 0x71, 0x7d, 0x31, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(341); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xa1, 0x57, 0x54, 0x60, 0x86, 0x33, 0x2e, 0x94, 0x4a, 0x24, 0xda, 0x55, 0x62, 0x4f, 0x9c, 0x4e, 0x2b, 0x93, 0xed, 0xe6, 0xc6, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xa1, 0x57, 0x54, 0x60, 0x86, 0x33, 0x2e, 0x94, 0x4a, 0x24, 0xda, 0x55, 0x62, 0x4f, 0x9c, 0x4e, 0x2b, 0x93, 0xed, 0xe6, 0xc6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(342); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0x15, 0x7d, 0x33, 0x4d, 0xa6, 0x94, 0x4a, 0x7d, 0x33, 0xaa, 0x54, 0x92, 0x49, 0x99, 0x4e, 0x27, 0xa1, 0xed, 0xce, 0x67, 0x1d, 0xdd, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0x15, 0x7d, 0x33, 0x4d, 0xa6, 0x94, 0x4a, 0x7d, 0x33, 0xaa, 0x54, 0x92, 0x49, 0x99, 0x4e, 0x27, 0xa1, 0xed, 0xce, 0x67, 0x1d, 0xdd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(343); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd2, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x00, 0x30, 0xc2, 0x63, 0x29, 0xf7, 0x2d, 0xa6, 0x35, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x10, 0xf3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd2, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x00, 0x30, 0xc2, 0x63, 0x29, 0xf7, 0x2d, 0xa6, 0x35, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x10, 0xf3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(344); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd5, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x07, 0x30, 0xc2, 0x63, 0x29, 0x98, 0xd8, 0x54, 0x9a, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x35, 0xc4, 0x15, 0x72, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd5, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x07, 0x30, 0xc2, 0x63, 0x29, 0x98, 0xd8, 0x54, 0x9a, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x35, 0xc4, 0x15, 0x72, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(345); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x35, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe7, 0x7b, 0xc5, 0x63, 0x29, 0x61, 0x6f, 0x89, 0x03, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9b, 0x16, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x35, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe7, 0x7b, 0xc5, 0x63, 0x29, 0x61, 0x6f, 0x89, 0x03, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9b, 0x16, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(346); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x3f, 0xf2, 0x94, 0x48, 0x25, 0xfb, 0x54, 0x90, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x20, 0x2d, 0xc2, 0x63, 0x29, 0xc3, 0xda, 0xbe, 0x01, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0xa1, 0xda, 0xe6, 0xe6, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x3f, 0xf2, 0x94, 0x48, 0x25, 0xfb, 0x54, 0x90, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x20, 0x2d, 0xc2, 0x63, 0x29, 0xc3, 0xda, 0xbe, 0x01, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0xa1, 0xda, 0xe6, 0xe6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(347); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd7, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x05, 0x30, 0xc2, 0x63, 0x29, 0x8e, 0x2d, 0x37, 0xda, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x30, 0xc4, 0xf0, 0x6c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd7, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x05, 0x30, 0xc2, 0x63, 0x29, 0x8e, 0x2d, 0x37, 0xda, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x30, 0xc4, 0xf0, 0x6c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(348); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x28, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xfa, 0x7b, 0xc5, 0x63, 0x29, 0xaf, 0xba, 0xab, 0x67, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x36, 0x3a, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x28, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xfa, 0x7b, 0xc5, 0x63, 0x29, 0xaf, 0xba, 0xab, 0x67, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x36, 0x3a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(349); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x34, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe6, 0x7b, 0xc5, 0x63, 0x29, 0x5d, 0x1f, 0x36, 0x6d, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9c, 0xd8, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x34, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe6, 0x7b, 0xc5, 0x63, 0x29, 0x5d, 0x1f, 0x36, 0x6d, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9c, 0xd8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(350); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd6, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x04, 0x30, 0xc2, 0x63, 0x29, 0x8f, 0x49, 0xdb, 0x2f, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x8c, 0x2a, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd6, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x04, 0x30, 0xc2, 0x63, 0x29, 0x8f, 0x49, 0xdb, 0x2f, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x8c, 0x2a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(351); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2b, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf9, 0x7b, 0xc5, 0x63, 0x29, 0x41, 0xca, 0x70, 0x14, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x7d, 0x33, 0x9a, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2b, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf9, 0x7b, 0xc5, 0x63, 0x29, 0x41, 0xca, 0x70, 0x14, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x7d, 0x33, 0x9a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(352); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x67, 0x37, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe5, 0x7b, 0xc5, 0x63, 0x29, 0xa3, 0x70, 0x6c, 0x24, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x5a, 0x0d, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x67, 0x37, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe5, 0x7b, 0xc5, 0x63, 0x29, 0xa3, 0x70, 0x6c, 0x24, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x5a, 0x0d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(353); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdd, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0f, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x38, 0xa9, 0x7d, 0x3a, 0x7d, 0x38, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x62, 0x0f, 0x7e, 0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdc, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0e, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0xfd, 0x23, 0x4c, 0x9b, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x25, 0xda, 0x7d, 0x31, 0x6f, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdd, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0f, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x38, 0xa9, 0x7d, 0x3a, 0x7d, 0x38, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x62, 0x0f, 0x7e, 0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdc, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0e, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0xfd, 0x23, 0x4c, 0x9b, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x25, 0xda, 0x7d, 0x31, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(355); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xc8, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x7d, 0x3a, 0x30, 0xc2, 0x63, 0x29, 0xc5, 0x7c, 0xd6, 0x0d, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc3, 0xde, 0xc7, 0xf4, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xc8, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x7d, 0x3a, 0x30, 0xc2, 0x63, 0x29, 0xc5, 0x7c, 0xd6, 0x0d, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc3, 0xde, 0xc7, 0xf4, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(356); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xcb, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x19, 0x30, 0xc2, 0x63, 0x29, 0xb4, 0x30, 0x8c, 0xb4, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x33, 0xc4, 0x34, 0x48, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xcb, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x19, 0x30, 0xc2, 0x63, 0x29, 0xb4, 0x30, 0x8c, 0xb4, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x33, 0xc4, 0x34, 0x48, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(357); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2a, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf8, 0x7b, 0xc5, 0x63, 0x29, 0xdd, 0xb9, 0x2b, 0xe3, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x93, 0x35, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2a, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf8, 0x7b, 0xc5, 0x63, 0x29, 0xdd, 0xb9, 0x2b, 0xe3, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x93, 0x35, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(358); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x36, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe4, 0x7b, 0xc5, 0x63, 0x29, 0x45, 0xfa, 0x80, 0x85, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0xab, 0xb1, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x36, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe4, 0x7b, 0xc5, 0x63, 0x29, 0x45, 0xfa, 0x80, 0x85, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0xab, 0xb1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(359); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdf, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0d, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x19, 0x0c, 0xa3, 0xa5, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x88, 0x16, 0x7e, 0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xde, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0c, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x50, 0x67, 0xd6, 0xf1, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x23, 0xda, 0x5d, 0xf8, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdf, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0d, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x19, 0x0c, 0xa3, 0xa5, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x88, 0x16, 0x7e, 0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xde, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0c, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x50, 0x67, 0xd6, 0xf1, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x23, 0xda, 0x5d, 0xf8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(361); From 30e98d484543742e22a27a9fdf9800b4489fd9ce Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 10 Dec 2019 14:55:24 +0100 Subject: [PATCH 003/413] [build] new Makefiles --- Makefile | 7 - build/raritan.mk | 7 + build/scripts.mk | 716 +++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile | 166 ++++------- 4 files changed, 780 insertions(+), 116 deletions(-) delete mode 100644 Makefile create mode 100644 build/raritan.mk create mode 100644 build/scripts.mk diff --git a/Makefile b/Makefile deleted file mode 100644 index 864c8c71..00000000 --- a/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -include ../Config.mk - -SUBDIRS = src - - -include $(PP_BUILD_SYS_DIR)/Top.mk - diff --git a/build/raritan.mk b/build/raritan.mk new file mode 100644 index 00000000..2d25d8ee --- /dev/null +++ b/build/raritan.mk @@ -0,0 +1,7 @@ +include ../../Config.mk + +SUBDIRS = ../src + + +include $(PP_BUILD_SYS_DIR)/Top.mk + diff --git a/build/scripts.mk b/build/scripts.mk new file mode 100644 index 00000000..f8dcec48 --- /dev/null +++ b/build/scripts.mk @@ -0,0 +1,716 @@ +makemore:=$(lastword $(MAKEFILE_LIST)) +MAKEFLAGS+=--no-print-directory +ifeq ($(inside_makemore),) +inside_makemore:=yes +## +# debug tools +## +V=0 +ifeq ($(V),1) +quiet= +Q= +else +quiet=quiet_ +Q=@ +endif +echo-cmd = $(if $($(quiet)cmd_$(1)), echo ' $($(quiet)cmd_$(1))';) +cmd = $(echo-cmd) $(cmd_$(1)) + +## +# file extention definition +bin-ext= +slib-ext=a +dlib-ext=so +makefile-ext=mk + +## +# make file with targets definition +## +bin-y:= +sbin-y:= +lib-y:= +slib-y:= +modules-y:= +modules-y:= +data-y:= +hostbin-y:= + +srcdir?=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) +file?=$(notdir $(firstword $(MAKEFILE_LIST))) + +#ifneq ($(findstring -arch,$(CFLAGS)),) +#ARCH=$(shell echo $(CFLAGS) 2>&1 | $(AWK) 'BEGIN {FS="[- ]"} {print $$2}') +#buildpath=$(join $(srcdir),$(ARCH)) +#endif +ifneq ($(BUILDDIR),) + builddir=$(BUILDDIR:%/=%)/ + buildpath:=$(if $(wildcard $(addprefix /.,$(builddir))),$(builddir),$(join $(srcdir),$(builddir))) +else + builddir=$(srcdir) +endif + +# CONFIG could define LD CC or/and CFLAGS +# CONFIG must be included before "Commands for build and link" +VERSIONFILE?=version +DEFCONFIG?=$(srcdir)defconfig + +CONFIG?=.config +ifneq ($(wildcard $(builddir)$(CONFIG)),) +include $(builddir)$(CONFIG) +CONFIGFILE=$(buidldir)$(CONFIG) +$(eval NOCONFIGS:=$(shell awk '/^# .* is not set/{print $$2}' $(builddir)$(CONFIG))) +$(foreach config,$(NOCONFIGS),$(eval $(config)=n) ) +endif + +CONFIGURE_STATUS:=.config.cache +ifneq ($(wildcard $(builddir)$(CONFIGURE_STATUS)),) +include $(builddir)$(CONFIGURE_STATUS) +CONFIGFILE=$(buidldir)$(CONFIGURE_STATUS) +endif + +ifneq ($(file),) + include $(file) +endif + +ifneq ($(buildpath),) + obj=$(addprefix $(buildpath),$(cwdir)) +else + ifneq ($(CROSS_COMPILE),) + buildpath:=$(builddir)$(CROSS_COMPILE:%-=%)/ + obj:=$(addprefix $(buildpath),$(cwdir)) + else + obj= + endif +endif +hostobj:=$(builddir)host/$(cwdir) + +PATH:=$(value PATH):$(hostobj) +TMPDIR:=/tmp +TESTFILE:=makemore_test +## +# default Macros for installation +## +# not set variable if not into the build step +AWK?=awk +GREP?=grep +RM?=rm -f +INSTALL?=install +INSTALL_PROGRAM?=$(INSTALL) -D +INSTALL_DATA?=$(INSTALL) -m 644 -D +PKGCONFIG?=pkg-config +YACC?=bison +MOC?=moc$(QT:%=-%) +UIC?=uic$(QT:%=-%) + +TOOLCHAIN?= +CROSS_COMPILE?= +CC?=gcc +CFLAGS?= +CXX?=g++ +CXXFLAGS?= +LD?=gcc +LDFLAGS?= +AR?=ar +RANLIB?=ranlib +HOSTCC?=$(CC) +HOSTCXX?=$(CXX) +HOSTLD?=$(LD) +HOSTAR?=$(AR) +HOSTRANLIB?=$(RANLIB) +HOSTCFLAGS?=$(CFLAGS) +HOSTLDFLAGS?=$(LDFLAGS) + +export PATH:=$(PATH):$(TOOLCHAIN):$(TOOLCHAIN)/bin +# if cc is a link on gcc, prefer to use directly gcc for ld +ifeq ($(CC),cc) + TARGETCC:=gcc +else + TARGETCC:=$(CC) +endif +TARGETLD:=$(LD) +TARGETAS:=$(AS) +TARGETCXX:=$(CXX) +TARGETAR:=$(AR) +TARGETRANLIB:=$(RANLIB) + +CCVERSION:=$(shell $(TARGETCC) -v 2>&1) +ifneq ($(dir $(TARGETCC)),./) + TARGETPREFIX= +else + ifneq ($(CROSS_COMPILE),) + ifeq ($(findstring $(CROSS_COMPILE),$(TARGETCC)),) + TARGETPREFIX=$(CROSS_COMPILE:%-=%)- + endif + else + TARGETPREFIX= + endif +endif +TARGETCC:=$(TARGETPREFIX)$(TARGETCC) +TARGETLD:=$(TARGETPREFIX)$(LD) +TARGETAS:=$(TARGETPREFIX)$(AS) +TARGETCXX:=$(TARGETPREFIX)$(CXX) +TARGETAR:=$(TARGETPREFIX)$(AR) +TARGETRANLIB:=$(TARGETPREFIX)$(RANLIB) + +ARCH?=$(shell LANG=C $(TARGETCC) -v 2>&1 | $(GREP) Target | $(AWK) 'BEGIN {FS="[- ]"} {print $$2}') +libsuffix=$(findstring 64,$(ARCH)) + +ifneq ($(PREFIX),) +prefix:=$(PREFIX) +endif +prefix?=/usr/local +prefix:=$(prefix:"%"=%) +exec_prefix?=$(prefix) +program_prefix?= +library_prefix?=lib +bindir?=$(exec_prefix)/bin +bindir:=$(bindir:"%"=%) +sbindir?=$(exec_prefix)/sbin +sbindir:=$(sbindir:"%"=%) +libdir?=$(word 1,$(wildcard $(exec_prefix)/lib$(libsuffix) $(exec_prefix)/lib)) +libdir:=$(if $(libdir), $(libdir),$(exec_prefix)/lib) +libdir:=$(libdir:"%"=%) +sysconfdir?=$(prefix)/etc +sysconfdir:=$(sysconfdir:"%"=%) +includedir?=$(prefix)/include +includedir:=$(includedir:"%"=%) +datadir?=$(prefix)/share/$(package:"%"=%) +datadir:=$(datadir:"%"=%) +pkgdatadir?=$(datadir:"%"=%) +pkglibdir?=$(libdir)/$(package:"%"=%) +pkglibdir:=$(pkglibdir:"%"=%) + +ifneq ($(SYSROOT),) +sysroot:=$(patsubst "%",%,$(SYSROOT:%/=%)/) +TARGETPATHPREFIX=$(sysroot) +SYSROOT_CFLAGS+=--sysroot=$(sysroot) +SYSROOT_CFLAGS+=-isysroot $(sysroot) +SYSROOT_LDFLAGS+=--sysroot=$(sysroot) +else +sysroot:= +TARGETPATHPREFIX= = +endif + +#CFLAGS+=$(foreach macro,$(DIRECTORIES_LIST),-D$(macro)=\"$($(macro))\") +LIBRARY+= +LDFLAGS+= + +ifneq ($(strip $(includedir)),) +SYSROOT_CFLAGS+=-I$(TARGETPATHPREFIX)$(strip $(includedir)) +ifneq ($(DESTDIR),) +SYSROOT_CFLAGS+=-I$(DESTDIR)$(strip $(includedir)) +endif +endif +ifneq ($(strip $(libdir)),) +RPATHFLAGS+=-Wl,-rpath,$(strip $(libdir)) +SYSROOT_LDFLAGS+=-L$(TARGETPATHPREFIX)$(strip $(libdir)) +ifneq ($(DESTDIR),) +SYSROOT_LDFLAGS+=-L$(DESTDIR)$(strip $(libdir)) +endif +endif +ifneq ($(strip $(pkglibdir)),) +RPATHFLAGS+=-Wl,-rpath,$(strip $(pkglibdir)) +SYSROOT_LDFLAGS+=-L$(TARGETPATHPREFIX)$(strip $(pkglibdir)) +ifneq ($(DESTDIR),) +SYSROOT_LDFLAGS+=-L$(DESTDIR)$(strip $(pkglibdir)) +endif +endif + +INTERN_CFLAGS+=-I. +INTERN_CXXFLAGS+=-I. +INTERN_LDFLAGS+=-L. +ifneq ($(obj),) +INTERN_LDFLAGS+=-L$(obj) +endif +ifneq ($(hostobj),) +INTERN_LDFLAGS+=-L$(hostobj) +endif +ifneq ($(src),) +INTERN_CFLAGS+=-I$(src) +INTERN_CXXFLAGS+=-I$(src) +endif +INTERN_CFLAGS+=-include $(builddir)$(VERSIONFILE:%=%.h) +ifneq ($(wildcard $(builddir)config.h),) +INTERN_CFLAGS+=-include $(builddir)config.h +endif + +export package version prefix bindir sbindir libdir includedir datadir pkglibdir srcdir builddir sysconfdir + +## +# objects recipes generation +## +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)_SOURCES+=$(patsubst %.hpp,%.moc.cpp,$($(t)_QTHEADERS) $($(t)_QTHEADERS-y)))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $(findstring .cpp, $(notdir $($(t)_SOURCES))), $(eval $(t)_LIBRARY+=stdc++))) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)-objs+=$(patsubst %.s,%.o,$(patsubst %.S,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))))) +target-objs:=$(foreach t, $(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $($(t)-objs), $(addprefix $(obj),$($(t)-objs)), $(obj)$(t).o)) + +$(foreach t,$(hostbin-y), $(eval $(t)-objs:=$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))) +$(foreach t,$(hostslib-y), $(eval $(t)-objs:=$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))) +target-hostobjs:=$(foreach t, $(hostbin-y) $(hostslib-y), $(if $($(t)-objs), $(addprefix $(hostobj)/,$($(t)-objs)), $(hostobj)/$(t).o)) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBS+=$($(s:%.c=%)_LIBS)) )) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBS+=$($(s:%.cpp=%)_LIBS)) )) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBRARY+=$($(s:%.c=%)_LIBRARY)) )) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBRARY+=$($(s:%.cpp=%)_LIBRARY)) )) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CFLAGS+=$($(t)_CFLAGS-y))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CXXFLAGS+=$($(t)_CXXFLAGS-y))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LDFLAGS+=$($(t)_LDFLAGS-y))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LIBS+=$($(t)_LIBS-y))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LIBRARY+=$($(t)_LIBRARY-y))) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CFLAGS+=$(INTERN_CFLAGS))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LDFLAGS+=$(INTERN_LDFLAGS))) + +$(foreach t,$(slib-y) $(lib-y),$(eval include-y+=$($(t)_HEADERS))) + +# LIBRARY contains libraries name to check +# The name may terminate with {} informations like LIBRARY+=usb{1.0} +# Here the commands remove the informations and store the name into LIBS +# After LIBS contains all libraries name to link +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) )) +$(foreach l, $(LIBRARY),$(eval LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) ) + +$(foreach l, $(LIBS),$(eval CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null) ) ) +$(foreach l, $(LIBS),$(eval LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) ) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null)))) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) )) + +# set the CFLAGS of each source file +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(s:%.c=%)_CFLAGS+=$($(t)_CFLAGS)) )) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(s:%.cpp=%)_CFLAGS+=$($(t)_CFLAGS)) )) + +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LDFLAGS+=$($(s:%.c=%)_LDFLAGS)) )) +$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LDFLAGS+=$($(s:%.cpp=%)_LDFLAGS)) )) + +# The Dynamic_Loader library (libdl) allows to load external libraries. +# If this libraries has to link to the binary functions, +# this binary has to export the symbol with -rdynamic flag +$(foreach t,$(bin-y) $(sbin-y),$(if $(findstring dl, $($(t)_LIBS) $(LIBS)),$(eval $(t)_LDFLAGS+=-rdynamic))) + +## +# targets recipes generation +## +ifeq (STATIC,y) +lib-static-target:=$(addprefix $(obj),$(addsuffix $(slib-ext:%=.%),$(addprefix $(library_prefix),$(slib-y) $(lib-y)))) +else +lib-static-target:=$(addprefix $(obj),$(addsuffix $(slib-ext:%=.%),$(addprefix $(library_prefix),$(slib-y)))) +lib-dynamic-target:=$(addprefix $(obj),$(addsuffix $(dlib-ext:%=.%),$(addprefix $(library_prefix),$(lib-y)))) +endif +modules-target:=$(addprefix $(obj),$(addsuffix $(dlib-ext:%=.%),$(modules-y))) +bin-target:=$(addprefix $(obj),$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(bin-y) $(sbin-y)))) +hostslib-target:=$(addprefix $(hostobj),$(addsuffix $(slib-ext:%=.%),$(addprefix lib,$(hostslib-y)))) +hostbin-target:=$(addprefix $(hostobj),$(addsuffix $(bin-ext:%=.%),$(hostbin-y))) + +#create subproject +$(foreach t,$(subdir-y),$(eval $(t)_CONFIGURE+=$($(t)_CONFIGURE-y))) +$(foreach t,$(subdir-y),$(if $($(t)_CONFIGURE), $(eval subdir-project+=$(t)))) +subdir-y:=$(filter-out $(subdir-project),$(subdir-y)) + +#dispatch from subdir-y to directory paths and makefile paths +subdir-dir:=$(foreach dir,$(subdir-y),$(filter-out %$(makefile-ext:%=.%), $(filter-out %Makefile, $(dir)))) +subdir-files:=$(foreach dir,$(subdir-y),$(filter %$(makefile-ext:%=.%),$(dir)) $(filter %Makefile, $(dir))) + +#target each Makefile in directories +subdir-target:=$(wildcard $(addsuffix /Makefile,$(subdir-dir:%/.=%))) +subdir-target+=$(wildcard $(subdir-files)) + +#download-target+=$(foreach dl,$(download-y),$(DL)/$(dl)/$($(dl)_SOURCE)) +$(foreach dl,$(download-y),$(if $(findstring git,$($(dl)_SITE_METHOD)),$(eval gitclone-target+=$(dl)),$(eval download-target+=$(dl)))) + +objdir:=$(sort $(dir $(target-objs))) + +hostobjdir:=$(sort $(dir $(target-hostobjs))) + +targets:= +targets+=$(lib-dynamic-target) +targets+=$(modules-target) +targets+=$(lib-static-target) +targets+=$(bin-target) + +ifneq ($(CROSS_COMPILE),) +DESTDIR?=$(sysroot:"%"=%) +endif +## +# install recipes generation +## +sysconf-install:=$(addprefix $(DESTDIR)$(sysconfdir:%/=%)/,$(sysconf-y)) +data-install:=$(addprefix $(DESTDIR)$(datadir:%/=%)/,$(data-y)) +include-install:=$(addprefix $(DESTDIR)$(includedir:%/=%)/,$(include-y)) +lib-static-install:=$(addprefix $(DESTDIR)$(libdir:%/=%)/,$(addsuffix $(slib-ext:%=.%),$(addprefix lib,$(slib-y)))) +lib-dynamic-install:=$(addprefix $(DESTDIR)$(libdir:%/=%)/,$(addsuffix $(version:%=.%),$(addsuffix $(dlib-ext:%=.%),$(addprefix lib,$(lib-y))))) +modules-install:=$(addprefix $(DESTDIR)$(pkglibdir:%/=%)/,$(addsuffix $(dlib-ext:%=.%),$(modules-y))) +bin-install:=$(addprefix $(DESTDIR)$(bindir:%/=%)/,$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(bin-y)))) +sbin-install:=$(addprefix $(DESTDIR)$(sbindir:%/=%)/,$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(sbin-y)))) + +DEVINSTALL?=y +install:= +dev-install-y:= +dev-install-$(DEVINSTALL)+=$(lib-static-install) +install+=$(lib-dynamic-install) +install+=$(modules-install) +install+=$(data-install) +install+=$(sysconf-install) +dev-install-$(DEVINSTALL)+=$(include-install) +install+=$(bin-install) +install+=$(sbin-install) + +## +# main entries +## +action:=_build +build:=$(action) -f $(srcdir)$(makemore) file +.DEFAULT_GOAL:=_entry +.PHONY:_entry _build _install _clean _distclean _check _hostbuild +_entry: _configbuild _versionbuild default_action + +_info: + @: + +_hostbuild: action:=_hostbuild +_hostbuild: build:=$(action) -f $(srcdir)$(makemore) file +_hostbuild: _info $(subdir-target) $(hostobjdir) $(hostslib-target) $(hostbin-target) + @: + +_configbuild: $(obj) $(if $(wildcard $(CONFIGFILE)),$(join $(builddir),config.h)) +_versionbuild: $(if $(package) $(version), $(join $(builddir),$(VERSIONFILE:%=%.h))) + +_build: _info $(download-target) $(gitclone-target) $(objdir) $(subdir-project) $(subdir-target) $(data-y) $(targets) + @: + +_install: action:=_install +_install: build:=$(action) -f $(srcdir)$(makemore) file +_install: _info $(install) $(dev-install-y) $(subdir-target) + @: + +_clean: action:=_clean +_clean: build:=$(action) -f $(srcdir)$(makemore) file +_clean: $(subdir-target) _clean_objs + $(Q)$(call cmd,clean,$(wildcard $(targets))) + $(Q)$(call cmd,clean,$(wildcard $(hostslib-target) $(hostbin-target))) + +_clean_objs: + $(Q)$(call cmd,clean,$(wildcard $(target-objs)) $(wildcard $(target-hostobjs))) + +_distclean: action:=_distclean +_distclean: build:=$(action) -f $(srcdir)$(makemore) file +_distclean: $(subdir-target) _clean + $(Q)$(call cmd,clean_dir,$(filter-out $(src),$(obj))) + +_check: action:=_check +_check: build:=$(action) -s -f $(srcdir)$(makemore) file +_check: $(subdir-target) $(LIBRARY) $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY)) + +PHONY:clean distclean install check default_action pc all +clean: action:=_clean +clean: build:=$(action) -f $(srcdir)$(makemore) file +clean: default_action + +distclean: action:=_distclean +distclean: build:=$(action) -f $(srcdir)$(makemore) file +distclean: default_action +distclean: + $(Q)$(call cmd,clean_dir,$(wildcard $(buildpath:%=%/)host)) + $(Q)$(call cmd,clean_dir,$(wildcard $(gitclone-target))) + $(Q)$(call cmd,clean,$(wildcard $(download-target))) + $(Q)$(call cmd,clean,$(wildcard $(builddir)$(CONFIG))) + $(Q)$(call cmd,clean,$(wildcard $(join $(builddir),$(CONFIG:.%=%.h)))) + $(Q)$(call cmd,clean,$(wildcard $(join $(builddir),$(VERSIONFILE:%=%.h)))) + +install: action:=_install +install: build:=$(action) -f $(srcdir)$(makemore) file +install: _configbuild _versionbuild default_action + +check: action:=_check +check: build:=$(action) -s -f $(srcdir)$(makemore) file +check: $(.DEFAULT_GOAL) + +hosttools: action:=_hostbuild +hosttools: build:=$(action) -f $(srcdir)$(makemore) file +hosttools: default_action + +default_action: _info + $(Q)$(MAKE) $(build)=$(file) + @: + +pc: $(builddir)$(package:%=%.pc) + +all: _configbuild _versionbuild default_action + +PHONY: menuconfig gconfig xconfig config oldconfig +menuconfig gconfig xconfig config: + $(EDITOR) $(builddir)$(CONFIG) + + +defconfig: $(builddir)$(CONFIG).old cleanconfig FORCE + @echo " "DEFCONFIG $* + @$(if $(DEFCONFIG),$(GREP) -v "^#" $(DEFCONFIG) > $(builddir)$(CONFIG)) + +%_defconfig: $(builddir)$(CONFIG).old cleanconfig FORCE + @echo " "DEFCONFIG $* + $(if $(firstword $(wildcard $@ $(srcdir)/configs/$@ $(srcdir)/$@)),,$(error $*_defconfig not found)) + $(eval DEFCONFIG:=$(firstword $(wildcard $@ $(srcdir)/configs/$@ $(srcdir)/$@))) + @$(if $(DEFCONFIG),$(GREP) -v "^#" $(DEFCONFIG) > $(builddir)$(CONFIG)) + +CONFIGS:=$(shell cat $(DEFCONFIG) | sed 's/\"/\\\"/g' | grep -v '^\#' | awk -F= 't$$1 != t {print $$1}' ) +oldconfig: $(DEFCONFIG) FORCE + @$(eval CONFIGS=$(foreach config,$(CONFIGS),$(if $($(config)),,$(config)))) + @$(if $(CONFIGS),cat $(DEFCONFIG) | grep $(addprefix -e ,$(CONFIGS)), echo "") >> $(builddir)$(CONFIG) + +cleanconfig: $(if $(wildcard $(builddir)$(CONFIG)),distclean) + +$(builddir)$(CONFIG).old: $(wildcard $(builddir)$(CONFIG)) + @$(if $<,mv $< $@) + +$(builddir)$(CONFIG): + $(warning "Configure the project first") + $(warning " make <...>_defconfig") + $(warning " make defconfig") + $(warning " make config") + $(error ) + +$(builddir)config.h: $(CONFIGFILE) $(builddir)$(CONFIG) + @echo " "CONFIG $* + @echo '#ifndef __CONFIG_H__' > $@ + @echo '#define __CONFIG_H__' >> $@ + @echo '' >> $@ + @$(GREP) -v "^#" $< | $(AWK) -F= 't$$1 != t {if ($$2 != "n") print "#define "toupper($$1)" "$$2}' >> $@ + @echo '' >> $@ + @$(if $(pkglibdir), sed -i -e "/\\/d" $@; echo '#define PKGLIBDIR "'$(pkglibdir)'"' >> $@) + @$(if $(datadir), sed -i -e "/\\/d" $@; echo '#define DATADIR "'$(datadir)'"' >> $@) + @$(if $(pkgdatadir), sed -i -e "/\\/d" $@; echo '#define PKG_DATADIR "'$(pkgdatadir)'"' >> $@) + @$(if $(sysconfdir), sed -i -e "/\\/d" $@; echo '#define SYSCONFDIR "'$(sysconfdir)'"' >> $@) + @echo '#endif' >> $@ + +$(builddir)$(VERSIONFILE:%=%.h): $(builddir)$(CONFIG) + @echo " "VERSION $* + @echo '#ifndef __VERSION_H__' > $@ + @echo '#define __VERSION_H__' >> $@ + @echo '' >> $@ + @$(if $(version), echo '#define VERSION "'$(version)'"' >> $@) + @$(if $(package), echo '#define PACKAGE "'$(package)'"' >> $@) + @$(if $(version), echo '#define PACKAGE_VERSION "'$(version)'"' >> $@) + @$(if $(package), echo '#define PACKAGE_NAME "'$(package)'"' >> $@) + @$(if $(package), echo '#define PACKAGE_TARNAME "'$(subst " ","_",$(package))'"' >> $@) + @$(if $(package), echo '#define PACKAGE_STRING "'$(package) $(version)'"' >> $@) + @echo '#endif' >> $@ + +## +# Commands for clean +## +quiet_cmd_clean=$(if $(2),CLEAN $(notdir $(2))) + cmd_clean=$(if $(2),$(RM) $(2)) +quiet_cmd_clean_dir=$(if $(2),CLEAN $(notdir $(2))) + cmd_clean_dir=$(if $(2),$(RM) -r $(2)) +## +# Commands for build and link +## +RPATH=$(wildcard $(addsuffix /.,$(wildcard $(CURDIR:%/=%)/* $(obj)*))) +quiet_cmd_yacc_y=YACC $* + cmd_yacc_y=$(YACC) -o $@ $< +quiet_cmd_as_o_s=AS $* + cmd_as_o_s=$(TARGETAS) $(ASFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< +quiet_cmd_cc_o_c=CC $* + cmd_cc_o_c=$(TARGETCC) $(CFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< +quiet_cmd_cc_o_cpp=CXX $* + cmd_cc_o_cpp=$(TARGETCXX) $(CXXFLAGS) $(CFLAGS) $($*_CXXFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< +quiet_cmd_moc_hpp=QTMOC $* + cmd_moc_hpp=$(MOC) $(INCLUDES) $($*_MOCFLAGS) $($*_MOCFLAGS-y) -o $@ $< +quiet_cmd_uic_hpp=QTUIC $* + cmd_uic_hpp=$(UIC) $< > $@ +quiet_cmd_ld_bin=LD $* + cmd_ld_bin=$(TARGETCC) -L. $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -o $@ $^ -Wl,--start-group $(LIBS:%=-l%) $($*_LIBS:%=-l%) -Wl,--end-group -lc +quiet_cmd_ld_slib=LD $* + cmd_ld_slib=$(RM) $@ && \ + $(TARGETAR) -cvq $@ $^ > /dev/null && \ + $(TARGETRANLIB) $@ +quiet_cmd_ld_dlib=LD $* + cmd_ld_dlib=$(TARGETCC) $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -Bdynamic -shared -Wl,-soname,$(strip $(notdir $@)) -o $@ $^ $(addprefix -L,$(RPATH)) $(LIBS:%=-l%) $($*_LIBS:%=-l%) -lc + +quiet_cmd_hostcc_o_c=HOSTCC $* + cmd_hostcc_o_c=$(HOSTCC) $(HOSTCFLAGS) $($*_CFLAGS) -c -o $@ $< +quiet_hostcmd_cc_o_cpp=HOSTCXX $* + cmd_hostcc_o_cpp=$(HOSTCXX) $(HOSTCXXFLAGS) $($*_CFLAGS) -c -o $@ $< +quiet_cmd_hostld_bin=HOSTLD $* + cmd_hostld_bin=$(HOSTCC) -o $@ $^ $($*_LDFLAGS) $(HOSTLDFLAGS) -L. $(LIBS:%=-l%) $($*_LIBS:%=-l%) +quiet_cmd_hostld_slib=HOSTLD $* + cmd_hostld_slib=$(RM) $@ && \ + $(HOSTAR) -cvq $@ $^ > /dev/null && \ + $(HOSTRANLIB) $@ + +quiet_cmd_check_lib=CHECK $* +define cmd_check_lib + $(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE) + echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c) + $(TARGETCC) -c -o $(TMPDIR)/$(TESTFILE:%=%.o) $(TMPDIR)/$(TESTFILE:%=%.c) $(INTERN_CFLAGS) $(CFLAGS) > /dev/null 2>&1 + $(TARGETLD) -o $(TMPDIR)/$(TESTFILE) $(TMPDIR)/$(TESTFILE:%=%.o) $(INTERN_LDFLAGS) $(LDFLAGS) $(addprefix -l, $2) > /dev/null 2>&1 +endef + +checkoption:=--exact-version +prepare_check=$(if $(filter %-, $2),$(eval checkoption:=--atleast-version),$(if $(filter -%, $2),$(eval checkoption:=--max-version))) +cmd_check2_lib=$(if $(findstring $(3:%-=%), $3),$(if $(findstring $(3:-%=%), $3),,$(eval checkoption:=--atleast-version),$(eval checkoption:=--max-version))) \ + $(PKGCONFIG) --print-errors $(checkoption) $(subst -,,$3) lib$2 + +## +# build rules +## +.SECONDEXPANSION: +$(hostobjdir) $(objdir) $(buildpath): + $(Q)mkdir -p $@ + +$(obj)%.tab.c:%.y + @$(call cmd,yacc_y) + +$(obj)%.o:%.s + @$(call cmd,as_o_s) + +$(obj)%.o:%.c + @$(call cmd,cc_o_c) + +$(obj)%.o:%.cpp + @$(call cmd,cc_o_cpp) + +$(obj)%.moc.cpp:$(obj)%.ui.hpp +$(obj)%.moc.cpp:%.hpp + @$(call cmd,moc_hpp) + +$(obj)%.ui.hpp:%.ui + @$(call cmd,uic_hpp) + +$(hostobj)%.o:%.c + @$(call cmd,hostcc_o_c) + +$(hostobj)%.o:%.cpp + @$(call cmd,hostcc_o_cpp) + +$(lib-static-target): $(obj)lib%$(slib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) + @$(call cmd,ld_slib) + +$(lib-dynamic-target): CFLAGS+=-fPIC +$(lib-dynamic-target): $(obj)lib%$(dlib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) + @$(call cmd,ld_dlib) + +$(modules-target): CFLAGS+=-fPIC +$(modules-target): $(obj)%$(dlib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) + @$(call cmd,ld_dlib) + +#$(bin-target): $(obj)/%$(bin-ext:%=.%): $$(if $$(%_SOURCES), $$(addprefix $(src)/,$$(%_SOURCES)), $(src)/%.c) +$(bin-target): $(obj)%$(bin-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) + @$(call cmd,ld_bin) + +$(hostbin-target): $(hostobj)%$(bin-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(hostobj),$$(%-objs)), $(hostobj)%.o) + @$(call cmd,hostld_bin) + +$(hostslib-target): $(hostobj)lib%$(slib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(hostobj),$$(%-objs)), $(hostobj)%.o) + @$(call cmd,hostld_slib) + +.PHONY: $(subdir-project) $(subdir-target) FORCE +$(subdir-project): %: FORCE + $(Q)echo " "PROJECT $* + $(Q)cd $* && $($*_CONFIGURE) + $(Q)$(MAKE) -C $* + $(Q)$(MAKE) -C $* install + +$(subdir-target): %: FORCE + $(Q)echo " "SUBDIR $* + $(Q)$(MAKE) -C $(dir $*) cwdir=$(cwdir)$(dir $*) builddir=$(builddir) $(build)=$(notdir $*) + +$(LIBRARY) $(sort $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY))): %: + @$(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE) + @echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c) + @$(call cmd,check_lib,$(firstword $(subst {, ,$(subst },,$@)))) + @$(call prepare_check,$(lastword $(subst {, ,$(subst },,$@)))) + @$(if $(findstring $(words $(subst {, ,$(subst },,$@))),2),$(call cmd,check2_lib,$(firstword $(subst {, ,$(subst },,$@))),$(lastword $(subst {, ,$(subst },,$@))))) + +## +# Commands for install +## +quiet_cmd_install_data=INSTALL $* +define cmd_install_data + $(INSTALL_DATA) $< $@ +endef +quiet_cmd_install_bin=INSTALL $* +define cmd_install_bin + $(INSTALL_PROGRAM) $< $@ +endef +quiet_cmd_install_link=INSTALL $* +define cmd_install_link + $(LN) -t $(dirname $@) $(basename $<) $(basename $@) +endef + +## +# install rules +## +$(foreach dir, includedir datadir sysconfdir libdir bindir sbindir ,$(DESTDIR)$($(dir))/): + $(Q)mkdir -p $@ + +$(include-install): $(DESTDIR)$(includedir:%/=%)/%: % + @$(call cmd,install_data) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(includedir) && rm -f $(a) && ln -s $(includedir:%/=%)/$* $(a))) + +$(sysconf-install): $(DESTDIR)$(sysconfdir:%/=%)/%: % + @$(call cmd,install_data) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(sysconfdir) && rm -f $(a) && ln -s $(sysconfdir:%/=%)/$* $(a))) + +$(data-install): $(DESTDIR)$(datadir:%/=%)/%: % + @$(call cmd,install_data) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(datadir) && rm -f $(a) && ln -s $(datadir:%/=%)/$* $(a))) + +$(lib-static-install): $(DESTDIR)$(libdir:%/=%)/lib%$(slib-ext:%=.%): $(obj)lib%$(slib-ext:%=.%) + @$(call cmd,install_bin) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(libdir) && rm -f $(a) && ln -s (libdir:%/=%)/lib$*$(slib-ext:%=.%) $(a))) + +$(lib-dynamic-install): $(DESTDIR)$(libdir:%/=%)/lib%$(dlib-ext:%=.%)$(version:%=.%): $(DESTDIR)$(libdir)/ +$(lib-dynamic-install): $(DESTDIR)$(libdir:%/=%)/lib%$(dlib-ext:%=.%)$(version:%=.%): $(obj)lib%$(dlib-ext:%=.%) + @$(call cmd,install_bin) + @$(if $(version),$(shell cd $(DESTDIR)$(libdir) && rm -f lib$*$(dlib-ext:%=.%) && ln -s lib$*$(dlib-ext:%=.%)$(version:%=.%) lib$*$(dlib-ext:%=.%))) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(libdir) && rm -f $(a) && ln -s $(libdir:%/=%)/lib$*$(dlib-ext:%=.%) $(a))) + +$(modules-install): $(DESTDIR)$(pkglibdir:%/=%)/%$(dlib-ext:%=.%): $(obj)%$(dlib-ext:%=.%) + @$(call cmd,install_bin) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(pkglibdir) && rm -f $(a) && ln -s $(pkglibdir:%/=%)/$*$(dlib-ext:%=.%) $(a))) + +$(bin-install): $(DESTDIR)$(bindir:%/=%)/%$(bin-ext:%=.%): $(obj)%$(bin-ext:%=.%) + @$(call cmd,install_bin) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(bindir) && rm -f $(a) && ln -s $(bindir:%/=%)/$*$(bin-ext:%=.%) $(a))) + +$(sbin-install): $(DESTDIR)$(sbindir:%/=%)/%$(bin-ext:%=.%): $(obj)%$(bin-ext:%=.%) + @$(call cmd,install_bin) + @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(sbindir) && rm -f $(a) && ln -s $(sbindir:%/=%)/$*$(bin-ext:%=.%) $(a))) + +## +# Commands for download +## +DL?=$(srcdir)/.dl + +quiet_cmd_download=DOWNLOAD $* +define cmd_download + wget -q -O $(OUTPUT) $(URL) +endef + +quiet_cmd_gitclone=CLONE $* +define cmd_gitclone + $(if $(wildcard $(OUTPUT)),,git clone --depth 1 $(URL) $(VERSION) $(OUTPUT)) +endef + +$(DL)/: + mkdir -p $@ + +$(download-target): %: $(DL)/ + $(eval URL=$($*_SITE)/$($*_SOURCE)) + $(eval DL=$(realpath $(DL))) + $(eval OUTPUT=$(DL)/$($*_SOURCE)) + @$(call cmd,download) + @$(if $(findstring .zip, $($*_SOURCE)),unzip -o -d $(cwdir)/$* $(OUTPUT)) + @$(if $(findstring .tar.gz, $($*_SOURCE)),tar -xzf $(OUTPUT) -C $(cwdir)/$*) + +$(gitclone-target): %: + $(eval URL=$($*_SITE)) + $(eval OUTPUT=$(cwdir)/$*) + $(eval VERSION=$(if $($*_VERSION),-b $($*_VERSION))) + @$(call cmd,gitclone) + +#if inside makemore +endif diff --git a/src/Makefile b/src/Makefile index e075c0b9..da5b8758 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,109 +1,57 @@ -include ../../Config.mk - -MODULE_DEPS = $(LIBC_COMPONENT) $(LIBSTDCXX_COMPONENT) libpp_base - -CXXFLAGS += $(FW_CXXFLAGS_VISIBILITY) -DUSE_RARITAN -g -O0 -Wno-error=unused-parameter -Wno-unused-parameter #-Weffc++ -CFLAGS = $(FW_CFLAGS_3RDPARTY) - -TARGET_SHARED_LIBNAMES = libezsp - -libezsp_MODULE_NAME = test_log - -# SRC_PATH should point to the src/ folder containing source code for this library (can be overridden from environment) -SRC_PATH ?= . -SRC_DOMAIN_PATH ?= $(SRC_PATH)/domain -SRC_SPI_PATH ?= $(SRC_PATH)/spi - -include libezsp.mk.inc - -libezsp_SRCS = $(LIBEZSP_RARITAN_SRC) - -libezsp_LIBS = -lpp_base - -# Header files to install -libezspincludedir = $(includedir)/include/local/ezsp - -libezspinclude_HEADERS = \ -domain/zigbee-tools/zigbee-networking.h \ -domain/zigbee-tools/green-power-sink.h \ -domain/zigbee-tools/zigbee-messaging.h \ -domain/green-power-observer.h \ -domain/ezsp-dongle-observer.h \ -domain/ezsp-dongle.h \ -domain/ash.h \ -domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h \ -domain/ezsp-protocol/struct/ember-key-struct.h \ -domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h \ -domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h \ -domain/ezsp-protocol/struct/ember-child-data-struct.h \ -domain/ezsp-protocol/struct/ember-network-parameters.h \ -domain/ezsp-protocol/struct/ember-gp-address-struct.h \ -domain/ezsp-protocol/get-network-parameters-response.h \ -domain/ezsp-protocol/ezsp-enum.h \ -domain/zbmessage/green-power-device.h \ -domain/zbmessage/green-power-frame.h \ -domain/zbmessage/gp-pairing-command-option-struct.h \ -domain/zbmessage/aps.h \ -domain/zbmessage/zclframecontrol.h \ -domain/zbmessage/zclheader.h \ -domain/zbmessage/apsoption.h \ -domain/zbmessage/green-power-sink-table-entry.h \ -domain/zbmessage/gpd-commissioning-command-payload.h \ -domain/zbmessage/zdp-enum.h \ -domain/zbmessage/zigbee-message.h \ -spi/raritan/RaritanLogger.h \ -spi/raritan/RaritanTimerFactory.h \ -spi/raritan/RaritanTimer.h \ -spi/raritan/RaritanEventLoop.h \ -spi/raritan/RaritanUartDriver.h \ -spi/ILogger.h \ -spi/ITimerFactory.h \ -spi/ITimer.h \ -spi/IUartDriver.h \ -spi/GenericLogger.h \ -spi/GenericAsyncDataInputObservable.h \ -spi/IAsyncDataInputObserver.h \ - -MKDIR_P = /usr/bin/mkdir -p -INSTALL_HEADER = install -Dc -m 644 - -install-libezspincludeHEADERS:: $(libezspinclude_HEADERS) - echo " Install ezsp headers to $(DESTDIR)$(libezspincludedir)" - test -z "$(libezspincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libezspincludedir)" - @list='$^'; test -n "$(libezspincludedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libezspincludedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(libezspincludedir)/$${files#source}" || exit $$?; \ - done - - -uninstall-libezspincludeHEADERS:: - echo " Uninstall ezsp headers" - @list='$(libezspinclude_HEADERS)'; test -n "$(libezspincludedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(libezspincludedir)' && rm -rf $(DESTDIR)$(libezspincludedir) )"; \ - cd "$(DESTDIR)$(libezspincludedir)" && rm -rf "$(DESTDIR)$(libezspincludedir)" - -install-local:: install-libezspincludeHEADERS - -clean-local:: uninstall-libezspincludeHEADERS - -mainEzspTest_MODULE_NAME = test_log - -TARGET_PRGS = mainEzspTest - -mainEzspTest_CPPFLAGS += -Ispi -Idomain -Idomain/zbmessage -Isrc/domain/ezsp-protocol -Iexample - -mainEzspTest_SRCS = example/mainEzspTest.cpp \ - example/CAppDemo.cpp \ - example/dummy_db.cpp \ - $(libezsp_SRCS) - -mainEzspTest_LIBS = -lpp_base - -include $(PP_BUILD_SYS_DIR)/Top.mk +lib-y=ezsp + +ezsp_SOURCES+=domain/ash.cpp +ezsp_SOURCES+=domain/custom-aes.cpp +ezsp_SOURCES+=domain/ezsp-dongle.cpp + +ezsp_HEADERS+=domain/ezsp-dongle-observer.h + +ezsp_SOURCES+=domain/ezsp-protocol/ezsp-enum.cpp +ezsp_SOURCES+=domain/ezsp-protocol/get-network-parameters-response.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-child-data-struct.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-address-struct.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-key-struct.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-network-parameters.cpp +ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp + +ezsp_SOURCES+=domain/zbmessage/aps.cpp +ezsp_SOURCES+=domain/zbmessage/apsoption.cpp +ezsp_SOURCES+=domain/zbmessage/gpd-commissioning-command-payload.cpp +ezsp_SOURCES+=domain/zbmessage/gp-pairing-command-option-struct.cpp +ezsp_SOURCES+=domain/zbmessage/green-power-device.cpp +ezsp_SOURCES+=domain/zbmessage/green-power-frame.cpp +ezsp_SOURCES+=domain/zbmessage/green-power-sink-table-entry.cpp +ezsp_SOURCES+=domain/zbmessage/zclframecontrol.cpp +ezsp_SOURCES+=domain/zbmessage/zclheader.cpp +ezsp_SOURCES+=domain/zbmessage/zdp-enum.cpp +ezsp_SOURCES+=domain/zbmessage/zigbee-message.cpp + +ezsp_SOURCES+=domain/zigbee-tools/green-power-sink.cpp +ezsp_SOURCES+=domain/zigbee-tools/zigbee-messaging.cpp +ezsp_SOURCES+=domain/zigbee-tools/zigbee-networking.cpp + +ezsp_SOURCES+=spi/GenericAsyncDataInputObservable.cpp + +ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanEventLoop.cpp +ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimer.cpp +ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimerFactory.cpp + +ezsp_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimer.cpp +ezsp_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimerFactory.cpp +ezsp_SOURCES-$(USE_SERIALCPP)+=spi/console/ConsoleLogger.cpp +ezsp_LIBS-$(USE_CPPTHREADS)+=pthread + +ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanUartDriver.cpp +ezsp_SOURCES-$(USE_SERIALCPP)+=spi/serial/SerialUartDriver.cpp +ezsp_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp + +bin-$(TEST)+=mainEzspTest + +mainEzspTest_SOURCES+=example/CAppDemo.cpp +mainEzspTest_SOURCES+=example/mainEzspTest.cpp +mainEzspTest_SOURCES+=example/dummy_db.cpp +mainEzspTest_LIBRARY+=ezsp +mainEzspTest_LIBRARY+=serialcpp From 1f7d50785bc22c0b022769b04ec6b2f60555e043 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 10 Dec 2019 15:34:10 +0100 Subject: [PATCH 004/413] [build] remove relative path to include files --- src/Makefile | 2 ++ src/domain/ash.cpp | 2 +- src/domain/ash.h | 2 +- src/domain/ezsp-dongle.cpp | 2 +- src/domain/ezsp-dongle.h | 4 ++-- src/domain/zigbee-tools/green-power-sink.cpp | 16 ++++++++-------- src/domain/zigbee-tools/zigbee-messaging.cpp | 2 +- src/domain/zigbee-tools/zigbee-networking.cpp | 8 ++++---- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Makefile b/src/Makefile index da5b8758..2a54c0b0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,7 @@ lib-y=ezsp +ezsp_CFLAGS+=-I. + ezsp_SOURCES+=domain/ash.cpp ezsp_SOURCES+=domain/custom-aes.cpp ezsp_SOURCES+=domain/ezsp-dongle.cpp diff --git a/src/domain/ash.cpp b/src/domain/ash.cpp index d9801d13..c4e81a55 100644 --- a/src/domain/ash.cpp +++ b/src/domain/ash.cpp @@ -8,7 +8,7 @@ #include "ash.h" -#include "../spi/GenericLogger.h" +#include "spi/GenericLogger.h" using namespace std; diff --git a/src/domain/ash.h b/src/domain/ash.h index a7dddf00..b71019e3 100644 --- a/src/domain/ash.h +++ b/src/domain/ash.h @@ -4,7 +4,7 @@ #include #include // For std::unique_ptr -#include "../spi/ITimerFactory.h" +#include "spi/ITimerFactory.h" typedef enum { diff --git a/src/domain/ezsp-dongle.cpp b/src/domain/ezsp-dongle.cpp index c8202cc5..bf40629c 100644 --- a/src/domain/ezsp-dongle.cpp +++ b/src/domain/ezsp-dongle.cpp @@ -3,7 +3,7 @@ */ #include "ezsp-dongle.h" -#include "../spi/GenericLogger.h" +#include "spi/GenericLogger.h" CEzspDongle::CEzspDongle( ITimerFactory &i_timer_factory, CEzspDongleObserver* ip_observer ) : timer_factory(i_timer_factory), diff --git a/src/domain/ezsp-dongle.h b/src/domain/ezsp-dongle.h index 225c3a97..044caab5 100644 --- a/src/domain/ezsp-dongle.h +++ b/src/domain/ezsp-dongle.h @@ -6,10 +6,10 @@ #include #include "ezsp-protocol/ezsp-enum.h" -#include "../spi/IUartDriver.h" +#include "spi/IUartDriver.h" #include "ash.h" #include "ezsp-dongle-observer.h" -#include "../spi/ITimerFactory.h" +#include "spi/ITimerFactory.h" extern "C" { /* Avoid compiler warning on member initialization for structs (in -Weffc++ mode) */ typedef struct sMsg diff --git a/src/domain/zigbee-tools/green-power-sink.cpp b/src/domain/zigbee-tools/green-power-sink.cpp index ba56cbf1..dc540a75 100644 --- a/src/domain/zigbee-tools/green-power-sink.cpp +++ b/src/domain/zigbee-tools/green-power-sink.cpp @@ -12,17 +12,17 @@ #include #include "green-power-sink.h" -#include "../ezsp-protocol/struct/ember-gp-address-struct.h" -#include "../ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" -#include "../byte-manip.h" +#include "domain/byte-manip.h" -#include "../../domain/zbmessage/zigbee-message.h" -#include "../../domain/zbmessage/gpd-commissioning-command-payload.h" -#include "../ezsp-protocol/get-network-parameters-response.h" +#include "domain/zbmessage/zigbee-message.h" +#include "domain/zbmessage/gpd-commissioning-command-payload.h" +#include "domain/ezsp-protocol/get-network-parameters-response.h" -#include "../../spi/GenericLogger.h" -#include "../../spi/ILogger.h" +#include "spi/GenericLogger.h" +#include "spi/ILogger.h" // some defines to help understanding #define GP_ENDPOINT 242 diff --git a/src/domain/zigbee-tools/zigbee-messaging.cpp b/src/domain/zigbee-tools/zigbee-messaging.cpp index 8b3f65b9..ad2f0e5b 100644 --- a/src/domain/zigbee-tools/zigbee-messaging.cpp +++ b/src/domain/zigbee-tools/zigbee-messaging.cpp @@ -6,7 +6,7 @@ #include "zigbee-messaging.h" -#include "../../spi/GenericLogger.h" +#include "spi/GenericLogger.h" CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, ITimerFactory &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) diff --git a/src/domain/zigbee-tools/zigbee-networking.cpp b/src/domain/zigbee-tools/zigbee-networking.cpp index 4c14fdff..cf907661 100644 --- a/src/domain/zigbee-tools/zigbee-networking.cpp +++ b/src/domain/zigbee-tools/zigbee-networking.cpp @@ -8,11 +8,11 @@ #include "zigbee-networking.h" -#include "../ezsp-protocol/get-network-parameters-response.h" -#include "../ezsp-protocol/struct/ember-key-struct.h" -#include "../ezsp-protocol/struct/ember-child-data-struct.h" +#include "domain/ezsp-protocol/get-network-parameters-response.h" +#include "domain/ezsp-protocol/struct/ember-key-struct.h" +#include "domain/ezsp-protocol/struct/ember-child-data-struct.h" -#include "../../spi/GenericLogger.h" +#include "spi/GenericLogger.h" CZigbeeNetworking::CZigbeeNetworking( CEzspDongle &i_dongle, CZigbeeMessaging &i_zb_messaging ) : From b9edf661a0eab310ccd121912154469ce1c935df Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 10 Dec 2019 15:47:10 +0100 Subject: [PATCH 005/413] [doc] add Sonarcloud badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8492bbae..81050efd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # libezsp +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=libezsp&metric=alert_status)](https://sonarcloud.io/dashboard?id=libezsp) C++ library to send/receive wireless traffic to/from a UART transceiver using the EZSP protocol from Silicon Labs. The code for a sample demo program is located in `src/example/mainEzspTest.cpp` and `src/example/CAppDemo.cpp`, this code is designed to work seamlessly on Linux within or outside of the Raritan framework. From ee588bbf12c4ba5c2163806946237f7f99ce5691 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 10 Dec 2019 15:52:33 +0100 Subject: [PATCH 006/413] [build] remove all relative path in include files --- .../ezsp-protocol/struct/ember-child-data-struct.cpp | 2 +- .../struct/ember-gp-proxy-table-entry-struct.cpp | 4 ++-- .../struct/ember-gp-sink-table-entry-struct.cpp | 4 ++-- src/domain/ezsp-protocol/struct/ember-key-struct.cpp | 2 +- .../struct/ember-network-parameters.cpp | 2 +- src/domain/zbmessage/aps.cpp | 2 +- .../zbmessage/gpd-commissioning-command-payload.cpp | 4 ++-- src/domain/zbmessage/green-power-frame.cpp | 4 ++-- src/domain/zbmessage/zclheader.cpp | 2 +- src/domain/zigbee-tools/zigbee-networking.cpp | 2 +- src/example/CAppDemo.cpp | 12 ++++++------ src/example/mainEzspTest.cpp | 12 ++++++------ src/spi/GenericLogger.h | 4 ++-- src/spi/console/ConsoleLogger.h | 2 +- src/spi/raritan/RaritanTimer.cpp | 2 +- src/spi/raritan/RaritanTimerFactory.h | 2 +- src/spi/serial/SerialUartDriver.cpp | 2 +- src/spi/serial/test-serial.cpp | 4 ++-- 18 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp b/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp index e888d550..7e458d72 100644 --- a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp @@ -9,7 +9,7 @@ #include "ember-child-data-struct.h" -#include "../../byte-manip.h" +#include "domain/byte-manip.h" CEmberChildDataStruct::CEmberChildDataStruct(const std::vector& raw_message) : eui64(), diff --git a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp index 4ba5b4b9..74a3aad1 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp @@ -9,7 +9,7 @@ #include "ember-gp-proxy-table-entry-struct.h" -#include "../../byte-manip.h" +#include "domain/byte-manip.h" /** \todo Verify value !!! */ CEmberGpProxyTableEntryStruct::CEmberGpProxyTableEntryStruct(const std::vector& raw_message) : @@ -26,4 +26,4 @@ CEmberGpProxyTableEntryStruct::CEmberGpProxyTableEntryStruct(const std::vector& raw_message) : bitmask(static_cast(dble_u8_to_u16(raw_message.at(1), raw_message.at(0)))), diff --git a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp b/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp index a48ef131..06f70344 100644 --- a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp +++ b/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp @@ -6,7 +6,7 @@ #include "ember-network-parameters.h" -#include "../../byte-manip.h" +#include "domain/byte-manip.h" CEmberNetworkParameters::CEmberNetworkParameters() : extend_pan_id(0), diff --git a/src/domain/zbmessage/aps.cpp b/src/domain/zbmessage/aps.cpp index 7196905c..6022b7cf 100644 --- a/src/domain/zbmessage/aps.cpp +++ b/src/domain/zbmessage/aps.cpp @@ -5,7 +5,7 @@ */ #include "aps.h" -#include "../byte-manip.h" +#include "domain/byte-manip.h" CAPSFrame::CAPSFrame() : cluster_id(0), dest_ep(0), group_id(0), option(), profile_id(0), sequence(0), src_ep(0) { diff --git a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp b/src/domain/zbmessage/gpd-commissioning-command-payload.cpp index 2aa432c2..80f65c84 100644 --- a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp +++ b/src/domain/zbmessage/gpd-commissioning-command-payload.cpp @@ -8,8 +8,8 @@ #include #include -#include "../byte-manip.h" -#include "../custom-aes.h" +#include "domain/byte-manip.h" +#include "domain/custom-aes.h" #include "gpd-commissioning-command-payload.h" CGpdCommissioningPayload::CGpdCommissioningPayload(const std::vector& raw_message, uint32_t i_src_id): diff --git a/src/domain/zbmessage/green-power-frame.cpp b/src/domain/zbmessage/green-power-frame.cpp index 3de49f75..7a01a8ee 100644 --- a/src/domain/zbmessage/green-power-frame.cpp +++ b/src/domain/zbmessage/green-power-frame.cpp @@ -7,10 +7,10 @@ #include #include -#include "../byte-manip.h" +#include "domain/byte-manip.h" #include "green-power-frame.h" -#include "../ezsp-protocol/struct/ember-gp-address-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" CGpFrame::CGpFrame(): link_value(0), diff --git a/src/domain/zbmessage/zclheader.cpp b/src/domain/zbmessage/zclheader.cpp index a4330b88..f939751a 100644 --- a/src/domain/zbmessage/zclheader.cpp +++ b/src/domain/zbmessage/zclheader.cpp @@ -6,7 +6,7 @@ #include "zclheader.h" -#include "../byte-manip.h" +#include "domain/byte-manip.h" CZCLHeader::CZCLHeader() : frm_ctrl(), diff --git a/src/domain/zigbee-tools/zigbee-networking.cpp b/src/domain/zigbee-tools/zigbee-networking.cpp index cf907661..5a2a4ae7 100644 --- a/src/domain/zigbee-tools/zigbee-networking.cpp +++ b/src/domain/zigbee-tools/zigbee-networking.cpp @@ -4,7 +4,7 @@ #include -#include "../byte-manip.h" +#include "domain/byte-manip.h" #include "zigbee-networking.h" diff --git a/src/example/CAppDemo.cpp b/src/example/CAppDemo.cpp index 109c79b4..1288b66d 100644 --- a/src/example/CAppDemo.cpp +++ b/src/example/CAppDemo.cpp @@ -9,12 +9,12 @@ #include #include "CAppDemo.h" -#include "../domain/ezsp-protocol/get-network-parameters-response.h" -#include "../domain/ezsp-protocol/struct/ember-key-struct.h" -#include "../domain/ezsp-protocol/ezsp-enum.h" -#include "../domain/zbmessage/zdp-enum.h" -#include "../domain/zbmessage/zigbee-message.h" -#include "../domain/byte-manip.h" +#include "domain/ezsp-protocol/get-network-parameters-response.h" +#include "domain/ezsp-protocol/struct/ember-key-struct.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/zbmessage/zdp-enum.h" +#include "domain/zbmessage/zigbee-message.h" +#include "domain/byte-manip.h" CAppDemo::CAppDemo(IUartDriver& uartDriver, diff --git a/src/example/mainEzspTest.cpp b/src/example/mainEzspTest.cpp index d95a6d44..53f111f6 100644 --- a/src/example/mainEzspTest.cpp +++ b/src/example/mainEzspTest.cpp @@ -7,19 +7,19 @@ #include #ifdef USE_SERIALCPP -#include "../spi/serial/SerialUartDriver.h" -#include "../spi/cppthreads/CppThreadsTimerFactory.h" +#include "spi/serial/SerialUartDriver.h" +#include "spi/cppthreads/CppThreadsTimerFactory.h" #include #else #ifdef USE_RARITAN -#include "../spi/raritan/RaritanEventLoop.h" -#include "../spi/raritan/RaritanUartDriver.h" -#include "../spi/raritan/RaritanTimerFactory.h" +#include "spi/raritan/RaritanEventLoop.h" +#include "spi/raritan/RaritanUartDriver.h" +#include "spi/raritan/RaritanTimerFactory.h" #else #error Compiler directive USE_SERIALCPP or USE_RARITAN is required #endif // USE_RARITAN #endif // USE_SERIALCPP -#include "../spi/GenericLogger.h" +#include "spi/GenericLogger.h" #include "CAppDemo.h" #include #include diff --git a/src/spi/GenericLogger.h b/src/spi/GenericLogger.h index 2a8c4d5b..76008ca6 100644 --- a/src/spi/GenericLogger.h +++ b/src/spi/GenericLogger.h @@ -1,10 +1,10 @@ #pragma once #ifdef USE_SERIALCPP -#include "../spi/console/ConsoleLogger.h" +#include "spi/console/ConsoleLogger.h" #else #ifdef USE_RARITAN -#include "../spi/raritan/RaritanLogger.h" +#include "spi/raritan/RaritanLogger.h" #else #error Compiler directive USE_SERIALCPP or USE_RARITAN is required #endif // USE_RARITAN diff --git a/src/spi/console/ConsoleLogger.h b/src/spi/console/ConsoleLogger.h index 28c575c0..549b33d9 100644 --- a/src/spi/console/ConsoleLogger.h +++ b/src/spi/console/ConsoleLogger.h @@ -10,7 +10,7 @@ * @brief Macro to allow logger getter to fetch the singleton instance of this logger class **/ #define SINGLETON_LOGGER_CLASS_NAME ConsoleLogger -#include "../ILogger.h" +#include "spi/ILogger.h" /** * @brief Class to implement error message logging diff --git a/src/spi/raritan/RaritanTimer.cpp b/src/spi/raritan/RaritanTimer.cpp index a1d591f1..5102ad59 100644 --- a/src/spi/raritan/RaritanTimer.cpp +++ b/src/spi/raritan/RaritanTimer.cpp @@ -5,7 +5,7 @@ */ #include "RaritanTimer.h" -#include "../GenericLogger.h" +#include "spi/GenericLogger.h" RaritanTimer::RaritanTimer(RaritanEventLoop& eventLoop) : m_eventLoop(eventLoop), m_toutcbhandle() { } diff --git a/src/spi/raritan/RaritanTimerFactory.h b/src/spi/raritan/RaritanTimerFactory.h index c62992c0..02fed492 100644 --- a/src/spi/raritan/RaritanTimerFactory.h +++ b/src/spi/raritan/RaritanTimerFactory.h @@ -6,7 +6,7 @@ #pragma once -#include "../ITimerFactory.h" +#include "spi/ITimerFactory.h" #include "RaritanEventLoop.h" #ifdef USE_RARITAN diff --git a/src/spi/serial/SerialUartDriver.cpp b/src/spi/serial/SerialUartDriver.cpp index 026f3016..3a837262 100644 --- a/src/spi/serial/SerialUartDriver.cpp +++ b/src/spi/serial/SerialUartDriver.cpp @@ -7,7 +7,7 @@ #include "SerialUartDriver.h" #include -#include "../GenericLogger.h" +#include "spi/GenericLogger.h" SerialUartDriver::SerialUartDriver() : m_serial_port(), diff --git a/src/spi/serial/test-serial.cpp b/src/spi/serial/test-serial.cpp index 08e6f9b3..76481e3b 100644 --- a/src/spi/serial/test-serial.cpp +++ b/src/spi/serial/test-serial.cpp @@ -1,7 +1,7 @@ #include "SerialUartDriver.h" #include "CppThreadsTimerFactory.h" -#include "../GenericAsyncDataInputObservable.h" -#include "../GenericLogger.h" +#include "spi/GenericAsyncDataInputObservable.h" +#include "spi/GenericLogger.h" #include #include // FIXME: for std::stringstream during debug #include // FIXME: for std::cout during debug From 6b1a58539ed30cdfc4019da80b6040bf0bd26b13 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 10 Dec 2019 16:11:42 +0100 Subject: [PATCH 007/413] [build] set include file from the src directory --- src/Makefile | 2 ++ src/domain/ezsp-protocol/ezsp-enum.cpp | 2 +- .../get-network-parameters-response.cpp | 2 +- .../get-network-parameters-response.h | 2 +- .../struct/ember-child-data-struct.cpp | 2 +- .../struct/ember-child-data-struct.h | 2 +- .../struct/ember-gp-address-struct.h | 4 ++-- .../struct/ember-gp-proxy-table-entry-struct.cpp | 2 +- .../struct/ember-gp-proxy-table-entry-struct.h | 4 ++-- .../struct/ember-gp-sink-table-entry-struct.cpp | 2 +- .../struct/ember-gp-sink-table-entry-struct.h | 6 +++--- .../struct/ember-gp-sink-table-options-field.h | 4 ++-- .../ezsp-protocol/struct/ember-key-struct.cpp | 2 +- .../ezsp-protocol/struct/ember-key-struct.h | 2 +- .../struct/ember-network-parameters.cpp | 2 +- .../struct/ember-network-parameters.h | 2 +- .../struct/ember-process-gp-pairing-parameter.h | 10 +++++----- src/domain/zbmessage/aps.cpp | 2 +- src/domain/zbmessage/aps.h | 2 +- .../zbmessage/gp-pairing-command-option-struct.h | 2 +- .../gpd-commissioning-command-payload.cpp | 2 +- .../gpd-commissioning-command-payload.h | 4 ++-- src/domain/zbmessage/green-power-device.h | 4 ++-- src/domain/zbmessage/green-power-frame.cpp | 2 +- src/domain/zbmessage/zclframecontrol.cpp | 2 +- src/domain/zbmessage/zclheader.cpp | 2 +- src/domain/zbmessage/zigbee-message.cpp | 2 +- src/domain/zbmessage/zigbee-message.h | 4 ++-- src/domain/zigbee-tools/green-power-sink.cpp | 2 +- src/domain/zigbee-tools/green-power-sink.h | 16 ++++++++-------- src/domain/zigbee-tools/zigbee-messaging.cpp | 2 +- src/domain/zigbee-tools/zigbee-messaging.h | 6 +++--- src/domain/zigbee-tools/zigbee-networking.cpp | 2 +- src/domain/zigbee-tools/zigbee-networking.h | 8 ++++---- src/example/CAppDemo.cpp | 2 +- src/example/CAppDemo.h | 16 ++++++++-------- src/example/dummy_db.h | 2 +- src/example/mainEzspTest.cpp | 2 +- src/spi/cppthreads/CppThreadsTimer.h | 2 +- src/spi/cppthreads/CppThreadsTimerFactory.h | 2 +- src/spi/mock-uart/MockUartDriver.h | 2 +- src/spi/raritan/RaritanLogger.h | 2 +- src/spi/raritan/RaritanTimer.h | 2 +- src/spi/raritan/RaritanUartDriver.cpp | 2 +- src/spi/raritan/RaritanUartDriver.h | 2 +- src/spi/serial/SerialUartDriver.h | 2 +- src/tests/gp_tests.cpp | 12 ++++++------ src/tests/mock_serial_self_tests.cpp | 6 +++--- 48 files changed, 87 insertions(+), 85 deletions(-) diff --git a/src/Makefile b/src/Makefile index 2a54c0b0..7506b786 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,6 +52,8 @@ ezsp_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp bin-$(TEST)+=mainEzspTest +mainEzspTest_CFLAGS+=-I. + mainEzspTest_SOURCES+=example/CAppDemo.cpp mainEzspTest_SOURCES+=example/mainEzspTest.cpp mainEzspTest_SOURCES+=example/dummy_db.cpp diff --git a/src/domain/ezsp-protocol/ezsp-enum.cpp b/src/domain/ezsp-protocol/ezsp-enum.cpp index 7b227254..77ee3776 100644 --- a/src/domain/ezsp-protocol/ezsp-enum.cpp +++ b/src/domain/ezsp-protocol/ezsp-enum.cpp @@ -3,7 +3,7 @@ */ #include -#include "ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" std::string CEzspEnum::EmberNodeTypeToString( EmberNodeType in ) { diff --git a/src/domain/ezsp-protocol/get-network-parameters-response.cpp b/src/domain/ezsp-protocol/get-network-parameters-response.cpp index 2aac1a0f..bed21b4a 100644 --- a/src/domain/ezsp-protocol/get-network-parameters-response.cpp +++ b/src/domain/ezsp-protocol/get-network-parameters-response.cpp @@ -6,7 +6,7 @@ #include -#include "get-network-parameters-response.h" +#include "domain/ezsp-protocol/get-network-parameters-response.h" CGetNetworkParamtersResponse::CGetNetworkParamtersResponse(const std::vector& raw_message) : status(static_cast(raw_message.at(0))), diff --git a/src/domain/ezsp-protocol/get-network-parameters-response.h b/src/domain/ezsp-protocol/get-network-parameters-response.h index 691e2050..0ec53ccd 100644 --- a/src/domain/ezsp-protocol/get-network-parameters-response.h +++ b/src/domain/ezsp-protocol/get-network-parameters-response.h @@ -7,7 +7,7 @@ #pragma once -#include "ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" #include "struct/ember-network-parameters.h" #ifdef USE_RARITAN diff --git a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp b/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp index 7e458d72..d473b24b 100644 --- a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp @@ -7,7 +7,7 @@ #include #include -#include "ember-child-data-struct.h" +#include "domain/ezsp-protocol/struct/ember-child-data-struct.h" #include "domain/byte-manip.h" diff --git a/src/domain/ezsp-protocol/struct/ember-child-data-struct.h b/src/domain/ezsp-protocol/struct/ember-child-data-struct.h index 6649c8dc..f364c781 100644 --- a/src/domain/ezsp-protocol/struct/ember-child-data-struct.h +++ b/src/domain/ezsp-protocol/struct/ember-child-data-struct.h @@ -6,7 +6,7 @@ #pragma once -#include "../ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" class CEmberChildDataStruct { diff --git a/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h b/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h index c40a84a2..3e5bb202 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h +++ b/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h @@ -5,8 +5,8 @@ */ #pragma once -#include "../ezsp-enum.h" -#include "../../byte-manip.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/byte-manip.h" class CEmberGpAddressStruct { diff --git a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp index 74a3aad1..e9399650 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp @@ -7,7 +7,7 @@ #include #include -#include "ember-gp-proxy-table-entry-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" #include "domain/byte-manip.h" diff --git a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h index 6ebbc82b..2a8593b2 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h +++ b/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h @@ -6,8 +6,8 @@ #pragma once -#include "../ezsp-enum.h" -#include "ember-gp-address-struct.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp index 7177f341..0a04f44f 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp @@ -7,7 +7,7 @@ #include #include -#include "ember-gp-sink-table-entry-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" #include "domain/byte-manip.h" diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h index f1f48dac..1d8202b8 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h +++ b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h @@ -6,9 +6,9 @@ #pragma once -#include "../ezsp-enum.h" -#include "ember-gp-address-struct.h" -#include "ember-gp-sink-table-options-field.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h index 21ffab1f..2d3af311 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h +++ b/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h @@ -17,8 +17,8 @@ #pragma once #include -#include "../ezsp-enum.h" -#include "../../zbmessage/gpd-commissioning-command-payload.h" // BAD DEPENDANCY NEED TO BE INPROVE +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/zbmessage/gpd-commissioning-command-payload.h" // BAD DEPENDANCY NEED TO BE INPROVE #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-key-struct.cpp b/src/domain/ezsp-protocol/struct/ember-key-struct.cpp index df6cfa92..d9708c81 100644 --- a/src/domain/ezsp-protocol/struct/ember-key-struct.cpp +++ b/src/domain/ezsp-protocol/struct/ember-key-struct.cpp @@ -7,7 +7,7 @@ #include #include -#include "ember-key-struct.h" +#include "domain/ezsp-protocol/struct/ember-key-struct.h" #include "domain/byte-manip.h" diff --git a/src/domain/ezsp-protocol/struct/ember-key-struct.h b/src/domain/ezsp-protocol/struct/ember-key-struct.h index 9991f1b8..2f48b981 100644 --- a/src/domain/ezsp-protocol/struct/ember-key-struct.h +++ b/src/domain/ezsp-protocol/struct/ember-key-struct.h @@ -6,7 +6,7 @@ #pragma once -#include "../ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp b/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp index 06f70344..2ac68f28 100644 --- a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp +++ b/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp @@ -4,7 +4,7 @@ #include #include -#include "ember-network-parameters.h" +#include "domain/ezsp-protocol/struct/ember-network-parameters.h" #include "domain/byte-manip.h" diff --git a/src/domain/ezsp-protocol/struct/ember-network-parameters.h b/src/domain/ezsp-protocol/struct/ember-network-parameters.h index d85a521f..343de3fa 100644 --- a/src/domain/ezsp-protocol/struct/ember-network-parameters.h +++ b/src/domain/ezsp-protocol/struct/ember-network-parameters.h @@ -3,7 +3,7 @@ */ #pragma once -#include "../ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" #include #include diff --git a/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h b/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h index 88b17b6f..0a243516 100644 --- a/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h +++ b/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h @@ -7,11 +7,11 @@ */ #pragma once -#include "../../byte-manip.h" -#include "../ezsp-enum.h" -#include "ember-gp-address-struct.h" -#include "ember-gp-sink-table-entry-struct.h" -#include "../../zbmessage/gp-pairing-command-option-struct.h" +#include "domain/byte-manip.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" +#include "domain/zbmessage/gp-pairing-command-option-struct.h" #ifdef USE_RARITAN diff --git a/src/domain/zbmessage/aps.cpp b/src/domain/zbmessage/aps.cpp index 6022b7cf..3e7a6904 100644 --- a/src/domain/zbmessage/aps.cpp +++ b/src/domain/zbmessage/aps.cpp @@ -4,7 +4,7 @@ * @brief Handles encoding/decoding of the APS header */ -#include "aps.h" +#include "domain/zbmessage/aps.h" #include "domain/byte-manip.h" CAPSFrame::CAPSFrame() : cluster_id(0), dest_ep(0), group_id(0), option(), profile_id(0), sequence(0), src_ep(0) diff --git a/src/domain/zbmessage/aps.h b/src/domain/zbmessage/aps.h index 72d86825..073e747f 100644 --- a/src/domain/zbmessage/aps.h +++ b/src/domain/zbmessage/aps.h @@ -10,7 +10,7 @@ #include #include -#include "apsoption.h" +#include "domain/zbmessage/apsoption.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zbmessage/gp-pairing-command-option-struct.h b/src/domain/zbmessage/gp-pairing-command-option-struct.h index 79abcb1b..98b3db27 100644 --- a/src/domain/zbmessage/gp-pairing-command-option-struct.h +++ b/src/domain/zbmessage/gp-pairing-command-option-struct.h @@ -8,7 +8,7 @@ #include #include -#include "../ezsp-protocol/struct/ember-gp-sink-table-options-field.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp b/src/domain/zbmessage/gpd-commissioning-command-payload.cpp index 80f65c84..1f5c7563 100644 --- a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp +++ b/src/domain/zbmessage/gpd-commissioning-command-payload.cpp @@ -10,7 +10,7 @@ #include "domain/byte-manip.h" #include "domain/custom-aes.h" -#include "gpd-commissioning-command-payload.h" +#include "domain/zbmessage/gpd-commissioning-command-payload.h" CGpdCommissioningPayload::CGpdCommissioningPayload(const std::vector& raw_message, uint32_t i_src_id): device_id(raw_message.at(0)), diff --git a/src/domain/zbmessage/gpd-commissioning-command-payload.h b/src/domain/zbmessage/gpd-commissioning-command-payload.h index c2d8c201..08635f9c 100644 --- a/src/domain/zbmessage/gpd-commissioning-command-payload.h +++ b/src/domain/zbmessage/gpd-commissioning-command-payload.h @@ -8,7 +8,7 @@ #include #include -#include "../ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" // option bitfield #define COM_OPTION_MAC_SEQ_CAPABILITY_BIT 0 @@ -166,4 +166,4 @@ class CGpdCommissioningPayload uint16_t model_id; /*!< The model ID contained in this GPD commissioning command */ std::vector gpd_command_list; /*!< The GPD command list contained in this GPD commissioning command */ std::vector gpd_cluster_list; /*!< The GPD cluster list contained in this GPD commissioning command */ -}; \ No newline at end of file +}; diff --git a/src/domain/zbmessage/green-power-device.h b/src/domain/zbmessage/green-power-device.h index 48441e45..de813c0c 100644 --- a/src/domain/zbmessage/green-power-device.h +++ b/src/domain/zbmessage/green-power-device.h @@ -7,8 +7,8 @@ #pragma once #include -#include "../ezsp-protocol/ezsp-enum.h" -#include "../ezsp-protocol/struct/ember-gp-sink-table-options-field.h" +#include "domain/ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" /** * @brief Class to encapsulate data representing a green power device diff --git a/src/domain/zbmessage/green-power-frame.cpp b/src/domain/zbmessage/green-power-frame.cpp index 7a01a8ee..41d14e5d 100644 --- a/src/domain/zbmessage/green-power-frame.cpp +++ b/src/domain/zbmessage/green-power-frame.cpp @@ -8,7 +8,7 @@ #include #include "domain/byte-manip.h" -#include "green-power-frame.h" +#include "domain/zbmessage/green-power-frame.h" #include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" diff --git a/src/domain/zbmessage/zclframecontrol.cpp b/src/domain/zbmessage/zclframecontrol.cpp index 7e6c1851..25b8c042 100644 --- a/src/domain/zbmessage/zclframecontrol.cpp +++ b/src/domain/zbmessage/zclframecontrol.cpp @@ -4,7 +4,7 @@ * @brief Handles encoding/decoding of the ZCL frame control byte */ -#include "zclframecontrol.h" +#include "domain/zbmessage/zclframecontrol.h" CZCLFrameControl::CZCLFrameControl() : diff --git a/src/domain/zbmessage/zclheader.cpp b/src/domain/zbmessage/zclheader.cpp index f939751a..e2ede5a8 100644 --- a/src/domain/zbmessage/zclheader.cpp +++ b/src/domain/zbmessage/zclheader.cpp @@ -4,7 +4,7 @@ * @brief Handles encoding/decoding of ZCL headers */ -#include "zclheader.h" +#include "domain/zbmessage/zclheader.h" #include "domain/byte-manip.h" diff --git a/src/domain/zbmessage/zigbee-message.cpp b/src/domain/zbmessage/zigbee-message.cpp index 9846c1cb..bc1429df 100644 --- a/src/domain/zbmessage/zigbee-message.cpp +++ b/src/domain/zbmessage/zigbee-message.cpp @@ -4,7 +4,7 @@ * @brief Handles encoding/decoding of a zigbee message */ -#include "zigbee-message.h" +#include "domain/zbmessage/zigbee-message.h" CZigBeeMsg::CZigBeeMsg() : aps(), diff --git a/src/domain/zbmessage/zigbee-message.h b/src/domain/zbmessage/zigbee-message.h index a3df0661..f6797e0f 100644 --- a/src/domain/zbmessage/zigbee-message.h +++ b/src/domain/zbmessage/zigbee-message.h @@ -9,8 +9,8 @@ #include #include -#include "aps.h" -#include "zclheader.h" +#include "domain/zbmessage/aps.h" +#include "domain/zbmessage/zclheader.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/green-power-sink.cpp b/src/domain/zigbee-tools/green-power-sink.cpp index dc540a75..c692fb13 100644 --- a/src/domain/zigbee-tools/green-power-sink.cpp +++ b/src/domain/zigbee-tools/green-power-sink.cpp @@ -11,7 +11,7 @@ #include #include -#include "green-power-sink.h" +#include "domain/zigbee-tools/green-power-sink.h" #include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" #include "domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" diff --git a/src/domain/zigbee-tools/green-power-sink.h b/src/domain/zigbee-tools/green-power-sink.h index 998a0372..e75a94a6 100644 --- a/src/domain/zigbee-tools/green-power-sink.h +++ b/src/domain/zigbee-tools/green-power-sink.h @@ -8,14 +8,14 @@ #include -#include "../zbmessage/green-power-frame.h" -#include "../zbmessage/green-power-device.h" -#include "../green-power-observer.h" -#include "../ezsp-dongle.h" -#include "zigbee-messaging.h" -#include "../ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" -#include "../ezsp-protocol/struct/ember-process-gp-pairing-parameter.h" -#include "../ezsp-protocol/struct/ember-network-parameters.h" +#include "domain/zbmessage/green-power-frame.h" +#include "domain/zbmessage/green-power-device.h" +#include "domain/green-power-observer.h" +#include "domain/ezsp-dongle.h" +#include "domain/zigbee-tools/zigbee-messaging.h" +#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" +#include "domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h" +#include "domain/ezsp-protocol/struct/ember-network-parameters.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/zigbee-messaging.cpp b/src/domain/zigbee-tools/zigbee-messaging.cpp index ad2f0e5b..a28cf602 100644 --- a/src/domain/zigbee-tools/zigbee-messaging.cpp +++ b/src/domain/zigbee-tools/zigbee-messaging.cpp @@ -4,7 +4,7 @@ * @brief Manages zigbee message, timeout, retry */ -#include "zigbee-messaging.h" +#include "domain/zigbee-tools/zigbee-messaging.h" #include "spi/GenericLogger.h" diff --git a/src/domain/zigbee-tools/zigbee-messaging.h b/src/domain/zigbee-tools/zigbee-messaging.h index 97e99c6f..fe206adb 100644 --- a/src/domain/zigbee-tools/zigbee-messaging.h +++ b/src/domain/zigbee-tools/zigbee-messaging.h @@ -7,9 +7,9 @@ #include -#include "../ezsp-dongle-observer.h" -#include "../ezsp-dongle.h" -#include "../zbmessage/zigbee-message.h" +#include "domain/ezsp-dongle-observer.h" +#include "domain/ezsp-dongle.h" +#include "domain/zbmessage/zigbee-message.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/zigbee-networking.cpp b/src/domain/zigbee-tools/zigbee-networking.cpp index 5a2a4ae7..462c70e5 100644 --- a/src/domain/zigbee-tools/zigbee-networking.cpp +++ b/src/domain/zigbee-tools/zigbee-networking.cpp @@ -6,7 +6,7 @@ #include "domain/byte-manip.h" -#include "zigbee-networking.h" +#include "domain/zigbee-tools/zigbee-networking.h" #include "domain/ezsp-protocol/get-network-parameters-response.h" #include "domain/ezsp-protocol/struct/ember-key-struct.h" diff --git a/src/domain/zigbee-tools/zigbee-networking.h b/src/domain/zigbee-tools/zigbee-networking.h index 12e714ca..320fecfe 100644 --- a/src/domain/zigbee-tools/zigbee-networking.h +++ b/src/domain/zigbee-tools/zigbee-networking.h @@ -3,11 +3,11 @@ */ #pragma once -#include "zigbee-messaging.h" +#include "domain/zigbee-tools/zigbee-messaging.h" -#include "../ezsp-dongle-observer.h" -#include "../ezsp-dongle.h" -#include "../zbmessage/zigbee-message.h" +#include "domain/ezsp-dongle-observer.h" +#include "domain/ezsp-dongle.h" +#include "domain/zbmessage/zigbee-message.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/example/CAppDemo.cpp b/src/example/CAppDemo.cpp index 1288b66d..1e3ec99a 100644 --- a/src/example/CAppDemo.cpp +++ b/src/example/CAppDemo.cpp @@ -8,7 +8,7 @@ #include #include -#include "CAppDemo.h" +#include "example/CAppDemo.h" #include "domain/ezsp-protocol/get-network-parameters-response.h" #include "domain/ezsp-protocol/struct/ember-key-struct.h" #include "domain/ezsp-protocol/ezsp-enum.h" diff --git a/src/example/CAppDemo.h b/src/example/CAppDemo.h index f165e931..f1b2fd4e 100644 --- a/src/example/CAppDemo.h +++ b/src/example/CAppDemo.h @@ -6,14 +6,14 @@ #include -#include "../domain/ezsp-dongle.h" -#include "../domain/zigbee-tools/zigbee-networking.h" -#include "../domain/zigbee-tools/zigbee-messaging.h" -#include "../domain/zigbee-tools/green-power-sink.h" -#include "../domain/zbmessage/green-power-device.h" -#include "../spi/IUartDriver.h" -#include "../spi/ITimerFactory.h" -#include "../spi/ILogger.h" +#include "domain/ezsp-dongle.h" +#include "domain/zigbee-tools/zigbee-networking.h" +#include "domain/zigbee-tools/zigbee-messaging.h" +#include "domain/zigbee-tools/green-power-sink.h" +#include "domain/zbmessage/green-power-device.h" +#include "spi/IUartDriver.h" +#include "spi/ITimerFactory.h" +#include "spi/ILogger.h" #include "dummy_db.h" typedef enum diff --git a/src/example/dummy_db.h b/src/example/dummy_db.h index deabc8af..11810309 100644 --- a/src/example/dummy_db.h +++ b/src/example/dummy_db.h @@ -8,7 +8,7 @@ #include -#include "../domain/ezsp-protocol/ezsp-enum.h" +#include "domain/ezsp-protocol/ezsp-enum.h" class CProduct diff --git a/src/example/mainEzspTest.cpp b/src/example/mainEzspTest.cpp index 53f111f6..2b5e9ca3 100644 --- a/src/example/mainEzspTest.cpp +++ b/src/example/mainEzspTest.cpp @@ -20,7 +20,7 @@ #endif // USE_RARITAN #endif // USE_SERIALCPP #include "spi/GenericLogger.h" -#include "CAppDemo.h" +#include "example/CAppDemo.h" #include #include #include diff --git a/src/spi/cppthreads/CppThreadsTimer.h b/src/spi/cppthreads/CppThreadsTimer.h index 13faf633..f3b76d26 100644 --- a/src/spi/cppthreads/CppThreadsTimer.h +++ b/src/spi/cppthreads/CppThreadsTimer.h @@ -6,7 +6,7 @@ #pragma once -#include "../ITimer.h" +#include "spi/ITimer.h" #include #include diff --git a/src/spi/cppthreads/CppThreadsTimerFactory.h b/src/spi/cppthreads/CppThreadsTimerFactory.h index 8e30f5ef..26b66bba 100644 --- a/src/spi/cppthreads/CppThreadsTimerFactory.h +++ b/src/spi/cppthreads/CppThreadsTimerFactory.h @@ -5,7 +5,7 @@ */ #pragma once -#include "../ITimerFactory.h" +#include "spi/ITimerFactory.h" #include "CppThreadsTimer.h" /** diff --git a/src/spi/mock-uart/MockUartDriver.h b/src/spi/mock-uart/MockUartDriver.h index 68cc2824..112e4a7e 100644 --- a/src/spi/mock-uart/MockUartDriver.h +++ b/src/spi/mock-uart/MockUartDriver.h @@ -7,7 +7,7 @@ #pragma once -#include "../IUartDriver.h" +#include "spi/IUartDriver.h" #include #include #include diff --git a/src/spi/raritan/RaritanLogger.h b/src/spi/raritan/RaritanLogger.h index 6c4af75e..d57b543e 100644 --- a/src/spi/raritan/RaritanLogger.h +++ b/src/spi/raritan/RaritanLogger.h @@ -10,7 +10,7 @@ * @brief Macro to allow logger getter to fetch the singleton instance of this logger class **/ #define SINGLETON_LOGGER_CLASS_NAME RaritanLogger -#include "../ILogger.h" +#include "spi/ILogger.h" #include #ifdef USE_RARITAN diff --git a/src/spi/raritan/RaritanTimer.h b/src/spi/raritan/RaritanTimer.h index 1c49d2b3..09d50e7a 100644 --- a/src/spi/raritan/RaritanTimer.h +++ b/src/spi/raritan/RaritanTimer.h @@ -6,7 +6,7 @@ #pragma once -#include "../ITimer.h" +#include "spi/ITimer.h" #include "RaritanEventLoop.h" #include diff --git a/src/spi/raritan/RaritanUartDriver.cpp b/src/spi/raritan/RaritanUartDriver.cpp index f9fe86d5..d4a12f06 100644 --- a/src/spi/raritan/RaritanUartDriver.cpp +++ b/src/spi/raritan/RaritanUartDriver.cpp @@ -6,7 +6,7 @@ #include "RaritanUartDriver.h" #include -#include "../GenericLogger.h" +#include "spi/GenericLogger.h" RaritanUartDriver::RaritanUartDriver(RaritanEventLoop& eventLoop, GenericAsyncDataInputObservable* uartIncomingDataHandler) : m_eventLoop(eventLoop), m_sel_handle(), m_serial_tty(), m_data_input_observable(uartIncomingDataHandler) { } diff --git a/src/spi/raritan/RaritanUartDriver.h b/src/spi/raritan/RaritanUartDriver.h index f6732ef8..19fa3f4f 100644 --- a/src/spi/raritan/RaritanUartDriver.h +++ b/src/spi/raritan/RaritanUartDriver.h @@ -9,7 +9,7 @@ #include #include #include -#include "../IUartDriver.h" +#include "spi/IUartDriver.h" #include "RaritanEventLoop.h" #ifdef USE_RARITAN diff --git a/src/spi/serial/SerialUartDriver.h b/src/spi/serial/SerialUartDriver.h index 4317a73b..95c440d3 100644 --- a/src/spi/serial/SerialUartDriver.h +++ b/src/spi/serial/SerialUartDriver.h @@ -7,7 +7,7 @@ #pragma once -#include "../IUartDriver.h" +#include "spi/IUartDriver.h" #include #include "serial/serial.h" diff --git a/src/tests/gp_tests.cpp b/src/tests/gp_tests.cpp index 11be56e5..44151c43 100644 --- a/src/tests/gp_tests.cpp +++ b/src/tests/gp_tests.cpp @@ -1,14 +1,14 @@ -#include "TestHarness.h" +#include "tests/TestHarness.h" #include #include #include -#include "../spi/mock-uart/MockUartDriver.h" -#include "../spi/cppthreads/CppThreadsTimerFactory.h" -#include "../spi/IAsyncDataInputObserver.h" +#include "spi/mock-uart/MockUartDriver.h" +#include "spi/cppthreads/CppThreadsTimerFactory.h" +#include "spi/IAsyncDataInputObserver.h" -#include "../spi/GenericLogger.h" -#include "../example/CAppDemo.h" +#include "spi/GenericLogger.h" +#include "example/CAppDemo.h" /** * @brief Class implementing an observer that validates state transition during a sample ezsp in/out test sequence diff --git a/src/tests/mock_serial_self_tests.cpp b/src/tests/mock_serial_self_tests.cpp index b72ce0fc..73e1befb 100644 --- a/src/tests/mock_serial_self_tests.cpp +++ b/src/tests/mock_serial_self_tests.cpp @@ -1,9 +1,9 @@ -#include "TestHarness.h" +#include "tests/TestHarness.h" #include #include -#include "../spi/mock-uart/MockUartDriver.h" -#include "../spi/IAsyncDataInputObserver.h" +#include "spi/mock-uart/MockUartDriver.h" +#include "spi/IAsyncDataInputObserver.h" /** * @brief Write callback class to test the mock serial interface From 6224c2b130f3d34a2d3a5554ff997cb4e9a27206 Mon Sep 17 00:00:00 2001 From: mchalain Date: Thu, 12 Dec 2019 08:55:56 +0100 Subject: [PATCH 008/413] [build] add main makefile and defconfig --- Makefile | 6 ++++++ defconfig | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 Makefile create mode 100644 defconfig diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..03e40814 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +include build/scripts.mk + +package=ezsp +version=1.1 + +subdir-y+=src diff --git a/defconfig b/defconfig new file mode 100644 index 00000000..6ba06503 --- /dev/null +++ b/defconfig @@ -0,0 +1,5 @@ +USE_RARITAN=n +USE_CPPTHREADS=y +USE_SERIALCPP=y + +TEST=y From a8577618213c5acf3502abf79b54ac7f0989ece7 Mon Sep 17 00:00:00 2001 From: mchalain Date: Thu, 12 Dec 2019 12:09:54 +0100 Subject: [PATCH 009/413] [build] move src/example to the root directory --- Makefile | 11 +++++++++++ {src/example => example}/CAppDemo.cpp | 0 {src/example => example}/CAppDemo.h | 0 {src/example => example}/Makefile | 0 {src/example => example}/dummy_db.cpp | 0 {src/example => example}/dummy_db.h | 0 {src/example => example}/mainEzspTest.cpp | 0 src/Makefile | 10 ---------- {src/tests => tests}/Makefile | 0 {src/tests => tests}/TestHarness.h | 0 {src/tests => tests}/gp_tests.cpp | 0 {src/tests => tests}/mock_serial_self_tests.cpp | 0 {src/tests => tests}/test_libezsp.cpp | 0 13 files changed, 11 insertions(+), 10 deletions(-) rename {src/example => example}/CAppDemo.cpp (100%) rename {src/example => example}/CAppDemo.h (100%) rename {src/example => example}/Makefile (100%) rename {src/example => example}/dummy_db.cpp (100%) rename {src/example => example}/dummy_db.h (100%) rename {src/example => example}/mainEzspTest.cpp (100%) rename {src/tests => tests}/Makefile (100%) rename {src/tests => tests}/TestHarness.h (100%) rename {src/tests => tests}/gp_tests.cpp (100%) rename {src/tests => tests}/mock_serial_self_tests.cpp (100%) rename {src/tests => tests}/test_libezsp.cpp (100%) diff --git a/Makefile b/Makefile index 03e40814..ad964779 100644 --- a/Makefile +++ b/Makefile @@ -4,3 +4,14 @@ package=ezsp version=1.1 subdir-y+=src + +bin-$(TEST)+=mainEzspTest + +mainEzspTest_CFLAGS+=-Isrc +mainEzspTest_LDFLAGS+=-Lsrc + +mainEzspTest_SOURCES+=example/CAppDemo.cpp +mainEzspTest_SOURCES+=example/mainEzspTest.cpp +mainEzspTest_SOURCES+=example/dummy_db.cpp +mainEzspTest_LIBRARY+=ezsp +mainEzspTest_LIBRARY+=serialcpp diff --git a/src/example/CAppDemo.cpp b/example/CAppDemo.cpp similarity index 100% rename from src/example/CAppDemo.cpp rename to example/CAppDemo.cpp diff --git a/src/example/CAppDemo.h b/example/CAppDemo.h similarity index 100% rename from src/example/CAppDemo.h rename to example/CAppDemo.h diff --git a/src/example/Makefile b/example/Makefile similarity index 100% rename from src/example/Makefile rename to example/Makefile diff --git a/src/example/dummy_db.cpp b/example/dummy_db.cpp similarity index 100% rename from src/example/dummy_db.cpp rename to example/dummy_db.cpp diff --git a/src/example/dummy_db.h b/example/dummy_db.h similarity index 100% rename from src/example/dummy_db.h rename to example/dummy_db.h diff --git a/src/example/mainEzspTest.cpp b/example/mainEzspTest.cpp similarity index 100% rename from src/example/mainEzspTest.cpp rename to example/mainEzspTest.cpp diff --git a/src/Makefile b/src/Makefile index 7506b786..366d9074 100644 --- a/src/Makefile +++ b/src/Makefile @@ -49,13 +49,3 @@ ezsp_LIBS-$(USE_CPPTHREADS)+=pthread ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanUartDriver.cpp ezsp_SOURCES-$(USE_SERIALCPP)+=spi/serial/SerialUartDriver.cpp ezsp_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp - -bin-$(TEST)+=mainEzspTest - -mainEzspTest_CFLAGS+=-I. - -mainEzspTest_SOURCES+=example/CAppDemo.cpp -mainEzspTest_SOURCES+=example/mainEzspTest.cpp -mainEzspTest_SOURCES+=example/dummy_db.cpp -mainEzspTest_LIBRARY+=ezsp -mainEzspTest_LIBRARY+=serialcpp diff --git a/src/tests/Makefile b/tests/Makefile similarity index 100% rename from src/tests/Makefile rename to tests/Makefile diff --git a/src/tests/TestHarness.h b/tests/TestHarness.h similarity index 100% rename from src/tests/TestHarness.h rename to tests/TestHarness.h diff --git a/src/tests/gp_tests.cpp b/tests/gp_tests.cpp similarity index 100% rename from src/tests/gp_tests.cpp rename to tests/gp_tests.cpp diff --git a/src/tests/mock_serial_self_tests.cpp b/tests/mock_serial_self_tests.cpp similarity index 100% rename from src/tests/mock_serial_self_tests.cpp rename to tests/mock_serial_self_tests.cpp diff --git a/src/tests/test_libezsp.cpp b/tests/test_libezsp.cpp similarity index 100% rename from src/tests/test_libezsp.cpp rename to tests/test_libezsp.cpp From 7b3c36b3af86e82aff076bcabacaadf0f0cdfba5 Mon Sep 17 00:00:00 2001 From: mchalain Date: Thu, 12 Dec 2019 12:15:08 +0100 Subject: [PATCH 010/413] [build] separate spi from libezsp --- Makefile | 1 + src/Makefile | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index ad964779..189cd933 100644 --- a/Makefile +++ b/Makefile @@ -14,4 +14,5 @@ mainEzspTest_SOURCES+=example/CAppDemo.cpp mainEzspTest_SOURCES+=example/mainEzspTest.cpp mainEzspTest_SOURCES+=example/dummy_db.cpp mainEzspTest_LIBRARY+=ezsp +mainEzspTest_LIBRARY+=ezpspi mainEzspTest_LIBRARY+=serialcpp diff --git a/src/Makefile b/src/Makefile index 366d9074..37f055a9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,17 +35,20 @@ ezsp_SOURCES+=domain/zigbee-tools/green-power-sink.cpp ezsp_SOURCES+=domain/zigbee-tools/zigbee-messaging.cpp ezsp_SOURCES+=domain/zigbee-tools/zigbee-networking.cpp -ezsp_SOURCES+=spi/GenericAsyncDataInputObservable.cpp -ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanEventLoop.cpp -ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimer.cpp -ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimerFactory.cpp +lib-y+=ezpspi -ezsp_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimer.cpp -ezsp_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimerFactory.cpp -ezsp_SOURCES-$(USE_SERIALCPP)+=spi/console/ConsoleLogger.cpp -ezsp_LIBS-$(USE_CPPTHREADS)+=pthread +ezpspi_SOURCES+=spi/GenericAsyncDataInputObservable.cpp -ezsp_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanUartDriver.cpp -ezsp_SOURCES-$(USE_SERIALCPP)+=spi/serial/SerialUartDriver.cpp -ezsp_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp +ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanEventLoop.cpp +ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimer.cpp +ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimerFactory.cpp + +ezpspi_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimer.cpp +ezpspi_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimerFactory.cpp +ezpspi_SOURCES-$(USE_SERIALCPP)+=spi/console/ConsoleLogger.cpp +ezpspi_LIBS-$(USE_CPPTHREADS)+=pthread + +ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanUartDriver.cpp +ezpspi_SOURCES-$(USE_SERIALCPP)+=spi/serial/SerialUartDriver.cpp +ezpspi_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp From be8a588b93967b2b6b5cd19caa1f65e5298c582a Mon Sep 17 00:00:00 2001 From: mchalain Date: Thu, 12 Dec 2019 16:28:07 +0100 Subject: [PATCH 011/413] [build] move src/domain to src/ezsp --- example/CAppDemo.cpp | 12 ++-- example/CAppDemo.h | 10 +-- example/Makefile | 4 +- example/dummy_db.h | 2 +- src/Makefile | 65 +++++++++---------- src/{domain => ezsp}/ash.cpp | 0 src/{domain => ezsp}/ash.h | 0 src/{domain => ezsp}/byte-manip.h | 0 src/{domain => ezsp}/custom-aes.cpp | 0 src/{domain => ezsp}/custom-aes.h | 0 src/{domain => ezsp}/ezsp-dongle-observer.h | 0 src/{domain => ezsp}/ezsp-dongle.cpp | 0 src/{domain => ezsp}/ezsp-dongle.h | 0 .../ezsp-protocol/ezsp-enum.cpp | 4 +- .../ezsp-protocol/ezsp-enum.h | 0 .../get-network-parameters-response.cpp | 2 +- .../get-network-parameters-response.h | 4 +- .../struct/ember-child-data-struct.cpp | 4 +- .../struct/ember-child-data-struct.h | 2 +- .../struct/ember-gp-address-struct.cpp | 0 .../struct/ember-gp-address-struct.h | 4 +- .../ember-gp-proxy-table-entry-struct.cpp | 4 +- .../ember-gp-proxy-table-entry-struct.h | 4 +- .../ember-gp-sink-table-entry-struct.cpp | 4 +- .../struct/ember-gp-sink-table-entry-struct.h | 6 +- .../ember-gp-sink-table-options-field.cpp | 0 .../ember-gp-sink-table-options-field.h | 4 +- .../ezsp-protocol/struct/ember-key-struct.cpp | 4 +- .../ezsp-protocol/struct/ember-key-struct.h | 4 +- .../struct/ember-network-parameters.cpp | 6 +- .../struct/ember-network-parameters.h | 2 +- .../ember-process-gp-pairing-parameter.cpp | 0 .../ember-process-gp-pairing-parameter.h | 10 +-- src/{domain => ezsp}/green-power-observer.h | 0 src/{domain => ezsp}/zbmessage/aps.cpp | 4 +- src/{domain => ezsp}/zbmessage/aps.h | 2 +- src/{domain => ezsp}/zbmessage/apsoption.cpp | 0 src/{domain => ezsp}/zbmessage/apsoption.h | 0 .../gp-pairing-command-option-struct.cpp | 0 .../gp-pairing-command-option-struct.h | 2 +- .../gpd-commissioning-command-payload.cpp | 6 +- .../gpd-commissioning-command-payload.h | 2 +- .../zbmessage/green-power-device.cpp | 0 .../zbmessage/green-power-device.h | 4 +- .../zbmessage/green-power-frame.cpp | 6 +- .../zbmessage/green-power-frame.h | 0 .../green-power-sink-table-entry.cpp | 0 .../zbmessage/green-power-sink-table-entry.h | 0 .../zbmessage/zclframecontrol.cpp | 2 +- .../zbmessage/zclframecontrol.h | 0 src/{domain => ezsp}/zbmessage/zclheader.cpp | 6 +- src/{domain => ezsp}/zbmessage/zclheader.h | 0 src/{domain => ezsp}/zbmessage/zdp-enum.cpp | 0 src/{domain => ezsp}/zbmessage/zdp-enum.h | 0 .../zbmessage/zigbee-message.cpp | 4 +- .../zbmessage/zigbee-message.h | 4 +- .../zigbee-tools/green-power-sink.cpp | 14 ++-- .../zigbee-tools/green-power-sink.h | 18 ++--- .../zigbee-tools/zigbee-messaging.cpp | 2 +- .../zigbee-tools/zigbee-messaging.h | 6 +- .../zigbee-tools/zigbee-networking.cpp | 10 +-- .../zigbee-tools/zigbee-networking.h | 8 +-- tests/Makefile | 16 ++--- 63 files changed, 138 insertions(+), 139 deletions(-) rename src/{domain => ezsp}/ash.cpp (100%) rename src/{domain => ezsp}/ash.h (100%) rename src/{domain => ezsp}/byte-manip.h (100%) rename src/{domain => ezsp}/custom-aes.cpp (100%) rename src/{domain => ezsp}/custom-aes.h (100%) rename src/{domain => ezsp}/ezsp-dongle-observer.h (100%) rename src/{domain => ezsp}/ezsp-dongle.cpp (100%) rename src/{domain => ezsp}/ezsp-dongle.h (100%) rename src/{domain => ezsp}/ezsp-protocol/ezsp-enum.cpp (99%) rename src/{domain => ezsp}/ezsp-protocol/ezsp-enum.h (100%) rename src/{domain => ezsp}/ezsp-protocol/get-network-parameters-response.cpp (93%) rename src/{domain => ezsp}/ezsp-protocol/get-network-parameters-response.h (95%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-child-data-struct.cpp (97%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-child-data-struct.h (98%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-address-struct.cpp (100%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-address-struct.h (97%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp (91%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h (95%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp (98%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h (97%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp (100%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-gp-sink-table-options-field.h (97%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-key-struct.cpp (96%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-key-struct.h (98%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-network-parameters.cpp (98%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-network-parameters.h (99%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp (100%) rename src/{domain => ezsp}/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h (90%) rename src/{domain => ezsp}/green-power-observer.h (100%) rename src/{domain => ezsp}/zbmessage/aps.cpp (97%) rename src/{domain => ezsp}/zbmessage/aps.h (98%) rename src/{domain => ezsp}/zbmessage/apsoption.cpp (100%) rename src/{domain => ezsp}/zbmessage/apsoption.h (100%) rename src/{domain => ezsp}/zbmessage/gp-pairing-command-option-struct.cpp (100%) rename src/{domain => ezsp}/zbmessage/gp-pairing-command-option-struct.h (99%) rename src/{domain => ezsp}/zbmessage/gpd-commissioning-command-payload.cpp (98%) rename src/{domain => ezsp}/zbmessage/gpd-commissioning-command-payload.h (99%) rename src/{domain => ezsp}/zbmessage/green-power-device.cpp (100%) rename src/{domain => ezsp}/zbmessage/green-power-device.h (95%) rename src/{domain => ezsp}/zbmessage/green-power-frame.cpp (96%) rename src/{domain => ezsp}/zbmessage/green-power-frame.h (100%) rename src/{domain => ezsp}/zbmessage/green-power-sink-table-entry.cpp (100%) rename src/{domain => ezsp}/zbmessage/green-power-sink-table-entry.h (100%) rename src/{domain => ezsp}/zbmessage/zclframecontrol.cpp (97%) rename src/{domain => ezsp}/zbmessage/zclframecontrol.h (100%) rename src/{domain => ezsp}/zbmessage/zclheader.cpp (98%) rename src/{domain => ezsp}/zbmessage/zclheader.h (100%) rename src/{domain => ezsp}/zbmessage/zdp-enum.cpp (100%) rename src/{domain => ezsp}/zbmessage/zdp-enum.h (100%) rename src/{domain => ezsp}/zbmessage/zigbee-message.cpp (98%) rename src/{domain => ezsp}/zbmessage/zigbee-message.h (99%) rename src/{domain => ezsp}/zigbee-tools/green-power-sink.cpp (98%) rename src/{domain => ezsp}/zigbee-tools/green-power-sink.h (93%) rename src/{domain => ezsp}/zigbee-tools/zigbee-messaging.cpp (98%) rename src/{domain => ezsp}/zigbee-tools/zigbee-messaging.h (92%) rename src/{domain => ezsp}/zigbee-tools/zigbee-networking.cpp (97%) rename src/{domain => ezsp}/zigbee-tools/zigbee-networking.h (92%) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index 1e3ec99a..1901d0a2 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -9,12 +9,12 @@ #include #include "example/CAppDemo.h" -#include "domain/ezsp-protocol/get-network-parameters-response.h" -#include "domain/ezsp-protocol/struct/ember-key-struct.h" -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/zbmessage/zdp-enum.h" -#include "domain/zbmessage/zigbee-message.h" -#include "domain/byte-manip.h" +#include "ezsp/ezsp-protocol/get-network-parameters-response.h" +#include "ezsp/ezsp-protocol/struct/ember-key-struct.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/zbmessage/zdp-enum.h" +#include "ezsp/zbmessage/zigbee-message.h" +#include "ezsp/byte-manip.h" CAppDemo::CAppDemo(IUartDriver& uartDriver, diff --git a/example/CAppDemo.h b/example/CAppDemo.h index f1b2fd4e..81555dc5 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -6,11 +6,11 @@ #include -#include "domain/ezsp-dongle.h" -#include "domain/zigbee-tools/zigbee-networking.h" -#include "domain/zigbee-tools/zigbee-messaging.h" -#include "domain/zigbee-tools/green-power-sink.h" -#include "domain/zbmessage/green-power-device.h" +#include "ezsp/ezsp-dongle.h" +#include "ezsp/zigbee-tools/zigbee-networking.h" +#include "ezsp/zigbee-tools/zigbee-messaging.h" +#include "ezsp/zigbee-tools/green-power-sink.h" +#include "ezsp/zbmessage/green-power-device.h" #include "spi/IUartDriver.h" #include "spi/ITimerFactory.h" #include "spi/ILogger.h" diff --git a/example/Makefile b/example/Makefile index 176d7d5d..e1e641d9 100644 --- a/example/Makefile +++ b/example/Makefile @@ -5,8 +5,8 @@ CXXFLAGS = -DUSE_SERIALCPP -W -Wall -pedantic -std=c++11 -Wno-unused-parameter - LDFLAGS = $(LOCAL_LDFLAGS) -lserialcpp -lpthread # SRC_PATH should point to the src/ folder containing source code for this library (can be overridden from environment) -SRC_PATH ?= .. -SRC_DOMAIN_PATH ?= $(SRC_PATH)/domain +SRC_PATH ?= ../ +SRC_DOMAIN_PATH ?= $(SRC_PATH)src/ezsp SRC_SPI_PATH ?= $(SRC_PATH)/spi include ../libezsp.mk.inc diff --git a/example/dummy_db.h b/example/dummy_db.h index 11810309..9c7c5d15 100644 --- a/example/dummy_db.h +++ b/example/dummy_db.h @@ -8,7 +8,7 @@ #include -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" class CProduct diff --git a/src/Makefile b/src/Makefile index 37f055a9..ece269d9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2,39 +2,38 @@ lib-y=ezsp ezsp_CFLAGS+=-I. -ezsp_SOURCES+=domain/ash.cpp -ezsp_SOURCES+=domain/custom-aes.cpp -ezsp_SOURCES+=domain/ezsp-dongle.cpp - -ezsp_HEADERS+=domain/ezsp-dongle-observer.h - -ezsp_SOURCES+=domain/ezsp-protocol/ezsp-enum.cpp -ezsp_SOURCES+=domain/ezsp-protocol/get-network-parameters-response.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-child-data-struct.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-address-struct.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-key-struct.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-network-parameters.cpp -ezsp_SOURCES+=domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp - -ezsp_SOURCES+=domain/zbmessage/aps.cpp -ezsp_SOURCES+=domain/zbmessage/apsoption.cpp -ezsp_SOURCES+=domain/zbmessage/gpd-commissioning-command-payload.cpp -ezsp_SOURCES+=domain/zbmessage/gp-pairing-command-option-struct.cpp -ezsp_SOURCES+=domain/zbmessage/green-power-device.cpp -ezsp_SOURCES+=domain/zbmessage/green-power-frame.cpp -ezsp_SOURCES+=domain/zbmessage/green-power-sink-table-entry.cpp -ezsp_SOURCES+=domain/zbmessage/zclframecontrol.cpp -ezsp_SOURCES+=domain/zbmessage/zclheader.cpp -ezsp_SOURCES+=domain/zbmessage/zdp-enum.cpp -ezsp_SOURCES+=domain/zbmessage/zigbee-message.cpp - -ezsp_SOURCES+=domain/zigbee-tools/green-power-sink.cpp -ezsp_SOURCES+=domain/zigbee-tools/zigbee-messaging.cpp -ezsp_SOURCES+=domain/zigbee-tools/zigbee-networking.cpp - +ezsp_SOURCES+=ezsp/ash.cpp +ezsp_SOURCES+=ezsp/custom-aes.cpp +ezsp_SOURCES+=ezsp/ezsp-dongle.cpp + +ezsp_HEADERS+=ezsp/ezsp-dongle-observer.h + +ezsp_SOURCES+=ezsp/ezsp-protocol/ezsp-enum.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/get-network-parameters-response.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-address-struct.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-key-struct.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-network-parameters.cpp +ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp + +ezsp_SOURCES+=ezsp/zbmessage/aps.cpp +ezsp_SOURCES+=ezsp/zbmessage/apsoption.cpp +ezsp_SOURCES+=ezsp/zbmessage/gpd-commissioning-command-payload.cpp +ezsp_SOURCES+=ezsp/zbmessage/gp-pairing-command-option-struct.cpp +ezsp_SOURCES+=ezsp/zbmessage/green-power-device.cpp +ezsp_SOURCES+=ezsp/zbmessage/green-power-frame.cpp +ezsp_SOURCES+=ezsp/zbmessage/green-power-sink-table-entry.cpp +ezsp_SOURCES+=ezsp/zbmessage/zclframecontrol.cpp +ezsp_SOURCES+=ezsp/zbmessage/zclheader.cpp +ezsp_SOURCES+=ezsp/zbmessage/zdp-enum.cpp +ezsp_SOURCES+=ezsp/zbmessage/zigbee-message.cpp + +ezsp_SOURCES+=ezsp/zigbee-tools/green-power-sink.cpp +ezsp_SOURCES+=ezsp/zigbee-tools/zigbee-messaging.cpp +ezsp_SOURCES+=ezsp/zigbee-tools/zigbee-networking.cpp lib-y+=ezpspi diff --git a/src/domain/ash.cpp b/src/ezsp/ash.cpp similarity index 100% rename from src/domain/ash.cpp rename to src/ezsp/ash.cpp diff --git a/src/domain/ash.h b/src/ezsp/ash.h similarity index 100% rename from src/domain/ash.h rename to src/ezsp/ash.h diff --git a/src/domain/byte-manip.h b/src/ezsp/byte-manip.h similarity index 100% rename from src/domain/byte-manip.h rename to src/ezsp/byte-manip.h diff --git a/src/domain/custom-aes.cpp b/src/ezsp/custom-aes.cpp similarity index 100% rename from src/domain/custom-aes.cpp rename to src/ezsp/custom-aes.cpp diff --git a/src/domain/custom-aes.h b/src/ezsp/custom-aes.h similarity index 100% rename from src/domain/custom-aes.h rename to src/ezsp/custom-aes.h diff --git a/src/domain/ezsp-dongle-observer.h b/src/ezsp/ezsp-dongle-observer.h similarity index 100% rename from src/domain/ezsp-dongle-observer.h rename to src/ezsp/ezsp-dongle-observer.h diff --git a/src/domain/ezsp-dongle.cpp b/src/ezsp/ezsp-dongle.cpp similarity index 100% rename from src/domain/ezsp-dongle.cpp rename to src/ezsp/ezsp-dongle.cpp diff --git a/src/domain/ezsp-dongle.h b/src/ezsp/ezsp-dongle.h similarity index 100% rename from src/domain/ezsp-dongle.h rename to src/ezsp/ezsp-dongle.h diff --git a/src/domain/ezsp-protocol/ezsp-enum.cpp b/src/ezsp/ezsp-protocol/ezsp-enum.cpp similarity index 99% rename from src/domain/ezsp-protocol/ezsp-enum.cpp rename to src/ezsp/ezsp-protocol/ezsp-enum.cpp index 77ee3776..f47ff700 100644 --- a/src/domain/ezsp-protocol/ezsp-enum.cpp +++ b/src/ezsp/ezsp-protocol/ezsp-enum.cpp @@ -1,9 +1,9 @@ /** - * + * */ #include -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" std::string CEzspEnum::EmberNodeTypeToString( EmberNodeType in ) { diff --git a/src/domain/ezsp-protocol/ezsp-enum.h b/src/ezsp/ezsp-protocol/ezsp-enum.h similarity index 100% rename from src/domain/ezsp-protocol/ezsp-enum.h rename to src/ezsp/ezsp-protocol/ezsp-enum.h diff --git a/src/domain/ezsp-protocol/get-network-parameters-response.cpp b/src/ezsp/ezsp-protocol/get-network-parameters-response.cpp similarity index 93% rename from src/domain/ezsp-protocol/get-network-parameters-response.cpp rename to src/ezsp/ezsp-protocol/get-network-parameters-response.cpp index bed21b4a..e39a4bac 100644 --- a/src/domain/ezsp-protocol/get-network-parameters-response.cpp +++ b/src/ezsp/ezsp-protocol/get-network-parameters-response.cpp @@ -6,7 +6,7 @@ #include -#include "domain/ezsp-protocol/get-network-parameters-response.h" +#include "ezsp/ezsp-protocol/get-network-parameters-response.h" CGetNetworkParamtersResponse::CGetNetworkParamtersResponse(const std::vector& raw_message) : status(static_cast(raw_message.at(0))), diff --git a/src/domain/ezsp-protocol/get-network-parameters-response.h b/src/ezsp/ezsp-protocol/get-network-parameters-response.h similarity index 95% rename from src/domain/ezsp-protocol/get-network-parameters-response.h rename to src/ezsp/ezsp-protocol/get-network-parameters-response.h index 0ec53ccd..5915937a 100644 --- a/src/domain/ezsp-protocol/get-network-parameters-response.h +++ b/src/ezsp/ezsp-protocol/get-network-parameters-response.h @@ -7,8 +7,8 @@ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "struct/ember-network-parameters.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/struct/ember-network-parameters.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp similarity index 97% rename from src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp rename to src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp index d473b24b..a8ff2e48 100644 --- a/src/domain/ezsp-protocol/struct/ember-child-data-struct.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp @@ -7,9 +7,9 @@ #include #include -#include "domain/ezsp-protocol/struct/ember-child-data-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-child-data-struct.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" CEmberChildDataStruct::CEmberChildDataStruct(const std::vector& raw_message) : eui64(), diff --git a/src/domain/ezsp-protocol/struct/ember-child-data-struct.h b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.h similarity index 98% rename from src/domain/ezsp-protocol/struct/ember-child-data-struct.h rename to src/ezsp/ezsp-protocol/struct/ember-child-data-struct.h index f364c781..e5ff9fe2 100644 --- a/src/domain/ezsp-protocol/struct/ember-child-data-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.h @@ -6,7 +6,7 @@ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" class CEmberChildDataStruct { diff --git a/src/domain/ezsp-protocol/struct/ember-gp-address-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-gp-address-struct.cpp similarity index 100% rename from src/domain/ezsp-protocol/struct/ember-gp-address-struct.cpp rename to src/ezsp/ezsp-protocol/struct/ember-gp-address-struct.cpp diff --git a/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h b/src/ezsp/ezsp-protocol/struct/ember-gp-address-struct.h similarity index 97% rename from src/domain/ezsp-protocol/struct/ember-gp-address-struct.h rename to src/ezsp/ezsp-protocol/struct/ember-gp-address-struct.h index 3e5bb202..12f67d06 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-address-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-address-struct.h @@ -5,8 +5,8 @@ */ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/byte-manip.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/byte-manip.h" class CEmberGpAddressStruct { diff --git a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp similarity index 91% rename from src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp rename to src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp index e9399650..f130090f 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp @@ -7,9 +7,9 @@ #include #include -#include "domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" /** \todo Verify value !!! */ CEmberGpProxyTableEntryStruct::CEmberGpProxyTableEntryStruct(const std::vector& raw_message) : diff --git a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h similarity index 95% rename from src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h rename to src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h index 2a8593b2..7b3c5afa 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h @@ -6,8 +6,8 @@ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-address-struct.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp similarity index 98% rename from src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp rename to src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp index 0a04f44f..04e8255f 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp @@ -7,9 +7,9 @@ #include #include -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" CEmberGpSinkTableEntryStruct::CEmberGpSinkTableEntryStruct(): status(0xFF), diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h similarity index 97% rename from src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h rename to src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h index 1d8202b8..020868ea 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h @@ -6,9 +6,9 @@ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp similarity index 100% rename from src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp rename to src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp diff --git a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h similarity index 97% rename from src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h rename to src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h index 2d3af311..03692a62 100644 --- a/src/domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h @@ -17,8 +17,8 @@ #pragma once #include -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/zbmessage/gpd-commissioning-command-payload.h" // BAD DEPENDANCY NEED TO BE INPROVE +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/zbmessage/gpd-commissioning-command-payload.h" // BAD DEPENDANCY NEED TO BE INPROVE #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/ezsp-protocol/struct/ember-key-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-key-struct.cpp similarity index 96% rename from src/domain/ezsp-protocol/struct/ember-key-struct.cpp rename to src/ezsp/ezsp-protocol/struct/ember-key-struct.cpp index d9708c81..7574f2cc 100644 --- a/src/domain/ezsp-protocol/struct/ember-key-struct.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-key-struct.cpp @@ -7,9 +7,9 @@ #include #include -#include "domain/ezsp-protocol/struct/ember-key-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-key-struct.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" CEmberKeyStruct::CEmberKeyStruct(const std::vector& raw_message) : bitmask(static_cast(dble_u8_to_u16(raw_message.at(1), raw_message.at(0)))), diff --git a/src/domain/ezsp-protocol/struct/ember-key-struct.h b/src/ezsp/ezsp-protocol/struct/ember-key-struct.h similarity index 98% rename from src/domain/ezsp-protocol/struct/ember-key-struct.h rename to src/ezsp/ezsp-protocol/struct/ember-key-struct.h index 2f48b981..8d66ac1c 100644 --- a/src/domain/ezsp-protocol/struct/ember-key-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-key-struct.h @@ -6,7 +6,7 @@ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ @@ -53,7 +53,7 @@ class CEmberKeyStruct * @brief The type of the key. */ EmberKeyType getType() const { return type; } - + /** * @brief The actual key data. */ diff --git a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp b/src/ezsp/ezsp-protocol/struct/ember-network-parameters.cpp similarity index 98% rename from src/domain/ezsp-protocol/struct/ember-network-parameters.cpp rename to src/ezsp/ezsp-protocol/struct/ember-network-parameters.cpp index 2ac68f28..0c250150 100644 --- a/src/domain/ezsp-protocol/struct/ember-network-parameters.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-network-parameters.cpp @@ -1,12 +1,12 @@ /** - * + * */ #include #include -#include "domain/ezsp-protocol/struct/ember-network-parameters.h" +#include "ezsp/ezsp-protocol/struct/ember-network-parameters.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" CEmberNetworkParameters::CEmberNetworkParameters() : extend_pan_id(0), diff --git a/src/domain/ezsp-protocol/struct/ember-network-parameters.h b/src/ezsp/ezsp-protocol/struct/ember-network-parameters.h similarity index 99% rename from src/domain/ezsp-protocol/struct/ember-network-parameters.h rename to src/ezsp/ezsp-protocol/struct/ember-network-parameters.h index 343de3fa..3cbeb4f6 100644 --- a/src/domain/ezsp-protocol/struct/ember-network-parameters.h +++ b/src/ezsp/ezsp-protocol/struct/ember-network-parameters.h @@ -3,7 +3,7 @@ */ #pragma once -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" #include #include diff --git a/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp b/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp similarity index 100% rename from src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp rename to src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp diff --git a/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h b/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h similarity index 90% rename from src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h rename to src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h index 0a243516..4ab8fdae 100644 --- a/src/domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h +++ b/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h @@ -7,11 +7,11 @@ */ #pragma once -#include "domain/byte-manip.h" -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" -#include "domain/zbmessage/gp-pairing-command-option-struct.h" +#include "ezsp/byte-manip.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" +#include "ezsp/zbmessage/gp-pairing-command-option-struct.h" #ifdef USE_RARITAN diff --git a/src/domain/green-power-observer.h b/src/ezsp/green-power-observer.h similarity index 100% rename from src/domain/green-power-observer.h rename to src/ezsp/green-power-observer.h diff --git a/src/domain/zbmessage/aps.cpp b/src/ezsp/zbmessage/aps.cpp similarity index 97% rename from src/domain/zbmessage/aps.cpp rename to src/ezsp/zbmessage/aps.cpp index 3e7a6904..bff680d8 100644 --- a/src/domain/zbmessage/aps.cpp +++ b/src/ezsp/zbmessage/aps.cpp @@ -4,8 +4,8 @@ * @brief Handles encoding/decoding of the APS header */ -#include "domain/zbmessage/aps.h" -#include "domain/byte-manip.h" +#include "ezsp/zbmessage/aps.h" +#include "ezsp/byte-manip.h" CAPSFrame::CAPSFrame() : cluster_id(0), dest_ep(0), group_id(0), option(), profile_id(0), sequence(0), src_ep(0) { diff --git a/src/domain/zbmessage/aps.h b/src/ezsp/zbmessage/aps.h similarity index 98% rename from src/domain/zbmessage/aps.h rename to src/ezsp/zbmessage/aps.h index 073e747f..f5a2c9a4 100644 --- a/src/domain/zbmessage/aps.h +++ b/src/ezsp/zbmessage/aps.h @@ -10,7 +10,7 @@ #include #include -#include "domain/zbmessage/apsoption.h" +#include "ezsp/zbmessage/apsoption.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zbmessage/apsoption.cpp b/src/ezsp/zbmessage/apsoption.cpp similarity index 100% rename from src/domain/zbmessage/apsoption.cpp rename to src/ezsp/zbmessage/apsoption.cpp diff --git a/src/domain/zbmessage/apsoption.h b/src/ezsp/zbmessage/apsoption.h similarity index 100% rename from src/domain/zbmessage/apsoption.h rename to src/ezsp/zbmessage/apsoption.h diff --git a/src/domain/zbmessage/gp-pairing-command-option-struct.cpp b/src/ezsp/zbmessage/gp-pairing-command-option-struct.cpp similarity index 100% rename from src/domain/zbmessage/gp-pairing-command-option-struct.cpp rename to src/ezsp/zbmessage/gp-pairing-command-option-struct.cpp diff --git a/src/domain/zbmessage/gp-pairing-command-option-struct.h b/src/ezsp/zbmessage/gp-pairing-command-option-struct.h similarity index 99% rename from src/domain/zbmessage/gp-pairing-command-option-struct.h rename to src/ezsp/zbmessage/gp-pairing-command-option-struct.h index 98b3db27..d8c4387d 100644 --- a/src/domain/zbmessage/gp-pairing-command-option-struct.h +++ b/src/ezsp/zbmessage/gp-pairing-command-option-struct.h @@ -8,7 +8,7 @@ #include #include -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp b/src/ezsp/zbmessage/gpd-commissioning-command-payload.cpp similarity index 98% rename from src/domain/zbmessage/gpd-commissioning-command-payload.cpp rename to src/ezsp/zbmessage/gpd-commissioning-command-payload.cpp index 1f5c7563..8862d687 100644 --- a/src/domain/zbmessage/gpd-commissioning-command-payload.cpp +++ b/src/ezsp/zbmessage/gpd-commissioning-command-payload.cpp @@ -8,9 +8,9 @@ #include #include -#include "domain/byte-manip.h" -#include "domain/custom-aes.h" -#include "domain/zbmessage/gpd-commissioning-command-payload.h" +#include "ezsp/byte-manip.h" +#include "ezsp/custom-aes.h" +#include "ezsp/zbmessage/gpd-commissioning-command-payload.h" CGpdCommissioningPayload::CGpdCommissioningPayload(const std::vector& raw_message, uint32_t i_src_id): device_id(raw_message.at(0)), diff --git a/src/domain/zbmessage/gpd-commissioning-command-payload.h b/src/ezsp/zbmessage/gpd-commissioning-command-payload.h similarity index 99% rename from src/domain/zbmessage/gpd-commissioning-command-payload.h rename to src/ezsp/zbmessage/gpd-commissioning-command-payload.h index 08635f9c..dd0e3a77 100644 --- a/src/domain/zbmessage/gpd-commissioning-command-payload.h +++ b/src/ezsp/zbmessage/gpd-commissioning-command-payload.h @@ -8,7 +8,7 @@ #include #include -#include "domain/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" // option bitfield #define COM_OPTION_MAC_SEQ_CAPABILITY_BIT 0 diff --git a/src/domain/zbmessage/green-power-device.cpp b/src/ezsp/zbmessage/green-power-device.cpp similarity index 100% rename from src/domain/zbmessage/green-power-device.cpp rename to src/ezsp/zbmessage/green-power-device.cpp diff --git a/src/domain/zbmessage/green-power-device.h b/src/ezsp/zbmessage/green-power-device.h similarity index 95% rename from src/domain/zbmessage/green-power-device.h rename to src/ezsp/zbmessage/green-power-device.h index de813c0c..98e0502e 100644 --- a/src/domain/zbmessage/green-power-device.h +++ b/src/ezsp/zbmessage/green-power-device.h @@ -7,8 +7,8 @@ #pragma once #include -#include "domain/ezsp-protocol/ezsp-enum.h" -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" +#include "ezsp/ezsp-protocol/ezsp-enum.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h" /** * @brief Class to encapsulate data representing a green power device diff --git a/src/domain/zbmessage/green-power-frame.cpp b/src/ezsp/zbmessage/green-power-frame.cpp similarity index 96% rename from src/domain/zbmessage/green-power-frame.cpp rename to src/ezsp/zbmessage/green-power-frame.cpp index 41d14e5d..cb44070a 100644 --- a/src/domain/zbmessage/green-power-frame.cpp +++ b/src/ezsp/zbmessage/green-power-frame.cpp @@ -7,10 +7,10 @@ #include #include -#include "domain/byte-manip.h" -#include "domain/zbmessage/green-power-frame.h" +#include "ezsp/byte-manip.h" +#include "ezsp/zbmessage/green-power-frame.h" -#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-address-struct.h" CGpFrame::CGpFrame(): link_value(0), diff --git a/src/domain/zbmessage/green-power-frame.h b/src/ezsp/zbmessage/green-power-frame.h similarity index 100% rename from src/domain/zbmessage/green-power-frame.h rename to src/ezsp/zbmessage/green-power-frame.h diff --git a/src/domain/zbmessage/green-power-sink-table-entry.cpp b/src/ezsp/zbmessage/green-power-sink-table-entry.cpp similarity index 100% rename from src/domain/zbmessage/green-power-sink-table-entry.cpp rename to src/ezsp/zbmessage/green-power-sink-table-entry.cpp diff --git a/src/domain/zbmessage/green-power-sink-table-entry.h b/src/ezsp/zbmessage/green-power-sink-table-entry.h similarity index 100% rename from src/domain/zbmessage/green-power-sink-table-entry.h rename to src/ezsp/zbmessage/green-power-sink-table-entry.h diff --git a/src/domain/zbmessage/zclframecontrol.cpp b/src/ezsp/zbmessage/zclframecontrol.cpp similarity index 97% rename from src/domain/zbmessage/zclframecontrol.cpp rename to src/ezsp/zbmessage/zclframecontrol.cpp index 25b8c042..1a8fceb7 100644 --- a/src/domain/zbmessage/zclframecontrol.cpp +++ b/src/ezsp/zbmessage/zclframecontrol.cpp @@ -4,7 +4,7 @@ * @brief Handles encoding/decoding of the ZCL frame control byte */ -#include "domain/zbmessage/zclframecontrol.h" +#include "ezsp/zbmessage/zclframecontrol.h" CZCLFrameControl::CZCLFrameControl() : diff --git a/src/domain/zbmessage/zclframecontrol.h b/src/ezsp/zbmessage/zclframecontrol.h similarity index 100% rename from src/domain/zbmessage/zclframecontrol.h rename to src/ezsp/zbmessage/zclframecontrol.h diff --git a/src/domain/zbmessage/zclheader.cpp b/src/ezsp/zbmessage/zclheader.cpp similarity index 98% rename from src/domain/zbmessage/zclheader.cpp rename to src/ezsp/zbmessage/zclheader.cpp index e2ede5a8..0827ef95 100644 --- a/src/domain/zbmessage/zclheader.cpp +++ b/src/ezsp/zbmessage/zclheader.cpp @@ -1,12 +1,12 @@ /** * @file zclheader.cpp - * + * * @brief Handles encoding/decoding of ZCL headers */ -#include "domain/zbmessage/zclheader.h" +#include "ezsp/zbmessage/zclheader.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" CZCLHeader::CZCLHeader() : frm_ctrl(), diff --git a/src/domain/zbmessage/zclheader.h b/src/ezsp/zbmessage/zclheader.h similarity index 100% rename from src/domain/zbmessage/zclheader.h rename to src/ezsp/zbmessage/zclheader.h diff --git a/src/domain/zbmessage/zdp-enum.cpp b/src/ezsp/zbmessage/zdp-enum.cpp similarity index 100% rename from src/domain/zbmessage/zdp-enum.cpp rename to src/ezsp/zbmessage/zdp-enum.cpp diff --git a/src/domain/zbmessage/zdp-enum.h b/src/ezsp/zbmessage/zdp-enum.h similarity index 100% rename from src/domain/zbmessage/zdp-enum.h rename to src/ezsp/zbmessage/zdp-enum.h diff --git a/src/domain/zbmessage/zigbee-message.cpp b/src/ezsp/zbmessage/zigbee-message.cpp similarity index 98% rename from src/domain/zbmessage/zigbee-message.cpp rename to src/ezsp/zbmessage/zigbee-message.cpp index bc1429df..bd17cdcf 100644 --- a/src/domain/zbmessage/zigbee-message.cpp +++ b/src/ezsp/zbmessage/zigbee-message.cpp @@ -1,10 +1,10 @@ /** * @file zigbee-message.cpp - * + * * @brief Handles encoding/decoding of a zigbee message */ -#include "domain/zbmessage/zigbee-message.h" +#include "ezsp/zbmessage/zigbee-message.h" CZigBeeMsg::CZigBeeMsg() : aps(), diff --git a/src/domain/zbmessage/zigbee-message.h b/src/ezsp/zbmessage/zigbee-message.h similarity index 99% rename from src/domain/zbmessage/zigbee-message.h rename to src/ezsp/zbmessage/zigbee-message.h index f6797e0f..ceeb5aef 100644 --- a/src/domain/zbmessage/zigbee-message.h +++ b/src/ezsp/zbmessage/zigbee-message.h @@ -9,8 +9,8 @@ #include #include -#include "domain/zbmessage/aps.h" -#include "domain/zbmessage/zclheader.h" +#include "ezsp/zbmessage/aps.h" +#include "ezsp/zbmessage/zclheader.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/green-power-sink.cpp b/src/ezsp/zigbee-tools/green-power-sink.cpp similarity index 98% rename from src/domain/zigbee-tools/green-power-sink.cpp rename to src/ezsp/zigbee-tools/green-power-sink.cpp index c692fb13..88b52fff 100644 --- a/src/domain/zigbee-tools/green-power-sink.cpp +++ b/src/ezsp/zigbee-tools/green-power-sink.cpp @@ -11,15 +11,15 @@ #include #include -#include "domain/zigbee-tools/green-power-sink.h" -#include "domain/ezsp-protocol/struct/ember-gp-address-struct.h" -#include "domain/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" +#include "ezsp/zigbee-tools/green-power-sink.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-address-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h" -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" -#include "domain/zbmessage/zigbee-message.h" -#include "domain/zbmessage/gpd-commissioning-command-payload.h" -#include "domain/ezsp-protocol/get-network-parameters-response.h" +#include "ezsp/zbmessage/zigbee-message.h" +#include "ezsp/zbmessage/gpd-commissioning-command-payload.h" +#include "ezsp/ezsp-protocol/get-network-parameters-response.h" #include "spi/GenericLogger.h" #include "spi/ILogger.h" diff --git a/src/domain/zigbee-tools/green-power-sink.h b/src/ezsp/zigbee-tools/green-power-sink.h similarity index 93% rename from src/domain/zigbee-tools/green-power-sink.h rename to src/ezsp/zigbee-tools/green-power-sink.h index e75a94a6..1c0df672 100644 --- a/src/domain/zigbee-tools/green-power-sink.h +++ b/src/ezsp/zigbee-tools/green-power-sink.h @@ -3,19 +3,19 @@ * * @brief Access to green power capabilities */ - + #pragma once #include -#include "domain/zbmessage/green-power-frame.h" -#include "domain/zbmessage/green-power-device.h" -#include "domain/green-power-observer.h" -#include "domain/ezsp-dongle.h" -#include "domain/zigbee-tools/zigbee-messaging.h" -#include "domain/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" -#include "domain/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h" -#include "domain/ezsp-protocol/struct/ember-network-parameters.h" +#include "ezsp/zbmessage/green-power-frame.h" +#include "ezsp/zbmessage/green-power-device.h" +#include "ezsp/green-power-observer.h" +#include "ezsp/ezsp-dongle.h" +#include "ezsp/zigbee-tools/zigbee-messaging.h" +#include "ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h" +#include "ezsp/ezsp-protocol/struct/ember-network-parameters.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/zigbee-messaging.cpp b/src/ezsp/zigbee-tools/zigbee-messaging.cpp similarity index 98% rename from src/domain/zigbee-tools/zigbee-messaging.cpp rename to src/ezsp/zigbee-tools/zigbee-messaging.cpp index a28cf602..4d6d399b 100644 --- a/src/domain/zigbee-tools/zigbee-messaging.cpp +++ b/src/ezsp/zigbee-tools/zigbee-messaging.cpp @@ -4,7 +4,7 @@ * @brief Manages zigbee message, timeout, retry */ -#include "domain/zigbee-tools/zigbee-messaging.h" +#include "ezsp/zigbee-tools/zigbee-messaging.h" #include "spi/GenericLogger.h" diff --git a/src/domain/zigbee-tools/zigbee-messaging.h b/src/ezsp/zigbee-tools/zigbee-messaging.h similarity index 92% rename from src/domain/zigbee-tools/zigbee-messaging.h rename to src/ezsp/zigbee-tools/zigbee-messaging.h index fe206adb..dc2874a0 100644 --- a/src/domain/zigbee-tools/zigbee-messaging.h +++ b/src/ezsp/zigbee-tools/zigbee-messaging.h @@ -7,9 +7,9 @@ #include -#include "domain/ezsp-dongle-observer.h" -#include "domain/ezsp-dongle.h" -#include "domain/zbmessage/zigbee-message.h" +#include "ezsp/ezsp-dongle-observer.h" +#include "ezsp/ezsp-dongle.h" +#include "ezsp/zbmessage/zigbee-message.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/src/domain/zigbee-tools/zigbee-networking.cpp b/src/ezsp/zigbee-tools/zigbee-networking.cpp similarity index 97% rename from src/domain/zigbee-tools/zigbee-networking.cpp rename to src/ezsp/zigbee-tools/zigbee-networking.cpp index 462c70e5..5dde4aff 100644 --- a/src/domain/zigbee-tools/zigbee-networking.cpp +++ b/src/ezsp/zigbee-tools/zigbee-networking.cpp @@ -4,13 +4,13 @@ #include -#include "domain/byte-manip.h" +#include "ezsp/byte-manip.h" -#include "domain/zigbee-tools/zigbee-networking.h" +#include "ezsp/zigbee-tools/zigbee-networking.h" -#include "domain/ezsp-protocol/get-network-parameters-response.h" -#include "domain/ezsp-protocol/struct/ember-key-struct.h" -#include "domain/ezsp-protocol/struct/ember-child-data-struct.h" +#include "ezsp/ezsp-protocol/get-network-parameters-response.h" +#include "ezsp/ezsp-protocol/struct/ember-key-struct.h" +#include "ezsp/ezsp-protocol/struct/ember-child-data-struct.h" #include "spi/GenericLogger.h" diff --git a/src/domain/zigbee-tools/zigbee-networking.h b/src/ezsp/zigbee-tools/zigbee-networking.h similarity index 92% rename from src/domain/zigbee-tools/zigbee-networking.h rename to src/ezsp/zigbee-tools/zigbee-networking.h index 320fecfe..0da9f0d6 100644 --- a/src/domain/zigbee-tools/zigbee-networking.h +++ b/src/ezsp/zigbee-tools/zigbee-networking.h @@ -3,11 +3,11 @@ */ #pragma once -#include "domain/zigbee-tools/zigbee-messaging.h" +#include "ezsp/zigbee-tools/zigbee-messaging.h" -#include "domain/ezsp-dongle-observer.h" -#include "domain/ezsp-dongle.h" -#include "domain/zbmessage/zigbee-message.h" +#include "ezsp/ezsp-dongle-observer.h" +#include "ezsp/ezsp-dongle.h" +#include "ezsp/zbmessage/zigbee-message.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ diff --git a/tests/Makefile b/tests/Makefile index 381df34b..c23acc66 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,17 +26,17 @@ endef export HELP # SRC_PATH should point to the src/ folder containing source code for this library (can be overridden from environment) -SRC_PATH ?= .. -SRC_DOMAIN_PATH ?= $(SRC_PATH)/domain -SRC_SPI_PATH ?= $(SRC_PATH)/spi +SRC_PATH ?= ../ +SRC_DOMAIN_PATH ?= $(SRC_PATH)src/ezsp +SRC_SPI_PATH ?= $(SRC_PATH)src/spi include ../libezsp.mk.inc -SRCS = $(SRC_PATH)/tests/mock_serial_self_tests.cpp \ - $(SRC_PATH)/tests/gp_tests.cpp \ - $(SRC_PATH)/tests/test_libezsp.cpp \ - $(SRC_PATH)/example/dummy_db.cpp \ - $(SRC_PATH)/example/CAppDemo.cpp \ +SRCS = $(SRC_PATH)test/mock_serial_self_tests.cpp \ + $(SRC_PATH)test/gp_tests.cpp \ + $(SRC_PATH)test/test_libezsp.cpp \ + $(SRC_PATH)example/dummy_db.cpp \ + $(SRC_PATH)example/CAppDemo.cpp \ $(LIBEZSP_LINUX_MOCKSERIAL_SRC) \ OBJECTFILES = $(patsubst %.cpp, %.o, $(SRCS)) From 93e789ef1f7867f04a2fbc82eae76f4d2e89755e Mon Sep 17 00:00:00 2001 From: mchalain Date: Thu, 12 Dec 2019 16:29:40 +0100 Subject: [PATCH 012/413] [syntax] remove spaces on trailing line --- example/CAppDemo.cpp | 24 ++++----- src/ezsp/ezsp-protocol/ezsp-enum.cpp | 12 ++--- .../struct/ember-child-data-struct.cpp | 4 +- .../struct/ember-gp-address-struct.h | 8 +-- .../ember-gp-proxy-table-entry-struct.h | 4 +- .../struct/ember-gp-sink-table-entry-struct.h | 10 ++-- .../ember-gp-sink-table-options-field.h | 10 ++-- .../ember-process-gp-pairing-parameter.h | 4 +- .../gp-pairing-command-option-struct.h | 30 +++++------ .../gpd-commissioning-command-payload.h | 8 +-- src/ezsp/zbmessage/green-power-device.h | 2 +- src/ezsp/zbmessage/zigbee-message.cpp | 2 +- src/ezsp/zbmessage/zigbee-message.h | 2 +- src/ezsp/zigbee-tools/green-power-sink.cpp | 54 +++++++++---------- src/ezsp/zigbee-tools/green-power-sink.h | 16 +++--- src/ezsp/zigbee-tools/zigbee-messaging.cpp | 4 +- tests/Makefile | 6 +-- 17 files changed, 100 insertions(+), 100 deletions(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index 1901d0a2..1c0f5b78 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -409,7 +409,7 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r setAppState(APP_FORM_NWK_IN_PROGRESS); reset_wanted = false; } - + } else { @@ -444,8 +444,8 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r std::vectorl_msg_raw; for(uint8_t loop=0;loop i_msg_r for(uint8_t loop=0; loop i_msg_r payload.push_back(ep_list.at(loop)); zb_messaging.SendZDOCommand(address,ZDP_SIMPLE_DESC,payload); } - + } break; case ZDP_SIMPLE_DESC: @@ -518,7 +518,7 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r } std::stringstream buf; - buf << CZdpEnum::ToString(zdp_low) << " Response : " << + buf << CZdpEnum::ToString(zdp_low) << " Response : " << "[ status : " << std::hex << std::setw(2) << std::setfill('0') << unsigned(status) << "]" << "[ address : " << std::hex << std::setw(4) << std::setfill('0') << unsigned(address) << "]" << "[ lentgh : " << std::hex << std::setw(2) << std::setfill('0') << unsigned(lentgh) << "]" << @@ -535,11 +535,11 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r buf << "]"; clogI << buf.str() << std::endl; - + // search in server [in] list for(uint8_t loop=0; loop i_msg_r } else { - clogI << CZdpEnum::ToString(zdp_low) << " Response with status : " << + clogI << CZdpEnum::ToString(zdp_low) << " Response with status : " << std::hex << std::setw(2) << std::setfill('0') << unsigned(status) << std::endl; } } @@ -647,7 +647,7 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r { // applicative zigbee message std::stringstream buf; - buf << "ZCL : " << + buf << "ZCL : " << "[ endpoint : " << std::hex << std::setw(2) << std::setfill('0') << unsigned(zbMsg.GetAps().src_ep) << "]" << "[ cluster : " << std::hex << std::setw(4) << std::setfill('0') << unsigned(zbMsg.GetAps().cluster_id) << "]" << "[ type : " << std::hex << std::setw(2) << std::setfill('0') << unsigned(zbMsg.GetZCLHeader().GetFrmCtrl().GetFrmType()) << "]" << @@ -710,9 +710,9 @@ void CAppDemo::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_r /** - * + * * PRIVATE FUNCTIONS - * + * */ /** diff --git a/src/ezsp/ezsp-protocol/ezsp-enum.cpp b/src/ezsp/ezsp-protocol/ezsp-enum.cpp index f47ff700..0147a4ed 100644 --- a/src/ezsp/ezsp-protocol/ezsp-enum.cpp +++ b/src/ezsp/ezsp-protocol/ezsp-enum.cpp @@ -15,7 +15,7 @@ std::string CEzspEnum::EmberNodeTypeToString( EmberNodeType in ) { EMBER_SLEEPY_END_DEVICE, "EMBER_SLEEPY_END_DEVICE" }, }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; } std::string CEzspEnum::EEmberStatusToString( EEmberStatus in ) @@ -43,7 +43,7 @@ std::string CEzspEnum::EEmberStatusToString( EEmberStatus in ) { EMBER_NO_NETWORK_KEY_RECEIVED, "EMBER_NO_NETWORK_KEY_RECEIVED" } }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE : " + std::to_string(in) : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE : " + std::to_string(in) : it->second; } std::string CEzspEnum::EmberJoinMethodToString( EmberJoinMethod in ) @@ -55,7 +55,7 @@ std::string CEzspEnum::EmberJoinMethodToString( EmberJoinMethod in ) { EMBER_USE_NWK_COMMISSIONING, "EMBER_USE_NWK_COMMISSIONING" } }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; } std::string CEzspEnum::EEzspCmdToString( EEzspCmd in ) @@ -282,7 +282,7 @@ std::string CEzspEnum::EEzspCmdToString( EEzspCmd in ) /* --- */ }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; } std::string CEzspEnum::EmberKeyTypeToString( EmberKeyType in ) @@ -294,7 +294,7 @@ std::string CEzspEnum::EmberKeyTypeToString( EmberKeyType in ) { EMBER_APPLICATION_LINK_KEY, "EMBER_APPLICATION_LINK_KEY" } }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; } @@ -310,5 +310,5 @@ std::string CEzspEnum::EmberIncomingMessageTypeToString( EmberIncomingMessageTyp { EMBER_INCOMING_MANY_TO_ONE_ROUTE_REQUEST, "EMBER_INCOMING_MANY_TO_ONE_ROUTE_REQUEST" } }; auto it = MyEnumStrings.find(in); - return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; + return it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; } diff --git a/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp index a8ff2e48..e698aa07 100644 --- a/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp +++ b/src/ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp @@ -61,14 +61,14 @@ std::string CEmberChildDataStruct::String() const buf << "[phy : "<< std::dec << std::setw(2) << std::setfill('0') << unsigned(phy) << "]"; buf << "[power : "<< std::dec << std::setw(2) << std::setfill('0') << unsigned(power) << "]"; buf << "[timeout : "<< std::dec << std::setw(2) << std::setfill('0') << unsigned(timeout) << "]"; -/* // todo associate to node type +/* // todo associate to node type buf << "[gpdIeeeAddress :"; for(uint8_t loop=0; loop getRaw() const; diff --git a/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h index 7b3c5afa..92dbab86 100644 --- a/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.h @@ -44,11 +44,11 @@ class CEmberGpProxyTableEntryStruct * * Assignment is forbidden on this class */ - CEmberGpProxyTableEntryStruct& operator=(const CEmberGpProxyTableEntryStruct& other) = delete; + CEmberGpProxyTableEntryStruct& operator=(const CEmberGpProxyTableEntryStruct& other) = delete; /** * @brief gpd address getter - * + * * @return gpd address */ CEmberGpAddressStruct getGpdAddress(){ return gpd; } diff --git a/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h index 020868ea..986f8a0d 100644 --- a/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.h @@ -43,7 +43,7 @@ class CEmberGpSinkTableEntryStruct * - bit 10..15 : Reserved * sink_list : by reverse set first byte of each to 0xFF to disable usage. * groupcast_radius : The default value of 0x00 indicates undefined - * + * * @param i_status Internal status of the sink table entry. 0x01 active, 0xff : disable * @param i_option see upper * @param i_gpd_address The addressing info of the GPD. @@ -55,7 +55,7 @@ class CEmberGpSinkTableEntryStruct */ CEmberGpSinkTableEntryStruct(EmberGpSinkTableEntryStatus i_status, CEmberGpSinkTableOption i_options, CEmberGpAddressStruct i_gpd_address, uint8_t i_device_id, uint16_t i_alias, - uint8_t i_security_option, EmberGpSecurityFrameCounter i_frm_counter, EmberKeyData i_gpd_key); + uint8_t i_security_option, EmberGpSecurityFrameCounter i_frm_counter, EmberKeyData i_gpd_key); /** * @brief Copy constructor @@ -73,7 +73,7 @@ class CEmberGpSinkTableEntryStruct * @param first The first object * @param second The second object */ - friend void (::swap)(CEmberGpSinkTableEntryStruct& first, CEmberGpSinkTableEntryStruct& second); + friend void (::swap)(CEmberGpSinkTableEntryStruct& first, CEmberGpSinkTableEntryStruct& second); /** * @brief Assignment operator @@ -85,7 +85,7 @@ class CEmberGpSinkTableEntryStruct /** * @brief return structure as a raw - * + * * @return raw of structure */ std::vector getRaw() const; @@ -127,7 +127,7 @@ class CEmberGpSinkTableEntryStruct * @brief assigned_alias setter */ void setAlias(uint16_t i_alias){ assigned_alias=i_alias; } - + /** * @brief security_options setter */ diff --git a/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h index 03692a62..7ad7643f 100644 --- a/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h +++ b/src/ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.h @@ -56,7 +56,7 @@ class CEmberGpSinkTableOption * @param first The first object * @param second The second object */ - friend void (::swap)(CEmberGpSinkTableOption& first, CEmberGpSinkTableOption& second); + friend void (::swap)(CEmberGpSinkTableOption& first, CEmberGpSinkTableOption& second); /** * @brief raw constructor @@ -65,7 +65,7 @@ class CEmberGpSinkTableOption /** * @brief constructor from commissioning payload option and more - * + * * @param i_application_id : application id meeans way to address gpd : by sourceid or ieee * @param i_gpdf_commissioning_option : permit to know capability of gpd */ @@ -129,7 +129,7 @@ class CEmberGpSinkTableOption /** * @brief Setter for RxOnCapability - * + * * @param i_rx_on_capable */ void setRxOnCapability(bool i_rx_on_capable){ rx_on_capability = i_rx_on_capable; } @@ -149,8 +149,8 @@ class CEmberGpSinkTableOption * * @return The new output stream with serialized data appended */ - friend std::ostream& operator<< (std::ostream& out, const CEmberGpSinkTableOption& data); - + friend std::ostream& operator<< (std::ostream& out, const CEmberGpSinkTableOption& data); + private: uint8_t application_id; /*!< The application ID contained in this sink table entry options bit field */ uint8_t communication_mode; /*!< The communication mode contained in this sink table entry options bit field */ diff --git a/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h b/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h index 4ab8fdae..65f4c22d 100644 --- a/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h +++ b/src/ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.h @@ -37,14 +37,14 @@ class CProcessGpPairingParam /** * @brief constructor using sink table entry and extra parameter - * + * * @param i_sink_table_entry : sink table entry corresponding to gpd * @param i_add_sink : true to add, false to remove * @param i_remove_gpd : true to remove * @param i_sinkNetworkAddress : short network address of sink * @param i_sinkIeeeAddress : long network address of sink */ - CProcessGpPairingParam(CEmberGpSinkTableEntryStruct i_sink_table_entry, bool i_add_sink, bool i_remove_gpd, + CProcessGpPairingParam(CEmberGpSinkTableEntryStruct i_sink_table_entry, bool i_add_sink, bool i_remove_gpd, uint16_t i_sinkNetworkAddress, EmberEUI64 i_sinkIeeeAddress ); diff --git a/src/ezsp/zbmessage/gp-pairing-command-option-struct.h b/src/ezsp/zbmessage/gp-pairing-command-option-struct.h index d8c4387d..d5560f91 100644 --- a/src/ezsp/zbmessage/gp-pairing-command-option-struct.h +++ b/src/ezsp/zbmessage/gp-pairing-command-option-struct.h @@ -34,7 +34,7 @@ class CGpPairingCommandOption /** * @brief Constructor based on sink table entry option field - * + * * @param i_sink_table_option * @param i_add_sink : true to add, false to remove * @param i_remove_gpd : true to remove @@ -45,7 +45,7 @@ class CGpPairingCommandOption * @param i_radius_present */ CGpPairingCommandOption(CEmberGpSinkTableOption i_sink_table_option, bool i_add_sink, bool i_remove_gpd, - uint8_t i_security_level, uint8_t i_security_key_type, bool i_frm_counter_present, + uint8_t i_security_level, uint8_t i_security_key_type, bool i_frm_counter_present, bool i_key_present, bool i_radius_present ); /** @@ -58,9 +58,9 @@ class CGpPairingCommandOption private: /** - * Bit 0..2: The ApplicationID sub-field contains the information about the application used by the GPD. - * ApplicationID = 0b000 indicates the GPD ID field has the length of 4B and contains the GPD SrcID; the Endpoint field is absent. - * ApplicationID = 0b010 indicates the GPD ID field has the length of 8B and contains the GPD IEEE address; the Endpoint field is present. + * Bit 0..2: The ApplicationID sub-field contains the information about the application used by the GPD. + * ApplicationID = 0b000 indicates the GPD ID field has the length of 4B and contains the GPD SrcID; the Endpoint field is absent. + * ApplicationID = 0b010 indicates the GPD ID field has the length of 8B and contains the GPD IEEE address; the Endpoint field is present. * All values of ApplicationID other than 0b000 and 0b010 are reserved in the current version of the Green Power cluster specification. */ uint8_t application_id; /*!< The ApplicationID value (contains the information about the application used by the GPD) */ @@ -81,7 +81,7 @@ class CGpPairingCommandOption */ uint8_t communication_mode; /*!< The Communication mode sub-field defines the communication mode requested by the sink */ /** - * Bit 7: The GPDfixed sub-field and GPD MAC sequence number capabilities sub-field is copied from the corresponding + * Bit 7: The GPDfixed sub-field and GPD MAC sequence number capabilities sub-field is copied from the corresponding * FixedLocation and Sequence number capabilities sub-fields of the Options parameter of the Sink Table for this GPD. */ bool gpd_fixed; /*!< The GPDfixed sub-field value */ @@ -94,17 +94,17 @@ class CGpPairingCommandOption */ uint8_t security_level; /*!< The SecurityLevel for this GDP command */ /** - * Bit 11..13: The sub-fields GPDsecurityFrameCounterPresent and GPDsecurityKeyPresent, if set to 0b1, indicate the presence of the fields - * GPDsecurityFrameCounter and GPDsecurityKey, respectively, which then carry the corresponding values from the Sink Table for this GPD. - * When the sub-fields GPDsecurityFrameCounterPresent and GPDsecurityKeyPresent are set to 0b0, + * Bit 11..13: The sub-fields GPDsecurityFrameCounterPresent and GPDsecurityKeyPresent, if set to 0b1, indicate the presence of the fields + * GPDsecurityFrameCounter and GPDsecurityKey, respectively, which then carry the corresponding values from the Sink Table for this GPD. + * When the sub-fields GPDsecurityFrameCounterPresent and GPDsecurityKeyPresent are set to 0b0, * the fields GPDsecurityFrame-Counter and GPDsecurityKey, respectively, are not present. */ uint8_t security_key_type; /*!< The SecurityKeyType for this GDP command */ /** - * Bit 14: The GPDsecurityFrameCounter field SHALL be present whenever the AddSink sub-field of the Options field is set to 0b1; - * independent of the security level. If the SecurityLevel sub-field is set to 0b10-0b11 or if the SecurityLevel is 0b00 and - * the GPD MAC sequence number capabilities sub-field is set to 0b1, the GPDsecurityFrameCounter field carries the current value of - * the GPD security frame counter field from the Sink Table entry corresponding to the GPD ID. If the SecurityLevel is 0b00 and + * Bit 14: The GPDsecurityFrameCounter field SHALL be present whenever the AddSink sub-field of the Options field is set to 0b1; + * independent of the security level. If the SecurityLevel sub-field is set to 0b10-0b11 or if the SecurityLevel is 0b00 and + * the GPD MAC sequence number capabilities sub-field is set to 0b1, the GPDsecurityFrameCounter field carries the current value of + * the GPD security frame counter field from the Sink Table entry corresponding to the GPD ID. If the SecurityLevel is 0b00 and * the GPD MAC sequence number capabilities sub-field is set to 0b0, the GPDsecurityFrameCounter SHALL be set to 0b00000000. */ bool gpd_security_frame_counter_present; /*!< Represents whether the GPD security frame counter is present in this GDP command */ @@ -119,8 +119,8 @@ class CGpPairingCommandOption bool assigned_alias_present; /*!< Represents whether the AssignedAlias field is present and carries the Alias value to be used for this GPD instead of the derived alias */ /** * Bit 17: The Forwarding Radius present sub-field, if set to 0b1, indicates that the Forwarding Radius field is - * present and carries the Forwarding Radius value to be used as value of the radius in the groupcast forwarding - * of the GPDF packet. If the Forwarding Radius field is not present, and a new Proxy Table entry is to be created, + * present and carries the Forwarding Radius value to be used as value of the radius in the groupcast forwarding + * of the GPDF packet. If the Forwarding Radius field is not present, and a new Proxy Table entry is to be created, * the default value of 0x00 SHALL be used. The value 0x00 indicates unspecified, * i.e. twice the value of the nwkMaxDepth attribute of the NIB, as specified by [1]. */ diff --git a/src/ezsp/zbmessage/gpd-commissioning-command-payload.h b/src/ezsp/zbmessage/gpd-commissioning-command-payload.h index dd0e3a77..670fe25a 100644 --- a/src/ezsp/zbmessage/gpd-commissioning-command-payload.h +++ b/src/ezsp/zbmessage/gpd-commissioning-command-payload.h @@ -60,14 +60,14 @@ class CGpdCommissioningPayload /** * @brief Getter for the enclosed encryption/authentication key - * + * * @return The enclosed key */ EmberKeyData getKey() const { return key; } /** * @brief Getter for the enclosed device ID - * + * * @return The enclosed deviceId */ uint8_t getDeviceId() const { return device_id; } @@ -94,14 +94,14 @@ class CGpdCommissioningPayload /** * @brief Getter for the enclosed extended options - * + * * @return The enclosed extended options */ uint8_t getExtendedOption() const { return extended_options; } /** * @brief Getter for the enclosed frame counter - * + * * @return The enclosed frame counter */ uint32_t getOutFrameCounter() const { return out_frame_counter; } diff --git a/src/ezsp/zbmessage/green-power-device.h b/src/ezsp/zbmessage/green-power-device.h index 98e0502e..466315ce 100644 --- a/src/ezsp/zbmessage/green-power-device.h +++ b/src/ezsp/zbmessage/green-power-device.h @@ -47,7 +47,7 @@ class CGpDevice * @param first The first object * @param second The second object */ - friend void (::swap)(CGpDevice& first, CGpDevice& second); + friend void (::swap)(CGpDevice& first, CGpDevice& second); /** * @brief Retrieve the source id for this device diff --git a/src/ezsp/zbmessage/zigbee-message.cpp b/src/ezsp/zbmessage/zigbee-message.cpp index bd17cdcf..cda63d76 100644 --- a/src/ezsp/zbmessage/zigbee-message.cpp +++ b/src/ezsp/zbmessage/zigbee-message.cpp @@ -86,7 +86,7 @@ void CZigBeeMsg::Set(const std::vector& i_aps, const std::vector CZigBeeMsg::Get( void ) const diff --git a/src/ezsp/zbmessage/zigbee-message.h b/src/ezsp/zbmessage/zigbee-message.h index ceeb5aef..131ba2ca 100644 --- a/src/ezsp/zbmessage/zigbee-message.h +++ b/src/ezsp/zbmessage/zigbee-message.h @@ -115,7 +115,7 @@ class CZigBeeMsg * @param second The second object */ friend void (::swap)(CZigBeeMsg& first, CZigBeeMsg& second); - + // high level /** diff --git a/src/ezsp/zigbee-tools/green-power-sink.cpp b/src/ezsp/zigbee-tools/green-power-sink.cpp index 88b52fff..263560df 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.cpp +++ b/src/ezsp/zigbee-tools/green-power-sink.cpp @@ -101,7 +101,7 @@ void CGpSink::init() dongle.sendCommand(EZSP_GET_NETWORK_PARAMETERS); // set state - setSinkState(SINK_READY); + setSinkState(SINK_READY); } bool CGpSink::gpClearAllTables() @@ -111,14 +111,14 @@ bool CGpSink::gpClearAllTables() if( SINK_READY == sink_state ) { // sink table - dongle.sendCommand(EZSP_GP_SINK_TABLE_CLEAR_ALL); + dongle.sendCommand(EZSP_GP_SINK_TABLE_CLEAR_ALL); // proxy table proxy_table_index = 0; dongle.sendCommand(EZSP_GP_PROXY_TABLE_GET_ENTRY,{proxy_table_index}); // set state - setSinkState(SINK_CLEAR_ALL); + setSinkState(SINK_CLEAR_ALL); lo_success = true; } return lo_success; @@ -149,7 +149,7 @@ void CGpSink::registerGpds( const std::vector &gpd ) // request sink table entry gpSinkTableFindOrAllocateEntry( gpds_to_register.back().getSourceId() ); - + // set state setSinkState(SINK_COM_OFFLINE_IN_PROGRESS); } @@ -161,7 +161,7 @@ void CGpSink::removeGpds( const std::vector &gpd ) // request sink table entry gpSinkTableLookup( gpds_to_remove.back() ); - + // set state setSinkState(SINK_REMOVE_IN_PROGRESS); } @@ -190,16 +190,16 @@ void CGpSink::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_re { // assume end of table // set new state - setSinkState(SINK_READY); + setSinkState(SINK_READY); } - + } } break; case EZSP_GET_NETWORK_PARAMETERS: { CGetNetworkParamtersResponse l_rsp(i_msg_receive); - if( EEmberStatus::EMBER_SUCCESS == l_rsp.getStatus() ) + if( EEmberStatus::EMBER_SUCCESS == l_rsp.getStatus() ) { nwk_parameters = l_rsp.getParameters(); } @@ -209,7 +209,7 @@ void CGpSink::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_re { clogI << "EZSP_GP_SINK_TABLE_INIT RSP" << std::endl; } - break; + break; case EZSP_GPEP_INCOMING_MESSAGE_HANDLER: { EEmberStatus l_status = static_cast(i_msg_receive.at(0)); @@ -396,7 +396,7 @@ void CGpSink::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_re } else { - gpSinkTableLookup(gpds_to_remove.back()); + gpSinkTableLookup(gpds_to_remove.back()); } } } @@ -492,8 +492,8 @@ void CGpSink::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_re // \todo replace short and long sink network address by right value, currently we use group mode not so important CProcessGpPairingParam l_param( sink_table_entry, true, false, 0, {0,0,0,0,0,0,0,0} ); // call - gpProxyTableProcessGpPairing(l_param); - } + gpProxyTableProcessGpPairing(l_param); + } } } break; @@ -633,13 +633,13 @@ void CGpSink::sendLocalGPProxyCommissioningMode(uint8_t i_option) // create message sending from ep242 to ep242 using green power profile - l_gp_comm_msg.SetSpecific(GP_PROFILE_ID, PUBLIC_CODE, GP_ENDPOINT, + l_gp_comm_msg.SetSpecific(GP_PROFILE_ID, PUBLIC_CODE, GP_ENDPOINT, GP_CLUSTER_ID, GP_PROXY_COMMISIONING_MODE_CLIENT_CMD_ID, E_DIR_SERVER_TO_CLIENT, l_gp_comm_payload, 0, 0, 0); // WARNING use ep 242 as sources l_gp_comm_msg.aps.src_ep = GP_ENDPOINT; - + // clogI << "SEND UNICAST : OPEN/CLOSE GP COMMISSIONING option : " << std::hex << std::setw(2) << std::setfill('0') << i_option << std::endl; zb_messaging.SendUnicast(0,l_gp_comm_msg); @@ -769,7 +769,7 @@ void CAppDemo::gpSinkTableLookup( uint32_t i_src_id ) l_payload.push_back(0x00); clogI << "EZSP_GP_SINK_TABLE_LOOKUP\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_LOOKUP,l_payload); + dongle.sendCommand(EZSP_GP_SINK_TABLE_LOOKUP,l_payload); } */ @@ -779,7 +779,7 @@ void CGpSink::gpSinkTableFindOrAllocateEntry( uint32_t i_src_id ) CEmberGpAddressStruct l_gp_address(i_src_id); clogI << "EZSP_GP_SINK_TABLE_FIND_OR_ALLOCATE_ENTRY\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_FIND_OR_ALLOCATE_ENTRY,l_gp_address.getRaw()); + dongle.sendCommand(EZSP_GP_SINK_TABLE_FIND_OR_ALLOCATE_ENTRY,l_gp_address.getRaw()); } void CGpSink::gpSinkGetEntry( uint8_t i_index ) @@ -790,7 +790,7 @@ void CGpSink::gpSinkGetEntry( uint8_t i_index ) l_payload.push_back(i_index); clogI << "EZSP_GP_SINK_TABLE_GET_ENTRY\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_GET_ENTRY,l_payload); + dongle.sendCommand(EZSP_GP_SINK_TABLE_GET_ENTRY,l_payload); } @@ -806,17 +806,17 @@ void CGpSink::gpSinkSetEntry( uint8_t i_index, CEmberGpSinkTableEntryStruct& i_e l_payload.insert(l_payload.end(), i_struct.begin(), i_struct.end()); clogI << "EZSP_GP_SINK_TABLE_SET_ENTRY\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_SET_ENTRY,l_payload); + dongle.sendCommand(EZSP_GP_SINK_TABLE_SET_ENTRY,l_payload); } void CGpSink::gpProxyTableProcessGpPairing( CProcessGpPairingParam& i_param ) { clogI << "EZSP_GP_PROXY_TABLE_PROCESS_GP_PAIRING\n"; - dongle.sendCommand(EZSP_GP_PROXY_TABLE_PROCESS_GP_PAIRING,i_param.get()); + dongle.sendCommand(EZSP_GP_PROXY_TABLE_PROCESS_GP_PAIRING,i_param.get()); } -void CGpSink::gpSend(bool i_action, bool i_use_cca, CEmberGpAddressStruct i_gp_addr, +void CGpSink::gpSend(bool i_action, bool i_use_cca, CEmberGpAddressStruct i_gp_addr, uint8_t i_gpd_command_id, std::vector i_gpd_command_payload, uint16_t i_life_time_ms, uint8_t i_handle ) { std::vector l_payload; @@ -844,29 +844,29 @@ void CGpSink::gpSend(bool i_action, bool i_use_cca, CEmberGpAddressStruct i_gp_a // How long to keep the GPDF in the TX Queue. l_payload.push_back(static_cast(i_life_time_ms&0xFF)); l_payload.push_back(static_cast((i_life_time_ms>>8)&0xFF)); - + clogI << "EZSP_D_GP_SEND\n"; - dongle.sendCommand(EZSP_D_GP_SEND,l_payload); + dongle.sendCommand(EZSP_D_GP_SEND,l_payload); } void CGpSink::gpSinkTableRemoveEntry( uint8_t i_index ) { clogI << "EZSP_GP_SINK_TABLE_REMOVE_ENTRY\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_REMOVE_ENTRY,{i_index}); + dongle.sendCommand(EZSP_GP_SINK_TABLE_REMOVE_ENTRY,{i_index}); } void CGpSink::gpProxyTableLookup(uint32_t i_src_id) { - CEmberGpAddressStruct i_addr(i_src_id); + CEmberGpAddressStruct i_addr(i_src_id); clogI << "EZSP_GP_PROXY_TABLE_LOOKUP\n"; - dongle.sendCommand(EZSP_GP_PROXY_TABLE_LOOKUP,i_addr.getRaw()); + dongle.sendCommand(EZSP_GP_PROXY_TABLE_LOOKUP,i_addr.getRaw()); } void CGpSink::gpSinkTableLookup(uint32_t i_src_id) { - CEmberGpAddressStruct i_addr(i_src_id); + CEmberGpAddressStruct i_addr(i_src_id); clogI << "EZSP_GP_SINK_TABLE_LOOKUP\n"; - dongle.sendCommand(EZSP_GP_SINK_TABLE_LOOKUP,i_addr.getRaw()); + dongle.sendCommand(EZSP_GP_SINK_TABLE_LOOKUP,i_addr.getRaw()); } void CGpSink::setSinkState( ESinkState i_state ) diff --git a/src/ezsp/zigbee-tools/green-power-sink.h b/src/ezsp/zigbee-tools/green-power-sink.h index 1c0df672..1bf346d4 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.h +++ b/src/ezsp/zigbee-tools/green-power-sink.h @@ -52,7 +52,7 @@ class CGpSink : public CEzspDongleObserver /** * @brief Clear all GP tables - * + * * @return true if action can be done */ bool gpClearAllTables(); @@ -83,7 +83,7 @@ class CGpSink : public CEzspDongleObserver /** * @brief authorize answer to channel request - * + * * @param i_authorize : true to authorize, false otherwize */ void authorizeAnswerToGpfChannelRqst( bool i_authorize ){ authorizeGpfChannelRqst = i_authorize; } @@ -154,14 +154,14 @@ class CGpSink : public CEzspDongleObserver /** * @brief Finds or allocates a sink entry - * + * * @param i_src_id GPD source ID address to search */ void gpSinkTableFindOrAllocateEntry( uint32_t i_src_id ); /** * @brief Updates the sink table entry at the specified index. - * + * * @param i_index The index of the requested sink table entry. * @param i_entry An EmberGpSinkTableEntry struct containing a copy of the sink entry to be updated. */ @@ -170,11 +170,11 @@ class CGpSink : public CEzspDongleObserver /** * @brief Update the GP Proxy table based on a GP pairing. */ - void gpProxyTableProcessGpPairing( CProcessGpPairingParam& i_param ); + void gpProxyTableProcessGpPairing( CProcessGpPairingParam& i_param ); /** * @brief - * + * * @param i_action : The action to perform on the GP TX queue (true to add, false to remove). * @param i_use_cca : Whether to use ClearChannelAssessment when transmitting the GPDF. * @param i_gp_addr : The Address of the destination GPD. @@ -182,9 +182,9 @@ class CGpSink : public CEzspDongleObserver * @param i_gpd_command_payload : The GP command payload. * @param i_life_time_ms : How long to keep the GPDF in the TX Queue. * @param i_handle : an handle value for this frame, use to identify in sent callback. - * + * */ - void gpSend(bool i_action, bool i_use_cca, CEmberGpAddressStruct i_gp_addr, + void gpSend(bool i_action, bool i_use_cca, CEmberGpAddressStruct i_gp_addr, uint8_t i_gpd_command_id, std::vector i_gpd_command_payload, uint16_t i_life_time_ms, uint8_t i_handle=0 ); /** diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.cpp b/src/ezsp/zigbee-tools/zigbee-messaging.cpp index 4d6d399b..fc2a793a 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.cpp +++ b/src/ezsp/zigbee-tools/zigbee-messaging.cpp @@ -53,7 +53,7 @@ void CZigbeeMessaging::SendBroadcast( EOutBroadcastDestination i_destination, ui // radius l_payload.push_back( i_radius ); - + // message tag : not used for this simplier demo l_payload.push_back( 0 ); @@ -87,7 +87,7 @@ void CZigbeeMessaging::SendUnicast( EmberNodeId i_node_id, CZigBeeMsg i_msg ) // aps frame std::vector v_tmp = i_msg.GetAps().GetEmberAPS(); l_payload.insert(l_payload.end(), v_tmp.begin(), v_tmp.end()); - + // message tag : not used for this simplier demo l_payload.push_back( 0 ); diff --git a/tests/Makefile b/tests/Makefile index c23acc66..cb1f9c59 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -8,16 +8,16 @@ define HELP In order to perform unit tests with cpputest, run the following command: CFLAGS="-DUSE_CPPUTEST `pkg-config --cflags cpputest`" LIBS="`pkg-config --libs cpputest`" CPPUTEST_STATIC_LIB=/path/to/libCppUTest.a make CC=g++ - + In ordert to compile on native 128-bit platforms, prepend make with the following environment variables (eg for little endian): CFLAGS="-DHAS_INT128 -DIS_LITTLE_ENDIAN" - + Usage: `make ' where is one of: --- build commands all build lib and its tests - test build tests + test build tests clean remove binaries (lib and tests) clean-all remove binaries and object files rebuild clean all and build From db5fc87cadbaec415a6530b7d8a5741e4bb7e1b9 Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Fri, 13 Dec 2019 13:34:17 +0100 Subject: [PATCH 013/413] Adding helper getLogger() macro --- src/spi/ILogger.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/spi/ILogger.h b/src/spi/ILogger.h index 02c73ab4..e12c3058 100644 --- a/src/spi/ILogger.h +++ b/src/spi/ILogger.h @@ -24,26 +24,31 @@ * @{ */ +/** + * @brief Generic logger instance getter + */ +#define getLogger SINGLETON_LOGGER_CLASS_NAME::getInstance + /** * @brief Generic logger getter (uses debug level) */ -#define plog SINGLETON_LOGGER_CLASS_NAME::getInstance().debugLogger.log +#define plog getLogger().debugLogger.log /** * @brief Error logger getter */ -#define plogE SINGLETON_LOGGER_CLASS_NAME::getInstance().errorLogger.log +#define plogE getLogger().errorLogger.log /** * @brief Warning logger getter */ -#define plogW SINGLETON_LOGGER_CLASS_NAME::getInstance().warningLogger.log +#define plogW getLogger().warningLogger.log /** * @brief Info logger getter */ -#define plogI SINGLETON_LOGGER_CLASS_NAME::getInstance().infoLogger.log +#define plogI getLogger().infoLogger.log /** * @brief Debug logger getter */ -#define plogD SINGLETON_LOGGER_CLASS_NAME::getInstance().debugLogger.log +#define plogD getLogger().debugLogger.log /** @} */ /** From edb6cf8753c155bb387aeef6b632181345ec5378 Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Fri, 13 Dec 2019 13:35:14 +0100 Subject: [PATCH 014/413] Using getLogger() in mainEzspTest --- src/example/mainEzspTest.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/example/mainEzspTest.cpp b/src/example/mainEzspTest.cpp index f1034c72..677e7246 100644 --- a/src/example/mainEzspTest.cpp +++ b/src/example/mainEzspTest.cpp @@ -211,9 +211,7 @@ int main(int argc, char **argv) { } } -#ifdef USE_RARITAN - RaritanLogger::getInstance().setLogLevel(debugEnabled ? LOG_LEVEL::DEBUG : LOG_LEVEL::INFO); -#endif + getLogger().setLogLevel(debugEnabled ? LOG_LEVEL::DEBUG : LOG_LEVEL::INFO); clogI << "Starting ezsp test program (info)\n"; From f09cd6c8dab4566b9d07201cfe5ab10f56396019 Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Fri, 13 Dec 2019 14:16:05 +0100 Subject: [PATCH 015/413] Fixing tests up to stage 334 --- src/tests/gp_tests.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/gp_tests.cpp b/src/tests/gp_tests.cpp index 41705690..e9016197 100644 --- a/src/tests/gp_tests.cpp +++ b/src/tests/gp_tests.cpp @@ -144,7 +144,7 @@ TEST_GROUP(gp_tests) { TEST(gp_tests, gp_recv_sensor_measurement) { CppThreadsTimerFactory timerFactory; GenericAsyncDataInputObservable uartIncomingDataHandler; - ConsoleLogger::getInstance().setLogLevel(LOG_LEVEL::DEBUG); /* Only display logs for debug level info and higher (up to error) */ + getLogger().setLogLevel(LOG_LEVEL::DEBUG); std::vector< std::vector > stageExpectedTransitions; GPRecvSensorMeasurementTest serialProcessor(&stageExpectedTransitions); auto wcb = [&serialProcessor](size_t& writtenCnt, const void* buf, size_t cnt, std::chrono::duration delta) -> int { @@ -1151,26 +1151,26 @@ TEST(gp_tests, gp_recv_sensor_measurement) { stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); - stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e }); + stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x5a, 0x9e, 0x40, 0x7e }); uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(331); stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); - stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e })); + stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x02, 0x22, 0x55, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x5a, 0xb8, 0xac, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(333); stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); - stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e })); + stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0xc8, 0x22, 0xc7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x12, 0x07, 0x54, 0xa8, 0x69, 0x7c, 0xfe, 0xf4, 0xe2, 0xe1, 0x24, 0xb1, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x90, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(335); stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); stageExpectedTransitions.push_back({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e })); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0xc8, 0x02, 0x8a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(337); From fb2827d34eec439e175c7fce90d0a5f3d382016c Mon Sep 17 00:00:00 2001 From: mchalain Date: Fri, 13 Dec 2019 17:00:55 +0100 Subject: [PATCH 016/413] [raritan] remove EventLoop and use directly the Singleton Selector --- Makefile => build/Makefile | 0 src/spi/raritan/RaritanEventLoop.cpp | 23 ----------- src/spi/raritan/RaritanEventLoop.h | 53 ------------------------- src/spi/raritan/RaritanTimer.cpp | 7 +++- src/spi/raritan/RaritanTimer.h | 4 +- src/spi/raritan/RaritanTimerFactory.cpp | 4 +- src/spi/raritan/RaritanTimerFactory.h | 5 +-- src/spi/raritan/RaritanUartDriver.cpp | 11 +++-- src/spi/raritan/RaritanUartDriver.h | 5 +-- 9 files changed, 21 insertions(+), 91 deletions(-) rename Makefile => build/Makefile (100%) delete mode 100644 src/spi/raritan/RaritanEventLoop.cpp delete mode 100644 src/spi/raritan/RaritanEventLoop.h diff --git a/Makefile b/build/Makefile similarity index 100% rename from Makefile rename to build/Makefile diff --git a/src/spi/raritan/RaritanEventLoop.cpp b/src/spi/raritan/RaritanEventLoop.cpp deleted file mode 100644 index a1704150..00000000 --- a/src/spi/raritan/RaritanEventLoop.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @file RaritanEventLoop.cpp - * - * @brief Allows manipulating the main loop in the Raritan framwork - */ - -#include "RaritanEventLoop.h" - -RaritanEventLoop::RaritanEventLoop() : m_selector(*pp::SelectorSingleton::getInstance()) { - -} - -RaritanEventLoop::RaritanEventLoop(pp::Selector &selector) : m_selector(selector) { - -} - -void RaritanEventLoop::run() { - this->m_selector.run(); -} - -pp::Selector& RaritanEventLoop::getSelector() { - return this->m_selector; -} diff --git a/src/spi/raritan/RaritanEventLoop.h b/src/spi/raritan/RaritanEventLoop.h deleted file mode 100644 index ae857868..00000000 --- a/src/spi/raritan/RaritanEventLoop.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @file RaritanEventLoop.h - * - * @brief Allows manipulating the main loop in the Raritan framwork - */ - -#pragma once - -#include - -#ifdef USE_RARITAN -/**** Start of the official API; no includes below this point! ***************/ -#include -#endif // USE_RARITAN - -/** - * @brief Class to manipulate the main loop in the Raritan framwork - */ -class RaritanEventLoop { -public: - /** - * @brief Default constructor - * - * Will use the singleton selector - */ - RaritanEventLoop(); - - /** - * @brief Constructor using a pre-existing selector - * - * @param selector The selector to use for the mainloop - */ - RaritanEventLoop(pp::Selector &selector); - - /** - * @brief Run the main loop - */ - void run(); - - /** - * @brief Get the main loop selector - * - * @return The main loop selector as a reference - */ - pp::Selector& getSelector(); - -private: - pp::Selector& m_selector; /*!< The main loop selector */ -}; - -#ifdef USE_RARITAN -#include -#endif // USE_RARITAN diff --git a/src/spi/raritan/RaritanTimer.cpp b/src/spi/raritan/RaritanTimer.cpp index 5102ad59..95bb04ee 100644 --- a/src/spi/raritan/RaritanTimer.cpp +++ b/src/spi/raritan/RaritanTimer.cpp @@ -7,7 +7,10 @@ #include "RaritanTimer.h" #include "spi/GenericLogger.h" -RaritanTimer::RaritanTimer(RaritanEventLoop& eventLoop) : m_eventLoop(eventLoop), m_toutcbhandle() { +RaritanTimer::RaritanTimer() : + m_eventSelector(*pp::SelectorSingleton::getInstance()), + m_toutcbhandle() +{ } RaritanTimer::~RaritanTimer() { @@ -38,7 +41,7 @@ bool RaritanTimer::start(uint16_t timeout, std::function RaritanTimerFactory::create() const { - return std::unique_ptr(new RaritanTimer(m_eventLoop)); + return std::unique_ptr(new RaritanTimer()); } diff --git a/src/spi/raritan/RaritanTimerFactory.h b/src/spi/raritan/RaritanTimerFactory.h index 02fed492..23425808 100644 --- a/src/spi/raritan/RaritanTimerFactory.h +++ b/src/spi/raritan/RaritanTimerFactory.h @@ -6,8 +6,8 @@ #pragma once + #include "spi/ITimerFactory.h" -#include "RaritanEventLoop.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ @@ -24,7 +24,7 @@ class RaritanTimerFactory : public ITimerFactory { * * @param eventLoop The current process' Raritan mainloop */ - RaritanTimerFactory(RaritanEventLoop& eventLoop); + RaritanTimerFactory(); /** * @brief Destructor @@ -38,7 +38,6 @@ class RaritanTimerFactory : public ITimerFactory { */ std::unique_ptr create() const; private: - RaritanEventLoop& m_eventLoop; /*!< The Raritan event loop */ }; #ifdef USE_RARITAN diff --git a/src/spi/raritan/RaritanUartDriver.cpp b/src/spi/raritan/RaritanUartDriver.cpp index d4a12f06..4f49ef61 100644 --- a/src/spi/raritan/RaritanUartDriver.cpp +++ b/src/spi/raritan/RaritanUartDriver.cpp @@ -8,7 +8,12 @@ #include #include "spi/GenericLogger.h" -RaritanUartDriver::RaritanUartDriver(RaritanEventLoop& eventLoop, GenericAsyncDataInputObservable* uartIncomingDataHandler) : m_eventLoop(eventLoop), m_sel_handle(), m_serial_tty(), m_data_input_observable(uartIncomingDataHandler) { +RaritanUartDriver::RaritanUartDriver(GenericAsyncDataInputObservable* uartIncomingDataHandler) : + m_eventSelector(*pp::SelectorSingleton::getInstance()), + m_sel_handle(), + m_serial_tty(), + m_data_input_observable(uartIncomingDataHandler) +{ } RaritanUartDriver::~RaritanUartDriver() { @@ -43,10 +48,10 @@ int RaritanUartDriver::open(const std::string& serialPortName, unsigned int baud PPD_DEBUG_HEX("read from dongle: ", readData, rdcnt); if (this->m_data_input_observable) this->m_data_input_observable->notifyObservers(readData, rdcnt); - //this->m_eventLoop.getSelector().stopAsync(); + //this->m_eventSelector.stopAsync(); } }; - this->m_eventLoop.getSelector().addSelectable(m_sel_handle, m_serial_tty, POLLIN, cbin); + this->m_eventSelector.addSelectable(m_sel_handle, m_serial_tty, POLLIN, cbin); return PP_OK; } diff --git a/src/spi/raritan/RaritanUartDriver.h b/src/spi/raritan/RaritanUartDriver.h index 19fa3f4f..a84fd927 100644 --- a/src/spi/raritan/RaritanUartDriver.h +++ b/src/spi/raritan/RaritanUartDriver.h @@ -10,7 +10,6 @@ #include #include #include "spi/IUartDriver.h" -#include "RaritanEventLoop.h" #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ @@ -35,7 +34,7 @@ class RaritanUartDriver : public IUartDriver { * @param eventLoop A RaritanEventLoop object to access the mainloop selector * @param uartIncomingDataHandler An observable instance that will notify its observer when one or more new bytes have been read, if =nullptr, no notification will be done */ - RaritanUartDriver(RaritanEventLoop& eventLoop, GenericAsyncDataInputObservable* uartIncomingDataHandler = nullptr); + RaritanUartDriver(GenericAsyncDataInputObservable* uartIncomingDataHandler = nullptr); /** * @brief Copy constructor @@ -92,7 +91,7 @@ class RaritanUartDriver : public IUartDriver { void close(); private: - RaritanEventLoop& m_eventLoop; /*!< The raritan mainloop */ + pp::Selector& m_eventSelector; /*!< The raritan mainloop */ pp::Selector::SelectableHandle m_sel_handle; /*!< A handle on the selectable (to read bytes) */ pp::Tty::SPtr m_serial_tty; /*!< The serial port file descriptor */ GenericAsyncDataInputObservable* m_data_input_observable; /*!< The observable that will notify observers when new bytes are available on the UART */ From 389916d9f0d9480f5ce3f86600397fe9bf7ce5b8 Mon Sep 17 00:00:00 2001 From: mchalain Date: Fri, 13 Dec 2019 17:02:33 +0100 Subject: [PATCH 017/413] [example] use new Raritan API --- example/mainEzspTest.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 2b5e9ca3..0bc067c9 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -66,13 +66,10 @@ int main(int argc, char **argv) { #ifdef USE_SERIALCPP SerialUartDriver uartDriver; CppThreadsTimerFactory timerFactory; - - ConsoleLogger::getInstance().setLogLevel(LOG_LEVEL::DEBUG); /* Only display logs for debug level info and higher (up to error) */ #endif #ifdef USE_RARITAN - RaritanEventLoop eventLoop; - RaritanUartDriver uartDriver(eventLoop); - RaritanTimerFactory timerFactory(eventLoop); + RaritanUartDriver uartDriver; + RaritanTimerFactory timerFactory; #endif int optionIndex=0; From b7a68afbb5f647cfc7004c95a4e496fa7b0b1a7b Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 15:40:25 +0100 Subject: [PATCH 018/413] [TimerFactory] transform to propose uniq API to build Timer --- src/spi/TimerFactory.cpp | 30 +++++++++++++ src/spi/TimerFactory.h | 34 ++++++++++++++ src/spi/cppthreads/CppThreadsTimerFactory.cpp | 9 ---- src/spi/cppthreads/CppThreadsTimerFactory.h | 19 -------- src/spi/raritan/RaritanTimerFactory.cpp | 20 --------- src/spi/raritan/RaritanTimerFactory.h | 45 ------------------- 6 files changed, 64 insertions(+), 93 deletions(-) create mode 100644 src/spi/TimerFactory.cpp create mode 100644 src/spi/TimerFactory.h delete mode 100644 src/spi/cppthreads/CppThreadsTimerFactory.cpp delete mode 100644 src/spi/cppthreads/CppThreadsTimerFactory.h delete mode 100644 src/spi/raritan/RaritanTimerFactory.cpp delete mode 100644 src/spi/raritan/RaritanTimerFactory.h diff --git a/src/spi/TimerFactory.cpp b/src/spi/TimerFactory.cpp new file mode 100644 index 00000000..319d6cac --- /dev/null +++ b/src/spi/TimerFactory.cpp @@ -0,0 +1,30 @@ +/** + * @file TimerFactory.cpp + * + * @brief Concrete implementation of a ITimer factory returning RaritanTimer objects + */ + +#include "spi/TimerFactory.h" +#ifdef USE_RARITAN +#include "spi/raritan/RaritanTimer.h" +#endif +#ifdef USE_CPPTHREADS +#include "spi/cppthreads/CppThreadsTimer.h" +#endif + +TimerFactory::TimerFactory() { + +} + +TimerFactory::~TimerFactory() { + +} + +std::unique_ptr TimerFactory::create() const { +#ifdef USE_RARITAN + return std::unique_ptr(new RaritanTimer()); +#endif +#ifdef USE_CPPTHREADS + return std::unique_ptr(new CppThreadsTimer()); +#endif +} diff --git a/src/spi/TimerFactory.h b/src/spi/TimerFactory.h new file mode 100644 index 00000000..0d32741d --- /dev/null +++ b/src/spi/TimerFactory.h @@ -0,0 +1,34 @@ +/** + * @file TimerFactory.h + * + * @brief Concrete implementation of a ITimer factory + */ + + +#include "spi/ITimerFactory.h" + +/** + * @brief Factory class to generate RaritanTimer objects + */ +class TimerFactory : public ITimerFactory { +public: + /** + * @brief Constructor + * + * @param eventLoop The current process' Raritan mainloop + */ + TimerFactory(); + + /** + * @brief Destructor + */ + ~TimerFactory(); + + /** + * @brief Create a new timer + * + * @return The new timer created + */ + std::unique_ptr create() const; +private: +}; diff --git a/src/spi/cppthreads/CppThreadsTimerFactory.cpp b/src/spi/cppthreads/CppThreadsTimerFactory.cpp deleted file mode 100644 index f1a2f226..00000000 --- a/src/spi/cppthreads/CppThreadsTimerFactory.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "CppThreadsTimerFactory.h" - -CppThreadsTimerFactory::CppThreadsTimerFactory() { } - -CppThreadsTimerFactory::~CppThreadsTimerFactory() { } - -std::unique_ptr CppThreadsTimerFactory::create() const { - return std::unique_ptr(new CppThreadsTimer()); -} \ No newline at end of file diff --git a/src/spi/cppthreads/CppThreadsTimerFactory.h b/src/spi/cppthreads/CppThreadsTimerFactory.h deleted file mode 100644 index 26b66bba..00000000 --- a/src/spi/cppthreads/CppThreadsTimerFactory.h +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file CppThreadsTimerFactory.h - * - * @brief Concrete implementation of a ITimer factory returning CppThreadsTimer objects - */ -#pragma once - -#include "spi/ITimerFactory.h" -#include "CppThreadsTimer.h" - -/** - * @brief Factory class to generate CppThreadsTimer objects - */ -class CppThreadsTimerFactory : public ITimerFactory { -public: - CppThreadsTimerFactory(); - ~CppThreadsTimerFactory(); - std::unique_ptr create() const; -}; diff --git a/src/spi/raritan/RaritanTimerFactory.cpp b/src/spi/raritan/RaritanTimerFactory.cpp deleted file mode 100644 index 63b811a5..00000000 --- a/src/spi/raritan/RaritanTimerFactory.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file RaritanTimerFactory.cpp - * - * @brief Concrete implementation of a ITimer factory returning RaritanTimer objects - */ - -#include "RaritanTimerFactory.h" -#include "RaritanTimer.h" - -RaritanTimerFactory::RaritanTimerFactory() { - -} - -RaritanTimerFactory::~RaritanTimerFactory() { - -} - -std::unique_ptr RaritanTimerFactory::create() const { - return std::unique_ptr(new RaritanTimer()); -} diff --git a/src/spi/raritan/RaritanTimerFactory.h b/src/spi/raritan/RaritanTimerFactory.h deleted file mode 100644 index 23425808..00000000 --- a/src/spi/raritan/RaritanTimerFactory.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @file RaritanTimerFactory.h - * - * @brief Concrete implementation of a ITimer factory returning RaritanTimer objects - */ - -#pragma once - - -#include "spi/ITimerFactory.h" - -#ifdef USE_RARITAN -/**** Start of the official API; no includes below this point! ***************/ -#include -#endif // USE_RARITAN - -/** - * @brief Factory class to generate RaritanTimer objects - */ -class RaritanTimerFactory : public ITimerFactory { -public: - /** - * @brief Constructor - * - * @param eventLoop The current process' Raritan mainloop - */ - RaritanTimerFactory(); - - /** - * @brief Destructor - */ - ~RaritanTimerFactory(); - - /** - * @brief Create a new timer - * - * @return The new timer created - */ - std::unique_ptr create() const; -private: -}; - -#ifdef USE_RARITAN -#include -#endif // USE_RARITAN From 07fbf41cb45a78c0bf853d8a7d37d364593f1b55 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 15:43:30 +0100 Subject: [PATCH 019/413] [Logger] new API with Logger class to have an uniq API --- src/spi/ILogger.h | 7 ++++--- src/spi/Logger.cpp | 24 ++++++++++++++++++++++++ src/spi/Logger.h | 15 +++++++++++++++ src/spi/console/ConsoleLogger.cpp | 22 +++++++++++----------- src/spi/console/ConsoleLogger.h | 12 ++++-------- src/spi/raritan/RaritanLogger.cpp | 12 +++++------- src/spi/raritan/RaritanLogger.h | 12 ++++-------- 7 files changed, 67 insertions(+), 37 deletions(-) create mode 100644 src/spi/Logger.cpp create mode 100644 src/spi/Logger.h diff --git a/src/spi/ILogger.h b/src/spi/ILogger.h index 02c73ab4..9521dde1 100644 --- a/src/spi/ILogger.h +++ b/src/spi/ILogger.h @@ -265,7 +265,7 @@ class ILoggerStream : public std::streambuf { * @endcode */ class ILogger { -public: +protected: /** * @brief Constructor * @@ -280,7 +280,8 @@ class ILogger { warningLogger(usedWarningLogger), infoLogger(usedInfoLogger), debugLogger(usedDebugLogger), - traceLogger(usedTraceLogger) { + traceLogger(usedTraceLogger) + { } /** @@ -295,6 +296,7 @@ class ILogger { */ ILogger(const ILogger& other) = delete; +public: /** * @brief Set logging level * @@ -341,7 +343,6 @@ class ILogger { va_end(args); } -public: ILoggerStream& errorLogger; /*!< The enclosed error debugger handler instance */ ILoggerStream& warningLogger; /*!< The enclosed warning debugger handler instance */ ILoggerStream& infoLogger; /*!< The enclosed info debugger handler instance */ diff --git a/src/spi/Logger.cpp b/src/spi/Logger.cpp new file mode 100644 index 00000000..10ac91a4 --- /dev/null +++ b/src/spi/Logger.cpp @@ -0,0 +1,24 @@ +#include "spi/Logger.h" +#ifdef USE_RARITAN +#include "spi/raritan/RaritanLogger.h" +#endif +#ifdef USE_CPPTHREADS +#include "spi/console/ConsoleLogger.h" +#endif + +ILogger *Logger::mInstance; + +ILogger& Logger::getInstance() +{ + + static bool static_init = []()->bool { +#ifdef USE_RARITAN + mInstance = new RaritanLogger(); +#endif +#ifdef USE_CPPTHREADS + mInstance = new ConsoleLogger(); +#endif + return true; + }(); + return *mInstance; +} diff --git a/src/spi/Logger.h b/src/spi/Logger.h new file mode 100644 index 00000000..5ce0b72e --- /dev/null +++ b/src/spi/Logger.h @@ -0,0 +1,15 @@ +#ifndef __LOGGER_H__ +#define __LOGGER_H__ + +#include +#include "spi/ILogger.h" + +class Logger +{ +public: + static ILogger& getInstance(); +private: + Logger(); + static ILogger* mInstance; +}; +#endif diff --git a/src/spi/console/ConsoleLogger.cpp b/src/spi/console/ConsoleLogger.cpp index 29ea2374..0b236902 100644 --- a/src/spi/console/ConsoleLogger.cpp +++ b/src/spi/console/ConsoleLogger.cpp @@ -4,6 +4,7 @@ * @brief Concrete implementation of a logger using the stdout and stderr output streams on the text console */ +#include "spi/Logger.h" #include "ConsoleLogger.h" #include #include @@ -102,6 +103,11 @@ static ConsoleInfoLogger consoleInfoLogger; /* Create a unique instance of the C static ConsoleDebugLogger consoleDebugLogger; /* Create a unique instance of the ConsoleDebugLogger that will be used to handle debug logs */ static ConsoleTraceLogger consoleTraceLogger; /* Create a unique instance of the ConsoleTraceLogger that will be used to handle trace logs */ +ConsoleLogger::ConsoleLogger(): + ILogger(consoleErrorLogger, consoleWarningLogger, consoleInfoLogger, consoleDebugLogger, consoleTraceLogger) +{ +} + ConsoleLogger::ConsoleLogger(ILoggerStream& errorLogger, ILoggerStream& warningLogger, ILoggerStream& infoLogger, ILoggerStream& debugLogger, ILoggerStream& traceLogger) : ILogger(errorLogger, warningLogger, infoLogger, debugLogger, traceLogger) { } @@ -109,15 +115,9 @@ ConsoleLogger::ConsoleLogger(ILoggerStream& errorLogger, ILoggerStream& warningL ConsoleLogger::~ConsoleLogger() { } -ConsoleLogger& ConsoleLogger::getInstance() { - static ConsoleLogger instance(consoleErrorLogger, consoleWarningLogger, consoleInfoLogger, consoleDebugLogger, consoleTraceLogger); /* Unique instance of the singleton */ - - return instance; -} - /* Create unique (global) instances of each logger type, and store them inside the ILogger (singleton)'s class static attribute */ -std::ostream ILogger::loggerErrorStream(&ConsoleLogger::getInstance().errorLogger); -std::ostream ILogger::loggerWarningStream(&ConsoleLogger::getInstance().warningLogger); -std::ostream ILogger::loggerInfoStream(&ConsoleLogger::getInstance().infoLogger); -std::ostream ILogger::loggerDebugStream(&ConsoleLogger::getInstance().debugLogger); -std::ostream ILogger::loggerTraceStream(&ConsoleLogger::getInstance().traceLogger); +std::ostream ILogger::loggerErrorStream(&Logger::getInstance().errorLogger); +std::ostream ILogger::loggerWarningStream(&Logger::getInstance().warningLogger); +std::ostream ILogger::loggerInfoStream(&Logger::getInstance().infoLogger); +std::ostream ILogger::loggerDebugStream(&Logger::getInstance().debugLogger); +std::ostream ILogger::loggerTraceStream(&Logger::getInstance().traceLogger); diff --git a/src/spi/console/ConsoleLogger.h b/src/spi/console/ConsoleLogger.h index 549b33d9..9bf0c50a 100644 --- a/src/spi/console/ConsoleLogger.h +++ b/src/spi/console/ConsoleLogger.h @@ -203,7 +203,8 @@ class ConsoleTraceLogger : public ConsoleStdoutLogger { * @brief Class to interact with a console logger */ class ConsoleLogger : public ILogger { -private: + friend Logger; +protected: /** * @brief Default constructor * @@ -215,16 +216,11 @@ class ConsoleLogger : public ILogger { */ ConsoleLogger(ILoggerStream& errorLogger, ILoggerStream& warningLogger, ILoggerStream& infoLogger, ILoggerStream& debugLogger, ILoggerStream& traceLogger); + ConsoleLogger(); + ~ConsoleLogger(); public: - /** - * @brief Get a reference to the singleton (only instance) of this logger class - * - * @return The unique instance as a reference - */ - static ConsoleLogger& getInstance(); - /** * @brief Assignment operator * diff --git a/src/spi/raritan/RaritanLogger.cpp b/src/spi/raritan/RaritanLogger.cpp index 87eed461..3e46a39b 100644 --- a/src/spi/raritan/RaritanLogger.cpp +++ b/src/spi/raritan/RaritanLogger.cpp @@ -146,6 +146,11 @@ static RaritanInfoLogger raritanInfoLogger; /* Create a unique instance of the R static RaritanDebugLogger raritanDebugLogger; /* Create a unique instance of the RaritanDebugLogger that will be used to handle debug logs */ //static RaritanTraceLogger raritanTraceLogger; /* Create a unique instance of the RaritanTraceLogger that will be used to handle trace logs */ +RaritanLogger::RaritanLogger(): + ILogger(raritanErrorLogger, raritanWarningLogger, raritanInfoLogger, raritanDebugLogger, raritanDebugLogger) +{ +} + RaritanLogger::RaritanLogger(ILoggerStream& usedErrorLogger, ILoggerStream& usedWarningLogger, ILoggerStream& usedInfoLogger, ILoggerStream& usedDebugLogger, ILoggerStream& usedTraceLogger) : ILogger(usedErrorLogger, usedWarningLogger, usedInfoLogger, usedDebugLogger, usedTraceLogger) { } @@ -153,13 +158,6 @@ RaritanLogger::RaritanLogger(ILoggerStream& usedErrorLogger, ILoggerStream& used RaritanLogger::~RaritanLogger() { } -RaritanLogger& RaritanLogger::getInstance() { - /* FIXME: for now we use debug logger also for trace level */ - static RaritanLogger instance(raritanErrorLogger, raritanWarningLogger, raritanInfoLogger, raritanDebugLogger, raritanDebugLogger); /* Unique instance of the singleton */ - - return instance; -} - /* Create unique (global) instances of each logger type, and store them inside the ILogger (singleton)'s class static attribute */ std::ostream ILogger::loggerErrorStream(&RaritanLogger::getInstance().errorLogger); diff --git a/src/spi/raritan/RaritanLogger.h b/src/spi/raritan/RaritanLogger.h index d57b543e..badd3b33 100644 --- a/src/spi/raritan/RaritanLogger.h +++ b/src/spi/raritan/RaritanLogger.h @@ -225,7 +225,8 @@ class RaritanDebugLogger : public RaritanGenericLogger { * @brief Class to interact with the logger in the Raritan framework */ class RaritanLogger : public ILogger { -private: + friend Logger; +protected: /** * @brief Constructor * @@ -237,16 +238,11 @@ class RaritanLogger : public ILogger { */ RaritanLogger(ILoggerStream& errorLogger, ILoggerStream& warningLogger, ILoggerStream& infoLogger, ILoggerStream& debugLogger, ILoggerStream& traceLogger); + RaritanLogger(); + ~RaritanLogger(); public: - /** - * @brief Get a reference to the singleton (only instance) of this logger class - * - * @return The unique instance as a reference - */ - static RaritanLogger& getInstance(); - /** * @brief Assignment operator * From 006e527f124dc079d0b979abaf48e8039423e7c4 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 15:55:18 +0100 Subject: [PATCH 020/413] [Serial] new Builder to have uniq API --- src/ezsp/ash.cpp | 2 +- src/ezsp/ezsp-dongle.cpp | 2 +- src/ezsp/zigbee-tools/green-power-sink.cpp | 1 - src/ezsp/zigbee-tools/zigbee-messaging.cpp | 2 +- src/ezsp/zigbee-tools/zigbee-networking.cpp | 2 +- src/spi/GenericLogger.h | 11 ---------- src/spi/UartDriverBuilder.cpp | 24 +++++++++++++++++++++ src/spi/UartDriverBuilder.h | 15 +++++++++++++ src/spi/serial/SerialUartDriver.cpp | 2 +- 9 files changed, 44 insertions(+), 17 deletions(-) delete mode 100644 src/spi/GenericLogger.h create mode 100644 src/spi/UartDriverBuilder.cpp create mode 100644 src/spi/UartDriverBuilder.h diff --git a/src/ezsp/ash.cpp b/src/ezsp/ash.cpp index c4e81a55..32fabaa9 100644 --- a/src/ezsp/ash.cpp +++ b/src/ezsp/ash.cpp @@ -8,7 +8,7 @@ #include "ash.h" -#include "spi/GenericLogger.h" +#include "spi/ILogger.h" using namespace std; diff --git a/src/ezsp/ezsp-dongle.cpp b/src/ezsp/ezsp-dongle.cpp index bf40629c..7ced2c1d 100644 --- a/src/ezsp/ezsp-dongle.cpp +++ b/src/ezsp/ezsp-dongle.cpp @@ -3,7 +3,7 @@ */ #include "ezsp-dongle.h" -#include "spi/GenericLogger.h" +#include "spi/ILogger.h" CEzspDongle::CEzspDongle( ITimerFactory &i_timer_factory, CEzspDongleObserver* ip_observer ) : timer_factory(i_timer_factory), diff --git a/src/ezsp/zigbee-tools/green-power-sink.cpp b/src/ezsp/zigbee-tools/green-power-sink.cpp index 263560df..86b24ea7 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.cpp +++ b/src/ezsp/zigbee-tools/green-power-sink.cpp @@ -21,7 +21,6 @@ #include "ezsp/zbmessage/gpd-commissioning-command-payload.h" #include "ezsp/ezsp-protocol/get-network-parameters-response.h" -#include "spi/GenericLogger.h" #include "spi/ILogger.h" // some defines to help understanding diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.cpp b/src/ezsp/zigbee-tools/zigbee-messaging.cpp index fc2a793a..c88802ab 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.cpp +++ b/src/ezsp/zigbee-tools/zigbee-messaging.cpp @@ -6,7 +6,7 @@ #include "ezsp/zigbee-tools/zigbee-messaging.h" -#include "spi/GenericLogger.h" +#include "spi/ILogger.h" CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, ITimerFactory &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) diff --git a/src/ezsp/zigbee-tools/zigbee-networking.cpp b/src/ezsp/zigbee-tools/zigbee-networking.cpp index 5dde4aff..58674d8e 100644 --- a/src/ezsp/zigbee-tools/zigbee-networking.cpp +++ b/src/ezsp/zigbee-tools/zigbee-networking.cpp @@ -12,7 +12,7 @@ #include "ezsp/ezsp-protocol/struct/ember-key-struct.h" #include "ezsp/ezsp-protocol/struct/ember-child-data-struct.h" -#include "spi/GenericLogger.h" +#include "spi/ILogger.h" CZigbeeNetworking::CZigbeeNetworking( CEzspDongle &i_dongle, CZigbeeMessaging &i_zb_messaging ) : diff --git a/src/spi/GenericLogger.h b/src/spi/GenericLogger.h deleted file mode 100644 index 76008ca6..00000000 --- a/src/spi/GenericLogger.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef USE_SERIALCPP -#include "spi/console/ConsoleLogger.h" -#else -#ifdef USE_RARITAN -#include "spi/raritan/RaritanLogger.h" -#else -#error Compiler directive USE_SERIALCPP or USE_RARITAN is required -#endif // USE_RARITAN -#endif // USE_SERIALCPP diff --git a/src/spi/UartDriverBuilder.cpp b/src/spi/UartDriverBuilder.cpp new file mode 100644 index 00000000..55278a16 --- /dev/null +++ b/src/spi/UartDriverBuilder.cpp @@ -0,0 +1,24 @@ +#include "spi/UartDriverBuilder.h" + +#ifdef USE_RARITAN +#include "spi/raritan/RaritanUartDriver.h" +#endif +#ifdef USE_SERIALCPP +#include "spi/serial/SerialUartDriver.h" +#endif +#ifdef USE_MOCKSERIAL +#include "spi/mock-uart/MockUartDriver.h" +#endif + +IUartDriver *UartDriverBuilder::getUartDriver() +{ +#ifdef USE_RARITAN + return new RaritanUartDriver(); +#endif +#ifdef USE_SERIALCPP + return new SerialUartDriver(); +#endif +#ifdef USE_MOCKSERIAL + return new MockUartDriver(); +#endif +} diff --git a/src/spi/UartDriverBuilder.h b/src/spi/UartDriverBuilder.h new file mode 100644 index 00000000..f5430c9f --- /dev/null +++ b/src/spi/UartDriverBuilder.h @@ -0,0 +1,15 @@ +#ifndef __UARTDRIVDERBUILDER_H__ +#define __UARTDRIVDERBUILDER_H__ + +#include +#include "spi/IUartDriver.h" + +class UartDriverBuilder +{ +public: + static IUartDriver *getUartDriver(); +private: + UartDriverBuilder() {} +}; + +#endif diff --git a/src/spi/serial/SerialUartDriver.cpp b/src/spi/serial/SerialUartDriver.cpp index 3a837262..4a93d3dd 100644 --- a/src/spi/serial/SerialUartDriver.cpp +++ b/src/spi/serial/SerialUartDriver.cpp @@ -7,7 +7,7 @@ #include "SerialUartDriver.h" #include -#include "spi/GenericLogger.h" +#include "spi/ILogger.h" SerialUartDriver::SerialUartDriver() : m_serial_port(), From e2277e7b0808c598a49503822faace15eadfac8c Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 16:04:49 +0100 Subject: [PATCH 021/413] [example] use the new API --- example/CAppDemo.cpp | 4 ++-- example/CAppDemo.h | 2 +- example/mainEzspTest.cpp | 44 +++++++++++++--------------------------- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index 1c0f5b78..e1011a34 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -17,7 +17,7 @@ #include "ezsp/byte-manip.h" -CAppDemo::CAppDemo(IUartDriver& uartDriver, +CAppDemo::CAppDemo(IUartDriver *uartDriver, ITimerFactory &i_timer_factory, bool reset, bool openGpCommissionning, @@ -50,7 +50,7 @@ CAppDemo::CAppDemo(IUartDriver& uartDriver, clogE << "Invalid channel: " << channel << ". Using 11 instead\n"; channel = 11; } - if( dongle.open(&uartDriver) ) { + if( dongle.open(uartDriver) ) { clogI << "CAppDemo open success !" << std::endl; dongle.registerObserver(this); gp_sink.registerObserver(this); diff --git a/example/CAppDemo.h b/example/CAppDemo.h index 81555dc5..7ce454a3 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -33,7 +33,7 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver * Constructor * FIXME: too many args, this constructor becomes unreadable **/ - CAppDemo(IUartDriver& uartDriver, + CAppDemo(IUartDriver *uartDriver, ITimerFactory &i_timer_factory, bool reset=false, bool openGpCommissionning=false, diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 0bc067c9..805c4a25 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -6,26 +6,18 @@ #include -#ifdef USE_SERIALCPP -#include "spi/serial/SerialUartDriver.h" -#include "spi/cppthreads/CppThreadsTimerFactory.h" -#include -#else -#ifdef USE_RARITAN -#include "spi/raritan/RaritanEventLoop.h" -#include "spi/raritan/RaritanUartDriver.h" -#include "spi/raritan/RaritanTimerFactory.h" -#else -#error Compiler directive USE_SERIALCPP or USE_RARITAN is required -#endif // USE_RARITAN -#endif // USE_SERIALCPP -#include "spi/GenericLogger.h" -#include "example/CAppDemo.h" +#include "spi/TimerFactory.h" +#include "spi/UartDriverBuilder.h" +#include "spi/Logger.h" +#include "CAppDemo.h" #include #include #include #include //#include // For debug +#ifdef USE_RARITAN +#include +#endif static void writeUsage(const char* progname, FILE *f) { fprintf(f,"\n"); @@ -63,15 +55,8 @@ static bool hexDigitToNibble(const char hDigit, uint8_t& byte) { } int main(int argc, char **argv) { -#ifdef USE_SERIALCPP - SerialUartDriver uartDriver; - CppThreadsTimerFactory timerFactory; -#endif -#ifdef USE_RARITAN - RaritanUartDriver uartDriver; - RaritanTimerFactory timerFactory; -#endif - + IUartDriver *uartDriver = UartDriverBuilder::getUartDriver(); + TimerFactory timerFactory; int optionIndex=0; int c; bool debugEnabled = false; @@ -208,25 +193,24 @@ int main(int argc, char **argv) { } } -#ifdef USE_RARITAN - RaritanLogger::getInstance().setLogLevel(debugEnabled ? LOG_LEVEL::DEBUG : LOG_LEVEL::INFO); -#endif + Logger::getInstance().setLogLevel(debugEnabled ? LOG_LEVEL::DEBUG : LOG_LEVEL::INFO); clogI << "Starting ezsp test program (info)\n"; - if (uartDriver.open(serialPort, 57600) != 0) { + if (uartDriver->open(serialPort, 57600) != 0) { clogE << "Failed opening serial port. Aborting\n"; return 1; } CAppDemo app(uartDriver, timerFactory, (resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpRemovedDevDataList, gpAddedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ -#ifdef USE_SERIALCPP +#ifdef USE_CPPTHREADS std::string line; std::getline(std::cin, line); #endif #ifdef USE_RARITAN - eventLoop.run(); + pp::Selector eventSelector(*pp::SelectorSingleton::getInstance()) + eventSelector.run(); #endif return 0; From 97cd606c60fd681b38cd11418a42ce5c4d03392a Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 16:09:24 +0100 Subject: [PATCH 022/413] [build] new system with CMake --- CMakeLists.txt | 13 + build/Makefile | 18 -- build/raritan.mk | 7 - build/scripts.mk | 716 ----------------------------------------- example/CMakeLists.txt | 15 + example/Makefile | 46 --- src/CMakeLists.txt | 87 +++++ src/Makefile | 53 --- 8 files changed, 115 insertions(+), 840 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 build/Makefile delete mode 100644 build/raritan.mk delete mode 100644 build/scripts.mk create mode 100644 example/CMakeLists.txt delete mode 100644 example/Makefile create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..d0c02443 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.10) + +# set the project name and version +project(ezsp VERSION 1.0) + +configure_file(version.h.in version.h) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb") + +add_subdirectory(src) +add_subdirectory(example) diff --git a/build/Makefile b/build/Makefile deleted file mode 100644 index 189cd933..00000000 --- a/build/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -include build/scripts.mk - -package=ezsp -version=1.1 - -subdir-y+=src - -bin-$(TEST)+=mainEzspTest - -mainEzspTest_CFLAGS+=-Isrc -mainEzspTest_LDFLAGS+=-Lsrc - -mainEzspTest_SOURCES+=example/CAppDemo.cpp -mainEzspTest_SOURCES+=example/mainEzspTest.cpp -mainEzspTest_SOURCES+=example/dummy_db.cpp -mainEzspTest_LIBRARY+=ezsp -mainEzspTest_LIBRARY+=ezpspi -mainEzspTest_LIBRARY+=serialcpp diff --git a/build/raritan.mk b/build/raritan.mk deleted file mode 100644 index 2d25d8ee..00000000 --- a/build/raritan.mk +++ /dev/null @@ -1,7 +0,0 @@ -include ../../Config.mk - -SUBDIRS = ../src - - -include $(PP_BUILD_SYS_DIR)/Top.mk - diff --git a/build/scripts.mk b/build/scripts.mk deleted file mode 100644 index f8dcec48..00000000 --- a/build/scripts.mk +++ /dev/null @@ -1,716 +0,0 @@ -makemore:=$(lastword $(MAKEFILE_LIST)) -MAKEFLAGS+=--no-print-directory -ifeq ($(inside_makemore),) -inside_makemore:=yes -## -# debug tools -## -V=0 -ifeq ($(V),1) -quiet= -Q= -else -quiet=quiet_ -Q=@ -endif -echo-cmd = $(if $($(quiet)cmd_$(1)), echo ' $($(quiet)cmd_$(1))';) -cmd = $(echo-cmd) $(cmd_$(1)) - -## -# file extention definition -bin-ext= -slib-ext=a -dlib-ext=so -makefile-ext=mk - -## -# make file with targets definition -## -bin-y:= -sbin-y:= -lib-y:= -slib-y:= -modules-y:= -modules-y:= -data-y:= -hostbin-y:= - -srcdir?=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) -file?=$(notdir $(firstword $(MAKEFILE_LIST))) - -#ifneq ($(findstring -arch,$(CFLAGS)),) -#ARCH=$(shell echo $(CFLAGS) 2>&1 | $(AWK) 'BEGIN {FS="[- ]"} {print $$2}') -#buildpath=$(join $(srcdir),$(ARCH)) -#endif -ifneq ($(BUILDDIR),) - builddir=$(BUILDDIR:%/=%)/ - buildpath:=$(if $(wildcard $(addprefix /.,$(builddir))),$(builddir),$(join $(srcdir),$(builddir))) -else - builddir=$(srcdir) -endif - -# CONFIG could define LD CC or/and CFLAGS -# CONFIG must be included before "Commands for build and link" -VERSIONFILE?=version -DEFCONFIG?=$(srcdir)defconfig - -CONFIG?=.config -ifneq ($(wildcard $(builddir)$(CONFIG)),) -include $(builddir)$(CONFIG) -CONFIGFILE=$(buidldir)$(CONFIG) -$(eval NOCONFIGS:=$(shell awk '/^# .* is not set/{print $$2}' $(builddir)$(CONFIG))) -$(foreach config,$(NOCONFIGS),$(eval $(config)=n) ) -endif - -CONFIGURE_STATUS:=.config.cache -ifneq ($(wildcard $(builddir)$(CONFIGURE_STATUS)),) -include $(builddir)$(CONFIGURE_STATUS) -CONFIGFILE=$(buidldir)$(CONFIGURE_STATUS) -endif - -ifneq ($(file),) - include $(file) -endif - -ifneq ($(buildpath),) - obj=$(addprefix $(buildpath),$(cwdir)) -else - ifneq ($(CROSS_COMPILE),) - buildpath:=$(builddir)$(CROSS_COMPILE:%-=%)/ - obj:=$(addprefix $(buildpath),$(cwdir)) - else - obj= - endif -endif -hostobj:=$(builddir)host/$(cwdir) - -PATH:=$(value PATH):$(hostobj) -TMPDIR:=/tmp -TESTFILE:=makemore_test -## -# default Macros for installation -## -# not set variable if not into the build step -AWK?=awk -GREP?=grep -RM?=rm -f -INSTALL?=install -INSTALL_PROGRAM?=$(INSTALL) -D -INSTALL_DATA?=$(INSTALL) -m 644 -D -PKGCONFIG?=pkg-config -YACC?=bison -MOC?=moc$(QT:%=-%) -UIC?=uic$(QT:%=-%) - -TOOLCHAIN?= -CROSS_COMPILE?= -CC?=gcc -CFLAGS?= -CXX?=g++ -CXXFLAGS?= -LD?=gcc -LDFLAGS?= -AR?=ar -RANLIB?=ranlib -HOSTCC?=$(CC) -HOSTCXX?=$(CXX) -HOSTLD?=$(LD) -HOSTAR?=$(AR) -HOSTRANLIB?=$(RANLIB) -HOSTCFLAGS?=$(CFLAGS) -HOSTLDFLAGS?=$(LDFLAGS) - -export PATH:=$(PATH):$(TOOLCHAIN):$(TOOLCHAIN)/bin -# if cc is a link on gcc, prefer to use directly gcc for ld -ifeq ($(CC),cc) - TARGETCC:=gcc -else - TARGETCC:=$(CC) -endif -TARGETLD:=$(LD) -TARGETAS:=$(AS) -TARGETCXX:=$(CXX) -TARGETAR:=$(AR) -TARGETRANLIB:=$(RANLIB) - -CCVERSION:=$(shell $(TARGETCC) -v 2>&1) -ifneq ($(dir $(TARGETCC)),./) - TARGETPREFIX= -else - ifneq ($(CROSS_COMPILE),) - ifeq ($(findstring $(CROSS_COMPILE),$(TARGETCC)),) - TARGETPREFIX=$(CROSS_COMPILE:%-=%)- - endif - else - TARGETPREFIX= - endif -endif -TARGETCC:=$(TARGETPREFIX)$(TARGETCC) -TARGETLD:=$(TARGETPREFIX)$(LD) -TARGETAS:=$(TARGETPREFIX)$(AS) -TARGETCXX:=$(TARGETPREFIX)$(CXX) -TARGETAR:=$(TARGETPREFIX)$(AR) -TARGETRANLIB:=$(TARGETPREFIX)$(RANLIB) - -ARCH?=$(shell LANG=C $(TARGETCC) -v 2>&1 | $(GREP) Target | $(AWK) 'BEGIN {FS="[- ]"} {print $$2}') -libsuffix=$(findstring 64,$(ARCH)) - -ifneq ($(PREFIX),) -prefix:=$(PREFIX) -endif -prefix?=/usr/local -prefix:=$(prefix:"%"=%) -exec_prefix?=$(prefix) -program_prefix?= -library_prefix?=lib -bindir?=$(exec_prefix)/bin -bindir:=$(bindir:"%"=%) -sbindir?=$(exec_prefix)/sbin -sbindir:=$(sbindir:"%"=%) -libdir?=$(word 1,$(wildcard $(exec_prefix)/lib$(libsuffix) $(exec_prefix)/lib)) -libdir:=$(if $(libdir), $(libdir),$(exec_prefix)/lib) -libdir:=$(libdir:"%"=%) -sysconfdir?=$(prefix)/etc -sysconfdir:=$(sysconfdir:"%"=%) -includedir?=$(prefix)/include -includedir:=$(includedir:"%"=%) -datadir?=$(prefix)/share/$(package:"%"=%) -datadir:=$(datadir:"%"=%) -pkgdatadir?=$(datadir:"%"=%) -pkglibdir?=$(libdir)/$(package:"%"=%) -pkglibdir:=$(pkglibdir:"%"=%) - -ifneq ($(SYSROOT),) -sysroot:=$(patsubst "%",%,$(SYSROOT:%/=%)/) -TARGETPATHPREFIX=$(sysroot) -SYSROOT_CFLAGS+=--sysroot=$(sysroot) -SYSROOT_CFLAGS+=-isysroot $(sysroot) -SYSROOT_LDFLAGS+=--sysroot=$(sysroot) -else -sysroot:= -TARGETPATHPREFIX= = -endif - -#CFLAGS+=$(foreach macro,$(DIRECTORIES_LIST),-D$(macro)=\"$($(macro))\") -LIBRARY+= -LDFLAGS+= - -ifneq ($(strip $(includedir)),) -SYSROOT_CFLAGS+=-I$(TARGETPATHPREFIX)$(strip $(includedir)) -ifneq ($(DESTDIR),) -SYSROOT_CFLAGS+=-I$(DESTDIR)$(strip $(includedir)) -endif -endif -ifneq ($(strip $(libdir)),) -RPATHFLAGS+=-Wl,-rpath,$(strip $(libdir)) -SYSROOT_LDFLAGS+=-L$(TARGETPATHPREFIX)$(strip $(libdir)) -ifneq ($(DESTDIR),) -SYSROOT_LDFLAGS+=-L$(DESTDIR)$(strip $(libdir)) -endif -endif -ifneq ($(strip $(pkglibdir)),) -RPATHFLAGS+=-Wl,-rpath,$(strip $(pkglibdir)) -SYSROOT_LDFLAGS+=-L$(TARGETPATHPREFIX)$(strip $(pkglibdir)) -ifneq ($(DESTDIR),) -SYSROOT_LDFLAGS+=-L$(DESTDIR)$(strip $(pkglibdir)) -endif -endif - -INTERN_CFLAGS+=-I. -INTERN_CXXFLAGS+=-I. -INTERN_LDFLAGS+=-L. -ifneq ($(obj),) -INTERN_LDFLAGS+=-L$(obj) -endif -ifneq ($(hostobj),) -INTERN_LDFLAGS+=-L$(hostobj) -endif -ifneq ($(src),) -INTERN_CFLAGS+=-I$(src) -INTERN_CXXFLAGS+=-I$(src) -endif -INTERN_CFLAGS+=-include $(builddir)$(VERSIONFILE:%=%.h) -ifneq ($(wildcard $(builddir)config.h),) -INTERN_CFLAGS+=-include $(builddir)config.h -endif - -export package version prefix bindir sbindir libdir includedir datadir pkglibdir srcdir builddir sysconfdir - -## -# objects recipes generation -## -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)_SOURCES+=$(patsubst %.hpp,%.moc.cpp,$($(t)_QTHEADERS) $($(t)_QTHEADERS-y)))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $(findstring .cpp, $(notdir $($(t)_SOURCES))), $(eval $(t)_LIBRARY+=stdc++))) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(eval $(t)-objs+=$(patsubst %.s,%.o,$(patsubst %.S,%.o,$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))))) -target-objs:=$(foreach t, $(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y), $(if $($(t)-objs), $(addprefix $(obj),$($(t)-objs)), $(obj)$(t).o)) - -$(foreach t,$(hostbin-y), $(eval $(t)-objs:=$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))) -$(foreach t,$(hostslib-y), $(eval $(t)-objs:=$(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$($(t)_SOURCES) $($(t)_SOURCES-y))))) -target-hostobjs:=$(foreach t, $(hostbin-y) $(hostslib-y), $(if $($(t)-objs), $(addprefix $(hostobj)/,$($(t)-objs)), $(hostobj)/$(t).o)) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBS+=$($(s:%.c=%)_LIBS)) )) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBS+=$($(s:%.cpp=%)_LIBS)) )) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBRARY+=$($(s:%.c=%)_LIBRARY)) )) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LIBRARY+=$($(s:%.cpp=%)_LIBRARY)) )) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CFLAGS+=$($(t)_CFLAGS-y))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CXXFLAGS+=$($(t)_CXXFLAGS-y))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LDFLAGS+=$($(t)_LDFLAGS-y))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LIBS+=$($(t)_LIBS-y))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LIBRARY+=$($(t)_LIBRARY-y))) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_CFLAGS+=$(INTERN_CFLAGS))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y) $(hostbin-y),$(eval $(t)_LDFLAGS+=$(INTERN_LDFLAGS))) - -$(foreach t,$(slib-y) $(lib-y),$(eval include-y+=$($(t)_HEADERS))) - -# LIBRARY contains libraries name to check -# The name may terminate with {} informations like LIBRARY+=usb{1.0} -# Here the commands remove the informations and store the name into LIBS -# After LIBS contains all libraries name to link -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBRARY),$(eval $(t)_LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) )) -$(foreach l, $(LIBRARY),$(eval LIBS+=$(firstword $(subst {, ,$(subst },,$(l)))) ) ) - -$(foreach l, $(LIBS),$(eval CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null) ) ) -$(foreach l, $(LIBS),$(eval LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) ) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_CFLAGS+=$(shell $(PKGCONFIG) --cflags lib$(l) 2> /dev/null)))) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach l, $($(t)_LIBS),$(eval $(t)_LDFLAGS+=$(shell $(PKGCONFIG) --libs-only-L lib$(l) 2> /dev/null) ) )) - -# set the CFLAGS of each source file -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(s:%.c=%)_CFLAGS+=$($(t)_CFLAGS)) )) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(s:%.cpp=%)_CFLAGS+=$($(t)_CFLAGS)) )) - -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LDFLAGS+=$($(s:%.c=%)_LDFLAGS)) )) -$(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$(foreach s, $($(t)_SOURCES) $($(t)_SOURCES-y),$(eval $(t)_LDFLAGS+=$($(s:%.cpp=%)_LDFLAGS)) )) - -# The Dynamic_Loader library (libdl) allows to load external libraries. -# If this libraries has to link to the binary functions, -# this binary has to export the symbol with -rdynamic flag -$(foreach t,$(bin-y) $(sbin-y),$(if $(findstring dl, $($(t)_LIBS) $(LIBS)),$(eval $(t)_LDFLAGS+=-rdynamic))) - -## -# targets recipes generation -## -ifeq (STATIC,y) -lib-static-target:=$(addprefix $(obj),$(addsuffix $(slib-ext:%=.%),$(addprefix $(library_prefix),$(slib-y) $(lib-y)))) -else -lib-static-target:=$(addprefix $(obj),$(addsuffix $(slib-ext:%=.%),$(addprefix $(library_prefix),$(slib-y)))) -lib-dynamic-target:=$(addprefix $(obj),$(addsuffix $(dlib-ext:%=.%),$(addprefix $(library_prefix),$(lib-y)))) -endif -modules-target:=$(addprefix $(obj),$(addsuffix $(dlib-ext:%=.%),$(modules-y))) -bin-target:=$(addprefix $(obj),$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(bin-y) $(sbin-y)))) -hostslib-target:=$(addprefix $(hostobj),$(addsuffix $(slib-ext:%=.%),$(addprefix lib,$(hostslib-y)))) -hostbin-target:=$(addprefix $(hostobj),$(addsuffix $(bin-ext:%=.%),$(hostbin-y))) - -#create subproject -$(foreach t,$(subdir-y),$(eval $(t)_CONFIGURE+=$($(t)_CONFIGURE-y))) -$(foreach t,$(subdir-y),$(if $($(t)_CONFIGURE), $(eval subdir-project+=$(t)))) -subdir-y:=$(filter-out $(subdir-project),$(subdir-y)) - -#dispatch from subdir-y to directory paths and makefile paths -subdir-dir:=$(foreach dir,$(subdir-y),$(filter-out %$(makefile-ext:%=.%), $(filter-out %Makefile, $(dir)))) -subdir-files:=$(foreach dir,$(subdir-y),$(filter %$(makefile-ext:%=.%),$(dir)) $(filter %Makefile, $(dir))) - -#target each Makefile in directories -subdir-target:=$(wildcard $(addsuffix /Makefile,$(subdir-dir:%/.=%))) -subdir-target+=$(wildcard $(subdir-files)) - -#download-target+=$(foreach dl,$(download-y),$(DL)/$(dl)/$($(dl)_SOURCE)) -$(foreach dl,$(download-y),$(if $(findstring git,$($(dl)_SITE_METHOD)),$(eval gitclone-target+=$(dl)),$(eval download-target+=$(dl)))) - -objdir:=$(sort $(dir $(target-objs))) - -hostobjdir:=$(sort $(dir $(target-hostobjs))) - -targets:= -targets+=$(lib-dynamic-target) -targets+=$(modules-target) -targets+=$(lib-static-target) -targets+=$(bin-target) - -ifneq ($(CROSS_COMPILE),) -DESTDIR?=$(sysroot:"%"=%) -endif -## -# install recipes generation -## -sysconf-install:=$(addprefix $(DESTDIR)$(sysconfdir:%/=%)/,$(sysconf-y)) -data-install:=$(addprefix $(DESTDIR)$(datadir:%/=%)/,$(data-y)) -include-install:=$(addprefix $(DESTDIR)$(includedir:%/=%)/,$(include-y)) -lib-static-install:=$(addprefix $(DESTDIR)$(libdir:%/=%)/,$(addsuffix $(slib-ext:%=.%),$(addprefix lib,$(slib-y)))) -lib-dynamic-install:=$(addprefix $(DESTDIR)$(libdir:%/=%)/,$(addsuffix $(version:%=.%),$(addsuffix $(dlib-ext:%=.%),$(addprefix lib,$(lib-y))))) -modules-install:=$(addprefix $(DESTDIR)$(pkglibdir:%/=%)/,$(addsuffix $(dlib-ext:%=.%),$(modules-y))) -bin-install:=$(addprefix $(DESTDIR)$(bindir:%/=%)/,$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(bin-y)))) -sbin-install:=$(addprefix $(DESTDIR)$(sbindir:%/=%)/,$(addprefix $(program_prefix),$(addsuffix $(bin-ext:%=.%),$(sbin-y)))) - -DEVINSTALL?=y -install:= -dev-install-y:= -dev-install-$(DEVINSTALL)+=$(lib-static-install) -install+=$(lib-dynamic-install) -install+=$(modules-install) -install+=$(data-install) -install+=$(sysconf-install) -dev-install-$(DEVINSTALL)+=$(include-install) -install+=$(bin-install) -install+=$(sbin-install) - -## -# main entries -## -action:=_build -build:=$(action) -f $(srcdir)$(makemore) file -.DEFAULT_GOAL:=_entry -.PHONY:_entry _build _install _clean _distclean _check _hostbuild -_entry: _configbuild _versionbuild default_action - -_info: - @: - -_hostbuild: action:=_hostbuild -_hostbuild: build:=$(action) -f $(srcdir)$(makemore) file -_hostbuild: _info $(subdir-target) $(hostobjdir) $(hostslib-target) $(hostbin-target) - @: - -_configbuild: $(obj) $(if $(wildcard $(CONFIGFILE)),$(join $(builddir),config.h)) -_versionbuild: $(if $(package) $(version), $(join $(builddir),$(VERSIONFILE:%=%.h))) - -_build: _info $(download-target) $(gitclone-target) $(objdir) $(subdir-project) $(subdir-target) $(data-y) $(targets) - @: - -_install: action:=_install -_install: build:=$(action) -f $(srcdir)$(makemore) file -_install: _info $(install) $(dev-install-y) $(subdir-target) - @: - -_clean: action:=_clean -_clean: build:=$(action) -f $(srcdir)$(makemore) file -_clean: $(subdir-target) _clean_objs - $(Q)$(call cmd,clean,$(wildcard $(targets))) - $(Q)$(call cmd,clean,$(wildcard $(hostslib-target) $(hostbin-target))) - -_clean_objs: - $(Q)$(call cmd,clean,$(wildcard $(target-objs)) $(wildcard $(target-hostobjs))) - -_distclean: action:=_distclean -_distclean: build:=$(action) -f $(srcdir)$(makemore) file -_distclean: $(subdir-target) _clean - $(Q)$(call cmd,clean_dir,$(filter-out $(src),$(obj))) - -_check: action:=_check -_check: build:=$(action) -s -f $(srcdir)$(makemore) file -_check: $(subdir-target) $(LIBRARY) $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY)) - -PHONY:clean distclean install check default_action pc all -clean: action:=_clean -clean: build:=$(action) -f $(srcdir)$(makemore) file -clean: default_action - -distclean: action:=_distclean -distclean: build:=$(action) -f $(srcdir)$(makemore) file -distclean: default_action -distclean: - $(Q)$(call cmd,clean_dir,$(wildcard $(buildpath:%=%/)host)) - $(Q)$(call cmd,clean_dir,$(wildcard $(gitclone-target))) - $(Q)$(call cmd,clean,$(wildcard $(download-target))) - $(Q)$(call cmd,clean,$(wildcard $(builddir)$(CONFIG))) - $(Q)$(call cmd,clean,$(wildcard $(join $(builddir),$(CONFIG:.%=%.h)))) - $(Q)$(call cmd,clean,$(wildcard $(join $(builddir),$(VERSIONFILE:%=%.h)))) - -install: action:=_install -install: build:=$(action) -f $(srcdir)$(makemore) file -install: _configbuild _versionbuild default_action - -check: action:=_check -check: build:=$(action) -s -f $(srcdir)$(makemore) file -check: $(.DEFAULT_GOAL) - -hosttools: action:=_hostbuild -hosttools: build:=$(action) -f $(srcdir)$(makemore) file -hosttools: default_action - -default_action: _info - $(Q)$(MAKE) $(build)=$(file) - @: - -pc: $(builddir)$(package:%=%.pc) - -all: _configbuild _versionbuild default_action - -PHONY: menuconfig gconfig xconfig config oldconfig -menuconfig gconfig xconfig config: - $(EDITOR) $(builddir)$(CONFIG) - - -defconfig: $(builddir)$(CONFIG).old cleanconfig FORCE - @echo " "DEFCONFIG $* - @$(if $(DEFCONFIG),$(GREP) -v "^#" $(DEFCONFIG) > $(builddir)$(CONFIG)) - -%_defconfig: $(builddir)$(CONFIG).old cleanconfig FORCE - @echo " "DEFCONFIG $* - $(if $(firstword $(wildcard $@ $(srcdir)/configs/$@ $(srcdir)/$@)),,$(error $*_defconfig not found)) - $(eval DEFCONFIG:=$(firstword $(wildcard $@ $(srcdir)/configs/$@ $(srcdir)/$@))) - @$(if $(DEFCONFIG),$(GREP) -v "^#" $(DEFCONFIG) > $(builddir)$(CONFIG)) - -CONFIGS:=$(shell cat $(DEFCONFIG) | sed 's/\"/\\\"/g' | grep -v '^\#' | awk -F= 't$$1 != t {print $$1}' ) -oldconfig: $(DEFCONFIG) FORCE - @$(eval CONFIGS=$(foreach config,$(CONFIGS),$(if $($(config)),,$(config)))) - @$(if $(CONFIGS),cat $(DEFCONFIG) | grep $(addprefix -e ,$(CONFIGS)), echo "") >> $(builddir)$(CONFIG) - -cleanconfig: $(if $(wildcard $(builddir)$(CONFIG)),distclean) - -$(builddir)$(CONFIG).old: $(wildcard $(builddir)$(CONFIG)) - @$(if $<,mv $< $@) - -$(builddir)$(CONFIG): - $(warning "Configure the project first") - $(warning " make <...>_defconfig") - $(warning " make defconfig") - $(warning " make config") - $(error ) - -$(builddir)config.h: $(CONFIGFILE) $(builddir)$(CONFIG) - @echo " "CONFIG $* - @echo '#ifndef __CONFIG_H__' > $@ - @echo '#define __CONFIG_H__' >> $@ - @echo '' >> $@ - @$(GREP) -v "^#" $< | $(AWK) -F= 't$$1 != t {if ($$2 != "n") print "#define "toupper($$1)" "$$2}' >> $@ - @echo '' >> $@ - @$(if $(pkglibdir), sed -i -e "/\\/d" $@; echo '#define PKGLIBDIR "'$(pkglibdir)'"' >> $@) - @$(if $(datadir), sed -i -e "/\\/d" $@; echo '#define DATADIR "'$(datadir)'"' >> $@) - @$(if $(pkgdatadir), sed -i -e "/\\/d" $@; echo '#define PKG_DATADIR "'$(pkgdatadir)'"' >> $@) - @$(if $(sysconfdir), sed -i -e "/\\/d" $@; echo '#define SYSCONFDIR "'$(sysconfdir)'"' >> $@) - @echo '#endif' >> $@ - -$(builddir)$(VERSIONFILE:%=%.h): $(builddir)$(CONFIG) - @echo " "VERSION $* - @echo '#ifndef __VERSION_H__' > $@ - @echo '#define __VERSION_H__' >> $@ - @echo '' >> $@ - @$(if $(version), echo '#define VERSION "'$(version)'"' >> $@) - @$(if $(package), echo '#define PACKAGE "'$(package)'"' >> $@) - @$(if $(version), echo '#define PACKAGE_VERSION "'$(version)'"' >> $@) - @$(if $(package), echo '#define PACKAGE_NAME "'$(package)'"' >> $@) - @$(if $(package), echo '#define PACKAGE_TARNAME "'$(subst " ","_",$(package))'"' >> $@) - @$(if $(package), echo '#define PACKAGE_STRING "'$(package) $(version)'"' >> $@) - @echo '#endif' >> $@ - -## -# Commands for clean -## -quiet_cmd_clean=$(if $(2),CLEAN $(notdir $(2))) - cmd_clean=$(if $(2),$(RM) $(2)) -quiet_cmd_clean_dir=$(if $(2),CLEAN $(notdir $(2))) - cmd_clean_dir=$(if $(2),$(RM) -r $(2)) -## -# Commands for build and link -## -RPATH=$(wildcard $(addsuffix /.,$(wildcard $(CURDIR:%/=%)/* $(obj)*))) -quiet_cmd_yacc_y=YACC $* - cmd_yacc_y=$(YACC) -o $@ $< -quiet_cmd_as_o_s=AS $* - cmd_as_o_s=$(TARGETAS) $(ASFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< -quiet_cmd_cc_o_c=CC $* - cmd_cc_o_c=$(TARGETCC) $(CFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< -quiet_cmd_cc_o_cpp=CXX $* - cmd_cc_o_cpp=$(TARGETCXX) $(CXXFLAGS) $(CFLAGS) $($*_CXXFLAGS) $($*_CFLAGS) $(SYSROOT_CFLAGS) -c -o $@ $< -quiet_cmd_moc_hpp=QTMOC $* - cmd_moc_hpp=$(MOC) $(INCLUDES) $($*_MOCFLAGS) $($*_MOCFLAGS-y) -o $@ $< -quiet_cmd_uic_hpp=QTUIC $* - cmd_uic_hpp=$(UIC) $< > $@ -quiet_cmd_ld_bin=LD $* - cmd_ld_bin=$(TARGETCC) -L. $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -o $@ $^ -Wl,--start-group $(LIBS:%=-l%) $($*_LIBS:%=-l%) -Wl,--end-group -lc -quiet_cmd_ld_slib=LD $* - cmd_ld_slib=$(RM) $@ && \ - $(TARGETAR) -cvq $@ $^ > /dev/null && \ - $(TARGETRANLIB) $@ -quiet_cmd_ld_dlib=LD $* - cmd_ld_dlib=$(TARGETCC) $($*_LDFLAGS) $(LDFLAGS) $(SYSROOT_LDFLAGS) $(RPATHFLAGS) -Bdynamic -shared -Wl,-soname,$(strip $(notdir $@)) -o $@ $^ $(addprefix -L,$(RPATH)) $(LIBS:%=-l%) $($*_LIBS:%=-l%) -lc - -quiet_cmd_hostcc_o_c=HOSTCC $* - cmd_hostcc_o_c=$(HOSTCC) $(HOSTCFLAGS) $($*_CFLAGS) -c -o $@ $< -quiet_hostcmd_cc_o_cpp=HOSTCXX $* - cmd_hostcc_o_cpp=$(HOSTCXX) $(HOSTCXXFLAGS) $($*_CFLAGS) -c -o $@ $< -quiet_cmd_hostld_bin=HOSTLD $* - cmd_hostld_bin=$(HOSTCC) -o $@ $^ $($*_LDFLAGS) $(HOSTLDFLAGS) -L. $(LIBS:%=-l%) $($*_LIBS:%=-l%) -quiet_cmd_hostld_slib=HOSTLD $* - cmd_hostld_slib=$(RM) $@ && \ - $(HOSTAR) -cvq $@ $^ > /dev/null && \ - $(HOSTRANLIB) $@ - -quiet_cmd_check_lib=CHECK $* -define cmd_check_lib - $(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE) - echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c) - $(TARGETCC) -c -o $(TMPDIR)/$(TESTFILE:%=%.o) $(TMPDIR)/$(TESTFILE:%=%.c) $(INTERN_CFLAGS) $(CFLAGS) > /dev/null 2>&1 - $(TARGETLD) -o $(TMPDIR)/$(TESTFILE) $(TMPDIR)/$(TESTFILE:%=%.o) $(INTERN_LDFLAGS) $(LDFLAGS) $(addprefix -l, $2) > /dev/null 2>&1 -endef - -checkoption:=--exact-version -prepare_check=$(if $(filter %-, $2),$(eval checkoption:=--atleast-version),$(if $(filter -%, $2),$(eval checkoption:=--max-version))) -cmd_check2_lib=$(if $(findstring $(3:%-=%), $3),$(if $(findstring $(3:-%=%), $3),,$(eval checkoption:=--atleast-version),$(eval checkoption:=--max-version))) \ - $(PKGCONFIG) --print-errors $(checkoption) $(subst -,,$3) lib$2 - -## -# build rules -## -.SECONDEXPANSION: -$(hostobjdir) $(objdir) $(buildpath): - $(Q)mkdir -p $@ - -$(obj)%.tab.c:%.y - @$(call cmd,yacc_y) - -$(obj)%.o:%.s - @$(call cmd,as_o_s) - -$(obj)%.o:%.c - @$(call cmd,cc_o_c) - -$(obj)%.o:%.cpp - @$(call cmd,cc_o_cpp) - -$(obj)%.moc.cpp:$(obj)%.ui.hpp -$(obj)%.moc.cpp:%.hpp - @$(call cmd,moc_hpp) - -$(obj)%.ui.hpp:%.ui - @$(call cmd,uic_hpp) - -$(hostobj)%.o:%.c - @$(call cmd,hostcc_o_c) - -$(hostobj)%.o:%.cpp - @$(call cmd,hostcc_o_cpp) - -$(lib-static-target): $(obj)lib%$(slib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) - @$(call cmd,ld_slib) - -$(lib-dynamic-target): CFLAGS+=-fPIC -$(lib-dynamic-target): $(obj)lib%$(dlib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) - @$(call cmd,ld_dlib) - -$(modules-target): CFLAGS+=-fPIC -$(modules-target): $(obj)%$(dlib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) - @$(call cmd,ld_dlib) - -#$(bin-target): $(obj)/%$(bin-ext:%=.%): $$(if $$(%_SOURCES), $$(addprefix $(src)/,$$(%_SOURCES)), $(src)/%.c) -$(bin-target): $(obj)%$(bin-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(obj),$$(%-objs)), $(obj)%.o) - @$(call cmd,ld_bin) - -$(hostbin-target): $(hostobj)%$(bin-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(hostobj),$$(%-objs)), $(hostobj)%.o) - @$(call cmd,hostld_bin) - -$(hostslib-target): $(hostobj)lib%$(slib-ext:%=.%): $$(if $$(%-objs), $$(addprefix $(hostobj),$$(%-objs)), $(hostobj)%.o) - @$(call cmd,hostld_slib) - -.PHONY: $(subdir-project) $(subdir-target) FORCE -$(subdir-project): %: FORCE - $(Q)echo " "PROJECT $* - $(Q)cd $* && $($*_CONFIGURE) - $(Q)$(MAKE) -C $* - $(Q)$(MAKE) -C $* install - -$(subdir-target): %: FORCE - $(Q)echo " "SUBDIR $* - $(Q)$(MAKE) -C $(dir $*) cwdir=$(cwdir)$(dir $*) builddir=$(builddir) $(build)=$(notdir $*) - -$(LIBRARY) $(sort $(foreach t,$(slib-y) $(lib-y) $(bin-y) $(sbin-y) $(modules-y),$($(t)_LIBRARY))): %: - @$(RM) $(TMPDIR)/$(TESTFILE:%=%.c) $(TMPDIR)/$(TESTFILE) - @echo "int main(){}" > $(TMPDIR)/$(TESTFILE:%=%.c) - @$(call cmd,check_lib,$(firstword $(subst {, ,$(subst },,$@)))) - @$(call prepare_check,$(lastword $(subst {, ,$(subst },,$@)))) - @$(if $(findstring $(words $(subst {, ,$(subst },,$@))),2),$(call cmd,check2_lib,$(firstword $(subst {, ,$(subst },,$@))),$(lastword $(subst {, ,$(subst },,$@))))) - -## -# Commands for install -## -quiet_cmd_install_data=INSTALL $* -define cmd_install_data - $(INSTALL_DATA) $< $@ -endef -quiet_cmd_install_bin=INSTALL $* -define cmd_install_bin - $(INSTALL_PROGRAM) $< $@ -endef -quiet_cmd_install_link=INSTALL $* -define cmd_install_link - $(LN) -t $(dirname $@) $(basename $<) $(basename $@) -endef - -## -# install rules -## -$(foreach dir, includedir datadir sysconfdir libdir bindir sbindir ,$(DESTDIR)$($(dir))/): - $(Q)mkdir -p $@ - -$(include-install): $(DESTDIR)$(includedir:%/=%)/%: % - @$(call cmd,install_data) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(includedir) && rm -f $(a) && ln -s $(includedir:%/=%)/$* $(a))) - -$(sysconf-install): $(DESTDIR)$(sysconfdir:%/=%)/%: % - @$(call cmd,install_data) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(sysconfdir) && rm -f $(a) && ln -s $(sysconfdir:%/=%)/$* $(a))) - -$(data-install): $(DESTDIR)$(datadir:%/=%)/%: % - @$(call cmd,install_data) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(datadir) && rm -f $(a) && ln -s $(datadir:%/=%)/$* $(a))) - -$(lib-static-install): $(DESTDIR)$(libdir:%/=%)/lib%$(slib-ext:%=.%): $(obj)lib%$(slib-ext:%=.%) - @$(call cmd,install_bin) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(libdir) && rm -f $(a) && ln -s (libdir:%/=%)/lib$*$(slib-ext:%=.%) $(a))) - -$(lib-dynamic-install): $(DESTDIR)$(libdir:%/=%)/lib%$(dlib-ext:%=.%)$(version:%=.%): $(DESTDIR)$(libdir)/ -$(lib-dynamic-install): $(DESTDIR)$(libdir:%/=%)/lib%$(dlib-ext:%=.%)$(version:%=.%): $(obj)lib%$(dlib-ext:%=.%) - @$(call cmd,install_bin) - @$(if $(version),$(shell cd $(DESTDIR)$(libdir) && rm -f lib$*$(dlib-ext:%=.%) && ln -s lib$*$(dlib-ext:%=.%)$(version:%=.%) lib$*$(dlib-ext:%=.%))) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(libdir) && rm -f $(a) && ln -s $(libdir:%/=%)/lib$*$(dlib-ext:%=.%) $(a))) - -$(modules-install): $(DESTDIR)$(pkglibdir:%/=%)/%$(dlib-ext:%=.%): $(obj)%$(dlib-ext:%=.%) - @$(call cmd,install_bin) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(pkglibdir) && rm -f $(a) && ln -s $(pkglibdir:%/=%)/$*$(dlib-ext:%=.%) $(a))) - -$(bin-install): $(DESTDIR)$(bindir:%/=%)/%$(bin-ext:%=.%): $(obj)%$(bin-ext:%=.%) - @$(call cmd,install_bin) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(bindir) && rm -f $(a) && ln -s $(bindir:%/=%)/$*$(bin-ext:%=.%) $(a))) - -$(sbin-install): $(DESTDIR)$(sbindir:%/=%)/%$(bin-ext:%=.%): $(obj)%$(bin-ext:%=.%) - @$(call cmd,install_bin) - @$(foreach a,$($*_ALIAS) $($*_ALIAS-y), $(shell cd $(DESTDIR)$(sbindir) && rm -f $(a) && ln -s $(sbindir:%/=%)/$*$(bin-ext:%=.%) $(a))) - -## -# Commands for download -## -DL?=$(srcdir)/.dl - -quiet_cmd_download=DOWNLOAD $* -define cmd_download - wget -q -O $(OUTPUT) $(URL) -endef - -quiet_cmd_gitclone=CLONE $* -define cmd_gitclone - $(if $(wildcard $(OUTPUT)),,git clone --depth 1 $(URL) $(VERSION) $(OUTPUT)) -endef - -$(DL)/: - mkdir -p $@ - -$(download-target): %: $(DL)/ - $(eval URL=$($*_SITE)/$($*_SOURCE)) - $(eval DL=$(realpath $(DL))) - $(eval OUTPUT=$(DL)/$($*_SOURCE)) - @$(call cmd,download) - @$(if $(findstring .zip, $($*_SOURCE)),unzip -o -d $(cwdir)/$* $(OUTPUT)) - @$(if $(findstring .tar.gz, $($*_SOURCE)),tar -xzf $(OUTPUT) -C $(cwdir)/$*) - -$(gitclone-target): %: - $(eval URL=$($*_SITE)) - $(eval OUTPUT=$(cwdir)/$*) - $(eval VERSION=$(if $($*_VERSION),-b $($*_VERSION))) - @$(call cmd,gitclone) - -#if inside makemore -endif diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt new file mode 100644 index 00000000..be47e85d --- /dev/null +++ b/example/CMakeLists.txt @@ -0,0 +1,15 @@ +option(USE_RARITAN "Use RARITAN environment" ON) +option(USE_CPPTHREADS "Use CPPTHREAD" OFF) + +if(USE_CPPTHREADS) +set(USE_RARITAN OFF) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CPPTHREADS") +endif() +if(USE_RARITAN) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_RARITAN") +endif() + +add_executable(mainEzspTest CAppDemo.cpp mainEzspTest.cpp dummy_db.cpp) + +target_include_directories(mainEzspTest PRIVATE ${PROJECT_SOURCE_DIR}/src) +target_link_libraries(mainEzspTest PUBLIC ezspfull) diff --git a/example/Makefile b/example/Makefile deleted file mode 100644 index e1e641d9..00000000 --- a/example/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -LOCAL_LDFLAGS ?= -L/home/seb/_DEV/serial/compiled/li -LOCAL_INC ?= -I/home/seb/_DEV/serial/compiled/include - -CXXFLAGS = -DUSE_SERIALCPP -W -Wall -pedantic -std=c++11 -Wno-unused-parameter -g -Weffc++ -LDFLAGS = $(LOCAL_LDFLAGS) -lserialcpp -lpthread - -# SRC_PATH should point to the src/ folder containing source code for this library (can be overridden from environment) -SRC_PATH ?= ../ -SRC_DOMAIN_PATH ?= $(SRC_PATH)src/ezsp -SRC_SPI_PATH ?= $(SRC_PATH)/spi - -include ../libezsp.mk.inc - -SRCS = $(SRC_PATH)/example/mainEzspTest.cpp \ - $(SRC_PATH)/example/CAppDemo.cpp \ - $(SRC_PATH)/example/dummy_db.cpp \ - $(LIBEZSP_LINUX_SERIALCPP_SRC) \ - -OBJECTFILES = $(patsubst %.cpp, %.o, $(SRCS)) - -EXEC = mainEzspTest - -#Set this to @ to keep the makefile quiet -ifndef SILENCE - SILENCE = @ -endif - -CLEANFILES = $(OBJECTFILES) $(EXEC) -INC = $(LOCAL_INC) $(LIBEZSP_COMMON_INC) - -all: $(EXEC) - -$(EXEC): $(OBJECTFILES) - @echo Linking $@ - $(SILENCE)$(CXX) $(OBJECTFILES) $(LDFLAGS) $(LIBCGICC_LDFLAGS) -o $(EXEC) - -%.o: %.cpp - @echo Compiling $< - $(SILENCE)$(CXX) $(CXXFLAGS) $(LIBCGICC_CXXFLAGS) $(INC) -c $< -o $@ - -rebuild: clean-all all - -clean: - rm -f $(CLEANFILES) - -clean-all: clean diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 00000000..2fd0879a --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,87 @@ +set(ezspfull_SOURCES) + +list(APPEND ezspfull_SOURCES + ezsp/ash.cpp + ezsp/custom-aes.cpp + ezsp/ezsp-dongle.cpp + ezsp/ezsp-protocol/ezsp-enum.cpp + ezsp/ezsp-protocol/get-network-parameters-response.cpp + ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp + ezsp/ezsp-protocol/struct/ember-gp-address-struct.cpp + ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp + ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp + ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp + ezsp/ezsp-protocol/struct/ember-key-struct.cpp + ezsp/ezsp-protocol/struct/ember-network-parameters.cpp + ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp + ezsp/zbmessage/aps.cpp + ezsp/zbmessage/apsoption.cpp + ezsp/zbmessage/gpd-commissioning-command-payload.cpp + ezsp/zbmessage/gp-pairing-command-option-struct.cpp + ezsp/zbmessage/green-power-device.cpp + ezsp/zbmessage/green-power-frame.cpp + ezsp/zbmessage/green-power-sink-table-entry.cpp + ezsp/zbmessage/zclframecontrol.cpp + ezsp/zbmessage/zclheader.cpp + ezsp/zbmessage/zdp-enum.cpp + ezsp/zbmessage/zigbee-message.cpp + ezsp/zigbee-tools/green-power-sink.cpp + ezsp/zigbee-tools/zigbee-messaging.cpp + ezsp/zigbee-tools/zigbee-networking.cpp +) + +list(APPEND ezspfull_SOURCES spi/GenericAsyncDataInputObservable.cpp) +list(APPEND ezspfull_SOURCES spi/TimerFactory.cpp) +list(APPEND ezspfull_SOURCES spi/UartDriverBuilder.cpp) +list(APPEND ezspfull_SOURCES spi/Logger.cpp) +set(ezspspi_LIBS ) + +option(USE_RARITAN "Use RARITAN environment" ON) +option(USE_CPPTHREADS "Use CPPTHREAD" OFF) +option(USE_SERIALCPP "Use SERIALCPP" OFF) +option(USE_MOCKSERIAL "Use MOCKSERIAL" OFF) +if(USE_CPPTHREADS) +set(USE_RARITAN OFF) +set(USE_SERIALCPP ON) +endif() +if(USE_MOCKSERIAL) +set(USE_SERIALCPP OFF) +endif() + +if(USE_CPPTHREADS) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CPPTHREADS") +list(APPEND ezspfull_SOURCES + spi/console/ConsoleLogger.cpp + spi/cppthreads/CppThreadsTimer.cpp +) +list(APPEND ezspfull_LIBS pthread) +endif() + +if(USE_SERIALCPP) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_SERIALCPP") +list(APPEND ezspfull_SOURCES spi/serial/SerialUartDriver.cpp) +list(APPEND ezspfull_LIBS serialcpp) +endif() + +if(USE_MOCKSERIAL) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MOCKSERIAL") +list(APPEND ezspfull_SOURCES spi/mock-uart/MockUartDriver.cpp) +endif() + +if(USE_RARITAN) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_RARITAN") +list(APPEND ezspfull_SOURCES + spi/raritan/RaritanUartDriver.cpp + spi/raritan/RaritanTimer.cpp + spi/raritan/RaritanEventLoop.cpp + spi/raritan/RaritanLogger.cpp +) +endif() + +add_library(ezspfull ${ezspfull_SOURCES}) + +include_directories(${PROJECT_SOURCE_DIR}/src/ezsp ${PROJECT_SOURCE_DIR}/src/spi) +target_include_directories(ezspfull PRIVATE ${PROJECT_SOURCE_DIR}/src) +target_link_libraries(ezspfull PUBLIC ${ezspfull_LIBS}) + +install(TARGETS ezspfull DESTINATION lib) diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index ece269d9..00000000 --- a/src/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -lib-y=ezsp - -ezsp_CFLAGS+=-I. - -ezsp_SOURCES+=ezsp/ash.cpp -ezsp_SOURCES+=ezsp/custom-aes.cpp -ezsp_SOURCES+=ezsp/ezsp-dongle.cpp - -ezsp_HEADERS+=ezsp/ezsp-dongle-observer.h - -ezsp_SOURCES+=ezsp/ezsp-protocol/ezsp-enum.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/get-network-parameters-response.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-child-data-struct.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-address-struct.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-key-struct.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-network-parameters.cpp -ezsp_SOURCES+=ezsp/ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp - -ezsp_SOURCES+=ezsp/zbmessage/aps.cpp -ezsp_SOURCES+=ezsp/zbmessage/apsoption.cpp -ezsp_SOURCES+=ezsp/zbmessage/gpd-commissioning-command-payload.cpp -ezsp_SOURCES+=ezsp/zbmessage/gp-pairing-command-option-struct.cpp -ezsp_SOURCES+=ezsp/zbmessage/green-power-device.cpp -ezsp_SOURCES+=ezsp/zbmessage/green-power-frame.cpp -ezsp_SOURCES+=ezsp/zbmessage/green-power-sink-table-entry.cpp -ezsp_SOURCES+=ezsp/zbmessage/zclframecontrol.cpp -ezsp_SOURCES+=ezsp/zbmessage/zclheader.cpp -ezsp_SOURCES+=ezsp/zbmessage/zdp-enum.cpp -ezsp_SOURCES+=ezsp/zbmessage/zigbee-message.cpp - -ezsp_SOURCES+=ezsp/zigbee-tools/green-power-sink.cpp -ezsp_SOURCES+=ezsp/zigbee-tools/zigbee-messaging.cpp -ezsp_SOURCES+=ezsp/zigbee-tools/zigbee-networking.cpp - -lib-y+=ezpspi - -ezpspi_SOURCES+=spi/GenericAsyncDataInputObservable.cpp - -ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanEventLoop.cpp -ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimer.cpp -ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanTimerFactory.cpp - -ezpspi_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimer.cpp -ezpspi_SOURCES-$(USE_CPPTHREADS)+=spi/cppthreads/CppThreadsTimerFactory.cpp -ezpspi_SOURCES-$(USE_SERIALCPP)+=spi/console/ConsoleLogger.cpp -ezpspi_LIBS-$(USE_CPPTHREADS)+=pthread - -ezpspi_SOURCES-$(USE_RARITAN)+=spi/raritan/RaritanUartDriver.cpp -ezpspi_SOURCES-$(USE_SERIALCPP)+=spi/serial/SerialUartDriver.cpp -ezpspi_SOURCES-$(DUMMY)+=spi/mock-uart/MockUartDriver.cpp From aa65b36010c2414c4ca33d0b988019b466e9b385 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 16:10:30 +0100 Subject: [PATCH 023/413] [build] separate ezsp and spi betwwen 2 libraries --- CMakeLists.txt | 4 +++- example/CMakeLists.txt | 2 +- src/ezsp/CMakeLists.txt | 36 ++++++++++++++++++++++++++++ src/spi/CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 src/ezsp/CMakeLists.txt create mode 100644 src/spi/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d0c02443..db228f36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,5 +9,7 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb") -add_subdirectory(src) +#add_subdirectory(src) +add_subdirectory(src/ezsp) +add_subdirectory(src/spi) add_subdirectory(example) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index be47e85d..846f7db8 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -12,4 +12,4 @@ endif() add_executable(mainEzspTest CAppDemo.cpp mainEzspTest.cpp dummy_db.cpp) target_include_directories(mainEzspTest PRIVATE ${PROJECT_SOURCE_DIR}/src) -target_link_libraries(mainEzspTest PUBLIC ezspfull) +target_link_libraries(mainEzspTest PUBLIC ezsp ezspspi) diff --git a/src/ezsp/CMakeLists.txt b/src/ezsp/CMakeLists.txt new file mode 100644 index 00000000..79a1e0e0 --- /dev/null +++ b/src/ezsp/CMakeLists.txt @@ -0,0 +1,36 @@ +set(ezsp_SOURCES) +list(APPEND ezsp_SOURCES + ash.cpp + custom-aes.cpp + ezsp-dongle.cpp + ezsp-protocol/ezsp-enum.cpp + ezsp-protocol/get-network-parameters-response.cpp + ezsp-protocol/struct/ember-child-data-struct.cpp + ezsp-protocol/struct/ember-gp-address-struct.cpp + ezsp-protocol/struct/ember-gp-proxy-table-entry-struct.cpp + ezsp-protocol/struct/ember-gp-sink-table-entry-struct.cpp + ezsp-protocol/struct/ember-gp-sink-table-options-field.cpp + ezsp-protocol/struct/ember-key-struct.cpp + ezsp-protocol/struct/ember-network-parameters.cpp + ezsp-protocol/struct/ember-process-gp-pairing-parameter.cpp + zbmessage/aps.cpp + zbmessage/apsoption.cpp + zbmessage/gpd-commissioning-command-payload.cpp + zbmessage/gp-pairing-command-option-struct.cpp + zbmessage/green-power-device.cpp + zbmessage/green-power-frame.cpp + zbmessage/green-power-sink-table-entry.cpp + zbmessage/zclframecontrol.cpp + zbmessage/zclheader.cpp + zbmessage/zdp-enum.cpp + zbmessage/zigbee-message.cpp + zigbee-tools/green-power-sink.cpp + zigbee-tools/zigbee-messaging.cpp + zigbee-tools/zigbee-networking.cpp +) + +add_library(ezsp ${ezsp_SOURCES}) +include_directories(${PROJECT_SOURCE_DIR}/src/ezsp ${PROJECT_SOURCE_DIR}/src/spi) +target_include_directories(ezsp PRIVATE ${PROJECT_SOURCE_DIR}/src) + +install(TARGETS ezsp DESTINATION lib) diff --git a/src/spi/CMakeLists.txt b/src/spi/CMakeLists.txt new file mode 100644 index 00000000..97bc11cb --- /dev/null +++ b/src/spi/CMakeLists.txt @@ -0,0 +1,53 @@ +set(ezspspi_SOURCES ) +list(APPEND ezspspi_SOURCES GenericAsyncDataInputObservable.cpp) +list(APPEND ezspspi_SOURCES TimerFactory.cpp) +list(APPEND ezspspi_SOURCES UartDriverBuilder.cpp) +list(APPEND ezspspi_SOURCES Logger.cpp) +set(ezspspi_LIBS ) + +option(USE_RARITAN "Use RARITAN environment" ON) +option(USE_CPPTHREADS "Use CPPTHREAD" OFF) +option(USE_SERIALCPP "Use SERIALCPP" OFF) +option(USE_MOCKSERIAL "Use MOCKSERIAL" OFF) +if(USE_CPPTHREADS) +set(USE_RARITAN OFF) +set(USE_SERIALCPP ON) +endif() +if(USE_MOCKSERIAL) +set(USE_SERIALCPP OFF) +endif() + +if(USE_CPPTHREADS) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CPPTHREADS") +list(APPEND ezspspi_SOURCES + console/ConsoleLogger.cpp + cppthreads/CppThreadsTimer.cpp +) +list(APPEND ezspspi_LIBS pthread) +endif() + +if(USE_SERIALCPP) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_SERIALCPP") +list(APPEND ezspspi_SOURCES serial/SerialUartDriver.cpp) +list(APPEND ezspspi_LIBS serialcpp) +endif() + +if(USE_MOCKSERIAL) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_MOCKSERIAL") +list(APPEND ezspspi_SOURCES mock-uart/MockUartDriver.cpp) +endif() + +if(USE_RARITAN) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_RARITAN") +list(APPEND ezspspi_SOURCES + raritan/RaritanUartDriver.cpp + raritan/RaritanTimer.cpp + raritan/RaritanLogger.cpp +) +endif() + +add_library(ezspspi ${ezspspi_SOURCES}) +target_include_directories(ezspspi PRIVATE ${PROJECT_SOURCE_DIR}/src) +target_link_libraries(ezspspi PUBLIC ${ezspspi_LIBS}) + +install(TARGETS ezspspi DESTINATION lib) From 5120aa202060d3efc3e42e3afbf1e39365c8113b Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 16:15:24 +0100 Subject: [PATCH 024/413] [build] set version.h with package info --- version.h.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 version.h.in diff --git a/version.h.in b/version.h.in new file mode 100644 index 00000000..bd17f198 --- /dev/null +++ b/version.h.in @@ -0,0 +1,12 @@ +#ifndef __VERSION_H__ +#define __VERSION_H__ + +#define VERSION "@ezsp_VERSION_MAJOR@.@ezsp_VERSION_MINOR@" +#define PACKAGE "ezsp" +#define PACKAGE_VERSION "@ezsp_VERSION_MAJOR@.@ezsp_VERSION_MINOR@" +#define PACKAGE_NAME "ezsp" +#define PACKAGE_TARNAME "ezsp" +#define PACKAGE_STRING "ezsp @ezsp_VERSION_MAJOR@.@ezsp_VERSION_MINOR@" + +#endif + From 76f79dff67d863f3ceea443d224bb2fd2a4be184 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 16:17:50 +0100 Subject: [PATCH 025/413] [example] fix the header path --- example/CAppDemo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index e1011a34..784f6ad4 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -8,7 +8,7 @@ #include #include -#include "example/CAppDemo.h" +#include "CAppDemo.h" #include "ezsp/ezsp-protocol/get-network-parameters-response.h" #include "ezsp/ezsp-protocol/struct/ember-key-struct.h" #include "ezsp/ezsp-protocol/ezsp-enum.h" From 661a770b1b9d01e761a85dd50490e5aa0621f24e Mon Sep 17 00:00:00 2001 From: Lionel AINS Date: Tue, 17 Dec 2019 16:50:22 +0100 Subject: [PATCH 026/413] Adding commented-out I/O debugging with libserialcpp --- src/spi/serial/SerialUartDriver.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/spi/serial/SerialUartDriver.cpp b/src/spi/serial/SerialUartDriver.cpp index 026f3016..839463ac 100644 --- a/src/spi/serial/SerialUartDriver.cpp +++ b/src/spi/serial/SerialUartDriver.cpp @@ -8,6 +8,7 @@ #include #include "../GenericLogger.h" +// #include // For debug SerialUartDriver::SerialUartDriver() : m_serial_port(), @@ -60,6 +61,7 @@ int SerialUartDriver::open(const std::string& serialPortName, unsigned int baudR while (this->m_read_thread_alive) { try { rdcnt = this->m_serial_port.read(readData, sizeof(readData)/sizeof(unsigned char)); + // clogD << "Reading from serial port: " << std::hex << std::setw(2) << std::setfill('0') << (static_cast(*readData) & 0xff) << "\n"; if (this->m_data_input_observable) this->m_data_input_observable->notifyObservers(readData, rdcnt); } @@ -78,6 +80,13 @@ int SerialUartDriver::open(const std::string& serialPortName, unsigned int baudR int SerialUartDriver::write(size_t& writtenCnt, const void* buf, size_t cnt) { try { + // std::stringstream msg; + // msg << "Writing to serial port:"; + // for (size_t loop=0; loop(buf))[loop]); + // msg << "\n"; + // clogE << msg.str(); writtenCnt = this->m_serial_port.write(static_cast(buf), cnt); } catch (std::exception& e) { From baee5c8d00d0d8e79fe169cc0f64931175052712 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 17:26:32 +0100 Subject: [PATCH 027/413] [docs] update info about spi API --- src/README.md | 46 +++++++++++-------- src/spi/{ITimerFactory.h => ITimerBuilder.h} | 0 .../{TimerFactory.cpp => TimerBuilder.cpp} | 0 src/spi/{TimerFactory.h => TimerBuilder.h} | 0 4 files changed, 28 insertions(+), 18 deletions(-) rename src/spi/{ITimerFactory.h => ITimerBuilder.h} (100%) rename src/spi/{TimerFactory.cpp => TimerBuilder.cpp} (100%) rename src/spi/{TimerFactory.h => TimerBuilder.h} (100%) diff --git a/src/README.md b/src/README.md index e3168247..b620c3f0 100644 --- a/src/README.md +++ b/src/README.md @@ -20,27 +20,33 @@ This allows dependency inversion paradigm, where the connector depends on the li ## SPI interface definition -* spi/ITimer.h and spi/ITimerFactory.h +* spi/ITimer.h and spi/ITimerBuilder.h Abstract interface to which must conforms implementations of classes that handle timed callbacks and factory classes that generate the associated ITimer objects - Concrete implementation in the raritan framework: - * spi/raritan/RaritanTimer.{h,cpp} - * spi/raritan/RaritanTimerFactory.{h,cpp} + Concrete Builder API for each framework: + * spi/TimerBuilder.{h,cpp} + + Framework implementation: + Concrete implementation in the raritan framework: + * spi/raritan/RaritanTimer.{h,cpp} - Concrete implementation using C++ threads: - * spi/cppthreads/CppThreadsTimerFactory.{h,cpp} - * spi/cppthreads/CppThreadsTimer.{h,cpp} + Concrete implementation using C++ threads: + * spi/cppthreads/CppThreadsTimer.{h,cpp} * spi/ILogger.h Abstract interface to which must conforms implementations of classes that log debug/warning/error messages - Concrete implementation in the raritan framework: - * spi/raritan/RaritanLogger.{h,cpp} + Concrete Builder API for each framework: + * spi/Logger.{h,cpp} + + Framework implementation: + Concrete implementation in the raritan framework: + * spi/raritan/RaritanLogger.{h,cpp} - Concrete implementation that outputs messages on the system console: - * spi/console/ConsoleLogger.{h,cpp} + Concrete implementation that outputs messages on the system console: + * spi/console/ConsoleLogger.{h,cpp} * spi/IAsyncDataInputObserver.h @@ -51,14 +57,18 @@ This allows dependency inversion paradigm, where the connector depends on the li Abstract interface to which must conforms concrete implementations of classes that manipulate UARTs - Concrete implementation in the raritan framework: - * spi/raritan/RaritanUartDriver.{h,cpp} + Concrete Builder API for each framework: + * spi/UartDriver.{h,cpp} + + Framework implementation: + Concrete implementation in the raritan framework: + * spi/raritan/RaritanUartDriver.{h,cpp} - Concrete implementation using libserial: - * spi/serial/SerialUartDriver.{h,cpp} + Concrete implementation using libserial: + * spi/serial/SerialUartDriver.{h,cpp} - Concrete implementation of a robotized emulated serial port for unit testing: - * spi/mock-uart/MockUartDriver.{h,cpp} + Concrete implementation of a robotized emulated serial port for unit testing: + * spi/mock-uart/MockUartDriver.{h,cpp} ## Generating doxygen documentation @@ -83,4 +93,4 @@ cd src/tests make check ``` -If all tests pass, the above command will succeed with exit code 0. \ No newline at end of file +If all tests pass, the above command will succeed with exit code 0. diff --git a/src/spi/ITimerFactory.h b/src/spi/ITimerBuilder.h similarity index 100% rename from src/spi/ITimerFactory.h rename to src/spi/ITimerBuilder.h diff --git a/src/spi/TimerFactory.cpp b/src/spi/TimerBuilder.cpp similarity index 100% rename from src/spi/TimerFactory.cpp rename to src/spi/TimerBuilder.cpp diff --git a/src/spi/TimerFactory.h b/src/spi/TimerBuilder.h similarity index 100% rename from src/spi/TimerFactory.h rename to src/spi/TimerBuilder.h From 0749b4775be502300166850a2ac698bf6f0e766a Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 17:27:32 +0100 Subject: [PATCH 028/413] [Timer] rename TimerFactory to TimerBuilder --- example/CAppDemo.cpp | 2 +- example/CAppDemo.h | 4 ++-- example/mainEzspTest.cpp | 4 ++-- src/CMakeLists.txt | 2 +- src/ezsp/ash.cpp | 2 +- src/ezsp/ash.h | 4 ++-- src/ezsp/ezsp-dongle.cpp | 2 +- src/ezsp/ezsp-dongle.h | 6 +++--- src/ezsp/zigbee-tools/zigbee-messaging.cpp | 2 +- src/ezsp/zigbee-tools/zigbee-messaging.h | 4 ++-- src/spi/CMakeLists.txt | 2 +- src/spi/ITimerBuilder.h | 6 +++--- src/spi/TimerBuilder.cpp | 10 +++++----- src/spi/TimerBuilder.h | 10 +++++----- src/spi/raritan/test_raritan.cpp | 10 +++++----- src/spi/serial/test-serial.cpp | 4 ++-- tests/gp_tests.cpp | 4 ++-- 17 files changed, 39 insertions(+), 39 deletions(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index 784f6ad4..ffcc339e 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -18,7 +18,7 @@ CAppDemo::CAppDemo(IUartDriver *uartDriver, - ITimerFactory &i_timer_factory, + ITimerBuilder &i_timer_factory, bool reset, bool openGpCommissionning, uint8_t authorizeChannelRequestAnswerTimeout, diff --git a/example/CAppDemo.h b/example/CAppDemo.h index 7ce454a3..a0546a96 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -12,7 +12,7 @@ #include "ezsp/zigbee-tools/green-power-sink.h" #include "ezsp/zbmessage/green-power-device.h" #include "spi/IUartDriver.h" -#include "spi/ITimerFactory.h" +#include "spi/ITimerBuilder.h" #include "spi/ILogger.h" #include "dummy_db.h" @@ -34,7 +34,7 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver * FIXME: too many args, this constructor becomes unreadable **/ CAppDemo(IUartDriver *uartDriver, - ITimerFactory &i_timer_factory, + ITimerBuilder &i_timer_factory, bool reset=false, bool openGpCommissionning=false, uint8_t authorizeChannelRequestAnswerTimeout=0, diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 805c4a25..469ac0ce 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -6,7 +6,7 @@ #include -#include "spi/TimerFactory.h" +#include "spi/TimerBuilder.h" #include "spi/UartDriverBuilder.h" #include "spi/Logger.h" #include "CAppDemo.h" @@ -56,7 +56,7 @@ static bool hexDigitToNibble(const char hDigit, uint8_t& byte) { int main(int argc, char **argv) { IUartDriver *uartDriver = UartDriverBuilder::getUartDriver(); - TimerFactory timerFactory; + TimerBuilder timerFactory; int optionIndex=0; int c; bool debugEnabled = false; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2fd0879a..093d00e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,7 +31,7 @@ list(APPEND ezspfull_SOURCES ) list(APPEND ezspfull_SOURCES spi/GenericAsyncDataInputObservable.cpp) -list(APPEND ezspfull_SOURCES spi/TimerFactory.cpp) +list(APPEND ezspfull_SOURCES spi/TimerBuilder.cpp) list(APPEND ezspfull_SOURCES spi/UartDriverBuilder.cpp) list(APPEND ezspfull_SOURCES spi/Logger.cpp) set(ezspspi_LIBS ) diff --git a/src/ezsp/ash.cpp b/src/ezsp/ash.cpp index 32fabaa9..a31e44a5 100644 --- a/src/ezsp/ash.cpp +++ b/src/ezsp/ash.cpp @@ -28,7 +28,7 @@ using namespace std; #define ASH_MAX_LENGTH 131 -CAsh::CAsh(CAshCallback *ipCb, ITimerFactory &i_timer_factory) : +CAsh::CAsh(CAshCallback *ipCb, ITimerBuilder &i_timer_factory) : ackNum(0), frmNum(0), seq_num(0), diff --git a/src/ezsp/ash.h b/src/ezsp/ash.h index b71019e3..3bbf62a1 100644 --- a/src/ezsp/ash.h +++ b/src/ezsp/ash.h @@ -4,7 +4,7 @@ #include #include // For std::unique_ptr -#include "spi/ITimerFactory.h" +#include "spi/ITimerBuilder.h" typedef enum { @@ -29,7 +29,7 @@ class CAsh * ipCb : call to inform state of ash * ipTimer : timer object pass to ash module to manage internal timer */ - CAsh(CAshCallback *ipCb, ITimerFactory &i_timer_factory); + CAsh(CAshCallback *ipCb, ITimerBuilder &i_timer_factory); CAsh(const CAsh&) = delete; /* No copy construction allowed */ diff --git a/src/ezsp/ezsp-dongle.cpp b/src/ezsp/ezsp-dongle.cpp index 7ced2c1d..5b8170d7 100644 --- a/src/ezsp/ezsp-dongle.cpp +++ b/src/ezsp/ezsp-dongle.cpp @@ -5,7 +5,7 @@ #include "ezsp-dongle.h" #include "spi/ILogger.h" -CEzspDongle::CEzspDongle( ITimerFactory &i_timer_factory, CEzspDongleObserver* ip_observer ) : +CEzspDongle::CEzspDongle( ITimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer ) : timer_factory(i_timer_factory), pUart(nullptr), ash(new CAsh(static_cast(this), timer_factory)), diff --git a/src/ezsp/ezsp-dongle.h b/src/ezsp/ezsp-dongle.h index 044caab5..1e8f6699 100644 --- a/src/ezsp/ezsp-dongle.h +++ b/src/ezsp/ezsp-dongle.h @@ -9,7 +9,7 @@ #include "spi/IUartDriver.h" #include "ash.h" #include "ezsp-dongle-observer.h" -#include "spi/ITimerFactory.h" +#include "spi/ITimerBuilder.h" extern "C" { /* Avoid compiler warning on member initialization for structs (in -Weffc++ mode) */ typedef struct sMsg @@ -27,7 +27,7 @@ extern "C" { /* Avoid compiler warning on member initialization for structs (in class CEzspDongle : public IAsyncDataInputObserver, public CAshCallback { public: - CEzspDongle( ITimerFactory &i_timer_factory, CEzspDongleObserver* ip_observer = nullptr ); + CEzspDongle( ITimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer = nullptr ); CEzspDongle() = delete; // Construction without arguments is not allowed CEzspDongle(const CEzspDongle&) = delete; /* No copy construction allowed (pointer data members) */ ~CEzspDongle(); @@ -64,7 +64,7 @@ class CEzspDongle : public IAsyncDataInputObserver, public CAshCallback bool unregisterObserver(CEzspDongleObserver* observer); private: - ITimerFactory &timer_factory; + ITimerBuilder &timer_factory; IUartDriver *pUart; CAsh *ash; GenericAsyncDataInputObservable uartIncomingDataHandler; diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.cpp b/src/ezsp/zigbee-tools/zigbee-messaging.cpp index c88802ab..567106c0 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.cpp +++ b/src/ezsp/zigbee-tools/zigbee-messaging.cpp @@ -9,7 +9,7 @@ #include "spi/ILogger.h" -CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, ITimerFactory &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) +CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, ITimerBuilder &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) { dongle.registerObserver(this); } diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.h b/src/ezsp/zigbee-tools/zigbee-messaging.h index dc2874a0..cb80309c 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.h +++ b/src/ezsp/zigbee-tools/zigbee-messaging.h @@ -19,7 +19,7 @@ class CZigbeeMessaging : public CEzspDongleObserver { public: - CZigbeeMessaging( CEzspDongle &i_dongle, ITimerFactory &i_timer_factory ); + CZigbeeMessaging( CEzspDongle &i_dongle, ITimerBuilder &i_timer_factory ); void SendBroadcast( EOutBroadcastDestination i_destination, uint8_t i_radius, CZigBeeMsg i_msg); void SendUnicast( EmberNodeId i_node_id, CZigBeeMsg i_msg ); @@ -41,7 +41,7 @@ class CZigbeeMessaging : public CEzspDongleObserver private: CEzspDongle &dongle; - ITimerFactory &timer_factory; // needed in the future to well manage retry/timeout on unicast zigbee message + ITimerBuilder &timer_factory; // needed in the future to well manage retry/timeout on unicast zigbee message }; #ifdef USE_RARITAN diff --git a/src/spi/CMakeLists.txt b/src/spi/CMakeLists.txt index 97bc11cb..dc70f661 100644 --- a/src/spi/CMakeLists.txt +++ b/src/spi/CMakeLists.txt @@ -1,6 +1,6 @@ set(ezspspi_SOURCES ) list(APPEND ezspspi_SOURCES GenericAsyncDataInputObservable.cpp) -list(APPEND ezspspi_SOURCES TimerFactory.cpp) +list(APPEND ezspspi_SOURCES TimerBuilder.cpp) list(APPEND ezspspi_SOURCES UartDriverBuilder.cpp) list(APPEND ezspspi_SOURCES Logger.cpp) set(ezspspi_LIBS ) diff --git a/src/spi/ITimerBuilder.h b/src/spi/ITimerBuilder.h index 8baefb3c..ac157af8 100644 --- a/src/spi/ITimerBuilder.h +++ b/src/spi/ITimerBuilder.h @@ -1,5 +1,5 @@ /** - * @file ITimerFactory.h + * @file ITimerBuilder.h * * @brief Abstract interface to which must conforms implementations of factory classes that generate ITimer objects * @@ -18,12 +18,12 @@ /** * @brief Abstract factory to create ITimer instances */ -class ITimerFactory { +class ITimerBuilder { public: /** * @brief Destructor */ - virtual ~ITimerFactory() { }; + virtual ~ITimerBuilder() { }; /** * @brief Create a new ITimer instance diff --git a/src/spi/TimerBuilder.cpp b/src/spi/TimerBuilder.cpp index 319d6cac..cbb25cf4 100644 --- a/src/spi/TimerBuilder.cpp +++ b/src/spi/TimerBuilder.cpp @@ -1,10 +1,10 @@ /** - * @file TimerFactory.cpp + * @file TimerBuilder.cpp * * @brief Concrete implementation of a ITimer factory returning RaritanTimer objects */ -#include "spi/TimerFactory.h" +#include "spi/TimerBuilder.h" #ifdef USE_RARITAN #include "spi/raritan/RaritanTimer.h" #endif @@ -12,15 +12,15 @@ #include "spi/cppthreads/CppThreadsTimer.h" #endif -TimerFactory::TimerFactory() { +TimerBuilder::TimerBuilder() { } -TimerFactory::~TimerFactory() { +TimerBuilder::~TimerBuilder() { } -std::unique_ptr TimerFactory::create() const { +std::unique_ptr TimerBuilder::create() const { #ifdef USE_RARITAN return std::unique_ptr(new RaritanTimer()); #endif diff --git a/src/spi/TimerBuilder.h b/src/spi/TimerBuilder.h index 0d32741d..e351889c 100644 --- a/src/spi/TimerBuilder.h +++ b/src/spi/TimerBuilder.h @@ -1,28 +1,28 @@ /** - * @file TimerFactory.h + * @file TimerBuilder.h * * @brief Concrete implementation of a ITimer factory */ -#include "spi/ITimerFactory.h" +#include "spi/ITimerBuilder.h" /** * @brief Factory class to generate RaritanTimer objects */ -class TimerFactory : public ITimerFactory { +class TimerBuilder : public ITimerBuilder { public: /** * @brief Constructor * * @param eventLoop The current process' Raritan mainloop */ - TimerFactory(); + TimerBuilder(); /** * @brief Destructor */ - ~TimerFactory(); + ~TimerBuilder(); /** * @brief Create a new timer diff --git a/src/spi/raritan/test_raritan.cpp b/src/spi/raritan/test_raritan.cpp index 5482df40..0f2951c7 100644 --- a/src/spi/raritan/test_raritan.cpp +++ b/src/spi/raritan/test_raritan.cpp @@ -1,6 +1,6 @@ #include "spi/raritan/RaritanEventLoop.h" #include "spi/raritan/RaritanUartDriver.h" -#include "spi/raritan/RaritanTimerFactory.h" +#include "spi/TimerBuilder.h" #include "spi/GenericAsyncDataInputObservable.h" #include "spi/GenericLogger.h" #include @@ -44,15 +44,14 @@ private : }; int main() { - RaritanEventLoop eventLoop; GenericAsyncDataInputObservable uartIncomingDataHandler; - RaritanTimerFactory factory(eventLoop); + TimerBuilder factory(); std::unique_ptr newTimer(factory.create()); newTimer->start(10000, [](ITimer* triggeringTimer) { clogI << "Timer finished (was launched by a " << triggeringTimer->duration << " ms timer)" << std::endl; }); DebuggerDisplayer disp("Debugger displayer"); - RaritanUartDriver uartDriver(eventLoop); + RaritanUartDriver uartDriver(); uartIncomingDataHandler.registerObserver(&disp); // Seb ne veut pas se préoccuper du type de l'UART et enregistrer l'observer après la construction uartDriver. uartDriver.setIncomingDataHandler(&uartIncomingDataHandler); uartDriver.open("/dev/ttyUSB0", 57600); @@ -61,7 +60,8 @@ int main() { size_t written; uartDriver.write(written, buf, 5); - eventLoop.run(); + pp::Selector eventSelector(*pp::SelectorSingleton::getInstance()) + eventSelector.run(); return 0; } diff --git a/src/spi/serial/test-serial.cpp b/src/spi/serial/test-serial.cpp index 76481e3b..d55d8ac1 100644 --- a/src/spi/serial/test-serial.cpp +++ b/src/spi/serial/test-serial.cpp @@ -1,5 +1,5 @@ #include "SerialUartDriver.h" -#include "CppThreadsTimerFactory.h" +#include "spi/TimerBuilder.h" #include "spi/GenericAsyncDataInputObservable.h" #include "spi/GenericLogger.h" #include @@ -50,7 +50,7 @@ int main() { SerialUartDriver uartDriver; uartDriver.setIncomingDataHandler(&uartIncomingDataHandler); - CppThreadsTimerFactory timerFactory; + TimerBuilder timerFactory; ITimer *timer = timerFactory.create(); timer->start(10000, [](ITimer* triggeringTimer) { clogI << "Timer finished (was launched by a " << triggeringTimer->duration << " ms timer)" << std::endl; diff --git a/tests/gp_tests.cpp b/tests/gp_tests.cpp index 44151c43..b2e687ed 100644 --- a/tests/gp_tests.cpp +++ b/tests/gp_tests.cpp @@ -4,7 +4,7 @@ #include #include "spi/mock-uart/MockUartDriver.h" -#include "spi/cppthreads/CppThreadsTimerFactory.h" +#include "spi/TimerFactory.h" #include "spi/IAsyncDataInputObserver.h" #include "spi/GenericLogger.h" @@ -141,7 +141,7 @@ TEST_GROUP(gp_tests) { TEST(gp_tests, gp_recv_sensor_measurement) { - CppThreadsTimerFactory timerFactory; + TimerBuilder timerFactory; GenericAsyncDataInputObservable uartIncomingDataHandler; ConsoleLogger::getInstance().setLogLevel(LOG_LEVEL::DEBUG); /* Only display logs for debug level info and higher (up to error) */ std::vector< std::vector > stageExpectedTransitions; From c21fbb5441c0fef3ff70678bdd69ebe05697a650 Mon Sep 17 00:00:00 2001 From: mchalain Date: Tue, 17 Dec 2019 17:33:53 +0100 Subject: [PATCH 029/413] [Timer] ITimerBuilder is obsolete --- example/CAppDemo.cpp | 2 +- example/CAppDemo.h | 4 +-- src/ezsp/ash.cpp | 2 +- src/ezsp/ash.h | 4 +-- src/ezsp/ezsp-dongle.cpp | 2 +- src/ezsp/ezsp-dongle.h | 6 ++-- src/ezsp/zigbee-tools/zigbee-messaging.cpp | 2 +- src/ezsp/zigbee-tools/zigbee-messaging.h | 4 +-- src/spi/ITimerBuilder.h | 38 ---------------------- src/spi/TimerBuilder.h | 10 ++++-- 10 files changed, 20 insertions(+), 54 deletions(-) delete mode 100644 src/spi/ITimerBuilder.h diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index ffcc339e..0ce26f32 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -18,7 +18,7 @@ CAppDemo::CAppDemo(IUartDriver *uartDriver, - ITimerBuilder &i_timer_factory, + TimerBuilder &i_timer_factory, bool reset, bool openGpCommissionning, uint8_t authorizeChannelRequestAnswerTimeout, diff --git a/example/CAppDemo.h b/example/CAppDemo.h index a0546a96..31819958 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -12,7 +12,7 @@ #include "ezsp/zigbee-tools/green-power-sink.h" #include "ezsp/zbmessage/green-power-device.h" #include "spi/IUartDriver.h" -#include "spi/ITimerBuilder.h" +#include "spi/TimerBuilder.h" #include "spi/ILogger.h" #include "dummy_db.h" @@ -34,7 +34,7 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver * FIXME: too many args, this constructor becomes unreadable **/ CAppDemo(IUartDriver *uartDriver, - ITimerBuilder &i_timer_factory, + TimerBuilder &i_timer_factory, bool reset=false, bool openGpCommissionning=false, uint8_t authorizeChannelRequestAnswerTimeout=0, diff --git a/src/ezsp/ash.cpp b/src/ezsp/ash.cpp index a31e44a5..bc386c79 100644 --- a/src/ezsp/ash.cpp +++ b/src/ezsp/ash.cpp @@ -28,7 +28,7 @@ using namespace std; #define ASH_MAX_LENGTH 131 -CAsh::CAsh(CAshCallback *ipCb, ITimerBuilder &i_timer_factory) : +CAsh::CAsh(CAshCallback *ipCb, TimerBuilder &i_timer_factory) : ackNum(0), frmNum(0), seq_num(0), diff --git a/src/ezsp/ash.h b/src/ezsp/ash.h index 3bbf62a1..5060a2d4 100644 --- a/src/ezsp/ash.h +++ b/src/ezsp/ash.h @@ -4,7 +4,7 @@ #include #include // For std::unique_ptr -#include "spi/ITimerBuilder.h" +#include "spi/TimerBuilder.h" typedef enum { @@ -29,7 +29,7 @@ class CAsh * ipCb : call to inform state of ash * ipTimer : timer object pass to ash module to manage internal timer */ - CAsh(CAshCallback *ipCb, ITimerBuilder &i_timer_factory); + CAsh(CAshCallback *ipCb, TimerBuilder &i_timer_factory); CAsh(const CAsh&) = delete; /* No copy construction allowed */ diff --git a/src/ezsp/ezsp-dongle.cpp b/src/ezsp/ezsp-dongle.cpp index 5b8170d7..58013ff5 100644 --- a/src/ezsp/ezsp-dongle.cpp +++ b/src/ezsp/ezsp-dongle.cpp @@ -5,7 +5,7 @@ #include "ezsp-dongle.h" #include "spi/ILogger.h" -CEzspDongle::CEzspDongle( ITimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer ) : +CEzspDongle::CEzspDongle( TimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer ) : timer_factory(i_timer_factory), pUart(nullptr), ash(new CAsh(static_cast(this), timer_factory)), diff --git a/src/ezsp/ezsp-dongle.h b/src/ezsp/ezsp-dongle.h index 1e8f6699..6675171b 100644 --- a/src/ezsp/ezsp-dongle.h +++ b/src/ezsp/ezsp-dongle.h @@ -9,7 +9,7 @@ #include "spi/IUartDriver.h" #include "ash.h" #include "ezsp-dongle-observer.h" -#include "spi/ITimerBuilder.h" +#include "spi/TimerBuilder.h" extern "C" { /* Avoid compiler warning on member initialization for structs (in -Weffc++ mode) */ typedef struct sMsg @@ -27,7 +27,7 @@ extern "C" { /* Avoid compiler warning on member initialization for structs (in class CEzspDongle : public IAsyncDataInputObserver, public CAshCallback { public: - CEzspDongle( ITimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer = nullptr ); + CEzspDongle( TimerBuilder &i_timer_factory, CEzspDongleObserver* ip_observer = nullptr ); CEzspDongle() = delete; // Construction without arguments is not allowed CEzspDongle(const CEzspDongle&) = delete; /* No copy construction allowed (pointer data members) */ ~CEzspDongle(); @@ -64,7 +64,7 @@ class CEzspDongle : public IAsyncDataInputObserver, public CAshCallback bool unregisterObserver(CEzspDongleObserver* observer); private: - ITimerBuilder &timer_factory; + TimerBuilder &timer_factory; IUartDriver *pUart; CAsh *ash; GenericAsyncDataInputObservable uartIncomingDataHandler; diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.cpp b/src/ezsp/zigbee-tools/zigbee-messaging.cpp index 567106c0..20e34aae 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.cpp +++ b/src/ezsp/zigbee-tools/zigbee-messaging.cpp @@ -9,7 +9,7 @@ #include "spi/ILogger.h" -CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, ITimerBuilder &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) +CZigbeeMessaging::CZigbeeMessaging( CEzspDongle &i_dongle, TimerBuilder &i_timer_factory ): dongle(i_dongle), timer_factory(i_timer_factory) { dongle.registerObserver(this); } diff --git a/src/ezsp/zigbee-tools/zigbee-messaging.h b/src/ezsp/zigbee-tools/zigbee-messaging.h index cb80309c..f8e9b210 100644 --- a/src/ezsp/zigbee-tools/zigbee-messaging.h +++ b/src/ezsp/zigbee-tools/zigbee-messaging.h @@ -19,7 +19,7 @@ class CZigbeeMessaging : public CEzspDongleObserver { public: - CZigbeeMessaging( CEzspDongle &i_dongle, ITimerBuilder &i_timer_factory ); + CZigbeeMessaging( CEzspDongle &i_dongle, TimerBuilder &i_timer_factory ); void SendBroadcast( EOutBroadcastDestination i_destination, uint8_t i_radius, CZigBeeMsg i_msg); void SendUnicast( EmberNodeId i_node_id, CZigBeeMsg i_msg ); @@ -41,7 +41,7 @@ class CZigbeeMessaging : public CEzspDongleObserver private: CEzspDongle &dongle; - ITimerBuilder &timer_factory; // needed in the future to well manage retry/timeout on unicast zigbee message + TimerBuilder &timer_factory; // needed in the future to well manage retry/timeout on unicast zigbee message }; #ifdef USE_RARITAN diff --git a/src/spi/ITimerBuilder.h b/src/spi/ITimerBuilder.h deleted file mode 100644 index ac157af8..00000000 --- a/src/spi/ITimerBuilder.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @file ITimerBuilder.h - * - * @brief Abstract interface to which must conforms implementations of factory classes that generate ITimer objects - * - * Used as a dependency inversion paradigm - */ -#pragma once - -#include "ITimer.h" -#include // For std::unique_ptr - -#ifdef USE_RARITAN -/**** Start of the official API; no includes below this point! ***************/ -#include -#endif // USE_RARITAN - -/** - * @brief Abstract factory to create ITimer instances - */ -class ITimerBuilder { -public: - /** - * @brief Destructor - */ - virtual ~ITimerBuilder() { }; - - /** - * @brief Create a new ITimer instance - * - * @return The new instance allocated - */ - virtual std::unique_ptr create() const = 0; -}; - -#ifdef USE_RARITAN -#include -#endif // USE_RARITAN diff --git a/src/spi/TimerBuilder.h b/src/spi/TimerBuilder.h index e351889c..62cb7be3 100644 --- a/src/spi/TimerBuilder.h +++ b/src/spi/TimerBuilder.h @@ -3,14 +3,16 @@ * * @brief Concrete implementation of a ITimer factory */ +#ifndef __TIMERBUILDER_H__ +#define __TIMERBUILDER_H__ - -#include "spi/ITimerBuilder.h" +#include +#include "spi/ITimer.h" /** * @brief Factory class to generate RaritanTimer objects */ -class TimerBuilder : public ITimerBuilder { +class TimerBuilder { public: /** * @brief Constructor @@ -32,3 +34,5 @@ class TimerBuilder : public ITimerBuilder { std::unique_ptr create() const; private: }; + +#endif From e06656badc44a194f1495cba1cc361b0d02477bd Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 09:29:27 +0100 Subject: [PATCH 030/413] [CP 05d2cd50d287] Fixing nominal GP startup test for new CAppdemo constructor --- tests/gp_tests.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/gp_tests.cpp b/tests/gp_tests.cpp index b2e687ed..dd4131c4 100644 --- a/tests/gp_tests.cpp +++ b/tests/gp_tests.cpp @@ -140,6 +140,7 @@ TEST_GROUP(gp_tests) { } while(0) +#define GPD_KEY { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa } TEST(gp_tests, gp_recv_sensor_measurement) { TimerBuilder timerFactory; GenericAsyncDataInputObservable uartIncomingDataHandler; @@ -154,10 +155,10 @@ TEST(gp_tests, gp_recv_sensor_measurement) { FAILF("Failed opening mock serial port"); } - stageExpectedTransitions.push_back(std::vector({0x1a, 0xc0, 0x38, 0xbc, 0x7e})); - std::vector sourceIdList; - sourceIdList.push_back(0x0500001U); - CAppDemo app(uartDriver, timerFactory, true, 11, sourceIdList); /* Force reset the network channel to 11 */ + stageExpectedTransitions.push_back({0x1a, 0xc0, 0x38, 0xbc, 0x7e}); + std::vector GPDList; + GPDList.push_back(CGpDevice(0x0500001U, GPD_KEY)); + CAppDemo app(uartDriver, timerFactory, true, false, 0, true, 11, false, GPDList); /* Force reset the network channel to 11 */ UT_WAIT_MS(50); /* Give 50ms for libezsp's internal process to write to serial */ UT_FAILF_UNLESS_STAGE(1); From e855ebb99051b726f35d8ff09782d41f2c2d6a6a Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 09:35:44 +0100 Subject: [PATCH 031/413] [CR af7407a49de4] Switch arguments on CAppDemo's constructor --- example/CAppDemo.cpp | 8 ++++---- example/CAppDemo.h | 6 +++--- example/mainEzspTest.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index 0ce26f32..aedcf619 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -25,8 +25,8 @@ CAppDemo::CAppDemo(IUartDriver *uartDriver, bool openZigbeeCommissionning, unsigned int networkChannel, bool gpRemoveAllDevices, - const std::vector& gpDevicesToRemove, - const std::vector& gpDevicesToAdd) : + const std::vector& gpDevicesToAdd, + const std::vector& gpDevicesToRemove) : timer(i_timer_factory.create()), dongle(i_timer_factory, this), zb_messaging(dongle, i_timer_factory), @@ -41,8 +41,8 @@ CAppDemo::CAppDemo(IUartDriver *uartDriver, openZigbeeCommissionningAtStartup(openZigbeeCommissionning), channel(networkChannel), removeAllGpds(gpRemoveAllDevices), - gpdToRemove(gpDevicesToRemove), - gpdList(gpDevicesToAdd) + gpdList(gpDevicesToAdd), + gpdToRemove(gpDevicesToRemove) { setAppState(APP_NOT_INIT); // uart diff --git a/example/CAppDemo.h b/example/CAppDemo.h index 31819958..626008b1 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -41,8 +41,8 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver bool openZigbeeCommissionning=false, unsigned int networkChannel=11, bool gpRemoveAllDevices=false, - const std::vector& gpDevicesToRemove={}, - const std::vector& gpDevicesList={}); + const std::vector& gpDevicesList={}, + const std::vector& gpDevicesToRemove={}); /** * Callback @@ -78,6 +78,6 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver bool openZigbeeCommissionningAtStartup; /* Do we open the Zigbee network at dongle initialization? */ unsigned int channel; /*!< The Zigbee channel on which to create the network (if reset_wanted is set) */ bool removeAllGpds; /*!< A flag to remove all GP devices from monitoring */ - std::vector gpdToRemove; /*!< A list of source IDs for GP devices to remove from previous monitoring */ std::vector gpdList; /*!< The list of GP devices we are monitoring */ + std::vector gpdToRemove; /*!< A list of source IDs for GP devices to remove from previous monitoring */ }; diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 469ac0ce..0e1eb0a1 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -202,7 +202,7 @@ int main(int argc, char **argv) { return 1; } - CAppDemo app(uartDriver, timerFactory, (resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpRemovedDevDataList, gpAddedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ + CAppDemo app(uartDriver, timerFactory, (resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpAddedDevDataList, gpRemovedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ #ifdef USE_CPPTHREADS std::string line; From 596ba33ed04d94ef79102ec65a52600be1597399 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 09:37:56 +0100 Subject: [PATCH 032/413] [CR From 479b2248] Removing explicit type std::vector() in test --- tests/gp_tests.cpp | 1092 ++++++++++++++++++++++---------------------- 1 file changed, 546 insertions(+), 546 deletions(-) diff --git a/tests/gp_tests.cpp b/tests/gp_tests.cpp index dd4131c4..9a35eaa1 100644 --- a/tests/gp_tests.cpp +++ b/tests/gp_tests.cpp @@ -163,1118 +163,1118 @@ TEST(gp_tests, gp_recv_sensor_measurement) { UT_WAIT_MS(50); /* Give 50ms for libezsp's internal process to write to serial */ UT_FAILF_UNLESS_STAGE(1); - stageExpectedTransitions.push_back(std::vector({0x00, 0x42, 0x21, 0xa8, 0x52, 0xcd, 0x6e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x1a, 0xc1, 0x02, 0x0b, 0x0a, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x00, 0x42, 0x21, 0xa8, 0x52, 0xcd, 0x6e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x1a, 0xc1, 0x02, 0x0b, 0x0a, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(2); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x43, 0x21, 0xa8, 0x53, 0x05, 0xf0, 0x7e })); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x43, 0x21, 0xa8, 0x53, 0x05, 0xf0, 0x7e }); //std::cerr << "Remaining incoming queue:" << uartDriver.scheduledIncomingChunksToString() << "\n"; - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x42, 0xa1, 0xa8, 0x53, 0x28, 0x45, 0xd7, 0xcf, 0x00, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x42, 0xa1, 0xa8, 0x53, 0x28, 0x45, 0xd7, 0xcf, 0x00, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(4); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x40, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xbf, 0xeb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x43, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xe7, 0x42, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x40, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xbf, 0xeb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x43, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xe7, 0x42, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(6); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x41, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x9e, 0xf8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x40, 0xa1, 0x57, 0x54, 0x79, 0x23, 0xad, 0x47, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x41, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x9e, 0xf8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x40, 0xa1, 0x57, 0x54, 0x79, 0x23, 0xad, 0x47, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(8); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x46, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x29, 0xcb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x41, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x4d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x46, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x29, 0xcb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x41, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x4d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(10); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x47, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xec, 0x39, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x46, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x64, 0x0c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x47, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xec, 0x39, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x46, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x64, 0x0c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(12); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x44, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x20, 0x3f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x47, 0xa1, 0x57, 0x54, 0x79, 0x20, 0xa8, 0xa3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x44, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x20, 0x3f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x47, 0xa1, 0x57, 0x54, 0x79, 0x20, 0xa8, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(14); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x45, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x67, 0x4e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x44, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x59, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x45, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x67, 0x4e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x44, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x59, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(16); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x4a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0x8d, 0x58, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x45, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x4a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0x8d, 0x58, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x45, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(18); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x4b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xcb, 0x87, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x4a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xc5, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x4b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xcb, 0x87, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x4a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xc5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(20); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x48, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x74, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x4b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x48, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x74, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x4b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(22); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x49, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x65, 0xe4, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x48, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x90, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x49, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x65, 0xe4, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x48, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x90, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(24); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x4e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0x99, 0x64, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x49, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x0f, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x4e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0x99, 0x64, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x49, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x0f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(26); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x4f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x1f, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x4e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x4e, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x4f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x1f, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x4e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x4e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(28); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x4c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xe0, 0x2a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x4f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x17, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x4c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xe0, 0x2a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x4f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x17, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(30); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x4d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xaa, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x4c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x1b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x4d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xaa, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x4c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x1b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(32); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x52, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xac, 0x77, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x4d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xc1, 0x30, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x52, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xac, 0x77, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x4d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xc1, 0x30, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(34); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x53, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x3d, 0x19, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x52, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x22, 0xb7, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x53, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x3d, 0x19, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x52, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x22, 0xb7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(36); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x50, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0x00, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x53, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0x5a, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x50, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0x00, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x53, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0x5a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(38); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x51, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0xc8, 0x25, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x50, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x56, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x51, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0xc8, 0x25, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x50, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0x56, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(40); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x56, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x4c, 0x1d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x51, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc9, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x56, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x4c, 0x1d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x51, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8a, 0xc9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(42); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x57, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x2e, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x56, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x7d, 0x5e, 0x88, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x57, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x2e, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x56, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x7d, 0x5e, 0x88, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(44); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x54, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0x10, 0x80, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x57, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x92, 0x65, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x54, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0x10, 0x80, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x57, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x92, 0x65, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(46); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x55, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0xd8, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x54, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0xdd, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x55, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0xd8, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x54, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0xdd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(48); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x5a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x07, 0x31, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x55, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x42, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x5a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x07, 0x31, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x55, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x90, 0x42, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(50); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x5b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0xe7, 0x68, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x5a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x41, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x5b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0xe7, 0x68, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x5a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x69, 0x41, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(52); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x58, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0x27, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x5b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x7d, 0x38, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x58, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0x27, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x5b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x7d, 0x38, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(54); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x59, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0xfa, 0x03, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x58, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x14, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x59, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0xfa, 0x03, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x58, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x14, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(56); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x0d, 0xf2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x59, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x87, 0x8b, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x0d, 0xf2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x59, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x87, 0x8b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(58); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x5f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x73, 0x6d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xca, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x5f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x73, 0x6d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x73, 0xca, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(60); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x5c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0x79, 0x5f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x5f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x93, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x5c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0x79, 0x5f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x5f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x93, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(62); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0xa1, 0x5f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x5c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x9f, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0xa1, 0x5f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x5c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x9f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(64); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x62, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xb1, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x00, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x62, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xb1, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9d, 0x00, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(66); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x63, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x4a, 0x90, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x62, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x8f, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x63, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x4a, 0x90, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x62, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x8f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(68); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x60, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x31, 0xc2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x63, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x60, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x31, 0xc2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x63, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe1, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(70); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x61, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0xf9, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x60, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xda, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x61, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0xf9, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x60, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xda, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(72); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x66, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x21, 0xa7, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x61, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x45, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x66, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x21, 0xa7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x61, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x45, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(74); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x67, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0xe1, 0xa1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x66, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x51, 0x04, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x67, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0xe1, 0xa1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x66, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x51, 0x04, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(76); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x64, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0xa1, 0xc0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x67, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x64, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0xa1, 0xc0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x67, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfb, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(78); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x65, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0xbb, 0xff, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x64, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd4, 0x51, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x65, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0xbb, 0xff, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x64, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd4, 0x51, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(80); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x6a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x2f, 0xe6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x65, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xce, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x6a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x2f, 0xe6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x65, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xce, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(82); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x6b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x68, 0xbc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x6a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xcd, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x6b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x68, 0xbc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x6a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xcd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(84); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x68, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x86, 0x10, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x6b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x68, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x86, 0x10, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x6b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(86); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x69, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x05, 0xc2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x68, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x98, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x69, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x05, 0xc2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x68, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x98, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(88); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x6e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0xff, 0xb3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x69, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x02, 0xa1, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x6e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0xff, 0xb3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x69, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x02, 0xa1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(90); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x6f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0xb8, 0xf7, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x6e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xf6, 0xe0, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x6f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0xb8, 0xf7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x6e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xf6, 0xe0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(92); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x6c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x8c, 0x9e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x6f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5c, 0xb9, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x6c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x8c, 0x9e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x6f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5c, 0xb9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(94); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x6d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x5f, 0x10, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x6c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x73, 0xb5, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x6d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x5f, 0x10, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x6c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x73, 0xb5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(96); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x72, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0xed, 0x03, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x6d, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x8f, 0x02, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x72, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0xed, 0x03, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x6d, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x8f, 0x02, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(98); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x73, 0x21, 0xa8, 0x04, 0x03, 0x0b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x72, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x6c, 0x85, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x73, 0x21, 0xa8, 0x04, 0x03, 0x0b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x72, 0xa1, 0x57, 0x54, 0x28, 0x15, 0x6c, 0x85, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(100); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x70, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xf9, 0x37, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x73, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xbe, 0xcf, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x70, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0xf9, 0x37, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x73, 0xa1, 0x57, 0x54, 0x2a, 0x45, 0xd7, 0xbe, 0xcf, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(102); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x71, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0xd8, 0x24, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x70, 0xa1, 0x57, 0x54, 0x79, 0x23, 0x82, 0xcb, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x71, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0xd8, 0x24, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x70, 0xa1, 0x57, 0x54, 0x79, 0x23, 0x82, 0xcb, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(104); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x76, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x6f, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x71, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x76, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x6f, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x71, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbf, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(106); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x77, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xaa, 0xe5, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x76, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x77, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0xaa, 0xe5, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x76, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x4b, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(108); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x74, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x66, 0xe3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x77, 0xa1, 0x57, 0x54, 0x79, 0x20, 0x87, 0x2f, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x74, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0x66, 0xe3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x77, 0xa1, 0x57, 0x54, 0x79, 0x20, 0x87, 0x2f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(110); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x75, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x21, 0x92, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x74, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xd5, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x75, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0x21, 0x92, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x74, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xce, 0xd5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(112); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x7a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xcb, 0x84, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x75, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x4a, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x7a, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xcb, 0x84, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x75, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa5, 0x4a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(114); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x7b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0x8d, 0x5b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x7a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x5c, 0x49, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x7b, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0x8d, 0x5b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x7a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x5c, 0x49, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(116); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x78, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x32, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x7b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x10, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x78, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0x32, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x7b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf6, 0x10, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(118); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x79, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x23, 0x38, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x78, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x79, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0x23, 0x38, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x78, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xd9, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(120); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x7d, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xdf, 0xb8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x79, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb2, 0x83, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x7d, 0x5e, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xdf, 0xb8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x79, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb2, 0x83, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(122); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x7f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x59, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x7d, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xc2, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x7f, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x59, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x7d, 0x5e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x46, 0xc2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(124); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x7c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xa6, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x7f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x9b, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x7c, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0xa6, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x7f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xec, 0x9b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(126); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x7d, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xec, 0x2a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x7c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x97, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x7d, 0x5d, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0xec, 0x2a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x7c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xc3, 0x97, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(128); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x02, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0x67, 0x7d, 0x33, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x7d, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xee, 0xbc, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x02, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0x67, 0x7d, 0x33, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x7d, 0x5d, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xee, 0xbc, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(130); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x03, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0xf6, 0x7d, 0x5d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x02, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x52, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x03, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0xf6, 0x7d, 0x5d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x02, 0xa1, 0x57, 0x54, 0x79, 0x22, 0x52, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(132); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x00, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xcb, 0x7f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x03, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xce, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x00, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xcb, 0x7f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x03, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xce, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(134); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x01, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x03, 0x41, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x00, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xc2, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x01, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x03, 0x41, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x00, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xc2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(136); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x06, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x87, 0x79, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x01, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x06, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x87, 0x79, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x01, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(138); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x07, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0xe5, 0xe1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x06, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x07, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0xe5, 0xe1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x06, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(140); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x04, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xdb, 0xe4, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x07, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xe2, 0xf1, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x04, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xdb, 0xe4, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x07, 0xa1, 0x57, 0x54, 0x79, 0x22, 0xe2, 0xf1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(142); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x05, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x33, 0xda, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x04, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x49, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x05, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x33, 0xda, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x04, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x49, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(144); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x0a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0xcc, 0x55, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x05, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x0a, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0xcc, 0x55, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x05, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(146); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x0b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x2c, 0x0c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x0a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x19, 0xd5, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x0b, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x2c, 0x0c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x0a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x19, 0xd5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(148); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x08, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xec, 0xf2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x0b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb3, 0x8c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x08, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xec, 0xf2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x0b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xb3, 0x8c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(150); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x09, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x31, 0x67, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x08, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9c, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x09, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x31, 0x67, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x08, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x9c, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(152); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x0e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0xc6, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x09, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf7, 0x1f, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x0e, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0xc6, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x09, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xf7, 0x1f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(154); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x0f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0xb8, 0x09, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x0e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x5e, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x0f, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0xb8, 0x09, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x0e, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x5e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(156); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x0c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xb2, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x0f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x07, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x0c, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xb2, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x0f, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x07, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(158); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x0d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x6a, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x0c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x86, 0x0b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x0d, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x6a, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x0c, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x86, 0x0b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(160); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x12, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0x01, 0x93, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x0d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xed, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x12, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0x01, 0x93, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x0d, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xed, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(162); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x7d, 0x33, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0xfa, 0x9c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x12, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x7d, 0x33, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x7d, 0x33, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0xfa, 0x9c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x12, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x0e, 0x7d, 0x33, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(164); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x10, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x81, 0xce, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x7d, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa4, 0x4a, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x10, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0x81, 0xce, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x7d, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa4, 0x4a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(166); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x7d, 0x31, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0xf0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x10, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x46, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x7d, 0x31, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0xf0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x10, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x8b, 0x46, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(168); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x16, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x91, 0xab, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x7d, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd9, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x16, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x91, 0xab, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x7d, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xe0, 0xd9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(170); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x17, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x51, 0xad, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x16, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x14, 0x98, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x17, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x51, 0xad, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x16, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x14, 0x98, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(172); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x14, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x7d, 0x31, 0xcc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x17, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x14, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x7d, 0x31, 0xcc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x17, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xbe, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(174); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x15, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x0b, 0xf3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x14, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xcd, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x15, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x0b, 0xf3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x14, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x91, 0xcd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(176); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x7d, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x9f, 0xea, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x15, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x7d, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x9f, 0xea, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x15, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xfa, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(178); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x1b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0xd8, 0xb0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x7d, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x51, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x1b, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0xd8, 0xb0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x7d, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x15, 0x03, 0x51, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(180); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x7d, 0x38, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x36, 0x1c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x1b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x08, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x7d, 0x38, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x36, 0x1c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x1b, 0xa1, 0x57, 0x54, 0x79, 0x15, 0xa9, 0x08, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(182); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x33, 0x19, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x81, 0xa3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x23, 0x7d, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x31, 0x5f, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x33, 0x19, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x81, 0xa3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x23, 0x7d, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x31, 0x5f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(184); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x44, 0x1e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x7b, 0xd2, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x34, 0x19, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x47, 0x3d, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x44, 0x1e, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x7b, 0xd2, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x34, 0x19, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x47, 0x3d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(186); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x55, 0x1f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x3c, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x45, 0x1e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x7c, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x55, 0x1f, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x3c, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x45, 0x1e, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x7c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(188); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x66, 0x1c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x08, 0xff, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x56, 0x1f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x19, 0x25, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x66, 0x1c, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x08, 0xff, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x56, 0x1f, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x19, 0x25, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(190); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x77, 0x1d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x05, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x67, 0x1c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x36, 0x29, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x77, 0x1d, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x05, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x67, 0x1c, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x36, 0x29, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(192); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x00, 0x22, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x8b, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x70, 0x1d, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x9c, 0x0b, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x00, 0x22, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x8b, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x70, 0x1d, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x9c, 0x0b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(194); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x7d, 0x31, 0x23, 0x21, 0x57, 0x54, 0x3d, 0x08, 0x73, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0x22, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x4a, 0x84, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x7d, 0x31, 0x23, 0x21, 0x57, 0x54, 0x3d, 0x08, 0x73, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0x22, 0xa1, 0x57, 0x54, 0x28, 0x23, 0x4a, 0x84, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(196); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x22, 0x20, 0x21, 0x57, 0x54, 0x3d, 0x07, 0xcd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x12, 0x23, 0xa5, 0x57, 0x54, 0x3d, 0x15, 0xc3, 0xc8, 0x7e, 0x22, 0x23, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xb7, 0xaf, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x22, 0x20, 0x21, 0x57, 0x54, 0x3d, 0x07, 0xcd, 0x7e }); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x12, 0x23, 0xa5, 0x57, 0x54, 0x3d, 0x15, 0xc3, 0xc8, 0x7e, 0x22, 0x23, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xb7, 0xaf, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(199); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x21, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0x7c, 0xf6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x20, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x2c, 0x2e, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x21, 0x21, 0x57, 0x54, 0x79, 0x17, 0x92, 0x59, 0x7c, 0xf6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x20, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x2c, 0x2e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(201); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x26, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x25, 0x0b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x21, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x6f, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x26, 0x21, 0x57, 0x54, 0x79, 0x16, 0xb8, 0x59, 0x25, 0x0b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x21, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(203); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x27, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x76, 0x39, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x26, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x34, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x27, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x31, 0xb2, 0x59, 0x76, 0x39, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x26, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x34, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(205); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x24, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0x9b, 0x91, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x27, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x9b, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x24, 0x21, 0x57, 0x54, 0x79, 0x10, 0xf2, 0x59, 0x9b, 0x91, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x27, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x9b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(207); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x25, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0xe3, 0x22, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x24, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x61, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x25, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x33, 0xba, 0x59, 0xe3, 0x22, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x24, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x61, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(209); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x2a, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0xc2, 0x67, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x25, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xe4, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x2a, 0x21, 0x57, 0x54, 0x79, 0x12, 0x92, 0x59, 0xc2, 0x67, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x25, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xe4, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(211); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x2b, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xd2, 0xaa, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x2a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xfd, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x2b, 0x21, 0x57, 0x54, 0x79, 0x1d, 0xa2, 0x59, 0xd2, 0xaa, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x2a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xfd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(213); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x28, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xbc, 0x2f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x2b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x52, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x28, 0x21, 0x57, 0x54, 0x79, 0x19, 0xb0, 0x59, 0xbc, 0x2f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x2b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x52, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(215); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x29, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0xb7, 0x0e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x28, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa8, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x29, 0x21, 0x57, 0x54, 0x79, 0x7d, 0x38, 0xb7, 0x59, 0xb7, 0x0e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x28, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(217); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x2e, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0xde, 0x17, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x29, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x2d, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x2e, 0x21, 0x57, 0x54, 0x79, 0x05, 0xbd, 0x59, 0xde, 0x17, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x29, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x2d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(219); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x2f, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xc6, 0x96, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x2e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x76, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x2f, 0x21, 0x57, 0x54, 0x79, 0x04, 0x92, 0x59, 0xc6, 0x96, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x2e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x76, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(221); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x2c, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x68, 0xbb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x2f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd9, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x2c, 0x21, 0x57, 0x54, 0x79, 0x07, 0x0a, 0x52, 0x68, 0xbb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x2f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(223); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x2d, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0x23, 0x37, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x2c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x2d, 0x21, 0x57, 0x54, 0x79, 0x06, 0xb7, 0x59, 0x23, 0x37, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x2c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(225); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x32, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0x32, 0x6b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x2d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa6, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x32, 0x21, 0x57, 0x54, 0x79, 0x01, 0xa6, 0x59, 0x32, 0x6b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x2d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(227); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x33, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xf3, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x32, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x3b, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x33, 0x21, 0x57, 0x54, 0x79, 0x00, 0xb2, 0x59, 0xf3, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x32, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xbb, 0x3b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(229); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x30, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x4a, 0xb1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x94, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x30, 0x21, 0x57, 0x54, 0x79, 0x02, 0xb2, 0x59, 0x4a, 0xb1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x33, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7f, 0x94, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(231); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x31, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xc3, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x30, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x6e, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x31, 0x21, 0x57, 0x54, 0x79, 0x0d, 0xb2, 0x59, 0xc3, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x30, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x3e, 0x6e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(233); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x36, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x73, 0xd6, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xeb, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x36, 0x21, 0x57, 0x54, 0x79, 0x0c, 0xb2, 0x59, 0x73, 0xd6, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x31, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe6, 0xeb, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(235); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x37, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x7d, 0x33, 0xef, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x36, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa1, 0xb0, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x37, 0x21, 0x57, 0x54, 0x79, 0x0f, 0xb2, 0x59, 0x7d, 0x33, 0xef, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x36, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa1, 0xb0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(237); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x34, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x59, 0x2d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x37, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x65, 0x1f, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x34, 0x21, 0x57, 0x54, 0x79, 0x0e, 0xb4, 0x59, 0x59, 0x2d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x37, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x65, 0x1f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(239); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x35, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xd3, 0x9d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x34, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x24, 0xe5, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x35, 0x21, 0x57, 0x54, 0x79, 0x09, 0xb2, 0x59, 0xd3, 0x9d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x34, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x24, 0xe5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(241); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x5d, 0x97, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x35, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x60, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0x3a, 0x21, 0x57, 0x54, 0x79, 0x08, 0xb2, 0x59, 0x7d, 0x5d, 0x97, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x35, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xfc, 0x60, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(243); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0x3b, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x58, 0xc3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x79, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0x3b, 0x21, 0x57, 0x54, 0x79, 0x0b, 0xbe, 0x59, 0x58, 0xc3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0x3a, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb6, 0x79, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(245); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0x38, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x90, 0xc0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0x3b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd6, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0x38, 0x21, 0x57, 0x54, 0x79, 0x0a, 0xf2, 0x5f, 0x90, 0xc0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0x3b, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x72, 0xd6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(247); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0x39, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xe4, 0x8b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x2c, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0x39, 0x21, 0x57, 0x54, 0x79, 0x35, 0xb1, 0x59, 0xe4, 0x8b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0x38, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x33, 0x2c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(249); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0x3e, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x41, 0xf0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0x39, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa9, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0x3e, 0x21, 0x57, 0x54, 0x79, 0x34, 0x8e, 0x59, 0x41, 0xf0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0x39, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xeb, 0xa9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(251); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0x3f, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x52, 0x00, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0x3e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xf2, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0x3f, 0x21, 0x57, 0x54, 0x79, 0x37, 0xb3, 0x59, 0x52, 0x00, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0x3e, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xac, 0xf2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(253); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0x3c, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x04, 0xc5, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0x3f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x5d, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0x3c, 0x21, 0x57, 0x54, 0x79, 0x31, 0xb2, 0x59, 0x04, 0xc5, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0x3f, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x68, 0x5d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(255); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0x3d, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xba, 0x42, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0x3c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0x3d, 0x21, 0x57, 0x54, 0x79, 0x3f, 0xb2, 0x59, 0xba, 0x42, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0x3c, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x29, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(257); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xc2, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x49, 0xfb, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0x3d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x22, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xc2, 0x21, 0x57, 0x54, 0x79, 0x3e, 0xbd, 0x59, 0x49, 0xfb, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0x3d, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf1, 0x22, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(259); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xc3, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xe5, 0x3c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xc2, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x2a, 0x87, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xc3, 0x21, 0x57, 0x54, 0x79, 0x39, 0xb2, 0x59, 0xe5, 0x3c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xc2, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x2a, 0x87, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(261); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xc0, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x36, 0x69, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xc3, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xee, 0x28, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xc0, 0x21, 0x57, 0x54, 0x79, 0x38, 0xb3, 0x59, 0x36, 0x69, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xc3, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xee, 0x28, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(263); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xc1, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0xf9, 0x8e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xc0, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xaf, 0xd2, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xc1, 0x21, 0x57, 0x54, 0x79, 0x3b, 0xb2, 0x59, 0xf9, 0x8e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xc0, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xaf, 0xd2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(265); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xc6, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0x5e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xc1, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x77, 0x57, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xc6, 0x21, 0x57, 0x54, 0x79, 0x3a, 0xb2, 0x59, 0x49, 0x5e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xc1, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x77, 0x57, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(267); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xc7, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x75, 0x04, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xc6, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x30, 0x0c, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xc7, 0x21, 0x57, 0x54, 0x79, 0x26, 0xb3, 0x59, 0x75, 0x04, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xc6, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x30, 0x0c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(269); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xc4, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x9d, 0x58, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xc7, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf4, 0xa3, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xc4, 0x21, 0x57, 0x54, 0x79, 0x21, 0xba, 0x59, 0x9d, 0x58, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xc7, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xf4, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(271); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xc5, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x69, 0x8c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xc4, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb5, 0x59, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xc5, 0x21, 0x57, 0x54, 0x79, 0x20, 0xb8, 0x59, 0x69, 0x8c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xc4, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xb5, 0x59, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(273); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xca, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x15, 0x87, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xc5, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x6d, 0xdc, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xca, 0x21, 0x57, 0x54, 0x79, 0x23, 0x9e, 0x58, 0x15, 0x87, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xc5, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x6d, 0xdc, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(275); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xcb, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x7b, 0x45, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xca, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x27, 0xc5, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xcb, 0x21, 0x57, 0x54, 0x79, 0x22, 0xb3, 0x59, 0x7b, 0x45, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xca, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x27, 0xc5, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(277); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xc8, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x14, 0x45, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xcb, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe3, 0x6a, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xc8, 0x21, 0x57, 0x54, 0x79, 0x2d, 0xea, 0x5b, 0x14, 0x45, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xcb, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xe3, 0x6a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(279); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xc9, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x4e, 0x5c, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xc8, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa2, 0x90, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xc9, 0x21, 0x57, 0x54, 0x79, 0x14, 0x4d, 0x59, 0x4e, 0x5c, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xc8, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0xa2, 0x90, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(281); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xce, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0xe9, 0x4e, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xc9, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7a, 0x15, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xce, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0xe9, 0x4e, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xc9, 0xa1, 0x57, 0x54, 0x79, 0x2d, 0x7a, 0x15, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(283); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xcf, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x30, 0xcf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xce, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x20, 0xb3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xcf, 0x21, 0x57, 0x54, 0x7f, 0x7d, 0x31, 0xf2, 0x30, 0xcf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xce, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x20, 0xb3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(285); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xcc, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x6c, 0x00, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xcf, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xe4, 0x1c, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xcc, 0x21, 0x57, 0x54, 0x7f, 0x14, 0xa0, 0x6c, 0x00, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xcf, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xe4, 0x1c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(287); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xcd, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x4c, 0x8f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xcc, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xa5, 0xe6, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xcd, 0x21, 0x57, 0x54, 0x7f, 0x16, 0x82, 0x4c, 0x8f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xcc, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0xa5, 0xe6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(289); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xd2, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x84, 0xfe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xcd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x7d, 0x5d, 0x63, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xd2, 0x21, 0x57, 0x54, 0x28, 0x14, 0xb6, 0x58, 0x93, 0x4a, 0x25, 0xab, 0x54, 0x92, 0x49, 0x9c, 0x4e, 0x84, 0xfe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xcd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x7d, 0x5d, 0x63, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(291); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xd3, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x33, 0x57, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xd2, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0x0d, 0x8d, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xd3, 0x21, 0x57, 0x54, 0x28, 0xe7, 0xbc, 0xf8, 0xf0, 0x4a, 0x25, 0xab, 0x54, 0xb3, 0x49, 0xbd, 0x4e, 0x33, 0x57, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xd2, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0x0d, 0x8d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(293); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xd0, 0x21, 0x57, 0x54, 0x3d, 0x7d, 0x5d, 0x3b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xd3, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0xc9, 0x22, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xd0, 0x21, 0x57, 0x54, 0x3d, 0x7d, 0x5d, 0x3b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xd3, 0xa1, 0x57, 0x54, 0x28, 0x2d, 0xc9, 0x22, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(295); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xd1, 0x21, 0x57, 0x54, 0x3d, 0x05, 0xaf, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xd0, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0xbd, 0x92, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xd1, 0x21, 0x57, 0x54, 0x3d, 0x05, 0xaf, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xd0, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0xbd, 0x92, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(297); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xd6, 0x21, 0x57, 0x54, 0x32, 0x93, 0xa8, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xd1, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x65, 0x17, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xd6, 0x21, 0x57, 0x54, 0x32, 0x93, 0xa8, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xd1, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x65, 0x17, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(299); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xd7, 0x21, 0x57, 0x54, 0x32, 0xed, 0x9d, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xd6, 0xa1, 0x57, 0x54, 0x32, 0x17, 0x6c, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xd7, 0x21, 0x57, 0x54, 0x32, 0xed, 0x9d, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xd6, 0xa1, 0x57, 0x54, 0x32, 0x17, 0x6c, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(301); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x67, 0xd4, 0x21, 0x57, 0x54, 0x32, 0x69, 0x63, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xd7, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xa8, 0x08, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x67, 0xd4, 0x21, 0x57, 0x54, 0x32, 0x69, 0x63, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xd7, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xa8, 0x08, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(303); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x70, 0xd5, 0x21, 0x57, 0x54, 0x3d, 0xe0, 0x7d, 0x38, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x77, 0xd4, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xe9, 0xf2, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x70, 0xd5, 0x21, 0x57, 0x54, 0x3d, 0xe0, 0x7d, 0x38, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x77, 0xd4, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xe9, 0xf2, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(305); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x01, 0xda, 0x21, 0x57, 0x54, 0x3d, 0x85, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x00, 0xd5, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x7f, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x01, 0xda, 0x21, 0x57, 0x54, 0x3d, 0x85, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x00, 0xd5, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x7f, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(307); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x12, 0xdb, 0x21, 0x57, 0x54, 0x32, 0x0a, 0x07, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xda, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x35, 0x85, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x12, 0xdb, 0x21, 0x57, 0x54, 0x32, 0x0a, 0x07, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xda, 0xa1, 0x57, 0x54, 0x3d, 0x65, 0x35, 0x85, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(309); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x23, 0xd8, 0x21, 0x57, 0x54, 0x32, 0x8e, 0xf9, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x22, 0xdb, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xbf, 0xc1, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x23, 0xd8, 0x21, 0x57, 0x54, 0x32, 0x8e, 0xf9, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x22, 0xdb, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xbf, 0xc1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(311); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x34, 0xd9, 0x21, 0x57, 0x54, 0x0a, 0x41, 0x36, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x33, 0xd8, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xfe, 0x3b, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + stageExpectedTransitions.push_back({0x34, 0xd9, 0x21, 0x57, 0x54, 0x0a, 0x41, 0x36, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x33, 0xd8, 0xa1, 0x57, 0x54, 0x32, 0x17, 0xfe, 0x3b, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(313); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x45, 0xde, 0x21, 0x57, 0x54, 0x32, 0x91, 0x85, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x44, 0xd9, 0xa1, 0x57, 0x54, 0x0a, 0x15, 0x8a, 0xc0, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x45, 0xde, 0x21, 0x57, 0x54, 0x32, 0x91, 0x85, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x44, 0xd9, 0xa1, 0x57, 0x54, 0x0a, 0x15, 0x8a, 0xc0, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(315); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x56, 0xdf, 0x21, 0x57, 0x54, 0x32, 0xef, 0xb0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x55, 0xde, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0x01, 0x23, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x56, 0xdf, 0x21, 0x57, 0x54, 0x32, 0xef, 0xb0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x55, 0xde, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0x01, 0x23, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(317); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x66, 0xdf, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0xc5, 0x8c, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x66, 0xdf, 0xa1, 0x57, 0x54, 0x32, 0x7d, 0x31, 0xc5, 0x8c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(318); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x60, 0xdc, 0x21, 0x57, 0x54, 0x32, 0xa3, 0x0f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x76, 0xdf, 0xb1, 0x57, 0x54, 0x33, 0x84, 0x16, 0x80, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x60, 0xdc, 0x21, 0x57, 0x54, 0x32, 0xa3, 0x0f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x76, 0xdf, 0xb1, 0x57, 0x54, 0x33, 0x84, 0x16, 0x80, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(320); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x71, 0xdd, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x4f, 0x06, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x07, 0xdc, 0xa1, 0x57, 0x54, 0x32, 0x15, 0x40, 0x93, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x71, 0xdd, 0x21, 0x57, 0x54, 0x7f, 0x15, 0xb3, 0x4f, 0x06, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x07, 0xdc, 0xa1, 0x57, 0x54, 0x32, 0x15, 0x40, 0x93, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(322); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x02, 0xe2, 0x21, 0x57, 0x54, 0x7f, 0x10, 0xe2, 0x51, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x10, 0xdd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x50, 0x9c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x02, 0xe2, 0x21, 0x57, 0x54, 0x7f, 0x10, 0xe2, 0x51, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x10, 0xdd, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x50, 0x9c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(324); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); /* Note: stage 325->326 is directly coded inside class GPRecvSensorMeasurementTest above, it is not using the raw buffer automatic comparison trigger-based transition matching */ stageExpectedTransitions.push_back({}); /* Add an empty cell in the expected transitions (won't be used for comparison, but is required to get the stage indexes right in the next lines) */ - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xe2, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5b, 0xff, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xe2, 0xa1, 0x57, 0x54, 0x7f, 0x15, 0x5b, 0xff, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(326); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); /* Note: stage 327->328 is directly coded inside class GPRecvSensorMeasurementTest above, it is not using the raw buffer automatic comparison trigger-based transition matching */ stageExpectedTransitions.push_back({}); /* Add an empty cell in the expected transitions (won't be used for comparison, but is required to get the stage indexes right in the next lines) */ - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x32, 0xe3, 0xa1, 0x57, 0x54, 0x42, 0x15, 0x82, 0x6f, 0x7e }))); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x32, 0xe3, 0xa1, 0x57, 0x54, 0x42, 0x15, 0x82, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(328); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(331); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(333); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(335); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + stageExpectedTransitions.push_back({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(337); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x72, 0xe5, 0x21, 0x57, 0x54, 0x40, 0x16, 0xa6, 0xb3, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x17, 0xe4, 0xa1, 0x57, 0x54, 0x0c, 0xd1, 0x87, 0x6b, 0x6a, 0xb5, 0xba, 0x57, 0xc5, 0xb3, 0x8e, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + stageExpectedTransitions.push_back({0x72, 0xe5, 0x21, 0x57, 0x54, 0x40, 0x16, 0xa6, 0xb3, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x17, 0xe4, 0xa1, 0x57, 0x54, 0x0c, 0xd1, 0x87, 0x6b, 0x6a, 0xb5, 0xba, 0x57, 0xc5, 0xb3, 0x8e, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(339); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x03, 0xea, 0x21, 0x57, 0x54, 0x60, 0x15, 0x69, 0x35, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x20, 0xe5, 0xa1, 0x57, 0x54, 0x40, 0x15, 0xb1, 0x59, 0x97, 0x14, 0x5a, 0xc6, 0xf9, 0x9f, 0x59, 0xcf, 0xee, 0x84, 0x4d, 0xcc, 0x5f, 0x69, 0x6a, 0xe0, 0x3a, 0x61, 0x89, 0xfc, 0x7d, 0x5e, 0x3f, 0xa7, 0xeb, 0xcd, 0xde, 0x6f, 0x8f, 0xff, 0xc7, 0xdb, 0xd5, 0xd2, 0x69, 0x71, 0x7d, 0x31, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + stageExpectedTransitions.push_back({0x03, 0xea, 0x21, 0x57, 0x54, 0x60, 0x15, 0x69, 0x35, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x20, 0xe5, 0xa1, 0x57, 0x54, 0x40, 0x15, 0xb1, 0x59, 0x97, 0x14, 0x5a, 0xc6, 0xf9, 0x9f, 0x59, 0xcf, 0xee, 0x84, 0x4d, 0xcc, 0x5f, 0x69, 0x6a, 0xe0, 0x3a, 0x61, 0x89, 0xfc, 0x7d, 0x5e, 0x3f, 0xa7, 0xeb, 0xcd, 0xde, 0x6f, 0x8f, 0xff, 0xc7, 0xdb, 0xd5, 0xd2, 0x69, 0x71, 0x7d, 0x31, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(341); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xa1, 0x57, 0x54, 0x60, 0x86, 0x33, 0x2e, 0x94, 0x4a, 0x24, 0xda, 0x55, 0x62, 0x4f, 0x9c, 0x4e, 0x2b, 0x93, 0xed, 0xe6, 0xc6, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xa1, 0x57, 0x54, 0x60, 0x86, 0x33, 0x2e, 0x94, 0x4a, 0x24, 0xda, 0x55, 0x62, 0x4f, 0x9c, 0x4e, 0x2b, 0x93, 0xed, 0xe6, 0xc6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(342); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0x15, 0x7d, 0x33, 0x4d, 0xa6, 0x94, 0x4a, 0x7d, 0x33, 0xaa, 0x54, 0x92, 0x49, 0x99, 0x4e, 0x27, 0xa1, 0xed, 0xce, 0x67, 0x1d, 0xdd, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0x15, 0x7d, 0x33, 0x4d, 0xa6, 0x94, 0x4a, 0x7d, 0x33, 0xaa, 0x54, 0x92, 0x49, 0x99, 0x4e, 0x27, 0xa1, 0xed, 0xce, 0x67, 0x1d, 0xdd, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(343); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd2, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x00, 0x30, 0xc2, 0x63, 0x29, 0xf7, 0x2d, 0xa6, 0x35, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x10, 0xf3, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd2, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x00, 0x30, 0xc2, 0x63, 0x29, 0xf7, 0x2d, 0xa6, 0x35, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x10, 0xf3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(344); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd5, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x07, 0x30, 0xc2, 0x63, 0x29, 0x98, 0xd8, 0x54, 0x9a, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x35, 0xc4, 0x15, 0x72, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd5, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x07, 0x30, 0xc2, 0x63, 0x29, 0x98, 0xd8, 0x54, 0x9a, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x35, 0xc4, 0x15, 0x72, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(345); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x35, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe7, 0x7b, 0xc5, 0x63, 0x29, 0x61, 0x6f, 0x89, 0x03, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9b, 0x16, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x35, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe7, 0x7b, 0xc5, 0x63, 0x29, 0x61, 0x6f, 0x89, 0x03, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9b, 0x16, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(346); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x3f, 0xf2, 0x94, 0x48, 0x25, 0xfb, 0x54, 0x90, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x20, 0x2d, 0xc2, 0x63, 0x29, 0xc3, 0xda, 0xbe, 0x01, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0xa1, 0xda, 0xe6, 0xe6, 0x7e }))); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x3f, 0xf2, 0x94, 0x48, 0x25, 0xfb, 0x54, 0x90, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x20, 0x2d, 0xc2, 0x63, 0x29, 0xc3, 0xda, 0xbe, 0x01, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0xa1, 0xda, 0xe6, 0xe6, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(347); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd7, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x05, 0x30, 0xc2, 0x63, 0x29, 0x8e, 0x2d, 0x37, 0xda, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x30, 0xc4, 0xf0, 0x6c, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd7, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x05, 0x30, 0xc2, 0x63, 0x29, 0x8e, 0x2d, 0x37, 0xda, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x30, 0xc4, 0xf0, 0x6c, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(348); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x28, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xfa, 0x7b, 0xc5, 0x63, 0x29, 0xaf, 0xba, 0xab, 0x67, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x36, 0x3a, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x28, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xfa, 0x7b, 0xc5, 0x63, 0x29, 0xaf, 0xba, 0xab, 0x67, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x36, 0x3a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(349); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x34, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe6, 0x7b, 0xc5, 0x63, 0x29, 0x5d, 0x1f, 0x36, 0x6d, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9c, 0xd8, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x34, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe6, 0x7b, 0xc5, 0x63, 0x29, 0x5d, 0x1f, 0x36, 0x6d, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x9c, 0xd8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(350); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd6, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x04, 0x30, 0xc2, 0x63, 0x29, 0x8f, 0x49, 0xdb, 0x2f, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x8c, 0x2a, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xd6, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x04, 0x30, 0xc2, 0x63, 0x29, 0x8f, 0x49, 0xdb, 0x2f, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xcc, 0xde, 0x8c, 0x2a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(351); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2b, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf9, 0x7b, 0xc5, 0x63, 0x29, 0x41, 0xca, 0x70, 0x14, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x7d, 0x33, 0x9a, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2b, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf9, 0x7b, 0xc5, 0x63, 0x29, 0x41, 0xca, 0x70, 0x14, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x7d, 0x33, 0x9a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(352); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x67, 0x37, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe5, 0x7b, 0xc5, 0x63, 0x29, 0xa3, 0x70, 0x6c, 0x24, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x5a, 0x0d, 0x7e }))); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x67, 0x37, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe5, 0x7b, 0xc5, 0x63, 0x29, 0xa3, 0x70, 0x6c, 0x24, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0x5a, 0x0d, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(353); - stageExpectedTransitions.push_back(std::vector({0x80, 0x70, 0x78, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x81, 0x60, 0x59, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdd, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0f, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x38, 0xa9, 0x7d, 0x3a, 0x7d, 0x38, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x62, 0x0f, 0x7e, 0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdc, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0e, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0xfd, 0x23, 0x4c, 0x9b, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x25, 0xda, 0x7d, 0x31, 0x6f, 0x7e }))); + stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); + stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x71, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdd, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0f, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x38, 0xa9, 0x7d, 0x3a, 0x7d, 0x38, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x62, 0x0f, 0x7e, 0x01, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdc, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0e, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0xfd, 0x23, 0x4c, 0x9b, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x25, 0xda, 0x7d, 0x31, 0x6f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(355); - stageExpectedTransitions.push_back(std::vector({0x82, 0x50, 0x3a, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xc8, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x7d, 0x3a, 0x30, 0xc2, 0x63, 0x29, 0xc5, 0x7c, 0xd6, 0x0d, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc3, 0xde, 0xc7, 0xf4, 0x7e }))); + stageExpectedTransitions.push_back({0x82, 0x50, 0x3a, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x7d, 0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xc8, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x7d, 0x3a, 0x30, 0xc2, 0x63, 0x29, 0xc5, 0x7c, 0xd6, 0x0d, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc3, 0xde, 0xc7, 0xf4, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(356); - stageExpectedTransitions.push_back(std::vector({0x83, 0x40, 0x1b, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xcb, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x19, 0x30, 0xc2, 0x63, 0x29, 0xb4, 0x30, 0x8c, 0xb4, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x33, 0xc4, 0x34, 0x48, 0x7e }))); + stageExpectedTransitions.push_back({0x83, 0x40, 0x1b, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x21, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x60, 0xcb, 0x94, 0x49, 0x25, 0xfb, 0x54, 0x91, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x19, 0x30, 0xc2, 0x63, 0x29, 0xb4, 0x30, 0x8c, 0xb4, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x33, 0xc4, 0x34, 0x48, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(357); - stageExpectedTransitions.push_back(std::vector({0x84, 0x30, 0xfc, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2a, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf8, 0x7b, 0xc5, 0x63, 0x29, 0xdd, 0xb9, 0x2b, 0xe3, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x93, 0x35, 0x7e }))); + stageExpectedTransitions.push_back({0x84, 0x30, 0xfc, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x31, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x2a, 0x94, 0x4c, 0x25, 0xfb, 0x54, 0x94, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xf8, 0x7b, 0xc5, 0x63, 0x29, 0xdd, 0xb9, 0x2b, 0xe3, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xdb, 0x93, 0x35, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(358); - stageExpectedTransitions.push_back(std::vector({0x85, 0x20, 0xdd, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x36, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe4, 0x7b, 0xc5, 0x63, 0x29, 0x45, 0xfa, 0x80, 0x85, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0xab, 0xb1, 0x7e }))); + stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x41, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x66, 0x36, 0x94, 0x4d, 0x25, 0xfb, 0x54, 0x95, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0xe4, 0x7b, 0xc5, 0x63, 0x29, 0x45, 0xfa, 0x80, 0x85, 0x14, 0xcb, 0xd1, 0x6f, 0xda, 0xff, 0xd7, 0xda, 0xab, 0xb1, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(359); - stageExpectedTransitions.push_back(std::vector({0x86, 0x10, 0xbe, 0x7e })); - stageExpectedTransitions.push_back(std::vector({0x87, 0x00, 0x9f, 0x7e })); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery(std::vector({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdf, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0d, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x19, 0x0c, 0xa3, 0xa5, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x88, 0x16, 0x7e, 0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xde, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0c, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x50, 0x67, 0xd6, 0xf1, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x23, 0xda, 0x5d, 0xf8, 0x7e }))); + stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); + stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x51, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x62, 0xdf, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0d, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x19, 0x0c, 0xa3, 0xa5, 0x14, 0xca, 0xdc, 0x6b, 0x8f, 0xff, 0xee, 0xc0, 0xde, 0x88, 0x16, 0x7e, 0x61, 0xea, 0xb1, 0x57, 0x54, 0xef, 0x6a, 0x63, 0xde, 0x94, 0x4b, 0x25, 0xfb, 0x54, 0x93, 0x49, 0xcd, 0x4f, 0x94, 0xa9, 0xec, 0xce, 0x66, 0x0c, 0x7d, 0x31, 0xc5, 0x63, 0x29, 0x50, 0x67, 0xd6, 0xf1, 0x14, 0xca, 0xdb, 0x6b, 0x8f, 0xff, 0xe6, 0x23, 0xda, 0x5d, 0xf8, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(361); From f16deb51604afe342281b5c8b10a945e6d520dfe Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 09:49:19 +0100 Subject: [PATCH 033/413] [CR fbb79b3769ddf] fix issue #12 --- example/CAppDemo.cpp | 6 ++++-- example/CAppDemo.h | 2 +- src/ezsp/green-power-observer.h | 17 +++++++++++++++-- src/ezsp/zigbee-tools/green-power-sink.cpp | 12 +++++++++--- src/ezsp/zigbee-tools/green-power-sink.h | 2 +- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/example/CAppDemo.cpp b/example/CAppDemo.cpp index aedcf619..9f406a18 100644 --- a/example/CAppDemo.cpp +++ b/example/CAppDemo.cpp @@ -203,10 +203,12 @@ bool CAppDemo::extractMultiClusterReport( std::vector payload ) return validBuffer; } -void CAppDemo::handleRxGpdId( uint32_t &i_gpd_id ) +void CAppDemo::handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ) { // Start DEBUG - clogI << "CAppDemo::handleRxGpdId : 0x" << std::hex << std::setw(4) << std::setfill('0') << unsigned(i_gpd_id) << std::endl; + clogI << "CAppDemo::handleRxGpdId sourcedId: 0x" << std::hex << std::setw(4) << std::setfill('0') << unsigned(i_gpd_id) << + ", known: " << (i_gpd_known?"true":"false") << ", key status: " << std::hex << std::setw(2) << std::setfill('0') << unsigned(i_gpd_key_status) << + std::endl ; // Stop DEBUG } diff --git a/example/CAppDemo.h b/example/CAppDemo.h index 626008b1..5503e3af 100644 --- a/example/CAppDemo.h +++ b/example/CAppDemo.h @@ -50,7 +50,7 @@ class CAppDemo : public CEzspDongleObserver, CGpObserver void handleDongleState( EDongleState i_state ); void handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_receive ); void handleRxGpFrame( CGpFrame &i_gpf ); - void handleRxGpdId( uint32_t &i_gpd_id ); + void handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ); private: void setAppState( EAppState i_state ); diff --git a/src/ezsp/green-power-observer.h b/src/ezsp/green-power-observer.h index 039fe4d2..546edfab 100644 --- a/src/ezsp/green-power-observer.h +++ b/src/ezsp/green-power-observer.h @@ -5,8 +5,19 @@ */ #pragma once +#include + #include "zbmessage/green-power-frame.h" +/** + * @brief enumetion for possible status of a gpd key from an incomming gpd + */ +enum class CGpdKeyStatus { + Valid, /* i_msg_re // build gpf frame from ezsp rx message CGpFrame gpf = CGpFrame(i_msg_receive); - notifyObserversOfRxGpdId(gpf.getSourceId()); + + // notify + CGpdKeyStatus l_key_status = CGpdKeyStatus::Undefined; + if( EEmberStatus::EMBER_SUCCESS == l_status ){ l_key_status = CGpdKeyStatus::Valid; } + else if( 0x7E == l_status ){ l_key_status = CGpdKeyStatus::Invalid; } + else{ l_key_status = CGpdKeyStatus::Undefined; } + notifyObserversOfRxGpdId(gpf.getSourceId(), (gpf.getProxyTableEntry()!=0xFF?true:false), l_key_status); clogD << "EZSP_GPEP_INCOMING_MESSAGE_HANDLER status : " << CEzspEnum::EEmberStatusToString(l_status) << ", link : " << unsigned(i_msg_receive.at(1)) << @@ -602,9 +608,9 @@ void CGpSink::notifyObserversOfRxGpFrame( CGpFrame i_gpf ) { } } -void CGpSink::notifyObserversOfRxGpdId( uint32_t i_gpd_id ) { +void CGpSink::notifyObserversOfRxGpdId( uint32_t i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ) { for(auto observer : this->observers) { - observer->handleRxGpdId( i_gpd_id ); + observer->handleRxGpdId( i_gpd_id, i_gpd_known, i_gpd_key_status ); } } diff --git a/src/ezsp/zigbee-tools/green-power-sink.h b/src/ezsp/zigbee-tools/green-power-sink.h index 1bf346d4..14b33ba7 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.h +++ b/src/ezsp/zigbee-tools/green-power-sink.h @@ -131,7 +131,7 @@ class CGpSink : public CEzspDongleObserver * * @param i_gpd_id The received GPD Id frame */ - void notifyObserversOfRxGpdId( uint32_t i_gpd_id ); + void notifyObserversOfRxGpdId( uint32_t i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ); /** * @brief Private utility function to manage error state From 416d47b0918c3dcd123cf11a7aeb97100c76139d Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 09:52:22 +0100 Subject: [PATCH 034/413] [CR 9b42ca6b8e] fix missing include file (ILogger) --- src/spi/ILogger.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spi/ILogger.h b/src/spi/ILogger.h index 9521dde1..9e394bed 100644 --- a/src/spi/ILogger.h +++ b/src/spi/ILogger.h @@ -98,6 +98,7 @@ #include #include #include +#include #ifdef USE_RARITAN /**** Start of the official API; no includes below this point! ***************/ From 012590f434b435fff161030ed7967ee7877f3699 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 10:29:25 +0100 Subject: [PATCH 035/413] [CR 8410b7387] add a new class as a new entry point of library --- src/ezsp/CMakeLists.txt | 1 + src/ezsp/lib-ezsp-main.cpp | 57 ++++++++++++++++++++++++++ src/ezsp/lib-ezsp-main.h | 63 +++++++++++++++++++++++++++++ src/libezsp.mk.inc | 1 + src/spi/ILogger.h | 83 +++++++++++++++++++------------------- src/spi/Logger.cpp | 4 ++ 6 files changed, 167 insertions(+), 42 deletions(-) create mode 100644 src/ezsp/lib-ezsp-main.cpp create mode 100644 src/ezsp/lib-ezsp-main.h diff --git a/src/ezsp/CMakeLists.txt b/src/ezsp/CMakeLists.txt index 79a1e0e0..ec51b3e1 100644 --- a/src/ezsp/CMakeLists.txt +++ b/src/ezsp/CMakeLists.txt @@ -1,5 +1,6 @@ set(ezsp_SOURCES) list(APPEND ezsp_SOURCES + lib-ezsp-main.cpp ash.cpp custom-aes.cpp ezsp-dongle.cpp diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp new file mode 100644 index 00000000..ef82c575 --- /dev/null +++ b/src/ezsp/lib-ezsp-main.cpp @@ -0,0 +1,57 @@ +/** + * @file lib-ezsp-main.cpp + */ + +#include "ezsp/lib-ezsp-main.h" +#include "spi/ILogger.h" + + +CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, + TimerBuilder &i_timer_factory) : + lib_state(CLibEzspState::NO_INIT), + timer(i_timer_factory.create()), + dongle(i_timer_factory, this), + zb_messaging(dongle, i_timer_factory), + zb_nwk(dongle, zb_messaging), + gp_sink(dongle, zb_messaging) +{ + setState(CLibEzspState::INIT_FAILED); + + // uart + if( dongle.open(uartDriver) ) { + clogI << "CLibEzspMain open success !" << std::endl; + dongle.registerObserver(this); + gp_sink.registerObserver(this); + setState(CLibEzspState::INIT_IN_PROGRESS); + } +} + + +void CLibEzspMain::setState( CLibEzspState i_new_state ) +{ + lib_state=i_new_state; + /* \todo inform observe of state changed */ +} + +/** + * Oberver handlers + */ +void CLibEzspMain::handleDongleState( EDongleState i_state ) +{ + +} + +void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_receive ) +{ + +} + +void CLibEzspMain::handleRxGpFrame( CGpFrame &i_gpf ) +{ + +} + +void CLibEzspMain::handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ) +{ + +} diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h new file mode 100644 index 00000000..a971506f --- /dev/null +++ b/src/ezsp/lib-ezsp-main.h @@ -0,0 +1,63 @@ +/** + * @file lib-ezsp-main.h + * + * @brief Main entry point for drive lib ezsp + */ + +#pragma once + +#include "spi/IUartDriver.h" +#include "spi/TimerBuilder.h" + +#include "ezsp/ezsp-dongle.h" +#include "ezsp/zigbee-tools/zigbee-networking.h" +#include "ezsp/zigbee-tools/zigbee-messaging.h" +#include "ezsp/zigbee-tools/green-power-sink.h" +#include "ezsp/zbmessage/green-power-device.h" + +#include "ezsp/ezsp-dongle-observer.h" +#include "ezsp/green-power-observer.h" + + +/** + * @brief enumetion for possible status of a gpd key from an incomming gpd + */ +enum class CLibEzspState { + NO_INIT, /* timer; + CEzspDongle dongle; + CZigbeeMessaging zb_messaging; + CZigbeeNetworking zb_nwk; + CGpSink gp_sink; + + void setState( CLibEzspState i_new_state ); + + /** + * Oberver handlers + */ + void handleDongleState( EDongleState i_state ); + void handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_receive ); + void handleRxGpFrame( CGpFrame &i_gpf ); + void handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ); +}; diff --git a/src/libezsp.mk.inc b/src/libezsp.mk.inc index a75553b5..3336f937 100644 --- a/src/libezsp.mk.inc +++ b/src/libezsp.mk.inc @@ -1,4 +1,5 @@ LIBEZSP_COMMON_SRC = \ + $(SRC_DOMAIN_PATH)/lib-ezsp-main.cpp \ $(SRC_DOMAIN_PATH)/ezsp-dongle.cpp \ $(SRC_DOMAIN_PATH)/ash.cpp \ $(SRC_DOMAIN_PATH)/custom-aes.cpp \ diff --git a/src/spi/ILogger.h b/src/spi/ILogger.h index 9e394bed..8680b05f 100644 --- a/src/spi/ILogger.h +++ b/src/spi/ILogger.h @@ -46,48 +46,6 @@ #define plogD SINGLETON_LOGGER_CLASS_NAME::getInstance().debugLogger.log /** @} */ -/** - * @defgroup ostream_compat_logger_macros ostream-style logging functions - * - * The defines below allow to log directly through an ostream - * - * clog is a default logger stream - * clogE is the error logger stream - * thus - * @code - * clogE << "Error!"; - * @endcode - * is equivalent to - * @code - * plogE("Error"); - * @endcode - * - * @{ - */ - -/** - * @brief Generic logger getter (uses debug level) - */ -#define clog ILogger::loggerDebugStream -/** - * @brief Error logger getter - */ -#define clogE ILogger::loggerErrorStream -/** - * @brief Warning logger getter - */ -#define clogW ILogger::loggerWarningStream -/** - * @brief Info logger getter - */ -#define clogI ILogger::loggerInfoStream -/** - * @brief Debug logger getter - */ -#define clogD ILogger::loggerDebugStream -/** @} */ - - /* Note: we are not using pragma once here because we want the defines above to be applied even if include is done multiple times * The code below, however, will be include once, so it is "manually" protected from multiple includes using an #ifdef directive */ @@ -360,4 +318,45 @@ class ILogger { #include #endif // USE_RARITAN +/** + * @defgroup ostream_compat_logger_macros ostream-style logging functions + * + * The defines below allow to log directly through an ostream + * + * clog is a default logger stream + * clogE is the error logger stream + * thus + * @code + * clogE << "Error!"; + * @endcode + * is equivalent to + * @code + * plogE("Error"); + * @endcode + * + * @{ + */ + +/** + * @brief Generic logger getter (uses debug level) + */ +#define clog ILogger::loggerDebugStream +/** + * @brief Error logger getter + */ +#define clogE ILogger::loggerErrorStream +/** + * @brief Warning logger getter + */ +#define clogW ILogger::loggerWarningStream +/** + * @brief Info logger getter + */ +#define clogI ILogger::loggerInfoStream +/** + * @brief Debug logger getter + */ +#define clogD ILogger::loggerDebugStream +/** @} */ + #endif // __ILOGGER_H__ diff --git a/src/spi/Logger.cpp b/src/spi/Logger.cpp index 10ac91a4..66ab58a4 100644 --- a/src/spi/Logger.cpp +++ b/src/spi/Logger.cpp @@ -1,3 +1,5 @@ +#ifndef __LOGGER_H__ + #include "spi/Logger.h" #ifdef USE_RARITAN #include "spi/raritan/RaritanLogger.h" @@ -22,3 +24,5 @@ ILogger& Logger::getInstance() }(); return *mInstance; } + +#endif From a8b659cb4ddcd68b74c1a499167d6fc7822bc9be Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 10:35:52 +0100 Subject: [PATCH 036/413] [CR edf7c930e83a9] add lambda function to monitor state of library --- src/ezsp/lib-ezsp-main.cpp | 5 +++++ src/ezsp/lib-ezsp-main.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index ef82c575..a79464e6 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -9,6 +9,7 @@ CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, TimerBuilder &i_timer_factory) : lib_state(CLibEzspState::NO_INIT), + obsStateCallback(nullptr), timer(i_timer_factory.create()), dongle(i_timer_factory, this), zb_messaging(dongle, i_timer_factory), @@ -31,6 +32,10 @@ void CLibEzspMain::setState( CLibEzspState i_new_state ) { lib_state=i_new_state; /* \todo inform observe of state changed */ + if( nullptr != obsStateCallback ) + { + obsStateCallback(i_new_state); + } } /** diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index a971506f..004e08b4 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -41,10 +41,16 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CLibEzspMain(const CLibEzspMain&) = delete; /* obsStateCallback){this->obsStateCallback=obsStateCallback;} + private: CLibEzspState lib_state; + std::function obsStateCallback; /*!< Callback invoked each time library state change. */ std::unique_ptr timer; CEzspDongle dongle; CZigbeeMessaging zb_messaging; From de6a73aa48310077836ba36ad0e3ebfb518ec9fe Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 10:44:40 +0100 Subject: [PATCH 037/413] [CR 6243f2868f8] adding lambda callback for incomming greenpower sourceId --- src/ezsp/lib-ezsp-main.cpp | 8 ++++++-- src/ezsp/lib-ezsp-main.h | 7 ++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index a79464e6..6ca3b10b 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -14,7 +14,8 @@ CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, dongle(i_timer_factory, this), zb_messaging(dongle, i_timer_factory), zb_nwk(dongle, zb_messaging), - gp_sink(dongle, zb_messaging) + gp_sink(dongle, zb_messaging), + obsGPSourceIdCallback(nullptr) { setState(CLibEzspState::INIT_FAILED); @@ -58,5 +59,8 @@ void CLibEzspMain::handleRxGpFrame( CGpFrame &i_gpf ) void CLibEzspMain::handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ) { - + if( nullptr != obsGPSourceIdCallback ) + { + obsGPSourceIdCallback(i_gpd_id, i_gpd_known, i_gpd_key_status); + } } diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index 004e08b4..477bca86 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -42,10 +42,14 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CLibEzspMain& operator=(CLibEzspMain) = delete; /* obsStateCallback){this->obsStateCallback=obsStateCallback;} + /** + * @brief Register callback to receive all incomming greenpower sourceId + */ + void registerGPSourceIdCallback(std::function obsGPSourceIdCallback){this->obsGPSourceIdCallback=obsGPSourceIdCallback;} private: @@ -56,6 +60,7 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CZigbeeMessaging zb_messaging; CZigbeeNetworking zb_nwk; CGpSink gp_sink; + std::function obsGPSourceIdCallback; /*!< Callback invoked each a green power message is received. */ void setState( CLibEzspState i_new_state ); From a46c20cf7a73d7ca483c4cac48e31d3adc110072 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 10:53:25 +0100 Subject: [PATCH 038/413] [lib-ezsp-main] add comments about class --- src/ezsp/lib-ezsp-main.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index 477bca86..8c32e084 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -53,14 +53,14 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver private: - CLibEzspState lib_state; - std::function obsStateCallback; /*!< Callback invoked each time library state change. */ - std::unique_ptr timer; - CEzspDongle dongle; - CZigbeeMessaging zb_messaging; - CZigbeeNetworking zb_nwk; - CGpSink gp_sink; - std::function obsGPSourceIdCallback; /*!< Callback invoked each a green power message is received. */ + CLibEzspState lib_state; /*!< Current state for our internal state machine */ + std::function obsStateCallback; /*!< Optional user callback invoked by us each time library state change */ + std::unique_ptr timer; /*!< Internal timer */ + CEzspDongle dongle; /*!< Dongle manipulation handler */ + CZigbeeMessaging zb_messaging; /*!< Zigbee messages utility */ + CZigbeeNetworking zb_nwk; /*!< Zigbee networking utility */ + CGpSink gp_sink; /*!< Internal Green Power sink utility */ + std::function obsGPSourceIdCallback; /*!< Optional user callback invoked by us each time a green power message is received */ void setState( CLibEzspState i_new_state ); From 681e7fe4c8aabe4ee4b3615e201dda3d5accb457 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 10:58:31 +0100 Subject: [PATCH 039/413] [CR 153407a7c] Importing state machine code from CAppDemo into lib-ezsp-main --- src/ezsp/lib-ezsp-main.cpp | 368 +++++++++++++++++++++++++++++++++++++ src/ezsp/lib-ezsp-main.h | 4 + 2 files changed, 372 insertions(+) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index 6ca3b10b..8b36d922 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -5,9 +5,12 @@ #include "ezsp/lib-ezsp-main.h" #include "spi/ILogger.h" +#include +#include CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, TimerBuilder &i_timer_factory) : + exp_ezsp_version(6), lib_state(CLibEzspState::NO_INIT), obsStateCallback(nullptr), timer(i_timer_factory.create()), @@ -39,22 +42,387 @@ void CLibEzspMain::setState( CLibEzspState i_new_state ) } } +CLibEzspState CLibEzspMain::getState() const +{ + return lib_state; +} + +void CLibEzspMain::dongleInit(uint8_t ezsp_version) +{ + // first request stack protocol version + std::vector payload; + payload.push_back(ezsp_version); + dongle.sendCommand(EEzspCmd::EZSP_VERSION,payload); +} + +void CLibEzspMain::stackInit() +{ + std::vector l_config; + + l_config.push_back({.id = EZSP_CONFIG_NEIGHBOR_TABLE_SIZE, + .value = 32}); + l_config.push_back({.id = EZSP_CONFIG_APS_UNICAST_MESSAGE_COUNT, + .value = 10}); + l_config.push_back({.id = EZSP_CONFIG_BINDING_TABLE_SIZE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_ADDRESS_TABLE_SIZE, + .value = 64}); + l_config.push_back({.id = EZSP_CONFIG_MULTICAST_TABLE_SIZE, + .value = 8}); + l_config.push_back({.id = EZSP_CONFIG_ROUTE_TABLE_SIZE, + .value = 32}); + l_config.push_back({.id = EZSP_CONFIG_DISCOVERY_TABLE_SIZE, + .value = 16}); + l_config.push_back({.id = EZSP_CONFIG_STACK_PROFILE, + .value = 2}); + l_config.push_back({.id = EZSP_CONFIG_SECURITY_LEVEL, + .value = 5}); + l_config.push_back({.id = EZSP_CONFIG_MAX_HOPS, + .value = 15}); + l_config.push_back({.id = EZSP_CONFIG_MAX_END_DEVICE_CHILDREN, + .value = 32}); // define number of sleepy end device directly attached to dongle + l_config.push_back({.id = EZSP_CONFIG_INDIRECT_TRANSMISSION_TIMEOUT, + .value = 3000}); + l_config.push_back({.id = EZSP_CONFIG_END_DEVICE_POLL_TIMEOUT, + .value = 5}); + l_config.push_back({.id = EZSP_CONFIG_MOBILE_NODE_POLL_TIMEOUT, + .value = 20}); + l_config.push_back({.id = EZSP_CONFIG_RESERVED_MOBILE_CHILD_ENTRIES, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_TX_POWER_MODE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_DISABLE_RELAY, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_SOURCE_ROUTE_TABLE_SIZE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT, + .value = 6}); + l_config.push_back({.id = EZSP_CONFIG_FRAGMENT_WINDOW_SIZE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_FRAGMENT_DELAY_MS, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_KEY_TABLE_SIZE, + .value = 12}); + l_config.push_back({.id = EZSP_CONFIG_APS_ACK_TIMEOUT, + .value = (50*30)+100}); + l_config.push_back({.id = EZSP_CONFIG_BEACON_JITTER_DURATION, + .value = 3}); + l_config.push_back({.id = EZSP_CONFIG_END_DEVICE_BIND_TIMEOUT, + .value = 60}); + l_config.push_back({.id = EZSP_CONFIG_PAN_ID_CONFLICT_REPORT_THRESHOLD, + .value = 1}); + l_config.push_back({.id = EZSP_CONFIG_REQUEST_KEY_TIMEOUT, + .value = 0}); + /*l_config.push_back({.id = EZSP_CONFIG_CERTIFICATE_TABLE_SIZE, + .value = 1});*/ + l_config.push_back({.id = EZSP_CONFIG_APPLICATION_ZDO_FLAGS, + .value =0}); + l_config.push_back({.id = EZSP_CONFIG_BROADCAST_TABLE_SIZE, + .value = 15}); + l_config.push_back({.id = EZSP_CONFIG_MAC_FILTER_TABLE_SIZE, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_SUPPORTED_NETWORKS, + .value = 1}); + l_config.push_back({.id = EZSP_CONFIG_SEND_MULTICASTS_TO_SLEEPY_ADDRESS, + .value = 0}); + l_config.push_back({.id = EZSP_CONFIG_ZLL_GROUP_ADDRESSES, + .value = 0}); + /*l_config.push_back({.id = EZSP_CONFIG_ZLL_RSSI_THRESHOLD, + .value = -128});*/ + l_config.push_back({.id = EZSP_CONFIG_MTORR_FLOW_CONTROL, + .value = 1}); + l_config.push_back({.id = EZSP_CONFIG_RETRY_QUEUE_SIZE, + .value = 8}); + l_config.push_back({.id = EZSP_CONFIG_NEW_BROADCAST_ENTRY_THRESHOLD, + .value = 10}); + l_config.push_back({.id = EZSP_CONFIG_TRANSIENT_KEY_TIMEOUT_S, + .value = 300}); + l_config.push_back({.id = EZSP_CONFIG_BROADCAST_MIN_ACKS_NEEDED, + .value = 1}); + l_config.push_back({.id = EZSP_CONFIG_TC_REJOINS_USING_WELL_KNOWN_KEY_TIMEOUT_S, + .value = 600}); + l_config.push_back({.id = EZSP_CONFIG_PACKET_BUFFER_COUNT, + .value = 0xFF}); // use all remain memory for in/out radio packets + + std::vector l_policy; + l_policy.push_back({.id = EZSP_TRUST_CENTER_POLICY, + .decision = EZSP_ALLOW_PRECONFIGURED_KEY_JOINS}); + l_policy.push_back({.id = EZSP_MESSAGE_CONTENTS_IN_CALLBACK_POLICY, + .decision = EZSP_MESSAGE_TAG_ONLY_IN_CALLBACK}); + l_policy.push_back({.id = EZSP_BINDING_MODIFICATION_POLICY, + .decision = EZSP_CHECK_BINDING_MODIFICATIONS_ARE_VALID_ENDPOINT_CLUSTERS}); + l_policy.push_back({.id = EZSP_POLL_HANDLER_POLICY, + .decision = EZSP_POLL_HANDLER_IGNORE}); + + zb_nwk.stackInit(l_config, l_policy); +} + /** * Oberver handlers */ void CLibEzspMain::handleDongleState( EDongleState i_state ) { + clogI << __func__ << "() => dongleState : " << i_state << "\n"; + if( DONGLE_READY == i_state ) + { + if( CLibEzspState::INIT_IN_PROGRESS == getState() ) + { + dongleInit(this->exp_ezsp_version); + } + } + else if( DONGLE_REMOVE == i_state ) + { + // TODO: manage this ! + clogE << __func__ << " dongle removal is not handled for now\n"; + } } void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_receive ) { + //-- clogD << "CLibEzspMain::handleEzspRxMessage " << CEzspEnum::EEzspCmdToString(i_cmd) << std::endl; + + switch( i_cmd ) + { + case EZSP_STACK_STATUS_HANDLER: + { + EEmberStatus status = static_cast(i_msg_receive.at(0)); + clogI << "CEZSP_STACK_STATUS_HANDLER status : " << CEzspEnum::EEmberStatusToString(status) << std::endl; + if( (EMBER_NETWORK_UP == status) /*&& (false == reset_wanted)*/ ) + { + gp_sink.init(); +/* + // manage green power flags + if (this->openGpCommissionningAtStartup) + { + // If requested to do so, immediately open a GP commissioning session + gp_sink.openCommissioningSession(); + } + else if( gpdList.size() ) + { + gp_sink.registerGpds(gpdList); + } + else if( this->removeAllGpds ) + { + gp_sink.gpClearAllTables(); + this->removeAllGpds = false; + this->gpdToRemove = std::vector(); + } + else if( this->gpdToRemove.size() ) + { + gp_sink.removeGpds(this->gpdToRemove); + this->gpdToRemove = std::vector(); + } + + if(this->authorizeChRqstAnswerTimeout) { + gp_sink.authorizeAnswerToGpfChannelRqst(true); + // start timer + timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); + } + + // manage other flags + if (this->openZigbeeCommissionningAtStartup) { + // If requested to do so, open the zigbee network for a specific duration, so new devices can join + zb_nwk.openNetwork(60); + + // we retrieve network information and key and eui64 of dongle (can be done before) + dongle.sendCommand(EZSP_GET_NETWORK_PARAMETERS); + dongle.sendCommand(EZSP_GET_EUI64); + std::vector l_payload; + l_payload.push_back(EMBER_CURRENT_NETWORK_KEY); + dongle.sendCommand(EZSP_GET_KEY, l_payload); + + // start discover of existing product inside network + zb_nwk.startDiscoverProduct([&](EmberNodeType i_type, EmberEUI64 i_eui64, EmberNodeId i_id){ + clogI << " Is it a new product "; + clogI << "[type : "<< CEzspEnum::EmberNodeTypeToString(i_type) << "]"; + clogI << "[eui64 :"; + for(uint8_t loop=0; loop payload; + payload.push_back(u16_get_lo_u8(i_id)); + payload.push_back(u16_get_hi_u8(i_id)); + + zb_messaging.SendZDOCommand( i_id, ZDP_ACTIVE_EP, payload ); + } + }); + } */ + } + else + { + clogD << "Call EZSP_NETWORK_STATE\n"; + dongle.sendCommand(EZSP_NETWORK_STATE); + } + } + break; + /* + case EZSP_GET_NETWORK_PARAMETERS: + { + CGetNetworkParamtersResponse l_rsp(i_msg_receive); + clogI << l_rsp.String() << std::endl; + } + break; */ + /* + case EZSP_GET_KEY: + { + EEmberStatus l_status = static_cast(i_msg_receive.at(0)); + i_msg_receive.erase(i_msg_receive.begin()); + CEmberKeyStruct l_rsp(i_msg_receive); + clogI << "EZSP_GET_KEY status : " << CEzspEnum::EEmberStatusToString(l_status) << ", " << l_rsp.String() << std::endl; + } + break; */ + /* + case EZSP_GET_EUI64: + { + // put eui64 on database for later use + db.dongleEui64.clear(); + for( uint8_t loop=0; loop exp_ezsp_version ) + { + dongleInit(i_msg_receive.at(0)); + } + if( i_msg_receive.at(0) == exp_ezsp_version ) + { + // all is good + std::stringstream bufDump; + + // protocol + bufDump << std::hex << std::setw(2) << std::setfill('0') << static_cast(i_msg_receive[0]) << "."; + + // type + bufDump << std::hex << std::setw(2) << std::setfill('0') << static_cast(i_msg_receive[1]) << "."; + + // version + uint16_t l_version = dble_u8_to_u16(i_msg_receive[3], i_msg_receive[2]); + bufDump << std::hex << std::setw(2) << std::setfill('0') << static_cast(l_version); + + clogI << "Stack version : " << bufDump.str() << std::endl; + + // configure stack for this application + stackInit(); + } + else + { + clogI << "EZSP version " << std::hex << std::setw(2) << std::setfill('0') << static_cast(i_msg_receive[0]) << " Not supported !" << std::endl; + } + } + break; + /* + case EZSP_NETWORK_STATE: + { + clogI << "CAppDemo::stackInit Return EZSP_NETWORK_STATE : " << unsigned(i_msg_receive.at(0)) << std::endl; + if( EMBER_NO_NETWORK == i_msg_receive.at(0) ) + { + // We create an HA1.2 network on the required channel + if( APP_INIT_IN_PROGRESS == app_state ) + { + clogI << "CAppDemo::stackInit Call formHaNetwork" << std::endl; + zb_nwk.formHaNetwork(static_cast(channel)); + //set new state + setAppState(APP_FORM_NWK_IN_PROGRESS); + reset_wanted = false; + } + } + else + { + if(( APP_INIT_IN_PROGRESS == app_state ) && ( true == reset_wanted )) + { + // leave current network + zb_nwk.leaveNetwork(); + setAppState(APP_LEAVE_IN_PROGRESS); + reset_wanted = false; + } + } + } + break; */ + /* + case EZSP_LEAVE_NETWORK: + { + // set new state as initialized state + setAppState(APP_INIT_IN_PROGRESS); + } + break; */ + /* + case EZSP_INCOMING_MESSAGE_HANDLER: + { + // the most important function where all zigbee incomming message arrive + clogW << "Got an incoming Zigbee message (decoding not yet supported)\n"; + } + break; */ + + default: + { + /* DEBUG VIEW + std::stringstream bufDump; + + for (size_t i =0; i(i_msg_receive[i]) << " "; + } + clogI << "CAppDemo::ezspHandler : " << bufDump.str() << std::endl; + */ + } + break; + } } void CLibEzspMain::handleRxGpFrame( CGpFrame &i_gpf ) { + // Start DEBUG + clogI << "CAppDemo::handleRxGpFrame gp frame : " << i_gpf << std::endl; + // Stop DEBUG + /* + switch(i_gpf.getCommandId()) + { + case 0xa0: // Attribute reporting + { + uint8_t usedBytes; + if (!CAppDemo::extractClusterReport(i_gpf.getPayload(), usedBytes)) + { + clogE << "Failed decoding attribute reporting payload: "; + for (auto i : i_gpf.getPayload()) + { + clogE << std::hex << std::setw(2) << std::setfill('0') << static_cast(i) << " "; + } + } + } + break; + + case 0xa2: // Multi-Cluster Reporting + { + if (!CAppDemo::extractMultiClusterReport(i_gpf.getPayload())) + { + clogE << "Failed to fully decode multi-cluster reporting payload: "; + for (auto i : i_gpf.getPayload()) + { + clogE << std::hex << std::setw(2) << std::setfill('0') << static_cast(i) << " "; + } + } + } + break; + default: + clogW << "Unknown command ID: 0x" << std::hex << std::setw(2) << std::setfill('0') << static_cast(i_gpf.getCommandId()) << "\n"; + break; + }*/ } void CLibEzspMain::handleRxGpdId( uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status ) diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index 8c32e084..6db6176e 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -53,6 +53,7 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver private: + uint8_t exp_ezsp_version; /*!< Expected EZSP version from dongle */ CLibEzspState lib_state; /*!< Current state for our internal state machine */ std::function obsStateCallback; /*!< Optional user callback invoked by us each time library state change */ std::unique_ptr timer; /*!< Internal timer */ @@ -63,6 +64,9 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver std::function obsGPSourceIdCallback; /*!< Optional user callback invoked by us each time a green power message is received */ void setState( CLibEzspState i_new_state ); + CLibEzspState getState() const; + void dongleInit( uint8_t ezsp_version); + void stackInit(); /** * Oberver handlers From 6db717a62bf9cf7050d58414b11d93e7944b5e07 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 11:33:31 +0100 Subject: [PATCH 040/413] [build] add tests support into CMake --- CMakeLists.txt | 1 + src/spi/mock-uart/MockUartDriver.h | 6 ++- tests/CMakeLists.txt | 13 +++++ tests/Makefile | 76 ------------------------------ tests/gp_tests.cpp | 13 ++--- tests/mock_serial_self_tests.cpp | 2 +- 6 files changed, 26 insertions(+), 85 deletions(-) create mode 100644 tests/CMakeLists.txt delete mode 100644 tests/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index db228f36..c0634411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,3 +13,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb") add_subdirectory(src/ezsp) add_subdirectory(src/spi) add_subdirectory(example) +add_subdirectory(tests) diff --git a/src/spi/mock-uart/MockUartDriver.h b/src/spi/mock-uart/MockUartDriver.h index 112e4a7e..bcdf2e78 100644 --- a/src/spi/mock-uart/MockUartDriver.h +++ b/src/spi/mock-uart/MockUartDriver.h @@ -13,6 +13,7 @@ #include #include #include +#include /** * @brief Structure to interact with a UART using libserialcpp @@ -34,6 +35,7 @@ class MockUartScheduledByteDelivery { */ class MockUartDriver : public IUartDriver { public: + typedef std::function delta)> FWriteCallback; /** * @brief Default constructor * @@ -44,7 +46,7 @@ class MockUartDriver : public IUartDriver { * std::chrono::duration delta: the elapsed time since last bytes were written (in ms) * This callback should return 0 on success, errno on failure */ - MockUartDriver(std::function delta)> onWriteCallback = nullptr); + MockUartDriver(FWriteCallback onWriteCallback = nullptr); /** * @brief Destructor @@ -168,7 +170,7 @@ class MockUartDriver : public IUartDriver { std::recursive_mutex writeMutex; /*!< Mutex to protect writes... recursive to allow the caller to grab the mutex for us */ private: GenericAsyncDataInputObservable *dataInputObservable; /*!< The observable that will notify observers when new bytes are available on the UART */ - std::function delta)> onWriteCallback; /*!< Callback invoked each time bytes are written to the emulated UART, this callback must have a prototype that takes 3 parameters: size_t& writtenCnt, const void* buf, size_t cnt, std::chrono::duration delta. delta being the time since last bytes were written (in ms) */ + FWriteCallback onWriteCallback; /*!< Callback invoked each time bytes are written to the emulated UART, this callback must have a prototype that takes 3 parameters: size_t& writtenCnt, const void* buf, size_t cnt, std::chrono::duration delta. delta being the time since last bytes were written (in ms) */ std::chrono::time_point lastWrittenBytesTimestamp; /*!< A timestamp of the last bytes written */ size_t scheduledReadBytesCount; /*!< The current size of the scheduled read bytes queue. Grab scheduledReadQueueMutex before accessing this */ size_t deliveredReadBytesCount; /*!< The cumulative number of emulated read bytes delivered to the GenericAsyncDataInputObservable observer since the instanciation of this object. Grab scheduledReadQueueMutex before accessing this */ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..ff9cd32c --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,13 @@ +option(USE_MOCKSERIAL "Use MOCKSERIAL" OFF) + +if(USE_MOCKSERIAL) +set(gptest_SOURCES) +list(APPEND gptest_SOURCES mock_serial_self_tests.cpp) +list(APPEND gptest_SOURCES gp_tests.cpp) +list(APPEND gptest_SOURCES test_libezsp.cpp) +list(APPEND gptest_SOURCES ../example/dummy_db.cpp) +add_executable(gptest ${gptest_SOURCES}) + +target_include_directories(gptest PRIVATE ${PROJECT_SOURCE_DIR}/src) +target_link_libraries(gptest PUBLIC ezsp ezspspi) +endif() diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index cb1f9c59..00000000 --- a/tests/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -CXXFLAGS = -DUSE_SERIALCPP -W -Wall -pedantic -std=c++11 -Wno-unused-parameter -g -Weffc++ -LDFLAGS = $(LOCAL_LDFLAGS) -lpthread - -define HELP - - libsgtree project makefile help - ------------------------------------ - - In order to perform unit tests with cpputest, run the following command: - CFLAGS="-DUSE_CPPUTEST `pkg-config --cflags cpputest`" LIBS="`pkg-config --libs cpputest`" CPPUTEST_STATIC_LIB=/path/to/libCppUTest.a make CC=g++ - - In ordert to compile on native 128-bit platforms, prepend make with the following environment variables (eg for little endian): - CFLAGS="-DHAS_INT128 -DIS_LITTLE_ENDIAN" - - Usage: `make ' where is one of: - - - --- build commands - all build lib and its tests - test build tests - clean remove binaries (lib and tests) - clean-all remove binaries and object files - rebuild clean all and build - -endef -export HELP - -# SRC_PATH should point to the src/ folder containing source code for this library (can be overridden from environment) -SRC_PATH ?= ../ -SRC_DOMAIN_PATH ?= $(SRC_PATH)src/ezsp -SRC_SPI_PATH ?= $(SRC_PATH)src/spi - -include ../libezsp.mk.inc - -SRCS = $(SRC_PATH)test/mock_serial_self_tests.cpp \ - $(SRC_PATH)test/gp_tests.cpp \ - $(SRC_PATH)test/test_libezsp.cpp \ - $(SRC_PATH)example/dummy_db.cpp \ - $(SRC_PATH)example/CAppDemo.cpp \ - $(LIBEZSP_LINUX_MOCKSERIAL_SRC) \ - -OBJECTFILES = $(patsubst %.cpp, %.o, $(SRCS)) - -EXEC = test_runner - -#Set this to @ to keep the makefile quiet -ifndef SILENCE - SILENCE = @ -endif - -# get rid of built-in rules -.SUFFIXES: - -CLEANFILES = $(OBJECTFILES) $(EXEC) -INC = $(LOCAL_INC) $(LIBEZSP_COMMON_INC) - -all: $(EXEC) - -$(EXEC): $(OBJECTFILES) - @echo Linking $@ - $(SILENCE)$(CXX) $(OBJECTFILES) $(LDFLAGS) $(LIBCGICC_LDFLAGS) -o $(EXEC) - -%.o: %.cpp - @echo Compiling $< - $(SILENCE)$(CXX) $(CXXFLAGS) $(LIBCGICC_CXXFLAGS) $(INC) -c $< -o $@ - -rebuild: clean-all all - -clean: - @rm -f $(CLEANFILES) - @rm -f $(EXEC) - -clean-all: clean - -check: $(EXEC) - ./$< diff --git a/tests/gp_tests.cpp b/tests/gp_tests.cpp index 9a35eaa1..e19a89de 100644 --- a/tests/gp_tests.cpp +++ b/tests/gp_tests.cpp @@ -1,14 +1,15 @@ -#include "tests/TestHarness.h" #include #include #include #include "spi/mock-uart/MockUartDriver.h" -#include "spi/TimerFactory.h" +#include "spi/TimerBuilder.h" #include "spi/IAsyncDataInputObserver.h" -#include "spi/GenericLogger.h" -#include "example/CAppDemo.h" +#include "spi/Logger.h" +#include "ezsp/lib-ezsp-main.h" + +#include "TestHarness.h" /** * @brief Class implementing an observer that validates state transition during a sample ezsp in/out test sequence @@ -144,7 +145,7 @@ TEST_GROUP(gp_tests) { TEST(gp_tests, gp_recv_sensor_measurement) { TimerBuilder timerFactory; GenericAsyncDataInputObservable uartIncomingDataHandler; - ConsoleLogger::getInstance().setLogLevel(LOG_LEVEL::DEBUG); /* Only display logs for debug level info and higher (up to error) */ + Logger::getInstance().setLogLevel(LOG_LEVEL::DEBUG); /* Only display logs for debug level info and higher (up to error) */ std::vector< std::vector > stageExpectedTransitions; GPRecvSensorMeasurementTest serialProcessor(&stageExpectedTransitions); auto wcb = [&serialProcessor](size_t& writtenCnt, const void* buf, size_t cnt, std::chrono::duration delta) -> int { @@ -158,7 +159,7 @@ TEST(gp_tests, gp_recv_sensor_measurement) { stageExpectedTransitions.push_back({0x1a, 0xc0, 0x38, 0xbc, 0x7e}); std::vector GPDList; GPDList.push_back(CGpDevice(0x0500001U, GPD_KEY)); - CAppDemo app(uartDriver, timerFactory, true, false, 0, true, 11, false, GPDList); /* Force reset the network channel to 11 */ + CLibEzspMain lib_main(&uartDriver, timerFactory); UT_WAIT_MS(50); /* Give 50ms for libezsp's internal process to write to serial */ UT_FAILF_UNLESS_STAGE(1); diff --git a/tests/mock_serial_self_tests.cpp b/tests/mock_serial_self_tests.cpp index 73e1befb..424d1d9d 100644 --- a/tests/mock_serial_self_tests.cpp +++ b/tests/mock_serial_self_tests.cpp @@ -1,9 +1,9 @@ -#include "tests/TestHarness.h" #include #include #include "spi/mock-uart/MockUartDriver.h" #include "spi/IAsyncDataInputObserver.h" +#include "TestHarness.h" /** * @brief Write callback class to test the mock serial interface From 4d585cd057549c1ad091bc89dd3876e4c0e43a14 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 11:50:32 +0100 Subject: [PATCH 041/413] [CR c4f1f0c 5094d47 2f3577e2c] ezsp version management --- src/ezsp/lib-ezsp-main.cpp | 9 ++++----- src/ezsp/lib-ezsp-main.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index 8b36d922..d39dd3a2 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -50,9 +50,7 @@ CLibEzspState CLibEzspMain::getState() const void CLibEzspMain::dongleInit(uint8_t ezsp_version) { // first request stack protocol version - std::vector payload; - payload.push_back(ezsp_version); - dongle.sendCommand(EEzspCmd::EZSP_VERSION,payload); + dongle.sendCommand(EEzspCmd::EZSP_VERSION, std::vector({ezsp_version})); } void CLibEzspMain::stackInit() @@ -298,9 +296,10 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m // Check if the wanted protocol version, and display stack version if( i_msg_receive.at(0) > exp_ezsp_version ) { - dongleInit(i_msg_receive.at(0)); + exp_ezsp_version = i_msg_receive.at(0); + dongleInit(exp_ezsp_version); } - if( i_msg_receive.at(0) == exp_ezsp_version ) + else if( i_msg_receive.at(0) == exp_ezsp_version ) { // all is good std::stringstream bufDump; diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index 6db6176e..8fc8fba0 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -53,7 +53,7 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver private: - uint8_t exp_ezsp_version; /*!< Expected EZSP version from dongle */ + uint8_t exp_ezsp_version; /*!< Expected EZSP version from dongle, at initial state then current version of dongle */ CLibEzspState lib_state; /*!< Current state for our internal state machine */ std::function obsStateCallback; /*!< Optional user callback invoked by us each time library state change */ std::unique_ptr timer; /*!< Internal timer */ From d4e2128b7d8dc3d71ec3e732138570378dbaa987 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 11:53:49 +0100 Subject: [PATCH 042/413] [CR db5fc87cadbaec] Adding helper getLogger() macro --- src/spi/ILogger.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/spi/ILogger.h b/src/spi/ILogger.h index 8680b05f..ed113b6e 100644 --- a/src/spi/ILogger.h +++ b/src/spi/ILogger.h @@ -24,26 +24,31 @@ * @{ */ +/** + * @brief Generic logger instance getter + */ +#define getLogger SINGLETON_LOGGER_CLASS_NAME::getInstance + /** * @brief Generic logger getter (uses debug level) */ -#define plog SINGLETON_LOGGER_CLASS_NAME::getInstance().debugLogger.log +#define plog getLogger().debugLogger.log /** * @brief Error logger getter */ -#define plogE SINGLETON_LOGGER_CLASS_NAME::getInstance().errorLogger.log +#define plogE getLogger().errorLogger.log /** * @brief Warning logger getter */ -#define plogW SINGLETON_LOGGER_CLASS_NAME::getInstance().warningLogger.log +#define plogW getLogger().warningLogger.log /** * @brief Info logger getter */ -#define plogI SINGLETON_LOGGER_CLASS_NAME::getInstance().infoLogger.log +#define plogI getLogger().infoLogger.log /** * @brief Debug logger getter */ -#define plogD SINGLETON_LOGGER_CLASS_NAME::getInstance().debugLogger.log +#define plogD getLogger().debugLogger.log /** @} */ /* Note: we are not using pragma once here because we want the defines above to be applied even if include is done multiple times From 617af64bf918a772c5c9a22f85ef355a9574b10f Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 11:56:54 +0100 Subject: [PATCH 043/413] [CR f09cd6c8dab4] Fixing tests up to stage 334 --- tests/gp_tests.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/gp_tests.cpp b/tests/gp_tests.cpp index e19a89de..148c25f0 100644 --- a/tests/gp_tests.cpp +++ b/tests/gp_tests.cpp @@ -1152,26 +1152,26 @@ TEST(gp_tests, gp_recv_sensor_measurement) { stageExpectedTransitions.push_back({0x85, 0x20, 0xdd, 0x7e }); stageExpectedTransitions.push_back({0x86, 0x10, 0xbe, 0x7e }); - stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x08, 0x29, 0xff, 0xe1, 0x7e }); + stageExpectedTransitions.push_back({0x36, 0xe1, 0x21, 0x57, 0x54, 0x5a, 0x9e, 0x40, 0x7e }); uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x43, 0xe0, 0xa5, 0x57, 0x54, 0x34, 0x15, 0x5b, 0x76, 0x7e, 0x53, 0xe0, 0xb1, 0x57, 0x54, 0x33, 0x85, 0xfb, 0x7f, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(331); stageExpectedTransitions.push_back({0x87, 0x00, 0x9f, 0x7e }); - stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x1c, 0xea, 0x4d, 0x59, 0x94, 0x7c, 0x25, 0xab, 0x55, 0xd2, 0x5c, 0x9c, 0x4e, 0x27, 0xab, 0xed, 0xcd, 0x67, 0xb7, 0xfc, 0x6d, 0xe0, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x08, 0x15, 0xa0, 0x9a, 0x7e })); + stageExpectedTransitions.push_back({0x47, 0xe6, 0x21, 0x57, 0x54, 0x02, 0x22, 0x55, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x64, 0xe1, 0xa1, 0x57, 0x54, 0x5a, 0xb8, 0xac, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(333); stageExpectedTransitions.push_back({0x80, 0x70, 0x78, 0x7e }); - stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0x02, 0x5a, 0xc1, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x1c, 0x15, 0xb8, 0xf5, 0xb9, 0x7e })); + stageExpectedTransitions.push_back({0x50, 0xe7, 0x21, 0x57, 0x54, 0xc8, 0x22, 0xc7, 0x7e }); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x75, 0xe6, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x12, 0x07, 0x54, 0xa8, 0x69, 0x7c, 0xfe, 0xf4, 0xe2, 0xe1, 0x24, 0xb1, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x90, 0xa3, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(335); stageExpectedTransitions.push_back({0x81, 0x60, 0x59, 0x7e }); stageExpectedTransitions.push_back({0x61, 0xe4, 0x21, 0x57, 0x54, 0x0c, 0x3f, 0xf1, 0x7e }); - uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0x02, 0x15, 0xb3, 0x40, 0x64, 0x53, 0x3c, 0xa3, 0x9b, 0x8b, 0x4c, 0xda, 0xb6, 0x24, 0xa7, 0xed, 0xce, 0x67, 0x8b, 0xfd, 0x3e, 0x9c, 0x8e, 0x9a, 0xa7, 0x7e })); + uartDriver.scheduleIncomingChunk(MockUartScheduledByteDelivery({0x06, 0xe7, 0xa1, 0x57, 0x54, 0xc8, 0x02, 0x8a, 0x7e })); UT_WAIT_MS(100); UT_FAILF_UNLESS_STAGE(337); From 948072976cde006d6be0a0f492101b57fe63a0af Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 12:19:42 +0100 Subject: [PATCH 044/413] [CR 39523f2c5e842] Minor cosmetic changes --- src/ezsp/lib-ezsp-main.cpp | 39 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index d39dd3a2..0aa80abf 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -4,6 +4,8 @@ #include "ezsp/lib-ezsp-main.h" #include "spi/ILogger.h" +#include "ezsp/ezsp-protocol/get-network-parameters-response.h" // For CGetNetworkParamtersResponse +#include "ezsp/ezsp-protocol/struct/ember-key-struct.h" // For CEmberKeyStruct #include #include @@ -34,8 +36,7 @@ CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, void CLibEzspMain::setState( CLibEzspState i_new_state ) { - lib_state=i_new_state; - /* \todo inform observe of state changed */ + this->lib_state = i_new_state; if( nullptr != obsStateCallback ) { obsStateCallback(i_new_state); @@ -162,7 +163,7 @@ void CLibEzspMain::stackInit() */ void CLibEzspMain::handleDongleState( EDongleState i_state ) { - clogI << __func__ << "() => dongleState : " << i_state << "\n"; + // clogI << __func__ << "() => dongleState : " << i_state << "\n"; if( DONGLE_READY == i_state ) { @@ -174,7 +175,7 @@ void CLibEzspMain::handleDongleState( EDongleState i_state ) else if( DONGLE_REMOVE == i_state ) { // TODO: manage this ! - clogE << __func__ << " dongle removal is not handled for now\n"; + clogW << __func__ << "() dongle removed\n"; } } @@ -187,7 +188,7 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m case EZSP_STACK_STATUS_HANDLER: { EEmberStatus status = static_cast(i_msg_receive.at(0)); - clogI << "CEZSP_STACK_STATUS_HANDLER status : " << CEzspEnum::EEmberStatusToString(status) << std::endl; + clogD << "CEZSP_STACK_STATUS_HANDLER status : " << CEzspEnum::EEmberStatusToString(status) << "\n"; if( (EMBER_NETWORK_UP == status) /*&& (false == reset_wanted)*/ ) { gp_sink.init(); @@ -264,14 +265,12 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m } } break; - /* case EZSP_GET_NETWORK_PARAMETERS: { CGetNetworkParamtersResponse l_rsp(i_msg_receive); clogI << l_rsp.String() << std::endl; } - break; */ - /* + break; case EZSP_GET_KEY: { EEmberStatus l_status = static_cast(i_msg_receive.at(0)); @@ -279,23 +278,23 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m CEmberKeyStruct l_rsp(i_msg_receive); clogI << "EZSP_GET_KEY status : " << CEzspEnum::EEmberStatusToString(l_status) << ", " << l_rsp.String() << std::endl; } - break; */ - /* - case EZSP_GET_EUI64: - { - // put eui64 on database for later use - db.dongleEui64.clear(); - for( uint8_t loop=0; loop exp_ezsp_version ) { + clogW << "Current EZSP version supported by dongle (" << static_cast(i_msg_receive.at(0)) << ") is higher than our minimum (" << static_cast(exp_ezsp_version) << "). Re-initializing dongle\n"; exp_ezsp_version = i_msg_receive.at(0); dongleInit(exp_ezsp_version); } From 864819b65702b809d4df5daa558bfd8da6c83668 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 12:25:36 +0100 Subject: [PATCH 045/413] [CR b3f599902] Switching CLibEzspMain's state to READY when gp_sink init is done --- src/ezsp/lib-ezsp-main.cpp | 15 ++++++++++++++- src/ezsp/zigbee-tools/green-power-sink.cpp | 15 +++++++++++++++ src/ezsp/zigbee-tools/green-power-sink.h | 7 ++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index 0aa80abf..f1e723b5 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -191,7 +191,20 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m clogD << "CEZSP_STACK_STATUS_HANDLER status : " << CEzspEnum::EEmberStatusToString(status) << "\n"; if( (EMBER_NETWORK_UP == status) /*&& (false == reset_wanted)*/ ) { - gp_sink.init(); + /* Create a sink state change callback to find out when the sink is ready */ + /* When the sink becomes ready, then libezsp will also switch to ready state */ + auto clibobs = [this](ESinkState& i_state) -> bool + { + clogD << "Underneath sink changed to state: " << static_cast(i_state) << "\n"; + if (ESinkState::SINK_READY == i_state) + { + this->setState(CLibEzspState::READY); + return false; /* Ask the caller to withdraw ourselves from the callback */ + } + return true; + }; + gp_sink.registerStateCallback(clibobs); + gp_sink.init(); /* When sink is ready, callback clibobs will invoke setState() */ /* // manage green power flags diff --git a/src/ezsp/zigbee-tools/green-power-sink.cpp b/src/ezsp/zigbee-tools/green-power-sink.cpp index 0ad6590d..cb56d0e6 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.cpp +++ b/src/ezsp/zigbee-tools/green-power-sink.cpp @@ -76,6 +76,7 @@ CGpSink::CGpSink( CEzspDongle &i_dongle, CZigbeeMessaging &i_zb_messaging ) : dongle(i_dongle), zb_messaging(i_zb_messaging), sink_state(SINK_NOT_INIT), + obsStateCallback(nullptr), nwk_parameters(), authorizeGpfChannelRqst(false), gpf_comm_frame(), @@ -602,6 +603,11 @@ bool CGpSink::unregisterObserver(CGpObserver* observer) return static_cast(this->observers.erase(observer)); } +void CGpSink::registerStateCallback(std::function newObsStateCallback) +{ + this->obsStateCallback=newObsStateCallback; +} + void CGpSink::notifyObserversOfRxGpFrame( CGpFrame i_gpf ) { for(auto observer : this->observers) { observer->handleRxGpFrame( i_gpf ); @@ -893,4 +899,13 @@ void CGpSink::setSinkState( ESinkState i_state ) auto it = MyEnumStrings.find(sink_state); /* FIXME: we issue a warning, but the variable app_state is now out of bounds */ std::string error_str = it == MyEnumStrings.end() ? "OUT_OF_RANGE" : it->second; clogI << "SINK State change : " << error_str << std::endl; + + if( nullptr != obsStateCallback ) + { + if (!obsStateCallback(i_state)) + { + clogD << "Clearing sink state change callback (it returned false)\n"; + this->obsStateCallback = nullptr; + } + } } diff --git a/src/ezsp/zigbee-tools/green-power-sink.h b/src/ezsp/zigbee-tools/green-power-sink.h index 14b33ba7..2ab88d97 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.h +++ b/src/ezsp/zigbee-tools/green-power-sink.h @@ -100,11 +100,16 @@ class CGpSink : public CEzspDongleObserver bool registerObserver(CGpObserver* observer); bool unregisterObserver(CGpObserver* observer); + /** + * @brief Register callback on current library state + */ + void registerStateCallback(std::function newObsStateCallback); private: CEzspDongle &dongle; CZigbeeMessaging &zb_messaging; - ESinkState sink_state; + ESinkState sink_state; /*!< Current state for our internal state machine */ + std::function obsStateCallback; /*!< Optional user callback invoked by us each time library state change */ CEmberNetworkParameters nwk_parameters; bool authorizeGpfChannelRqst; // parameters to save for pairing/clearing From b9680f0e4d1a0a5458f86a2cc9bd50d705ed9500 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:16:53 +0100 Subject: [PATCH 046/413] [CR 78d748c675] Moving startup actions from CLibEzspMain --- src/ezsp/lib-ezsp-main.cpp | 75 +++++--------------------------------- src/ezsp/lib-ezsp-main.h | 18 +++++++-- 2 files changed, 24 insertions(+), 69 deletions(-) diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index f1e723b5..142b5793 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -33,6 +33,16 @@ CLibEzspMain::CLibEzspMain(IUartDriver *uartDriver, } } +void CLibEzspMain::registerLibraryStateCallback(std::function newObsStateCallback) +{ + this->obsStateCallback = newObsStateCallback; +} + +void CLibEzspMain::registerGPSourceIdCallback(std::function newObsGPSourceIdCallback) +{ + this->obsGPSourceIdCallback = newObsGPSourceIdCallback; +} + void CLibEzspMain::setState( CLibEzspState i_new_state ) { @@ -205,71 +215,6 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m }; gp_sink.registerStateCallback(clibobs); gp_sink.init(); /* When sink is ready, callback clibobs will invoke setState() */ - -/* - // manage green power flags - if (this->openGpCommissionningAtStartup) - { - // If requested to do so, immediately open a GP commissioning session - gp_sink.openCommissioningSession(); - } - else if( gpdList.size() ) - { - gp_sink.registerGpds(gpdList); - } - else if( this->removeAllGpds ) - { - gp_sink.gpClearAllTables(); - this->removeAllGpds = false; - this->gpdToRemove = std::vector(); - } - else if( this->gpdToRemove.size() ) - { - gp_sink.removeGpds(this->gpdToRemove); - this->gpdToRemove = std::vector(); - } - - if(this->authorizeChRqstAnswerTimeout) { - gp_sink.authorizeAnswerToGpfChannelRqst(true); - // start timer - timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); - } - - // manage other flags - if (this->openZigbeeCommissionningAtStartup) { - // If requested to do so, open the zigbee network for a specific duration, so new devices can join - zb_nwk.openNetwork(60); - - // we retrieve network information and key and eui64 of dongle (can be done before) - dongle.sendCommand(EZSP_GET_NETWORK_PARAMETERS); - dongle.sendCommand(EZSP_GET_EUI64); - std::vector l_payload; - l_payload.push_back(EMBER_CURRENT_NETWORK_KEY); - dongle.sendCommand(EZSP_GET_KEY, l_payload); - - // start discover of existing product inside network - zb_nwk.startDiscoverProduct([&](EmberNodeType i_type, EmberEUI64 i_eui64, EmberNodeId i_id){ - clogI << " Is it a new product "; - clogI << "[type : "<< CEzspEnum::EmberNodeTypeToString(i_type) << "]"; - clogI << "[eui64 :"; - for(uint8_t loop=0; loop payload; - payload.push_back(u16_get_lo_u8(i_id)); - payload.push_back(u16_get_hi_u8(i_id)); - - zb_messaging.SendZDOCommand( i_id, ZDP_ACTIVE_EP, payload ); - } - }); - } */ } else { diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index 8fc8fba0..c082c85a 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -20,7 +20,7 @@ /** - * @brief enumetion for possible status of a gpd key from an incomming gpd + * @brief Possible states of the state machine used by class CLibEzspMain */ enum class CLibEzspState { NO_INIT, /* obsStateCallback){this->obsStateCallback=obsStateCallback;} + void registerLibraryStateCallback(std::function newObsStateCallback); /** * @brief Register callback to receive all incomming greenpower sourceId + * + * @param newObsGPSourceIdCallback A callback function of type void func(uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status), that will be invoked each time a new source ID transmits over the air (or nullptr to disable callbacks) */ - void registerGPSourceIdCallback(std::function obsGPSourceIdCallback){this->obsGPSourceIdCallback=obsGPSourceIdCallback;} + void registerGPSourceIdCallback(std::function newObsGPSourceIdCallback); private: From 269b07a2a49f59d1fcff786e5cdc9af24d7ba540 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:21:07 +0100 Subject: [PATCH 047/413] [CR 45edc777998] replace usage of CAppDemo by CLibEzspMain --- example/CMakeLists.txt | 2 +- example/mainEzspTest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 846f7db8..27d72f8d 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -9,7 +9,7 @@ if(USE_RARITAN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_RARITAN") endif() -add_executable(mainEzspTest CAppDemo.cpp mainEzspTest.cpp dummy_db.cpp) +add_executable(mainEzspTest mainEzspTest.cpp dummy_db.cpp) target_include_directories(mainEzspTest PRIVATE ${PROJECT_SOURCE_DIR}/src) target_link_libraries(mainEzspTest PUBLIC ezsp ezspspi) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 0e1eb0a1..e63dc016 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -9,7 +9,7 @@ #include "spi/TimerBuilder.h" #include "spi/UartDriverBuilder.h" #include "spi/Logger.h" -#include "CAppDemo.h" +#include "ezsp/lib-ezsp-main.h" #include #include #include @@ -202,7 +202,7 @@ int main(int argc, char **argv) { return 1; } - CAppDemo app(uartDriver, timerFactory, (resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpAddedDevDataList, gpRemovedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ + CLibEzspMain lib_main(uartDriver, timerFactory); #ifdef USE_CPPTHREADS std::string line; From 6c93e388d7d644ebacd0ecb5ba7119ebbc8cde1c Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:24:16 +0100 Subject: [PATCH 048/413] [CR edf7c930e83a] add lambda function to monitor state of library --- example/mainEzspTest.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index e63dc016..b38bdabe 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include //#include // For debug #ifdef USE_RARITAN @@ -204,6 +205,21 @@ int main(int argc, char **argv) { CLibEzspMain lib_main(uartDriver, timerFactory); + // lib state observer + auto clibobs = [](CLibEzspState& i_state) { + clogI << "library state change: " << unsigned(i_state) << "\n"; + }; + lib_main.registerLibraryStateCallback(clibobs); + + // lib incomming greenpower sourceId observer + auto cgpidobs = [](uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status) { + clogI << "greenpower sourcedId: 0x" << std::hex << std::setw(4) << std::setfill('0') << unsigned(i_gpd_id) << + ", known: " << (i_gpd_known?"true":"false") << ", key status: " << std::hex << std::setw(2) << std::setfill('0') << unsigned(i_gpd_key_status) << + std::endl ; + }; + lib_main.registerGPSourceIdCallback(cgpidobs); + + #ifdef USE_CPPTHREADS std::string line; std::getline(std::cin, line); From 8be5c13809f335d4f782e6f61c9dcc9e924efa08 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:29:56 +0100 Subject: [PATCH 049/413] [CR 78d748c675aa0] Moving startup actions from CLibEzspMain to mainEzspTest --- example/mainEzspTest.cpp | 78 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index b38bdabe..5dcd86e5 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -211,13 +211,79 @@ int main(int argc, char **argv) { }; lib_main.registerLibraryStateCallback(clibobs); +/* + // manage green power flags + if (this->openGpCommissionningAtStartup) + { + // If requested to do so, immediately open a GP commissioning session + gp_sink.openCommissioningSession(); + } + else if( gpdList.size() ) + { + gp_sink.registerGpds(gpdList); + } + else if( this->removeAllGpds ) + { + gp_sink.gpClearAllTables(); + this->removeAllGpds = false; + this->gpdToRemove = std::vector(); + } + else if( this->gpdToRemove.size() ) + { + gp_sink.removeGpds(this->gpdToRemove); + this->gpdToRemove = std::vector(); + } + + if(this->authorizeChRqstAnswerTimeout) { + gp_sink.authorizeAnswerToGpfChannelRqst(true); + // start timer + timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); + } + + // manage other flags + if (this->openZigbeeCommissionningAtStartup) { + // If requested to do so, open the zigbee network for a specific duration, so new devices can join + zb_nwk.openNetwork(60); + + // we retrieve network information and key and eui64 of dongle (can be done before) + dongle.sendCommand(EZSP_GET_NETWORK_PARAMETERS); + dongle.sendCommand(EZSP_GET_EUI64); + std::vector l_payload; + l_payload.push_back(EMBER_CURRENT_NETWORK_KEY); + dongle.sendCommand(EZSP_GET_KEY, l_payload); + + // start discover of existing product inside network + zb_nwk.startDiscoverProduct([&](EmberNodeType i_type, EmberEUI64 i_eui64, EmberNodeId i_id){ + clogI << " Is it a new product "; + clogI << "[type : "<< CEzspEnum::EmberNodeTypeToString(i_type) << "]"; + clogI << "[eui64 :"; + for(uint8_t loop=0; loop payload; + payload.push_back(u16_get_lo_u8(i_id)); + payload.push_back(u16_get_hi_u8(i_id)); + + zb_messaging.SendZDOCommand( i_id, ZDP_ACTIVE_EP, payload ); + } + }); + } +*/ + // lib incomming greenpower sourceId observer - auto cgpidobs = [](uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status) { - clogI << "greenpower sourcedId: 0x" << std::hex << std::setw(4) << std::setfill('0') << unsigned(i_gpd_id) << - ", known: " << (i_gpd_known?"true":"false") << ", key status: " << std::hex << std::setw(2) << std::setfill('0') << unsigned(i_gpd_key_status) << - std::endl ; - }; - lib_main.registerGPSourceIdCallback(cgpidobs); + // auto cgpidobs = [](uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status) { + // clogI << "greenpower sourcedId: 0x" << std::hex << std::setw(4) << std::setfill('0') << unsigned(i_gpd_id) << + // ", known: " << (i_gpd_known?"true":"false") << ", key status: " << std::hex << std::setw(2) << std::setfill('0') << unsigned(i_gpd_key_status) << + // std::endl; + // }; + // lib_main.registerGPSourceIdCallback(cgpidobs); #ifdef USE_CPPTHREADS From 4acea1baf564937626e5afdae92c1d102617e0e5 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:34:37 +0100 Subject: [PATCH 050/413] [CR 8c0aa08536] Moving high level state machine into a dedicated class --- example/mainEzspTest.cpp | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 5dcd86e5..3b4a184a 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -55,6 +55,33 @@ static bool hexDigitToNibble(const char hDigit, uint8_t& byte) { return true; } +enum MainState { + INIT, + REMOVE_ALL_GPD, + REMOVE_SPECIFIC_GPD, + ADD_GPD, + COMMISSION_GPD, + OPEN_ZIGBEE_NWK, + RUN +}; + +class MainStateMachine { +public: + MainStateMachine() : + currentState(INIT) { } + + MainStateMachine(const CGpSink&) = delete; /* No copy construction allowed */ + + MainStateMachine& operator=(MainStateMachine) = delete; /* No assignment allowed */ + + void ezspStateChangeCallback(CLibEzspState& i_state) { + clogI << "EZSP library change to state " << static_cast(i_state) << "\n"; + } + +private: + MainState currentState; +}; + int main(int argc, char **argv) { IUartDriver *uartDriver = UartDriverBuilder::getUartDriver(); TimerBuilder timerFactory; @@ -203,13 +230,14 @@ int main(int argc, char **argv) { return 1; } + MainStateMachine fsm; CLibEzspMain lib_main(uartDriver, timerFactory); // lib state observer - auto clibobs = [](CLibEzspState& i_state) { - clogI << "library state change: " << unsigned(i_state) << "\n"; - }; - lib_main.registerLibraryStateCallback(clibobs); + auto clibobs = [&fsm](CLibEzspState& i_state) { + fsm.ezspStateChangeCallback(i_state); + }; + lib_main.registerLibraryStateCallback(clibobs); /* // manage green power flags From 86afc0577135f38d40d4ccdc3e145c9236e9a194 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:39:47 +0100 Subject: [PATCH 051/413] [CR 61d080a1cfe] Adding all startup arguments to MainStateMachine's constructor --- example/mainEzspTest.cpp | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 3b4a184a..56e9646f 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -56,7 +56,7 @@ static bool hexDigitToNibble(const char hDigit, uint8_t& byte) { } enum MainState { - INIT, + INIT_PENDING, REMOVE_ALL_GPD, REMOVE_SPECIFIC_GPD, ADD_GPD, @@ -67,8 +67,23 @@ enum MainState { class MainStateMachine { public: - MainStateMachine() : - currentState(INIT) { } + MainStateMachine(bool requestReset=false, + bool openGpCommissionning=false, + uint8_t authorizeChannelRequestAnswerTimeout=0, + bool openZigbeeCommissionning=false, + unsigned int useNetworkChannel=11, + bool gpRemoveAllDevices=false, + const std::vector& gpDevicesToAdd={}, + const std::vector& gpDevicesToRemove={}) : + resetAtStartup(requestReset), + openGpCommissionningAtStartup(openGpCommissionning), + authorizeChannelRequestAnswerTimeoutAtStartup(authorizeChannelRequestAnswerTimeout), + openZigbeeCommissionningAtStartup(openZigbeeCommissionning), + channel(useNetworkChannel), + removeAllGPDAtStartup(gpRemoveAllDevices), + gpdAddList(gpDevicesToAdd), + gpdRemoveList(gpDevicesToRemove), + currentState(MainState::INIT_PENDING) { } MainStateMachine(const CGpSink&) = delete; /* No copy construction allowed */ @@ -76,9 +91,20 @@ class MainStateMachine { void ezspStateChangeCallback(CLibEzspState& i_state) { clogI << "EZSP library change to state " << static_cast(i_state) << "\n"; + if (this->currentState == MainState::INIT_PENDING) { + this->currentState = MainState::RUN; + } } private: + bool resetAtStartup; + bool openGpCommissionningAtStartup; + uint8_t authorizeChannelRequestAnswerTimeoutAtStartup; + bool openZigbeeCommissionningAtStartup; + unsigned int channel; + bool removeAllGPDAtStartup; + const std::vector gpdAddList; + const std::vector gpdRemoveList; MainState currentState; }; @@ -230,7 +256,7 @@ int main(int argc, char **argv) { return 1; } - MainStateMachine fsm; + MainStateMachine fsm((resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpAddedDevDataList, gpRemovedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ CLibEzspMain lib_main(uartDriver, timerFactory); // lib state observer From 9e2af84613275c3668b37be85eabb3d8993bf7c8 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 15:44:41 +0100 Subject: [PATCH 052/413] [CR b48965896e4cb] Handling all startup GPD list manipulation in MainStateMachine --- example/mainEzspTest.cpp | 100 +++++++++++++++++++------------------ src/ezsp/lib-ezsp-main.cpp | 2 +- src/ezsp/lib-ezsp-main.h | 2 + 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index 56e9646f..d597251e 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -67,7 +67,8 @@ enum MainState { class MainStateMachine { public: - MainStateMachine(bool requestReset=false, + MainStateMachine(CLibEzspMain& libEzspHandle, + bool requestReset=false, bool openGpCommissionning=false, uint8_t authorizeChannelRequestAnswerTimeout=0, bool openZigbeeCommissionning=false, @@ -75,6 +76,7 @@ class MainStateMachine { bool gpRemoveAllDevices=false, const std::vector& gpDevicesToAdd={}, const std::vector& gpDevicesToRemove={}) : + libEzsp(libEzspHandle), resetAtStartup(requestReset), openGpCommissionningAtStartup(openGpCommissionning), authorizeChannelRequestAnswerTimeoutAtStartup(authorizeChannelRequestAnswerTimeout), @@ -85,26 +87,66 @@ class MainStateMachine { gpdRemoveList(gpDevicesToRemove), currentState(MainState::INIT_PENDING) { } - MainStateMachine(const CGpSink&) = delete; /* No copy construction allowed */ + MainStateMachine(const MainStateMachine&) = delete; /* No copy construction allowed */ MainStateMachine& operator=(MainStateMachine) = delete; /* No assignment allowed */ void ezspStateChangeCallback(CLibEzspState& i_state) { clogI << "EZSP library change to state " << static_cast(i_state) << "\n"; - if (this->currentState == MainState::INIT_PENDING) { - this->currentState = MainState::RUN; + if (i_state == CLibEzspState::READY) { + clogI << "EZSP library is ready, entering main state machine with MainState " << static_cast(this->currentState) << "\n"; + if (this->currentState == MainState::INIT_PENDING && this->removeAllGPDAtStartup) { + clogI << "Applying remove all GPD action\n"; + this->currentState = MainState::REMOVE_ALL_GPD; + libEzsp.getSink().gpClearAllTables(); /* FIXME: should not directly invoke methods on sink */ + this->removeAllGPDAtStartup = false; + this->gpdRemoveList = std::vector(); + } + else if (this->currentState == MainState::INIT_PENDING && this->gpdRemoveList.size()) { /* If in REMOVE_ALL_GPD state, no need to remove specific GPs, we have already flushed all */ + clogI << "Removing " << this->gpdRemoveList.size() << " provided GPDs\n"; + this->currentState = MainState::REMOVE_SPECIFIC_GPD; + libEzsp.getSink().removeGpds(this->gpdRemoveList); /* FIXME: should not directly invoke methods on sink */ + this->gpdRemoveList = std::vector(); + } + else if ((this->currentState == MainState::INIT_PENDING || + this->currentState == MainState::REMOVE_ALL_GPD || + this->currentState == MainState::REMOVE_SPECIFIC_GPD) && + this->gpdAddList.size()) { /* Once init is done or optional GPD remove has been done... */ + clogI << "Adding " << this->gpdAddList.size() << " provided GPDs\n"; + this->currentState = MainState::ADD_GPD; + libEzsp.getSink().registerGpds(gpdAddList); /* FIXME: should not directly invoke methods on sink */ + } + else if ((this->currentState == MainState::INIT_PENDING || + this->currentState == MainState::REMOVE_ALL_GPD || + this->currentState == MainState::REMOVE_SPECIFIC_GPD || + this->currentState == MainState::ADD_GPD) && + this->openGpCommissionningAtStartup) { /* Once init is done or optional GPD remove and addition has been done... */ + clogI << "Opening GP commisionning session\n"; + libEzsp.getSink().openCommissioningSession(); /* FIXME: should not directly invoke methods on sink */ + } + /*else if ((this->authorizeChRqstAnswerTimeout) { + libEzsp.getSink().authorizeAnswerToGpfChannelRqst(true); + // start timer + timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); + }*/ + else { /* No preparation step remains... we can swich to normal run state */ + clogI << "Preparation steps finished... switching to run state\n"; + this->currentState = MainState::RUN; + } + clogI << "Moving to MainState " << static_cast(this->currentState) << "\n"; } } private: + CLibEzspMain& libEzsp; bool resetAtStartup; bool openGpCommissionningAtStartup; uint8_t authorizeChannelRequestAnswerTimeoutAtStartup; bool openZigbeeCommissionningAtStartup; unsigned int channel; bool removeAllGPDAtStartup; - const std::vector gpdAddList; - const std::vector gpdRemoveList; + std::vector gpdAddList; + std::vector gpdRemoveList; MainState currentState; }; @@ -139,10 +181,6 @@ int main(int argc, char **argv) { switch (c) { case 's': { - if (gpRemovedDevDataList.size() || removeAllGpDevs) { - std::cerr << "-s option cannot be used if -r was used\n"; - exit(1); - } std::istringstream gpDevDataStream(optarg); std::string gpDevSourceIdstr; if (std::getline(gpDevDataStream, gpDevSourceIdstr, '/')) { @@ -193,17 +231,13 @@ int main(int argc, char **argv) { { std::string gpDevSourceIdstr(optarg); if (gpDevSourceIdstr == "*") { /* Remove all source IDs */ - if (gpRemovedDevDataList.size() || gpAddedDevDataList.size()) { - std::cerr << "-r * option cannot be used if another -r or -s was used\n"; + if (gpRemovedDevDataList.size()) { + std::cerr << "-r * option cannot be used if another -r was used\n"; exit(1); } removeAllGpDevs = true; } else { - if (gpAddedDevDataList.size() || removeAllGpDevs) { - std::cerr << "-r option cannot be used if -r '*' or -s was used\n"; - exit(1); - } std::stringstream gpDevSourceIdStream; gpDevSourceIdStream << std::hex << gpDevSourceIdstr; unsigned int sourceIdValue; @@ -256,44 +290,14 @@ int main(int argc, char **argv) { return 1; } - MainStateMachine fsm((resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpAddedDevDataList, gpRemovedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ CLibEzspMain lib_main(uartDriver, timerFactory); - - // lib state observer - auto clibobs = [&fsm](CLibEzspState& i_state) { + MainStateMachine fsm(lib_main, (resetToChannel!=0), openGpCommissionningAtStartup, authorizeChRqstAnswerTimeout, openZigbeeNetworkAtStartup, resetToChannel, removeAllGpDevs, gpAddedDevDataList, gpRemovedDevDataList); /* If a channel was provided, reset the network and recreate it on the provided channel */ + auto clibobs = [&fsm, &lib_main](CLibEzspState& i_state) { fsm.ezspStateChangeCallback(i_state); }; lib_main.registerLibraryStateCallback(clibobs); /* - // manage green power flags - if (this->openGpCommissionningAtStartup) - { - // If requested to do so, immediately open a GP commissioning session - gp_sink.openCommissioningSession(); - } - else if( gpdList.size() ) - { - gp_sink.registerGpds(gpdList); - } - else if( this->removeAllGpds ) - { - gp_sink.gpClearAllTables(); - this->removeAllGpds = false; - this->gpdToRemove = std::vector(); - } - else if( this->gpdToRemove.size() ) - { - gp_sink.removeGpds(this->gpdToRemove); - this->gpdToRemove = std::vector(); - } - - if(this->authorizeChRqstAnswerTimeout) { - gp_sink.authorizeAnswerToGpfChannelRqst(true); - // start timer - timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); - } - // manage other flags if (this->openZigbeeCommissionningAtStartup) { // If requested to do so, open the zigbee network for a specific duration, so new devices can join diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index 142b5793..baaad03e 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -209,7 +209,7 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m if (ESinkState::SINK_READY == i_state) { this->setState(CLibEzspState::READY); - return false; /* Ask the caller to withdraw ourselves from the callback */ + return true; /* Do not ask the caller to withdraw ourselves from the callback */ } return true; }; diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index c082c85a..e1752b2f 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -47,6 +47,8 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CLibEzspMain(const CLibEzspMain&) = delete; /*gp_sink; } + /** * @brief Register callback on current library state * From 4af4b740d90d84efe2114477eacadf39a8966773 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 16:02:26 +0100 Subject: [PATCH 053/413] [CR 72926b1faa9] Implementing GP devices addition removal without introspection inside CGpSink --- example/mainEzspTest.cpp | 46 ++++++++++++++------- src/ezsp/lib-ezsp-main.cpp | 47 ++++++++++++++++++---- src/ezsp/lib-ezsp-main.h | 40 +++++++++++++++--- src/ezsp/zigbee-tools/green-power-sink.cpp | 37 +++++++++-------- src/ezsp/zigbee-tools/green-power-sink.h | 8 +++- 5 files changed, 131 insertions(+), 47 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index d597251e..dca35fec 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -76,10 +76,11 @@ class MainStateMachine { bool gpRemoveAllDevices=false, const std::vector& gpDevicesToAdd={}, const std::vector& gpDevicesToRemove={}) : + initFailures(0), libEzsp(libEzspHandle), resetAtStartup(requestReset), openGpCommissionningAtStartup(openGpCommissionning), - authorizeChannelRequestAnswerTimeoutAtStartup(authorizeChannelRequestAnswerTimeout), + channelRequestAnswerTimeoutAtStartup(authorizeChannelRequestAnswerTimeout), openZigbeeCommissionningAtStartup(openZigbeeCommissionning), channel(useNetworkChannel), removeAllGPDAtStartup(gpRemoveAllDevices), @@ -98,14 +99,18 @@ class MainStateMachine { if (this->currentState == MainState::INIT_PENDING && this->removeAllGPDAtStartup) { clogI << "Applying remove all GPD action\n"; this->currentState = MainState::REMOVE_ALL_GPD; - libEzsp.getSink().gpClearAllTables(); /* FIXME: should not directly invoke methods on sink */ + if (!libEzsp.clearAllGPDevices()) { + clogE << "Failed clearing GP device list\n"; + } this->removeAllGPDAtStartup = false; this->gpdRemoveList = std::vector(); } else if (this->currentState == MainState::INIT_PENDING && this->gpdRemoveList.size()) { /* If in REMOVE_ALL_GPD state, no need to remove specific GPs, we have already flushed all */ clogI << "Removing " << this->gpdRemoveList.size() << " provided GPDs\n"; this->currentState = MainState::REMOVE_SPECIFIC_GPD; - libEzsp.getSink().removeGpds(this->gpdRemoveList); /* FIXME: should not directly invoke methods on sink */ + if (!libEzsp.removeGPDevices(this->gpdRemoveList)) { + clogE << "Failed removing GPDs\n"; + } this->gpdRemoveList = std::vector(); } else if ((this->currentState == MainState::INIT_PENDING || @@ -114,7 +119,10 @@ class MainStateMachine { this->gpdAddList.size()) { /* Once init is done or optional GPD remove has been done... */ clogI << "Adding " << this->gpdAddList.size() << " provided GPDs\n"; this->currentState = MainState::ADD_GPD; - libEzsp.getSink().registerGpds(gpdAddList); /* FIXME: should not directly invoke methods on sink */ + if (!libEzsp.addGPDevices(this->gpdAddList)) { + clogE << "Failed adding GPDs\n"; + } + this->gpdAddList = std::vector(); } else if ((this->currentState == MainState::INIT_PENDING || this->currentState == MainState::REMOVE_ALL_GPD || @@ -122,13 +130,22 @@ class MainStateMachine { this->currentState == MainState::ADD_GPD) && this->openGpCommissionningAtStartup) { /* Once init is done or optional GPD remove and addition has been done... */ clogI << "Opening GP commisionning session\n"; - libEzsp.getSink().openCommissioningSession(); /* FIXME: should not directly invoke methods on sink */ + clogE << "Not implemented yet\n"; + exit(1); + //libEzsp.getSink().openCommissioningSession(); /* FIXME: should not directly invoke methods on sink */ } - /*else if ((this->authorizeChRqstAnswerTimeout) { - libEzsp.getSink().authorizeAnswerToGpfChannelRqst(true); + else if ((this->currentState == MainState::INIT_PENDING || + this->currentState == MainState::REMOVE_ALL_GPD || + this->currentState == MainState::REMOVE_SPECIFIC_GPD || + this->currentState == MainState::ADD_GPD) && + this->channelRequestAnswerTimeoutAtStartup) { /* Once init is done or optional GPD remove and addition has been done... */ + clogI << "Opening GP channel request window for " << static_cast(this->channelRequestAnswerTimeoutAtStartup) << "s\n"; + clogE << "Not implemented yet\n"; + // iflibEzsp.getSink().authorizeAnswerToGpfChannelRqst(true); // start timer - timer->start( static_cast(this->authorizeChRqstAnswerTimeout*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); - }*/ + //timer->start( static_cast(this->channelRequestAnswerTimeoutAtStartup*1000), [&](ITimer *ipTimer){this->chRqstTimeout();} ); + exit(1); + } else { /* No preparation step remains... we can swich to normal run state */ clogI << "Preparation steps finished... switching to run state\n"; this->currentState = MainState::RUN; @@ -138,16 +155,17 @@ class MainStateMachine { } private: + unsigned int initFailures; /*!< How many failed init cycles we have done so far */ CLibEzspMain& libEzsp; bool resetAtStartup; bool openGpCommissionningAtStartup; - uint8_t authorizeChannelRequestAnswerTimeoutAtStartup; + uint8_t channelRequestAnswerTimeoutAtStartup; /*!< During how many second (after startup), we will anwser to a channel request */ bool openZigbeeCommissionningAtStartup; unsigned int channel; - bool removeAllGPDAtStartup; - std::vector gpdAddList; - std::vector gpdRemoveList; - MainState currentState; + bool removeAllGPDAtStartup; /*!< A flag to remove all GP devices from monitoring */ + std::vector gpdAddList; /*!< The list of GP devices to add to the previous monitoring */ + std::vector gpdRemoveList; /*!< A list of source IDs for GP devices to remove from previous monitoring */ + MainState currentState; /*!< Our current state (for the internal state machine) */ }; int main(int argc, char **argv) { diff --git a/src/ezsp/lib-ezsp-main.cpp b/src/ezsp/lib-ezsp-main.cpp index baaad03e..051424ab 100644 --- a/src/ezsp/lib-ezsp-main.cpp +++ b/src/ezsp/lib-ezsp-main.cpp @@ -55,7 +55,7 @@ void CLibEzspMain::setState( CLibEzspState i_new_state ) CLibEzspState CLibEzspMain::getState() const { - return lib_state; + return this->lib_state; } void CLibEzspMain::dongleInit(uint8_t ezsp_version) @@ -189,6 +189,39 @@ void CLibEzspMain::handleDongleState( EDongleState i_state ) } } +bool CLibEzspMain::clearAllGPDevices() +{ + if (this->getState() != CLibEzspState::READY) + return false; + if (!this->gp_sink.gpClearAllTables()) + return false; /* Probably sink is not ready */ + + this->setState(CLibEzspState::SINK_BUSY); + return true; +} + +bool CLibEzspMain::removeGPDevices(std::vector& sourceIdList) +{ + if (this->getState() != CLibEzspState::READY) + return false; + if (!this->gp_sink.removeGpds(sourceIdList)) + return false; /* Probably sink is not ready */ + + this->setState(CLibEzspState::SINK_BUSY); + return true; +} + +bool CLibEzspMain::addGPDevices(const std::vector &gpDevicesList) +{ + if (this->getState() != CLibEzspState::READY) + return false; + if (!this->gp_sink.registerGpds(gpDevicesList)) + return false; /* Probably sink is not ready */ + + this->setState(CLibEzspState::SINK_BUSY); + return true; +} + void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_msg_receive ) { //-- clogD << "CLibEzspMain::handleEzspRxMessage " << CEzspEnum::EEzspCmdToString(i_cmd) << std::endl; @@ -201,17 +234,17 @@ void CLibEzspMain::handleEzspRxMessage( EEzspCmd i_cmd, std::vector i_m clogD << "CEZSP_STACK_STATUS_HANDLER status : " << CEzspEnum::EEmberStatusToString(status) << "\n"; if( (EMBER_NETWORK_UP == status) /*&& (false == reset_wanted)*/ ) { + this->setState(CLibEzspState::SINK_BUSY); /* Create a sink state change callback to find out when the sink is ready */ /* When the sink becomes ready, then libezsp will also switch to ready state */ auto clibobs = [this](ESinkState& i_state) -> bool { - clogD << "Underneath sink changed to state: " << static_cast(i_state) << "\n"; - if (ESinkState::SINK_READY == i_state) - { - this->setState(CLibEzspState::READY); - return true; /* Do not ask the caller to withdraw ourselves from the callback */ + clogD << "Underneath sink changed to state: " << static_cast(i_state) << ", current libezsp state: " << static_cast(this->getState()) << "\n"; + if (ESinkState::SINK_READY == i_state) { + if (this->getState() == CLibEzspState::SINK_BUSY) + this->setState(CLibEzspState::READY); } - return true; + return true; /* Do not ask the caller to withdraw ourselves from the callback */ }; gp_sink.registerStateCallback(clibobs); gp_sink.init(); /* When sink is ready, callback clibobs will invoke setState() */ diff --git a/src/ezsp/lib-ezsp-main.h b/src/ezsp/lib-ezsp-main.h index e1752b2f..fadff399 100644 --- a/src/ezsp/lib-ezsp-main.h +++ b/src/ezsp/lib-ezsp-main.h @@ -27,6 +27,7 @@ enum class CLibEzspState { READY, /* FGpdSourceIdCallback; /** * @brief Default constructor with minimal args to initialize library * @@ -47,8 +49,6 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CLibEzspMain(const CLibEzspMain&) = delete; /*gp_sink; } - /** * @brief Register callback on current library state * @@ -57,12 +57,42 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver void registerLibraryStateCallback(std::function newObsStateCallback); /** - * @brief Register callback to receive all incomming greenpower sourceId + * @brief Register callback to receive all incoming greenpower sourceId * * @param newObsGPSourceIdCallback A callback function of type void func(uint32_t &i_gpd_id, bool i_gpd_known, CGpdKeyStatus i_gpd_key_status), that will be invoked each time a new source ID transmits over the air (or nullptr to disable callbacks) */ - void registerGPSourceIdCallback(std::function newObsGPSourceIdCallback); + void registerGPSourceIdCallback(FGpdSourceIdCallback newObsGPSourceIdCallback); + /** + * @brief Remove GP all devices from sink + * + * After invoking this method, we won't process any message from any GP devices (but registerGPSourceIdCallback will still be triggered) + * + * @return true if the action is going to be run in the background, false if the sink is busy + */ + bool clearAllGPDevices(); + + /** + * @brief Remove a specific set of GP devices from sink (identified by their source ID value) + * + * After invoking this method, we won't process any message from the GP devices provided as argument (but registerGPSourceIdCallback will still be triggered) + * + * @param sourceIdList A list of source IDs to remove + * + * @return true if the action is going to be run in the background, false if the sink is busy + */ + bool removeGPDevices(std::vector& sourceIdList); + + /** + * @brief Add a specific set of GP devices from sink (identified by their source ID value+key) + * + * After invoking this method, we will start taking into acocunt all messages from the GP devices provided as argument + * + * @param gpDevicesList A list of CGpDevice objects containing source ID + key pairs to add + * + * @return true if the action is going to be run in the background, false if the sink is busy + */ + bool addGPDevices(const std::vector &gpDevicesList); private: uint8_t exp_ezsp_version; /*!< Expected EZSP version from dongle, at initial state then current version of dongle */ @@ -73,7 +103,7 @@ class CLibEzspMain : public CEzspDongleObserver, CGpObserver CZigbeeMessaging zb_messaging; /*!< Zigbee messages utility */ CZigbeeNetworking zb_nwk; /*!< Zigbee networking utility */ CGpSink gp_sink; /*!< Internal Green Power sink utility */ - std::function obsGPSourceIdCallback; /*!< Optional user callback invoked by us each time a green power message is received */ + FGpdSourceIdCallback obsGPSourceIdCallback; /*!< Optional user callback invoked by us each time a green power message is received */ void setState( CLibEzspState i_new_state ); CLibEzspState getState() const; diff --git a/src/ezsp/zigbee-tools/green-power-sink.cpp b/src/ezsp/zigbee-tools/green-power-sink.cpp index cb56d0e6..2e7a17e1 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.cpp +++ b/src/ezsp/zigbee-tools/green-power-sink.cpp @@ -106,22 +106,13 @@ void CGpSink::init() bool CGpSink::gpClearAllTables() { - bool lo_success = false; + if ( SINK_READY != sink_state ) + return false; - if( SINK_READY == sink_state ) - { - // sink table - dongle.sendCommand(EZSP_GP_SINK_TABLE_CLEAR_ALL); - - // proxy table - proxy_table_index = 0; - dongle.sendCommand(EZSP_GP_PROXY_TABLE_GET_ENTRY,{proxy_table_index}); - - // set state - setSinkState(SINK_CLEAR_ALL); - lo_success = true; - } - return lo_success; + dongle.sendCommand(EZSP_GP_SINK_TABLE_CLEAR_ALL); /* Handle sink table */ + dongle.sendCommand(EZSP_GP_PROXY_TABLE_GET_ENTRY,{0}); /* Handle proxy table */ + setSinkState(SINK_CLEAR_ALL); + return true; } void CGpSink::openCommissioningSession() @@ -142,9 +133,12 @@ void CGpSink::closeCommissioningSession() setSinkState(SINK_READY); } -void CGpSink::registerGpds( const std::vector &gpd ) +bool CGpSink::registerGpds( const std::vector &gpd ) { - // save offline information + if( SINK_READY != sink_state ) + return false; + + // Save GPD list in attributes for background processing gpds_to_register = gpd; // request sink table entry @@ -152,11 +146,16 @@ void CGpSink::registerGpds( const std::vector &gpd ) // set state setSinkState(SINK_COM_OFFLINE_IN_PROGRESS); + + return true; } -void CGpSink::removeGpds( const std::vector &gpd ) +bool CGpSink::removeGpds( const std::vector &gpd ) { - // save offline information + if( SINK_READY != sink_state ) + return false; + + // Save GPD list in attributes for background processing gpds_to_remove = gpd; // request sink table entry diff --git a/src/ezsp/zigbee-tools/green-power-sink.h b/src/ezsp/zigbee-tools/green-power-sink.h index 2ab88d97..95c4038e 100644 --- a/src/ezsp/zigbee-tools/green-power-sink.h +++ b/src/ezsp/zigbee-tools/green-power-sink.h @@ -71,15 +71,19 @@ class CGpSink : public CEzspDongleObserver * @brief Add a green power device to this sink * * @param gpd list of gpds to add + * + * @return true if action can be done */ - void registerGpds( const std::vector &gpd ); + bool registerGpds( const std::vector &gpd ); /** * @brief remove a green power device to this sink * * @param gpd list of gpds sourceId to remove + * + * @return true if action can be done */ - void removeGpds( const std::vector &gpd ); + bool removeGpds( const std::vector &gpd ); /** * @brief authorize answer to channel request From 054d810e23eee76f6b916f9d403bfefcd5e1e1a2 Mon Sep 17 00:00:00 2001 From: mchalain Date: Wed, 18 Dec 2019 16:26:28 +0100 Subject: [PATCH 054/413] [CR d4a03a6ee7e] Implementing limited duration for channel request answer --- example/mainEzspTest.cpp | 82 ++++++++++++++++++++++++++------------ src/ezsp/lib-ezsp-main.cpp | 13 ++++-- src/ezsp/lib-ezsp-main.h | 11 ++++- 3 files changed, 74 insertions(+), 32 deletions(-) diff --git a/example/mainEzspTest.cpp b/example/mainEzspTest.cpp index dca35fec..8fc87a64 100644 --- a/example/mainEzspTest.cpp +++ b/example/mainEzspTest.cpp @@ -23,17 +23,17 @@ static void writeUsage(const char* progname, FILE *f) { fprintf(f,"\n"); fprintf(f,"%s - sample test program for libezsp\n\n", progname); - fprintf(f,"Usage: %s [-d] [-u serialport] [-c channel] [-Z] [-C] [-G|[-r *|-r source_id [-r source_id2...]|-s source_id/key [-s source_id2/key...]]\n", progname); + fprintf(f,"Usage: %s [-d] [-u serialport] [-c channel] [-Z] [-C time] [-G|[-r *|-r source_id [-r source_id2...]] [-s source_id/key [-s source_id2/key...]]\n", progname); fprintf(f,"Available switches:\n"); - fprintf(f,"-h (--help) : this help\n"); - fprintf(f,"-d (--debug) : enable debug logs\n"); - fprintf(f,"-Z (--open-zigbee) : open the zigbee network at startup (for 60s)\n"); - fprintf(f,"-G (--open-gp-commissionning) : open the Green Power commissionning session at startup\n"); - fprintf(f,"-C (--authorize-ch-request-answer): Authorize answer to channel request command for x seconds\n"); - fprintf(f,"-u (--serial-port) : use a specific serial port (default: '/dev/ttyUSB0')\n"); - fprintf(f,"-c (--reset-to-channel) : force re-creation of a network on the specified channel (discards previously existing network)\n"); - fprintf(f,"-r (--remove-source-id) : remove a specific device from the monitored list, based on its source-id, use * to remove all (repeated -r options are allowed)\n"); - fprintf(f,"-s (--source-id) : adds a device to the monitored list, based on its source-id & key, id being formatted as a 8-digit hexadecimal string (eg: 'ffae1245'), and key as a 16-byte/32-digit hex string (repeated -s options are allowed)\n"); + fprintf(f,"-h (--help) : this help\n"); + fprintf(f,"-d (--debug) : enable debug logs\n"); + fprintf(f,"-Z (--open-zigbee) : open the zigbee network at startup (for 60s)\n"); + fprintf(f,"-G (--open-gp-commissionning) : open the Green Power commissionning session at startup\n"); + fprintf(f,"-C (--authorize-ch-request-answer)