You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
- #Setup
- #Environment
- #Dependencies
- #Test inside Eclipse
- #Development
- #Overview
- #Classes and Functions
- #Release with Eclipse
Setup
Environment
- Effectively, you can develop BeamlineZplot inside Eclipse on lcls-builder.
- Check out the CVS module physics/beamlineZplot into your workspace
- From now on, the root of project is referred to as $ZPLOT_ROOT
Dependencies
- SLAColors (latest version)
- SwingUtil (latest version)
- xypot (latest version)
Test inside Eclipse
- Select $ZPLOT_ROOT/src/edu.stanford.slac.util.zplot.example/SimpleExampleApplication
- Right-click => select Run As... => Java Application
Development
Overview
![mps_config.png](/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&version=2)
Classes and Functions
edu.stanford.slac.mps.epics.ControlSystem
- 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
edu.stanford.slac.mps.jdbc.JDBCMonitor
- Loads all data from Config/Logic DB
- Config DB URL prefix: jdbc:sqlite:/usr/local/lcls/epics/iocTop/MachineProtection/mpsConfiguration/database/
- Logic DB URL prefix: jdbc:sqlite:/usr/local/lcls/epics/iocTop/MachineProtection/mpsConfiguration/algorithm/
- Checks periodically for new versions
- Current Config DB version is stored in IOC:BSY0:MP01:DBVERS
- Current Logic DB version is stored in IOC:BSY0:MP01:ALGRNAME
edu.stanford.slac.mps.jdbc.config.ConfigDB
- Singleton
- Serves as a facade to information about faults
- SQL queries are in the file sqlite.properties in the package edu.stanford.slac.mps.jdbc.config
edu.stanford.slac.mps.jdbc.logic.LogicDB
- 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 with Eclipse
- 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 production
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)
$PHYSICS_TOP/release/mpsconfig-R#-#-#/jar/mpsconfig.jar
- Press "Finish"
- Move the symbolic link
cd $PHYSICS_TOP/
rm -rf mpsconfig; ln -s release/mpsconfig-R#-#-# mpsconfig
- Launch MPS GUI from lclshome
- MPS Global => MPS GUI...
- MPS Global => MPS CUD...