Package jmri.jmrix.can.cbus.node
Class CbusNodeFromBackup
java.lang.Object
jmri.jmrix.can.cbus.node.CbusBasicNode
jmri.jmrix.can.cbus.node.CbusBasicNodeWithManagers
jmri.jmrix.can.cbus.node.CbusBasicNodeWithMgrsCommandStation
jmri.jmrix.can.cbus.node.CbusNode
jmri.jmrix.can.cbus.node.CbusNodeFromBackup
- All Implemented Interfaces:
Comparable<CbusNodeFromBackup>
Class to represent a node imported from FCU file or CbusNodeXml.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classIgnores Incoming and Outgoing CAN Frames. -
Field Summary
Fields inherited from class jmri.jmrix.can.cbus.node.CbusNode
BOOT_LONG_TIMEOUT_TIME, BOOT_PROG_TIMEOUT_FAST, BOOT_PROG_TIMEOUT_SLOW, SINGLE_MESSAGE_TIMEOUT_TIMEFields inherited from class jmri.jmrix.can.cbus.node.CbusBasicNodeWithManagers
_fwBuild, _fwMaj, _fwMinFields inherited from class jmri.jmrix.can.cbus.node.CbusBasicNode
_listeners, _memo, send -
Constructor Summary
ConstructorsConstructorDescriptionCbusNodeFromBackup(CanSystemConnectionMemo connmemo, int nodenumber) Create a new CbusNodeFrommBackup by connection type and Node NumberCbusNodeFromBackup(CbusNode node, Date timeStamp) Create a new CbusNodeFrommBackup from an existing Node -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBupEvent(int nn, int en, String evVars) Add an event to the Node in backup formatintCompares to the Time Date Stamp of the BackupcompareWithString(CbusNodeFromBackup toTest) Get a String comparison with another CbusNodeFromBackupbooleanGet the Backup Comment eg.Get the Backup ResultGet the Backup DateTimeintGet a Hashcode for the Event ArrayIgnores incoming and outgoing CAN FramesinthashCode()voidsetBackupComment(String backupComment) Set the backup commentprotected final voidSet the Backup Resultprotected voidsetBackupTimeStamp(Date thisDate) Set the Backup DateTimetoString()toString reports the Node Number Name and backup timestampMethods inherited from class jmri.jmrix.can.cbus.node.CbusNode
getliveUpdate, getName, getNodeFlags, getNodeNameFromName, getnvWriteInLearnOnly, getResyncName, getsendsWRACKonNVSET, getUserComment, nodeOnNetwork, resetNodeAll, saveForResync, setliveUpdate, setNameIfNoName, setNodeFlags, setNodeNameFromName, setnvWriteInLearnOnly, setsendsWRACKonNVSET, setUserCommentMethods inherited from class jmri.jmrix.can.cbus.node.CbusBasicNodeWithMgrsCommandStation
getCsNum, getStatResponseFlagsAccurate, setCsFlags, setCsNum, setStatResponseFlagsAccurateMethods inherited from class jmri.jmrix.can.cbus.node.CbusBasicNodeWithManagers
dispose, getCanListener, getNodeBackupManager, getNodeEventManager, getNodeNvManager, getNodeParamManager, getNodeStats, getNodeTimerManager, getPnnManufacturer, getPnnModule, getTableModel, getUserName, setFW, setManuModule, setTableModel, setUserNameMethods inherited from class jmri.jmrix.can.cbus.node.CbusBasicNode
addPropertyChangeListener, getMemo, getNodeCanId, getNodeInFLiMMode, getNodeInLearnMode, getNodeInSetupMode, getNodeNumber, notifyPropertyChangeListener, removePropertyChangeListener, setCanId, setCanId, setNodeInFLiMMode, setNodeInLearnMode, setNodeInSetupMode, setNodeNumber
-
Constructor Details
-
CbusNodeFromBackup
Create a new CbusNodeFrommBackup by connection type and Node Number- Parameters:
connmemo- CAN Connectionnodenumber- Node Number between 1 and 65535
-
CbusNodeFromBackup
Create a new CbusNodeFrommBackup from an existing Node- Parameters:
node- The Node to make a copy oftimeStamp- to set the Backup TimeStamp
-
-
Method Details
-
getNewCanListener
Ignores incoming and outgoing CAN Frames- Overrides:
getNewCanListenerin classCbusBasicNodeWithManagers
-
setBackupTimeStamp
Set the Backup DateTime- Parameters:
thisDate- Timestamp
-
getBackupTimeStamp
Get the Backup DateTime- Returns:
- DateTime in format
-
setBackupResult
Set the Backup Result- Parameters:
type- Backup Type Enum
-
getBackupResult
Get the Backup Result- Returns:
- enum
-
setBackupComment
Set the backup comment- Parameters:
backupComment- text representation of the single backup state
-
getBackupComment
Get the Backup Comment eg. Completed No Issues, 9 NVs, 12 Events with 4 EVs- Returns:
- index number, -1 if unset
-
addBupEvent
Add an event to the Node in backup format- Parameters:
nn- Event Node Numberen- Event Event NumberevVars- Event Variable Hex String eg. "0102DC3AFF"
-
compareWithString
Get a String comparison with another CbusNodeFromBackup- Parameters:
toTest- The CbusNodeFromBackup to test against- Returns:
- eg. "Parameters Changed"
-
compareTo
Compares to the Time Date Stamp of the Backup- Specified by:
compareToin interfaceComparable<CbusNodeFromBackup>
-
equals
Used for highlighting changes to Node Backups, so the Date Time Stamp does NOT need to be equal. checking for Node Number, Parameters, NVs, Events. Events can be in any order, are sorted mid comparison.
-
hashCode
-
getEventArrayHash
Get a Hashcode for the Event Array- Returns:
- 0 if event array null
-
toString
toString reports the Node Number Name and backup timestamp
-