OpenASIP 2.2
Loading...
Searching...
No Matches
ProximMachineStateWindow.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 ProximMachineStateWindow.cc
26 *
27 * Declaration of ProximMachineStateWindow class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33
34#ifndef TTA_PROXIM_MACHINE_STATE_WINDOW_HH
35#define TTA_PROXIM_MACHINE_STATE_WINDOW_HH
36
38#include "SimulatorEvent.hh"
39
40namespace TTAMachine {
41 class Machine;
42 class MachinePart;
43}
44
45class MachineCanvas;
47class wxUpdateUIEvent;
48class UtilizationWindow;
49
50/**
51 * Proxim subwindow which displays the simulated machine state.
52 *
53 * This window listens to SimulatorEvents and updates the window
54 * contents automatically.
55 */
57public:
60 virtual void reset();
62 void setStatusText(std::string status);
63 void appendUtilizationData(std::string text);
64 void appendDetails(std::string text);
65 void clearDetails();
66
67 // Command IDs.
68 enum {
75 };
76
77private:
78 void onMachineLoaded(const SimulatorEvent& event);
79 void onProgramLoaded(const SimulatorEvent& event);
80 void onSimulationStop(const SimulatorEvent& event);
81 void createContents();
82 void onZoom(wxCommandEvent& event);
84 void addMoves();
85 void onToggleMoves(wxCommandEvent& event);
86 void onToggleUtilizations(wxCommandEvent& event);
87 void onToggleUnitInfo(wxCommandEvent& event);
88 void onUpdateUIEvent(wxUpdateUIEvent& event);
89 void onExport(wxCommandEvent& event);
90
91 /// Machine visualization canvas.
93 /// Simulator instance which contains the registers to display.
95 /// Toplevel sizer for the window widgets.
96 wxBoxSizer* sizer_;
97 /// Statusbar of the window.
98 wxStatusBar* statusbar_;
99
100 // Widget IDs.
101 enum {
110 };
111
112 /// Tells if the moves are displayed or not.
114 /// Tells if the machine part utilizations are displayed or not.
116 /// Utilziation window where to display utilization data of the components.
117 //UtilizationWindow* utilizationWindow_;
118
119 wxTextCtrl* detailsCtrl_;
120 wxTextCtrl* utilizationCtrl_;
121
122 /// Minimum width for the splitter window panes.
123 static const int MINIMUM_PANE_WIDTH;
124 /// Initial width for the component detail pane.
126
127 DECLARE_EVENT_TABLE()
128};
129
130#endif
TTAMachine::Machine * machine
the architecture definition of the estimated processor
wxBoxSizer * sizer_
Toplevel sizer for the window widgets.
wxTextCtrl * detailsCtrl_
Utilziation window where to display utilization data of the components.
void appendDetails(std::string text)
void onUpdateUIEvent(wxUpdateUIEvent &event)
void onToggleUnitInfo(wxCommandEvent &event)
void onProgramLoaded(const SimulatorEvent &event)
bool showMoves_
Tells if the moves are displayed or not.
bool showUtilizations_
Tells if the machine part utilizations are displayed or not.
static const int MINIMUM_PANE_WIDTH
Minimum width for the splitter window panes.
void setStatusText(std::string status)
static const int INITIAL_DETAILS_PANE_WIDTH
Initial width for the component detail pane.
void onSimulationStop(const SimulatorEvent &event)
wxStatusBar * statusbar_
Statusbar of the window.
void onZoom(wxCommandEvent &event)
void onMachineLoaded(const SimulatorEvent &event)
MachineCanvas * canvas_
Machine visualization canvas.
void onToggleMoves(wxCommandEvent &event)
void onExport(wxCommandEvent &event)
SimulatorFrontend * simulator_
Simulator instance which contains the registers to display.
void setMachine(TTAMachine::Machine *machine)
void appendUtilizationData(std::string text)
void onToggleUtilizations(wxCommandEvent &event)