wxmtxy_xml | index /home/oxygen18/JEMIAN/Documents/eclipse/usaxs/wxmtxy/trunk/wxmtxy_xml.py |
@note: support the XML settings file for the wxmtxy application
This Python file provides routines to read and write XML settings
files for the wxmtxy application. An example of the XML file is
shown below. The routines manage the settings internally with a
Python dictionary. Interface routines are used to read and write
the various components of the file. *HOWEVER*, the EPICS configuration
is communicated in a Python dictionary. An example of the Python
dictionary with the EPICS configuration is shown below.
@version:
########### SVN repository information ###################
# $Date: 2010-06-03 16:04:15 -0500 (Thu, 03 Jun 2010) $
# $Author: jemian $
# $Revision: 184 $
# $URL: https://subversion.xor.aps.anl.gov/bcdaext/wxmtxy/trunk/wxmtxy_xml.py $
# $Id: wxmtxy_xml.py 184 2010-06-03 21:04:15Z jemian $
########### SVN repository information ###################
@note: for help with xml.dom, see http://docs.python.org/library/xml.dom.html
@note: Here is an example XML file:
<?xml version="1.0" ?>
<wxmtxy date="2009-04-09" time="10:27:00" version="1.0">
<XYpair name="example" selected="True">
<EPICS_configuration>
<axis name="x">
<flag isMotorRec="False" />
<field name="VAL" pv="32idbLAX:float1" />
<field name="RBV" pv="32idbLAX:float2" />
<field name="DESC" pv="32idbLAX:string1" />
<field name="EGU" pv="32idbLAX:string2" />
<field name="DMOV" pv="32idbLAX:bit1" />
<field name="STOP" pv="32idbLAX:bit2" />
</axis>
<axis name="y">
<flag isMotorRec="True" />
<field name="VAL" pv="32idbLAX:m58:c1:m1" /><!-- USAXS a1y -->
</axis>
</EPICS_configuration>
<tab name="page 1">
<row name="page 1, row 0" x="1.0" y="-1.0" selected="True"/>
<row name="page 1, row 1" x="1.1" y="-1.1"/>
<row/>
</tab>
<tab name="page 2" selected="True">
<row name="page 2, row 0" x="2.0" y="-2.0"/>
<row name="page 2, row 1" x="2.1" y="-2.1"/>
<row name="page 2, row 2" x="2.2" y="-2.2" selected="True"/>
<row name="page 2, row 3" x="2.3" y="-2.3"/>
<row name="page 2, row 4" x="2.4" y="-2.4"/>
<row name="page 2, row 5" x="2.5" y="-2.5"/>
<row name="page 2, row 6" x="2.6" y="-2.6"/>
</tab>
<tab name="empty page"/>
<tab name="page 3">
</XYpair>
</wxmtxy>
@note: Here is an example Python dictionary of the EPICS configuration above:
example_dictionary = {
'x': {
'isMotorRec': False,
'VAL': '32idbLAX:float1',
'RBV': '32idbLAX:float2',
'DESC': '32idbLAX:string1',
'EGU': '32idbLAX:string2',
'DMOV': '32idbLAX:bit1',
'STOP': '32idbLAX:bit2'
},
'y': {
'isMotorRec': True,
'VAL': '32idbLAX:m58:c1:m1.VAL'
}
}
Modules | ||||||
|
Classes | ||||||||||
|