Class DigitraxOpSwWordFacade

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

Programmer facade for single index multi-CV access.

Used through the String write/read/confirm interface. Accepts one address format in LOCONETBDOPSWMODE mode only:

  • 115.25.16
    The 115 is the device type (115 is a DS64); 25 is the first OpSw for setting the offset address; 16 is the address to be written. This will write/read 32 bits from the associated Op Switch word.
All others pass through to the next facade or programmer. E.g. 123 will do a write/read/confirm to 123, or some other facade can provide "normal" indexed addressing.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • addressToCommands

    • oneBit

      DigitraxOpSwWordFacade.OpSwCommand oneBit(String typeValue, int swNum, int data, boolean read)
    • writeCV

      public void writeCV(String CV, int val, ProgListener p) throws ProgrammerException
      Description copied from class: AbstractProgrammerFacade
      Perform a CV write in the system-specific manner, and using the specified programming mode.

      Handles a general address space through a String address. Each programmer defines the acceptable formats.

      Note that this returns before the write is complete; you have to provide a ProgListener to hear about completion. For simplicity, expect the return to be on the GUI thread.

      Exceptions will only be thrown at the start, not during the actual programming sequence. A typical exception would be due to an invalid mode (though that should be prevented earlier)

      Specified by:
      writeCV in interface Programmer
      Overrides:
      writeCV in class AbstractProgrammerFacade
      Parameters:
      CV - the CV to write
      val - the value to write
      p - the listener that will be notified of the write
      Throws:
      ProgrammerException - if unable to communicate
    • readCV

      public void readCV(String CV, ProgListener p) throws ProgrammerException
      Description copied from class: AbstractProgrammerFacade
      Perform a CV read in the system-specific manner, and using the specified programming mode.

      Handles a general address space through a String address. Each programmer defines the acceptable formats.

      Note that this returns before the write is complete; you have to provide a ProgListener to hear about completion. For simplicity, expect the return to be on the GUI thread.

      Exceptions will only be thrown at the start, not during the actual programming sequence. A typical exception would be due to an invalid mode (though that should be prevented earlier)

      Specified by:
      readCV in interface Programmer
      Overrides:
      readCV in class AbstractProgrammerFacade
      Parameters:
      CV - the CV to read
      p - the listener that will be notified of the read
      Throws:
      ProgrammerException - if unable to communicate
    • readCV

      public void readCV(String CV, ProgListener p, int val) throws ProgrammerException
      Description copied from interface: Programmer
      Perform a CV read in the system-specific manner, and using the specified programming mode, possibly using a hint of the current value to speed up programming.

      Handles a general address space through a String address. Each programmer defines the acceptable formats.

      On systems that support it, the startVal is a hint as to what the current value of the CV might be (e.g. the value from the roster). This could be verified immediately in direct byte mode to speed up the read process.

      Note that this returns before the write is complete; you have to provide a ProgListener to hear about completion. For simplicity, expect the return to be on the GUI thread.

      Defaults to the normal read method if not overridden in a specific implementation.

      Exceptions will only be thrown at the start, not during the actual programming sequence. A typical exception would be due to an invalid mode (though that should be prevented earlier)

      Specified by:
      readCV in interface Programmer
      Parameters:
      CV - the CV to read
      p - the listener that will be notified of the read
      val - a hint of what the current value might be, or 0
      Throws:
      ProgrammerException - if unable to communicate
    • confirmCV

      public void confirmCV(String CV, int val, ProgListener p) throws ProgrammerException
      Description copied from class: AbstractProgrammerFacade
      Confirm the value of a CV using the specified programming mode. On some systems, this is faster than a read.

      Handles a general address space through a String address. Each programmer defines the acceptable formats.

      Note that this returns before the write is complete; you have to provide a ProgListener to hear about completion. For simplicity, expect the return to be on the GUI thread.

      Exceptions will only be thrown at the start, not during the actual programming sequence. A typical exception would be due to an invalid mode (though that should be prevented earlier)

      Specified by:
      confirmCV in interface Programmer
      Overrides:
      confirmCV in class AbstractProgrammerFacade
      Parameters:
      CV - the CV to confirm
      val - the value to confirm
      p - the listener that will be notified of the confirmation
      Throws:
      ProgrammerException - if unable to communicate
    • useProgrammer

      protected void useProgrammer(ProgListener p) throws ProgrammerException
      Throws:
      ProgrammerException
    • programmingOpReply

      public void programmingOpReply(int value, int status)
      Receive a callback at the end of a programming operation. Note this assumes that there's only one phase to the operation
      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.
    • processProgrammingOpReply

      protected void processProgrammingOpReply(int value, int status)