You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

  1. #Known Issues
  2. #Documents
  3. #Setup
    1. #Environment
    2. #Dependencies
    3. #Test inside Eclipse
  4. #Development
    1. #Overview
    2. #Glossary
    3. #Classes and Functions
      1. #User Interface
      2. #Controllers
      3. #Others
    4. #Supporting IOCs
  5. #Release with Eclipse

Known Issues

Documents

Setup

Environment

  • Effectively, you can only develop EVGui inside Eclipse
  • Check out the CVS module physics/evgui into your workspace
    • From now on, the root of project is referred to as $EVGUI_ROOT

Dependencies

  • hlaCommon (latest version)
  • hlaExtensions (latest version)

Test inside Eclipse

  • Select $EVGUI_ROOT/src/edu.stanford.slac.evgui/EvguiLauncher
  • Right-click => select Run As... => Java Application

Development

Overview

Glossary

  • Modifier: a chunk of Rate Bits (has position, length, and value)
    • the least significant bit is at position (furthest on the right)
  • Mods: 4 integers representing the 128 rate bits
    • Mod1: bits 31-0, Mod2: 63-32, Mod3: 95-64, Mod4: 127-96
  • Rate Bits: 128 bits (from 127 to 0)
  • HW Input Bit

Classes and Functions

User Interface

  • The main user interface consists of 5 tabs: "Define Modifiers", "Define Rate Groups", "Define Input Bits", "Define Beam Rates", and "Define Patterns"
  • Each tab has a corresponding XYZPanel class under edu.stanford.slac.evgui.ui
    • Each XYZPanel is a subclass of edu.stanford.slac.mpsgui.util.AbstractPanel
    • (Almost) every widget of the panel is stored in a field in the corresponding XYZPanel class
    • The fields are public to allow registration of the listeners (however, it doesn't make sense to set them)
edu.stanford.slac.mpsgui.ui.AbstractPanel
  • The root of all MpsGui XYZPanel classes
  • Defines how widgets are created/added to its subclass
edu.stanford.slac.mpsgui.ui.MacroDetailsPanel
  • Shows the details of a Macro
  • Part of IngoreLogicPanel and LogicPanel
edu.stanford.slac.mpsgui.ui.MpsGuiPanel
  • The main panel that is added to the JFrame
  • Contain a JTabbedPane as the immediate child
edu.stanford.slac.mpsgui.ui.MpsGuiTable
  • The root of all MpsGui XYZTable classes
  • Features a TableSorter (see SwingUtil) and alternating background colors for rows
edu.stanford.slac.mpsgui.ui.SliderCachePanel
  • Allows user to select a cached state
edu.stanford.slac.mpsgui.ui.edm.EDMPanel
  • Not used anymore
edu.stanford.slac.mpsgui.ui.fault.AbstractFaultPanel
  • The root of all XYZFaultPanel classes
  • Shows detailed information common to all types of faults
edu.stanford.slac.mpsgui.ui.fault.CurrentFaultsPanel
  • Not used anymore
edu.stanford.slac.mpsgui.ui.fault.EPICS/LinkNodeChannel/LinkNode/LinkProcessorFaultPanel
  • Shows information specific to each fault type
edu.stanford.slac.mpsgui.ui.fault.MainFaultPanel
  • Features a tree-like browser for faults and a placeholder for the detailed information
edu.stanford.slac.mpsgui.ui.logic.StatesCorePanel
  • Contains the text area for HTML that represents the MacroStates (obtainable via MPS Config)

Controllers

edu.stanford.slac.mpsgui.controller.edm.EDMViewer
  • Not used any more
edu.stanford.slac.mpsgui.controller.fault.CurrentFaultsViewer
  • Not used any more
edu.stanford.slac.mpsgui.controller.fault.MPSFaultsViewer
  • Controller for the "Faults" tab
  • A tree-like browser for faults hierarchies
  • Shows the current information about a selected fault
edu.stanford.slac.mpsgui.controller.hist.MPSHistoryViewer
  • Controller for the "History" tab
  • Shows live MPS history
    • Default is the last 8 hours (see edu.stanford.slac.mpsgui.MpsGuiProperties)
    • Periodically checks for new MPS History messages
    • If the live history panel is empty, please trouble-shoot the MPS History Server
  • Features a panel for an interactive search of the MPS history
    • Filter applies to fault names only
    • Launches new search on "key typed", tries to cancel the previous search (may break in the future)
edu.stanford.slac.mpsgui.controller.ignorelogic.IgnoreLogicViewer
  • Controller for the "Ignore Logic" tab
  • Monitors the state of ignoring macros (using MPS Config)
    • Caches previous states
  • Shows detailed information about ignoring and ignored macros
  • To test, ignore/unignore macros by writing 0 or 1 to YAGS:IN20:211:IN_LMTSW_BYPV
    caput YAGS:IN20:211:IN_LMTSW_BYPV 1 to ignore
    caput YAGS:IN20:211:IN_LMTSW_BYPV 0 to unignore
    
edu.stanford.slac.mpsgui.controller.logic.MPSLogicViewer
  • Monitors states of all macros
    • Caches previous states
  • Shows detailed information about a selected macro
  • Allows user to bypass a selected macro to a state
edu.stanford.slac.mpsgui.controller.summary.SummaryViewer
  • Controller for the "Summary" tab
  • Initializes the logic "viewer" for the integrated logic panel
  • If applicable, styles the summary UI as a CUD (larger font etc.)
  • Monitors beam rate PVs (both MPS and actual)
  • Monitors bypassed faults and end times; warns (using proper colors) when bypasses are about to expire
  • Allows user to re-bypass to a bypassed macro state

Others

edu.stanford.slac.mpsgui.MpsCudController
  • Creates the summary UI, tries to setup as a CUD
  • Initializes the summary "viewer" (controller)
edu.stanford.slac.mpsgui.MpsGuiController
  • Creates the full UI
  • If successful, initializes "viewers" (controllers) for each tab
edu.stanford.slac.mpsgui.MpsGuiLauncher
  • The main class expects the following arguments (in the order):
    • Config DB URL prefix
    • Logic DB URL prefix
    • History JDBC URL (including username and password)
    • See $MPSGUI_ROOT/mpsgui for an example
  • Loads Config and Logic DB via MPS Config
  • Depending on the system property slac.launchAsCud, initializes either MpsCudController or MpsGuiController
edu.stanford.slac.mpsgui.MpsGuiProperties
  • Contains constants/properties used by MPSGui, such as:
    • Application name, version number, NULL string, date formats, background color for alternate table rows, etc.
edu.stanford.slac.mpsgui.jdbc.hist.HistoryDB
  • Client for the MPS History data (currently in Oracle, used to be in sqlite)
  • SQL queries are located in the file oracle.properties in the package edu.stanford.slac.mpsgui.jdbc.hist
  • Has an auxilliary API to insert/delete test messages

Release with Eclipse

  • Update the application version in $MPSGUI_ROOT/src/edu.stanford.slac.mpsgui.MpsGuiProperties
  • Add a note in $MPSGUI_ROOT/RELEASE_NOTES
    • Increment the tag version accordingly
  • Commit to CVS
  • Tag with mpsgui-R###
  • Check out the tagged version into production
    cd $PHYSICS_TOP/release
    cvs co -r mpsgui-R#-#-# -d mpsgui-R#-#-# physics/mps/mpsgui
    
  • Select File => New Java project => Create project from existing source
  • Select $PHYSICS_TOP/release/mpsgui-R###
  • Name the project mpsgui-R###
  • Press "Finish"
  • Right-click on the new project mpsgui-R### => Export...
  • Select Java => JAR file
  • Check mpsgui-R### in "Resources to export"
  • Check "Export generated class files and resources"
  • As the export destination, type (and/or select)
    $PHYSICS_TOP/release/mpsgui-R#-#-#/jar/mpsgui.jar
    
  • Press "Finish"
  • Move the symbolic link
    cd $PHYSICS_TOP/
    rm -rf mpsgui; ln -s release/mpsgui-R#-#-# mpsgui
    
  • Launch from lclshome
    • MPS Global => MPS GUI...
    • MPS Global => MPS CUD...
  • No labels