From 91195eb5bfdf124b7dfaabfeae552b8050738aca Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 21 Jul 2017 06:39:40 +0700 Subject: burst_timeslot_filter: implement and expose GET/SET API --- lib/flow_control/burst_timeslot_filter_impl.cc | 19 +++++++++++++++++++ lib/flow_control/burst_timeslot_filter_impl.h | 4 ++++ 2 files changed, 23 insertions(+) (limited to 'lib') diff --git a/lib/flow_control/burst_timeslot_filter_impl.cc b/lib/flow_control/burst_timeslot_filter_impl.cc index ccf4d4c..20306d1 100644 --- a/lib/flow_control/burst_timeslot_filter_impl.cc +++ b/lib/flow_control/burst_timeslot_filter_impl.cc @@ -73,5 +73,24 @@ namespace gr { message_port_pub(pmt::mp("out"), msg); } } + + /* + * External API + */ + unsigned int + burst_timeslot_filter_impl::get_tn(void) + { + return d_timeslot; + } + + unsigned int + burst_timeslot_filter_impl::set_tn(unsigned int tn) + { + if (tn < 8) + d_timeslot = tn; + + return d_timeslot; + } + } /* namespace gsm */ } /* namespace gr */ diff --git a/lib/flow_control/burst_timeslot_filter_impl.h b/lib/flow_control/burst_timeslot_filter_impl.h index f7b0b2d..130047e 100644 --- a/lib/flow_control/burst_timeslot_filter_impl.h +++ b/lib/flow_control/burst_timeslot_filter_impl.h @@ -36,6 +36,10 @@ namespace gr { burst_timeslot_filter_impl(unsigned int timeslot); ~burst_timeslot_filter_impl(); void process_burst(pmt::pmt_t msg); + + /* External API */ + unsigned int get_tn(void); + unsigned int set_tn(unsigned int tn); }; } // namespace gsm -- cgit v1.2.3