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 "Tools/Debugging/DebugRequest.h"
#include "Tools/Debugging/DebugDataTable.h"
#include <iostream>

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 DEBUG_RESPONSE(description, expression)
#define NOT_POLLABLE_DEBUG_RESPONSE(description, expression)
#define DEBUG_RESPONSE_NOT(description, expression)
#define WATCH(key, type, format, expression)   INFO(key,type,format,expression);
 A macro for sending debug messages that differs between Windows and Aperios.

#define DEBUG_CHECK_CRASH   { if (SystemCall::getCurrentSystemTime () - entryTime > 2000) {std::cout << "breakpoint in " << __FILE__ << ":" << __LINE__ << "; \n was executed more than 2 seconds\n"; while (true); }; };

Functions

void initDebugging (OutMessage *queue, DebugKeyTable *table, DebugRequestTable *debugRequestTable)
 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.

DebugRequestTablegetDebugRequestTable ()
 Returns a reference to a process wide debug request 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 72 of file Debugging.h.

Referenced by ColorTable64Mod::execute(), GTCamBallLocator::execute(), BallModel::getKnownPosition(), Motion::main(), Debug::main(), Cognition::main(), UDPHandlerEndpoint::onReceive(), 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 92 of file Debugging.h.

Referenced by SlamEdgeSpecialist::addCandidate(), GT2005EdgeSpecialist::addCandidate(), GT2005CenterCircleFinder::addCandidate(), GT2005ObstaclesLocator::addObstaclePoint(), GT2005ObstaclesLocator::addObstaclePoints(), VLCRobotSpecialist::addPercept(), GT2005RobotSpecialist::addPercept(), OpenChallengeSymbols::blindDogTurn(), GT2005SelfLocator::calcDistributionValidityByStandardDeviation(), GT2005TeamBallLocator::calcRepresentativeParticleContainer(), GT2005HeadControl::calibrateHeadSpeed(), GT2005CenterCircleFinder::checkCircleMidpoint(), GT2005CenterCircleFinder::checkCircleMidpoint2(), GT2005PlayerSpecialist::checkForWhiteLineBetweenBlue(), GT2005PlayerSpecialist::checkForWhiteLineBetweenRed(), GT2005SoundControl::checkWaveHeader(), VLCRobotSpecialist::clusterCandidates(), GT2005RobotSpecialist::clusterCandidates(), GT2005ConfigurationSymbols::computeKickoffRole(), VLCBallSpecialist::createBallPerceptLevenbergMarquardt(), GT2005BallSpecialist::createBallPerceptLevenbergMarquardt(), GT2005PlayerSpecialist::detectBlueRobots(), GT2005PlayerSpecialist::detectRedRobots(), GT2005CenterCircleFinder::determineCirclePoint(), KickLoggerSymbols::doExecute(), SlamFlagLocator::draw(), AngleSymbols::drawAngles(), Watchdog::dump(), ComboLocator::execute(), GT2005RobotStateDetector::execute(), VLCImageProcessor::execute(), GT2005CollisionDetector::execute(), MotionRatingBehaviorControl::execute(), GT2005WalkCalibrationMainBehavior::execute(), GT2005WalkingEngine::executeParameterized(), GT2005BasicBehaviorCalcWlanBearing::Filter(), VLCRobotSpecialist::filterPercepts(), GT2005RobotSpecialist::filterPercepts(), GT2005PlayerSpecialist::findBlueFootPointYAxis(), GT2005PlayerSpecialist::findRedFootPointYAxis(), SlamBeaconDetector::findSpecial(), SlamFlagLocator::finishUpdate(), SLBenchmark::GenerateNewTarget(), VLCRobotSpecialist::generatePercept(), GT2005RobotSpecialist::generatePercept(), KickLoggerSymbols::generateWalktoTarget(), Parcour::getUnifiedSpeed(), MotionRatingBehaviorControl::gotoPoint(), GT2005SelfLocator::GT2005SelfLocator(), GT2005StableSelfLocator::GT2005StableSelfLocator(), GT2005WalkingEngine::GT2005WalkingEngine(), OpenChallengeSymbols::guideDogMoveForward(), GTXabsl2EngineExecutor::handleMessage(), RobotConfiguration::handleMessage(), Process::handleMessage(), Cognition::handleMessage(), GT2005WalkingEngine::handleMessage(), GT2004WalkingEngine::handleMessage(), GT2005ObstaclesLocator::handleMessage(), GT2005MotionControl::handleMessage(), MotionRatingBehaviorControl::handleMessage(), ModuleSelector::init(), Cognition::init(), VLCColorCorrector::init(), SlamColorCorrector::init(), GT2005ColorCorrector::init(), GT2005BasicBehaviorCalcWlanBearing::init(), GT2005WalkCalibrationMainBehavior::Initialize(), KickSelectionSymbols::intentionalKickPossible(), GT2005GoalRecognizer::interpretResults(), KickLoggerSymbols::kickLoggerSave(), KickLoggerSymbols::kickLoggerSetAfterStateAndCommit(), KickLoggerSymbols::kickLoggerSetBeforeState(), KickLoggerSymbols::kickLoggerSetExecuteState(), LightingChangeTester::lightingHasChanged(), SlamSelfLocator::lineObservationUpdate(), LinesTables2004::LinesTables2004(), LinesTables2005::LinesTables2005(), GT2005WalkingEngine::loadOdometryPlane(), GT2005WalkingEngine::loadOdometryRotation(), GT2005SoundControl::loadWavefile(), Motion::main(), Debug::main(), Cognition::main(), GT2005WalkCalibrationMainBehavior::Measure(), Population< T, siz >::outputStatistics(), GT2005BehaviorControl::postExecute(), GTXabsl2ErrorHandler::printError(), GTXabsl2ErrorHandler::printMessage(), Process::processMain(), GT2005WalkingEngine::readOdometryCalibrationData(), GT2003MotionNetSpecialActions::readOdometryTable(), InvKinWalkingParameters::readValues(), GT2005CenterCircleFinder::scan(), GuideDogRobotSpecialist::scanParallelToHorizon(), GT2005CenterCircleFinder::scanSurrounding(), ModuleHandler::selectSolution(), TestSymbols::sendKickRecord(), ColorTable64Mod::setup(), SlamSelfLocator::SlamSelfLocator(), SLBenchmark::SLBenchmark(), GT2005StrategySymbols::update(), GT2005ConfigurationSymbols::update(), SlamSelfLocator::updateByPoint(), and GT2005StableSelfLocator::updateByPoint().

#define DEBUG_RESPONSE description,
expression   ) 
 

Value:

{\
  if(getDebugRequestTable().poll && getDebugRequestTable().notYetPolled(description)) \
  { \
    OUTPUT(idDebugResponse, text, description << \
           int(getDebugRequestTable().isActive(description) && !getDebugRequestTable().once(description))); \
  } \
  if(getDebugRequestTable().isActive(description)) \
  { \
    if(getDebugRequestTable().once(description)) \
      getDebugRequestTable().disable(description); \
    expression \
  } \
}

Definition at line 96 of file Debugging.h.

Referenced by GT2005GoalRecognizer::analyzeGoalpost(), GT2005SelfLocator::calcDistributionValidityByStandardDeviation(), GT2005SelfLocator::calcPose(), GT2005TeamBallLocator::calcRepresentativeParticleContainer(), GT2005ConfigurationSymbols::computeKickoffRole(), GT2005SensorDataProcessor::detectSwitches(), AngleSymbols::drawAngles(), GT2005StrategySymbols::estimateTimeToReachBall(), GT2005TeamBallLocator::execute(), SlamSelfLocator::execute(), OdometrySelfLocator::execute(), GT2005SelfLocator::execute(), GT2005RobotStateDetector::execute(), GT2005MotionControl::execute(), GT2005LEDControl::execute(), GT2005ImageProcessor::execute(), GT2005HeadControl::execute(), GT2005CollisionDetector::execute(), GTXabsl2EngineExecutor::executeEngine(), GT2005SampleTemplateGenerator::generateTemplates(), GT2005GoalRecognizer::interpretResults(), Motion::main(), Debug::main(), Cognition::main(), GT2005BehaviorControl::postExecute(), Process::processMain(), KickSelectionSymbols::retrieveKick(), GT2005ImageProcessor::scan(), GT2005GoalRecognizer::scanCrossBar(), SlamBeaconDetector::scanForFlagCharacterization(), AngleSymbols::setTestAngle(), TestSymbols::update(), GT2005StrategySymbols::update(), and GT2005ConfigurationSymbols::update().

#define NOT_POLLABLE_DEBUG_RESPONSE description,
expression   ) 
 

Value:

{\
  if(getDebugRequestTable().isActive(description)) \
  { \
    if(getDebugRequestTable().once(description)) \
      getDebugRequestTable().disable(description); \
    expression \
  } \
}

Definition at line 111 of file Debugging.h.

#define DEBUG_RESPONSE_NOT description,
expression   ) 
 

Value:

{\
  if(getDebugRequestTable().poll && getDebugRequestTable().notYetPolled(description)) \
  { \
    OUTPUT(idDebugResponse, text, description << \
           int(getDebugRequestTable().isActive(description) && !getDebugRequestTable().once(description))); \
  } \
  if(! (getDebugRequestTable().isActive(description))) \
  { \
    if(getDebugRequestTable().once(description)) \
      getDebugRequestTable().disable(description); \
    expression \
  } \
}

Definition at line 121 of file Debugging.h.

Referenced by GT2005StrategySymbols::computeRole(), GT2005TeamBallLocator::execute(), SlamSelfLocator::execute(), GT2005LEDControl::execute(), VLCImageProcessor::execute(), GT2005ImageProcessor::execute(), VLCImageProcessor::scan(), and GT2005ImageProcessor::scan().

#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 154 of file Debugging.h.

Referenced by Cognition::main().

#define DEBUG_CHECK_CRASH   { if (SystemCall::getCurrentSystemTime () - entryTime > 2000) {std::cout << "breakpoint in " << __FILE__ << ":" << __LINE__ << "; \n was executed more than 2 seconds\n"; while (true); }; };
 

Definition at line 161 of file Debugging.h.


Function Documentation

void initDebugging OutMessage queue,
DebugKeyTable table,
DebugRequestTable debugRequestTable
 

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 21 of file Debugging.cpp.

References debugKeyTable, debugOut, and debugRequestTable.

Referenced by Process::Process(), and Process::processMain().

OutMessage& getDebugOut  ) 
 

Returns a reference to a process wide OutMessage.

Definition at line 28 of file Debugging.cpp.

References debugOut.

Referenced by Process::processMain(), GTXabsl2EngineExecutor::sendDebugMessage(), GT2005WalkingEngine::sendPolys(), and GT2005WalkingEngine::streamDebugData().

DebugKeyTable& getDebugKeyTable  ) 
 

Returns a reference to a process wide debug key table.

Definition at line 33 of file Debugging.cpp.

References debugKeyTable.

Referenced by GTXabsl2EngineExecutor::executeEngine().

DebugRequestTable& getDebugRequestTable  ) 
 

Returns a reference to a process wide debug request table.

Definition at line 38 of file Debugging.cpp.

References debugRequestTable.


Generated on Mon Mar 20 22:07:16 2006 for GT2005 by doxygen 1.3.6