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 ProcessImage
public 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
IllegalDataAddressException
public boolean getHoldingRegisterBit(int offset, int bit) throws IllegalDataAddressException
IllegalDataAddressException
public boolean getInputRegisterBit(int offset, int bit) throws IllegalDataAddressException
IllegalDataAddressException
public java.lang.Number getNumeric(int range, int offset, int dataType) throws IllegalDataAddressException
IllegalDataAddressException
public java.lang.String getString(int range, int offset, int dataType, int registerCount) throws IllegalDataAddressException
IllegalDataAddressException
public java.lang.String getString(int range, int offset, int dataType, int registerCount, java.nio.charset.Charset charset) throws IllegalDataAddressException
IllegalDataAddressException
public <T> T getRegister(BaseLocator<T> locator) throws IllegalDataAddressException
IllegalDataAddressException
public boolean getCoil(int offset) throws IllegalDataAddressException
ProcessImage
getCoil
in interface ProcessImage
IllegalDataAddressException
public void setCoil(int offset, boolean value)
ProcessImage
setCoil
in interface ProcessImage
public void writeCoil(int offset, boolean value) throws IllegalDataAddressException
ProcessImage
writeCoil
in interface ProcessImage
IllegalDataAddressException
public boolean getInput(int offset) throws IllegalDataAddressException
ProcessImage
getInput
in interface ProcessImage
IllegalDataAddressException
public void setInput(int offset, boolean value)
ProcessImage
setInput
in interface ProcessImage
public short getHoldingRegister(int offset) throws IllegalDataAddressException
ProcessImage
getHoldingRegister
in interface ProcessImage
IllegalDataAddressException
public void setHoldingRegister(int offset, short value)
ProcessImage
setHoldingRegister
in interface ProcessImage
public void writeHoldingRegister(int offset, short value) throws IllegalDataAddressException
ProcessImage
writeHoldingRegister
in interface ProcessImage
IllegalDataAddressException
public short getInputRegister(int offset) throws IllegalDataAddressException
ProcessImage
getInputRegister
in interface ProcessImage
IllegalDataAddressException
public void setInputRegister(int offset, short value)
ProcessImage
setInputRegister
in interface ProcessImage
public byte getExceptionStatus()
ProcessImage
getExceptionStatus
in interface ProcessImage
public byte[] getReportSlaveIdData()
ProcessImage
getReportSlaveIdData
in interface ProcessImage
Copyright © 2014 Infinite Automation Systems. All Rights Reserved.