Class RegisterIoTable
java.lang.Object
cbsw.RegisterIoTable
A GUI display that tabulates data read through a RegisterIo interface
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) Csr(package private) int(package private) byte[](package private) int(package private) JButton(package private) JTextField(package private) RegisterIo(package private) JPanel(package private) JTable(package private) String[](package private) Object[][](package private) int(package private) JScrollPane(package private) String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a decode ActionListenervoidcache()Reads the register array from hardware into local cache.voidDecode the register data using the Csr descriptors for all registers matching the filter.byte[]getCache()Returns the cache.Deprecated.getTable()Returns the tablegetTitle()Returns the table titlevoidinit(RegisterIo io) Called after unmarshalling to complete initialisationCreates a panel containing the tablestatic JPanelmakePanel(ArrayList<RegisterIoTable> tableList) Creates a panel containing all the unmarshalled tablesvoidAssociate a Csr with this table and adds a Decode button.voidDeprecated.voidUpdate table from previously cached datavoidwriteArray(byte[] regs) Writes cached values to hardware
-
Field Details
-
io
RegisterIo io -
title
String title -
baseAddress
int baseAddress -
csrAddress
int csrAddress -
csrSize
int csrSize -
tableDataDisplayWidth
int tableDataDisplayWidth -
tableColumnNames
String[] tableColumnNames -
tableData
Object[][] tableData -
tableSP
JScrollPane tableSP -
table
JTable table -
csr
Csr csr -
csrCache
byte[] csrCache -
panel
JPanel panel -
decodeButton
JButton decodeButton -
filterTF
JTextField filterTF
-
-
Constructor Details
-
RegisterIoTable
public RegisterIoTable()No-argument constructor used by unmarshaller
-
-
Method Details
-
getTitle
-
init
Called after unmarshalling to complete initialisation
- Parameters:
io- The hardware I/O interface
-
getStatusTable
-
getTable
-
makePanel
-
setCsr
Associate a Csr with this table and adds a Decode button.
- Parameters:
csr- The Csr
-
decodeWithFilter
public void decodeWithFilter()Decode the register data using the Csr descriptors for all registers matching the filter.
-
addDecodeAction
Add a decode ActionListener
The ActionListener is called when the decode button is pressed.
- Parameters:
al- The ActionListener
-
writeArray
public void writeArray(byte[] regs) Writes cached values to hardware
- Parameters:
regs- Data to write
-
cache
public void cache()Reads the register array from hardware into local cache.
-
getCache
public byte[] getCache()Returns the cache.
- Returns:
- The data cache
-
updateStatusTable
-
updateTable
public void updateTable()Update table from previously cached data
-
makePanel
Creates a panel containing all the unmarshalled tables
- Parameters:
tableList- The list of tables- Returns:
- The panel
-