Package jmri.jmris
Class AbstractProgrammerServer
- java.lang.Object
-
- jmri.jmris.AbstractProgrammerServer
-
- All Implemented Interfaces:
java.util.EventListener
,ProgListener
- Direct Known Subclasses:
JmriSRCPProgrammerServer
public abstract class AbstractProgrammerServer extends java.lang.Object implements ProgListener
Abstract interface between the a JMRI Programmer and a network connectionConnects to default global programmer at construction time.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
lastCV
-
Fields inherited from interface jmri.ProgListener
CommError, ConfirmFailed, FailedTimeout, NoAck, NoLocoDetected, NotImplemented, OK, ProgrammerBusy, ProgrammingShort, SequenceError, UnknownError, UserAborted
-
-
Constructor Summary
Constructors Constructor Description AbstractProgrammerServer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
dispose()
protected Programmer
getProgrammer()
abstract void
parseRequest(java.lang.String statusString)
void
programmingOpReply(int value, int status)
Receive a callback at the end of a programming operation.void
readCV(ProgrammingMode mode, int CV)
abstract void
sendNotAvailableStatus()
abstract void
sendStatus(int CV, int value, int status)
void
writeCV(ProgrammingMode mode, int CV, int value)
-
-
-
Field Detail
-
lastCV
protected int lastCV
-
-
Constructor Detail
-
AbstractProgrammerServer
public AbstractProgrammerServer()
-
-
Method Detail
-
getProgrammer
protected Programmer getProgrammer()
-
sendStatus
public abstract void sendStatus(int CV, int value, int status) throws java.io.IOException
- Throws:
java.io.IOException
-
sendNotAvailableStatus
public abstract void sendNotAvailableStatus() throws java.io.IOException
- Throws:
java.io.IOException
-
parseRequest
public abstract void parseRequest(java.lang.String statusString) throws JmriException, java.io.IOException
- Throws:
JmriException
java.io.IOException
-
writeCV
public void writeCV(ProgrammingMode mode, int CV, int value)
-
readCV
public void readCV(ProgrammingMode mode, int CV)
-
programmingOpReply
public void programmingOpReply(int value, int status)
Receive a callback at the end of a programming operation.- Specified by:
programmingOpReply
in 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.
-
dispose
public void dispose()
-
-