jmri.jmrix.cmri.serial.diagnostic
Class DiagnosticFrame

Show UML class diagram
java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by jmri.util.JmriJFrame
                          extended by jmri.jmrix.cmri.serial.diagnostic.DiagnosticFrame
All Implemented Interfaces:
ComponentListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, BeanInterface, AbstractMRListener, SerialListener, ModifiedFlag, WindowInterface

public class DiagnosticFrame
extends JmriJFrame
implements SerialListener

Frame for running CMRI diagnostics

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
 
Field Summary
protected  int begInByte
           
protected  int begOutByte
           
(package private)  JButton continueButton
           
protected  int count
           
(package private)  DiagnosticFrame curFrame
           
protected  int curOutBit
           
protected  int curOutByte
           
protected  short curOutValue
           
(package private)  int debugCount
           
protected  int endInByte
           
protected  int endOutByte
           
protected  int filterDelay
           
(package private)  JTextField filterDelayField
           
protected  byte[] inBytes
           
(package private)  JTextField inCardField
           
protected  int inCardNum
           
protected  boolean isSMINI
           
protected  boolean isUSIC_SUSIC
           
protected  boolean needInputTest
           
protected  int nInBytes
           
protected  SerialNode node
           
protected  int nOutBytes
           
protected  int numCards
           
protected  int numErrors
           
protected  int numInputCards
           
protected  int numIterations
           
protected  int numOutputCards
           
protected  int obsDelay
           
(package private)  JTextField obsDelayField
           
protected  byte[] outBytes
           
(package private)  JTextField outCardField
           
protected  int outCardNum
           
(package private)  JRadioButton outputButton
           
protected  boolean outTest
           
protected  Timer outTimer
           
(package private)  JButton runButton
           
(package private)  JLabel statusText1
           
(package private)  JLabel statusText2
           
(package private)  JButton stopButton
           
(package private)  ButtonGroup testGroup
           
protected  boolean testRunning
           
protected  boolean testSuspended
           
protected  int ua
           
(package private)  JTextField uaAddrField
           
protected  boolean waitingOnInput
           
(package private)  JRadioButton wrapButton
           
protected  byte[] wrapBytes
           
protected  boolean wrapTest
           
protected  Timer wrapTimer
           
 
Fields inherited from class jmri.util.JmriJFrame
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterface
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DiagnosticFrame()
           
 
Method Summary
 void continueButtonActionPerformed(ActionEvent e)
          Method to handle continue button in Diagnostic Frame
(package private)  SerialMessage createOutPacket()
          Local Method to create an Transmit packet (SerialMessage)
 void initComponents()
          By default, Swing components should be created an installed in this method, rather than in the ctor itself.
protected  boolean initializeOutputTest()
          Local Method to initialize an Output Test Returns 'true' if successfully initialized Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame
protected  boolean initializeWraparoundTest()
          Local Method to initialize a Wraparound Test Returns 'true' if successfully initialized Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame
 void message(SerialMessage m)
          Message notification method to implement SerialListener interface
protected  boolean readSetupData()
          Local method to read data in Diagnostic Frame, get node data, and test for consistency Returns 'true' if no errors are found Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame
 void reply(SerialReply l)
          Reply notification method to implement SerialListener interface
 void runButtonActionPerformed(ActionEvent e)
          Method to handle run button in Diagnostic Frame
protected  void runOutputTest()
          Local Method to run an Output Test
protected  void runWraparoundTest()
          Local Method to run a Wraparound Test
 void stopButtonActionPerformed(ActionEvent e)
          Method to handle Stop button in Diagnostic Frame
protected  void stopOutputTest()
          Local Method to stop an Output Test
protected  void stopWraparoundTest()
          Local Method to stop a Wraparound Test
 void windowClosing(WindowEvent e)
          Stop operation when window closing
 
Methods inherited from class jmri.util.JmriJFrame
addHelpMenu, addNotify, componentHidden, componentMoved, componentResized, componentShown, dispose, generateWindowRef, getAllowInFrameServlet, getEscapeKeyAction, getEscapeKeyClosesWindow, getFrame, getFrame, getFrameList, getFrameList, getIndexedProperty, getMaximumSize, getModifiedFlag, getPreferredSize, getProperty, getPropertyNames, getSavePosition, getSaveSize, getWindowFrameRef, getWindowInterface, handleModified, hasProperty, makePrivateWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, storeValues, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

outTest

protected boolean outTest

wrapTest

protected boolean wrapTest

isSMINI

protected boolean isSMINI

isUSIC_SUSIC

protected boolean isUSIC_SUSIC

numOutputCards

protected int numOutputCards

numInputCards

protected int numInputCards

numCards

protected int numCards

ua

protected int ua

node

protected SerialNode node

outCardNum

protected int outCardNum

obsDelay

protected int obsDelay

inCardNum

protected int inCardNum

filterDelay

protected int filterDelay

testRunning

protected boolean testRunning

testSuspended

protected boolean testSuspended

outBytes

protected byte[] outBytes

curOutByte

protected int curOutByte

curOutBit

protected int curOutBit

curOutValue

protected short curOutValue

nOutBytes

protected int nOutBytes

begOutByte

protected int begOutByte

endOutByte

protected int endOutByte

inBytes

protected byte[] inBytes

wrapBytes

protected byte[] wrapBytes

nInBytes

protected int nInBytes

begInByte

protected int begInByte

endInByte

protected int endInByte

numErrors

protected int numErrors

numIterations

protected int numIterations

outTimer

protected Timer outTimer

wrapTimer

protected Timer wrapTimer

waitingOnInput

protected boolean waitingOnInput

needInputTest

protected boolean needInputTest

count

protected int count

debugCount

int debugCount

testGroup

ButtonGroup testGroup

outputButton

JRadioButton outputButton

wrapButton

JRadioButton wrapButton

uaAddrField

JTextField uaAddrField

outCardField

JTextField outCardField

inCardField

JTextField inCardField

obsDelayField

JTextField obsDelayField

filterDelayField

JTextField filterDelayField

runButton

JButton runButton

stopButton

JButton stopButton

continueButton

JButton continueButton

statusText1

JLabel statusText1

statusText2

JLabel statusText2

curFrame

DiagnosticFrame curFrame
Constructor Detail

DiagnosticFrame

public DiagnosticFrame()
Method Detail

initComponents

public void initComponents()
                    throws Exception
Description copied from class: JmriJFrame
By default, Swing components should be created an installed in this method, rather than in the ctor itself.

Overrides:
initComponents in class JmriJFrame
Throws:
Exception

runButtonActionPerformed

public void runButtonActionPerformed(ActionEvent e)
Method to handle run button in Diagnostic Frame


readSetupData

protected boolean readSetupData()
Local method to read data in Diagnostic Frame, get node data, and test for consistency Returns 'true' if no errors are found Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame


continueButtonActionPerformed

public void continueButtonActionPerformed(ActionEvent e)
Method to handle continue button in Diagnostic Frame


stopButtonActionPerformed

public void stopButtonActionPerformed(ActionEvent e)
Method to handle Stop button in Diagnostic Frame


initializeOutputTest

protected boolean initializeOutputTest()
Local Method to initialize an Output Test Returns 'true' if successfully initialized Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame


runOutputTest

protected void runOutputTest()
Local Method to run an Output Test


stopOutputTest

protected void stopOutputTest()
Local Method to stop an Output Test


initializeWraparoundTest

protected boolean initializeWraparoundTest()
Local Method to initialize a Wraparound Test Returns 'true' if successfully initialized Returns 'false' if errors are found If errors are found, the errors are noted in the status panel of the Diagnostic Frame


runWraparoundTest

protected void runWraparoundTest()
Local Method to run a Wraparound Test


stopWraparoundTest

protected void stopWraparoundTest()
Local Method to stop a Wraparound Test


createOutPacket

SerialMessage createOutPacket()
Local Method to create an Transmit packet (SerialMessage)


message

public void message(SerialMessage m)
Message notification method to implement SerialListener interface

Specified by:
message in interface SerialListener

reply

public void reply(SerialReply l)
Reply notification method to implement SerialListener interface

Specified by:
reply in interface SerialListener

windowClosing

public void windowClosing(WindowEvent e)
Stop operation when window closing

Specified by:
windowClosing in interface WindowListener
Overrides:
windowClosing in class JmriJFrame


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads