libplayercommon

This C library provides error-reporting and debug output facilities. More...

#define | PLAYER_ERROR(msg) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n")
#define | PLAYER_ERROR1(msg, a) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a)
#define | PLAYER_ERROR2(msg, a, b) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b)
#define | PLAYER_ERROR3(msg, a, b, c) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c)
#define | PLAYER_ERROR4(msg, a, b, c, d) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c, d)
#define | PLAYER_ERROR5(msg, a, b, c, d, e) ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c, d, e)
#define | PLAYER_WARN(msg) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n")
| Warning message macros.
#define | PLAYER_WARN1(msg, a) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a)
#define | PLAYER_WARN2(msg, a, b) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b)
#define | PLAYER_WARN3(msg, a, b, c) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c)
#define | PLAYER_WARN4(msg, a, b, c, d) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d)
#define | PLAYER_WARN5(msg, a, b, c, d, e) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e)
#define | PLAYER_WARN6(msg, a, b, c, d, e, f) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e, f)
#define | PLAYER_WARN7(msg, a, b, c, d, e, f, g) ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e, f, g)
#define | PLAYER_MSG0(level, msg) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n")
| General messages. More...
#define | PLAYER_MSG1(level, msg, a) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a)
#define | PLAYER_MSG2(level, msg, a, b) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b)
#define | PLAYER_MSG3(level, msg, a, b, c) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c)
#define | PLAYER_MSG4(level, msg, a, b, c, d) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d)
#define | PLAYER_MSG5(level, msg, a, b, c, d, e) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e)
#define | PLAYER_MSG6(level, msg, a, b, c, d, e, f) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f)
#define | PLAYER_MSG7(level, msg, a, b, c, d, e, f, g) ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f, g)

## Detailed Description

This C library provides error-reporting and debug output facilities.

Instead of calling directly into the stdio library (printf, puts, etc.), use the macros defined in error.h, so that message verbosity can be centrally controlled and so that all messsages get logged to .player.

## Macro Definition Documentation

#define PLAYER_ERROR | ( |  | msg | ) | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n")

Error message macros

Referenced by SegwayRMP::CanBusSetup(), SegwayRMP::Main(), RFLEX::Main(), CameraUvc::MainSetup(), SphereDriver::MainSetup(), SegwayRMP::MainSetup(), ImageBase::MainSetup(), P2OS::MainSetup(), Claser::openSerial(), Claser::runLaser(), Claser::scanRead(), SegwayRMP400::SegwayRMP400(), LaserTransform::Setup(), SphereDriver::SphereDriver(), and SegwayRMP::USBSetup().

#define PLAYER_ERROR1 | ( |  | msg,
|  |  | a
| ) |  | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a)

Error message macros

Referenced by SegwayRMP::CanBusSetup(), SegwayRMP400::MainSetup(), AdaptiveMCL::MainSetup(), P2OS::MainSetup(), GarciaDriver::ProcessMessage(), and SphereDriver::ProcessMessage().

#define PLAYER_ERROR2 | ( |  | msg,
|  |  | a,
|  |  | b
| ) |  | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b)

Error message macros

#define PLAYER_ERROR3 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c
| ) |  | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c)

Error message macros

#define PLAYER_ERROR4 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c, d)

Error message macros

#define PLAYER_ERROR5 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e
| ) |  | ErrorPrint(PLAYER_ERR_ERR, 0, __FILE__, __LINE__, "error : " msg "\n", a, b, c, d, e)

Error message macros

#define PLAYER_MSG0 | ( |  | level,
|  |  | msg
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n")

General messages.

Use level to indicate the message importance

- 0 : important
- 1 : informative
- 2+ : diagnostic All messages are recorded in the log file, but only the more important messages are printed on the console. Use the command line option to dictate which messages will be printed.

Referenced by SegwayRMP::CanBusSetup(), snd::Main(), SegwayRMP::Main(), wbr914::Main(), SegwayRMP::MainQuit(), SegwayRMP400::MainQuit(), AdaptiveMCL::MainQuit(), SegwayRMP400::MainSetup(), AdaptiveMCL::MainSetup(), wbr914::MainSetup(), snd::ProcessMessage(), MapTransform::ProcessMessage(), SegwayRMP400::SegwayRMP400(), snd::Setup(), snd::Shutdown(), and SegwayRMP::USBSetup().

#define PLAYER_MSG1 | ( |  | level,
|  |  | msg,
|  |  | a
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a)

Error message macros

Referenced by RFLEX::Main(), and P2OS::MainSetup().

#define PLAYER_MSG2 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b)

Error message macros

Referenced by SegwayRMP::Main().

#define PLAYER_MSG3 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b,
|  |  | c
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c)

Error message macros

Referenced by snd::ProcessMessage().

#define PLAYER_MSG4 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d)

Error message macros

Referenced by MapTransform::ProcessMessage().

#define PLAYER_MSG5 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e)

Error message macros

#define PLAYER_MSG6 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e,
|  |  | f
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f)

Error message macros

#define PLAYER_MSG7 | ( |  | level,
|  |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e,
|  |  | f,
|  |  | g
| ) |  | ErrorPrint(PLAYER_ERR_MSG, level, __FILE__, __LINE__, "" msg "\n", a, b, c, d, e, f, g)

Error message macros

#define PLAYER_WARN1 | ( |  | msg,
|  |  | a
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a)

Error message macros

Referenced by Alsa::Main(), and snd::ProcessMessage().

#define PLAYER_WARN2 | ( |  | msg,
|  |  | a,
|  |  | b
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b)

Error message macros

Referenced by MapTransform::ProcessMessage().

#define PLAYER_WARN3 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c)

Error message macros

#define PLAYER_WARN4 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d)

Error message macros

#define PLAYER_WARN5 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e)

Error message macros

#define PLAYER_WARN6 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e,
|  |  | f
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e, f)

Error message macros

#define PLAYER_WARN7 | ( |  | msg,
|  |  | a,
|  |  | b,
|  |  | c,
|  |  | d,
|  |  | e,
|  |  | f,
|  |  | g
| ) |  | ErrorPrint(PLAYER_ERR_WARN, 0, __FILE__, __LINE__, "warning : " msg "\n", a, b, c, d, e, f, g)

Error message macros

Last updated 12 September 2005 21:38:45