OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ProximSocketDetailsCmd Class Reference

#include <ProximSocketDetailsCmd.hh>

Inheritance diagram for ProximSocketDetailsCmd:
Inheritance graph
Collaboration diagram for ProximSocketDetailsCmd:
Collaboration graph

Public Member Functions

 ProximSocketDetailsCmd (const TTAMachine::Socket &socket)
 
virtual ~ProximSocketDetailsCmd ()
 
virtual bool Do ()
 
- Public Member Functions inherited from ComponentCommand
 ComponentCommand ()
 
virtual ~ComponentCommand ()
 
wxWindow * parentWindow ()
 
void setParentWindow (wxWindow *window)
 

Private Attributes

const TTAMachine::Socketsocket_
 Socket to display.
 

Detailed Description

Command for displaying socket details in the machine window component details pane.

Definition at line 46 of file ProximSocketDetailsCmd.hh.

Constructor & Destructor Documentation

◆ ProximSocketDetailsCmd()

ProximSocketDetailsCmd::ProximSocketDetailsCmd ( const TTAMachine::Socket socket)

The Constructor.

Parameters
busSocket to display.

Definition at line 51 of file ProximSocketDetailsCmd.cc.

52 :
53 ComponentCommand(), socket_(socket) {
54}
const TTAMachine::Socket & socket_
Socket to display.

◆ ~ProximSocketDetailsCmd()

ProximSocketDetailsCmd::~ProximSocketDetailsCmd ( )
virtual

The Destructor.

Definition at line 60 of file ProximSocketDetailsCmd.cc.

60 {
61}

Member Function Documentation

◆ Do()

bool ProximSocketDetailsCmd::Do ( )
virtual

Executes the command.

Implements ComponentCommand.

Definition at line 67 of file ProximSocketDetailsCmd.cc.

67 {
68
69 string socketName = socket_.name();
70
72 const UtilizationStats& stats =
74
75 // Append component type and name to the details widget.
77 machineWin->appendDetails(socketName + "\n\n");
78
79 // Append utlization statistics.
80 ClockCycleCount writes = stats.socketWrites(socketName);
81 machineWin->appendUtilizationData(
84
86 double percent = 0;
87 if (cycles > 0) {
88 percent = (100.0 * writes) / cycles;
89 }
90 machineWin->appendUtilizationData(
91 " (" + Conversion::toString(percent) + "%)");
92
93 return true;
94}
CycleCount ClockCycleCount
Alias for ClockCycleCount.
static std::string toString(const T &source)
static const std::string MACH_WIN_SOCKET_WRITES_LABEL
Label for the machine state window socket write count.
static const std::string MACH_WIN_SOCKET_LABEL
Label precing socket names in the machine state window.
void appendDetails(std::string text)
void appendUtilizationData(std::string text)
static TracedSimulatorFrontend * frontend()
static ProximMachineStateWindow * machineStateWindow()
const UtilizationStats & utilizationStatistics(int core=-1)
ClockCycleCount cycleCount() const
virtual TCEString name() const
ClockCycleCount socketWrites(const std::string &socketName) const

References ProximMachineStateWindow::appendDetails(), ProximMachineStateWindow::appendUtilizationData(), SimulatorFrontend::cycleCount(), ProximToolbox::frontend(), ProximConstants::MACH_WIN_SOCKET_LABEL, ProximConstants::MACH_WIN_SOCKET_WRITES_LABEL, ProximToolbox::machineStateWindow(), TTAMachine::Component::name(), socket_, UtilizationStats::socketWrites(), Conversion::toString(), and SimulatorFrontend::utilizationStatistics().

Here is the call graph for this function:

Member Data Documentation

◆ socket_

const TTAMachine::Socket& ProximSocketDetailsCmd::socket_
private

Socket to display.

Definition at line 53 of file ProximSocketDetailsCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files: