Package jmri

Interface ConsistManager

All Known Implementing Classes:
AbstractConsistManager, CbusConsistManager, DccConsistManager, EasyDccConsistManager, InternalConsistManager, JsonConsistManager, LocoNetConsistManager, MqttConsistManager, NceConsistManager, NmraConsistManager, TmccConsistManager, WiFiConsistManager, XNetConsistManager

public interface ConsistManager
Interface for Consist Manager objects, which provide access to the existing Consists and allows for creation and destruction.
This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  • Method Details

    • getConsist

      Find a Consist with this consist address, and return it. If the Consist doesn't exist, create it.
      Parameters:
      address - the consist address
      Returns:
      an existing or new consist
    • delConsist

      void delConsist(LocoAddress address)
      Remove an old Consist.
      Parameters:
      address - the consist address
    • isCommandStationConsistPossible

      Does this implementation support Command Station Consists?
      Returns:
      true if command station consists are supported; false otherwise
    • csConsistNeedsSeperateAddress

      Does a command station consist require a separate consist address from locomotives in consist?
      Returns:
      true is command station consist requires separate address; false otherwise
    • getConsistList

      Get a list of known consist addresses.
      Returns:
      list of addresses
    • decodeErrorCode

      String decodeErrorCode(int errorCode)
      Translate Error Codes relieved by a consistListener into Strings
      Parameters:
      errorCode - the code
      Returns:
      the description
    • requestUpdateFromLayout

      Request an update from the layout, loading Consists from the command station.
    • isAdvancedConsistPossible

      default boolean isAdvancedConsistPossible()
      Does this ConsistManager allow advanced consisting?
      Returns:
      true if this manager's protocols support DCC advanced consisting
    • isSingleFormConsistRequired

      default boolean isSingleFormConsistRequired()
      Does this ConsistManager require that all locomotives in a consist use the same protocol?
      Returns:
      true if this manager requires that all locomotives in a consist use the same protocol
    • addConsistListListener

      Register a ConsistListListener object with this ConsistManager
      Parameters:
      listener - a Consist List Listener object.
    • removeConsistListListener

      Remove a ConsistListListener object with this ConsistManager
      Parameters:
      listener - a Consist List Listener object.
    • notifyConsistListChanged

      Notify the registered ConsistListListener objects that the ConsistList has changed.
    • canBeDisabled

      default boolean canBeDisabled()
      Can this consist manager be disabled?
      Returns:
      true if the manager can be disabled, false otherwise
    • registerEnableListener

      Register a listener that is called if this manager is enabled or disabled.
      Parameters:
      listener - the listener
    • unregisterEnableListener

      Unregister a listener that is called if this manager is enabled or disabled.
      Parameters:
      listener - the listener
    • isEnabled

      default boolean isEnabled()
      Check if this manager is enabled
      Returns:
      true if enabled