CStatisticsDlgBar Class Reference

#include <StatisticsDlgBar.h>

Inheritance diagram for CStatisticsDlgBar:

CRobotControlDialogBar CDynamicBarDlg MessageHandler CDynamicChildDlg CDynamicDialog CDynamicWndEx CDynamicWnd List of all members.

Public Types

 IDD = IDD_DIALOG_BAR_STATISTICS
enum  { IDD = IDD_DIALOG_BAR_STATISTICS }

Public Member Functions

 CStatisticsDlgBar ()
 ~CStatisticsDlgBar ()
virtual bool handleMessage (InMessage &message)
virtual bool handleCommand (UINT command)
virtual void updateUI (CCmdUI *pCmdUI)
virtual void OnConfigurationLoad (CString sectionName)
virtual void OnConfigurationSave (CString sectionName)
void OnLButtonDown (UINT nFlags, CPoint point)
void handleMessagePercepts (InMessage &message)
void handleMessageWorldState (InMessage &message)
void handleMessageOracledWorldState (InMessage &message)
void handleMessageManualWorldState (unsigned long frameNumber)
void paintBackground (CPaintDC &dc)
void paintSelectedFrame (CPaintDC &dc)
void paintPercepts (CPaintDC &dc)
void paintStatistics (CPaintDC &dc)
void showSummary ()
void setStaticInt (CStatic &control, int i)
void setStaticDouble (CStatic &control, double i)
double getDouble (CEdit &control)
CString getString (CEdit &control)
afx_msg void OnResetButton ()
afx_msg void OnTimerButton ()
afx_msg void OnPaint ()
afx_msg void OnReferenceSourceChange ()
afx_msg void OnPredefinedPositionChange ()
 DECLARE_MESSAGE_MAP ()

Public Attributes

CStatic m_generalFrames
CStatic m_generalSeconds
CButton m_generalReset
CButton m_generalTimer
CEdit m_positionTrueX
CEdit m_positionTrueY
CEdit m_positionTruePhi
CEdit m_positionWithinDist
CStatic m_History
CStatic m_History_Estimated
CStatic m_History_True
CStatic m_History_EstimatedRelative
CStatic m_History_TrueRelative
CComboBox m_positionSource
CComboBox m_positionPredefined

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnInitDialog ()

Protected Attributes

MainBuffer buffer
PerceptType selectedType
unsigned long selectedFrame
unsigned long framePaintedAt [ocolumns]
CFont fSmall
CFont fError
CFont fNormal
CFont fGiant
CFont fBig
CBrush brushOrange
CBrush brushLime
CBrush brushGreen
CBrush brushBlue
CBrush brushRed
CBrush brushFade [6]
CBrush brushGrey
int captureCount
unsigned long predefinedPositionsFound [11]
unsigned long startingFrameAtPosition [11]
bool kidnapMode
int activePosition

Detailed Description

Definition at line 224 of file StatisticsDlgBar.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
IDD 

Definition at line 241 of file StatisticsDlgBar.h.


Constructor & Destructor Documentation

CStatisticsDlgBar::CStatisticsDlgBar (  ) 

Definition at line 36 of file StatisticsDlgBar.cpp.

CStatisticsDlgBar::~CStatisticsDlgBar (  ) 

Definition at line 61 of file StatisticsDlgBar.cpp.


Member Function Documentation

CStatisticsDlgBar::DECLARE_MESSAGE_MAP (  ) 

Reimplemented from CDynamicBarDlg.

void CStatisticsDlgBar::DoDataExchange ( CDataExchange *  pDX  )  [protected, virtual]

Definition at line 65 of file StatisticsDlgBar.cpp.

References IDC_STATISTICS_GENERAL_FRAMES, IDC_STATISTICS_GENERAL_RESET, IDC_STATISTICS_GENERAL_SECONDS, IDC_STATISTICS_GENERAL_TIMER, IDC_STATISTICS_HISTORY, IDC_STATISTICS_HISTORY_ESTIMATED, IDC_STATISTICS_HISTORY_ESTIMATED_RELATIVE, IDC_STATISTICS_HISTORY_TRUE, IDC_STATISTICS_HISTORY_TRUE_RELATIVE, IDC_STATISTICS_POSITION_PREDEFINED, IDC_STATISTICS_POSITION_SOURCE, IDC_STATISTICS_POSITION_TRUE_PHI, IDC_STATISTICS_POSITION_TRUE_X, IDC_STATISTICS_POSITION_TRUE_Y, IDC_STATISTICS_POSITION_WITHIN_DIST, m_generalFrames, m_generalReset, m_generalSeconds, m_generalTimer, m_History, m_History_Estimated, m_History_EstimatedRelative, m_History_True, m_History_TrueRelative, m_positionPredefined, m_positionSource, m_positionTruePhi, m_positionTrueX, m_positionTrueY, and m_positionWithinDist.

double CStatisticsDlgBar::getDouble ( CEdit &  control  ) 

Definition at line 399 of file StatisticsDlgBar.cpp.

Referenced by handleMessage(), handleMessageManualWorldState(), and showSummary().

CString CStatisticsDlgBar::getString ( CEdit &  control  ) 

Definition at line 407 of file StatisticsDlgBar.cpp.

Referenced by OnConfigurationSave().

bool CStatisticsDlgBar::handleCommand ( UINT  command  )  [virtual]

Handles control notifications which arrived in the main frame

Parameters:
command The id of the control, menu, accelerator etc.
Returns:
If the command was handled.

Reimplemented from CRobotControlDialogBar.

Definition at line 123 of file StatisticsDlgBar.cpp.

bool CStatisticsDlgBar::handleMessage ( InMessage message  )  [virtual]

Is called for incoming debug messages.

Parameters:
message The message to handle.
Returns:
If the message was handled.

Reimplemented from CRobotControlDialogBar.

Definition at line 229 of file StatisticsDlgBar.cpp.

References activePosition, buffer, MainBuffer::evaluate(), OutMessage::finishMessage(), SingleFrame::framesSinceLastLandmark, getDouble(), MainBuffer::getLatest(), InMessage::getMessageID(), getQueues(), MainBuffer::getSingleFrame(), handleMessageOracledWorldState(), handleMessagePercepts(), handleMessageWorldState(), idOracledWorldState, idPercepts, idText, idWorldState, KIDNAP_DETECTION_FRAMES, kidnapMode, MainBuffer::latestFrame, SingleFrame::locator, m_generalFrames, m_generalSeconds, m_positionPredefined, m_positionWithinDist, OnPredefinedPositionChange(), MessageQueue::out, predefinedPositionsFound, SingleFrame::setKidnapped(), SingleFrame::setRecovered(), showSummary(), MainBuffer::spreadTrueData(), startingFrameAtPosition, OutMessage::text, CRobotControlQueues::toGUI, MainBuffer::updateStatistics(), LocatorPercept::withinRange, and LocatorPercept::withinRangeValid.

void CStatisticsDlgBar::handleMessageManualWorldState ( unsigned long  frameNumber  ) 

Definition at line 569 of file StatisticsDlgBar.cpp.

References buffer, SingleFrame::framesSinceLastLandmark, getDouble(), MainBuffer::getLatest(), KIDNAP_DETECTION_FRAMES, M_PI, m_positionTruePhi, m_positionTrueX, m_positionTrueY, Pose2D::rotate(), MainBuffer::setKidnapped(), MainBuffer::setTrueRobotPosition(), and Pose2D::translate().

Referenced by handleMessagePercepts(), and handleMessageWorldState().

void CStatisticsDlgBar::handleMessageOracledWorldState ( InMessage message  ) 

Definition at line 546 of file StatisticsDlgBar.cpp.

References InMessage::bin, buffer, RobotPose::frameNumber, m_positionSource, RECEIVE_WORLDSTATE, MainBuffer::setCameraData(), and MainBuffer::setTrueRobotPosition().

Referenced by handleMessage().

void CStatisticsDlgBar::handleMessagePercepts ( InMessage message  ) 

Definition at line 418 of file StatisticsDlgBar.cpp.

References Goal::angle, Flag::angle, InMessage::bin, buffer, Goal::color, Goal::distance, Flag::distance, flagBluePink, flagPinkBlue, flagPinkYellow, LandmarksPercept::flags, flagYellowPink, frame, BallPercept::frameNumber, CameraMatrix::frameNumber, getPlayer(), goalBlue, LandmarksPercept::goals, goalYellow, handleMessageManualWorldState(), m_positionSource, maxPerceptType, LandmarksPercept::numberOfFlags, LandmarksPercept::numberOfGoals, Flag::pinkAboveSkyblue, Flag::pinkAboveYellow, RECEIVE_PERCEPTS, MainBuffer::setCameraData(), MainBuffer::setLandmarkNotSeen(), MainBuffer::setLandmarkTruePosition(), MainBuffer::setSeenLandmark(), skyblue, Flag::skyblueAbovePink, Flag::type, yellow, and Flag::yellowAbovePink.

Referenced by handleMessage().

void CStatisticsDlgBar::handleMessageWorldState ( InMessage message  ) 

Definition at line 511 of file StatisticsDlgBar.cpp.

References InMessage::bin, buffer, RobotPose::frameNumber, getPlayer(), handleMessageManualWorldState(), m_positionSource, RECEIVE_WORLDSTATE, MainBuffer::setCameraData(), MainBuffer::setLocatorPosition(), and MainBuffer::setTrueRobotPosition().

Referenced by handleMessage().

void CStatisticsDlgBar::OnConfigurationLoad ( CString  sectionName  )  [virtual]

Is called when a configuration is loaded. Can be used by the dialogs and bars to load configuration dependand settings.

Parameters:
sectionName The registry section for the current configuration

Reimplemented from CRobotControlDialogBar.

Definition at line 360 of file StatisticsDlgBar.cpp.

References m_positionSource, m_positionTruePhi, m_positionTrueX, m_positionTrueY, and m_positionWithinDist.

void CStatisticsDlgBar::OnConfigurationSave ( CString  sectionName  )  [virtual]

Is called when a configuration is saved. Can be used by the dialogs and bars to save configuration dependand settings.

Parameters:
sectionName The registry section for the current configuration

Reimplemented from CRobotControlDialogBar.

Definition at line 372 of file StatisticsDlgBar.cpp.

References getString(), m_positionSource, m_positionTruePhi, m_positionTrueX, m_positionTrueY, and m_positionWithinDist.

BOOL CStatisticsDlgBar::OnInitDialog (  )  [protected, virtual]

Reimplemented from CDynamicDialog.

Definition at line 90 of file StatisticsDlgBar.cpp.

References CDynamicDialog::OnInitDialog(), OnResetButton(), and TRUE.

void CStatisticsDlgBar::OnLButtonDown ( UINT  nFlags,
CPoint  point 
)

Definition at line 345 of file StatisticsDlgBar.cpp.

References framePaintedAt, maxPerceptType, ocolumns, oh, ow, ox, oy, selectedFrame, and selectedType.

void CStatisticsDlgBar::OnPaint (  ) 

Definition at line 585 of file StatisticsDlgBar.cpp.

References buffer, fSmall, oh, ow, ox, oy, paintBackground(), paintPercepts(), paintSelectedFrame(), paintStatistics(), and MainBuffer::removeChangedFlag().

void CStatisticsDlgBar::OnPredefinedPositionChange (  ) 

Definition at line 326 of file StatisticsDlgBar.cpp.

References M_PI, m_positionPredefined, m_positionTruePhi, m_positionTrueX, m_positionTrueY, predefinedPositions, Pose2D::rotate(), Pose2D::rotation, Pose2D::translate(), Pose2D::translation, Vector2< V >::x, and Vector2< V >::y.

Referenced by handleMessage().

void CStatisticsDlgBar::OnReferenceSourceChange (  ) 

Definition at line 322 of file StatisticsDlgBar.cpp.

void CStatisticsDlgBar::OnResetButton (  ) 

Definition at line 101 of file StatisticsDlgBar.cpp.

References activePosition, buffer, kidnapMode, and showSummary().

Referenced by OnInitDialog().

void CStatisticsDlgBar::OnTimerButton (  ) 

Definition at line 110 of file StatisticsDlgBar.cpp.

References activePosition, buffer, kidnapMode, predefinedPositionsFound, and startingFrameAtPosition.

void CStatisticsDlgBar::paintBackground ( CPaintDC &  dc  ) 

Definition at line 652 of file StatisticsDlgBar.cpp.

References brushBlue, brushFade, buffer, frame, framePaintedAt, fSmall, MainBuffer::getSingleFrame(), IDB_STATISTICS, MainBuffer::latestFrame, MAX_FRAMES, ocolumns, oh, ow, ox, oy, selectedFrame, and selectedType.

Referenced by OnPaint().

void CStatisticsDlgBar::paintPercepts ( CPaintDC &  dc  ) 

Definition at line 836 of file StatisticsDlgBar.cpp.

References brushGreen, brushGrey, brushLime, brushRed, buffer, fError, frame, MainBuffer::getSingleFrame(), MainBuffer::latestFrame, MAX_FRAMES, maxPerceptType, ocolumns, oh, ow, ox, oy, visibleNo, visiblePartially, visibleUnknown, and visibleYes.

Referenced by OnPaint().

void CStatisticsDlgBar::paintSelectedFrame ( CPaintDC &  dc  ) 

Definition at line 716 of file StatisticsDlgBar.cpp.

References brushBlue, buffer, dist(), frame, MainBuffer::getSingleFrame(), m_History_Estimated, m_History_EstimatedRelative, m_History_True, m_History_TrueRelative, M_PI, ocolumns, oh, ox, oy, selectedFrame, selectedType, sqr, visibleNo, visiblePartially, visibleUnknown, and visibleYes.

Referenced by OnPaint().

void CStatisticsDlgBar::paintStatistics ( CPaintDC &  dc  ) 

Definition at line 926 of file StatisticsDlgBar.cpp.

References buffer, fNormal, frame, fSmall, MainBuffer::getLatest(), maxPerceptType, ocolumns, oh, ow, ox, and oy.

Referenced by OnPaint().

void CStatisticsDlgBar::setStaticDouble ( CStatic &  control,
double  i 
)

Definition at line 392 of file StatisticsDlgBar.cpp.

void CStatisticsDlgBar::setStaticInt ( CStatic &  control,
int  i 
)

Definition at line 385 of file StatisticsDlgBar.cpp.

void CStatisticsDlgBar::showSummary (  ) 

Definition at line 134 of file StatisticsDlgBar.cpp.

References activePosition, buffer, MainBuffer::evaluate(), OutMessage::finishMessage(), frame, getDouble(), MainBuffer::getLatest(), getQueues(), goalBlue, goalYellow, idText, m_generalSeconds, M_PI, m_positionWithinDist, maxPerceptType, MessageQueue::out, predefinedPositionsFound, MainBuffer::spreadTrueData(), startingFrameAtPosition, OutMessage::text, CRobotControlQueues::toGUI, and MainBuffer::updateStatistics().

Referenced by handleMessage(), and OnResetButton().

void CStatisticsDlgBar::updateUI ( CCmdUI *  pCmdUI  )  [virtual]

Enables the controls in the dialog bar. This function is called from the main window for all controls.

Parameters:
pCmdUI An interface to the control that allows enabling/disabling, checking etc.

Reimplemented from CRobotControlDialogBar.

Definition at line 130 of file StatisticsDlgBar.cpp.


Member Data Documentation

int CStatisticsDlgBar::activePosition [protected]

Definition at line 296 of file StatisticsDlgBar.h.

Referenced by handleMessage(), OnResetButton(), OnTimerButton(), and showSummary().

CBrush CStatisticsDlgBar::brushBlue [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintBackground(), and paintSelectedFrame().

CBrush CStatisticsDlgBar::brushFade[6] [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintBackground().

CBrush CStatisticsDlgBar::brushGreen [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintPercepts().

CBrush CStatisticsDlgBar::brushGrey [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintPercepts().

CBrush CStatisticsDlgBar::brushLime [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintPercepts().

CBrush CStatisticsDlgBar::brushOrange [protected]

Definition at line 233 of file StatisticsDlgBar.h.

CBrush CStatisticsDlgBar::brushRed [protected]

Definition at line 233 of file StatisticsDlgBar.h.

Referenced by paintPercepts().

MainBuffer CStatisticsDlgBar::buffer [protected]

Definition at line 227 of file StatisticsDlgBar.h.

Referenced by handleMessage(), handleMessageManualWorldState(), handleMessageOracledWorldState(), handleMessagePercepts(), handleMessageWorldState(), OnPaint(), OnResetButton(), OnTimerButton(), paintBackground(), paintPercepts(), paintSelectedFrame(), paintStatistics(), and showSummary().

int CStatisticsDlgBar::captureCount [protected]

Definition at line 291 of file StatisticsDlgBar.h.

CFont CStatisticsDlgBar::fBig [protected]

Definition at line 232 of file StatisticsDlgBar.h.

CFont CStatisticsDlgBar::fError [protected]

Definition at line 232 of file StatisticsDlgBar.h.

Referenced by paintPercepts().

CFont CStatisticsDlgBar::fGiant [protected]

Definition at line 232 of file StatisticsDlgBar.h.

CFont CStatisticsDlgBar::fNormal [protected]

Definition at line 232 of file StatisticsDlgBar.h.

Referenced by paintStatistics().

unsigned long CStatisticsDlgBar::framePaintedAt[ocolumns] [protected]

Definition at line 231 of file StatisticsDlgBar.h.

Referenced by OnLButtonDown(), and paintBackground().

CFont CStatisticsDlgBar::fSmall [protected]

Definition at line 232 of file StatisticsDlgBar.h.

Referenced by OnPaint(), paintBackground(), and paintStatistics().

bool CStatisticsDlgBar::kidnapMode [protected]

Definition at line 294 of file StatisticsDlgBar.h.

Referenced by handleMessage(), OnResetButton(), and OnTimerButton().

CStatic CStatisticsDlgBar::m_generalFrames

Definition at line 242 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), and handleMessage().

CButton CStatisticsDlgBar::m_generalReset

Definition at line 244 of file StatisticsDlgBar.h.

Referenced by DoDataExchange().

CStatic CStatisticsDlgBar::m_generalSeconds

Definition at line 243 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessage(), and showSummary().

CButton CStatisticsDlgBar::m_generalTimer

Definition at line 245 of file StatisticsDlgBar.h.

Referenced by DoDataExchange().

CStatic CStatisticsDlgBar::m_History

Definition at line 250 of file StatisticsDlgBar.h.

Referenced by DoDataExchange().

CStatic CStatisticsDlgBar::m_History_Estimated

Definition at line 251 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), and paintSelectedFrame().

CStatic CStatisticsDlgBar::m_History_EstimatedRelative

Definition at line 253 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), and paintSelectedFrame().

CStatic CStatisticsDlgBar::m_History_True

Definition at line 252 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), and paintSelectedFrame().

CStatic CStatisticsDlgBar::m_History_TrueRelative

Definition at line 254 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), and paintSelectedFrame().

CComboBox CStatisticsDlgBar::m_positionPredefined

Definition at line 256 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessage(), and OnPredefinedPositionChange().

CComboBox CStatisticsDlgBar::m_positionSource

Definition at line 255 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessageOracledWorldState(), handleMessagePercepts(), handleMessageWorldState(), OnConfigurationLoad(), and OnConfigurationSave().

CEdit CStatisticsDlgBar::m_positionTruePhi

Definition at line 248 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessageManualWorldState(), OnConfigurationLoad(), OnConfigurationSave(), and OnPredefinedPositionChange().

CEdit CStatisticsDlgBar::m_positionTrueX

Definition at line 246 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessageManualWorldState(), OnConfigurationLoad(), OnConfigurationSave(), and OnPredefinedPositionChange().

CEdit CStatisticsDlgBar::m_positionTrueY

Definition at line 247 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessageManualWorldState(), OnConfigurationLoad(), OnConfigurationSave(), and OnPredefinedPositionChange().

CEdit CStatisticsDlgBar::m_positionWithinDist

Definition at line 249 of file StatisticsDlgBar.h.

Referenced by DoDataExchange(), handleMessage(), OnConfigurationLoad(), OnConfigurationSave(), and showSummary().

unsigned long CStatisticsDlgBar::predefinedPositionsFound[11] [protected]

Definition at line 292 of file StatisticsDlgBar.h.

Referenced by handleMessage(), OnTimerButton(), and showSummary().

unsigned long CStatisticsDlgBar::selectedFrame [protected]

Definition at line 230 of file StatisticsDlgBar.h.

Referenced by OnLButtonDown(), paintBackground(), and paintSelectedFrame().

PerceptType CStatisticsDlgBar::selectedType [protected]

Definition at line 229 of file StatisticsDlgBar.h.

Referenced by OnLButtonDown(), paintBackground(), and paintSelectedFrame().

unsigned long CStatisticsDlgBar::startingFrameAtPosition[11] [protected]

Definition at line 293 of file StatisticsDlgBar.h.

Referenced by handleMessage(), OnTimerButton(), and showSummary().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:25:42 2006 for DT2005.panorama by  doxygen 1.4.7