summaryrefslogtreecommitdiff
path: root/gr-digital/lib
diff options
context:
space:
mode:
authorJosh Blum2013-04-06 13:19:12 -0700
committerJosh Blum2013-04-06 13:19:12 -0700
commit82d7cf75c5c8891d25379e4d60c0f90bad2d57d2 (patch)
treeb032c2e7cb974cdebe065d59a3dad7edba4777ea /gr-digital/lib
parent9b7dec28d8554de385f591f8485f1f322d25fccc (diff)
downloadgnuradio-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/lib')
-rw-r--r--gr-digital/lib/digital_framer_sink_1.cc40
1 files changed, 1 insertions, 39 deletions
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;
}