00001 #ifndef SCTAPI_DEBUG_H
00002 #define SCTAPI_DEBUG_H
00003
00004 #include <list>
00005 #include <string>
00006 #include <vector>
00007
00008
00009
00010
00011 namespace SctApi {
00012 enum DebugOptions {DEBUG_DIAG, DEBUG_DIAG2, DEBUG_DUMP_PRIM_BINARY, DEBUG_DIAG_RESPONSE, DEBUG_MODULE_CONFIG,
00013 DEBUG_SAVE_PRIM, DEBUG_SAVE_HISTOGRAM, DEBUG_SAVE_RAW_CAPTURE,
00014 DEBUG_VERBOSE_PROBE,
00015 DEBUG_PRINT_IN_PRIM, DEBUG_PRINT_OUT_PRIM,
00016 DEBUG_PRINT_CALIB, DEBUG_PRINT_RAW, DEBUG_LOG_PRINT_PRIM,
00017 DEBUG_EXTRA_DUMPS, DEBUG_PRINT_UNKNOWN, DEBUG_BOC_SETUP, DEBUG_DUMP_RAW_EVENT,
00018 DEBUG_SCAN_ERROR_TRAP, DEBUG_SCAN_ERROR_TRAP_ALL, DEBUG_SCAN_AUTO_STALL, DEBUG_SCAN_STEP_MODE, DEBUG_SCAN_PAUSE_PULSE,
00019 DEBUG_SCAN_ROD_MODE_BITS,
00020
00021 DEBUG_END_OPTIONS};
00022
00023 class Debug {
00025 std::list<std::string> debugList;
00026
00028 std::vector<std::string> debugOptionList;
00029
00030 void setupDebugOptions();
00031
00032 Debug();
00033
00034 static Debug *instance;
00035 public:
00036 bool checkDebugOption(std::string opt);
00037 bool checkDebugOption(DebugOptions opt);
00038 void setDebugOption(std::string opt);
00039 void unsetDebugOption(std::string opt);
00040 std::list<std::string> listEnabledDebugOptions();
00041 std::vector<std::string> listDebugOptions();
00042
00043 static Debug *getInstance();
00044 };
00045 }
00046
00047 #endif