Package jmri.jmrix.can.cbus
Class CbusSend
java.lang.Object
jmri.jmrix.can.cbus.CbusSend
Class to send CAN Frames.
Auto adds CBUS priority.
-
Constructor Summary
ConstructorsConstructorDescriptionCbusSend(CanSystemConnectionMemo systemMemo) ConstructorCbusSend(CanSystemConnectionMemo systemMemo, TextAreaFIFO txta) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaRST()Sends a System Reset ARST OPC.voidcANID(int nodeinsetup, int canid) Sends CANID OPC , Teach node a specific CANID.voideNUM(int nodeinsetup) Sends ENUM OPC , Force a self enumeration cycle for use with CAN.voidnERD(int nodeinsetup) Sends NERD OPC , Request to read all node events.voidnNCLR(int nodeinsetup) Sends NNCLR OPC , Clear all events from a node.voidnodeEnterLearnEvMode(int nn) Sends NNLRN OPC , node enter learn mode.voidnodeExitLearnEvMode(int nn) Sends NNULN OPC , node exit learn modevoidSends RQNP OPC , Request Parameters from node in setup.voidnodeSetNodeNumber(int nn) Sends SNN OPC , Set Node Number to Node in Setup.voidnodeTeachEventLearnMode(int newvalnd, int newevent, int varindex, int newval) Sends EVLRN OPC , Event Learn when a node is in learn mode.voidnodeUnlearnEvent(int newvalnd, int newevent) Sends EVULN OPC , Event Unlearn.voidnVRD(int nodeinsetup, int nextnodenv) Sends NVRD OPC , Request read of a node variable.voidnVSET(int nodeinsetup, int nv, int newval) Sends NVSET OPC , Node set individual NV.voidrEVAL(int nodeinsetup, int nextev, int nextevvar) Sends REVAL OPC , Request for read of an event variable.voidrQEVN(int nodeinsetup) Sends RQEVN OPC , Read number of stored events in node.voidrQmn()Sends RQMN OPC , Request name from node.voidrQNPN(int nodeinsetup, int nextnodeparam) Sends RQNPN OPC , Request read of a node parameter by index.voidSends an RSTAT message to request details of any connected command stations.voidSends CanMessage QNN OPC to get all nodes.voidsendWithDelay(CanReply r, Boolean sendReply, Boolean sendMessage, int delay) Sends an outgoing CanMessage or incoming CanReply from a CanReply with a specified delay
-
Constructor Details
-
CbusSend
Constructor- Parameters:
systemMemo- System Connectiontxta- a Text Area for any feedback messages
-
CbusSend
Constructor- Parameters:
systemMemo- System Connection
-
-
Method Details
-
sendWithDelay
Sends an outgoing CanMessage or incoming CanReply from a CanReply with a specified delay- Parameters:
r- A CanReply Can Frame which will be sentsendReply- true to send as incoming CcanReplysendMessage- true to send as outgoing CanMessagedelay- delay in ms
-
nodeExitLearnEvMode
Sends NNULN OPC , node exit learn mode- Parameters:
nn- Node Number
-
nodeEnterLearnEvMode
Sends NNLRN OPC , node enter learn mode.- Parameters:
nn- Node Number
-
nodeSetNodeNumber
Sends SNN OPC , Set Node Number to Node in Setup.- Parameters:
nn- Node Number
-
nodeRequestParamSetup
Sends RQNP OPC , Request Parameters from node in setup. -
nodeTeachEventLearnMode
Sends EVLRN OPC , Event Learn when a node is in learn mode.- Parameters:
newvalnd- event variable nodenewevent- event variable eventvarindex- event variable indexnewval- event variable value
-
nodeUnlearnEvent
Sends EVULN OPC , Event Unlearn. when a node is in learn mode- Parameters:
newvalnd- event variable nodenewevent- event variable event
-
rEVAL
Sends REVAL OPC , Request for read of an event variable.- Parameters:
nodeinsetup- Node Numbernextev- event index numbernextevvar- event variable number
-
rQNPN
Sends RQNPN OPC , Request read of a node parameter by index.- Parameters:
nodeinsetup- Node Numbernextnodeparam- parameter index number
-
searchForNodes
Sends CanMessage QNN OPC to get all nodes. -
searchForCommandStations
Sends an RSTAT message to request details of any connected command stations. Responses are received by the CBUS node table. -
nVRD
Sends NVRD OPC , Request read of a node variable.- Parameters:
nodeinsetup- Node Numbernextnodenv- variable number
-
nVSET
Sends NVSET OPC , Node set individual NV. If (contrary to CBUS spec), the node is required to be in Event Learn Mode before setting a NV, this will be done within this function, assuming that the node is visible to the memo CbusNodeTableDataModel .- Parameters:
nodeinsetup- Node Numbernv- Node variable numbernewval- Node variable number value
-
rQEVN
Sends RQEVN OPC , Read number of stored events in node.nb, NOT max events capable
- Parameters:
nodeinsetup- Node Number
-
nERD
Sends NERD OPC , Request to read all node events.- Parameters:
nodeinsetup- Node Number
-
aRST
Sends a System Reset ARST OPC. Full system reset -
eNUM
Sends ENUM OPC , Force a self enumeration cycle for use with CAN.- Parameters:
nodeinsetup- Node Number
-
cANID
Sends CANID OPC , Teach node a specific CANID.- Parameters:
nodeinsetup- Node Numbercanid- new CAN ID ( min 1, max 99 )
-
nNCLR
Sends NNCLR OPC , Clear all events from a node.Node must be in Learn Mode to take effect
- Parameters:
nodeinsetup- Node Number
-
rQmn
Sends RQMN OPC , Request name from node.Node must be in Setup Mode to take effect
-