CBUS Console Tool
JMRI provides a communications monitor window so you can see what's happening on the communications link between the program and the layout CBUS.
Once you open a CBUS Monitor window, it will automatically
display all traffic on the link in the two sections at the
top of the window.
The left part contains the raw CAN frames. The right part interprets their CBUS meaning.
Logging To A FileSometimes, it's helpful to capture what's happening. For example, you might encounter a bug (!!), and want to send a copy of what's happening to the people who are trying to fix it.
Small amounts of data can be copied from the log window with your computers "copy" command (e.g. ctrl-C or cmd-C), and then pasted into an email.
If you want to capture more, you can have the window write a log file on your computer's disk. To do this:
- Click "Choose log file". A file-chooser window will open. Navigate to where you want to store the file, enter a name for the new log file, and click "Save". Note that if you pick a file that already exists, it will be overwritten.
- When you're ready to capture the data you want, click "Start logging" on the monitor window.
- When you're done, click "Stop logging" to store the data and close the file.
- Clear Screen
- Erases the log area at the top of the screen.
- Freeze Screen
- Stops acquiring new information, so that the captured information stops scrolling up.
- Show timestamps
- Normally, the program just displays the data from the communication link. If you'd like each message to be preceded by the time it was sent or received, check this box.
- Show priorities
- If you'd like each message to be preceded by the CBUS priorities used in sending the message, check this box.
- Add Message
- If you'd like to annotate the message log with your own comments, Enter a comment and click the Add message button.
Packet StatisticsThis part of the window shows the number of CBUS packets received and transmitted and controls the format of the display.
- Resets the packet counts to zero.
- Decimal Data Entry/Display
- Normally, the Console window displays data in hexadecimal and treats data entered as hexadecimal. To change the default to decimal, check this box.
Most Recently Received PacketThis displays the most recent packet received from the layout. The individual elements displayed are dynamic and minor priority, the first data byte which is the CBUS opcode and the remaining, up to seven, data bytes.
- Copies the most recently received packet into the send packet data fields.
Send PacketIt the bottom part of the Console, you can construct a packet to be sent to the layout. For normal operation, do not edit the preloaded values in the dynamic and normal priority fields.
Enter the opcode and the correct number of data bytes (depending upon the opcode).
If the decimal data entry/display checkbox is not selected then data entry will, by default, be treated as hexadecimal. If the decimal data entry/display checkbox is selected then data entry will, by default, be treated as hexadecimal.
At any time, you may force data entered to be treated as hexadecimal, decimal or binary by adding a "0x", "0d" or "0b" prefix. For example "0x20", "0d32" and "0b00100000" all donate a decimal value of 32.
Additionally, when the decimal data entry/display checkbox is not selected (hexadecimal mode), any value with three or more digits will be treated as binary. When the decimal data entry/display checkbox is selected (decimal mode), any value with four or more digits will be treated as binary.
- Checks the packet entered and sends it to the layout or reports any error condition detected (e.g. the number of data bytes does not match the opcode).
- Clears the data entry fields and preloads the priority values.