Class OlcbCommandStation

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSystemPrefix()  
      java.lang.String getUserName()  
      void sendAccSignalDecoderPkt​(int address, int aspect, int count)
      As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send Accessory Signal Decoder Packets.
      void sendAltAccSignalDecoderPkt​(int address, int aspect, int count)
      As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send the alternate form of Accessory Signal Decoder Packets.
      boolean sendPacket​(byte[] packet, int repeats)
      OpenLCB/LCC does not have a complete, generic process for commanding that a generic DCC packet be sent to the rails.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sendPacket

        public boolean sendPacket​(byte[] packet,
                                  int repeats)
        OpenLCB/LCC does not have a complete, generic process for commanding that a generic DCC packet be sent to the rails.

        For now, this method just logs an error when invokved

        Specified by:
        sendPacket in interface CommandStation
        Parameters:
        packet - Byte array representing the packet, including the error-correction byte. Must not be null.
        repeats - Number of times to repeat the transmission, capped at 9
        Returns:
        true if the operation succeeds, false otherwise.
      • sendAccSignalDecoderPkt

        public void sendAccSignalDecoderPkt​(int address,
                                            int aspect,
                                            int count)
        Description copied from interface: CommandStation
        As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send Accessory Signal Decoder Packets.

        It's equivalent to calling NmraPacket.accSignalDecoderPkt(int, int) and sending the resulting packet to the rails

        Specified by:
        sendAccSignalDecoderPkt in interface CommandStation
        Parameters:
        address - The DCC signal decoder address to use
        aspect - The signal aspect to send
        count - the number of times to repeat the send
      • sendAltAccSignalDecoderPkt

        public void sendAltAccSignalDecoderPkt​(int address,
                                               int aspect,
                                               int count)
        Description copied from interface: CommandStation
        As a shortcut, and to allow for command station types that cannot sent generic packets to the rails, we provide this method to specifically send the alternate form of Accessory Signal Decoder Packets.

        It's equivalent to calling NmraPacket.altAccSignalDecoderPkt(int, int) and sending the resulting packet to the rails

        Specified by:
        sendAltAccSignalDecoderPkt in interface CommandStation
        Parameters:
        address - The DCC signal decoder address to use
        aspect - The signal aspect to send
        count - the number of times to repeat the send