changeset 301:8764d114ce80

added more informative status display for flags
author mas01mc
date Fri, 01 Aug 2008 16:21:51 +0000
parents f08c66ae8207
children 74824093c1c4
files audioDB.cpp audioDB.h
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.cpp	Fri Aug 01 15:48:40 2008 +0000
+++ b/audioDB.cpp	Fri Aug 01 16:21:51 2008 +0000
@@ -511,8 +511,10 @@
     std::cout << "total bytes:" << dbH->length << " (" << (100.0*dbH->length)/(dbH->timesTableOffset-dbH->dataOffset) << "%)" << std::endl;
     std::cout << "bytes available:" << dbH->timesTableOffset-(dbH->dataOffset+dbH->length) << " (" <<
       (100.0*(dbH->timesTableOffset-(dbH->dataOffset+dbH->length)))/(dbH->timesTableOffset-dbH->dataOffset) << "%)" << std::endl;
-    std::cout << "flags:" << dbH->flags << std::endl;
-    
+    std::cout << "flags:" << " l2norm[" << DISPLAY_FLAG(dbH->flags&O2_FLAG_L2NORM)
+	      << "] minmax[" << DISPLAY_FLAG(dbH->flags&O2_FLAG_MINMAX)
+	      << "] power[" << DISPLAY_FLAG(dbH->flags&O2_FLAG_POWER)
+	      << "] times[" << DISPLAY_FLAG(dbH->flags&O2_FLAG_TIMES) << "]" << endl;    
     std::cout << "null count: " << nullCount << " small sequence count " << dudCount-nullCount << std::endl;    
   } else {
     adbStatusResponse->result.numFiles = dbH->numFiles;
--- a/audioDB.h	Fri Aug 01 15:48:40 2008 +0000
+++ b/audioDB.h	Fri Aug 01 16:21:51 2008 +0000
@@ -97,6 +97,7 @@
 #define O2_FLAG_MINMAX (0x2U)
 #define O2_FLAG_POWER (0x4U)
 #define O2_FLAG_TIMES (0x20U)
+#define DISPLAY_FLAG(x) (x?"on":"off")
 
 // Query types
 #define O2_POINT_QUERY (0x4U)