Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Debugging/Debugging.h File Reference

Macros and functions for debugging. More...

#include "Tools/Debugging/DebugKeyTable.h"
#include "Tools/MessageQueue/OutMessage.h"

Include dependency graph for Debugging.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define INFO(key, type, format, expression)
 A macro for sending debug messages depending on a debug key.

#define OUTPUT(type, format, expression)
 A macro for sending debug messages.

#define WATCH(key, type, format, expression)   INFO(key,type,format,expression);
 A macro for sending debug messages that differs between Windows and Aperios.


Functions

void initDebugging (OutMessage *queue, DebugKeyTable *table)
 Sets a pointer to an OutMessage and to a DebugKeyTable to be used by the macros.

OutMessagegetDebugOut ()
 Returns a reference to a process wide OutMessage.

DebugKeyTablegetDebugKeyTable ()
 Returns a reference to a process wide debug key table.


Detailed Description

Macros and functions for debugging.

Author:
Martin Lötzsch

Definition in file Debugging.h.


Define Documentation

#define INFO key,
type,
format,
expression   ) 
 

Value:

if (getDebugKeyTable().isActive(DebugKeyTable::key)) {\
    getDebugOut().format << expression;\
    getDebugOut().finishMessage(type);\
  }\
A macro for sending debug messages depending on a debug key.

Parameters:
key A key from the DebugKeyTable::debugKeyID enum.
type The type of the message from the MessageID enum in MessageIDs.h
format The message format of the message (bin or text)
expression A streamable expression
Examples:
INFO(sendImages,idImage,bin,myImage); INFO(sendInterestingValue,idInterestingValue,text,"value: " << value); INFO(sendWorldState,idWorldState,bin,worldState);

Definition at line 61 of file Debugging.h.

Referenced by CollectedBeliefs::broadcast(), DefaultTacticChooser::chooseOption(), MSH2004InvKinWalkingEngine::executeParameterized(), Motion::main(), Logger::main(), Debug::main(), Cognition::main(), DDPHandler::onReceive(), TeamMessageCollection::processTimeStamps(), and KickLogger::record().

#define OUTPUT type,
format,
expression   ) 
 

Value:

{ getDebugOut().format << expression;\
  getDebugOut().finishMessage(type); }
A macro for sending debug messages.

Parameters:
type The type of the message from the MessageID enum in MessageIDs.h
format The message format of the message (bin or text)
expression A streamable expression
Examples:
OUTPUT(idImage, bin, *pMyImage); OUTPUT(idText, text, "MyObject::myFunction() invoked"); OUTPUT(idText, text, "i: " << i << ", j:" << j);

Definition at line 81 of file Debugging.h.

Referenced by GT2004EdgeSpecialist::addCandidate(), GT2004ObstaclesLocator::addObstaclePoint(), GT2004ObstaclesLocator::addObstaclePoints(), RFieldSpecialist::analyzeLines(), BoxSpecialist::BoxSpecialist(), GT2004HeadControl::calibrateHeadSpeed(), RFieldSpecialist::checkRamp(), GT2004SoundControl::checkWaveHeader(), GT2004BallSpecialist::createBallPerceptLevenbergMarquardt(), RasterSpecialist::createSegmentsFromLines(), DefaultTacticChooser::DefaultTacticChooser(), RasterSpecialist::doColorSegmentation(), LandmarksPercept::estimateOffsetForGoals(), BB2004Calibrator::evolve(), ObstacleAvoiderOnGreenField::execute(), ImageSaver::execute(), NoOdometrySelfLocator::execute(), GT2004BasicBehaviorNextGT2004ParametersToBeMeasured::execute(), GT2004BasicBehaviorSendCurrentGT2004ParametersAndChooseNext::execute(), GT2004BasicBehaviorMeasureGT2004ParametersBlind::execute(), GT2004BasicBehaviorMeasureGT2004Parameters::execute(), GT2004BasicBehaviorEvolveOmniParameters::execute(), RBridgeSpecialist::findBridgeMark(), RBridgeSpecialist::getPosition(), Parcour::getUnifiedSpeed(), GTXabsl2EngineExecutor::handleMessage(), Process::handleMessage(), Cognition::handleMessage(), GT2004WalkingEngine::handleMessage(), ObstacleAvoiderOnGreenFieldERS7::handleMessage(), ObstacleAvoiderOnGreenField::handleMessage(), NoOdometrySelfLocator::handleMessage(), GT2004ObstaclesLocator::handleMessage(), GT2004MotionControl::handleMessage(), GT2004BehaviorControl::handleMessage(), GT2004BallLocator::handleSeenBall(), GT2004BallLocator::handleUnseenBall(), ModuleSelector::init(), Cognition::init(), BB2004InvKinWalkingEngine::learn(), LightingChangeTester::lightingHasChanged(), LinesTables2004::LinesTables2004(), GT2004SoundControl::loadWavefile(), Motion::main(), Cognition::main(), UDPHandlerEndpoint::onReceive(), KalmanProcessModelBase::OutputException(), Population< GT2004Parameters, 10 >::outputStatistics(), GTXabsl2ErrorHandler::printError(), GTXabsl2ErrorHandler::printMessage(), RBallSpecialist2::RBallSpecialist2(), RDefaultStrategy::RDefaultStrategy(), GT2003MotionNetSpecialActions::readOdometryTable(), InvKinWalkingParameters::readValues(), ModuleHandler::selectSolution(), KalmanFixedPositionModel::update(), and KalmanConstantSpeedModel::update().

#define WATCH key,
type,
format,
expression   )     INFO(key,type,format,expression);
 

A macro for sending debug messages that differs between Windows and Aperios.

The parameters equal to the parameters if the INFO macro. Different from INFO, the output is sent automatically on the WIN32 platform

Definition at line 103 of file Debugging.h.

Referenced by Logger::main(), and Cognition::main().


Function Documentation

void initDebugging OutMessage queue,
DebugKeyTable table
 

Sets a pointer to an OutMessage and to a DebugKeyTable to be used by the macros.

Parameters:
queue A pointer to an OutMessage.
table A pointer to a DebugKeyTable.

Definition at line 18 of file Debugging.cpp.

References debugKeyTable, debugOut, and PlatformProcess::getIndex().

Referenced by Process::Process().

Here is the call graph for this function:

OutMessage& getDebugOut  ) 
 

Returns a reference to a process wide OutMessage.

Definition at line 25 of file Debugging.cpp.

References debugOut, and PlatformProcess::getIndex().

Referenced by CalibrationIndividual::dump(), BBInvKinIndividual::dump(), BB2004Calibrator::evolve(), GT2004BallLocator::handleMessage(), BB2004InvKinWalkingEngine::learn(), GTXabsl2EngineExecutor::sendDebugMessage(), and GT2004BallLocator::sendProcessModelStates().

Here is the call graph for this function:

DebugKeyTable& getDebugKeyTable  ) 
 

Returns a reference to a process wide debug key table.

Definition at line 30 of file Debugging.cpp.

References debugKeyTable, and PlatformProcess::getIndex().

Referenced by GTXabsl2EngineExecutor::executeEngine(), BB2004InvKinWalkingEngine::executeParameterized(), and BB2004InvKinWalkingEngine::updateOdometry().

Here is the call graph for this function:


Generated on Thu Sep 23 20:01:59 2004 for GT2004 by doxygen 1.3.6