Add control channels demappers tests
3GPP TS 45.002 version 15.1.0 Release 15
Table 3 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Table 4 : Mapping of logical channels onto physical channels (see subclauses 6.3, 6.4, 6.5)
Figure 8a: TDMA frame mapping for FCCH + SCH + BCCH + CCCH
Figure 8b: TDMA frame mapping for FCCH + SCH + BCCH + CCCH + SDCCH/4(0...3) + SACCH/4(0...3)
Five of the six tests currently fail and are marked with
@unittest.expectedFailure. Fixes in subsequent commits.
Change-Id: I33b0948832a0c2506bffd389cc134c3236c74d27
diff --git a/lib/qa_utils/burst_sink_impl.cc b/lib/qa_utils/burst_sink_impl.cc
index bdc2192..5151bf6 100644
--- a/lib/qa_utils/burst_sink_impl.cc
+++ b/lib/qa_utils/burst_sink_impl.cc
@@ -90,6 +90,8 @@
d_framenumbers.push_back(frame_nr);
d_timeslots.push_back(header->timeslot);
d_burst_data.push_back(burst_str.str());
+ d_sub_types.push_back(header->sub_type);
+ d_sub_slots.push_back(header->sub_slot);
}
std::vector<int> burst_sink_impl::get_framenumbers()
@@ -110,6 +112,14 @@
{
return d_bursts;
}
+ std::vector<uint8_t> burst_sink_impl::get_sub_types()
+ {
+ return d_sub_types;
+ }
+ std::vector<uint8_t> burst_sink_impl::get_sub_slots()
+ {
+ return d_sub_slots;
+ }
} /* namespace gsm */
} /* namespace gr */
diff --git a/lib/qa_utils/burst_sink_impl.h b/lib/qa_utils/burst_sink_impl.h
index e87422d..15e3bcf 100644
--- a/lib/qa_utils/burst_sink_impl.h
+++ b/lib/qa_utils/burst_sink_impl.h
@@ -36,6 +36,8 @@
std::vector<int> d_timeslots;
std::vector<std::string> d_burst_data;
pmt::pmt_t d_bursts;
+ std::vector<uint8_t> d_sub_types;
+ std::vector<uint8_t> d_sub_slots;
public:
burst_sink_impl();
~burst_sink_impl();
@@ -44,6 +46,8 @@
virtual std::vector<int> get_timeslots();
virtual std::vector<std::string> get_burst_data();
virtual pmt::pmt_t get_bursts();
+ virtual std::vector<uint8_t> get_sub_types();
+ virtual std::vector<uint8_t> get_sub_slots();
};
} // namespace gsm
diff --git a/lib/qa_utils/burst_source_impl.cc b/lib/qa_utils/burst_source_impl.cc
index f415eaf..276ed0e 100644
--- a/lib/qa_utils/burst_source_impl.cc
+++ b/lib/qa_utils/burst_source_impl.cc
@@ -52,7 +52,8 @@
: gr::block("burst_source",
gr::io_signature::make(0, 0, 0),
gr::io_signature::make(0, 0, 0)),
- d_finished(false)
+ d_finished(false),
+ d_arfcn(0)
{
message_port_register_out(pmt::mp("out"));
set_framenumbers(framenumbers);
@@ -85,6 +86,11 @@
d_burst_data = burst_data;
}
+ void burst_source_impl::set_arfcn(uint16_t arfcn)
+ {
+ d_arfcn = arfcn;
+ }
+
bool burst_source_impl::start()
{
d_finished = false;
@@ -122,7 +128,7 @@
tap_header->timeslot = d_timeslots[i];
tap_header->frame_number = htobe32(d_framenumbers[i]);
tap_header->sub_type = GSMTAP_BURST_NORMAL;
- tap_header->arfcn = 0;
+ tap_header->arfcn = d_arfcn;
tap_header->signal_dbm = 0;
tap_header->snr_db = 0;
diff --git a/lib/qa_utils/burst_source_impl.h b/lib/qa_utils/burst_source_impl.h
index cc7d9b4..bbcfd98 100644
--- a/lib/qa_utils/burst_source_impl.h
+++ b/lib/qa_utils/burst_source_impl.h
@@ -40,6 +40,7 @@
std::vector<int> d_timeslots;
std::vector<std::string> d_burst_data;
bool d_finished;
+ uint16_t d_arfcn;
void run();
public:
burst_source_impl(const std::vector<int> &framenumbers,
@@ -49,6 +50,7 @@
virtual void set_framenumbers(const std::vector<int> &framenumbers);
virtual void set_timeslots(const std::vector<int> ×lots);
virtual void set_burst_data(const std::vector<std::string> &burst_data);
+ virtual void set_arfcn(uint16_t arfcn);
bool start();
bool stop();
bool finished();