Class ResettingOffsetHighCvProgrammerFacade

java.lang.Object
jmri.jmrix.AbstractProgrammerFacade
jmri.implementation.ResettingOffsetHighCvProgrammerFacade
All Implemented Interfaces:
EventListener, ProgListener, Programmer

public class ResettingOffsetHighCvProgrammerFacade
extends AbstractProgrammerFacade
implements ProgListener
Programmer facade, at this point just an example.

This is for decoders that have an alternate high-CV access method for command stations that can't address all 1024. It falls back to that mode if the CS can't directly address an requested CV address. In the fall back, CVs from 0 to "top" are addressed directly. Above the top CV, the upper part of the address is written to a specific CV, followed by an operation to just the lower part of the address. The upper and lower parts are calculated using a supplied modulus, e.g. 100, and an indicator value that's added in. Finally, the specific CV is reset to zero to end the offset operation.

For example, to write the value N to CV xyy, this will do (modulo = 100, indicator = 200):

  • Write 200+x*10 to CV7 where 10 is cvFactor, 200 is indicator and 7 is addrCV
  • Write N to CVyy
  • Write 0 to CV7

This method is used by some Zimo decoders

See Also:
ProgrammerFacadeSelector