summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schodet2013-04-09 17:08:16 +0200
committerNicolas Schodet2013-04-25 10:29:01 +0200
commit736fea895a05301595e77c20c1ff2a432b7250b1 (patch)
tree1ab7ec69e9f10f305fd3cde5427cdfa553a0c304
parent4af4c01afcd961253f900bd646991a46e2ec4e49 (diff)
cesar/mac/pbproc/test/pbproc: add SRC as parameter, refs #3909
-rw-r--r--cesar/mac/pbproc/test/pbproc/src/rx_sound.c44
1 files changed, 29 insertions, 15 deletions
diff --git a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
index f63d33d67d..dbb6065689 100644
--- a/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
+++ b/cesar/mac/pbproc/test/pbproc/src/rx_sound.c
@@ -22,7 +22,8 @@
void
rx_sound_test (test_t t, test_pbproc_t *tp, u32 date, uint chandata_nb,
- uint pool_pb_nb, uint tmi, uint burst, bool scf)
+ uint pool_pb_nb, uint tmi, uint burst, bool scf,
+ tonemap_sound_reason_code_t src)
{
uint i;
test_within (t);
@@ -72,7 +73,7 @@ rx_sound_test (test_t t, test_pbproc_t *tp, u32 date, uint chandata_nb,
.mpdu_cnt = burst,
.reserved0 = 0,
.ppb = 42,
- .src = TONEMAP_SRC_INITIAL,
+ .src = src,
.reserved1 = 0,
.reserved2 = 0,
.fccs_av = 0,
@@ -187,13 +188,17 @@ rx_sound_basic_test_case (test_t t)
test_pbproc_init (&tp);
test_begin (t, "robo")
{
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true);
- rx_sound_test (t, &tp, 123456, 11, 12, PHY_MOD_ROBO, 0, true);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 11, 12, PHY_MOD_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
} test_end;
test_begin (t, "mini-robo")
{
- rx_sound_test (t, &tp, 1234567, 6, 6, PHY_MOD_MINI_ROBO, 0, true);
- rx_sound_test (t, &tp, 1234567, 6, 7, PHY_MOD_MINI_ROBO, 0, true);
+ rx_sound_test (t, &tp, 1234567, 6, 6, PHY_MOD_MINI_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 1234567, 6, 7, PHY_MOD_MINI_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
} test_end;
test_begin (t, "sound complete")
{
@@ -201,25 +206,34 @@ rx_sound_basic_test_case (test_t t)
utils_sta_prepare_default_tonemap (&tp, false, 2, PHY_MOD_ROBO, 0, 0,
NULL);
for (i = 0; i < TONEMAP_SOUND_FRAME_COUNTER - 1; i++)
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, false);
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true);
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, false,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
dbg_check (mac_store_sta_remove (tp.store, 2));
} test_end;
test_begin (t, "burst")
{
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 1, true);
- rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_MINI_ROBO, 1, true);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_ROBO, 1, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 11, 11, PHY_MOD_MINI_ROBO, 1, true,
+ TONEMAP_SRC_INITIAL);
} test_end;
test_begin (t, "no chandata")
{
- rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_ROBO, 0, true);
- rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_MINI_ROBO, 0, true);
+ rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_MINI_ROBO, 0, true,
+ TONEMAP_SRC_INITIAL);
} test_end;
test_begin (t, "woack no chandata")
{
- rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_ROBO, 1, true);
- rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_MINI_ROBO, 1, true);
+ rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_ROBO, 1, true,
+ TONEMAP_SRC_INITIAL);
+ rx_sound_test (t, &tp, 123456, 0, 1, PHY_MOD_MINI_ROBO, 1, true,
+ TONEMAP_SRC_INITIAL);
} test_end;
test_pbproc_uninit (&tp);
}