org.avineas.fins.payload
public class ReadCommand extends IOCommand
Modifier and Type | Field and Description |
---|---|
static int |
SRC
The sub response code for read commands.
|
ADDRESSOFFSET, AREACODEOFFSET, MRC, SIZEOFFSET, STARTDATAOFFSET
MAXPAYLOADSIZE
Constructor and Description |
---|
ReadCommand(byte[] payload)
Construct a read command from a FINS payload.
|
ReadCommand(int areaCode,
int startAddress,
int size)
Create a read command.
|
getAreaCode, getMaxAddresses, getNumberOfValues, getStartAddress, getStartBitAddress, setStartAddress, setStartBitAddress
decode, encode, getBytes, getBytes, getMrc, getRequestCode, getSrc, setMrc, setRequestCode, setRequestCode, setSrc
public static final int SRC
public ReadCommand(byte[] payload) throws java.lang.Exception
payload
- The payload of the commandjava.lang.Exception
- In case of errorspublic ReadCommand(int areaCode, int startAddress, int size)
areaCode
- The area codestartAddress
- The start address (word, not bit)size
- The size to read, specified in addresses