Package cbsw.lhcb.pdmdb
Class Asic
- java.lang.Object
-
- cbsw.lhcb.pdmdb.Asic
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
asic
The ID of this ASIC(package private) Csr
csr
The configuration and status register.(package private) int
ec
The EC ID of this ASIC(package private) int
feb
The FEB ID of this ASIC(package private) I2cIo
i2cIo
The I2C IO interface.(package private) java.lang.String
id
The unique identifier for this ASIC(package private) Sc
sca
The SCA interface
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.String
get(java.lang.String regName)
Reads a register bit-field(package private) Csr
getCsr()
Gets the control and status register.(package private) java.lang.String
getId()
Gets the identifier.(package private) void
init(Sc sca, I2cIo i2cIo)
Completes initialisation of this instance.(package private) void
load()
Writes a byte array to the hardware.(package private) javax.swing.JPanel
makePanel()
Convenience method that makes a GUI panel.(package private) void
put(java.lang.String regName, java.lang.String regValue)
Writes a register bit-field.(package private) <T> void
set(java.lang.String key, T val)
Sets an ASIC register mirror bit-field.(package private) abstract void
setDefaults()
(package private) byte[]
toByteArray()
Returns the current register mirror settings as a byte array.(package private) void
verify()
-
-
-
Constructor Detail
-
Asic
public Asic(AsicType asic)
Constructor called by the unmarshaller via AsicAdapter
- Parameters:
asic
- Unmarshalled data to construct this Asic type.
-
-
Method Detail
-
init
void init(Sc sca, I2cIo i2cIo)
Completes initialisation of this instance.
Call after unmarshalling to complete initialisation.
- Parameters:
sca
- The SCA interface.i2cIo
- The interface to use for I2C transactions.
-
getId
java.lang.String getId()
Gets the identifier.
- Returns:
- The unique indentifier String
-
getCsr
Csr getCsr()
Gets the control and status register.
- Returns:
- The Csr
-
set
<T> void set(java.lang.String key, T val)
Sets an ASIC register mirror bit-field.
The key is treated as a regular expression. All matching registers will be targeted.
- Type Parameters:
T
- The type of the value to set.- Parameters:
key
- The register bit-field key name.val
- The value to set.
-
toByteArray
byte[] toByteArray()
Returns the current register mirror settings as a byte array.
- Returns:
- The byte array containing the settings.
-
makePanel
javax.swing.JPanel makePanel()
Convenience method that makes a GUI panel.
- Returns:
- The panel.
-
put
void put(java.lang.String regName, java.lang.String regValue)
Writes a register bit-field.
- Parameters:
regName
- The register bit-field key nameregValue
- Hex representation of value to write
-
get
java.lang.String get(java.lang.String regName)
Reads a register bit-field
- Parameters:
regName
- The register bit-field key- Returns:
- Hex encoded String register value
-
load
void load()
Writes a byte array to the hardware.
-
verify
void verify()
-
setDefaults
abstract void setDefaults()
-
-