Visual Servoing Platform
version 3.2.0 under development (2019-01-22)
Main Page
Related Pages
Modules
Namespaces
Classes
Examples
tutorial-trace.cpp
1
2
//#define VP_TRACE // Activate the trace mode
3
//#define VP_DEBUG // Activate the debug mode
4
#define VP_DEBUG_MODE 2 // Activate debug level 1 and 2
5
6
#include <visp3/core/vpDebug.h>
7
8
int
main()
9
{
10
vpIN_FCT
(
"main()"
);
// std::cout if VP_TRACE defined
11
12
// Check the active debug levels set in VP_DEBUG_MODE
13
std::cout <<
"Debug level 1 active: "
<<
vpDEBUG_ENABLE
(1) << std::endl;
14
std::cout <<
"Debug level 2 active: "
<<
vpDEBUG_ENABLE
(2) << std::endl;
15
std::cout <<
"Debug level 3 active: "
<<
vpDEBUG_ENABLE
(3) << std::endl;
16
17
// C-like trace printings if VP_TRACE defined
18
vpTRACE
(
"C-like trace"
);
// std::cout
19
vpTRACE
(1,
"C-like trace level 1"
);
// std::cout
20
21
vpERROR_TRACE
(
"C-like error trace"
);
// std::cerr
22
vpERROR_TRACE
(1,
"C-like error trace level 1"
);
// std::cerr if
23
// VP_DEBUG_MODE value is >=
24
// 1
25
26
// C-like debug printings if VP_DEBUG defined
27
vpDEBUG_TRACE
(
"C-like debug trace"
);
// stdout
28
vpDERROR_TRACE
(
"C-like error trace"
);
// stderr
29
30
vpDEBUG_TRACE
(2,
31
"C-like debug trace level 2"
);
// std::cout if VP_DEBUG_MODE value >= 2
32
vpDERROR_TRACE
(2,
33
"C-like error trace level 2"
);
// std::cerr if VP_DEBUG_MODE value >= 2
34
35
// C++-like trace printings if VP_TRACE defined
36
vpCTRACE
<<
"C++-like trace"
<< std::endl;
// std::cout
37
vpCERROR
<<
"C++-like error trace"
<< std::endl;
// std::cerr
38
39
// C++-like debug printings if VP_DEBUG defined
40
vpCDEBUG
(2) <<
"C++-like debug trace level 2"
<< std::endl;
// std::cout if VP_DEBUG_MODE value >= 2
41
42
vpOUT_FCT
(
"main()"
);
// std::cout if VP_TRACE defined
43
}
vpDEBUG_ENABLE
#define vpDEBUG_ENABLE(level)
Definition:
vpDebug.h:538
vpCERROR
#define vpCERROR
Definition:
vpDebug.h:365
vpERROR_TRACE
#define vpERROR_TRACE
Definition:
vpDebug.h:393
vpTRACE
#define vpTRACE
Definition:
vpDebug.h:416
vpCDEBUG
#define vpCDEBUG(level)
Definition:
vpDebug.h:511
vpOUT_FCT
#define vpOUT_FCT
Definition:
vpDebug.h:295
vpDERROR_TRACE
#define vpDERROR_TRACE
Definition:
vpDebug.h:464
vpCTRACE
#define vpCTRACE
Definition:
vpDebug.h:338
vpDEBUG_TRACE
#define vpDEBUG_TRACE
Definition:
vpDebug.h:487
vpIN_FCT
#define vpIN_FCT
Definition:
vpDebug.h:275
local
soft
visp
ViSP-web-script
visp
tutorial
trace
tutorial-trace.cpp
Generated by
1.8.11