- added simple pattern matcher

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@428 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-02-11 18:07:31 +00:00
parent 559bb77b34
commit 8c87efc10e
2 changed files with 97 additions and 61 deletions
+15 -12
View File
@@ -28,27 +28,30 @@ namespace gr {
class bit_packer_impl : public bit_packer
{
private:
private:
// Nothing to declare in this block.
int m_inputCounter;
int m_outputCounter;
int m_numBitsIn;
int m_numBitsOut;
int m_endianess;
int m_output;
int m_gapCount;
public:
bit_packer_impl(int numBitsIn, int numBitsOut, int endianess);
~bit_packer_impl();
int m_patternMatchCount[2];
static const uint8_t m_pattern[2][18];
void patternMatchProcess(uint8_t byte);
void patternMatchReset();
void reset();
public:
bit_packer_impl(int numBitsIn, int numBitsOut, int endianess);
~bit_packer_impl();
// Where all the action really happens
void forecast (int noutput_items, gr_vector_int &ninput_items_required);
// Where all the action really happens
void forecast (int noutput_items, gr_vector_int &ninput_items_required);
int general_work(int noutput_items,
gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
int general_work(int noutput_items,
gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
};
} // namespace jay