- As of June 17th 2011, there may be a bug in reloading the Config DB after faults were removed.
Setup
Environment
- Effectively, you can only develop MPSConfig inside Eclipse on lcls-builder.
- Check out the CVS module physics/mps/mpsconfig into your workspace
- From now on, the root of project is referred to as $MPSCONFIG_ROOT
- Use ant to build the mpsconfig.jar
Dependencies
- ezJCA (version R0-0-10)
- javainterfaces (current version)
- Oracle JDBC driver (under $MPSCONFIG_ROOT/lib/)
- Sqlite JDBC driver (under $MPSCONFIG_ROOT/lib/)
- xal4lcls
- ext.jar (current version)
- xal.jar (current version)
Test
...
- To test your changes, you can run the MPS GUI
- Check out the MPSGui project
- Add the MPSConfig project to MPSGui's build path
- Remove the library mpsconfig.jar from MPSGui's build path Run MPS GUI inside Eclipseand replace it with the one you have built.
Development
Overview
Classes and Functions
...
- Monitors current Macro state numbers from IOC:BSY0:MP01:TTBLST.VALA
- Bypasses faults to a value for a time duration
- Monitors bypassed faults and end times
- Given a fault name, gets current state, type, and timestamp
of the fault - Given a PV, gets beam rate names (MPS and actual)
- Translates between EPICS and Java time
...
- Singleton
- Serves as a facade to information about Macros (and states), ignore conditions, current MacroStates
- SQL queries are in the file sqlite.properties in the package edu.stanford.slac.mps.jdbc.logic
Release
...
using cram
- Add a note in $MPSGUI_ROOT/RELEASE_NOTES
- Increment the tag version accordingly
- Commit to CVS
- Tag with mpsconfig-R#-#-#
Check out the tagged version into
productionyour workspace on dev using eco
Code Block $ cd $PHYSICS_TOP/release cvs co -r mpsconfig-R#-#-# -d mpsconfig-R#-#-# physics/mps/mpsconfig
- Select File => New Java project => Create project from existing source
- Select $PHYSICS_TOP/release/mpsconfig-R#-#-#
- Name the project mpsconfig-R#-#-#
- Press "Finish"
- Right-click on the new project mpsconfig-R#-#-# => Export...
- Select Java => JAR file
- Check mpsconfig-R#-#-# in "Resources to export"
- Check "Export generated class files and resources"
- As the export destination, type (and/or select)
Code Block $PHYSICS_TOP/release/mpsconfig-R#-#-#/jar/mpsconfig.jar
- Press "Finish"
- Move the symbolic link
Code Block cd $PHYSICS_TOP/ rm -rf mpsconfig; ln -s release/mpsconfig-R#-#-# mpsconfig
~/workspace $ eco Enter name of module/package to checkout: mpsconfig Enter name of tag or [RETURN] to use HEAD>mpsconfig-R0-0-11 Using mpsconfig-R0-0-11. The name of the directory will be mpsconfig-R0-0-11. cvs checkout -P -r mpsconfig-R0-0-11 -d mpsconfig-R0-0-11 mpsconfig cvs checkout: Updating mpsconfig-R0-0-11 ... $ cd mpsconfig/mpsconfig-R0-0-11/ $ ant
- Ant should generate the jar file in mpsconfig.jar
- You can then use cram push and cram upgrade to upgrade the mpsconfig package
Note that mpsconfig is a dependent jar and is used by the other MPS packages. You will need to build new versions of these packages to use the new version of mpsconfig by updating their jars using
Launch MPS GUI from lclshome- MPS Global => MPS GUI... MPS Global => MPS CUD...