Package jmri

Interface ConsistListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
ConsistToolFrame

public interface ConsistListener extends EventListener
Allow notification of delayed consisting errors.

This allows a Consist object to return delayed status.


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.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    An add request is not valid for this address because the locomotive is already in a consist.
    static final int
    An Error Occurred.
    static final int
    All of the slots available for the consist are full Note: This may not be an error.
    static final int
    The operation failed because it is not possible to delete the locomotive
    static final int
    The requested locomotive has not been operated by this device, or is currently being operated by another device
    static final int
    The operation is not valid because the locomotive's speed is not zero.
    static final int
    The operation is not valid because the specified address is not a consist base address
    static final int
    A remove request is not valid for this address because the locomotive is not in a consist.
    static final int
    Constant denoting that the request failed because it requested some unimplemented capability.
    static final int
    Constant denoting that the request completed correctly.
    static final int
    the Operation Completed successfully.
    static final int
    The operation failed because the command station stack is full
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    consistReply(LocoAddress locoaddress, int status)
    Receive notification at the end of a consisting operation.
  • Field Details

    • OK

      static final int OK
      Constant denoting that the request completed correctly. Note this is a specific value; all others are bitwise combinations
      See Also:
    • NotImplemented

      static final int NotImplemented
      Constant denoting that the request failed because it requested some unimplemented capability. Note that this can also result in an exception during the original request; which happens is implementation dependent
      See Also:
    • OPERATION_SUCCESS

      static final int OPERATION_SUCCESS
      the Operation Completed successfully.
      See Also:
    • CONSIST_ERROR

      static final int CONSIST_ERROR
      An Error Occurred.
      See Also:
    • CONSIST_FULL

      static final int CONSIST_FULL
      All of the slots available for the consist are full Note: This may not be an error. If the last locomotive added to the consist caused the number of units in the consist to equal the size limit, the value returned to the listeners should be OPERATION_SUCCESS | CONSIST_FULL. To indicate an error, send CONSIST_ERROR | CONSIST_FULL, and to send an information message, just send CONSIST_FULL
      See Also:
    • LOCO_NOT_OPERATED

      static final int LOCO_NOT_OPERATED
      The requested locomotive has not been operated by this device, or is currently being operated by another device
      See Also:
    • ALREADY_CONSISTED

      static final int ALREADY_CONSISTED
      An add request is not valid for this address because the locomotive is already in a consist.
      See Also:
    • NOT_CONSISTED

      static final int NOT_CONSISTED
      A remove request is not valid for this address because the locomotive is not in a consist.
      See Also:
    • NONZERO_SPEED

      static final int NONZERO_SPEED
      The operation is not valid because the locomotive's speed is not zero.
      See Also:
    • NOT_CONSIST_ADDR

      static final int NOT_CONSIST_ADDR
      The operation is not valid because the specified address is not a consist base address
      See Also:
    • DELETE_ERROR

      static final int DELETE_ERROR
      The operation failed because it is not possible to delete the locomotive
      See Also:
    • STACK_FULL

      static final int STACK_FULL
      The operation failed because the command station stack is full
      See Also:
  • Method Details

    • consistReply

      void consistReply(LocoAddress locoaddress, int status)
      Receive notification at the end of a consisting operation.
      Parameters:
      locoaddress - Address of specific locomotive involved, if error is locomotive specific.
      status - Denotes the completion code. Note that this is a bitwise combination of the various status coded defined in this interface.