aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpiotr <Piotr Krysik pkrysik@elka.pw.edu.pl>2014-04-17 23:34:39 +0200
committerpiotr <Piotr Krysik pkrysik@elka.pw.edu.pl>2014-04-17 23:34:39 +0200
commit10cd1f4aabd38a8bb2f44f16d3f4eef5adb267f9 (patch)
tree064dea93833eab58132e89f0443f923fcad096c6 /lib
parentdb6c22117470a1c20ea592f5af467dac1b4492b0 (diff)
Corrected bcch get block so it writes all bursts forming bcch channel to the output
Diffstat (limited to 'lib')
-rw-r--r--lib/get_ccch_bursts_impl.cc7
-rw-r--r--lib/get_ccch_bursts_impl.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/get_ccch_bursts_impl.cc b/lib/get_ccch_bursts_impl.cc
index d75d8b1..066382b 100644
--- a/lib/get_ccch_bursts_impl.cc
+++ b/lib/get_ccch_bursts_impl.cc
@@ -35,7 +35,6 @@ namespace gr {
pmt::pmt_t content = pmt::cdr(msg);
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_blob);
uint32_t frame_nr = header->frame_number;
- pmt::pmt_t msgs[4];
uint32_t frame_numbers[4];
uint32_t fn_mod51 = header->frame_number % 51;
@@ -43,7 +42,7 @@ namespace gr {
if(fn_mod51>=2 && fn_mod51<=5){
uint32_t ii = fn_mod51-2;
frame_numbers[ii]=header->frame_number;
- msgs[ii] = msg;
+ d_msgs[ii] = msg;
}
if(fn_mod51==5){
@@ -57,8 +56,8 @@ namespace gr {
}
if(frames_are_consecutive){
//send bursts to the output
- for(int jj=1; jj<4; jj++){
- message_port_pub(pmt::mp("bursts_out"), msgs[jj]);
+ for(int jj=0; jj<4; jj++){
+ message_port_pub(pmt::mp("bursts_out"), d_msgs[jj]);
}
}
}
diff --git a/lib/get_ccch_bursts_impl.h b/lib/get_ccch_bursts_impl.h
index 992b181..773a0a4 100644
--- a/lib/get_ccch_bursts_impl.h
+++ b/lib/get_ccch_bursts_impl.h
@@ -28,7 +28,9 @@ namespace gr {
namespace gsm {
class get_ccch_bursts_impl : public get_ccch_bursts
- {
+ {
+ private:
+ pmt::pmt_t d_msgs[4];
public:
get_ccch_bursts_impl();
~get_ccch_bursts_impl();