jmri.jmrit
Class AbstractIdentify

java.lang.Object
  extended by jmri.jmrit.AbstractIdentify
All Implemented Interfaces:
EventListener, ProgListener
Direct Known Subclasses:
IdentifyDecoder, IdentifyLoco

public abstract class AbstractIdentify
extends Object
implements ProgListener

Abstract base for common code of IdentifyLoco and IdentifyDecoder, the two classes that use a programmer to match Roster entries to what's on the programming track.

Author:
Bob Jacobsen Copyright (C) 2001
See Also:
IdentifyDecoder, IdentifyLoco

Field Summary
 
Fields inherited from interface jmri.ProgListener
ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, UnknownError, UserAborted
 
Constructor Summary
AbstractIdentify()
           
 
Method Summary
protected abstract  void error()
          Abstract routine to notify of errors
protected  void identifyDone()
          Stop the identification state machine.
 boolean isRunning()
          To check if running now
 void programmingOpReply(int value, int status)
          Internal method to handle the programmer callbacks, e.g. when a CV read request terminates.
protected  void readCV(int cv)
          Access a single CV for the next step
 void start()
          Start the identification state machine.
protected abstract  void statusUpdate(String status)
          Update the status field (if any).
abstract  boolean test1()
           
abstract  boolean test2(int value)
           
abstract  boolean test3(int value)
           
abstract  boolean test4(int value)
           
abstract  boolean test5(int value)
           
abstract  boolean test6(int value)
           
abstract  boolean test7(int value)
           
abstract  boolean test8(int value)
           
protected  void writeCV(int cv, int value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIdentify

public AbstractIdentify()
Method Detail

test1

public abstract boolean test1()

test2

public abstract boolean test2(int value)

test3

public abstract boolean test3(int value)

test4

public abstract boolean test4(int value)

test5

public abstract boolean test5(int value)

test6

public abstract boolean test6(int value)

test7

public abstract boolean test7(int value)

test8

public abstract boolean test8(int value)

statusUpdate

protected abstract void statusUpdate(String status)
Update the status field (if any). Invoked with "Done" when the results are in.


start

public void start()
Start the identification state machine.


identifyDone

protected void identifyDone()
Stop the identification state machine. This also stops the identification process. Its invoked when a testN returns true; that routine should _not_ have invoked a read or write that will result in a callback.


programmingOpReply

public void programmingOpReply(int value,
                               int status)
Internal method to handle the programmer callbacks, e.g. when a CV read request terminates. Each will reduce (if possible) the list of consistent decoders, and starts the next step.

Specified by:
programmingOpReply in interface ProgListener
Parameters:
value - Value from a read operation, or value written on a write
status - Denotes the completion code. Note that this is a bitwise combination of the various status coded defined in this interface.

error

protected abstract void error()
Abstract routine to notify of errors


isRunning

public boolean isRunning()
To check if running now


readCV

protected void readCV(int cv)
Access a single CV for the next step


writeCV

protected void writeCV(int cv,
                       int value)


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