Class OlcbCommandStation

java.lang.Object
jmri.jmrix.openlcb.OlcbCommandStation
All Implemented Interfaces:
CommandStation

public class OlcbCommandStation extends Object implements CommandStation
OpenLcb implementation of part of the CommandStation interface.
  • Field Details

  • Constructor Details

  • Method Details

    • 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.
    • getUserName

      public String getUserName()
      Specified by:
      getUserName in interface CommandStation
    • getSystemPrefix

      Specified by:
      getSystemPrefix in interface CommandStation
    • 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