Package jmri.jmrix.can.cbus.node
Class CbusNode
- Direct Known Subclasses:
CbusDummyNode,CbusNodeFromBackup
Class to represent a node.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intstatic intstatic intFields 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
ConstructorsConstructorDescriptionCbusNode(CanSystemConnectionMemo connmemo, int nodenumber) Create a new CbusNode -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet live update modegetName()Reports just the name, not the user name.intGet Node FlagsGet Module Type Name from a previous NAME OPC response Used when a module type is not identified within JMRI.booleanCANSERVO8C and related modules only accept NV writes in learn mode.Get name of node being resync'edbooleanDO NOT RELY ON, TO BE REMOVED IN FUTURE RELEASE when the NV will automatically be queried if no NVSET is receivedGet a Node User Commentprotected voidnodeOnNetwork(boolean isFound) Set node on networkprotected voidResets NV's, Events and Parametersprotected voidSave module name when Resync is in progress Resync resets all node parameters, etc.voidsetliveUpdate(boolean liveUpdate) Set flag to say node is in live update mode.voidsetNameIfNoName(String newName) Set Node UserName only if UserName not currently set used in RestoreFromFCUvoidsetNodeFlags(int flags) Set the Node FlagsvoidsetNodeNameFromName(String newName) Set Module Type Name Used when a module is not identified within JMRI so the NAME is requested.voidsetnvWriteInLearnOnly(Boolean nvWriteInLearn) CANSERVO8C and related modules only accept NV writes in learn mode.voidsetsendsWRACKonNVSET(Boolean sendsWRACK) DO NOT RELY ON, TO BE REMOVED IN FUTURE RELEASE when the NV will automatically be queried if no NVSET is receivedvoidsetUserComment(String comment) Set a Node User CommenttoString()Custom toString reports the Node Number NameMethods 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, getNewCanListener, 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
-
Field Details
-
SINGLE_MESSAGE_TIMEOUT_TIME
-
BOOT_PROG_TIMEOUT_FAST
-
BOOT_PROG_TIMEOUT_SLOW
-
BOOT_LONG_TIMEOUT_TIME
-
-
Constructor Details
-
CbusNode
Create a new CbusNode- Parameters:
connmemo- The CAN Connection to usenodenumber- The Node Number
-
-
Method Details
-
setNameIfNoName
Set Node UserName only if UserName not currently set used in RestoreFromFCU- Parameters:
newName- UserName of the node
-
getNodeNameFromName
Get Module Type Name from a previous NAME OPC response Used when a module type is not identified within JMRI.- Returns:
- Module type name, NOT prefixed with CAN or ETH, may be empty.
-
setNodeNameFromName
Set Module Type Name Used when a module is not identified within JMRI so the NAME is requested.- Parameters:
newName- The module type name, should NOT be prefixed with CAN or ETH
-
setNodeFlags
Set the Node FlagsBit 0: Consumer Bit 1: Producer Bit 2: FLiM Mode Bit 3: The module supports bootloading Bit 4: The module can consume its own produced events Bit 5: Module is in learn mode - CBUS Spec 6c
- Parameters:
flags- the int value of the flags.
-
getNodeFlags
Get Node FlagsCaptured from a PNN node response
- Returns:
- flags in int form, will need decoding to bit, -1 if unset
-
getResyncName
Get name of node being resync'ed- Returns:
- String node name
-
saveForResync
Save module name when Resync is in progress Resync resets all node parameters, etc. To re0display the NV edit GUI before the resync completes we save a copy of the name of the node. -
resetNodeAll
Resets NV's, Events and Parameters -
getUserComment
Get a Node User Comment- Returns:
- user generated comment string
-
setUserComment
Set a Node User CommentTypically output from JTextArea
If a backup has completed for this session, updates the xml file
- Parameters:
comment- user comment
-
toString
Custom toString reports the Node Number Name -
getName
Reports just the name, not the user name.- Returns:
- string eg "CANPAN"
-
nodeOnNetwork
Set node on network- Parameters:
isFound- false if not on network
-
setsendsWRACKonNVSET
DO NOT RELY ON, TO BE REMOVED IN FUTURE RELEASE when the NV will automatically be queried if no NVSET is received- Parameters:
sendsWRACK- true if sends
-
getsendsWRACKonNVSET
DO NOT RELY ON, TO BE REMOVED IN FUTURE RELEASE when the NV will automatically be queried if no NVSET is received- Returns:
- true if sends WRACK, else false
-
setnvWriteInLearnOnly
CANSERVO8C and related modules only accept NV writes in learn mode. This was used by the MERG FCU to update servo positions in "real time" in response to interaction with the GUI. Call this method to indicate that a node must be in learn mode to support NV writes.- Parameters:
nvWriteInLearn- true if node requires to be in learn mode for NV writes
-
getnvWriteInLearnOnly
CANSERVO8C and related modules only accept NV writes in learn mode. This was used by the MERG FCU to update servo positions in "real time" in response to interaction with the GUI. Call this method to query if a node must be in learn mode to support NV writes.- Returns:
- true if sends WRACK, else false
-
setliveUpdate
Set flag to say node is in live update mode.- Parameters:
liveUpdate- true if in live update mode
-
getliveUpdate
Get live update mode- Returns:
- true in live update
-