flow_control: implement pass / drop filtering policies
This change introduces a set of three modes for flow control
filters, one of which is default behavor and two extra modes
else described below:
- FILTER_POLICY_PASS_ALL
- FILTER_POLICY_DROP_ALL
Both modes are opposite, and make a filter either unconditionally
pass or drop all the data one gets to the input. They would be
usable for some external usage.
diff --git a/include/grgsm/flow_control/burst_timeslot_filter.h b/include/grgsm/flow_control/burst_timeslot_filter.h
index 2f16b77..79d677c 100644
--- a/include/grgsm/flow_control/burst_timeslot_filter.h
+++ b/include/grgsm/flow_control/burst_timeslot_filter.h
@@ -25,6 +25,7 @@
#include <grgsm/api.h>
#include <gnuradio/block.h>
+#include <grgsm/flow_control/common.h>
namespace gr {
namespace gsm {
@@ -52,6 +53,10 @@
/* External API */
virtual unsigned int get_tn(void) = 0;
virtual unsigned int set_tn(unsigned int tn) = 0;
+
+ /* Filtering policy */
+ virtual filter_policy get_policy(void) = 0;
+ virtual filter_policy set_policy(filter_policy policy) = 0;
};
} // namespace gsm
} // namespace gr