| 48 | } |
| 49 | |
| 50 | int main() |
| 51 | { |
| 52 | const std::vector<byte> fakeBytes1{byte{0x70}, |
| 53 | byte{0x24}, |
| 54 | ESC, |
| 55 | SOF, |
| 56 | ESC, |
| 57 | byte{'H'}, |
| 58 | byte{'e'}, |
| 59 | byte{'l'}, |
| 60 | byte{'l'}, |
| 61 | byte{'o'}, |
| 62 | ESC, |
| 63 | SOF, |
| 64 | byte{0x7}, |
| 65 | ESC, |
| 66 | SOF}; |
| 67 | |
| 68 | auto frameCompleteHandler = [](std::string& res) { printf("CCCB: %s\n", res.c_str()); }; |
| 69 | for(const auto& b : fakeBytes1) { ProcessNextByte(b, frameCompleteHandler); } |
| 70 | |
| 71 | puts("----------"); |
| 72 | |
| 73 | const std::vector<byte> fakeBytes2{ |
| 74 | byte{'W'}, byte{'o'}, byte{'r'}, byte{'l'}, byte{'d'}, ESC, SOF, byte{0x99}}; |
| 75 | |
| 76 | for(const auto& b : fakeBytes2) { ProcessNextByte(b, frameCompleteHandler); } |
| 77 | } |
nothing calls this directly
no test coverage detected