Package jmri

Class PushbuttonPacket

java.lang.Object
jmri.PushbuttonPacket

public class PushbuttonPacket extends Object
Generates an NMRA packet containing the correct payload to enable or disable pushbutton lockout. Currently supports the following Decoders NCE CVP AD4 NCE is the easiest to implement, CV556 = 0 disable lockout, CV556 = 1 enable lockout CVP is a bit tricker, CV514 controls the lockout for four turnouts. Each turnout can have one or two button controls. Therefore the user must specify if they are using one or two buttons for each turnout. From the CVP user manual: Function CV514 Lock all inputs 0 Unlock 1 1 Unlock 2 4 Unlock 3 16 Unlock 4 64 Unlock all 85 Enable 2 button 255 This routine assumes that for two button operations the following table is true: Lock all inputs 0 Unlock 1 3 Unlock 2 12 Unlock 3 48 Unlock 4 192 Unlock all 255 Each CVP can operate up to four turnouts, lucky for us, they are sequential. Also note that CVP decoder's use the old legacy format for ops mode programming.