MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / feedBits

Function feedBits

tests/hdlc_codec_test.cpp:33–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31};
32
33FeedResult 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).

Callers 4

testSingleFrameFunction · 0.85
testTwoConsecutiveFramesFunction · 0.85
testResetFunction · 0.85
testLongPayloadFunction · 0.85

Calls 2

fcsValidMethod · 0.80
processBitMethod · 0.45

Tested by

no test coverage detected