From f5a355cc8f70003a498f1414c8255ace115e6be6 Mon Sep 17 00:00:00 2001 From: laranjeiro Date: Mon, 17 May 2010 09:38:52 +0000 Subject: cesar/bsu: add bsu params at the end of the beacon block, * add pbproc_rx_beacon_params_t into bsu_params_t * change the callback params type. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7038 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/bsu/test/utest/src/bsut.c | 4 ++-- cesar/bsu/test/utest/src/interface.c | 14 ++++++-------- cesar/bsu/test/utest/src/tests.c | 10 +++------- cesar/bsu/test/utest/tests.h | 4 +--- 4 files changed, 12 insertions(+), 20 deletions(-) (limited to 'cesar/bsu/test/utest') diff --git a/cesar/bsu/test/utest/src/bsut.c b/cesar/bsu/test/utest/src/bsut.c index 139e2a7acf..77ff1e7ed3 100644 --- a/cesar/bsu/test/utest/src/bsut.c +++ b/cesar/bsu/test/utest/src/bsut.c @@ -273,7 +273,7 @@ test_case_bsu_timer_event (test_t test) bsu_update (&beacon, false /* CCo */); bsu_timer_event_process (t.bsu); test_fail_unless (t.ul.beacon != INVALID_PTR); - test_fail_unless (t.ul.pparams != INVALID_PTR); + test_fail_unless (t.ul.bparams != INVALID_PTR); /* Release the reference handled by the CP. */ blk_release_desc ((blk_t*) t.ul.beacon); mfs = mac_store_mfs_get (t.mac_store, true, true, false, @@ -289,7 +289,7 @@ test_case_bsu_timer_event (test_t test) bsu_avln_schedules_beacon_not_received (t.bsu, &cmp_avln); bsu_timer_event_process (t.bsu); test_fail_unless (t.ul.beacon != INVALID_PTR); - test_fail_unless (t.ul.pparams != INVALID_PTR); + test_fail_unless (t.ul.bparams != INVALID_PTR); blk_release_desc ((blk_t*) t.ul.beacon); for (j = 0; j < cmp_avln.bs.schedules.ps.nb; j++) { diff --git a/cesar/bsu/test/utest/src/interface.c b/cesar/bsu/test/utest/src/interface.c index 308d322ea0..fc18c5707f 100644 --- a/cesar/bsu/test/utest/src/interface.c +++ b/cesar/bsu/test/utest/src/interface.c @@ -62,13 +62,12 @@ test_case_bsu_interface_tx (test_t t, bsu_beacon_type_t type) else test_fail_unless (test.sar.mfs->cap == 0x2); test_fail_unless (test.ul.beacon == beacon); - test_fail_unless (test.ul.pparams == NULL); - test_fail_unless (test.ul.bparams.direction + test_fail_unless (test.ul.bparams->direction == BSU_BEACON_DIRECTION_TO_PLC); - test_fail_unless (test.ul.bparams.frequency_error + test_fail_unless (test.ul.bparams->frequency_error == FIXED(test.bsu->avlns[0].sync.fe, BSU_NTB_FIXED_POINT)); - test_fail_unless (test.ul.bparams.tick_offset + test_fail_unless (test.ul.bparams->ntb_offset_tck == test.bsu->avlns[0].sync.ntb_offset_tck); /* Free the beacon. */ blk_release_desc ((blk_t*) beacon); @@ -104,13 +103,12 @@ test_case_bsu_interface_rx (test_t t) beacon->phy_pb.pb_rx.pb_measurement.crc_error = false; bsu_beacon_recv (test.bsu, beacon, &rx_params); test_fail_unless (test.ul.beacon == beacon); - test_fail_unless (test.ul.pparams == &rx_params); - test_fail_unless (test.ul.bparams.direction + test_fail_unless (test.ul.bparams->direction == BSU_BEACON_DIRECTION_FROM_PLC); - test_fail_unless (test.ul.bparams.frequency_error + test_fail_unless (test.ul.bparams->frequency_error == FIXED(test.bsu->avlns[0].sync.fe, BSU_NTB_FIXED_POINT)); - test_fail_unless (test.ul.bparams.tick_offset + test_fail_unless (test.ul.bparams->ntb_offset_tck == test.bsu->avlns[0].sync.ntb_offset_tck); bsu_test_uninit (&test); blk_release_desc ((blk_t*) beacon); diff --git a/cesar/bsu/test/utest/src/tests.c b/cesar/bsu/test/utest/src/tests.c index 1fd72598ad..d1804717df 100644 --- a/cesar/bsu/test/utest/src/tests.c +++ b/cesar/bsu/test/utest/src/tests.c @@ -20,16 +20,12 @@ static void bsu_test_upper_layer_beacon_received (void *ctx, pb_beacon_t *beacon, - pbproc_rx_beacon_params_t *params, - bsu_params_t bparams) + bsu_params_t *bparams) { bsu_test_t *test = (bsu_test_t*) ctx; dbg_assert (ctx); test->ul.beacon = beacon; - test->ul.pparams = params; - test->ul.bparams.direction = bparams.direction; - test->ul.bparams.frequency_error = bparams.frequency_error; - test->ul.bparams.tick_offset = bparams.tick_offset; + test->ul.bparams = bparams; } void @@ -37,7 +33,7 @@ bsu_test_upper_layer_beacon_received_init (bsu_test_t *ctx) { dbg_assert (ctx); ctx->ul.beacon = INVALID_PTR; - ctx->ul.pparams = INVALID_PTR; + ctx->ul.bparams = INVALID_PTR; } void diff --git a/cesar/bsu/test/utest/tests.h b/cesar/bsu/test/utest/tests.h index a649bd5a3d..ff59576c09 100644 --- a/cesar/bsu/test/utest/tests.h +++ b/cesar/bsu/test/utest/tests.h @@ -52,10 +52,8 @@ struct bsu_test_ul_t { /** Beacon sent. */ pb_beacon_t *beacon; - /** PHY RX params. */ - pbproc_rx_beacon_params_t *pparams; /** BSU beacon params. */ - bsu_params_t bparams; + bsu_params_t *bparams; }; typedef struct bsu_test_ul_t bsu_test_ul_t; -- cgit v1.2.3