public class ModbusRequestBlock extends AbstractRequestBlock
AbstractRequestBlock.Statistics
Constructor and Description |
---|
ModbusRequestBlock(Executor executor,
String id,
String name,
String mainTypeName,
ModbusSlave slave,
org.osgi.framework.BundleContext context,
Request request,
AtomicInteger transactionId,
boolean enableStatistics) |
Modifier and Type | Method and Description |
---|---|
Object |
createPollRequest()
Create poll request
|
long |
getPollRequestTimeout()
Get the requested timeout in milliseconds
|
Request |
getRequest()
The the configured request
|
int |
getStartAddress() |
protected void |
handleData(ReadResponse readResponse) |
void |
handleFailure(Throwable e) |
boolean |
handleMessage(Object message)
Handle an incoming message while the job was active
|
String |
toString() |
void |
writeBit(int blockAddress,
int subIndex,
boolean value)
Write a bit
|
void |
writeData(int blockAddress,
byte[] data) |
calculatePriority, dispose, handleData, handleDisconnect, handleError, handleTimeout, initialize, recordChecksumError, recordUpdate, requestUpdate, setVariables, updatePriority
public ModbusRequestBlock(Executor executor, String id, String name, String mainTypeName, ModbusSlave slave, org.osgi.framework.BundleContext context, Request request, AtomicInteger transactionId, boolean enableStatistics)
public long getPollRequestTimeout()
PollRequest
public Request getRequest()
public void handleFailure(Throwable e)
handleFailure
in interface PollRequest
handleFailure
in class AbstractRequestBlock
public boolean handleMessage(Object message)
PollRequest
message
- the incoming messageprotected void handleData(ReadResponse readResponse)
public Object createPollRequest()
PollRequest
public int getStartAddress()
public void writeBit(int blockAddress, int subIndex, boolean value)
MemoryRequestBlock
blockAddress
- the address relative to the block start addresssubIndex
- the bit index at the block address (normally 0..8)value
- the value to writepublic void writeData(int blockAddress, byte[] data)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.