Package jmri.jmrix.grapevine
This package handles communications for the ProTrak Grapevine hardware.
Note that the zero Grapevine address is used for error messages, and does not correspond to a node. The nodes have addresses 1 through 127. These are mapped to e.g. GT1 through GT126001 for their first outputs.
Use the Grapevine Simulator connection type to pretend all nodes are present. Simulator was introduced in JMRI 4.11.4.
Grapevine Binary Message Format Summary
Signal (Head)s (Banks 1-3)
b2 (element 1): id + state b4 (element 3): bank + parity bit/id (1 - F = 15 poss.) bank 1 0001 .... .000 1... bank 2 0010 .... .001 0... bank 3 0011 .... .001 1... etc up to parity .... xxxx .111 1... Signal State (7 appearances) Green .... .000 (more colors) Red .... .110
Sensors (bank 4 and 5)
b2 (element 1) : id + state b4 (element 3): bank + parity bit/id (01 - 3F = 63 poss.) bank 4 (new serial) 0100 .... .000 001. bank 5 0101 .... .000 010. .000 011. parity .... xxxx .000 100. - .111 111. Sensor State: (4) Active .... ...0 (4) Inactive .... ...1 (5) Bit States .... 1010 (set of 4 Active/Inactive bits for Parallel Sensors on Bank 5) Sensor Type: Parallel .00. .... Parr. 2nd .10. .... Old Serial ..1. .... (5) Nibble High ...1 .... (5) Nibble Low ...0 .... Special codes: b2 b4 Init1 0x71 0111 0001 Renumber node 0x60 0110 .... Init2 0x73 0111 0011
Examples:
Set Node 3 Signal 2 to Red: 0x03 0x8C 0x03 0x10 + parity Bit 2: 1001 0110 = 0x.. Bit 4: bank 1 = 0x10 Set Node 1 Sensor 2 to Active: 0x01 0x8C 0x01 0x40 + parity Bit 2: 1000 0100 = 0x8C Bit 4: bank 4 = 0x40
Tools
- Node Table: checks for existing nodes by requesting software version
- Node Table Tool to change a node address
- Error handling/reporting - captures address 0 messages
TODO
- SerialLight needs to be updated to work; see SerialTurnout for communications
- Automatically create a SerialNode if a message from an unknown address arrives?
- Update the node type based on info received in response to software version message
- Error handling/reporting - start by capturing address 0 messages
Related Documentation
Other sources of documentation- Since:
- 2.1.1
- See Also:
SerialMessage.staticFormat(int, int, int, int)
-
Interface Summary Interface Description SerialInterface Interface to send/receive serial information.SerialListener Listener interface to be notified about serial traffic -
Class Summary Class Description Bundle GrapevineMenu Create a "Systems" menu containing the Jmri Grapevine-specific tools.GrapevineSystemConnectionMemo Minimum required SystemConnectionMemo for Grapevine.SerialAddress Utility Class supporting parsing and testing of Grapevine addresses.SerialConnectionTypeList Return a list of valid ProTrak (Grapevine) Connection Types.SerialLight Implementation of the Light interface using Grapevine signal ports.SerialLightManager Implement LightManager for Grapevine serial systems.SerialMessage Contains the data payload of a serial packet.SerialNode Models a serial node.SerialPortController Abstract base for classes representing a communications port.SerialReply Contains the data payload of a serial reply packet.SerialSensor Implement Sensor for Grapevine.SerialSensorManager Manage the system-specific Sensor implementation.SerialSignalHead Extend jmri.AbstractSignalHead for grapevine serial signals.SerialTrafficController Convert Stream-based I/O to/from Grapevine serial messages.SerialTurnout Implement Turnout for Grapevine.SerialTurnoutManager Implement turnout manager for Grapevine systems.