245 int fcserrcount = 0, framecount = 0;
246 int hdlcbytecount = 0, databytecount = 0;
254 for (
int s = 0; s <
NSYNCS; ++s)
257 syncs[s].dec->reset();
263 int datasize, hdlc_errors, fcs_errors;
264 u8 *f =
syncs[s].dec->decode(&pin, pend - pin, &datasize, &hdlc_errors, &fcs_errors);
273 databytecount += datasize;
277 fcserrcount += fcs_errors;
278 framecount += fcs_errors;
288 for (
int s = 0; s <
NSYNCS; ++s)
298 for (
int s = 0; s <
NSYNCS; ++s)
299 if (total_errors[s] < total_errors[best])
307 fprintf(stderr,
"[%d:%d->%d:%d]",
cur_sync, total_errors[
cur_sync], best, total_errors[best]);
320 int datasize, hdlc_errors, fcs_errors;
321 u8 *f =
syncs[
cur_sync].dec->decode(&pin, pend - pin, &datasize, &hdlc_errors, &fcs_errors);
327 databytecount += datasize;
331 fcserrcount += fcs_errors;
332 framecount += fcs_errors;
pipewriter< int > * hdlcbytecount_out
static const int NERRHIST
pipewriter< int > * lock_out
struct leansdr::hdlc_sync::@7 syncs[NSYNCS]
void opt_write(pipewriter< T > *p, T val)
void output_frame(u8 *f, int size)
pipewriter< int > * framecount_out
bool opt_writable(pipewriter< T > *p, int n=1)
pipewriter< int > * fcserrcount_out
pipewriter< int > * databytecount_out
void read(unsigned long n)