jmri.jmrix.loconet
Class Se8AlmImplementation

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

public class Se8AlmImplementation
extends AbstractAlmImplementation

ALM implementation for the SE8.

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, the addresses are "addresses" in the ALM, based on zero, and "entries" in the throttle, based on 1.

Internally, this stores data as a single address-space vector from 0 to some maximum value, addressed by (block)*4+item or by (SE_NUM)*ENTRYSIZE+item. The item index is 0,1,2,3 for blocks, or 0,1,2,...ENTRYSIZE-1 for addressing with an SE.

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
static int ENTRYSIZE
           
 
Fields inherited from class jmri.jmrix.loconet.AbstractAlmImplementation
mImage, mNumber
 
Constructor Summary
Se8AlmImplementation(int pNumber, boolean pImage)
          Create an object representing the ALM entries for a single SE8 unit
 
Method Summary
 int getACon(int se)
           
 int getALeg(int se)
           
 int getBCon(int se)
           
 int getBLeg(int se)
           
 int getCCon(int se)
           
 int getCLeg(int se)
           
 int getDS(int se)
           
 int getTO(int se)
           
 void noteReadReply(int block)
          Keep a read going if needed
 void noteWriteComplete(int block)
          Keep a write going if needed
 int retrieveBySE(int SE, int item)
          Retrieve using SE index.
 void setACon(int se, int value)
           
 void setALeg(int se, int value)
           
 void setBCon(int se, int value)
           
 void setBLeg(int se, int value)
           
 void setCCon(int se, int value)
           
 void setCLeg(int se, int value)
           
 void setDS(int se, int value)
           
 void setTO(int se, int value)
           
 void storeBySE(int SE, int item, int value)
          Store using SE index.
 void triggerRead(int se)
          Start the process of reading the values for an SE Note that SEs are numbered starting with 1, not zero.
 void triggerWrite(int se)
          Start the process of writing the values for an SE Note that SEs are numbered starting with 1, not zero.
 
Methods inherited from class jmri.jmrix.loconet.AbstractAlmImplementation
message, noteChanged, noteReadCmd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTRYSIZE

public static final int ENTRYSIZE
See Also:
Constant Field Values
Constructor Detail

Se8AlmImplementation

public Se8AlmImplementation(int pNumber,
                            boolean pImage)
Create an object representing the ALM entries for a single SE8 unit

Parameters:
pNumber - Number of this ALM
pImage - Does this appear on LocoNet?
Method Detail

getACon

public int getACon(int se)

getBCon

public int getBCon(int se)

getCCon

public int getCCon(int se)

getALeg

public int getALeg(int se)

getBLeg

public int getBLeg(int se)

getCLeg

public int getCLeg(int se)

getTO

public int getTO(int se)

getDS

public int getDS(int se)

setACon

public void setACon(int se,
                    int value)

setBCon

public void setBCon(int se,
                    int value)

setCCon

public void setCCon(int se,
                    int value)

setALeg

public void setALeg(int se,
                    int value)

setBLeg

public void setBLeg(int se,
                    int value)

setCLeg

public void setCLeg(int se,
                    int value)

setTO

public void setTO(int se,
                  int value)

setDS

public void setDS(int se,
                  int value)

retrieveBySE

public int retrieveBySE(int SE,
                        int item)
Retrieve using SE index. Note that SEs are numbered starting from 1, not 0.


storeBySE

public void storeBySE(int SE,
                      int item,
                      int value)
Store using SE index. Note that SEs are numbered starting from 1, not 0.


noteReadReply

public void noteReadReply(int block)
Keep a read going if needed

Overrides:
noteReadReply in class AbstractAlmImplementation

noteWriteComplete

public void noteWriteComplete(int block)
Keep a write going if needed

Overrides:
noteWriteComplete in class AbstractAlmImplementation

triggerRead

public void triggerRead(int se)
Start the process of reading the values for an SE

Note that SEs are numbered starting with 1, not zero.


triggerWrite

public void triggerWrite(int se)
Start the process of writing the values for an SE

Note that SEs are numbered starting with 1, not zero.



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