OpenASIP 2.2
Loading...
Searching...
No Matches
ProximStopDialog.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file ProximStopDialog.hh
26 *
27 * Declaration of ProximStopDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_PROXIM_STOP_DIALOG_HH
34#define TTA_PROXIM_STOP_DIALOG_HH
35
36#include <wx/wx.h>
37#include "SimulatorConstants.hh"
38
40
41/**
42 * Dialog which is diaplayed when the simulation is running.
43 *
44 * The dialog contains Stop-button for stopping the simulation, and some
45 * information of the simulation progress.
46 */
47class ProximStopDialog : public wxDialog {
48public:
50 wxWindow* parent,
51 wxWindowID id,
52 SimulatorFrontend& frontend);
53
54 virtual ~ProximStopDialog();
55
56private:
57 void onStop(wxCommandEvent& event);
58 void onClose(wxCloseEvent& event);
59 void onUpdate(wxTimerEvent& event);
60
61 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
62
63 /// Widget IDs.
64 enum {
65 ID_STOP = 10000,
74 };
75
76 /// Simulator frontend to stop and track.
78
79 /// Timer which updates the dialog periodically.
80 wxTimer* timer_;
81 /// Stop watch measuring the simulation runtime.
82 wxStopWatch* watch_;
83
84 /// Text displaying the elapsed simulation time.
85 wxStaticText* timeCtrl_;
86 /// Text displaying the simulated cycle count.
87 wxStaticText* cyclesCtrl_;
88 /// Text displaying the average cps value.
89 wxStaticText* cpsCtrl_;
90
91 /// Time elapsed on the cps update.
92 long time_;
93 /// Cycles simulated on the last cps update.
95
96 /// Dialog update itnerval in milliseconds.
97 static const int UPDATE_INTERVAL;
98
99 DECLARE_EVENT_TABLE()
100};
101#endif
CycleCount ClockCycleCount
Alias for ClockCycleCount.
void onStop(wxCommandEvent &event)
void onUpdate(wxTimerEvent &event)
wxStopWatch * watch_
Stop watch measuring the simulation runtime.
wxStaticText * cyclesCtrl_
Text displaying the simulated cycle count.
static const int UPDATE_INTERVAL
Dialog update itnerval in milliseconds.
ClockCycleCount cycles_
Cycles simulated on the last cps update.
wxStaticText * timeCtrl_
Text displaying the elapsed simulation time.
wxStaticText * cpsCtrl_
Text displaying the average cps value.
virtual ~ProximStopDialog()
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
void onClose(wxCloseEvent &event)
long time_
Time elapsed on the cps update.
wxTimer * timer_
Timer which updates the dialog periodically.
SimulatorFrontend & frontend_
Simulator frontend to stop and track.