umtsmon is a tool to handle UMTS (3G) devices in Linux This is a port to TDE from https://sourceforge.net/p/umtsmon/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

umtsmon_global.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* umtsmon - a program to control/monitor your UMTS card
  2. * This file copyright (C) 2006,2007,2008,2009 Klaas van Gend
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation
  7. * applicable version is GPL version 2 only.
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. */
  16. #ifndef UMTSMON_GLOBAL
  17. #define UMTSMON_GLOBAL
  18. #define APPNAME "umtsmon"
  19. #define APPRELEASE "0.9.72"
  20. /* for your special versioning needs, normally empty */
  21. #ifndef APPFLAVOUR
  22. #define APPFLAVOUR ""
  23. #endif
  24. /* Debug verbosity
  25. * level 1 = very little information, autodetect KILLING
  26. * level 2 = level 1 + autodetect GOOD/BAD + some general messages on behaviour
  27. * level 3 = level 2 + autodetect INFO
  28. * level 4 = level 3 + AT commands and answers
  29. * level 5 = all debugging, including entry of functions under scrutiny
  30. * level 6 = timing info on serial port
  31. */
  32. #include <stdio.h>
  33. #include <time.h>
  34. extern int theVerbosity; // actually defined in main.cpp
  35. extern int thePPPVerbosity;
  36. #define MAX_VERBOSITY 6
  37. // note: the below is actually GCC-specific, see "info:/gcc/Variadic Macros"
  38. #define DEBUG1(format, ...) {if (theVerbosity>=1) printf("##P1 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  39. #define DEBUG2(format, ...) {if (theVerbosity>=2) printf("##P2 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  40. #define DEBUG3(format, ...) {if (theVerbosity>=3) printf("##P3 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  41. #define DEBUG4(format, ...) {if (theVerbosity>=4) printf("##P4 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  42. #define DEBUG4NT(format, ...) {if (theVerbosity>=4) printf(format, ## __VA_ARGS__);}
  43. #define DEBUG5(format, ...) {if (theVerbosity>=5) printf("##P5 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  44. #define DEBUG6(format, ...) {if (theVerbosity>=6) printf("##P6 t=%03ld: " format, time(NULL)%1000, ## __VA_ARGS__);}
  45. #endif // UMTSMON_GLOBAL