Reservation Table A
public Table tableB
Reservation Table B
public boolean twoTasks
Is true when the program
is analyzing two tasks
private Panel titlePanel
The starting title screen
private TableInputPanel tip
The Reservation Table Input panel. It allows the user to enter the reservation table information such as number of resources and time slots.
private Panel mainPanel
The center panel in the application. This panel uses CardLayout to switch between different panels. For example, when the user presses the Reservation Table Input button the TableInputPanel is displayed in the mainPanel position.
private CardLayout mainLayout
The layout manager for the mainPanel.
public Panel northPanel
A panel that is located at the top of the application. It displays the current task pattern and allows the user to enter a new task pattern when the application is in two task mode.
private Label patternLabel
Displays the words: "Enter task pattern."
private Label currPatternLabel
Displays the current task pattern.
private TextField patternTextField
A TextField object that allows the user to change the current task pattern.
private Button patternButton
When this button is pressed it processes the string in the patternTextField and updates the current task pattern.
private String pattern
The current task pattern.
private Panel southPanel
A panel located at the bottom of the application that holds a group of buttons.
private Button iButton
Pressing this button will bring up the Reservation Table Input panel where the user can create or modify a reservation table.
private Button sdButton
Pressing this button will calculate the state diagram for the current reservation table and displays it.
private Button qButton
Pressing this button will quit the application.
private Button hButton
Pressing this button will bring up the Help panel.
Pressing this button will calculate certain statistics about the current pipeline and display them. The statistics include PCV, MAL, Forbidden Latencies, Greedy Cycle, etc.
private Vector states
A vector of State objects. Keeps track of all the states for the current reservation table input.
private Vector greedyPath
A vector of Edge objects. These objects form the greedy cycle.
private TextPanel statsPanel
This is where the pipeline statistics are displayed.
private TextPanel helpPanel
A panel that displays instructions on how to use this application
private boolean ps
A variable that is used to
keep track of what is currently being displayed in the mainPanel.
If the Pipeline Statistics panel is being displayed then ps is true else ps is false.
Initialization. The application
is created and the components such as panels and buttons are laid out.
Setup the Help Panel.
public void setPatternEnabled(boolean value)
If value=true then the panel
located at the top of the application is enabled
else the panel is disabled.
public void createNorthPanel()
Layout out all the components that appear at the top of the application.
public void createTitlePanel()
Setup the title panel. The panel that appears in the center of the application with the words "Reservation Table Analyzer" shown at the center of the panel.
public void createMainPanel()
Setup the panel that is located at the center of the application. Add all the necessary components to the panel.
public void createSouthPanel()
Layout out all the componetns that is suppose to appear at the bottom of the application.
public void actionPerformed(ActionEvent e)
This method is used to handle some of the user events in the program. Whenever the user presses one of the buttons located at the bottom this method is called and performs the appropriate task.
public void updatePattern(String input)
When the application is in two task mode, the user can change the current task pattern by entering a new pattern in the TextField object located at the top of the application. The method processes the string entered by the user and makes sure that it is a valid pattern before updating current task pattern.
public boolean findStates()
Finds all possible states for a given reservation table input.
public void printStates()
Prints out each state information onto the Java Console.
public boolean findGreedyCycle()
Finds the greedy cycle for a given reservation table input.
public void printGreedyCycle()
Prints out the greedy cycle for a given reservation table input.
public void printPCV()
Prints out the PCV for reservation table A and table B onto a TextPanel object if the tables exists.
public boolean findGreedyCycle()
Prints out the forbiddeb latency for reservation table A and table B onto a TextPanel object if the tables exists.
public void printMALT
Prints out the MAL and throughput onto a TextPanel object for a given reservation table input.
public void printStats()
Prints out pipeline statistics
for a given reservation table input.