Class CbusSlotMonitorDataModel

    • Method Detail

      • getRowCount

        public int getRowCount()
        Return the number of rows to be displayed.
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
      • getColumnName

        public java.lang.String getColumnName​(int col)
        Returns String of column name from column int used in table header
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
        Parameters:
        col - int col number
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int col)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int col)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int col)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • setMaintainLocoSpdMemory

        public void setMaintainLocoSpdMemory​(boolean newVal)
        Set true to maintain a Memory Variable for the speed of each loco. Note this is an experimental method ( 5.5.5 ) and may be subject to change.

        The Memory System Name is in the form e.g. IM12(S) or IM789(L) i.e. Internal Memory Loco 12, Short address. It may be easier to refer to this Memory in Jython scripts by giving it a User Name.

        The Memory Value is the commanded Loco speed, 0-126. 0 includes a normal stop and e-stop.

        The Value updates whenever a Loco speed command is heard on the connection hence not restricted to this JMRI instance.

        Parameters:
        newVal - true to enable updates, false to stop updates. Default is false, no updates provided.
        Since:
        5.5.5
      • message

        public void message​(CanMessage m)
        Description copied from interface: CanListener
        Called when an outgoing message is sent to the CAN Network.
        Specified by:
        message in interface CanListener
        Parameters:
        m - outgoing CanMessage
      • reply

        public void reply​(CanReply m)
        Description copied from interface: CanListener
        Called when an incoming CanFrame is received from the CAN Network.
        Specified by:
        reply in interface CanListener
        Parameters:
        m - incoming cbus CanReply
      • addToLog

        public void addToLog​(int cbuserror,
                             java.lang.String cbustext)
        Add to Slot Monitor Console Log
        Parameters:
        cbuserror - int
        cbustext - String console message