22 #ifndef INCLUDED_GR_CHECK_LFSR_32K_S_H
23 #define INCLUDED_GR_CHECK_LFSR_32K_S_H
55 unsigned int d_history;
61 static const int BUFSIZE = 2048 - 1;
63 unsigned short d_buffer[BUFSIZE];
68 void enter_SEARCHING ();
75 d_history = (d_history << 1) | 0x1;
81 d_history = (d_history << 1) | 0x0;
85 bool right_three_times () {
return (d_history & 0x7) == 0x7; }
86 bool wrong_three_times () {
return (d_history & 0x7) == 0x0; }
88 void log_error (
unsigned short expected,
unsigned short actual);
92 int work (
int noutput_items,
93 gr_vector_const_void_star &input_items,
94 gr_vector_void_star &output_items);
96 long ntotal ()
const {
return d_ntotal; }
97 long nright ()
const {
return d_nright; }
Definition: gr_sync_block.h:27
GR_CORE_API gr_check_lfsr_32k_s_sptr gr_make_check_lfsr_32k_s()
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define GR_CORE_API
Definition: gr_core_api.h:30
long ntotal() const
Definition: gr_check_lfsr_32k_s.h:96
long runlength() const
Definition: gr_check_lfsr_32k_s.h:98
sink that checks if its input stream consists of a lfsr_32k sequence.This sink is typically used alon...
Definition: gr_check_lfsr_32k_s.h:42
virtual int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
just like gr_block::general_work, only this arranges to call consume_each for you ...
long nright() const
Definition: gr_check_lfsr_32k_s.h:97