Class RegisterIoTable

java.lang.Object
cbsw.RegisterIoTable

public class RegisterIoTable extends Object

A GUI display that tabulates data read through a RegisterIo interface

  • Field Details

    • 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

      public String getTitle()

      Returns the table title

      Returns:
      The title
    • init

      public void init(RegisterIo io)

      Called after unmarshalling to complete initialisation

      Parameters:
      io - The hardware I/O interface
    • getStatusTable

      @Deprecated public JTable getStatusTable()
      Deprecated.

      Replaced by getTable()

      Returns:
      The table
    • getTable

      public JTable getTable()

      Returns the table

      Returns:
      The table
    • makePanel

      public JPanel makePanel()

      Creates a panel containing the table

      Returns:
      The panel
    • setCsr

      public void setCsr(Csr csr)

      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

      public void addDecodeAction(ActionListener al)

      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

      @Deprecated public void updateStatusTable()
      Deprecated.

      Replaced by updateTable()

    • updateTable

      public void updateTable()

      Update table from previously cached data

    • makePanel

      public static JPanel makePanel(ArrayList<RegisterIoTable> tableList)

      Creates a panel containing all the unmarshalled tables

      Parameters:
      tableList - The list of tables
      Returns:
      The panel