summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/test/src/test_intervals.c
diff options
context:
space:
mode:
authorCyril Jourdan2013-05-29 16:55:19 +0200
committerCyril Jourdan2013-06-14 15:47:14 +0200
commitf51447d76cb61f2632e0ec1eff1bcf63164d00e5 (patch)
treebc78bc615c5750a3d6b80edd97071573bd643009 /cesar/ce/rx/bitloading/test/src/test_intervals.c
parentab201b5e54d2c07c489cf7fac7bcb4581a5a7ab6 (diff)
cesar/ce/rx/bl: remove unused functions, refs #4018
Those functions are no longer necessary since it is the PBProc that does the matching between frames received and intervals.
Diffstat (limited to 'cesar/ce/rx/bitloading/test/src/test_intervals.c')
-rw-r--r--cesar/ce/rx/bitloading/test/src/test_intervals.c161
1 files changed, 0 insertions, 161 deletions
diff --git a/cesar/ce/rx/bitloading/test/src/test_intervals.c b/cesar/ce/rx/bitloading/test/src/test_intervals.c
index 50e1cd88d9..ff32aaefa4 100644
--- a/cesar/ce/rx/bitloading/test/src/test_intervals.c
+++ b/cesar/ce/rx/bitloading/test/src/test_intervals.c
@@ -137,163 +137,6 @@ test_suite_ce_rx_bl_intervals_get_tmi_used_list (test_t t)
ce_rx_bl_intervals_repetition_count_ = old_repetition_nb;
}
-/**
- * Time transformation from pbproc information to ATU.
- */
-void
-test_suite_ce_rx_bl_intervals_measure_to_date (test_t t)
-{
- test_case_begin (t, "Time transformation from pbproc timing to ATU");
- s16 start = 0, end = 0;
- pbproc_rx_params_t rxp;
-
- test_begin (t, "Classic value")
- {
- rxp.preamble_ntb = 2000000;
- rxp.beacon_period_start_ntb = 1000000;
- rxp.fl_tck = 1000;
- ce_rx_bl_intervals_measure_to_date (&rxp, &start, &end);
- s16 computed_start = MAC_TCK_TO_ATU (
- ((MAC_PREAMBLE_HYBRID_TCK + MAC_FC_10_TCK + MAC_FC_AV_TCK)
- + (MAC_PREAMBLE_TCK + MAC_FC_AV_TCK)) / 2 + 1000000);
- test_fail_unless (computed_start == start);
- test_fail_unless (end == start + (s16) MAC_TCK_TO_ATU (rxp.fl_tck));
- } test_end;
-
- test_begin (t, "Beacon period start after preamble")
- {
- rxp.preamble_ntb = 1000;
- rxp.beacon_period_start_ntb = 2000;
- rxp.fl_tck = 1000;
- ce_rx_bl_intervals_measure_to_date (&rxp, &start, &end);
- s16 computed_start = MAC_TCK_TO_ATU (
- ((MAC_PREAMBLE_HYBRID_TCK + MAC_FC_10_TCK + MAC_FC_AV_TCK)
- + (MAC_PREAMBLE_TCK + MAC_FC_AV_TCK)) / 2 + (s32) (1000 - 2000));
- test_fail_unless (computed_start == start);
- test_fail_unless (end == start + (s16) MAC_TCK_TO_ATU (rxp.fl_tck));
- } test_end;
-
- test_begin (t, "Overflowed counter value")
- {
- rxp.preamble_ntb = 1;
- rxp.beacon_period_start_ntb = 0xfffff000;
- rxp.fl_tck = 1000;
- ce_rx_bl_intervals_measure_to_date (&rxp, &start, &end);
- s16 computed_start = MAC_TCK_TO_ATU (
- ((MAC_PREAMBLE_HYBRID_TCK + MAC_FC_10_TCK + MAC_FC_AV_TCK)
- + (MAC_PREAMBLE_TCK + MAC_FC_AV_TCK)) / 2 + (s32) (1 - 0xfffff000));
- test_fail_unless (computed_start == start);
- test_fail_unless (end == start + (s16) MAC_TCK_TO_ATU (rxp.fl_tck));
- } test_end;
-}
-
-/*
- * Test suite for measure to interval computation.
- */
-void
-test_suite_ce_rx_bl_intervals_measure_to_interval (test_t t)
-{
- test_case_begin (t, "Measure to interval");
-
- test_begin (t, "Global measure")
- {
- tonemaps_t *tms = tonemaps_alloc ();
- int int_nb = 0;
- uint bp = MAC_TCK_TO_ATU (BSU_ACLF_BP_50HZ_TCK);
- int end_offset_atu = 0;
- do
- {
- end_offset_atu = ++int_nb * bp / 24;
- int_nb = mac_interval_append (tms, end_offset_atu, 51);
- } while (int_nb != 24);
- mac_interval_commit_changes (tms, 0);
-
- int i = ce_rx_bl_intervals_measure_to_interval (tms, bp / 4, bp / 2);
- test_fail_if (i != -1);
- tonemaps_release (tms);
- } test_end;
-
- test_begin (t, "Global measure no existing interval")
- {
- tonemaps_t *tms = tonemaps_alloc ();
- uint bp = MAC_TCK_TO_ATU (BSU_ACLF_BP_50HZ_TCK);
-
- /* No interval so the measure should be global. */
- int i = ce_rx_bl_intervals_measure_to_interval (tms, 0, bp / 48);
- test_fail_if (i != -1);
- tonemaps_release (tms);
- } test_end;
-
- test_begin (t, "Measure position shift ok")
- {
- tonemaps_t *tms = tonemaps_alloc ();
- int int_nb = 0;
- uint bp = MAC_TCK_TO_ATU (BSU_ACLF_BP_50HZ_TCK);
- int end_offset_atu = 0;
- do
- {
- end_offset_atu = ++int_nb * bp / 24;
- int_nb = mac_interval_append (tms, end_offset_atu, 51);
- } while (int_nb != 24);
- mac_interval_commit_changes (tms, 0);
-
- int a;
- for (a = 0; a < 24; a++)
- {
- int i = ce_rx_bl_intervals_measure_to_interval (
- tms,
- a == 0 ? 0 : a * bp / 24
- - MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK),
- (a + 1) * bp / 24
- + MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK) - 1);
- test_fail_if (i != a);
- }
- tonemaps_release (tms);
- } test_end;
-
- test_begin (t, "Measure position shift fail start")
- {
- tonemaps_t *tms = tonemaps_alloc ();
- int int_nb = 0;
- uint bp = MAC_TCK_TO_ATU (BSU_ACLF_BP_50HZ_TCK);
- int end_offset_atu = 0;
- do
- {
- end_offset_atu = ++int_nb * bp / 24;
- int_nb = mac_interval_append (tms, end_offset_atu, 51);
- } while (int_nb != 24);
- mac_interval_commit_changes (tms, 0);
-
- int i = ce_rx_bl_intervals_measure_to_interval (
- tms,
- bp / 24 - MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK) - 1,
- 2 * bp / 24 + MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK) - 1);
- test_fail_if (i != -1);
- tonemaps_release (tms);
- } test_end;
-
- test_begin (t, "Measure position shift fail end")
- {
- tonemaps_t *tms = tonemaps_alloc ();
- int int_nb = 0;
- uint bp = MAC_TCK_TO_ATU (BSU_ACLF_BP_50HZ_TCK);
- int end_offset_atu = 0;
- do
- {
- end_offset_atu = ++int_nb * bp / 24;
- int_nb = mac_interval_append (tms, end_offset_atu, 51);
- } while (int_nb != 24);
- mac_interval_commit_changes (tms, 0);
-
- int i = ce_rx_bl_intervals_measure_to_interval (
- tms,
- bp / 24 - MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK),
- 2 * bp / 24 + MAC_TCK_TO_ATU (MAC_TM_TOLERANCE_TCK));
- test_fail_if (i != -1);
- tonemaps_release (tms);
- } test_end;
-}
-
void
test_suite_ce_rx_bl_intervals_measure_to_event_master_test (
test_t t,
@@ -835,10 +678,6 @@ test_suite_ce_rx_bl_intervals (test_t t)
test_suite_ce_rx_bl_intervals_init (t);
/* Get used tonemap list. */
test_suite_ce_rx_bl_intervals_get_tmi_used_list (t);
- /* Time transformation from pbproc information to ATU. */
- test_suite_ce_rx_bl_intervals_measure_to_date (t);
- /* Measure to interval computation. */
- test_suite_ce_rx_bl_intervals_measure_to_interval (t);
/* Measure to event computation */
test_suite_ce_rx_bl_intervals_measure_to_event (t);
/* Updating TMI of intervals. */