Package jmri

Class PushbuttonPacket

  • public class PushbuttonPacket
    extends java.lang.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.
    • Field Summary

      Modifier and Type Field Description
      static java.lang.String CVP_1Bname  
      static java.lang.String CVP_2Bname  
      static java.lang.String NCEname  
      static java.lang.String unknown
      Valid stationary decoder names
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String[] getValidDecoderNames()  
      static byte[] pushbuttonPkt​(java.lang.String prefix, int turnoutNum, boolean locked)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait