Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sfp-plus-i2c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
sfp-plus-i2c
Commits
2919bda1
Commit
2919bda1
authored
May 10, 2017
by
Vincent van Beveren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed XML, added XSD validation
parent
113618b5
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
602 additions
and
140 deletions
+602
-140
DDMIContext.java
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIContext.java
+1
-1
DDMILoader.java
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMILoader.java
+20
-9
DDMIMeta.java
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIMeta.java
+4
-4
DDMIUtils.java
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIUtils.java
+11
-9
DDMIValue.java
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIValue.java
+14
-5
sfpdd.xml
sw/jsfp/src/nl/nikhef/sfp/ddmi/desc/sfpdd.xml
+128
-56
sfpdd.xsd
sw/jsfp/src/nl/nikhef/sfp/ddmi/desc/sfpdd.xsd
+279
-0
FXML.java
sw/nikhef-tools/src/nl/nikhef/tools/xml/FXML.java
+48
-17
XOL.java
sw/nikhef-tools/src/nl/nikhef/tools/xml/XOL.java
+3
-0
FXMLTest.java
sw/nikhef-tools/src/nl/nikhef/tools/xml/test/FXMLTest.java
+5
-3
build.xml
sw/safaripark/build.xml
+4
-5
km3net_oesol.xml
sw/safaripark/overlays/km3net_oesol.xml
+4
-1
maxim_ds1856m.xml
sw/safaripark/overlays/maxim_ds1856m.xml
+4
-1
sff8690.xml
sw/safaripark/overlays/sff8690.xml
+12
-9
wr_loopback_eeprom.xml
sw/safaripark/overlays/wr_loopback_eeprom.xml
+57
-15
SaFariPark.java
sw/safaripark/src/nl/nikhef/safaripark/SaFariPark.java
+2
-1
FormEditPane.java
...ipark/src/nl/nikhef/safaripark/editpane/FormEditPane.java
+3
-3
ValueSelectionPane.java
...park/src/nl/nikhef/safaripark/vsp/ValueSelectionPane.java
+3
-1
No files found.
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIContext.java
View file @
2919bda1
...
...
@@ -46,7 +46,7 @@ public class DDMIContext
if
(
element
instanceof
DDMIValue
)
{
DDMIValue
value
=
DDMIValue
.
class
.
cast
(
element
);
switch
(
value
.
getType
())
{
case
INT
EGER
_TYPE:
case
INT_TYPE:
case
BITMAP_TYPE:
return
LuaValue
.
valueOf
(
DDMIUtils
.
readInt
(
value
,
DDMIContext
.
this
));
case
TEXT_TYPE:
...
...
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMILoader.java
View file @
2919bda1
...
...
@@ -8,6 +8,8 @@ import java.util.List;
import
javax.xml.stream.XMLStreamException
;
import
org.xml.sax.SAXException
;
import
nl.nikhef.tools.Conversion
;
import
nl.nikhef.tools.Converter
;
import
nl.nikhef.tools.xml.FXML
;
...
...
@@ -20,6 +22,8 @@ import nl.nikhef.tools.xml.XOLProxyFactory;
public
class
DDMILoader
{
private
static
final
String
SFPDD_XML
=
"desc/sfpdd.xml"
;
private
static
final
String
SFPDD_XSD
=
"desc/sfpdd.xsd"
;
private
XOL
_xol
=
new
XOL
();
private
FXML
_fxml
;
...
...
@@ -357,23 +361,24 @@ public class DDMILoader {
public
DDMILoader
()
throws
IOException
,
XMLStreamException
{
this
(
DDMILoader
.
class
.
getResource
(
"desc/sfpdd.xml"
));
public
DDMILoader
()
throws
IOException
,
XMLStreamException
,
SAXException
{
this
(
DDMILoader
.
class
.
getResource
(
SFPDD_XML
),
DDMILoader
.
class
.
getResource
(
SFPDD_XSD
));
}
public
DDMILoader
(
URL
base
)
throws
IOException
,
XMLStream
Exception
public
DDMILoader
(
URL
base
,
URL
xsd
)
throws
IOException
,
XMLStreamException
,
SAX
Exception
{
_xol
.
setMapping
(
"source"
,
new
SimpleProxyFactory
<
DataSource
>(
SourceProxy
.
class
));
_xol
.
setMapping
(
"checksum"
,
new
SimpleProxyFactory
<
Void
>(
ChecksumProxy
.
class
));
_xol
.
setMapping
(
"cache"
,
new
SimpleProxyFactory
<
Void
>(
CacheProxy
.
class
));
_xol
.
setMapping
(
"group"
,
DDMIGroup
.
class
);
_xol
.
setMapping
(
"ddmi"
,
DDMI
.
class
);
_xol
.
setMapping
(
"int"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
INT
EGER
_TYPE
));
_xol
.
setMapping
(
"int"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
INT_TYPE
));
_xol
.
setMapping
(
"bitmap"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
BITMAP_TYPE
));
_xol
.
setMapping
(
"text"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
TEXT_TYPE
));
_xol
.
setMapping
(
"float"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
DECIMAL_TYPE_FLOAT
));
_xol
.
setMapping
(
"s
igned"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
DECIMAL_TYPE_SIGN
ED
));
_xol
.
setMapping
(
"u
nsigned"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
DECIMAL_TYPE_UNSIGN
ED
));
_xol
.
setMapping
(
"s
fix"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
DECIMAL_TYPE_SFIX
ED
));
_xol
.
setMapping
(
"u
fix"
,
new
DDMIValueFactory
(
DDMIValue
.
DDMIType
.
DECIMAL_TYPE_UFIX
ED
));
Converter
.
add
(
new
Conversion
(
String
.
class
,
ViewLevel
.
class
)
{
...
...
@@ -390,15 +395,20 @@ public class DDMILoader {
_xol
.
setMapping
(
"bool"
,
new
DDMIMapMetaFactory
(
DDMIMeta
.
BITFIELD
));
_xol
.
setMapping
(
"convert"
,
new
DDMIMapMetaFactory
(
DDMIMeta
.
CONV
));
_fxml
=
new
FXML
(
base
);
_fxml
=
new
FXML
(
base
,
xsd
);
}
public
void
loadOverlays
(
URL
...
overlays
)
throws
XMLStreamException
,
IOException
public
void
loadOverlays
(
URL
...
overlays
)
throws
IOException
{
for
(
URL
overlay
:
overlays
)
{
_fxml
.
loadOverlay
(
overlay
);
try
{
_fxml
.
loadOverlay
(
overlay
,
DDMILoader
.
class
.
getResource
(
SFPDD_XSD
));
}
catch
(
Exception
e
)
{
throw
new
IOException
(
"Failed to load overlay "
+
overlay
,
e
);
}
}
_ddmi
=
null
;
}
...
...
@@ -414,3 +424,4 @@ public class DDMILoader {
}
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIMeta.java
View file @
2919bda1
...
...
@@ -45,12 +45,12 @@ public class DDMIMeta<T extends Object> {
}
public
static
final
class
Conversion
{
public
static
final
class
Scale
{
private
float
_scale
=
1
;
private
float
_offset
=
0
;
public
Conversion
()
{
public
Scale
()
{
// System.out.println("Conversion created, no args");
}
...
...
@@ -60,7 +60,7 @@ public class DDMIMeta<T extends Object> {
_offset
=
offset
;
}
public
Conversion
(
float
scale
,
float
offset
)
public
Scale
(
float
scale
,
float
offset
)
{
this
.
_scale
=
scale
;
this
.
_offset
=
offset
;
...
...
@@ -152,7 +152,7 @@ public class DDMIMeta<T extends Object> {
public
static
final
DDMIMeta
<
String
>
UNIT
=
new
DDMIMeta
<
String
>(
String
.
class
);
public
static
final
DDMIMeta
<
Conversion
>
CONV
=
new
DDMIMeta
<
Conversion
>(
Conversion
.
class
);
public
static
final
DDMIMeta
<
Scale
>
CONV
=
new
DDMIMeta
<
Scale
>(
Scale
.
class
);
public
static
final
DDMIMeta
<
Integer
>
DEC_PLACES
=
new
DDMIMeta
<
Integer
>(
Integer
.
class
);
...
...
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIUtils.java
View file @
2919bda1
...
...
@@ -19,8 +19,8 @@ public final class DDMIUtils {
if
(
d
==
null
)
return
0
;
boolean
signed
;
if
(
val
.
getType
()
==
DDMIType
.
INT
EGER
_TYPE
||
val
.
getType
()
==
DDMIType
.
DECIMAL_TYPE_S
IGN
ED
||
if
(
val
.
getType
()
==
DDMIType
.
INT_TYPE
||
val
.
getType
()
==
DDMIType
.
DECIMAL_TYPE_S
FIX
ED
||
val
.
getType
()
==
DDMIType
.
DECIMAL_TYPE_FLOAT
)
{
signed
=
true
;
}
else
{
...
...
@@ -46,9 +46,10 @@ public final class DDMIUtils {
case
DECIMAL_TYPE_FLOAT:
baseValue
=
Float
.
intBitsToFloat
(
intValue
);
break
;
case
DECIMAL_TYPE_U
NSIGN
ED:
case
DECIMAL_TYPE_S
IGN
ED:
case
DECIMAL_TYPE_U
FIX
ED:
case
DECIMAL_TYPE_S
FIX
ED:
baseValue
=
intValue
;
baseValue
/=
val
.
getDivider
();
break
;
default
:
break
;
...
...
@@ -81,8 +82,9 @@ public final class DDMIUtils {
case
DECIMAL_TYPE_FLOAT:
intValue
=
Float
.
floatToIntBits
(
value
);
break
;
case
DECIMAL_TYPE_UNSIGNED:
case
DECIMAL_TYPE_SIGNED:
case
DECIMAL_TYPE_UFIXED:
case
DECIMAL_TYPE_SFIXED:
value
*=
val
.
getDivider
();
intValue
=
Math
.
round
(
value
);
break
;
default
:
...
...
@@ -144,7 +146,7 @@ public final class DDMIUtils {
public
static
final
String
getValueAsSting
(
DDMIValue
val
,
DDMIContext
ctx
)
{
switch
(
val
.
getType
())
{
case
INT
EGER
_TYPE:
case
INT_TYPE:
int
v
=
readInt
(
val
,
ctx
);
if
(
DDMIMeta
.
LOOKUP
.
partOf
(
val
))
{
DDMIMeta
.
LookupTable
lut
=
DDMIMeta
.
LOOKUP
.
of
(
val
);
...
...
@@ -156,8 +158,8 @@ public final class DDMIUtils {
case
TEXT_TYPE:
return
readString
(
val
,
ctx
);
case
DECIMAL_TYPE_FLOAT:
case
DECIMAL_TYPE_U
NSIGN
ED:
case
DECIMAL_TYPE_S
IGN
ED:
case
DECIMAL_TYPE_U
FIX
ED:
case
DECIMAL_TYPE_S
FIX
ED:
return
String
.
format
(
"%.3f"
,
readDecimal
(
val
,
ctx
));
default
:
StringBuilder
sb
=
new
StringBuilder
();
...
...
sw/jsfp/src/nl/nikhef/sfp/ddmi/DDMIValue.java
View file @
2919bda1
...
...
@@ -20,10 +20,11 @@ public class DDMIValue extends DDMIElement {
/** Raw binary type, usually used for bit-masks */
BITMAP_TYPE
,
/** Integer type, max 4 bytes, always signed */
INTEGER_TYPE
,
INT_TYPE
,
UINT_TYPE
,
/** Decimal type, interpretation depends on formatting */
DECIMAL_TYPE_U
NSIGN
ED
,
DECIMAL_TYPE_S
IGN
ED
,
DECIMAL_TYPE_U
FIX
ED
,
DECIMAL_TYPE_S
FIX
ED
,
DECIMAL_TYPE_FLOAT
,
}
...
...
@@ -33,6 +34,7 @@ public class DDMIValue extends DDMIElement {
private
boolean
_monitoring
;
private
DDMIType
_type
;
private
String
_short
;
private
int
_divider
=
1
;
private
ViewLevel
_level
;
private
Map
<
DDMIMeta
<?>,
Object
>
_meta
;
...
...
@@ -62,6 +64,11 @@ public class DDMIValue extends DDMIElement {
_offset
=
offset
;
}
public
void
setDivider
(
int
divider
)
{
_divider
=
divider
;
}
public
ViewLevel
getLevel
()
{
return
_level
;
}
...
...
@@ -132,7 +139,9 @@ public class DDMIValue extends DDMIElement {
_short
=
s
;
}
public
int
getDivider
()
{
return
_divider
;
}
...
...
@@ -166,7 +175,7 @@ public class DDMIValue extends DDMIElement {
sb
.
append
(
String
.
format
(
"* %-24s: "
,
getLabel
()));
switch
(
_type
)
{
case
INT
EGER
_TYPE:
case
INT_TYPE:
int
v
=
DDMIUtils
.
readInt
(
this
,
ctx
);
if
(
DDMIMeta
.
LOOKUP
.
partOf
(
this
))
{
DDMIMeta
.
LookupTable
lut
=
DDMIMeta
.
LOOKUP
.
of
(
this
);
...
...
sw/jsfp/src/nl/nikhef/sfp/ddmi/desc/sfpdd.xml
View file @
2919bda1
...
...
@@ -2,7 +2,9 @@
<!-- This file describes the SPF+ EEPROM and Diagnostic memory layout -->
<ddmi
id=
"root"
>
<ddmi
id=
"root"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"sfpdd.xsd"
>
<source
i2c-addr=
"x50"
id=
"eeprom"
start=
"0"
end=
"255"
>
<checksum
offset=
"63"
start=
"0"
end=
"62"
/>
...
...
@@ -109,26 +111,21 @@
</int>
<text
label=
"Vendor label"
writable=
"true"
name=
"vendor"
offset=
"20"
length=
"16"
level=
"basic"
>
</text>
offset=
"20"
length=
"16"
level=
"basic"
/>
<!-- 36:1 Transciever(2) moved up -->
<bitmap
label=
"Vendor OUI"
writable=
"true"
name=
"vendor_oui"
offset=
"37"
length=
"3"
level=
"basic"
>
</bitmap>
offset=
"37"
length=
"3"
level=
"basic"
/>
<text
label=
"Vendor PN"
writable=
"true"
name=
"vendor_pn"
offset=
"40"
length=
"16"
level=
"basic"
>
</text>
offset=
"40"
length=
"16"
level=
"basic"
/>
<text
label=
"Vendor Rev"
writable=
"true"
name=
"vendor_rev"
offset=
"56"
length=
"4"
level=
"basic"
>
</text>
offset=
"56"
length=
"4"
level=
"basic"
/>
<int
label=
"Wavelength"
writable=
"true"
name=
"wavelength"
offset=
"60"
length=
"2"
level=
"basic"
>
</int>
offset=
"60"
length=
"2"
level=
"basic"
/>
</group>
<group
label=
"Extended ID fields"
name=
"ext_id"
>
...
...
@@ -229,69 +226,144 @@
</group>
</group>
<group
label=
"Calibration Constants"
>
<float
label=
"RX Power 4"
offset=
"56"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 3"
offset=
"60"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 2"
offset=
"64"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 1"
offset=
"68"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 0"
offset=
"72"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 4"
offset=
"56"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 3"
offset=
"60"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 2"
offset=
"64"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 1"
offset=
"68"
length=
"4"
writable=
"true"
/>
<float
label=
"RX Power 0"
offset=
"72"
length=
"4"
writable=
"true"
/>
<unsigned
label=
"Tx_I(Slope)"
offset=
"76"
length=
"2"
writable=
"true"
name=
"tx_i_slope"
>
<convert
scale=
"0.00390625"
/>
</unsigned>
<ufix
label=
"Tx_I(Slope)"
offset=
"76"
length=
"2"
writable=
"true"
name=
"tx_i_slope"
divider=
"x100"
/>
<signed
label=
"Tx_I(Offset)"
offset=
"78"
length=
"2"
writable=
"true"
name=
"tx_i_offset"
/>
<sfix
label=
"Tx_I(Offset)"
offset=
"78"
length=
"2"
writable=
"true"
name=
"tx_i_offset"
/>
<unsigned
label=
"Tx_Pwr(Slope)"
offset=
"80"
length=
"2"
writable=
"true"
name=
"tx_pwr_slope"
>
<convert
scale=
"0.00390625"
/>
</unsigned>
<ufix
label=
"Tx_Pwr(Slope)"
offset=
"80"
length=
"2"
writable=
"true"
name=
"tx_pwr_slope"
divider=
"x100"
/>
<signed
label=
"Tx_Pwr(Offset)"
offset=
"82"
length=
"2"
writable=
"true"
name=
"tx_pwr_offset"
/>
<sfix
label=
"Tx_Pwr(Offset)"
offset=
"82"
length=
"2"
writable=
"true"
name=
"tx_pwr_offset"
/>
<unsigned
label=
"T(Slope)"
offset=
"84"
length=
"2"
writable=
"true"
name=
"t_slope"
>
<convert
scale=
"0.00390625"
/>
</unsigned>
<ufix
label=
"T(Slope)"
offset=
"84"
length=
"2"
writable=
"true"
name=
"t_slope"
divider=
"x100"
/>
<signed
label=
"T(Offset)"
offset=
"86"
length=
"2"
writable=
"true"
name=
"t_offset"
/>
<sfix
label=
"T(Offset)"
offset=
"86"
length=
"2"
writable=
"true"
name=
"t_offset"
/>
<unsigned
label=
"V(Slope)"
offset=
"88"
length=
"2"
writable=
"true"
name=
"v_slope"
>
<convert
scale=
"0.00390625"
/>
</unsigned>
<ufix
label=
"V(Slope)"
offset=
"88"
length=
"2"
writable=
"true"
name=
"v_slope"
divider=
"x100"
/>
<signed
label=
"V(Offset)"
offset=
"90"
length=
"2"
writable=
"true"
name=
"v_offset"
/>
<sfix
label=
"V(Offset)"
offset=
"90"
length=
"2"
writable=
"true"
name=
"v_offset"
/>
</group>
<group
label=
"Real-time diagnostics"
name=
"rt_diag"
>
<signed
label=
"Temperature (°C)"
offset=
"96"
length=
"2"
monitor=
"true"
name=
"temperature"
>
<convert
scale=
"0.00390625"
/>
</signed>
<unsigned
label=
"Vcc (V)"
offset=
"98"
length=
"2"
monitor=
"true"
name=
"vcc"
>
<convert
scale=
"0.0001"
/>
</unsigned>
<unsigned
label=
"TX Bias (mA)"
offset=
"100"
length=
"2"
monitor=
"true"
name=
"tx_bias"
>
<convert
scale=
"0.002"
/>
</unsigned>
<unsigned
label=
"TX Power (mW)"
offset=
"102"
length=
"2"
monitor=
"true"
name=
"tx_power"
>
<convert
scale=
"0.001"
/>
</unsigned>
<sfix
label=
"Temperature (°C)"
offset=
"96"
length=
"2"
monitor=
"true"
name=
"temperature"
divider=
"256"
/>
<ufix
label=
"Vcc (V)"
offset=
"98"
length=
"2"
monitor=
"true"
name=
"vcc"
divider=
"10000"
/>
<ufix
label=
"TX Bias (mA)"
offset=
"100"
length=
"2"
monitor=
"true"
name=
"tx_bias"
divider=
"500"
/>
<ufix
label=
"TX Power (mW)"
offset=
"102"
length=
"2"
monitor=
"true"
name=
"tx_power"
divider=
"1000"
/>
<unsigned
label=
"RX Power (mW)"
offset=
"104"
length=
"2"
monitor=
"true"
name=
"rx_bias"
>
<convert
scale=
"0.001"
/>
</unsigned>
<ufix
label=
"RX Power (mW)"
offset=
"104"
length=
"2"
monitor=
"true"
name=
"rx_bias"
divider=
"1000"
/>
<!-- TODO BEGIN build visual conditional here -->
<signed
label=
"Laser temperature"
offset=
"106"
length=
"2"
monitor=
"true"
name=
"laser_temp"
>
<convert
scale=
"0.00390625"
/>
</signed>
<sfix
label=
"Laser temperature"
offset=
"106"
length=
"2"
monitor=
"true"
name=
"laser_temp"
divider=
"x100"
/>
<sfix
label=
"Laser wavelength"
offset=
"106"
length=
"2"
monitor=
"true"
name=
"laser_wavelength"
divider=
"x100"
/>
<signed
label=
"Laser wavelength"
offset=
"106"
length=
"2"
monitor=
"true"
name=
"laser_wavelength"
>
<convert
scale=
"0.00390625"
/>
</signed>
<!-- TODO END build visual conditional here -->
<signed
label=
"TEC current (mA)"
offset=
"108"
length=
"2"
monitor=
"true"
name=
"tec_current"
>
<convert
scale=
"0.1"
/>
</signed>
<sfix
label=
"TEC current (mA)"
offset=
"108"
length=
"2"
monitor=
"true"
name=
"tec_current"
divider=
"10"
/>
<!-- Oh dear, a monitoring, changeable value... -->
<bitmap
label=
"Status/Control"
writable=
"true"
offset=
"110"
length=
"1"
monitor=
"true"
name=
"status_ctrl"
>
...
...
sw/jsfp/src/nl/nikhef/sfp/ddmi/desc/sfpdd.xsd
0 → 100644
View file @
2919bda1
<xs:schema
attributeFormDefault=
"unqualified"
elementFormDefault=
"qualified"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
>
<!-- Types -->
<xs:simpleType
name=
"unsignedInt"
>
<xs:union
memberTypes=
"xs:unsignedInt"
>
<xs:simpleType>
<xs:restriction
base=
"xs:token"
>
<xs:pattern
value=
"x[0-9A-Fa-f]{1,9}"
/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:simpleType
name=
"unsignedByte"
>
<xs:union
memberTypes=
"xs:unsignedByte"
>
<xs:simpleType>
<xs:restriction
base=
"xs:token"
>
<xs:pattern
value=
"x[0-9A-Fa-f]{1,3}"
/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:complexType
name=
"identifier"
mixed=
"false"
>
<xs:attribute
type=
"xs:ID"
name=
"id"
use=
"optional"
/>
</xs:complexType>
<xs:complexType
name=
"element"
mixed=
"false"
>
<xs:complexContent>
<xs:extension
base=
"identifier"
>
<xs:attribute
type=
"xs:string"
name=
"label"
use=
"optional"
/>
<xs:attribute
type=
"xs:string"
name=
"short"
use=
"optional"
/>
<xs:attribute
type=
"xs:string"
name=
"name"
use=
"optional"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType
name=
"value"
mixed=
"false"
>
<xs:complexContent>
<xs:extension
base=
"element"
>
<xs:attribute
type=
"xs:boolean"
name=
"writable"
use=
"optional"
/>
<xs:attribute
type=
"xs:boolean"
name=
"monitor"
use=
"optional"
/>
<xs:attribute
type=
"xs:unsignedByte"
name=
"offset"
use=
"optional"
/>
<xs:attribute
type=
"xs:unsignedByte"
name=
"length"
use=
"optional"
/>
<xs:attribute
type=
"xs:string"
name=
"level"
use=
"optional"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType
name=
"decimal"
mixed=
"false"
>
<xs:complexContent>
<xs:extension
base=
"value"
>
<xs:sequence>
<xs:element
ref=
"scale"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Root element -->
<xs:element
name=
"ddmi"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"identifier"
>
<xs:sequence>
<xs:element
ref=
"source"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
<xs:element
ref=
"group"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<!-- Sources, checksums and cache -->
<xs:element
name=
"checksum"
>
<xs:complexType>
<xs:simpleContent>
<xs:extension
base=
"xs:string"
>
<xs:attribute
type=
"unsignedByte"
name=
"offset"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"start"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"end"
use=
"optional"
/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"cache"
>
<xs:complexType>
<xs:simpleContent>
<xs:extension
base=
"xs:string"
>
<xs:attribute
type=
"unsignedByte"
name=
"start"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"end"
use=
"optional"
/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"source"
>
<xs:complexType
mixed=
"false"
>
<xs:sequence>
<xs:element
ref=
"checksum"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
<xs:element
ref=
"cache"
minOccurs=
"0"
/>
</xs:sequence>
<xs:attribute
type=
"unsignedByte"
name=
"i2c-addr"
use=
"optional"
/>
<xs:attribute
type=
"xs:ID"
name=
"id"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"start"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"end"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"page-select"
use=
"optional"
/>
<xs:attribute
type=
"xs:string"
name=
"valid-if"
use=
"optional"
/>
<xs:attribute
type=
"unsignedByte"
name=
"page"
use=
"optional"
/>
<xs:attribute
type=
"xs:IDREF"
name=
"parent-id"
use=
"optional"
/>
</xs:complexType>
</xs:element>
<xs:element
name=
"group"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"element"
>
<xs:choice
maxOccurs=
"unbounded"
minOccurs=
"0"
>
<xs:element
ref=
"int"
/>
<xs:element
ref=
"bitmap"
/>
<xs:element
ref=
"text"
/>
<xs:element
ref=
"group"
/>
<xs:element
ref=
"float"
/>
<xs:element
ref=
"ufix"
/>
<xs:element
ref=
"sfix"
/>
</xs:choice>
<xs:attribute
type=
"xs:IDREF"
name=
"source-id"
use=
"optional"
/>
<xs:attribute
type=
"xs:string"
name=
"showIf"
use=
"optional"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"int"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"value"
>
<xs:sequence>
<xs:element
ref=
"map"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"uint"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"value"
>
<xs:sequence>
<xs:element
ref=
"map"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"bitmap"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"value"
>
<xs:sequence>
<xs:element
ref=
"bool"
maxOccurs=
"unbounded"
minOccurs=
"0"
/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"text"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"value"
/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"float"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"decimal"
/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"ufix"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"decimal"
>
<xs:attribute
type=
"unsignedInt"
name=
"divider"
use=
"optional"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"sfix"
>
<xs:complexType>
<xs:complexContent>
<xs:extension
base=
"decimal"
>
<xs:attribute
type=
"unsignedInt"
name=
"divider"
use=
"optional"
/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<!-- Meta elements -->
<xs:element
name=
"bool"
>
<xs:complexType>
<xs:simpleContent>
<xs:extension
base=
"xs:string"
>
<xs:attribute
type=
"xs:unsignedByte"
name=
"bit"
use=
"optional"
/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element
name=
"scale"
>
<xs:complexType>
<xs:attribute
type=
"xs:float"
name=
"offset"
use=
"optional"
/>
<xs:attribute
type=
"xs:float"
name=
"scale"
use=
"optional"
/>
</xs:complexType>
</xs:element>
<xs:element
name=
"map"
>
<xs:complexType>
<xs:simpleContent>
<xs:extension
base=
"xs:string"
>
<xs:attribute
type=
"unsignedByte"
name=
"key"
use=
"optional"
/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<!-- Overlay support -->
<xs:element
name=
"overlay"
>
<xs:complexType
mixed=
"false"
>
<xs:choice
maxOccurs=
"unbounded"
minOccurs=
"0"
>
<xs:element
ref=
"bool"
/>
<xs:element
ref=
"map"
/>
<xs:element
ref=
"scale"
/>
<xs:element
ref=
"sfix"
/>
<xs:element
ref=
"ufix"
/>
<xs:element
ref=
"float"
/>
<xs:element
ref=
"int"
/>
<xs:element
ref=
"uint"
/>
<xs:element
ref=
"text"
/>
<xs:element
ref=
"bitmap"
/>
<xs:element
ref=
"group"
/>
<xs:element
ref=
"ddmi"
/>
<xs:element
ref=
"source"
/>
<xs:element
ref=
"cache"
/>
<xs:element
ref=
"checksum"
/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
sw/nikhef-tools/src/nl/nikhef/tools/xml/FXML.java
View file @
2919bda1
package
nl
.
nikhef
.
tools
.
xml
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.Reader
;
import
java.net.URL
;
import
java.util.Iterator
;
import
java.util.LinkedList
;
import
java.util.Map
;
import
javax.xml.XMLConstants
;
import
javax.xml.stream.XMLEventReader
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamException
;
...
...
@@ -15,29 +14,36 @@ import javax.xml.stream.events.Attribute;
import
javax.xml.stream.events.Characters
;
import
javax.xml.stream.events.StartElement
;
import
javax.xml.stream.events.XMLEvent
;
import
javax.xml.transform.stream.StreamSource
;
import
javax.xml.validation.Schema
;
import
javax.xml.validation.SchemaFactory
;
import
javax.xml.validation.Validator
;
import
org.xml.sax.ErrorHandler
;
import
org.xml.sax.SAXException
;
import
org.xml.sax.SAXParseException
;
public
class
FXML
{
private
FXMLElement
_root
;
public
FXML
(
Reader
r
)
throws
XMLStreamException
{
readInternal
(
r
);
}
public
FXML
(
URL
resource
)
throws
IOException
,
XMLStreamException
{
Reader
r
=
new
InputStreamReader
(
resource
.
openStream
());
readInternal
(
r
);
r
.
close
();
public
FXML
(
URL
resource
,
URL
xsd
)
throws
IOException
,
XMLStreamException
,
SAXException
{
readInternal
(
resource
,
xsd
,
false
);
}
private
FXML
(
URL
resource
,
URL
xsd
,
boolean
ignoreIdRefs
)
throws
IOException
,
XMLStreamException
,
SAXException
{
readInternal
(
resource
,
xsd
,
ignoreIdRefs
);
}
public
FXMLElement
getRoot
()
{
return
_root
;
}
public
void
loadOverlay
(
URL
resource
)
throws
XMLStreamException
,
IO
Exception
public
void
loadOverlay
(
URL
resource
,
URL
xsd
)
throws
XMLStreamException
,
IOException
,
SAX
Exception
{
FXML
overlay
=
new
FXML
(
resource
);
FXML
overlay
=
new
FXML
(
resource
,
xsd
,
true
);
FXMLElement
xml
=
overlay
.
getRoot
();
merge
(
xml
);
...
...
@@ -110,10 +116,39 @@ public class FXML {
}
private
void
readInternal
(
Reader
r
)
throws
XMLStream
Exception
private
void
readInternal
(
URL
resource
,
URL
xsd
,
final
boolean
ignoreIdRefs
)
throws
XMLStreamException
,
IOException
,
SAX
Exception
{
Validator
validator
=
null
;
if
(
xsd
!=
null
)
{
SchemaFactory
factory
=
SchemaFactory
.
newInstance
(
XMLConstants
.
W3C_XML_SCHEMA_NS_URI
);
Schema
schema
=
factory
.
newSchema
(
xsd
);
validator
=
schema
.
newValidator
();
validator
.
setErrorHandler
(
new
ErrorHandler
()
{
@Override
public
void
warning
(
SAXParseException
exception
)
throws
SAXException
{
throw
exception
;
}
@Override
public
void
fatalError
(
SAXParseException
exception
)
throws
SAXException
{
throw
exception
;
}
@Override
public
void
error
(
SAXParseException
exception
)
throws
SAXException
{
if
(
ignoreIdRefs
&&
exception
.
getMessage
().
contains
(
"cvc-id.1"
))
{
return
;
}
throw
exception
;
}
});
validator
.
validate
(
new
StreamSource
(
resource
.
openStream
()));
}
XMLInputFactory
f
=
XMLInputFactory
.
newInstance
();
XMLEventReader
er
=
f
.
createXMLEventReader
(
r
);
XMLEventReader
er
=
f
.
createXMLEventReader
(
r
esource
.
openStream
()
);
LinkedList
<
FXMLElement
>
stack
=
new
LinkedList
<
FXMLElement
>();
FXMLElement
cur
=
null
;
...
...
@@ -181,10 +216,6 @@ public class FXML {
}
}
public
void
parseOverlay
(
Reader
r
)
{
}
}
sw/nikhef-tools/src/nl/nikhef/tools/xml/XOL.java
View file @
2919bda1
...
...
@@ -101,6 +101,9 @@ public class XOL
// Then, set attributes
for
(
Map
.
Entry
<
String
,
String
>
att
:
fxml
.
attributes
().
entrySet
())
{
// ignore namespaces
if
(
att
.
getKey
().
contains
(
":"
))
continue
;
if
(
att
.
getKey
().
equals
(
"id"
))
{
if
(
_idToProxy
.
containsKey
(
att
.
getValue
()))
{
throw
new
RuntimeException
(
String
.
format
(
"An entity with ID '%s' already exists"
,
att
.
getValue
()));
...
...
sw/nikhef-tools/src/nl/nikhef/tools/xml/test/FXMLTest.java
View file @
2919bda1
...
...
@@ -4,18 +4,20 @@ import java.io.IOException;
import
javax.xml.stream.XMLStreamException
;
import
org.xml.sax.SAXException
;
import
nl.nikhef.tools.xml.FXML
;
public
class
FXMLTest
{
public
static
void
main
(
String
[]
args
)
throws
XMLStreamException
,
IOException
{
public
static
void
main
(
String
[]
args
)
throws
XMLStreamException
,
IOException
,
SAXException
{
FXML
fxml
=
new
FXML
(
FXMLTest
.
class
.
getResource
(
"root.xml"
));
FXML
fxml
=
new
FXML
(
FXMLTest
.
class
.
getResource
(
"root.xml"
)
,
null
);
fxml
.
getRoot
().
prettyPrint
();
fxml
.
loadOverlay
(
FXMLTest
.
class
.
getResource
(
"overlay.xml"
));
fxml
.
loadOverlay
(
FXMLTest
.
class
.
getResource
(
"overlay.xml"
)
,
null
);
}
}
sw/safaripark/build.xml
View file @
2919bda1
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
4 apr. 2016 13:06:34
jsfp
Java SFP Library
4 apr. 2016 13:06:34
SaFariPark GUI Application
vincentb
Vincent van Beveren (v.van.beveren[at]nikhef.nl)
====================================================================== -->
<project
name=
"safaripark"
default=
"default"
>
<description>
...
...
sw/safaripark/overlays/km3net_oesol.xml
View file @
2919bda1
<?xml version="1.0" encoding="UTF-8"?>
<!-- Adds support for the OE Solutions transceivers, as used in KM3NeT -->
<overlay>
<overlay
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"sfpdd.xsd"
>
<group
id=
"root"
>
<group
label=
"OE Solutions custom"
>
<group
source-id=
"diag"
showIf=
"isset(id.montype, 6)"
>
...
...
sw/safaripark/overlays/maxim_ds1856m.xml
View file @
2919bda1
<?xml version="1.0" encoding="UTF-8"?>
<!-- Adds support for the Maxim DS1856M -->
<overlay>
<overlay
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"sfpdd.xsd"
>
<group
id=
"root"
>
<group
label=
"Maxim DS1856M"
showIf=
"isset(id.montype, 6)"
>
<group
source-id=
"diag"
label=
"Password"
>
...
...
sw/safaripark/overlays/sff8690.xml
View file @
2919bda1
<?xml version="1.0" encoding="UTF-8"?>
<!-- Adds support for the Maxim DS1856M -->
<overlay>
<overlay
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"sfpdd.xsd"
>
<group
id=
"root"
>
<group
label=
"Tunable SFP"
source-id=
"diag_p2"
showIf=
"isset(id.montype, 6)"
>
<bitmap
label=
"Dithering"
writable=
"false"
offset=
"128"
length=
"1"
name=
"dithering"
...
...
@@ -12,22 +15,22 @@
</bitmap>
<group
label=
"Laser capabilities"
>
<int
label=
"First Frequency (THz)"
writable=
"false"
name=
"LFL1"
offset=
"132"
length=
"2"
level=
"basic"
/>
<u
nsigned
label=
"First Frequency (GHz)"
writable=
"false"
name=
"LFL2"
offset=
"134"
length=
"2"
level=
"basic"
>
<u
fix
label=
"First Frequency (GHz)"
writable=
"false"
name=
"LFL2"
offset=
"134"
length=
"2"
level=
"basic"
>
<convert
scale=
"0.1"
/>
</u
nsigned
>
</u
fix
>
<int
label=
"Last Frequency (THz)"
writable=
"false"
name=
"LFH1"
offset=
"136"
length=
"2"
level=
"basic"
/>
<u
nsigned
label=
"Last Frequency (GHz)"
writable=
"false"
name=
"LFH2"
offset=
"138"
length=
"2"
level=
"basic"
>
<u
fix
label=
"Last Frequency (GHz)"
writable=
"false"
name=
"LFH2"
offset=
"138"
length=
"2"
level=
"basic"
>
<convert
scale=
"0.1"
/>
</u
nsigned
>
<u
nsigned
label=
"Minimum grid spacing (GHz)"
writable=
"false"
name=
"LGrid"
offset=
"140"
length=
"2"
level=
"basic"
>
</u
fix
>
<u
fix
label=
"Minimum grid spacing (GHz)"
writable=
"false"
name=
"LGrid"
offset=
"140"
length=
"2"
level=
"basic"
>
<convert
scale=
"0.1"
/>
</u
nsigned
>
</u
fix
>
</group>
<group
label=
"Frequency and wavelength control"
>
<int
label=
"Channel number set"
writable=
"true"
name=
"chno_set"
offset=
"144"
length=
"2"
level=
"basic"
/>
<u
nsigned
label=
"Wavelength set (nm)"
writable=
"true"
name=
"wl_set"
offset=
"146"
length=
"2"
level=
"basic"
>
<u
fix
label=
"Wavelength set (nm)"
writable=
"true"
name=
"wl_set"
offset=
"146"
length=
"2"
level=
"basic"
>
<convert
scale=
"0.05"
/>
</u
nsigned
>
</u
fix
>
<bitmap
label=
"Other options"
writable=
"true"
name=
"tx_dither"
offset=
"151"
length=
"1"
level=
"basic"
>
<bool
bit=
"0"
>
Disable dithering
</bool>
</bitmap>
...
...
sw/safaripark/overlays/wr_loopback_eeprom.xml
View file @
2919bda1
<?xml version="1.0" encoding="UTF-8"?>
<!-- Adds support for the Maxim DS1856M -->
<overlay>
<overlay
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"sfpdd.xsd"
>
<source
id=
"diag_p0"
>
<checksum
offset=
"247"
start=
"128"
end=
"246"
/>
<cache
start=
"128"
end=
"247"
/>
</source>
<group
id=
"root"
>
<group
label=
"Loopback SFP"
source-id=
"diag_p0"
showIf=
"isset(id.montype, 6)"
>
<bitmap
label=
"Magic Value"
writable=
"true"
offset=
"128"
length=
"2"
name=
"magic"
level=
"basic"
/>
<int
label=
"Version"
writable=
"true"
offset=
"130"
length=
"1"
name=
"version"
level=
"basic"
/>
<bitmap
label=
"Calibration Date"
writable=
"true"
offset=
"131"
length=
"3"
name=
"cal_date"
level=
"basic"
/>
<bitmap
label=
"OUI responsible"
writable=
"true"
offset=
"134"
length=
"3"
name=
"cal_oui"
level=
"basic"
/>
<unsigned
label=
"Tx-to-Rx Delay (ps)"
writable=
"true"
offset=
"140"
length=
"4"
name=
"tx2rx_dly"
level=
"basic"
>
<convert
scale=
"0.0000152587890625"
/>
</unsigned>
<unsigned
label=
"Tx-to-Out Delay (ps)"
writable=
"true"
offset=
"144"
length=
"4"
name=
"tx2out_dly"
level=
"basic"
>
<convert
scale=
"0.0000152587890625"
/>
</unsigned>
<unsigned
label=
"Rx-to-Out Delay (ps)"
writable=
"true"
offset=
"148"
length=
"4"
name=
"rx2out_dly"
level=
"basic"
>
<convert
scale=
"0.0000152587890625"
/>
</unsigned>
</group>
<bitmap
label=
"Magic Value"
writable=
"true"
offset=
"128"
length=
"2"
name=
"magic"
level=
"basic"
/>
<int
label=
"Version"
writable=
"true"
offset=
"130"
length=
"1"
name=
"version"
level=
"basic"
/>
<bitmap
label=
"Calibration Date"
writable=
"true"
offset=
"131"
length=
"3"
name=
"cal_date"
level=
"basic"
/>
<bitmap
label=
"OUI responsible"
writable=
"true"
offset=
"134"
length=
"3"
name=
"cal_oui"
level=
"basic"
/>
<ufix
label=
"Tx-to-Rx Delay (ps)"
writable=
"true"
offset=
"140"
length=
"4"
name=
"tx2rx_dly"
level=
"basic"
divider=
"x10000"
/>
<ufix
label=
"Tx-to-Out Delay (ps)"
writable=
"true"
offset=
"144"
length=
"4"
name=
"tx2out_dly"
level=
"basic"
divider=
"x10000"
/>
<ufix
label=
"Rx-to-Out Delay (ps)"
writable=
"true"
offset=
"148"
length=
"4"
name=
"rx2out_dly"
level=
"basic"
divider=
"x10000"
/>
</group>
</group>
</overlay>
sw/safaripark/src/nl/nikhef/safaripark/SaFariPark.java
View file @
2919bda1
...
...
@@ -45,6 +45,7 @@ import javax.xml.stream.XMLStreamException;
import
org.codejargon.feather.Feather
;
import
org.codejargon.feather.Provides
;
import
org.xml.sax.SAXException
;
import
nl.nikhef.safaripark.devmgr.BaySelectionListener
;
import
nl.nikhef.safaripark.devmgr.DeviceManager
;
...
...
@@ -274,7 +275,7 @@ public class SaFariPark extends JFrame implements BaySelectionListener, WindowLi
@Provides
@Singleton
DDMILoader
ddmiLoader
(
OverlayManager
ovl
)
throws
IOException
,
XMLStreamException
{
DDMILoader
ddmiLoader
(
OverlayManager
ovl
)
throws
IOException
,
XMLStreamException
,
SAXException
{
DDMILoader
loader
=
new
DDMILoader
();
loader
.
loadOverlays
(
ovl
.
getOverlays
());
return
loader
;
...
...
sw/safaripark/src/nl/nikhef/safaripark/editpane/FormEditPane.java
View file @
2919bda1
...
...
@@ -76,7 +76,7 @@ public class FormEditPane extends JPanel {
ValueEditor
comp
;
switch
(
val
.
getType
())
{
case
INT
EGER
_TYPE:
case
INT_TYPE:
if
(
DDMIMeta
.
LOOKUP
.
partOf
(
val
))
{
comp
=
new
EnumEditor
(
ctx
,
val
,
label
);
}
else
{
...
...
@@ -87,8 +87,8 @@ public class FormEditPane extends JPanel {
comp
=
new
TextEditor
(
ctx
,
val
,
label
);
break
;
case
DECIMAL_TYPE_FLOAT:
case
DECIMAL_TYPE_S
IGN
ED:
case
DECIMAL_TYPE_U
NSIGN
ED:
case
DECIMAL_TYPE_S
FIX
ED:
case
DECIMAL_TYPE_U
FIX
ED:
comp
=
new
DecimalEditor
(
ctx
,
val
,
label
);
break
;
default
:
...
...
sw/safaripark/src/nl/nikhef/safaripark/vsp/ValueSelectionPane.java
View file @
2919bda1
...
...
@@ -37,6 +37,8 @@ import javax.swing.tree.DefaultMutableTreeNode;
import
javax.swing.tree.DefaultTreeModel
;
import
javax.xml.stream.XMLStreamException
;
import
org.xml.sax.SAXException
;
import
nl.nikhef.safaripark.Config
;
import
nl.nikhef.safaripark.extra.ExtendedAbstractAction
;
import
nl.nikhef.safaripark.res.Resources
;
...
...
@@ -363,7 +365,7 @@ public class ValueSelectionPane extends JPanel implements ItemListener, ItemSele
static
ValueSelectionPane
vsp
;
public
static
void
main
(
String
[]
args
)
throws
IOException
,
XMLStreamException
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
XMLStreamException
,
SAXException
{
try
{
UIManager
.
setLookAndFeel
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment