WIDAR Classes

ca.nrc.widar.mccc.crmGui
Class CrmGui

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 ca.nrc.widar.mccc.crmGui.CrmGui
All Implemented Interfaces:
DataReadyListener, java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class CrmGui
extends javax.swing.JFrame
implements java.awt.event.ActionListener, DataReadyListener, java.awt.event.WindowListener

WIDAR/EVLA - CRM GUI: CrmGui Class

The CRM Gui is, as its name suggests, a graphical user interface to the Correlator Resource Monitor (CRM). The CRM allows a user to submit diagnostic requests to the CRM directly, and view the results of those diagnostics. The CRM also allows the user to modify some of the various variables and attributes of the CRM remotely from the GUI.

Copyright: National Research Council of Canada and Associated Universities Inc., 2010, 2011, 2012

Since:
1.0
Author:
Dave Del Rizzo (Dave.DelRizzo@nrc.gc.ca)
See Also:
Serialized Form
 

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.util.Vector<ca.nrc.widar.jaxb.crm.FrontPanel> blbFpList
           
static CrmGuiTab blbHstTab
           
 java.util.ArrayList<ca.nrc.widar.jaxb.crm.CrmFile> blbXmlConfigList
           
static java.lang.String CLASSNAME
           
static java.net.InetAddress clientHost
           
static ca.nrc.widar.mccc.crmGui.CrmGuiConsole console
           
static boolean consoleXmlMonitor
           
static int corrMode
           
static java.util.Vector<java.lang.String> cqExcludeId
           
static javax.xml.bind.JAXBContext crmJaxbContext
           
static javax.xml.bind.Marshaller crmM
           
static Crm.CrmMode crmMode
           
static ca.nrc.widar.jaxb.crm.ObjectFactory crmOF
           
static java.lang.String crmReleaseString
           
static javax.xml.bind.Unmarshaller crmU
           
static boolean csdMode
           
static CrmGuiTab csdTab
           
static CrmGuiDbTab dbTab
           
static CrmGuiDbTestTab dbTestTab
           
static java.lang.String DEFAULT_BLF_PROCESSING_PATH
           
static int DEFAULT_HEIGHT
           
static int DEFAULT_WIDTH
           
static java.lang.String DEFAULT_XML_SOURCE_PATH
           
static int DIAG_ID_LENGTH
           
static java.net.InetAddress host
           
static boolean hstMode
           
static ca.nrc.widar.mccc.crmGui.CrmGui.MemUsageDisplay memConsole
           
static int mpHeight
           
static int mpWidth
           
static java.lang.String NEW_DB_HOST
           
static long PING_INTERVAL
           
static java.lang.String RELEASE_FILENAME
           
static java.lang.String releaseString
           
static java.lang.String RESTART_DB
           
static int SERVER_DEFAULT_TIMEOUT
           
static long SERVER_LED_INT
           
static java.util.Vector<ca.nrc.widar.jaxb.crm.FrontPanel> stbFpList
           
static CrmGuiTab stbHstTab
           
static CrmGuiTab systemTab
           
static int tabHeight
           
static javax.swing.JTabbedPane tabPane
           
static boolean testMode
           
static CrmGuiTab testTab
           
static ca.nrc.widar.mccc.crmGui.CrmGuiConsole xmlConsole
           
static boolean xmlMonitorEnable
           
 
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
CrmGui()
          A Convenience constructor which, when called, initiates the CrmGui with the default IP address for mccctest.evla.nrao.edu as the CRM server.
CrmGui(java.lang.String crmHostString)
          The constructor for the CrmGui.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Receives an ActionEvent, determines the source and performs instructions accordingly.
 void addActionListener(java.awt.event.ActionListener listener)
          Adds a listener to the action listener list within this class.
 void crmDebugModeUpdate()
          Sends a post query to the CRM to indicate the XML Monitor and Debug Modes.
 void dataIsReady(DataReadyEvent event)
          Handles all DataReadyEvents received from the CRM
protected  void fireActionEvent(java.awt.event.ActionEvent event)
          Generates an action event for each class listed in the listener list, and calls the actionPerformed method in that class.
protected  void fireActionEvent(java.lang.String text)
          Generates an action event for each class listed in the listener list, and calls the actionPerformed method in that class.
static int getCommPort()
           
static int getCorrMode()
          Return the correlator mode
 int getCorrUpdateMode()
          Returns the integer representation of the currently selected update mode for the correlator model.
 java.util.Vector<ca.nrc.widar.jaxb.crm.CqStatusExclude> getCqExcludeId()
           
static java.lang.String getCrmModeString()
           
 java.lang.String getReleaseInfo()
          Obtains and returns the release info string for this instantiation of the CRM.
static boolean isAnalyzeAfter()
          Returns the value of the analyze data flag
static boolean isAnalyzeCollectOnly()
          Returns the value of the analyze data flag
static boolean isAnalyzeData()
          Returns the value of the analyze data flag
static boolean isAnalyzeDuring()
          Returns the value of the analyze data flag
static boolean isCleanupAll()
          Returns the value of the 'cleanup all' menu item
static boolean isCleanupGood()
          Returns the value of the 'cleanup good' menu item
static boolean isCleanupNone()
          Returns the value of the 'cleanup none' menu item
static boolean isConsoleOpen()
          Returns the state of the log console window
static boolean isCsdReturnMode()
           
static boolean isDbMode()
           
static boolean isDebugMode()
          Returns the value of the debug mode flag
static boolean isDiagMode()
           
static boolean isFDiff()
          Returns the value of the FDiff flag
static boolean isMemConsoleOpen()
          Returns the state of the log console window
static boolean isSafeMode()
          Returns the value of the safe mode flag
static boolean isTestMode()
           
static void main(java.lang.String[] args)
          Main
 void removeActionListener(java.awt.event.ActionListener listener)
          Removes a listener from the action listener list within this class.
static void removeDiagnostic(java.lang.String id)
          On receipt of a remove command from the CRM, this method calls all removeDIagnostic methods in the sub-tabs with the supplied id value in order to remove the diagnostic from the GUI
static void sendAnalyze(java.lang.String id, DataReadyListener drl)
           
static void sendAnalyze(java.util.Vector<java.lang.String> idList, DataReadyListener drl)
           
 void sendCrmState(ca.nrc.widar.jaxb.crm.State stateXml)
           
static void sendDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml, DataReadyListener drl)
          A convenience method designed to deal with only one Diagnostic XML object being sent to the CRM.
static void sendDiagnostic(java.util.Vector<ca.nrc.widar.jaxb.crm.Diagnostic> diagXmlList, DataReadyListener drl)
          Takes the supplied list of DIagnostic XML objects, describing diagnostics to be sent to the CRM, adds them to a CrmXml XML object and posts them via HTTP to the CRM.
static void sendHalt(java.lang.String id, DataReadyListener drl)
          A convenience method which desls with a single 'halt' command to be sent to the CRM
static void sendHalt(java.util.Vector<java.lang.String> idList, DataReadyListener drl)
          Packages and sends the halt command to the CRM for the supplied list of diagnostic IDs
static void sendRemove(java.lang.String id, DataReadyListener drl)
          A convenience method which desls with a single 'remove' command to be sent to the CRM
static void sendRemove(java.util.Vector<java.lang.String> idList, DataReadyListener drl)
          Packages and sends the remove command to the CRM for the supplied list of diagnostic IDs
static void showDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          A method which displays the supplied Diagnostic object in its own message dialog
static void showDiagnostic(java.util.Vector<ca.nrc.widar.jaxb.crm.Diagnostic> diagXmlList)
          A convenience method for the showDiagnostic method which allows it to be called with a list of diagnostics, rather than only one
static void showDiagnosticXml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          This method takes the supplied Diagnostic XML object, converts it to a string and displays the XML text in an HTML Display Frame
static void updateActionDisplay(java.lang.String message)
          Updates the action display panel with the supplied text message
 void updateBlbComponentList()
           
 void updateBlbXmlConfigList()
           
 void updateCcErrorThreshold(double value)
          Updates all components associated with the Lag Comparison Threshold with the supplied value
 void updateComponentList()
           
 void updateConcurrentDiagSettingMenuItem(javax.swing.JMenuItem mi, int value)
          Replaces the string within the indicated menu item for concurrent diagnostic setting with the supplied value
 void updateConsoleMode(boolean state)
          Updates all components associated with Console display mode
 void updateConsoleXmlMode(boolean state)
           
 void updateCrmModel()
          Sends a request to the CrmCorrelatorModel Class in order to obtain an updated correlator model reflecting the current state of the correlator system.
 void updateDebugMode(boolean state)
          Updates all components associated with Debug Mode
static void updateDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          On receipt of a Diagnostic XML object, usually indicating the completion of a diagnostic, this method updates the appropriate tab with the supplied information
static void updateDiagnosticStatus(ca.nrc.widar.jaxb.crm.DiagStatus stateXml)
          On receipt of a DiagStatus XML object, this method updates the appropriate tab with the supplied information
static void updateExcludeList(java.lang.String id)
          Removes the supplied diagnostic ID to the list of diagnostics that should be excluded from status query
 void updateMemConsoleMode(boolean state)
          Updates all components associated with Memory/Usage Console display mode
 void updateRxpSyncTimeout(int value)
          Updates all components associated with the Rxp Sync Timeout with the supplied value
 void updateStbComponentList()
           
 void updateSyncCheck(int value)
          Updates all components associated with the Sync Check/Blanking interval with the supplied value
 void updateTabs()
          Forces a call to all sub-tabs to provoke an update of components within the tabs based on stored variables
static java.net.InetAddress verifyHost(java.lang.String hostName)
          A method which tests the validity of the supplied hostname
 void windowActivated(java.awt.event.WindowEvent we)
           
 void windowClosed(java.awt.event.WindowEvent we)
           
 void windowClosing(java.awt.event.WindowEvent we)
           
 void windowDeactivated(java.awt.event.WindowEvent we)
           
 void windowDeiconified(java.awt.event.WindowEvent we)
           
 void windowIconified(java.awt.event.WindowEvent we)
           
 void windowOpened(java.awt.event.WindowEvent we)
           
 
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
addNotify, 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, dispose, 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, pack, 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, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, 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

DIAG_ID_LENGTH

public static final int DIAG_ID_LENGTH
See Also:
Constant Field Values

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
See Also:
Constant Field Values

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
See Also:
Constant Field Values

SERVER_DEFAULT_TIMEOUT

public static final int SERVER_DEFAULT_TIMEOUT
See Also:
Constant Field Values

SERVER_LED_INT

public static final long SERVER_LED_INT

PING_INTERVAL

public static final long PING_INTERVAL

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

RESTART_DB

public static final java.lang.String RESTART_DB
See Also:
Constant Field Values

NEW_DB_HOST

public static final java.lang.String NEW_DB_HOST
See Also:
Constant Field Values

RELEASE_FILENAME

public static final java.lang.String RELEASE_FILENAME
See Also:
Constant Field Values

DEFAULT_XML_SOURCE_PATH

public static final java.lang.String DEFAULT_XML_SOURCE_PATH
See Also:
Constant Field Values

DEFAULT_BLF_PROCESSING_PATH

public static final java.lang.String DEFAULT_BLF_PROCESSING_PATH
See Also:
Constant Field Values

corrMode

public static int corrMode

mpWidth

public static int mpWidth

mpHeight

public static int mpHeight

tabHeight

public static int tabHeight

crmMode

public static Crm.CrmMode crmMode

csdMode

public static boolean csdMode

hstMode

public static boolean hstMode

testMode

public static boolean testMode

xmlMonitorEnable

public static boolean xmlMonitorEnable

consoleXmlMonitor

public static boolean consoleXmlMonitor

xmlConsole

public static ca.nrc.widar.mccc.crmGui.CrmGuiConsole xmlConsole

console

public static ca.nrc.widar.mccc.crmGui.CrmGuiConsole console

memConsole

public static ca.nrc.widar.mccc.crmGui.CrmGui.MemUsageDisplay memConsole

tabPane

public static javax.swing.JTabbedPane tabPane

crmReleaseString

public static java.lang.String crmReleaseString

releaseString

public static java.lang.String releaseString

host

public static java.net.InetAddress host

clientHost

public static java.net.InetAddress clientHost

testTab

public static CrmGuiTab testTab

csdTab

public static CrmGuiTab csdTab

blbHstTab

public static CrmGuiTab blbHstTab

stbHstTab

public static CrmGuiTab stbHstTab

systemTab

public static CrmGuiTab systemTab

dbTab

public static CrmGuiDbTab dbTab

dbTestTab

public static CrmGuiDbTestTab dbTestTab

crmJaxbContext

public static javax.xml.bind.JAXBContext crmJaxbContext

crmOF

public static ca.nrc.widar.jaxb.crm.ObjectFactory crmOF

crmU

public static javax.xml.bind.Unmarshaller crmU

crmM

public static javax.xml.bind.Marshaller crmM

cqExcludeId

public static java.util.Vector<java.lang.String> cqExcludeId

blbXmlConfigList

public java.util.ArrayList<ca.nrc.widar.jaxb.crm.CrmFile> blbXmlConfigList

stbFpList

public static java.util.Vector<ca.nrc.widar.jaxb.crm.FrontPanel> stbFpList

blbFpList

public static java.util.Vector<ca.nrc.widar.jaxb.crm.FrontPanel> blbFpList
Constructor Detail

CrmGui

public CrmGui()
       throws java.io.IOException
A Convenience constructor which, when called, initiates the CrmGui with the default IP address for mccctest.evla.nrao.edu as the CRM server.

Throws:
java.io.IOException

CrmGui

public CrmGui(java.lang.String crmHostString)
       throws java.io.IOException
The constructor for the CrmGui.

Throws:
java.io.IOException
Parameters:
crmHostString - A String containing the IP Address of the CRM Server to which this instance of the CrmGui should connect
Method Detail

updateConcurrentDiagSettingMenuItem

public void updateConcurrentDiagSettingMenuItem(javax.swing.JMenuItem mi,
                                                int value)
Replaces the string within the indicated menu item for concurrent diagnostic setting with the supplied value

Parameters:
mi - THe JMenuItem to be updated
value - The numerical value to be inserted.

updateCcErrorThreshold

public void updateCcErrorThreshold(double value)
Updates all components associated with the Lag Comparison Threshold with the supplied value

Parameters:
value - The new double value for Lag comparison Threshold

updateRxpSyncTimeout

public void updateRxpSyncTimeout(int value)
Updates all components associated with the Rxp Sync Timeout with the supplied value

Parameters:
value - The int value for RXP Synchronization timeout (seconds)

updateSyncCheck

public void updateSyncCheck(int value)
Updates all components associated with the Sync Check/Blanking interval with the supplied value

Parameters:
value - The int value for Synchronization Check / Blanking Interval (seconds)

updateDebugMode

public void updateDebugMode(boolean state)
Updates all components associated with Debug Mode

Parameters:
state - THe debug Mode (true=on false=off)

updateBlbXmlConfigList

public void updateBlbXmlConfigList()

updateComponentList

public void updateComponentList()

updateStbComponentList

public void updateStbComponentList()

updateBlbComponentList

public void updateBlbComponentList()

getCorrMode

public static int getCorrMode()
Return the correlator mode

Returns:
The int correlator mode

isTestMode

public static boolean isTestMode()
Returns:
The testMode boolean variable value

getCorrUpdateMode

public int getCorrUpdateMode()
Returns the integer representation of the currently selected update mode for the correlator model. This is selected via a radio button group in the 'Correlator' menu

Returns:
The integer correlator model update mode

updateCrmModel

public void updateCrmModel()
Sends a request to the CrmCorrelatorModel Class in order to obtain an updated correlator model reflecting the current state of the correlator system. The objective of this method is to receive an instance of a JAXB MCCC element, which can either be obtained by probing the correlator, read from a file or from a URL


updateExcludeList

public static void updateExcludeList(java.lang.String id)
Removes the supplied diagnostic ID to the list of diagnostics that should be excluded from status query

Parameters:
id - A string diagnostic ID

getCqExcludeId

public java.util.Vector<ca.nrc.widar.jaxb.crm.CqStatusExclude> getCqExcludeId()

verifyHost

public static java.net.InetAddress verifyHost(java.lang.String hostName)
A method which tests the validity of the supplied hostname

Parameters:
hostName - The String name of the host IP address to verify
Returns:
An InetAddress object created from the provided hostname if successful, otherwise null

getReleaseInfo

public java.lang.String getReleaseInfo()
Obtains and returns the release info string for this instantiation of the CRM. Release information is obtained from the release.txt file that is stored within the crm.jar. The string returned is simply a date format indicating the compile date and time for this instantiation of the CRM package.

Returns:
A String indicating the date and time of compile

updateActionDisplay

public static void updateActionDisplay(java.lang.String message)
Updates the action display panel with the supplied text message

Parameters:
message - A string message to be displayed

updateConsoleMode

public void updateConsoleMode(boolean state)
Updates all components associated with Console display mode

Parameters:
state - The new console display mode (true=on false=off)

updateConsoleXmlMode

public void updateConsoleXmlMode(boolean state)

updateMemConsoleMode

public void updateMemConsoleMode(boolean state)
Updates all components associated with Memory/Usage Console display mode

Parameters:
state - The new console display mode (true=on false=off)

updateTabs

public void updateTabs()
Forces a call to all sub-tabs to provoke an update of components within the tabs based on stored variables


crmDebugModeUpdate

public void crmDebugModeUpdate()
Sends a post query to the CRM to indicate the XML Monitor and Debug Modes. This method is called on change of either.


sendCrmState

public void sendCrmState(ca.nrc.widar.jaxb.crm.State stateXml)

updateDiagnosticStatus

public static void updateDiagnosticStatus(ca.nrc.widar.jaxb.crm.DiagStatus stateXml)
On receipt of a DiagStatus XML object, this method updates the appropriate tab with the supplied information

Parameters:
stateXml - A DiagStatus object with diagnostic status information

updateDiagnostic

public static void updateDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
On receipt of a Diagnostic XML object, usually indicating the completion of a diagnostic, this method updates the appropriate tab with the supplied information

Parameters:
diagXml - A Diagnostic XML object

removeDiagnostic

public static void removeDiagnostic(java.lang.String id)
On receipt of a remove command from the CRM, this method calls all removeDIagnostic methods in the sub-tabs with the supplied id value in order to remove the diagnostic from the GUI


showDiagnostic

public static void showDiagnostic(java.util.Vector<ca.nrc.widar.jaxb.crm.Diagnostic> diagXmlList)
A convenience method for the showDiagnostic method which allows it to be called with a list of diagnostics, rather than only one

Parameters:
diagXmlList - A Vector object containing Diagnostic XML objects to be displayed

showDiagnostic

public static void showDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
A method which displays the supplied Diagnostic object in its own message dialog

Parameters:
diagXml - A Diagnostic object to be displayed

showDiagnosticXml

public static void showDiagnosticXml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
This method takes the supplied Diagnostic XML object, converts it to a string and displays the XML text in an HTML Display Frame

Parameters:
diagXml - A Diagnostic XML Object

sendDiagnostic

public static void sendDiagnostic(ca.nrc.widar.jaxb.crm.Diagnostic diagXml,
                                  DataReadyListener drl)
A convenience method designed to deal with only one Diagnostic XML object being sent to the CRM. This method adds the supplied Diagnostic to a Vector and calls the sendDiagnostic method with the Vector

Parameters:
diagXml - A Diagnostic XML object
drl - The DataReadyListener which is to receive the reply from the CRM

sendDiagnostic

public static void sendDiagnostic(java.util.Vector<ca.nrc.widar.jaxb.crm.Diagnostic> diagXmlList,
                                  DataReadyListener drl)
Takes the supplied list of DIagnostic XML objects, describing diagnostics to be sent to the CRM, adds them to a CrmXml XML object and posts them via HTTP to the CRM.

Parameters:
diagXmlList - A Vector of Diagnostic XML objects to be sent to the CRM
drl - The DataReadyListener which is to receive the reply from the CRM

sendRemove

public static void sendRemove(java.lang.String id,
                              DataReadyListener drl)
A convenience method which desls with a single 'remove' command to be sent to the CRM

Parameters:
id - The unique String id of a diagnostic to be removed
drl - The DataReadyListener which is to receive the reply

sendRemove

public static void sendRemove(java.util.Vector<java.lang.String> idList,
                              DataReadyListener drl)
Packages and sends the remove command to the CRM for the supplied list of diagnostic IDs

Parameters:
idList - A Vector of unique Diagnostic IDs to be removed from the CRM
drl - The DataReadyListener which is to receive the reply

sendAnalyze

public static void sendAnalyze(java.lang.String id,
                               DataReadyListener drl)

sendAnalyze

public static void sendAnalyze(java.util.Vector<java.lang.String> idList,
                               DataReadyListener drl)

sendHalt

public static void sendHalt(java.lang.String id,
                            DataReadyListener drl)
A convenience method which desls with a single 'halt' command to be sent to the CRM

Parameters:
id - The unique String id of a diagnostic to be halted
drl - The DataReadyListener which is to receive the reply

sendHalt

public static void sendHalt(java.util.Vector<java.lang.String> idList,
                            DataReadyListener drl)
Packages and sends the halt command to the CRM for the supplied list of diagnostic IDs

Parameters:
idList - A Vector of unique Diagnostic IDs to be halted within the CRM
drl - The DataReadyListener which is to receive the reply

getCommPort

public static int getCommPort()

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
Adds a listener to the action listener list within this class.

Parameters:
listener - The class being added to the listener list.

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)
Removes a listener from the action listener list within this class.

Parameters:
listener - The class being removed from the listener list.

fireActionEvent

protected void fireActionEvent(java.awt.event.ActionEvent event)
Generates an action event for each class listed in the listener list, and calls the actionPerformed method in that class.

Parameters:
event - The event being fired.

fireActionEvent

protected void fireActionEvent(java.lang.String text)
Generates an action event for each class listed in the listener list, and calls the actionPerformed method in that class.

Parameters:
event - The event being fired.

dataIsReady

public void dataIsReady(DataReadyEvent event)
Handles all DataReadyEvents received from the CRM

Specified by:
dataIsReady in interface DataReadyListener
Parameters:
event - A DataReadyEvent object

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Receives an ActionEvent, determines the source and performs instructions accordingly. This is the action event handling method.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
event - The incoming action event.

windowActivated

public void windowActivated(java.awt.event.WindowEvent we)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent we)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent we)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent we)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent we)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent we)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent we)
Specified by:
windowOpened in interface java.awt.event.WindowListener

getCrmModeString

public static java.lang.String getCrmModeString()

isCsdReturnMode

public static boolean isCsdReturnMode()

isDiagMode

public static boolean isDiagMode()

isDbMode

public static boolean isDbMode()

isSafeMode

public static boolean isSafeMode()
Returns the value of the safe mode flag

Returns:
True if safe mode is selected, false otherwise

isDebugMode

public static boolean isDebugMode()
Returns the value of the debug mode flag

Returns:
True if debug mode is selected, false otherwise

isCleanupAll

public static boolean isCleanupAll()
Returns the value of the 'cleanup all' menu item

Returns:
true if cleanup all is selected, false otherwise

isCleanupGood

public static boolean isCleanupGood()
Returns the value of the 'cleanup good' menu item

Returns:
true if cleanup good is selected, false otherwise

isCleanupNone

public static boolean isCleanupNone()
Returns the value of the 'cleanup none' menu item

Returns:
true if cleanup none is selected, false otherwise

isAnalyzeDuring

public static boolean isAnalyzeDuring()
Returns the value of the analyze data flag

Returns:
Trus if analyze data is selected, false otherwise

isAnalyzeAfter

public static boolean isAnalyzeAfter()
Returns the value of the analyze data flag

Returns:
Trus if analyze data is selected, false otherwise

isAnalyzeCollectOnly

public static boolean isAnalyzeCollectOnly()
Returns the value of the analyze data flag

Returns:
Trus if analyze data is selected, false otherwise

isAnalyzeData

public static boolean isAnalyzeData()
Returns the value of the analyze data flag

Returns:
Trus if analyze data is selected, false otherwise

isFDiff

public static boolean isFDiff()
Returns the value of the FDiff flag

Returns:
True is fdiff is selected, false otherwise

isConsoleOpen

public static boolean isConsoleOpen()
Returns the state of the log console window

Returns:
True if the log console is open, false otherwise

isMemConsoleOpen

public static boolean isMemConsoleOpen()
Returns the state of the log console window

Returns:
True if the log console is open, false otherwise

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Main

Throws:
java.io.IOException

NRAO/DRAO

National Radio Astronomy Observatory