summaryrefslogtreecommitdiff
path: root/mac/sar/test/maximus_test/src/Maximus_sar.cpp
diff options
context:
space:
mode:
authorlaranjeiro2007-09-10 14:41:06 +0000
committerlaranjeiro2007-09-10 14:41:06 +0000
commit56b8a6feb745773b1401c51619c4153770344f66 (patch)
treeb76c98edb784fa387c432692d124ca149e8afcc6 /mac/sar/test/maximus_test/src/Maximus_sar.cpp
parent4abb4c4c4c677ebb6efc5ebf19f492f4c74f3aee (diff)
SAR function test on maximus operational.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@689 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.cpp73
1 files changed, 43 insertions, 30 deletions
diff --git a/mac/sar/test/maximus_test/src/Maximus_sar.cpp b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
index 9af43a6a8c..dcced72b86 100644
--- a/mac/sar/test/maximus_test/src/Maximus_sar.cpp
+++ b/mac/sar/test/maximus_test/src/Maximus_sar.cpp
@@ -36,7 +36,8 @@ using namespace std;
#define debug_info false
-#define launch_seg_debug true
+#define launch_seg true
+#define launch_seg_debug false
#define launch_rea true
#define launch_rea_debug false
@@ -105,26 +106,30 @@ int main (int argc, char *argv[])
Maximus maximus;
maximus.init (argc, argv);
- Sta stationA = maximus.create_sta ();
-
- //create the function call
- Msg fc = maximus.create_fc ("segmentation");
-
- lid = 1;
- tei = 1;
-
- /* add the buffer address */
- fc.add_param ("lid", sizeof(unsigned char), (unsigned char*) &lid);
- fc.add_param ("tei", sizeof(unsigned char), (unsigned char*) &tei);
-
- fc.set_cb (&stationA_cb);
- fc.set_sta (stationA);
- // stationA.debug ();
-
- fc.send_async ();
-
- /* Wait during 10000 ticks before terminating the program. */
- maximus.wait (10000);
+ if (launch_seg)
+ {
+ Sta stationA = maximus.create_sta ();
+
+ //create the function call
+ Msg fc = maximus.create_fc ("segmentation");
+
+ lid = 1;
+ tei = 1;
+
+ /* add the buffer address */
+ fc.add_param ("lid", sizeof(unsigned char), (unsigned char*) &lid);
+ fc.add_param ("tei", sizeof(unsigned char), (unsigned char*) &tei);
+
+ fc.set_cb (&stationA_cb);
+ fc.set_sta (stationA);
+
+ if (launch_seg_debug) stationA.debug ();
+
+ fc.send_async ();
+
+ /* Wait during 10000 ticks before terminating the program. */
+ maximus.wait (10000);
+ }
if (test_fail)
{
@@ -140,16 +145,24 @@ int main (int argc, char *argv[])
if (launch_rea_debug) stationB.debug ();
- /* Send the pb for a segmentation */
- for (i = 0; i < 3; i++)
+ if (launch_seg)
{
- 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);
+ /* 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);
+ }
+ }
+ else
+ {
+ unsigned char val = 0;
+ fc2.add_param ("NO", sizeof(unsigned char), &val);
}
fc2.send_async ();