Class SprogSlot


public class SprogSlot
extends Object
Represent information for a DCC Command Station Queue entry where each entry is a DCC packet to be transmitted to the rails.

A SlotListener can be registered to hear of changes in this slot. All changes in values will result in notification.

Updated by Andrew Crosland February 2012 to allow slots to hold 28 step speed packets

  • Constructor Summary

    Constructor Description
    SprogSlot​(int num)  
  • Method Summary

    Modifier and Type Method Description
    void clear()  
    void eStop()  
    void f0to4packet​(int address, boolean isLongAddress, boolean f0, boolean f0Momentary, boolean f1, boolean f1Momentary, boolean f2, boolean f2Momentary, boolean f3, boolean f3Momentary, boolean f4, boolean f4Momentary)  
    void f13to20packet​(int address, boolean isLongAddress, boolean f13, boolean f13Momentary, boolean f14, boolean f14Momentary, boolean f15, boolean f15Momentary, boolean f16, boolean f16Momentary, boolean f17, boolean f17Momentary, boolean f18, boolean f18Momentary, boolean f19, boolean f19Momentary, boolean f20, boolean f20Momentary)  
    void f21to28packet​(int address, boolean isLongAddress, boolean f21, boolean f21Momentary, boolean f22, boolean f22Momentary, boolean f23, boolean f23Momentary, boolean f24, boolean f24Momentary, boolean f25, boolean f25Momentary, boolean f26, boolean f26Momentary, boolean f27, boolean f27Momentary, boolean f28, boolean f28Momentary)  
    void f5to8packet​(int address, boolean isLongAddress, boolean f5, boolean f5Momentary, boolean f6, boolean f6Momentary, boolean f7, boolean f7Momentary, boolean f8, boolean f8Momentary)  
    void f9to12packet​(int address, boolean isLongAddress, boolean f9, boolean f9Momentary, boolean f10, boolean f10Momentary, boolean f11, boolean f11Momentary, boolean f12, boolean f12Momentary)  
    int getAddr()  
    boolean getIsLong()  
    long getLastUpdateTime()  
    byte[] getPayload()
    Get the payload of this slot.
    int getRepeat()  
    int getSlotNumber()  
    boolean isActiveAddressMatch​(DccLocoAddress address)  
    boolean isF0to4Packet()  
    boolean isF13to20Packet()  
    boolean isF21to28Packet()  
    boolean isF5to8Packet()  
    boolean isF9to12Packet()  
    boolean isFinished()  
    boolean isForward()  
    boolean isFree()  
    boolean isLongAddress()  
    boolean isOpsPkt()  
    boolean isSpeedPacket()  
    int locoAddr()  
    void set​(int address, byte[] payload, int repeat)
    Set the contents of the slot.
    void setAccessoryPacket​(int address, boolean closed, int repeats)  
    void setAddr​(int a)  
    void setIsLong​(boolean a)  
    void setOps​(int address, boolean longAddr, int cv, int val)  
    void setRepeat​(int r)  
    void setSpeed​(SpeedStepMode mode, int address, boolean isLongAddress, int speed, boolean forward)  
    int slotStatus()  
    int speed()  

    Methods inherited from class java.lang.Object

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