summaryrefslogtreecommitdiff
path: root/mac/sar/test/maximus_test/src/Maximus_sar.cpp
diff options
context:
space:
mode:
authorlaranjeiro2007-09-10 14:20:37 +0000
committerlaranjeiro2007-09-10 14:20:37 +0000
commitee3028fcfb0adb2226990012d9152b9bb84f86c1 (patch)
treedc6a10568c5aa46cbbf5331edf3932cc63124822 /mac/sar/test/maximus_test/src/Maximus_sar.cpp
parente00e97554a0e6cfe2ed9fc7954fab9f81fa6f7be (diff)
Function test of the SAR on maximus done. Correct the bug #19 #10 #11
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@686 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.cpp51
1 files changed, 24 insertions, 27 deletions
diff --git a/mac/sar/test/maximus_test/src/Maximus_sar.cpp b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
index 5ebd880d32..9af43a6a8c 100644
--- a/mac/sar/test/maximus_test/src/Maximus_sar.cpp
+++ b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
@@ -36,10 +36,9 @@ using namespace std;
#define debug_info false
-#define launch_seg true
#define launch_seg_debug true
-#define launch_rea false
+#define launch_rea true
#define launch_rea_debug false
unsigned char blk[3][1024]; // 3 PB received from the Segmentation STA, of with
@@ -93,11 +92,6 @@ void stationA_cb (Msg &msg)
buffer = NULL;
}
-void stationB_cb (Msg &msg)
-{
-
-}
-
int main (int argc, char *argv[])
{
unsigned char lid;
@@ -137,28 +131,31 @@ int main (int argc, char *argv[])
return 0;
}
- Sta stationB = maximus.create_sta ();
- //create the function call
- Msg fc2 = maximus.create_fc ("reassembly");
- fc2.set_cb (&stationB_cb);
- fc2.set_sta (stationB);
- //stationB.debug ();
-
- /* Send the pb for a segmentation */
- for (i = 0; i < 3; i++)
+ if (launch_rea)
{
- sprintf (value, "%d", i);
- strcpy (id, "pb");
- strcat (id, value);
- fc2.add_param (id, 1024 * sizeof(unsigned char), blk[i]);
- if (debug_info && i == 0)
- printf ("Length : %d\n", *((unsigned short*)(blk[i]
- + sizeof(unsigned int))) >> 2);
- }
+ Sta stationB = maximus.create_sta ();
+ //create the function call
+ Msg fc2 = maximus.create_fc ("reassembly");
+ fc2.set_sta (stationB);
+
+ if (launch_rea_debug) stationB.debug ();
+
+ /* Send the pb for a segmentation */
+ for (i = 0; i < 3; i++)
+ {
+ sprintf (value, "%d", i);
+ strcpy (id, "pb");
+ strcat (id, value);
+ fc2.add_param (id, 1024 * sizeof(unsigned char), blk[i]);
+ if (debug_info && i == 0)
+ printf ("Length : %d\n", *((unsigned short*)(blk[i]
+ + sizeof(unsigned int))) >> 2);
+ }
- fc2.send_async ();
+ fc2.send_async ();
- /* Wait during 10000 ticks before terminating the program. */
- maximus.wait (10000);
+ /* Wait during 10000 ticks before terminating the program. */
+ maximus.wait (10000);
+ }
return 0;
}