jmri.jmrix.loconet
Class AbstractAlmImplementation

java.lang.Object
  extended by jmri.jmrix.loconet.AbstractAlmImplementation
All Implemented Interfaces:
EventListener, LocoNetListener
Direct Known Subclasses:
Se8AlmImplementation

public abstract class AbstractAlmImplementation
extends Object
implements LocoNetListener

Provide an ALM that lives on the LocoNet.

ALMs work in terms of numbered (indexed) Args, each 14 bits long. These are typically in the SW1, SW2 format, but don't have to be.

This ALM can operate in one of two modes:

LocoNet ALM messages showing a argument value N will show in the throttle editor as N+1. Here, we refer to these as "arguments" and "throttle values". Similarly, device addresses are "addresses" in the ALM, based on zero, and "entries" in the throttle, based on 1.

Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.

Author:
Bob Jacobsen Copyright 2002

Field Summary
protected  boolean mImage
          Does this ALM reply on the LocoNet, or just form an image of an implementation elsewhere?
protected  int mNumber
          What ALM number does this object respond to?
 
Constructor Summary
AbstractAlmImplementation(int pNumber, boolean pImage)
           
 
Method Summary
 void message(LocoNetMessage msg)
          Interpret LocoNet traffic.
 void noteChanged(int block)
          Notify possible subclass that a block has changed.
 void noteReadCmd(int block)
          Notify possible subclass that a read cmd is being handled
 void noteReadReply(int block)
          Notify possible subclass that a read reply is being handled
 void noteWriteComplete(int block)
          Notify possible subclass that a write operation is complete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNumber

protected int mNumber
What ALM number does this object respond to?


mImage

protected boolean mImage
Does this ALM reply on the LocoNet, or just form an image of an implementation elsewhere?

True for image, false for primary implementation on LocoNet

Constructor Detail

AbstractAlmImplementation

public AbstractAlmImplementation(int pNumber,
                                 boolean pImage)
Method Detail

message

public void message(LocoNetMessage msg)
Interpret LocoNet traffic.

Specified by:
message in interface LocoNetListener
Parameters:
msg - Input message

noteChanged

public void noteChanged(int block)
Notify possible subclass that a block has changed.


noteReadCmd

public void noteReadCmd(int block)
Notify possible subclass that a read cmd is being handled


noteReadReply

public void noteReadReply(int block)
Notify possible subclass that a read reply is being handled


noteWriteComplete

public void noteWriteComplete(int block)
Notify possible subclass that a write operation is complete



Copyright © 1997 - 2009 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: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads