aboutsummaryrefslogtreecommitdiffstats
path: root/lib/flow_control
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2016-02-28 11:25:52 +0100
committerPiotr Krysik <ptrkrysik@gmail.com>2016-02-28 11:25:52 +0100
commit4ea1b92ff5a96d4748108a1d54dbc0e8dd6df5a2 (patch)
tree11e53f5800e98c988f90df468e7a7cbd57f36259 /lib/flow_control
parentae3470dff3a1385f2bd6ef65788ce980a6cc67b8 (diff)
Correction of the last merge
Diffstat (limited to 'lib/flow_control')
-rw-r--r--lib/flow_control/burst_sdcch_subslot_filter_impl.cc15
-rw-r--r--lib/flow_control/burst_sdcch_subslot_splitter_impl.cc22
2 files changed, 14 insertions, 23 deletions
diff --git a/lib/flow_control/burst_sdcch_subslot_filter_impl.cc b/lib/flow_control/burst_sdcch_subslot_filter_impl.cc
index 8e8a66c..31e2989 100644
--- a/lib/flow_control/burst_sdcch_subslot_filter_impl.cc
+++ b/lib/flow_control/burst_sdcch_subslot_filter_impl.cc
@@ -47,7 +47,8 @@ namespace gr {
: gr::block("burst_sdcch_subslot_filter",
gr::io_signature::make(0, 0, 0),
gr::io_signature::make(0, 0, 0)),
- d_mode(mode)
+ d_mode(mode),
+ d_subslot(subslot)
{
message_port_register_in(pmt::mp("in"));
message_port_register_out(pmt::mp("out"));
@@ -61,18 +62,18 @@ namespace gr {
burst_sdcch_subslot_filter_impl::~burst_sdcch_subslot_filter_impl() {}
void burst_sdcch_subslot_filter_impl::process_burst(pmt::pmt_t msg)
- {
+ {
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
// -1 means that the particular position in the frame is not SDCCH
static const int8_t subslots_sdcch4[102] = {
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
- -1,-1,-1,-1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 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
};
-
+
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
diff --git a/lib/flow_control/burst_sdcch_subslot_splitter_impl.cc b/lib/flow_control/burst_sdcch_subslot_splitter_impl.cc
index 4115634..90237d9 100644
--- a/lib/flow_control/burst_sdcch_subslot_splitter_impl.cc
+++ b/lib/flow_control/burst_sdcch_subslot_splitter_impl.cc
@@ -30,16 +30,6 @@
#include <grgsm/endian.h>
#include <grgsm/gsmtap.h>
-static const int8_t subslots_sdcch4[102] = {
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
-};
-static const int8_t subslots_sdcch8[102] = {
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
-};
-
-
namespace gr {
namespace gsm {
@@ -86,14 +76,14 @@ namespace gr {
// hardcoded subslots of the channels, both SDCCH and the associated SACCH
// -1 means that the particular position in the frame is not SDCCH
static const int8_t subslots_sdcch4[102] = {
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
- -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,
+ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 1, 1, 1, 1,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1, 2, 2, 2, 2, 3, 3, 3, 3,-1
};
static const int8_t subslots_sdcch8[102] = {
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
+ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,-1,-1,-1,
+ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,-1,-1,-1
};
-
+
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_plus_burst);
@@ -101,7 +91,7 @@ namespace gr {
uint32_t fn_mod102 = frame_nr % 102;
int8_t subslot;
-
+
if (d_mode == SPLITTER_SDCCH8)
{
subslot = subslots_sdcch8[fn_mod102];