OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
ProximFUPortDetailsCmd Class Reference

#include <ProximFUPortDetailsCmd.hh>

Inheritance diagram for ProximFUPortDetailsCmd:
Inheritance graph
Collaboration diagram for ProximFUPortDetailsCmd:
Collaboration graph

Public Member Functions

 ProximFUPortDetailsCmd (const TTAMachine::FUPort &port)
 
virtual ~ProximFUPortDetailsCmd ()
 
virtual bool Do ()
 
- Public Member Functions inherited from ComponentCommand
 ComponentCommand ()
 
virtual ~ComponentCommand ()
 
wxWindow * parentWindow ()
 
void setParentWindow (wxWindow *window)
 

Private Attributes

const TTAMachine::FUPortport_
 Function unit port to display. More...
 

Detailed Description

Command for displaying function unit port details in the machine state window component details pane.

Definition at line 46 of file ProximFUPortDetailsCmd.hh.

Constructor & Destructor Documentation

◆ ProximFUPortDetailsCmd()

ProximFUPortDetailsCmd::ProximFUPortDetailsCmd ( const TTAMachine::FUPort port)

The Constructor.

Parameters
fuFunction unit port to display.

Definition at line 55 of file ProximFUPortDetailsCmd.cc.

56  :
57  ComponentCommand(), port_(port) {
58 }

◆ ~ProximFUPortDetailsCmd()

ProximFUPortDetailsCmd::~ProximFUPortDetailsCmd ( )
virtual

The Destructor.

Definition at line 64 of file ProximFUPortDetailsCmd.cc.

64  {
65 }

Member Function Documentation

◆ Do()

bool ProximFUPortDetailsCmd::Do ( )
virtual

Executes the command.

Implements ComponentCommand.

Definition at line 72 of file ProximFUPortDetailsCmd.cc.

72  {
73 
74  string fuName = port_.parentUnit()->name();
75  string portName = port_.name();
76 
78 
80 
81  // Append component type and name to the details widget.
83  machineWin->appendDetails("\n" + fuName + "." + portName + "\n\n");
84 
85  const PortState& portState = machineState.portState(portName, fuName);
86  machineWin->appendDetails(
87  Conversion::toHexString(portState.value().unsignedValue()) + "\n");
88 
89  return true;
90 }

References ProximMachineStateWindow::appendDetails(), ProximToolbox::frontend(), ProximConstants::MACH_WIN_FU_PORT_LABEL, SimulatorFrontend::machineState(), ProximToolbox::machineStateWindow(), TTAMachine::Port::name(), TTAMachine::Component::name(), TTAMachine::BaseFUPort::parentUnit(), port_, MachineState::portState(), Conversion::toHexString(), SimValue::unsignedValue(), and RegisterState::value().

Here is the call graph for this function:

Member Data Documentation

◆ port_

const TTAMachine::FUPort& ProximFUPortDetailsCmd::port_
private

Function unit port to display.

Definition at line 53 of file ProximFUPortDetailsCmd.hh.

Referenced by Do().


The documentation for this class was generated from the following files:
ProximToolbox::frontend
static TracedSimulatorFrontend * frontend()
Definition: ProximToolbox.cc:223
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
TTAMachine::BaseFUPort::parentUnit
FunctionUnit * parentUnit() const
Definition: BaseFUPort.cc:96
MachineState::portState
PortState & portState(const std::string &portName, const std::string &fuName)
Definition: MachineState.cc:175
ProximMachineStateWindow::appendDetails
void appendDetails(std::string text)
Definition: ProximMachineStateWindow.cc:479
ProximMachineStateWindow
Definition: ProximMachineStateWindow.hh:56
ComponentCommand::ComponentCommand
ComponentCommand()
Definition: ComponentCommand.cc:38
ProximFUPortDetailsCmd::port_
const TTAMachine::FUPort & port_
Function unit port to display.
Definition: ProximFUPortDetailsCmd.hh:53
RegisterState::value
virtual const SimValue & value() const
Definition: RegisterState.cc:92
MachineState
Definition: MachineState.hh:61
ProximConstants::MACH_WIN_FU_PORT_LABEL
static const std::string MACH_WIN_FU_PORT_LABEL
Label precing function unit port names in the machine state window.
Definition: ProximConstants.hh:208
PortState
Definition: PortState.hh:51
Conversion::toHexString
static std::string toHexString(T source, std::size_t digits=0, bool include0x=true)
SimValue::unsignedValue
unsigned int unsignedValue() const
Definition: SimValue.cc:919
ProximToolbox::machineStateWindow
static ProximMachineStateWindow * machineStateWindow()
Definition: ProximToolbox.cc:123
SimulatorFrontend::machineState
MachineState & machineState(int core=-1)
Definition: SimulatorFrontend.cc:2138
TTAMachine::Port::name
virtual std::string name() const
Definition: Port.cc:141