Class DigitraxOpSwWordFacade
- All Implemented Interfaces:
EventListener,Disposable,ProgListener,Programmer
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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static enumNested classes/interfaces inherited from interface jmri.Programmer
Programmer.Configurator, Programmer.WriteConfirmMode -
Field Summary
FieldsModifier and TypeFieldDescription(package private) String(package private) int(package private) int(package private) int(package private) Deque<DigitraxOpSwWordFacade.OpSwCommand>static int(package private) int(package private) int(package private) int(package private) DigitraxOpSwWordFacade.ProgState(package private) StringFields inherited from class jmri.jmrix.AbstractProgrammerFacade
progFields inherited from interface jmri.ProgListener
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) List<DigitraxOpSwWordFacade.OpSwCommand>addressToCommands(String typeValue, int address) voidconfirmCV(String CV, int val, ProgListener p) Confirm the value of a CV using the specified programming mode.(package private) DigitraxOpSwWordFacade.OpSwCommandprotected voidprocessProgrammingOpReply(int value, int status) voidprogrammingOpReply(int value, int status) Receive a callback at the end of a programming operation.voidreadCV(String CV, ProgListener p) Perform a CV read in the system-specific manner, and using the specified programming mode.voidreadCV(String CV, ProgListener p, int val) 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.protected voidvoidwriteCV(String CV, int val, ProgListener p) Perform a CV write in the system-specific manner, and using the specified programming mode.Methods inherited from class jmri.jmrix.AbstractProgrammerFacade
addPropertyChangeListener, decodeErrorCode, getCanRead, getCanRead, getCanWrite, getCanWrite, getMode, getSupportedModes, getWriteConfirmMode, removePropertyChangeListener, setModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.Programmer
dispose, getConfigurator, notifyProgListenerEnd
-
Field Details
-
_cv
-
_val
int _val -
state
-
accumulator
int accumulator -
typeValue
-
pageAddress
int pageAddress -
pageNumber
int pageNumber -
commands
-
offsetConstant
int offsetConstant -
accumulation
int accumulation -
delayInterval
-
-
Constructor Details
-
DigitraxOpSwWordFacade
- Parameters:
prog- the programmer this facade is attached to
-
-
Method Details
-
addressToCommands
-
oneBit
-
writeCV
Description copied from class:AbstractProgrammerFacadePerform 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:
writeCVin interfaceProgrammer- Overrides:
writeCVin classAbstractProgrammerFacade- Parameters:
CV- the CV to writeval- the value to writep- the listener that will be notified of the write- Throws:
ProgrammerException- if unable to communicate
-
readCV
Description copied from class:AbstractProgrammerFacadePerform 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:
readCVin interfaceProgrammer- Overrides:
readCVin classAbstractProgrammerFacade- Parameters:
CV- the CV to readp- the listener that will be notified of the read- Throws:
ProgrammerException- if unable to communicate
-
readCV
Description copied from interface:ProgrammerPerform 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:
readCVin interfaceProgrammer- Parameters:
CV- the CV to readp- the listener that will be notified of the readval- a hint of what the current value might be, or 0- Throws:
ProgrammerException- if unable to communicate
-
confirmCV
Description copied from class:AbstractProgrammerFacadeConfirm 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:
confirmCVin interfaceProgrammer- Overrides:
confirmCVin classAbstractProgrammerFacade- Parameters:
CV- the CV to confirmval- the value to confirmp- the listener that will be notified of the confirmation- Throws:
ProgrammerException- if unable to communicate
-
useProgrammer
- Throws:
ProgrammerException
-
programmingOpReply
Receive a callback at the end of a programming operation. Note this assumes that there's only one phase to the operation- Specified by:
programmingOpReplyin interfaceProgListener- Parameters:
value- Value from a read operation, or value written on a writestatus- Denotes the completion code. Note that this is a bitwise combination of the various status coded defined in this interface.
-
processProgrammingOpReply
-