#include <ValueHistoryDlgBar.h>
Inheritance diagram for CValueHistoryDlgBar:
Definition at line 22 of file ValueHistoryDlgBar.h.
anonymous enum |
anonymous enum [protected] |
The maximum numbers of entries that can be stored per value
Definition at line 193 of file ValueHistoryDlgBar.h.
IDs for values to display
Definition at line 26 of file ValueHistoryDlgBar.h.
CValueHistoryDlgBar::CValueHistoryDlgBar | ( | ) |
Default constructor.
Definition at line 34 of file ValueHistoryDlgBar.cpp.
References bmpOffScreen, freeze, and oldBitmap.
CValueHistoryDlgBar::~CValueHistoryDlgBar | ( | ) |
Destructor
Definition at line 44 of file ValueHistoryDlgBar.cpp.
References bmpOffScreen, dcOffScreen, displayValue, getValueIDName(), numberOfValueIDs, oldBitmap, scale, and timeRange.
void CValueHistoryDlgBar::addValue | ( | valueID | id, | |
unsigned long | timeStamp, | |||
double | value, | |||
bool | halfSiz = false | |||
) |
Adds a new value to display
id | the id of the value | |
timeStamp | the time when the value was generated | |
value | the value | |
halfSiz | specifies whether the value shall be painted half as large as usual |
Definition at line 427 of file ValueHistoryDlgBar.cpp.
References RingBuffer< V, n >::add(), clear(), freeze, halfSize, latestTimeStamp, timeStamps, and valueHistory.
Referenced by handleMessage().
void CValueHistoryDlgBar::clear | ( | ) | [protected] |
called to delete every pieces of data added so far
Definition at line 657 of file ValueHistoryDlgBar.cpp.
References freeze, halfSize, RingBuffer< V, n >::init(), latestTimeStamp, numberOfValueIDs, timeStamps, and valueHistory.
Referenced by addValue(), and OnContextMenu().
CValueHistoryDlgBar::DECLARE_MESSAGE_MAP | ( | ) | [protected] |
Reimplemented from CDynamicBarDlg.
void CValueHistoryDlgBar::DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
Definition at line 60 of file ValueHistoryDlgBar.cpp.
References IDC_VALUE_HISTORY_FREEZE_BUTTON, IDC_VALUE_HISTORY_SCALE_SLIDER, IDC_VALUE_HISTORY_TIME_SLIDER, IDC_VALUE_HISTORY_TIME_STATIC, m_freezeButton, m_scaleSlider, m_timeRangeSlider, and m_timeRangeStatic.
static const char* CValueHistoryDlgBar::getValueIDName | ( | valueID | id | ) | [inline, static] |
returns the name for an id
Definition at line 72 of file ValueHistoryDlgBar.h.
References ballPerceptAngle, ballPerceptAngleBearingBased, ballPerceptAngleSizeBased, ballPerceptDistance, ballPerceptDistanceBearingBased, ballPerceptDistanceSizeBased, ballPerceptX, ballPerceptY, ballPositionAngle, ballPositionDistance, ballPositionSpeedAbs, ballPositionSpeedDir, bodyRollCalculatedFromAccelerationSensors, bodyRollCalculatedFromLegSensors, bodyRollProvidedByMotionControl, bodyTiltCalculatedFromAccelerationSensors, bodyTiltCalculatedFromLegSensors, bodyTiltProvidedByMotionControl, cameraMatrixIsValid, neckHeightCalculatedFromLegSensors, neckHeightProvidedByMotionControl, positionInWalkCycle, psdPerceptToFarAway, psdPerceptX, psdPerceptY, psdPerceptZ, robotPoseAngle, robotPoseSpeed, robotPoseX, robotPoseY, specialPerceptRobotPoseAngle, specialPerceptRobotPoseX, specialPerceptRobotPoseY, walkSpeedRotation, walkSpeedX, and walkSpeedY.
Referenced by OnContextMenu(), OnPaint(), saveAllCSV(), and ~CValueHistoryDlgBar().
bool CValueHistoryDlgBar::handleMessage | ( | InMessage & | message | ) | [virtual] |
Called from a MessageQueue to distribute messages
message | The message that can be read. |
Reimplemented from CRobotControlDialogBar.
Definition at line 277 of file ValueHistoryDlgBar.cpp.
References Vector2< V >::abs(), addValue(), Vector2< V >::angle(), Geometry::angleTo(), ballPerceptAngle, ballPerceptAngleBearingBased, ballPerceptAngleSizeBased, ballPerceptDistance, ballPerceptDistanceBearingBased, ballPerceptDistanceSizeBased, ballPerceptX, ballPerceptY, ballPositionAngle, ballPositionDistance, ballPositionSpeedAbs, ballPositionSpeedDir, BallPercept::ballWasSeen, InMessage::bin, BodyPosture::bodyRollCalculatedFromAccelerationSensors, bodyRollCalculatedFromAccelerationSensors, BodyPosture::bodyRollCalculatedFromLegSensors, bodyRollCalculatedFromLegSensors, BodyPosture::bodyRollProvidedByMotionControl, bodyRollProvidedByMotionControl, BodyPosture::bodyTiltCalculatedFromAccelerationSensors, bodyTiltCalculatedFromAccelerationSensors, BodyPosture::bodyTiltCalculatedFromLegSensors, bodyTiltCalculatedFromLegSensors, BodyPosture::bodyTiltProvidedByMotionControl, bodyTiltProvidedByMotionControl, cameraMatrixIsValid, SpecialPercept::checkerboard, SpecialPercept::checkerPose, Geometry::distanceTo(), MotionInfo::executedMotionRequest, BodyPosture::frameNumber, MotionRequest::frameNumber, SpecialPercept::frameNumber, CameraMatrix::frameNumber, BallPercept::frameNumber, RobotPose::frameNumber, BallPercept::getAngle(), BallPercept::getAngleBearingBased(), BallPercept::getAngleSizeBased(), BallPercept::getDistance(), BallPercept::getDistanceBearingBased(), BallPercept::getDistanceSizeBased(), InMessage::getMessageID(), BallPercept::getOffsetBearingBased(), idBodyPosture, idMotionInfo, idPercepts, idSpecialPercept, idWorldState, CameraMatrix::isValid, BodyPosture::neckHeightCalculatedFromLegSensors, neckHeightCalculatedFromLegSensors, BodyPosture::neckHeightProvidedByMotionControl, neckHeightProvidedByMotionControl, PSDPercept::numOfPercepts, MotionInfo::positionInWalkCycle, positionInWalkCycle, psdPerceptToFarAway, psdPerceptX, psdPerceptY, psdPerceptZ, RECEIVE_PERCEPTS, RECEIVE_WORLDSTATE, robotPoseAngle, robotPoseSpeed, robotPoseX, robotPoseY, Pose2D::rotation, BallModel::seen, specialPerceptRobotPoseAngle, specialPerceptRobotPoseX, specialPerceptRobotPoseY, SeenBallPosition::speed, toDegrees(), Pose2D::translation, SpecialPercept::type, WalkRequest::walkParams, MotionRequest::walkRequest, walkSpeedRotation, walkSpeedX, walkSpeedY, Vector2< V >::x, and Vector2< V >::y.
void CValueHistoryDlgBar::OnContextMenu | ( | CWnd * | pWnd, | |
CPoint | point | |||
) | [protected] |
Definition at line 672 of file ValueHistoryDlgBar.cpp.
References clear(), displayValue, getValueIDName(), numberOfValueIDs, saveAllCSV(), and VERIFY.
void CValueHistoryDlgBar::OnFreezeButton | ( | ) | [protected] |
void CValueHistoryDlgBar::OnHScroll | ( | UINT | nSBCode, | |
UINT | nPos, | |||
CScrollBar * | pScrollBar | |||
) | [protected] |
Definition at line 709 of file ValueHistoryDlgBar.cpp.
References m_scaleSlider, m_timeRangeSlider, m_timeRangeStatic, scale, text, and timeRange.
BOOL CValueHistoryDlgBar::OnInitDialog | ( | ) | [protected, virtual] |
Reimplemented from CDynamicDialog.
Definition at line 83 of file ValueHistoryDlgBar.cpp.
References PaintMethodsWin32::PaintStyle::cross, PaintMethodsWin32::PaintStyle::filledCircle, PaintMethodsWin32::PaintStyle::filledSquare, PaintMethodsWin32::PaintStyle::horizontalLine, CDynamicDialog::OnInitDialog(), PaintMethodsWin32::PaintStyle::square, text, TRUE, and PaintMethodsWin32::PaintStyle::vcross.
void CValueHistoryDlgBar::OnPaint | ( | ) | [protected] |
Definition at line 451 of file ValueHistoryDlgBar.cpp.
References dcOffScreen, displayValue, FALSE, getValueIDName(), halfSize, int(), latestTimeStamp, maxNumberOfEntries, numberOfValueIDs, paintStyles, paintValue(), rect, scale, text, timeRange, timeStamps, and valueHistory.
void CValueHistoryDlgBar::OnSize | ( | UINT | nType, | |
int | cx, | |||
int | cy | |||
) | [protected] |
Reimplemented from CDynamicDialog.
Definition at line 628 of file ValueHistoryDlgBar.cpp.
References bmpOffScreen, dcOffScreen, oldBitmap, CDynamicDialog::OnSize(), and rect.
void CValueHistoryDlgBar::paintValue | ( | int | x, | |
int | y, | |||
int | size, | |||
PaintMethodsWin32::PaintStyle | style | |||
) | [protected] |
Paints a value to a given position
Definition at line 570 of file ValueHistoryDlgBar.cpp.
References PaintMethodsWin32::PaintStyle::brushColor, PaintMethodsWin32::PaintStyle::circle, PaintMethodsWin32::PaintStyle::cross, dcOffScreen, PaintMethodsWin32::PaintStyle::filledCircle, PaintMethodsWin32::PaintStyle::filledSquare, PaintMethodsWin32::PaintStyle::horizontalLine, PaintMethodsWin32::PaintStyle::penColor, PaintMethodsWin32::PaintStyle::penWidth, PaintMethodsWin32::PaintStyle::shape, PaintMethodsWin32::PaintStyle::square, and PaintMethodsWin32::PaintStyle::vcross.
Referenced by OnPaint().
void CValueHistoryDlgBar::saveAllCSV | ( | ) | [private] |
saves all data to a CSV (comma separated values) file (separate time lines for all data
Definition at line 732 of file ValueHistoryDlgBar.cpp.
References endl(), File::getGTDir(), RingBuffer< V, n >::getNumberOfEntries(), getValueIDName(), maxNumberOfEntries, numberOfValueIDs, timeStamps, and valueHistory.
Referenced by OnContextMenu().
CBitmap* CValueHistoryDlgBar::bmpOffScreen [private] |
Definition at line 173 of file ValueHistoryDlgBar.h.
Referenced by CValueHistoryDlgBar(), OnSize(), and ~CValueHistoryDlgBar().
CDC CValueHistoryDlgBar::dcOffScreen [private] |
Definition at line 172 of file ValueHistoryDlgBar.h.
Referenced by OnPaint(), OnSize(), paintValue(), and ~CValueHistoryDlgBar().
bool CValueHistoryDlgBar::displayValue[numberOfValueIDs] [protected] |
If the values shall be dislplayed
Definition at line 205 of file ValueHistoryDlgBar.h.
Referenced by OnContextMenu(), OnPaint(), and ~CValueHistoryDlgBar().
bool CValueHistoryDlgBar::freeze [protected] |
if true, no new values are added
Definition at line 214 of file ValueHistoryDlgBar.h.
Referenced by addValue(), clear(), CValueHistoryDlgBar(), and OnFreezeButton().
RingBuffer<bool,maxNumberOfEntries> CValueHistoryDlgBar::halfSize[numberOfValueIDs] [protected] |
The half size history for each value
Definition at line 202 of file ValueHistoryDlgBar.h.
Referenced by addValue(), clear(), and OnPaint().
unsigned long CValueHistoryDlgBar::latestTimeStamp [protected] |
The last received time stamp
Definition at line 190 of file ValueHistoryDlgBar.h.
Referenced by addValue(), clear(), and OnPaint().
Definition at line 148 of file ValueHistoryDlgBar.h.
Referenced by DoDataExchange(), and OnFreezeButton().
CSliderCtrl CValueHistoryDlgBar::m_scaleSlider |
Definition at line 145 of file ValueHistoryDlgBar.h.
Referenced by DoDataExchange(), and OnHScroll().
CSliderCtrl CValueHistoryDlgBar::m_timeRangeSlider |
Definition at line 146 of file ValueHistoryDlgBar.h.
Referenced by DoDataExchange(), and OnHScroll().
Definition at line 147 of file ValueHistoryDlgBar.h.
Referenced by DoDataExchange(), and OnHScroll().
CBitmap* CValueHistoryDlgBar::oldBitmap [private] |
Definition at line 174 of file ValueHistoryDlgBar.h.
Referenced by CValueHistoryDlgBar(), OnSize(), and ~CValueHistoryDlgBar().
PaintMethodsWin32::PaintStyle CValueHistoryDlgBar::paintStyles[numberOfValueIDs] [protected] |
The paint style for each value
Definition at line 208 of file ValueHistoryDlgBar.h.
Referenced by OnPaint().
CRect CValueHistoryDlgBar::rect [private] |
double CValueHistoryDlgBar::scale [protected] |
zoom factor for the values displayed in the dialog
Definition at line 187 of file ValueHistoryDlgBar.h.
Referenced by OnHScroll(), OnPaint(), and ~CValueHistoryDlgBar().
int CValueHistoryDlgBar::timeRange [protected] |
the range of time that is displayed in the dialog (in seconds )
Definition at line 184 of file ValueHistoryDlgBar.h.
Referenced by OnHScroll(), OnPaint(), and ~CValueHistoryDlgBar().
RingBuffer<unsigned long,maxNumberOfEntries> CValueHistoryDlgBar::timeStamps[numberOfValueIDs] [protected] |
The time stamp history for each value
Definition at line 199 of file ValueHistoryDlgBar.h.
Referenced by addValue(), clear(), OnPaint(), and saveAllCSV().
RingBuffer<double,maxNumberOfEntries> CValueHistoryDlgBar::valueHistory[numberOfValueIDs] [protected] |
The valueHistory for each value
Definition at line 196 of file ValueHistoryDlgBar.h.
Referenced by addValue(), clear(), OnPaint(), and saveAllCSV().