Class ClaroControl
- java.lang.Object
-
- cbsw.lhcb.pdmdb.ClaroControl
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
public class ClaroControl extends java.lang.Object implements java.awt.event.ActionListener
This class encapsulates the interactions with the collection of CLAROs.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
aldoEnable
GPIO number of FEB ALDO enable(package private) java.util.ArrayList<Claro>
claros
List of CLARO instances(package private) int
ec
The EC ID of this CLARO(package private) int
feb1Enable
GPIO number of FEB1 enable(package private) int
feb2Enable
GPIO number of FEB2 enablestatic int
nClaros
Number of CLAROs per FEBstatic int
nFebs
Number of FEBs per EC per PDMDB(package private) int
npor
GPIO number of POR*(package private) java.util.prefs.Preferences
prefs
(package private) Sc
sc
(package private) ScaDepp
sca
The SCA interface(package private) int
seud
GPIO number of CLARO SEUDboolean
testEnable
(package private) int
writeEnable
GPIO number of the CLARO write enable
-
Constructor Summary
Constructors Constructor Description ClaroControl()
No-argument constructor called by the unmarshaller
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
(package private) void
assertPOR()
Asserts the EC npor (power on reset) signal.boolean
configure()
Configures all CLAROs(package private) void
deassertPOR()
Deasserts the EC npor (power on reset) signal.void
deselectAllCLARO()
Deselects (SPI) all CLAROsjava.util.ArrayList<Claro>
getClaros()
void
init(Sc sc, int ec)
Completes the initialisation of the instancejavax.swing.JPanel
makePanel()
Convenience method to create a GUI panelstatic boolean
verify(ScaDepp sca, java.util.ArrayList<Claro> claroList)
Reads CLARO configuration registers and compares with mirrored register bits.
-
-
-
Field Detail
-
prefs
java.util.prefs.Preferences prefs
-
sca
ScaDepp sca
The SCA interface
-
sc
Sc sc
-
claros
java.util.ArrayList<Claro> claros
List of CLARO instances
-
nFebs
public static final int nFebs
Number of FEBs per EC per PDMDB
- See Also:
- Constant Field Values
-
nClaros
public static final int nClaros
Number of CLAROs per FEB
- See Also:
- Constant Field Values
-
ec
int ec
The EC ID of this CLARO
-
writeEnable
int writeEnable
GPIO number of the CLARO write enable
-
feb1Enable
int feb1Enable
GPIO number of FEB1 enable
-
feb2Enable
int feb2Enable
GPIO number of FEB2 enable
-
npor
int npor
GPIO number of POR*
-
aldoEnable
int aldoEnable
GPIO number of FEB ALDO enable
-
seud
int seud
GPIO number of CLARO SEUD
-
testEnable
public boolean testEnable
-
-
Method Detail
-
getClaros
public java.util.ArrayList<Claro> getClaros()
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
init
public void init(Sc sc, int ec)
Completes the initialisation of the instance
Call after unmarshalling to complete initialisation.
- Parameters:
sc
- The SCA interfaceec
- The EC ID
-
assertPOR
void assertPOR()
Asserts the EC npor (power on reset) signal.
The level is defined by a pull-up. Sets the GPIO direction to output.
-
deassertPOR
void deassertPOR()
Deasserts the EC npor (power on reset) signal.
The level is defined by a pull-up. Sets the GPIO direction to input.
-
makePanel
public javax.swing.JPanel makePanel()
Convenience method to create a GUI panel
- Returns:
- The panel
-
configure
public boolean configure()
Configures all CLAROs
- Returns:
- Configuration status
-
deselectAllCLARO
public void deselectAllCLARO()
Deselects (SPI) all CLAROs
Puts slave selects into safe deselected state.
-
-