Package jmri
Interface ConsistListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
ConsistToolFrame
Allow notification of delayed consisting errors.
This file is part of JMRI.
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
FieldsModifier and TypeFieldDescriptionstatic final intAn add request is not valid for this address because the locomotive is already in a consist.static final intAn Error Occurred.static final intAll of the slots available for the consist are full Note: This may not be an error.static final intThe operation failed because it is not possible to delete the locomotivestatic final intThe requested locomotive has not been operated by this device, or is currently being operated by another devicestatic final intThe operation is not valid because the locomotive's speed is not zero.static final intThe operation is not valid because the specified address is not a consist base addressstatic final intA remove request is not valid for this address because the locomotive is not in a consist.static final intConstant denoting that the request failed because it requested some unimplemented capability.static final intConstant denoting that the request completed correctly.static final intthe Operation Completed successfully.static final intThe operation failed because the command station stack is full -
Method Summary
Modifier and TypeMethodDescriptionvoidconsistReply(LocoAddress locoaddress, int status) Receive notification at the end of a consisting operation.
-
Field Details
-
OK
Constant denoting that the request completed correctly. Note this is a specific value; all others are bitwise combinations- See Also:
-
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
the Operation Completed successfully.- See Also:
-
CONSIST_ERROR
An Error Occurred.- See Also:
-
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
The requested locomotive has not been operated by this device, or is currently being operated by another device- See Also:
-
ALREADY_CONSISTED
An add request is not valid for this address because the locomotive is already in a consist.- See Also:
-
NOT_CONSISTED
A remove request is not valid for this address because the locomotive is not in a consist.- See Also:
-
NONZERO_SPEED
The operation is not valid because the locomotive's speed is not zero.- See Also:
-
NOT_CONSIST_ADDR
The operation is not valid because the specified address is not a consist base address- See Also:
-
DELETE_ERROR
The operation failed because it is not possible to delete the locomotive- See Also:
-
STACK_FULL
The operation failed because the command station stack is full- See Also:
-
-
Method Details
-
consistReply
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.
-