| 31 | }; |
| 32 | |
| 33 | FeedResult feedBits(HdlcCodec& codec, const std::vector<uint8_t>& nrzi) |
| 34 | { |
| 35 | FeedResult r; |
| 36 | for (uint8_t bit : nrzi) { |
| 37 | if (codec.processBit(bit)) { |
| 38 | ++r.frames; |
| 39 | if (codec.fcsValid()) |
| 40 | ++r.goodFcs; |
| 41 | } |
| 42 | } |
| 43 | return r; |
| 44 | } |
| 45 | |
| 46 | // Build a known AX.25 packet using libmodem and NRZI-encode it. |
| 47 | // Returns the NRZI bitstream (one byte per bit, values 0/1). |
no test coverage detected