public class BasicProcessImage extends java.lang.Object implements ProcessImage
| Constructor and Description |
|---|
BasicProcessImage(int slaveId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ProcessImageListener l) |
boolean |
getBit(int range,
int offset,
int bit) |
boolean |
getCoil(int offset)
Returns the current value of the coil for the given offset.
|
byte |
getExceptionStatus()
Returns the current value of the exception status.
|
short |
getHoldingRegister(int offset)
Returns the current value of the holding register for the given offset.
|
boolean |
getHoldingRegisterBit(int offset,
int bit) |
boolean |
getInput(int offset)
Returns the current value of the input for the given offset.
|
short |
getInputRegister(int offset)
Returns the current value of the input register for the given offset.
|
boolean |
getInputRegisterBit(int offset,
int bit) |
short |
getInvalidAddressValue() |
java.lang.Number |
getNumeric(int range,
int offset,
int dataType) |
<T> T |
getRegister(BaseLocator<T> locator) |
byte[] |
getReportSlaveIdData()
Returns the data for the report slave id command.
|
int |
getSlaveId() |
java.lang.String |
getString(int range,
int offset,
int dataType,
int registerCount) |
java.lang.String |
getString(int range,
int offset,
int dataType,
int registerCount,
java.nio.charset.Charset charset) |
boolean |
isAllowInvalidAddress() |
void |
removeListener(ProcessImageListener l) |
void |
setAllowInvalidAddress(boolean allowInvalidAddress) |
void |
setBinary(int registerId,
boolean value) |
void |
setBinary(int range,
int offset,
boolean value) |
void |
setBit(int range,
int offset,
int bit,
boolean value) |
void |
setCoil(int offset,
boolean value)
Used internally for setting the value of the coil.
|
void |
setExceptionStatus(byte exceptionStatus) |
void |
setHoldingRegister(int offset,
short value)
Used internally for setting the value of the holding register.
|
void |
setHoldingRegister(int offset,
short[] registers) |
void |
setHoldingRegisterBit(int offset,
int bit,
boolean value) |
void |
setInput(int offset,
boolean value)
Used internally for setting the value of the input.
|
void |
setInputRegister(int offset,
short value)
Used internally for setting the value of the input register.
|
void |
setInputRegister(int offset,
short[] registers) |
void |
setInputRegisterBit(int offset,
int bit,
boolean value) |
void |
setInvalidAddressValue(short invalidAddressValue) |
void |
setNumeric(int range,
int offset,
int dataType,
java.lang.Number value) |
void |
setNumeric(int registerId,
int dataType,
java.lang.Number value) |
void |
setString(int range,
int offset,
int dataType,
int registerCount,
java.nio.charset.Charset charset,
java.lang.String s) |
void |
setString(int range,
int offset,
int dataType,
int registerCount,
java.lang.String s) |
void |
writeCoil(int offset,
boolean value)
Used to set the coil as a result of a write command from the master.
|
void |
writeHoldingRegister(int offset,
short value)
Used to set the holding register as a result of a write command from the master.
|
public int getSlaveId()
getSlaveId in interface ProcessImagepublic void addListener(ProcessImageListener l)
public void removeListener(ProcessImageListener l)
public boolean isAllowInvalidAddress()
public void setAllowInvalidAddress(boolean allowInvalidAddress)
public short getInvalidAddressValue()
public void setInvalidAddressValue(short invalidAddressValue)
public void setExceptionStatus(byte exceptionStatus)
public void setBinary(int registerId,
boolean value)
public void setBinary(int range,
int offset,
boolean value)
public void setNumeric(int registerId,
int dataType,
java.lang.Number value)
public void setNumeric(int range,
int offset,
int dataType,
java.lang.Number value)
public void setString(int range,
int offset,
int dataType,
int registerCount,
java.lang.String s)
public void setString(int range,
int offset,
int dataType,
int registerCount,
java.nio.charset.Charset charset,
java.lang.String s)
public void setHoldingRegister(int offset,
short[] registers)
public void setInputRegister(int offset,
short[] registers)
public void setBit(int range,
int offset,
int bit,
boolean value)
public void setHoldingRegisterBit(int offset,
int bit,
boolean value)
public void setInputRegisterBit(int offset,
int bit,
boolean value)
public boolean getBit(int range,
int offset,
int bit)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic boolean getHoldingRegisterBit(int offset,
int bit)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic boolean getInputRegisterBit(int offset,
int bit)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic java.lang.Number getNumeric(int range,
int offset,
int dataType)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic java.lang.String getString(int range,
int offset,
int dataType,
int registerCount)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic java.lang.String getString(int range,
int offset,
int dataType,
int registerCount,
java.nio.charset.Charset charset)
throws IllegalDataAddressException
IllegalDataAddressExceptionpublic <T> T getRegister(BaseLocator<T> locator) throws IllegalDataAddressException
IllegalDataAddressExceptionpublic boolean getCoil(int offset)
throws IllegalDataAddressException
ProcessImagegetCoil in interface ProcessImageIllegalDataAddressExceptionpublic void setCoil(int offset,
boolean value)
ProcessImagesetCoil in interface ProcessImagepublic void writeCoil(int offset,
boolean value)
throws IllegalDataAddressException
ProcessImagewriteCoil in interface ProcessImageIllegalDataAddressExceptionpublic boolean getInput(int offset)
throws IllegalDataAddressException
ProcessImagegetInput in interface ProcessImageIllegalDataAddressExceptionpublic void setInput(int offset,
boolean value)
ProcessImagesetInput in interface ProcessImagepublic short getHoldingRegister(int offset)
throws IllegalDataAddressException
ProcessImagegetHoldingRegister in interface ProcessImageIllegalDataAddressExceptionpublic void setHoldingRegister(int offset,
short value)
ProcessImagesetHoldingRegister in interface ProcessImagepublic void writeHoldingRegister(int offset,
short value)
throws IllegalDataAddressException
ProcessImagewriteHoldingRegister in interface ProcessImageIllegalDataAddressExceptionpublic short getInputRegister(int offset)
throws IllegalDataAddressException
ProcessImagegetInputRegister in interface ProcessImageIllegalDataAddressExceptionpublic void setInputRegister(int offset,
short value)
ProcessImagesetInputRegister in interface ProcessImagepublic byte getExceptionStatus()
ProcessImagegetExceptionStatus in interface ProcessImagepublic byte[] getReportSlaveIdData()
ProcessImagegetReportSlaveIdData in interface ProcessImageCopyright © 2014 Infinite Automation Systems. All Rights Reserved.