diff --git a/include/grgsm/flow_control/burst_sdcch_subslot_filter.h b/include/grgsm/flow_control/burst_sdcch_subslot_filter.h index 150d76a..5bcf829 100644 --- a/include/grgsm/flow_control/burst_sdcch_subslot_filter.h +++ b/include/grgsm/flow_control/burst_sdcch_subslot_filter.h @@ -54,6 +54,13 @@ namespace gr { * creating new instances. */ static sptr make(subslot_filter_mode mode, unsigned int subslot); + + /* External API */ + virtual unsigned int get_ss(void) = 0; + virtual unsigned int set_ss(unsigned int ss) = 0; + + virtual subslot_filter_mode get_mode(void) = 0; + virtual subslot_filter_mode set_mode(subslot_filter_mode mode) = 0; }; } // namespace gsm } // namespace gr diff --git a/lib/flow_control/burst_sdcch_subslot_filter_impl.cc b/lib/flow_control/burst_sdcch_subslot_filter_impl.cc index 31e2989..76bf9cd 100644 --- a/lib/flow_control/burst_sdcch_subslot_filter_impl.cc +++ b/lib/flow_control/burst_sdcch_subslot_filter_impl.cc @@ -101,5 +101,37 @@ namespace gr { message_port_pub(pmt::mp("out"), msg); } } + + /* External API */ + unsigned int + burst_sdcch_subslot_filter_impl::get_ss(void) + { + return d_subslot; + } + + unsigned int + burst_sdcch_subslot_filter_impl::set_ss(unsigned int ss) + { + if ((d_mode == SS_FILTER_SDCCH8 && ss < 8) + || (d_mode == SS_FILTER_SDCCH4 && ss < 4)) + d_subslot = ss; + + return d_subslot; + } + + + subslot_filter_mode + burst_sdcch_subslot_filter_impl::get_mode(void) + { + return d_mode; + } + + subslot_filter_mode + burst_sdcch_subslot_filter_impl::set_mode(subslot_filter_mode mode) + { + d_mode = mode; + return d_mode; + } + } /* namespace gsm */ } /* namespace gr */ diff --git a/lib/flow_control/burst_sdcch_subslot_filter_impl.h b/lib/flow_control/burst_sdcch_subslot_filter_impl.h index 40a603e..9068140 100644 --- a/lib/flow_control/burst_sdcch_subslot_filter_impl.h +++ b/lib/flow_control/burst_sdcch_subslot_filter_impl.h @@ -37,6 +37,13 @@ namespace gr { burst_sdcch_subslot_filter_impl(subslot_filter_mode mode, unsigned int subslot); ~burst_sdcch_subslot_filter_impl(); void process_burst(pmt::pmt_t msg); + + /* External API */ + unsigned int get_ss(void); + unsigned int set_ss(unsigned int ss); + + subslot_filter_mode get_mode(void); + subslot_filter_mode set_mode(subslot_filter_mode mode); }; } // namespace gsm