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.

Author:
Paul Bender Copyright (C) 2004

Field Summary
static int ALREADY_CONSISTED
          An add request is not valid for this address because the locomotive is already in a consist.
static int CONSIST_ERROR
          An Error Occured.
static int CONSIST_FULL
          All of the slots available for the consist are full Note: This may not be an error.
static int DELETE_ERROR
          The operation failed because it is not possible to delete the locomotive
static int LOCO_NOT_OPERATED
          The requseted locomotive has not been oerated by this device, or is currently being operated by another device
static int NONZERO_SPEED
          The operation is not valid because the locomotive's speed is not zero.
static int NOT_CONSIST_ADDR
          The operation is not valid because the specified address is not a consist base address
static int NOT_CONSISTED
          A remove request is not valid for this address because the locomotive is not in a consist.
static int NotImplemented
          Constant denoting that the request failed because it requested some unimplemented capability.
static int OK
          Constant denoting that the request completed correctly.
static int OPERATION_SUCCESS
          the Operation Completed successfully.
static int STACK_FULL
          The operation failed because the command station stack is full
 
Method Summary
 void consistReply(DccLocoAddress locoaddress, int status)
          Receive notification at the end of a consisting operation.
 

Field Detail

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:
Constant Field Values

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:
Constant Field Values

OPERATION_SUCCESS

static final int OPERATION_SUCCESS
the Operation Completed successfully.

See Also:
Constant Field Values

CONSIST_ERROR

static final int CONSIST_ERROR
An Error Occured.

See Also:
Constant Field Values

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:
Constant Field Values

LOCO_NOT_OPERATED

static final int LOCO_NOT_OPERATED
The requseted locomotive has not been oerated by this device, or is currently being operated by another device

See Also:
Constant Field Values

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:
Constant Field Values

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:
Constant Field Values

NONZERO_SPEED

static final int NONZERO_SPEED
The operation is not valid because the locomotive's speed is not zero.

See Also:
Constant Field Values

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:
Constant Field Values

DELETE_ERROR

static final int DELETE_ERROR
The operation failed because it is not possible to delete the locomotive

See Also:
Constant Field Values

STACK_FULL

static final int STACK_FULL
The operation failed because the command station stack is full

See Also:
Constant Field Values
Method Detail

consistReply

void consistReply(DccLocoAddress 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.


Copyright © 1997 - 2008 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: SourceForge_Logo