summaryrefslogtreecommitdiff
path: root/cesar/bsu/test/utest
diff options
context:
space:
mode:
authorlaranjeiro2010-05-17 09:38:52 +0000
committerlaranjeiro2010-05-17 09:38:52 +0000
commitf5a355cc8f70003a498f1414c8255ace115e6be6 (patch)
treee880ec0b68d33d15b7a0b1b12aeba6523b906c23 /cesar/bsu/test/utest
parentec5cabf8246f4d99df4ad7bd59cd6283d8575e29 (diff)
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
Diffstat (limited to 'cesar/bsu/test/utest')
-rw-r--r--cesar/bsu/test/utest/src/bsut.c4
-rw-r--r--cesar/bsu/test/utest/src/interface.c14
-rw-r--r--cesar/bsu/test/utest/src/tests.c10
-rw-r--r--cesar/bsu/test/utest/tests.h4
4 files changed, 12 insertions, 20 deletions
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;