diff options
author | Josh Blum | 2013-04-06 13:19:12 -0700 |
---|---|---|
committer | Josh Blum | 2013-04-06 13:19:12 -0700 |
commit | 82d7cf75c5c8891d25379e4d60c0f90bad2d57d2 (patch) | |
tree | b032c2e7cb974cdebe065d59a3dad7edba4777ea /gr-digital | |
parent | 9b7dec28d8554de385f591f8485f1f322d25fccc (diff) | |
download | gnuradio-82d7cf75c5c8891d25379e4d60c0f90bad2d57d2.tar.gz gnuradio-82d7cf75c5c8891d25379e4d60c0f90bad2d57d2.tar.bz2 gnuradio-82d7cf75c5c8891d25379e4d60c0f90bad2d57d2.zip |
gras: revert digital_framer_sink_1 changes
Just copied the modified digital_framer_sink_1 in extras.
Should make this more future proof.
Diffstat (limited to 'gr-digital')
-rw-r--r-- | gr-digital/include/digital_framer_sink_1.h | 6 | ||||
-rw-r--r-- | gr-digital/lib/digital_framer_sink_1.cc | 40 | ||||
-rw-r--r-- | gr-digital/swig/digital_framer_sink_1.i | 3 |
3 files changed, 1 insertions, 48 deletions
diff --git a/gr-digital/include/digital_framer_sink_1.h b/gr-digital/include/digital_framer_sink_1.h index f1f431af7..bb82bf5a7 100644 --- a/gr-digital/include/digital_framer_sink_1.h +++ b/gr-digital/include/digital_framer_sink_1.h @@ -33,9 +33,6 @@ typedef boost::shared_ptr<digital_framer_sink_1> digital_framer_sink_1_sptr; DIGITAL_API digital_framer_sink_1_sptr digital_make_framer_sink_1(gr_msg_queue_sptr target_queue); -DIGITAL_API digital_framer_sink_1_sptr -digital_make_framer_sink_1(void); - /*! * \brief Given a stream of bits and access_code flags, assemble packets. * \ingroup sink_blk @@ -59,9 +56,6 @@ class DIGITAL_API digital_framer_sink_1 : public gr_sync_block friend DIGITAL_API digital_framer_sink_1_sptr digital_make_framer_sink_1(gr_msg_queue_sptr target_queue); - friend DIGITAL_API digital_framer_sink_1_sptr - digital_make_framer_sink_1(void); - private: enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC, STATE_HAVE_HEADER}; diff --git a/gr-digital/lib/digital_framer_sink_1.cc b/gr-digital/lib/digital_framer_sink_1.cc index 913640114..ba1c5bd50 100644 --- a/gr-digital/lib/digital_framer_sink_1.cc +++ b/gr-digital/lib/digital_framer_sink_1.cc @@ -74,11 +74,6 @@ digital_make_framer_sink_1(gr_msg_queue_sptr target_queue) return gnuradio::get_initial_sptr(new digital_framer_sink_1(target_queue)); } -digital_framer_sink_1_sptr -digital_make_framer_sink_1(void) -{ - return gnuradio::get_initial_sptr(new digital_framer_sink_1(gr_msg_queue_sptr())); -} digital_framer_sink_1::digital_framer_sink_1(gr_msg_queue_sptr target_queue) : gr_sync_block ("framer_sink_1", @@ -86,11 +81,6 @@ digital_framer_sink_1::digital_framer_sink_1(gr_msg_queue_sptr target_queue) gr_make_io_signature (0, 0, 0)), d_target_queue(target_queue) { - if (!d_target_queue) - { - this->output_config(0).reserve_items = 4096; //max pkt frame possible - this->output_config(0).item_size = 1; - } enter_search(); } @@ -145,10 +135,6 @@ digital_framer_sink_1::work (int noutput_items, enter_have_header(payload_len, whitener_offset); if (d_packetlen == 0){ // check for zero-length payload - - if (d_target_queue) - { - // build a zero-length message // NOTE: passing header field as arg1 is not scalable gr_message_sptr msg = @@ -157,14 +143,6 @@ digital_framer_sink_1::work (int noutput_items, d_target_queue->insert_tail(msg); // send it msg.reset(); // free it up - } - else - { - gras::PacketMsg msg; - msg.info = PMC_M(d_packet_whitener_offset); - this->post_output_msg(0, PMC_M(msg)); - } - enter_search(); } } @@ -187,9 +165,6 @@ digital_framer_sink_1::work (int noutput_items, if (d_packetlen_cnt == d_packetlen){ // packet is filled - if (d_target_queue) - { - // build a message // NOTE: passing header field as arg1 is not scalable gr_message_sptr msg = @@ -199,17 +174,6 @@ digital_framer_sink_1::work (int noutput_items, d_target_queue->insert_tail(msg); // send it msg.reset(); // free it up - } - else - { - gras::PacketMsg msg; - msg.info = PMC_M(d_packet_whitener_offset); - msg.buff = this->get_output_buffer(0); - memcpy(msg.buff.get(), d_packet, d_packetlen_cnt); - msg.buff.length = d_packetlen_cnt; - this->post_output_msg(0, PMC_M(msg)); - } - enter_search(); break; } @@ -224,7 +188,5 @@ digital_framer_sink_1::work (int noutput_items, } // while - this->consume(0, noutput_items); - return 0; - //return noutput_items; + return noutput_items; } diff --git a/gr-digital/swig/digital_framer_sink_1.i b/gr-digital/swig/digital_framer_sink_1.i index b6e1e03b7..a5c56560d 100644 --- a/gr-digital/swig/digital_framer_sink_1.i +++ b/gr-digital/swig/digital_framer_sink_1.i @@ -25,9 +25,6 @@ GR_SWIG_BLOCK_MAGIC(digital,framer_sink_1); digital_framer_sink_1_sptr digital_make_framer_sink_1(gr_msg_queue_sptr target_queue); -digital_framer_sink_1_sptr -digital_make_framer_sink_1(void); - class digital_framer_sink_1 : public gr_sync_block { }; |