public class SerialHidResponder extends java.lang.Object implements IAsciiCommandResponder
Constructor and Description |
---|
SerialHidResponder() |
Modifier and Type | Method and Description |
---|---|
void |
clearLastResponse()
Clears the values from the last response
Derived classes must call super class to ensure correct operation
|
ILineReceivedDelegate |
getLineReceivedDelegate() |
boolean |
isEnabled()
Enables/disables the responder
- when enabled and a delegate has been set then the delegate will be invoked for each line and the line will be claimed by this responder
- when disabled (or if no delegate set) the delegate will not be invoked and all lines will be ignored
|
boolean |
isResponseFinished()
Gets a value indicating whether the response is complete (i.e.
|
boolean |
processReceivedLine(java.lang.String fullLine,
boolean moreLinesAvailable)
Each correctly terminated line from the device is passed to this method for processing
|
void |
setEnabled(boolean state) |
void |
setLineReceivedDelegate(ILineReceivedDelegate lineReceivedDelegate) |
public boolean isEnabled()
public void setEnabled(boolean state)
public ILineReceivedDelegate getLineReceivedDelegate()
public void setLineReceivedDelegate(ILineReceivedDelegate lineReceivedDelegate)
lineReceivedDelegate
- the lineReceivedDelegate to setpublic boolean isResponseFinished()
IAsciiCommandResponder
isResponseFinished
in interface IAsciiCommandResponder
public void clearLastResponse()
IAsciiCommandResponder
clearLastResponse
in interface IAsciiCommandResponder
public boolean processReceivedLine(java.lang.String fullLine, boolean moreLinesAvailable) throws java.lang.Exception
IAsciiCommandResponder
processReceivedLine
in interface IAsciiCommandResponder
fullLine
- The line to be processedmoreLinesAvailable
- When true indicates there are additional lines to be processed (and will also be passed to this method)java.lang.Exception