Package jmri.jmrix.can.cbus.node
Class CbusNodeCanListener
java.lang.Object
jmri.jmrix.can.cbus.node.CbusNodeCanListener
- All Implemented Interfaces:
EventListener,AbstractMRListener,CanListener
- Direct Known Subclasses:
CbusNodeFromBackup.DoNothingCanListener,CbusSimCanListener
Class to represent a Processing of CAN Frames for a CbusNode.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCbusNodeCanListener(CanSystemConnectionMemo connmemo, CbusBasicNodeWithManagers node) Create a new CbusNodeCanListener -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disconnects from networkvoidProcesses certain outgoing CAN Frames.voidProcesses all incoming and certain outgoing CAN Frames Called when an incoming CanFrame is received from the CAN Network.voidsetParamsFromSetup(int[] setupParams) Temporarily store Node Parameters obtained from a Node requesting a Node NumberMethods 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
-
memo
-
-
Constructor Details
-
CbusNodeCanListener
Create a new CbusNodeCanListener- Parameters:
connmemo- The CAN Connection to listen to.node- The Node
-
-
Method Details
-
message
Processes certain outgoing CAN Frames.We don't know if it's this JMRI instance or something external teaching the node so we monitor them the same Called when an outgoing message is sent to the CAN Network.
- Specified by:
messagein interfaceCanListener- Parameters:
m- the CanMessage being sent.
-
reply
Processes all incoming and certain outgoing CAN Frames Called when an incoming CanFrame is received from the CAN Network.- Specified by:
replyin interfaceCanListener- Parameters:
m- the CanReply being received.
-
setParamsFromSetup
Temporarily store Node Parameters obtained from a Node requesting a Node NumberParameter array is not created until total number of parameters is known. This saves asking the Node for them.
- Parameters:
setupParams- an int array in order of final 7 bytes of the CBUS_PARAMS node response
-
dispose
Disconnects from network
-