Class CbusSlotMonitorDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrix.can.cbus.swing.cbusslotmonitor.CbusSlotMonitorDataModel
- All Implemented Interfaces:
Serializable,EventListener,TableModel,Disposable,AbstractMRListener,CanListener
Table data model for display of CBUS Command Station Sessions and various Tools
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected int(package private) static final int[](package private) static final String[]static intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionCreate a New CbusSlotMonitorDataModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd to Slot Monitor Console Logvoiddispose()disconnect from the CBUSClass<?>getColumnClass(int col) intgetColumnName(int col) Returns String of column name from column int used in table headerintReturn the number of rows to be displayed.getValueAt(int row, int col) booleanisCellEditable(int row, int col) voidCalled when an outgoing message is sent to the CAN Network.voidCalled when an incoming CanFrame is received from the CAN Network.voidvoidsetMaintainLocoSpdMemory(boolean newVal) Set true to maintain a Memory Variable for the speed of each loco.voidsetValueAt(Object value, int row, int col) protected TextAreaFIFOMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.jmrix.can.CanListener
addTc, addTc, removeTc, removeTc
-
Field Details
-
_contype
-
_context
-
CS_TIMEOUT
-
SESSION_ID_COLUMN
- See Also:
-
LOCO_ID_COLUMN
- See Also:
-
ESTOP_COLUMN
- See Also:
-
LOCO_ID_LONG_COLUMN
- See Also:
-
LOCO_COMMANDED_SPEED_COLUMN
- See Also:
-
LOCO_DIRECTION_COLUMN
- See Also:
-
FUNCTION_LIST
- See Also:
-
SPEED_STEP_COLUMN
- See Also:
-
LOCO_CONSIST_COLUMN
- See Also:
-
FLAGS_COLUMN
- See Also:
-
KILL_SESSION_COLUMN
- See Also:
-
LAUNCH_THROTTLE
- See Also:
-
MAX_COLUMN
- See Also:
-
CBUSSLOTMONINITIALCOLS
-
CBUSSLOTMONTOOLTIPS
-
-
Constructor Details
-
CbusSlotMonitorDataModel
Create a New CbusSlotMonitorDataModel. Public access for user scripting.- Parameters:
memo- CAN System Connection to monitor.
-
-
Method Details
-
tablefeedback
-
getRowCount
Return the number of rows to be displayed.- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
- Specified by:
getColumnCountin interfaceTableModel
-
getColumnName
Returns String of column name from column int used in table header- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel- Parameters:
col- int col number
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
setMaintainLocoSpdMemory
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
Description copied from interface:CanListenerCalled when an outgoing message is sent to the CAN Network.- Specified by:
messagein interfaceCanListener- Parameters:
m- outgoing CanMessage
-
reply
Description copied from interface:CanListenerCalled when an incoming CanFrame is received from the CAN Network.- Specified by:
replyin interfaceCanListener- Parameters:
m- incoming cbus CanReply
-
sendcbusestop
-
addToLog
Add to Slot Monitor Console Log- Parameters:
cbuserror- intcbustext- String console message
-
dispose
disconnect from the CBUS- Specified by:
disposein interfaceDisposable
-