summaryrefslogtreecommitdiff
path: root/mac/sar/test/maximus_test/src/Maximus_sar.cpp
diff options
context:
space:
mode:
authorlaranjeiro2007-09-18 09:49:29 +0000
committerlaranjeiro2007-09-18 09:49:29 +0000
commit7ecfba35f250797cb178a58b8a61cb53e4b7bbe0 (patch)
treeefa80a105064204dbc1cd3c9cb7b5fd7debfc743 /mac/sar/test/maximus_test/src/Maximus_sar.cpp
parentaa4106a9a86931c242854494e982801c49afc2de (diff)
Update the test with the modification of the DSR in maximus. see #27
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@714 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'mac/sar/test/maximus_test/src/Maximus_sar.cpp')
-rw-r--r--mac/sar/test/maximus_test/src/Maximus_sar.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/mac/sar/test/maximus_test/src/Maximus_sar.cpp b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
index 12283dfb9e..03d4117a49 100644
--- a/mac/sar/test/maximus_test/src/Maximus_sar.cpp
+++ b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
@@ -215,6 +215,7 @@ int multiple_shoot (int argc, char *argv[], int iter)
unsigned char mf_type;
unsigned char packet;
bool logs;
+ int i;
test_fail = false;
station1_rsp = false;
@@ -223,36 +224,43 @@ int multiple_shoot (int argc, char *argv[], int iter)
maximus.init (argc, argv);
Sta station1 = maximus.create_sta ();
- station1.debug();
+ station1.debug ();
Sta station2 = maximus.create_sta ();
- //station2.debug ();
+ station2.debug ();
// activate the sta 1 logs
Msg fc = maximus.create_fc ("activate_logs");
logs = true;
fc.add_param ("debug", sizeof(unsigned char), (unsigned char *) &logs);
fc.send (station2);
- //fc.send (station1);
+ fc.send (station1);
while (iter)
{
iter --;
station1_rsp = false;
station2_rsp = false;
-
+
printf ("ITER : %d\n", iter);
lid = 1;
tei = 2;
- bcast = true;
+ bcast = false;
mf_type = 2;
packet = 0;
segmentation (&station1, station1_cb, lid, tei, bcast, mf_type,
packet);
- while (!station1_rsp)
+ i = 0;
+ while (!station1_rsp || test_fail)
{
maximus.process ();
+ i++;
+
+ if (i == 100)
+ {
+ test_fail = true;
+ }
}
if (test_fail)
@@ -261,12 +269,19 @@ int multiple_shoot (int argc, char *argv[], int iter)
tei = 1;
reassembly (&station2, station2_cb, lid, tei, bcast, mf_type, packet);
+ i = 0;
while (!station2_rsp)
{
maximus.process ();
+ i++;
+
+ if (i == 100)
+ {
+ test_fail = true;
+ }
}
- maximus.wait (10000);
+ maximus.wait (1000);
}
return 0;